diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java index b31e4f7b7a..9ebbfef654 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java @@ -72,14 +72,14 @@ public class IcEmployeeRegisterController { } /** - * @Description 批量删除 + * @Description 批量删除 http://yapi.elinkservice.cn/project/102/interface/api/8238 * @param ids * @Author zxc * @Date 2022/10/27 08:57 */ @PostMapping("delete") - public Result delete(@RequestBody List ids){ - icEmployeeRegisterService.delete(ids); + public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List ids){ + icEmployeeRegisterService.delete(ids,tokenDto.getUserId()); return new Result(); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java index 200e985304..f618805920 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java @@ -76,7 +76,7 @@ public class IcGroupPeopleRegisterController { } /** - * @Description 受众群体列表 + * @Description 受众群体列表 http://yapi.elinkservice.cn/project/102/interface/api/8244 * @param tokenDto * @param formDTO * @Author zxc diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java index e5756c7a2b..06ad450b4a 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java @@ -32,7 +32,7 @@ public interface IcEmployeeRegisterDao extends BaseDao * @Author zxc * @Date 2022/10/26 17:34 */ - void delRegisterDetail(@Param("registerIds")List registerIds); + void delRegisterDetail(@Param("registerIds")List registerIds,@Param("operUserId")String operUserId); /** * @Description 员工疫情管理列表 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java index fdcbcc1b2a..ebaa0a4d8b 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java @@ -75,7 +75,7 @@ public interface IcEmployeeRegisterService extends BaseService ids); + void delete(List ids,String operUserId); /** * @Description 员工疫情管理列表 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java index aecf01c5ca..43b383d283 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java @@ -1,9 +1,11 @@ package com.epmet.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; +import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.page.PageData; @@ -115,10 +117,15 @@ public class IcEmployeeRegisterServiceImpl extends BaseServiceImpl ids) { + public void delete(List ids,String operUserId) { if (CollectionUtils.isNotEmpty(ids)){ - baseDao.deleteBatchIds(ids); - baseDao.delRegisterDetail(ids); + LambdaUpdateWrapper updateWrapper=new LambdaUpdateWrapper<>(); + updateWrapper.in(IcEmployeeRegisterEntity::getId,ids); + updateWrapper.set(IcEmployeeRegisterEntity::getDelFlag, NumConstant.ONE_STR) + .set(IcEmployeeRegisterEntity::getUpdatedBy,operUserId) + .set(IcEmployeeRegisterEntity::getUpdatedTime,new Date()); + baseDao.update(null,updateWrapper); + baseDao.delRegisterDetail(ids,operUserId); } } diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml index cc07dec0d6..0be6f12084 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml @@ -7,7 +7,8 @@ update ic_employee_register_detail set del_flag = 1, - updated_time = NOW() + updated_time = NOW(), + UPDATED_BY = #{operUserId} where REGISTER_ID in ( #{registerId} diff --git a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml index 6e1d642ad1..ea2a031caa 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml +++ b/epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml @@ -13,7 +13,7 @@ FROM ic_enterprise ie INNER JOIN ic_group_people_register pr ON pr.ENTERPRISE_ID = ie.ID AND pr.DEL_FLAG = 0 WHERE ie.DEL_FLAG = 0 - AND CONCAT(AGENCY_PIDS,':',AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') + AND CONCAT(ie.AGENCY_PIDS,':',ie.AGENCY_ID) LIKE CONCAT('%',#{agencyId},'%') AND ie.PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%') @@ -23,6 +23,6 @@ AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natEndDate} - ORDER BY pr.NAT_TIME DESC + ORDER BY pr.NAT_TIME DESC,pr.CREATED_TIME desc \ No newline at end of file