From 5fb42f229f7f6552ab3d80c0d3f09458bbfadc36 Mon Sep 17 00:00:00 2001 From: philip <244793088@qq.com> Date: Tue, 10 Aug 2021 16:48:26 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=89=93=E5=8D=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/common/service/impl/ProdReadyTaskServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java index d8091ca0..048a8df8 100644 --- a/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/impl/ProdReadyTaskServiceImpl.java @@ -370,7 +370,7 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl Date: Tue, 10 Aug 2021 17:33:41 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/pom.xml | 4 +++ .../foreverwin/mesnac/common/dto/UsrDto.java | 29 +++++++++++++++++++ .../mesnac/common/service/UserService.java | 17 +++++++++++ .../controller/UserResourceController.java | 16 ++++++++++ .../mesnac/listener/mapper/UsrMapper.java | 6 ++++ .../mesnac/listener/service/UsrService.java | 3 +- .../listener/service/impl/UsrServiceImpl.java | 14 +++++++++ .../src/main/resources/mapper/UsrMapper.xml | 24 +++++++++++++++ 8 files changed, 112 insertions(+), 1 deletion(-) create mode 100644 common/src/main/java/com/foreverwin/mesnac/common/dto/UsrDto.java create mode 100644 common/src/main/java/com/foreverwin/mesnac/common/service/UserService.java diff --git a/common/pom.xml b/common/pom.xml index f954408f..2adee2be 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -105,5 +105,9 @@ org.apache.axis axis-saaj + + com.foreverwin.mesnac + common + \ No newline at end of file diff --git a/common/src/main/java/com/foreverwin/mesnac/common/dto/UsrDto.java b/common/src/main/java/com/foreverwin/mesnac/common/dto/UsrDto.java new file mode 100644 index 00000000..f87af383 --- /dev/null +++ b/common/src/main/java/com/foreverwin/mesnac/common/dto/UsrDto.java @@ -0,0 +1,29 @@ +package com.foreverwin.mesnac.common.dto; + +/** + * @Description TODO + * @Author zhaojiawei + * @Since 2021-08-10 + */ +public class UsrDto { + + private String userName; + + private String fullName; + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getFullName() { + return fullName; + } + + public void setFullName(String fullName) { + this.fullName = fullName; + } +} diff --git a/common/src/main/java/com/foreverwin/mesnac/common/service/UserService.java b/common/src/main/java/com/foreverwin/mesnac/common/service/UserService.java new file mode 100644 index 00000000..eeb9af99 --- /dev/null +++ b/common/src/main/java/com/foreverwin/mesnac/common/service/UserService.java @@ -0,0 +1,17 @@ +package com.foreverwin.mesnac.common.service; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.foreverwin.mesnac.common.dto.UsrDto; + +import java.util.List; + +/** + * @Description TODO + * @Author zhaojiawei + * @Since 2021-08-10 + */ +public interface UserService { + List findList(String user); + + IPage findPage(IPage page,String user); +} diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/UserResourceController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/UserResourceController.java index 5362f265..03ccfc2e 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/UserResourceController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/UserResourceController.java @@ -4,6 +4,7 @@ import cn.hutool.json.JSONUtil; import com.alibaba.fastjson.JSONArray; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; +import com.foreverwin.mesnac.common.service.UserService; import com.foreverwin.mesnac.dispatch.dto.UserResourceDto; import com.foreverwin.mesnac.dispatch.model.UserResource; import com.foreverwin.mesnac.dispatch.service.UserResourceService; @@ -28,6 +29,10 @@ public class UserResourceController { @Autowired public UserResourceService userResourceService; + @Autowired + public UserService userService; + + /** * 根据id查询 * @@ -162,4 +167,15 @@ public class UserResourceController { } } + @GetMapping("/findList") + public R findList(String user){ + return R.ok(userService.findList(user)); + } + + @GetMapping("/findPage") + public R page(FrontPage frontPage) { + String globalQuery = frontPage.getGlobalQuery(); + return R.ok(userService.findPage(frontPage.getPagePlus(), globalQuery)); + } + } \ No newline at end of file diff --git a/listener/src/main/java/com/foreverwin/mesnac/listener/mapper/UsrMapper.java b/listener/src/main/java/com/foreverwin/mesnac/listener/mapper/UsrMapper.java index 4a4e676f..3eda5db2 100644 --- a/listener/src/main/java/com/foreverwin/mesnac/listener/mapper/UsrMapper.java +++ b/listener/src/main/java/com/foreverwin/mesnac/listener/mapper/UsrMapper.java @@ -1,6 +1,8 @@ package com.foreverwin.mesnac.listener.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.foreverwin.mesnac.common.dto.UsrDto; import com.foreverwin.mesnac.listener.model.SysUser; import com.foreverwin.mesnac.listener.model.Usr; import org.apache.ibatis.annotations.Param; @@ -21,4 +23,8 @@ public interface UsrMapper extends BaseMapper { List selectListForPd(@Param("site") String site); /*List userList(Usr user);*/ + List findList(@Param("site")String site,@Param("user")String user); + + IPage findPage(IPage page,@Param("site")String site,@Param("user")String user); + } \ No newline at end of file diff --git a/listener/src/main/java/com/foreverwin/mesnac/listener/service/UsrService.java b/listener/src/main/java/com/foreverwin/mesnac/listener/service/UsrService.java index bff21257..19800010 100644 --- a/listener/src/main/java/com/foreverwin/mesnac/listener/service/UsrService.java +++ b/listener/src/main/java/com/foreverwin/mesnac/listener/service/UsrService.java @@ -2,6 +2,7 @@ package com.foreverwin.mesnac.listener.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import com.foreverwin.mesnac.common.service.UserService; import com.foreverwin.mesnac.listener.model.SysUser; import com.foreverwin.mesnac.listener.model.Usr; import com.foreverwin.modular.core.util.FrontPage; @@ -16,7 +17,7 @@ import java.util.List; * @author sungang * @since 2020-10-16 */ -public interface UsrService extends IService { +public interface UsrService extends IService, UserService { /** * 分页查询 diff --git a/listener/src/main/java/com/foreverwin/mesnac/listener/service/impl/UsrServiceImpl.java b/listener/src/main/java/com/foreverwin/mesnac/listener/service/impl/UsrServiceImpl.java index 51100e8b..b6484643 100644 --- a/listener/src/main/java/com/foreverwin/mesnac/listener/service/impl/UsrServiceImpl.java +++ b/listener/src/main/java/com/foreverwin/mesnac/listener/service/impl/UsrServiceImpl.java @@ -3,10 +3,12 @@ package com.foreverwin.mesnac.listener.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.foreverwin.mesnac.common.dto.UsrDto; import com.foreverwin.mesnac.listener.mapper.UsrMapper; import com.foreverwin.mesnac.listener.model.SysUser; import com.foreverwin.mesnac.listener.model.Usr; import com.foreverwin.mesnac.listener.service.UsrService; +import com.foreverwin.modular.core.util.CommonMethods; import com.foreverwin.modular.core.util.FrontPage; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -49,6 +51,18 @@ public class UsrServiceImpl extends ServiceImpl implements UsrSe return usrMapper.selectListForPd(site); } + @Override + public List findList(String user) { + String site = CommonMethods.getSite(); + return usrMapper.findList(site,user); + } + + @Override + public IPage findPage(IPage page, String user) { + String site = CommonMethods.getSite(); + return usrMapper.findPage(page,site,user); + } + /* @Override public List userList(Usr user) { String site = CommonMethods.getSite(); diff --git a/listener/src/main/resources/mapper/UsrMapper.xml b/listener/src/main/resources/mapper/UsrMapper.xml index b4fe79c6..b40e7fb2 100644 --- a/listener/src/main/resources/mapper/UsrMapper.xml +++ b/listener/src/main/resources/mapper/UsrMapper.xml @@ -29,6 +29,12 @@ + + + + + + HANDLE, CHANGE_STAMP, SITE, USER_ID, CURRENT_OPERATION_BO, CURRENT_RESOURCE_BO, CREATED_DATE_TIME, MODIFIED_DATE_TIME, BADGE_NUMBER, EMPLOYEE_NUMBER, HIRE_DATE, TERMINATION_DATE, ALLOW_CLOCK_IN_NON_PROD, ACTION_CLOCK_OUT_SFC, CLOCK_IN_OUT_RANGE, ALLOW_SUP_TIME_EDIT_APPR, APPR_REQ_FOR_EXPORT, AUTO_CLOCK_OUT, CLOCK_IN_CONTROL, DEFAULT_WORK_CENTER_BO, ERP_PERSONNEL_NUMBER, ERP_USER @@ -606,5 +612,23 @@ ) + +