Commit 9f9f18ad authored by yangyang's avatar yangyang

fix(开通业务):作废

parent 24534829
...@@ -64,7 +64,7 @@ ...@@ -64,7 +64,7 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
isn.rec_date DESC isn.apply_no DESC
</select> </select>
<select id="queryEquipInformation" resultType="java.util.Map"> <select id="queryEquipInformation" resultType="java.util.Map">
......
...@@ -485,7 +485,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg ...@@ -485,7 +485,7 @@ public class JgReformNoticeServiceImpl extends BaseService<JgReformNoticeDto, Jg
dto.setApplyNo(applyNo); dto.setApplyNo(applyNo);
dto.setNoticeDate(new Date()); dto.setNoticeDate(new Date());
dto.setEquCategory(String.valueOf(obj.get("EQU_CATEGORY"))); dto.setEquCategory(String.valueOf(obj.get("EQU_CATEGORY")));
dto.setEquListCode(String.valueOf(obj.get("EQU_LIST_CODE"))); dto.setEquListCode(String.valueOf(obj.get("EQU_DEFINE")));
if (SUBMIT_TYPE_FLOW.equals(submitType)) { if (SUBMIT_TYPE_FLOW.equals(submitType)) {
dto.setNextExecuteIds(String.join(",", roleListSecond)); dto.setNextExecuteIds(String.join(",", roleListSecond));
dto.setInstanceStatus(String.join(",", roleListFirst)); dto.setInstanceStatus(String.join(",", roleListFirst));
......
...@@ -44,6 +44,6 @@ public class JyjcOpeningApplicationRequstDto { ...@@ -44,6 +44,6 @@ public class JyjcOpeningApplicationRequstDto {
@ApiModelProperty (value = "申请时间") @ApiModelProperty (value = "申请时间")
private String applyTime; private String applyTime;
@ApiModelProperty (value = "supervision: 监管; enterprise: 企业")
private String type;
} }
...@@ -48,6 +48,9 @@ ...@@ -48,6 +48,9 @@
<if test="applyStartTime != '' and applyStartTime != null"> <if test="applyStartTime != '' and applyStartTime != null">
and apply_time &gt;=#{applyStartTime} and apply_time &gt;=#{applyStartTime}
</if> </if>
<if test="jyjcOpeningApplicationRequstDto.type == 'supervision'">
and status not in ('6610')
</if>
</where> </where>
order by sequence_nbr desc order by sequence_nbr desc
......
...@@ -146,7 +146,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -146,7 +146,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany(); CompanyBo companyBo = commonserviceImpl.getReginParamsOfCurrentUser().getCompany();
model.setUnitCode(companyBo.getCompanyCode()); model.setUnitCode(companyBo.getCompanyCode());
model.setUnitCodeName(companyBo.getCompanyName()); model.setUnitCodeName(companyBo.getCompanyName());
ResponseModel<Map<String, Object>> result = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1); // ResponseModel<Map<String, Object>> result = tzsServiceFeignClient.applicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1);
List<String> codes = createCodeService.createApplicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1); List<String> codes = createCodeService.createApplicationFormCode(ApplicationFormTypeEnum.JY.getCode(), 1);
model.setApplicationSeq(codes.get(0)); model.setApplicationSeq(codes.get(0));
model.setCreateUserId(reginParams.getUserModel().getUserId()); model.setCreateUserId(reginParams.getUserModel().getUserId());
...@@ -198,7 +198,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -198,7 +198,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
entity.setStatusName(FlowStatusEnum.getNameByType(Long.parseLong(status))); entity.setStatusName(FlowStatusEnum.getNameByType(Long.parseLong(status)));
// region 更新其他的数据为已作废 // region 更新其他的数据为已作废
if (String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()).equals(status)) { if (String.valueOf(FlowStatusEnum.TO_BE_FINISHED.getCode()).equals(status)) {
discard(entity.getUnitCode(), entity.getSequenceNbr()); doDiscard(entity.getUnitCode(), entity.getSequenceNbr());
entity.setAcceptDate(new Date());
} }
// endregion // endregion
this.updateById(entity); this.updateById(entity);
...@@ -218,12 +219,19 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -218,12 +219,19 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
* @throws * @throws
* @date 2023/12/22 09:23 * @date 2023/12/22 09:23
*/ */
public Boolean discard(String unitCode, Long sequenceNbr) { public Boolean doDiscard(String unitCode, Long sequenceNbr) {
if (StringUtils.isBlank(unitCode) || sequenceNbr == null) { if (StringUtils.isBlank(unitCode) || sequenceNbr == null) {
return false; return false;
} }
List<Long> ids = this.lambdaQuery().select(JyjcOpeningApplication::getSequenceNbr)
.eq(JyjcOpeningApplication::getUnitCode, unitCode)
.list().stream().filter(o -> o.getSequenceNbr().compareTo(sequenceNbr) != 0)
.map(JyjcOpeningApplication::getSequenceNbr).collect(Collectors.toList());
if (ValidationUtil.isEmpty(ids)) {
return false;
}
UpdateWrapper<JyjcOpeningApplication> updateWrapper = new UpdateWrapper<>(); UpdateWrapper<JyjcOpeningApplication> updateWrapper = new UpdateWrapper<>();
updateWrapper.set("status", FlowStatusEnum.TO_BE_DISCARD.getCode()).eq("unit_code", unitCode).ne("sequence_nbr", sequenceNbr); updateWrapper.set("status", FlowStatusEnum.TO_BE_DISCARD.getCode()).set("status_name", FlowStatusEnum.TO_BE_DISCARD.getName()).in("SEQUENCE_NBR", ids);
return this.update(updateWrapper); return this.update(updateWrapper);
} }
...@@ -251,6 +259,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -251,6 +259,8 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime = date + " 00:00:00"; applyStartTime = date + " 00:00:00";
applyEndTime = date + " 23:59:59"; applyEndTime = date + " 23:59:59";
} }
// 设置为监管端
jyjcOpeningApplicationRequstDto.setType("supervision");
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime); return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
} }
...@@ -268,6 +278,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -268,6 +278,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
applyStartTime = date + " 00:00:00"; applyStartTime = date + " 00:00:00";
applyEndTime = date + " 23:59:59"; applyEndTime = date + " 23:59:59";
} }
jyjcOpeningApplicationRequstDto.setType("enterprise");
return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime); return jyjcOpeningApplicationMapper.selectJyjcOpeningApplicationList(page, jyjcOpeningApplicationRequstDto, applyStartTime, applyEndTime);
} }
...@@ -329,6 +340,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -329,6 +340,7 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
// 获取检验人员信息 // 获取检验人员信息
QueryWrapper userInfoQueryWrapper = new QueryWrapper<>(); QueryWrapper userInfoQueryWrapper = new QueryWrapper<>();
userInfoQueryWrapper.eq("unit_code", unitCode); userInfoQueryWrapper.eq("unit_code", unitCode);
userInfoQueryWrapper.eq("is_delete", true);
List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper); List<TzsUserInfo> userInfos = userInfoMapper.selectList(userInfoQueryWrapper);
if (!ValidationUtil.isEmpty(userInfos)) { if (!ValidationUtil.isEmpty(userInfos)) {
// List<String> codes = userInfos.stream() // List<String> codes = userInfos.stream()
...@@ -445,9 +457,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp ...@@ -445,9 +457,9 @@ public class JyjcOpeningApplicationServiceImpl extends BaseService<JyjcOpeningAp
jyjcOpeningApplication.setDetectionRegion(detectionRegion); jyjcOpeningApplication.setDetectionRegion(detectionRegion);
} }
// jyjcOpeningApplication.setDetectionRegionName(detectionRegionName); // jyjcOpeningApplication.setDetectionRegionName(detectionRegionName);
if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){ // if(ObjectUtils.isEmpty(jyjcOpeningApplication.getAcceptDate())){
jyjcOpeningApplication.setAcceptDate(new Date()); // jyjcOpeningApplication.setAcceptDate(new Date());
} // }
jyjcOpeningApplicationMapper.updateById(jyjcOpeningApplication); jyjcOpeningApplicationMapper.updateById(jyjcOpeningApplication);
} }
role = (String) nextNodeInfo.get("role"); role = (String) nextNodeInfo.get("role");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment