yinzuomei 3 years ago
parent
commit
0fe5fce924
  1. 6
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcEmployeeRegisterController.java
  2. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcGroupPeopleRegisterController.java
  3. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java
  4. 2
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java
  5. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcEmployeeRegisterServiceImpl.java
  6. 3
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml
  7. 4
      epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcGroupPeopleRegisterDao.xml

6
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<String> ids){
icEmployeeRegisterService.delete(ids);
public Result delete(@LoginUser TokenDto tokenDto,@RequestBody List<String> ids){
icEmployeeRegisterService.delete(ids,tokenDto.getUserId());
return new Result();
}

2
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

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/IcEmployeeRegisterDao.java

@ -32,7 +32,7 @@ public interface IcEmployeeRegisterDao extends BaseDao<IcEmployeeRegisterEntity>
* @Author zxc
* @Date 2022/10/26 17:34
*/
void delRegisterDetail(@Param("registerIds")List<String> registerIds);
void delRegisterDetail(@Param("registerIds")List<String> registerIds,@Param("operUserId")String operUserId);
/**
* @Description 员工疫情管理列表

2
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcEmployeeRegisterService.java

@ -75,7 +75,7 @@ public interface IcEmployeeRegisterService extends BaseService<IcEmployeeRegiste
* @author generator
* @date 2022-10-26
*/
void delete(List<String> ids);
void delete(List<String> ids,String operUserId);
/**
* @Description 员工疫情管理列表

13
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<IcEmployeeReg
*/
@Override
@Transactional(rollbackFor = Exception.class)
public void delete(List<String> ids) {
public void delete(List<String> ids,String operUserId) {
if (CollectionUtils.isNotEmpty(ids)){
baseDao.deleteBatchIds(ids);
baseDao.delRegisterDetail(ids);
LambdaUpdateWrapper<IcEmployeeRegisterEntity> 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);
}
}

3
epmet-module/gov-org/gov-org-server/src/main/resources/mapper/IcEmployeeRegisterDao.xml

@ -7,7 +7,8 @@
<update id="delRegisterDetail">
update ic_employee_register_detail
set del_flag = 1,
updated_time = NOW()
updated_time = NOW(),
UPDATED_BY = #{operUserId}
where REGISTER_ID in (
<foreach collection="registerIds" item="registerId" separator=",">
#{registerId}

4
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},'%')
<if test='null != placeOrgName and placeOrgName != "" '>
AND ie.PLACE_ORG_NAME LIKE CONCAT('%',#{placeOrgName},'%')
</if>
@ -23,6 +23,6 @@
<if test='null != natEndDate and natEndDate != "" '>
AND DATE_FORMAT(pr.NAT_TIME,'%Y-%m-%d') >= #{natEndDate}
</if>
ORDER BY pr.NAT_TIME DESC
ORDER BY pr.NAT_TIME DESC,pr.CREATED_TIME desc
</select>
</mapper>
Loading…
Cancel
Save