|
|
@ -17,6 +17,7 @@ |
|
|
|
|
|
|
|
package com.elink.esua.epdc.party.service.impl; |
|
|
|
|
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
|
|
|
import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
@ -85,12 +86,16 @@ public class FlowPartyServiceImpl extends BaseServiceImpl<FlowPartyDao, FlowPart |
|
|
|
String idCard = (String) params.get(FieldConstant.ID_CARD_HUMP); |
|
|
|
String mobile = (String) params.get(FieldConstant.MOBILE_HUMP); |
|
|
|
String status = (String) params.get("status"); |
|
|
|
String deptId = (String) params.get("deptId"); |
|
|
|
String party = (String) params.get("party"); |
|
|
|
QueryWrapper<FlowPartyEntity> wrapper = new QueryWrapper<>(); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|
|
|
wrapper.like(StringUtils.isNotBlank(name), FieldConstant.NAME_HUMP, name); |
|
|
|
wrapper.like(StringUtils.isNotBlank(idCard), FieldConstant.ID_CARD, idCard); |
|
|
|
wrapper.like(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE_HUMP, mobile); |
|
|
|
wrapper.likeLeft(StringUtils.isNotBlank(deptId), "PARENT_DEPT_IDS", deptId); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(status), "STATUS", status); |
|
|
|
wrapper.eq(StringUtils.isNotBlank(party), "PARTY", party); |
|
|
|
return wrapper; |
|
|
|
} |
|
|
|
|
|
|
@ -112,7 +117,7 @@ public class FlowPartyServiceImpl extends BaseServiceImpl<FlowPartyDao, FlowPart |
|
|
|
setDeptId(dto); |
|
|
|
} |
|
|
|
FlowPartyEntity entity = ConvertUtils.sourceToTarget(dto, FlowPartyEntity.class); |
|
|
|
Result<ParentAndAllDeptDTO> parentResult = null; |
|
|
|
Result<ParentAndAllDeptDTO> parentResult; |
|
|
|
if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { |
|
|
|
entity.setDeptId(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); |
|
|
|
parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); |
|
|
@ -128,6 +133,9 @@ public class FlowPartyServiceImpl extends BaseServiceImpl<FlowPartyDao, FlowPart |
|
|
|
entity.setParentDeptIds(deptDTO.getParentDeptIds()); |
|
|
|
entity.setParentDeptNames(deptDTO.getParentDeptNames()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotEmpty(dto.getPartyDate())) { |
|
|
|
entity.setPartyDate(DateUtil.parseDate(dto.getPartyDate())); |
|
|
|
} |
|
|
|
entity.setStatus(0); |
|
|
|
insert(entity); |
|
|
|
} |
|
|
@ -156,7 +164,7 @@ public class FlowPartyServiceImpl extends BaseServiceImpl<FlowPartyDao, FlowPart |
|
|
|
entity.setParentDeptIds(deptDTO.getParentDeptIds()); |
|
|
|
entity.setParentDeptNames(deptDTO.getParentDeptNames()); |
|
|
|
} |
|
|
|
if (Objects.equals(0,entity.getStatus())){ |
|
|
|
if (Objects.equals(0, entity.getStatus())) { |
|
|
|
entity.setExamineMsg(null); |
|
|
|
} |
|
|
|
updateById(entity); |
|
|
|