diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseTeamMembersController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseTeamMembersController.java index 44c3f7f..261739d 100644 --- a/aucma-base/src/main/java/com/aucma/base/controller/BaseTeamMembersController.java +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseTeamMembersController.java @@ -30,48 +30,71 @@ import com.aucma.common.core.page.TableDataInfo; * @date 2023-09-19 */ @RestController -@RequestMapping("/base/teamMembers" ) +@RequestMapping("/base/teamMembers") public class BaseTeamMembersController extends BaseController { @Autowired private IBaseTeamMembersService baseTeamMembersService; -/** - * 查询班组信息列表 - */ -@PreAuthorize("@ss.hasPermi('base:teamMembers:list')" ) -@GetMapping("/list" ) + /** + * 查询班组信息列表 + */ + @PreAuthorize("@ss.hasPermi('base:teamMembers:list')") + @GetMapping("/list") public TableDataInfo list(BaseTeamMembers baseTeamMembers) { startPage(); List list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers); return getDataTable(list); } + /** + * 查询班组用户 + * @param baseTeamMembers + * @return + */ + @GetMapping("/teamUserList") + public TableDataInfo teamUserList(BaseTeamMembers baseTeamMembers) { + startPage(); + List list = baseTeamMembersService.teamUserList(baseTeamMembers); + return getDataTable(list); + } + + /** + * 查询班组下拉框列表 + * @param baseTeamMembers + * @return + */ + @GetMapping("/getTeamMemberList") + public AjaxResult getTeamMemberList(BaseTeamMembers baseTeamMembers) { + List list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers); + return success(list); + } + /** * 导出班组信息列表 */ - @PreAuthorize("@ss.hasPermi('base:teamMembers:export')" ) - @Log(title = "班组信息" , businessType = BusinessType.EXPORT) - @PostMapping("/export" ) + @PreAuthorize("@ss.hasPermi('base:teamMembers:export')") + @Log(title = "班组信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") public void export(HttpServletResponse response, BaseTeamMembers baseTeamMembers) { List list = baseTeamMembersService.selectBaseTeamMembersList(baseTeamMembers); - ExcelUtil util = new ExcelUtil(BaseTeamMembers. class); - util.exportExcel(response, list, "班组信息数据" ); + ExcelUtil util = new ExcelUtil(BaseTeamMembers.class); + util.exportExcel(response, list, "班组信息数据"); } /** * 获取班组信息详细信息 */ - @PreAuthorize("@ss.hasPermi('base:teamMembers:query')" ) - @GetMapping(value = "/{objId}" ) - public AjaxResult getInfo(@PathVariable("objId" ) Long objId) { + @PreAuthorize("@ss.hasPermi('base:teamMembers:query')") + @GetMapping(value = "/{objId}") + public AjaxResult getInfo(@PathVariable("objId") Long objId) { return success(baseTeamMembersService.selectBaseTeamMembersByObjId(objId)); } /** * 新增班组信息 */ - @PreAuthorize("@ss.hasPermi('base:teamMembers:add')" ) - @Log(title = "班组信息" , businessType = BusinessType.INSERT) + @PreAuthorize("@ss.hasPermi('base:teamMembers:add')") + @Log(title = "班组信息", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody BaseTeamMembers baseTeamMembers) { baseTeamMembers.setCreatedBy(getUsername()); @@ -82,8 +105,8 @@ public class BaseTeamMembersController extends BaseController { /** * 修改班组信息 */ - @PreAuthorize("@ss.hasPermi('base:teamMembers:edit')" ) - @Log(title = "班组信息" , businessType = BusinessType.UPDATE) + @PreAuthorize("@ss.hasPermi('base:teamMembers:edit')") + @Log(title = "班组信息", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody BaseTeamMembers baseTeamMembers) { baseTeamMembers.setUpdatedBy(getUsername()); @@ -94,9 +117,9 @@ public class BaseTeamMembersController extends BaseController { /** * 删除班组信息 */ - @PreAuthorize("@ss.hasPermi('base:teamMembers:remove')" ) - @Log(title = "班组信息" , businessType = BusinessType.DELETE) - @DeleteMapping("/{objIds}" ) + @PreAuthorize("@ss.hasPermi('base:teamMembers:remove')") + @Log(title = "班组信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{objIds}") public AjaxResult remove(@PathVariable Long[] objIds) { return toAjax(baseTeamMembersService.deleteBaseTeamMembersByObjIds(objIds)); } diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java index 93ca3fc..dff9844 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseProductLine.java @@ -101,6 +101,32 @@ public class BaseProductLine extends BaseEntity { */ private String processCode; + /** + * 工作中心编号 + */ + private String workCenterCode; + + /** + * 工作中心描述 + */ + private String workCenterName; + + public String getWorkCenterCode() { + return workCenterCode; + } + + public void setWorkCenterCode(String workCenterCode) { + this.workCenterCode = workCenterCode; + } + + public String getWorkCenterName() { + return workCenterName; + } + + public void setWorkCenterName(String workCenterName) { + this.workCenterName = workCenterName; + } + public Long getStationType() { return stationType; } diff --git a/aucma-base/src/main/java/com/aucma/base/domain/BaseTeamMembers.java b/aucma-base/src/main/java/com/aucma/base/domain/BaseTeamMembers.java index 1830da1..753497a 100644 --- a/aucma-base/src/main/java/com/aucma/base/domain/BaseTeamMembers.java +++ b/aucma-base/src/main/java/com/aucma/base/domain/BaseTeamMembers.java @@ -108,6 +108,25 @@ public class BaseTeamMembers extends BaseEntity { @Excel(name = "休息时间") private String dineTime; + private String nickName; + private String userName; + + public String getNickName() { + return nickName; + } + + public void setNickName(String nickName) { + this.nickName = nickName; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + public Long getClasses() { return classes; } diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseTeamMembersMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseTeamMembersMapper.java index b34f8e2..2f9c4b4 100644 --- a/aucma-base/src/main/java/com/aucma/base/mapper/BaseTeamMembersMapper.java +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseTeamMembersMapper.java @@ -58,4 +58,11 @@ public interface BaseTeamMembersMapper * @return 结果 */ public int deleteBaseTeamMembersByObjIds(Long[] objIds); + + /** + * 查询班组用户 + * @param baseTeamMembers + * @return + */ + List teamUserList(BaseTeamMembers baseTeamMembers); } diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseTeamMembersService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseTeamMembersService.java index 724b7cb..a5b2f53 100644 --- a/aucma-base/src/main/java/com/aucma/base/service/IBaseTeamMembersService.java +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseTeamMembersService.java @@ -58,4 +58,11 @@ public interface IBaseTeamMembersService * @return 结果 */ public int deleteBaseTeamMembersByObjId(Long objId); + + /** + * + * @param baseTeamMembers + * @return + */ + List teamUserList(BaseTeamMembers baseTeamMembers); } diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseTeamMembersServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseTeamMembersServiceImpl.java index c4263cc..84b51c2 100644 --- a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseTeamMembersServiceImpl.java +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseTeamMembersServiceImpl.java @@ -90,4 +90,14 @@ public class BaseTeamMembersServiceImpl implements IBaseTeamMembersService { return baseTeamMembersMapper.deleteBaseTeamMembersByObjId(objId); } + + /** + * 查询班组用户 + * @param baseTeamMembers + * @return + */ + @Override + public List teamUserList(BaseTeamMembers baseTeamMembers) { + return baseTeamMembersMapper.teamUserList(baseTeamMembers); + } } diff --git a/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml index 80710d6..2307c7d 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseProductLineMapper.xml @@ -20,6 +20,8 @@ + + @@ -36,6 +38,8 @@ bpl.updated_by, bpl.updated_time, bpl.PARENT_ID, + bpl.work_center_code, + bpl.work_center_name, b2.PRODUCT_LINE_NAME parentName from base_productline bpl left join base_factory bf on bf.factory_code = bpl.plant_code @@ -96,6 +100,8 @@ updated_time, parent_id, station_type, + work_center_code, + work_center_name, #{objId}, @@ -110,6 +116,8 @@ #{updatedTime}, #{parentId}, #{stationType}, + #{workCenterCode}, + #{workCenterName}, @@ -127,6 +135,8 @@ updated_time = #{updatedTime}, parent_id = #{parentId}, station_type = #{stationType}, + work_center_code = #{workCenterCode}, + work_center_name = #{workCenterName}, where obj_id = #{objId} diff --git a/aucma-base/src/main/resources/mapper/base/BaseTeamMembersMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseTeamMembersMapper.xml index 81b7653..fe8b724 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseTeamMembersMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseTeamMembersMapper.xml @@ -64,6 +64,37 @@ where tm.obj_id = #{objId} + + SELECT seq_base_teammembers.NEXTVAL as objId FROM DUAL diff --git a/aucma-common/src/main/java/com/aucma/common/core/domain/entity/SysUser.java b/aucma-common/src/main/java/com/aucma/common/core/domain/entity/SysUser.java index 3b29a98..44be18a 100644 --- a/aucma-common/src/main/java/com/aucma/common/core/domain/entity/SysUser.java +++ b/aucma-common/src/main/java/com/aucma/common/core/domain/entity/SysUser.java @@ -95,6 +95,28 @@ public class SysUser extends BaseEntity /** 工位名称 */ private String stationName; + /** 班组编号 */ + private String teamCode; + + /** 班组名称 */ + private String teamName; + + public String getTeamCode() { + return teamCode; + } + + public void setTeamCode(String teamCode) { + this.teamCode = teamCode; + } + + public String getTeamName() { + return teamName; + } + + public void setTeamName(String teamName) { + this.teamName = teamName; + } + public String getStationCode() { return stationCode; } diff --git a/aucma-system/src/main/resources/mapper/system/SysUserMapper.xml b/aucma-system/src/main/resources/mapper/system/SysUserMapper.xml index f91f8fc..a4e1410 100644 --- a/aucma-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/aucma-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -25,6 +25,8 @@ + + @@ -49,21 +51,73 @@ - select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, - d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, - r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status, u.station_code ,pl.PRODUCT_LINE_NAME station_name + select u.user_id, + u.dept_id, + u.user_name, + u.nick_name, + u.email, + u.avatar, + u.phonenumber, + u.password, + u.sex, + u.status, + u.del_flag, + u.login_ip, + u.login_date, + u.create_by, + u.create_time, + u.remark, + d.dept_id, + d.parent_id, + d.ancestors, + d.dept_name, + d.order_num, + d.leader, + d.status as dept_status, + r.role_id, + r.role_name, + r.role_key, + r.role_sort, + r.data_scope, + r.status as role_status, + u.station_code, + u.team_code, + tm.team_name, + pl.PRODUCT_LINE_NAME station_name from sys_user u left join sys_dept d on u.dept_id = d.dept_id left join sys_user_role ur on u.user_id = ur.user_id left join sys_role r on r.role_id = ur.role_id - left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = u.station_code + left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = u.station_code + left join BASE_TEAMMEMBERS tm on tm.TEAM_CODE = u.TEAM_CODE