Leon 3 years ago
commit e0f30651c2

@ -105,5 +105,9 @@
<groupId>org.apache.axis</groupId>
<artifactId>axis-saaj</artifactId>
</dependency>
<dependency>
<groupId>com.foreverwin.mesnac</groupId>
<artifactId>common</artifactId>
</dependency>
</dependencies>
</project>

@ -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;
}
}

@ -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<UsrDto> findList(String user);
IPage findPage(IPage page,String user);
}

@ -370,7 +370,7 @@ public class ProdReadyTaskServiceImpl extends ServiceImpl<ProdReadyTaskMapper, P
LabelPrintDto labelPrintDto = new LabelPrintDto();
labelPrintDto.setPrinter(printName);
labelPrintDto.setPrintTemplate(Constants.PRINT_TYPE_SFC);
labelPrintDto.setItem(sfcDispatchDto.getItem());
labelPrintDto.setItem(selectCurrent.getItem());
labelPrintDto.setItemDescription(selectCurrent.getDescription());
labelPrintDto.setSfc(prodReadyTask.getSfc());
Sfc sfcServiceById = sfcService.getById(HandleEnum.SFC.getHandle(site, prodReadyTask.getSfc()));

@ -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));
}
}

@ -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<Usr> {
List<SysUser> selectListForPd(@Param("site") String site);
/*List<Usr> userList(Usr user);*/
List<UsrDto> findList(@Param("site")String site,@Param("user")String user);
IPage findPage(IPage page,@Param("site")String site,@Param("user")String user);
}

@ -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<Usr> {
public interface UsrService extends IService<Usr>, UserService {
/**
*

@ -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<UsrMapper, Usr> implements UsrSe
return usrMapper.selectListForPd(site);
}
@Override
public List<UsrDto> 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<Usr> userList(Usr user) {
String site = CommonMethods.getSite();

@ -29,6 +29,12 @@
<result column="ERP_USER" property="erpUser" />
</resultMap>
<resultMap id="usrDto" type="com.foreverwin.mesnac.common.dto.UsrDto">
<result column="USER_NAME" property="userName"/>
<result column="FULL_NAME" property="fullName"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
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 @@
</foreach>)
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="findList" resultMap="usrDto">
SELECT U.USER_ID USER_NAME,ZNU.FULL_NAME FULL_NAME
FROM USR U
INNER JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = U.USER_ID
WHERE U.SITE=#{site} AND U.USER_ID = #{user}
</select>
<select id="findPage" resultMap="usrDto">
SELECT U.USER_ID USER_NAME,ZNU.FULL_NAME FULL_NAME
FROM USR U
INNER JOIN Z_NWA_USER ZNU ON ZNU.USER_NAME = U.USER_ID
WHERE U.SITE=#{site}
<if test="user != null and user != ''">
AND (
U.USER_ID LIKE '%${user}%'
OR ZNU.FULL_NAME LIKE '%${user}%'
)
</if>
</select>
</mapper>

Loading…
Cancel
Save