diff --git a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/UserTypeEnums.java b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/UserTypeEnums.java index 8df1504d..04386616 100644 --- a/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/UserTypeEnums.java +++ b/yanzhu-common/yanzhu-common-core/src/main/java/com/yanzhu/common/core/enums/UserTypeEnums.java @@ -5,12 +5,21 @@ package com.yanzhu.common.core.enums; */ public enum UserTypeEnums { - ZSRY("00", "正式人员",""), - LSRY("08", "临时人员",""), + ZSRY("00", "正式人员","key"), + LSRY("08", "临时人员","key"), FBWTDL("80", "分包代理人","fbwtdl"), FBXMJL("79", "分包项目经理","fbxmjl"), FBBZZZ("78", "分包班组组长","fbbzzz"), - FBLWRY("77", "分包劳务人员",""); + FBLWRY("77", "分包劳务人员","key"), + JSDWRY("69", "建设单位人员","jsdw"), + JLDWRY("68", "监理单位人员","jldw"), + SGDWRY("67", "施工单位人员","sgdw"), + CLFBRY("66", "材料分包人员","clfb"), + HQFBRY("65", "后勤分包人员","hqfb"), + TSSBRY("64", "特殊设备人员","tssb"), + KTDWRY("63", "勘探单位人员","ktdw"), + SJDWRY("62", "设计单位人员","sjdw"), + OTHER("59", "其它单位人员","other"); private final String code; private final String info; diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsGroupMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsGroupMapper.java index cc580ddb..3c25f8fc 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsGroupMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsGroupMapper.java @@ -59,4 +59,9 @@ public interface ProProjectInfoSubdeptsGroupMapper */ public int deleteProProjectInfoSubdeptsGroupByIds(Long[] ids); + /** + * 单位班组离场 + * @param subDeptId + */ + public void updateUseStatusByParams(Long subDeptId); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java index 495a1810..2fa89c14 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java +++ b/yanzhu-common/yanzhu-common-mapper/src/main/java/com/yanzhu/manage/mapper/ProProjectInfoSubdeptsUsersMapper.java @@ -100,4 +100,11 @@ public interface ProProjectInfoSubdeptsUsersMapper * 统计分包单位在岗人员 */ public List> statsSubDeptsUsersByProId(ProProjectInfoSubdeptsUsers where); + + /** + * 单位人员离场 + * @param subDeptId 单位主键 + * @param subDeptGroupId 班组主键 + */ + public void updateUseStatusByParams(@Param("subDeptId")Long subDeptId, @Param("subDeptGroupId")Long subDeptGroupId); } diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml index ef1380a6..cde6408b 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsGroupMapper.xml @@ -41,7 +41,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -146,14 +147,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - update pro_project_info_subdepts_group set is_del=1 where id = #{id} + update pro_project_info_subdepts_group set is_del = 2 where id = #{id} - update pro_project_info_subdepts_group set is_del=1 where id in + update pro_project_info_subdepts_group set is_del = 2 where id in #{id} + + update pro_project_info_subdepts_group set use_status = 2 where id sub_dept_id = #{subDeptId} + + \ No newline at end of file diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml index d6fc1d2e..d08579ae 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsMapper.xml @@ -45,7 +45,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" diff --git a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml index 00a9f552..ca145a0b 100644 --- a/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml +++ b/yanzhu-common/yanzhu-common-mapper/src/main/resources/mapper/manage/ProProjectInfoSubdeptsUsersMapper.xml @@ -69,7 +69,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -325,4 +325,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" group by u.craft_type,u.use_status + + update pro_project_info_subdepts_group set use_status = 2 + where 1=1 + and sub_dept_id = #{subDeptId} + and u.sub_dept_group = #{subDeptGroupId} + + \ No newline at end of file diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsController.java index d47dfa8c..9d11445a 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsController.java @@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.List; /** - * 分包单位Controller + * 参建单位Controller * * @author JiangYuQi * @date 2024-08-25 @@ -29,7 +29,7 @@ public class ProProjectInfoSubdeptsController extends BaseController private IProProjectInfoSubdeptsService proProjectInfoSubdeptsService; /** - * 查询分包单位列表 + * 查询参建单位列表 */ @RequiresPermissions("manage:proProjectInfoSubdepts:list") @GetMapping("/list") @@ -41,20 +41,20 @@ public class ProProjectInfoSubdeptsController extends BaseController } /** - * 导出分包单位列表 + * 导出参建单位列表 */ @RequiresPermissions("manage:proProjectInfoSubdepts:export") - @Log(title = "分包单位", businessType = BusinessType.EXPORT) + @Log(title = "参建单位", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ProProjectInfoSubdepts proProjectInfoSubdepts) { List list = proProjectInfoSubdeptsService.selectProProjectInfoSubdeptsList(proProjectInfoSubdepts); ExcelUtil util = new ExcelUtil(ProProjectInfoSubdepts.class); - util.exportExcel(response, list, "分包单位数据"); + util.exportExcel(response, list, "参建单位数据"); } /** - * 获取分包单位详细信息 + * 获取参建单位详细信息 * @RequiresPermissions("manage:proProjectInfoSubdepts:query") */ @GetMapping(value = "/{id}") @@ -64,10 +64,10 @@ public class ProProjectInfoSubdeptsController extends BaseController } /** - * 新增分包单位 + * 新增参建单位 */ @RequiresPermissions("manage:proProjectInfoSubdepts:add") - @Log(title = "分包单位", businessType = BusinessType.INSERT) + @Log(title = "参建单位", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts) { @@ -75,10 +75,10 @@ public class ProProjectInfoSubdeptsController extends BaseController } /** - * 修改分包单位 + * 修改参建单位 */ @RequiresPermissions("manage:proProjectInfoSubdepts:edit") - @Log(title = "分包单位", businessType = BusinessType.UPDATE) + @Log(title = "参建单位", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts) { @@ -86,21 +86,32 @@ public class ProProjectInfoSubdeptsController extends BaseController } /** - * 修改分包单位 + * 修改参建单位 */ @RequiresPermissions("manage:proProjectInfoSubdepts:edit") - @Log(title = "分包单位", businessType = BusinessType.UPDATE) - @PutMapping("/editInfos") + @Log(title = "参建单位", businessType = BusinessType.UPDATE) + @PostMapping("/editInfos") public AjaxResult editInfos(@RequestBody ProProjectInfoSubdepts proProjectInfoSubdepts) { return toAjax(proProjectInfoSubdeptsService.updateProProjectInfoSubdeptsEntity(proProjectInfoSubdepts)); } /** - * 删除分包单位 + * 参建单位入场/离场 + */ + @RequiresPermissions("manage:proProjectInfoSubdepts:edit") + @Log(title = "单位离场", businessType = BusinessType.UPDATE) + @GetMapping("/editUseStatus/{id}") + public AjaxResult editUseStatus(@PathVariable("id") Long id, String status) + { + return toAjax(proProjectInfoSubdeptsService.updateUseStatus(id,status)); + } + + /** + * 删除参建单位 */ @RequiresPermissions("manage:proProjectInfoSubdepts:remove") - @Log(title = "分包单位", businessType = BusinessType.DELETE) + @Log(title = "参建单位", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { @@ -108,7 +119,7 @@ public class ProProjectInfoSubdeptsController extends BaseController } /** - * 查询分包单位列表 + * 查询参建单位列表 */ @GetMapping("/findAll") public AjaxResult findAll(ProProjectInfoSubdepts proProjectInfoSubdepts) diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsGroupController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsGroupController.java index 0cfb986e..d0b6166e 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsGroupController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsGroupController.java @@ -16,7 +16,7 @@ import javax.servlet.http.HttpServletResponse; import java.util.List; /** - * 分包单位班组Controller + * 单位班组Controller * * @author JiangYuqi * @date 2024-08-25 @@ -29,7 +29,7 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController private IProProjectInfoSubdeptsGroupService proProjectInfoSubdeptsGroupService; /** - * 查询分包单位班组列表 + * 查询单位班组列表 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:list") @GetMapping("/list") @@ -41,20 +41,20 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController } /** - * 导出分包单位班组列表 + * 导出单位班组列表 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:export") - @Log(title = "分包单位班组", businessType = BusinessType.EXPORT) + @Log(title = "单位班组", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup) { List list = proProjectInfoSubdeptsGroupService.selectProProjectInfoSubdeptsGroupList(proProjectInfoSubdeptsGroup); ExcelUtil util = new ExcelUtil(ProProjectInfoSubdeptsGroup.class); - util.exportExcel(response, list, "分包单位班组数据"); + util.exportExcel(response, list, "单位班组数据"); } /** - * 获取分包单位班组详细信息 + * 获取单位班组详细信息 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:query") @GetMapping(value = "/{id}") @@ -64,10 +64,10 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController } /** - * 新增分包单位班组 + * 新增单位班组 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:add") - @Log(title = "分包单位班组", businessType = BusinessType.INSERT) + @Log(title = "单位班组", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup) { @@ -75,10 +75,10 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController } /** - * 修改分包单位班组 + * 修改单位班组 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit") - @Log(title = "分包单位班组", businessType = BusinessType.UPDATE) + @Log(title = "单位班组", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup) { @@ -86,10 +86,21 @@ public class ProProjectInfoSubdeptsGroupController extends BaseController } /** - * 删除分包单位班组 + * 单位班组入场/离场 + */ + @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:edit") + @Log(title = "班组离场", businessType = BusinessType.UPDATE) + @GetMapping("/editUseStatus/{id}") + public AjaxResult editUseStatus(@PathVariable("id") Long id, String status) + { + return toAjax(proProjectInfoSubdeptsGroupService.updateUseStatus(id,status)); + } + + /** + * 删除单位班组 */ @RequiresPermissions("manage:proProjectInfoSubdeptsGroup:remove") - @Log(title = "分包单位班组", businessType = BusinessType.DELETE) + @Log(title = "单位班组", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java index d7bbc2e5..f2cf1c56 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/controller/ProProjectInfoSubdeptsUsersController.java @@ -186,4 +186,15 @@ public class ProProjectInfoSubdeptsUsersController extends BaseController List list = proProjectInfoSubdeptsUsersService.selectProProjectInfoSubdeptsUsersList(query); return success(list); } + + /** + * 查询分包单位人员 + * @param proProjectInfoSubdeptsUsers 人员信息 + */ + @GetMapping("/findAllProSubDeptsUser") + public AjaxResult findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) + { + List list = proProjectInfoSubdeptsUsersService.findAllProSubDeptsUser(proProjectInfoSubdeptsUsers); + return success(list); + } } diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsGroupService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsGroupService.java index c09f0b32..fab6d3d2 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsGroupService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsGroupService.java @@ -43,6 +43,14 @@ public interface IProProjectInfoSubdeptsGroupService */ public int updateProProjectInfoSubdeptsGroup(ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup); + /** + * 修改班组状态 + * @param id 班组主键 + * @param status 班组状态 + * @return + */ + public int updateUseStatus(Long id, String status); + /** * 批量删除分包单位班组 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java index df4dd748..60a181a6 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsService.java @@ -70,6 +70,14 @@ public interface IProProjectInfoSubdeptsService */ public int updateProProjectInfoSubdeptsEntity(ProProjectInfoSubdepts proProjectInfoSubdepts); + /** + * 修改单位状态 + * @param id 单位主键 + * @param status 单位状态 + * @return + */ + public int updateUseStatus(Long id, String status); + /** * 批量删除分包单位 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java index 8bccd2e9..1c5fb4b6 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/IProProjectInfoSubdeptsUsersService.java @@ -31,6 +31,14 @@ public interface IProProjectInfoSubdeptsUsersService */ public List selectProProjectInfoSubdeptsUsersList(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers); + /** + * 查询分包单位工人列表 + * + * @param proProjectInfoSubdeptsUsers 分包单位工人 + * @return 分包单位工人集合 + */ + public List findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers); + /** * 新增分包单位工人 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsGroupServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsGroupServiceImpl.java index ee2b56d5..edb76478 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsGroupServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsGroupServiceImpl.java @@ -2,10 +2,7 @@ package com.yanzhu.manage.service.impl; import cn.binarywang.wx.miniapp.api.WxMaService; import com.yanzhu.common.core.constant.SecurityConstants; -import com.yanzhu.common.core.enums.ApproveStatus; -import com.yanzhu.common.core.enums.CardTypeEnums; -import com.yanzhu.common.core.enums.ShiFouEnums; -import com.yanzhu.common.core.enums.UseStateEnums; +import com.yanzhu.common.core.enums.*; import com.yanzhu.common.core.exception.ServiceException; import com.yanzhu.common.core.utils.DateUtils; import com.yanzhu.common.core.utils.StringUtils; @@ -313,6 +310,29 @@ public class ProProjectInfoSubdeptsGroupServiceImpl implements IProProjectInfoSu return res; } + /** + * 修改班组状态 + * @param id 班组主键 + * @param status 班组状态 + * @return + */ + @Override + public int updateUseStatus(Long id, String status){ + if(StringUtils.isNotEmpty(status)){ + ProProjectInfoSubdeptsGroup proProjectInfoSubdeptsGroup = proProjectInfoSubdeptsGroupMapper.selectProProjectInfoSubdeptsGroupById(id); + proProjectInfoSubdeptsGroup.setUseStatus(status); + proProjectInfoSubdeptsGroup.setUpdateBy(SecurityUtils.getUsername()); + proProjectInfoSubdeptsGroup.setUpdateTime(DateUtils.getNowDate()); + // 离场时所有人员全部离场 + if(Objects.equals(UseStateEnums.OUT.getCode(), status)){ + proProjectInfoSubdeptsUsersMapper.updateUseStatusByParams(proProjectInfoSubdeptsGroup.getSubDeptId(),proProjectInfoSubdeptsGroup.getId()); + } + return proProjectInfoSubdeptsGroupMapper.updateProProjectInfoSubdeptsGroup(proProjectInfoSubdeptsGroup); + }else{ + throw new ServiceException("参数异常"); + } + } + /** * 批量删除分包单位班组 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java index 654661ca..ae7f8d4c 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsServiceImpl.java @@ -455,6 +455,30 @@ public class ProProjectInfoSubdeptsServiceImpl implements IProProjectInfoSubdept return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); } + /** + * 修改单位状态 + * @param id 单位主键 + * @param status 单位状态 + * @return + */ + @Override + public int updateUseStatus(Long id, String status){ + if(StringUtils.isNotEmpty(status)){ + ProProjectInfoSubdepts proProjectInfoSubdepts = proProjectInfoSubdeptsMapper.selectProProjectInfoSubdeptsById(id); + proProjectInfoSubdepts.setUseStatus(status); + proProjectInfoSubdepts.setUpdateBy(SecurityUtils.getUsername()); + proProjectInfoSubdepts.setUpdateTime(DateUtils.getNowDate()); + // 离场时所有班组/人员全部离场 + if(Objects.equals(UseStateEnums.OUT.getCode(), status)){ + proProjectInfoSubdeptsGroupMapper.updateUseStatusByParams(proProjectInfoSubdepts.getId()); + proProjectInfoSubdeptsUsersMapper.updateUseStatusByParams(proProjectInfoSubdepts.getId(),null); + } + return proProjectInfoSubdeptsMapper.updateProProjectInfoSubdepts(proProjectInfoSubdepts); + }else{ + throw new ServiceException("参数异常"); + } + } + /** * 批量删除分包单位 * diff --git a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java index 6e49709e..2d1525a5 100644 --- a/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java +++ b/yanzhu-modules/yanzhu-manage/src/main/java/com/yanzhu/manage/service/impl/ProProjectInfoSubdeptsUsersServiceImpl.java @@ -97,6 +97,18 @@ public class ProProjectInfoSubdeptsUsersServiceImpl implements IProProjectInfoSu return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers); } + /** + * 查询分包单位工人列表 + * + * @param proProjectInfoSubdeptsUsers 分包单位工人 + * @return 分包单位工人 + */ + @Override + public List findAllProSubDeptsUser(ProProjectInfoSubdeptsUsers proProjectInfoSubdeptsUsers) + { + return proProjectInfoSubdeptsUsersMapper.selectProProjectInfoSubdeptsUsersList(proProjectInfoSubdeptsUsers); + } + /** * 新增分包单位工人 * diff --git a/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdepts.js b/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdepts.js index 9a3f4cda..e43ee9af 100644 --- a/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdepts.js +++ b/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdepts.js @@ -1,6 +1,6 @@ import request from '@/utils/request' -// 查询分包单位列表 +// 查询参建单位列表 export function findAllProjectInfoSubdepts(query) { return request({ url: '/manage/proProjectInfoSubdepts/findAll', @@ -9,7 +9,7 @@ export function findAllProjectInfoSubdepts(query) { }) } -// 查询分包单位列表 +// 查询参建单位列表 export function listProProjectInfoSubdepts(query) { return request({ url: '/manage/proProjectInfoSubdepts/list', @@ -18,7 +18,7 @@ export function listProProjectInfoSubdepts(query) { }) } -// 查询分包单位详细 +// 查询参建单位详细 export function getProProjectInfoSubdepts(id) { return request({ url: '/manage/proProjectInfoSubdepts/' + id, @@ -26,7 +26,7 @@ export function getProProjectInfoSubdepts(id) { }) } -// 新增分包单位 +// 新增参建单位 export function addProProjectInfoSubdepts(data) { return request({ url: '/manage/proProjectInfoSubdepts', @@ -35,7 +35,7 @@ export function addProProjectInfoSubdepts(data) { }) } -// 修改分包单位 +// 修改参建单位 export function updateProProjectInfoSubdepts(data) { return request({ url: '/manage/proProjectInfoSubdepts', @@ -44,16 +44,24 @@ export function updateProProjectInfoSubdepts(data) { }) } -// 修改分包单位 +// 修改参建单位 export function updateProProjectInfoSubdeptsEntity(data) { return request({ url: '/manage/proProjectInfoSubdepts/editInfos', - method: 'put', + method: 'post', data: data }) } -// 删除分包单位 +// 修改参建单位 +export function editUseStatus(id,status) { + return request({ + url: '/manage/proProjectInfoSubdepts/editUseStatus/'+id+'?status='+status, + method: 'get' + }) +} + +// 删除参建单位 export function delProProjectInfoSubdepts(id) { return request({ url: '/manage/proProjectInfoSubdepts/' + id, diff --git a/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdeptsGroup.js b/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdeptsGroup.js index 49b72c20..9c472eb8 100644 --- a/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdeptsGroup.js +++ b/yanzhu-ui-vue3/src/api/manage/proProjectInfoSubdeptsGroup.js @@ -35,6 +35,14 @@ export function updateProProjectInfoSubdeptsGroup(data) { }) } +// 修改分包单位班组 +export function editUseStatus(id,status) { + return request({ + url: '/manage/proProjectInfoSubdeptsGroup/editUseStatus/'+id+'?status='+status, + method: 'get' + }) +} + // 删除分包单位班组 export function delProProjectInfoSubdeptsGroup(id) { return request({ diff --git a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue index 1f83edaf..1ffa3aa6 100644 --- a/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue +++ b/yanzhu-ui-vue3/src/views/manage/proProjectInfoSubdepts/index.vue @@ -4,20 +4,20 @@ + + + - + - + - - - 搜索 重置 @@ -71,19 +71,24 @@ {{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }} - + + + + @@ -114,6 +119,12 @@ + + + + + + - - - - - - @@ -217,11 +222,11 @@