Commit f18ba12f authored by suhuiguang's avatar suhuiguang

Merge branch 'develop_tzs_register' of…

Merge branch 'develop_tzs_register' of http://39.100.92.250:5000/moa/amos-boot-biz into develop_tzs_register
parents 74f71d2f d8cb0896
......@@ -1168,8 +1168,10 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
taskName1 = processTaskDTO.getNextTask().get(0).getName();
nextTaskId = processTaskDTO.getNextTask().get(0).getId();
}
registration.setStatus(taskName[0]);
JgRegistrationHistory history = registrationHistoryService.lambdaQuery()
.eq(JgRegistrationHistory::getCurrentDocumentId, registration.getApplyNo())
.eq(JgRegistrationHistory::getIsDelete, false).one();
if ("0".equals(op)) {
if (roleList.isEmpty()) {
registration.setStatus(taskName[0]);
......@@ -1225,26 +1227,17 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
);
}
//场车更新车牌号
if ("5000".equals(dto.getEquList())){
if (newCarNumber != null && useCode != null){
idxBizJgRegisterInfoService.update(
new IdxBizJgRegisterInfo()
.setCarNumber(newCarNumber),
new LambdaQueryWrapper<IdxBizJgRegisterInfo>()
.in(IdxBizJgRegisterInfo::getUseOrgCode, useCode)
if ("5000".equals(dto.getEquListCode()) && newCarNumber != null && useCode != null){
idxBizJgRegisterInfoService.update(new IdxBizJgRegisterInfo().setCarNumber(newCarNumber),
new LambdaQueryWrapper<IdxBizJgRegisterInfo>().in(IdxBizJgRegisterInfo::getUseOrgCode, useCode)
);
}
}
});
registration.setNextTaskId(nextTaskId);
updateTaskModel(registration, op);
//新增使用登记证和设备变更记录
this.saveRecord(registration);
JgRegistrationHistory history = registrationHistoryService.lambdaQuery()
.eq(JgRegistrationHistory::getCurrentDocumentId, registration.getApplyNo())
.eq(JgRegistrationHistory::getIsDelete, false)
.one();
JSONArray historyJson = JSON.parseArray(history.getChangeData());
// 更新历史表中一二级审批车牌号
history.setChangeData(JSONObject.toJSONString(dto.getRegistrationList()));
......@@ -1259,6 +1252,14 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registrationManage.setReceiveCompanyCode(registration.getReceiveOrgCode());
registrationManage.setAuditPassDate(registration.getAuditPassDate());
registrationManage.setVersion(registrationManage.getVersion() + 1);
if ("5000".equals(registrationManage.getEquListCode())) {
String targetCode = registrationManage.getUseRegistrationCode();
dto.getRegistrationList().stream()
.filter(item -> targetCode.equals(item.get("useRegistrationCode")))
.map(item -> String.valueOf(item.get("newCarNumber")))
.findFirst()
.ifPresent(registrationManage::setCarNumber);
}
registrationManage.setChangeReason(BusinessTypeEnum.JG_COMPANY_CHANGE_REGISTRATION.getName());
if (!ObjectUtils.isEmpty(registration.getNewUseUnitCreditCode())) {//回填新单位地址
TzBaseEnterpriseInfo useCodeResult = tzBaseEnterpriseInfoMapper.selectOne(new QueryWrapper<TzBaseEnterpriseInfo>().eq("use_unit_code", registration.getNewUseUnitCreditCode()));
......@@ -1281,6 +1282,8 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
registration.setNextTaskId(nextTaskId);
registration.setStatus(WorkFlowStatusEnum.getMessage(taskCode).getPass());
executeOneStep(registration, taskName1, nextUserIds, op);
history.setChangeData(JSONObject.toJSONString(dto.getRegistrationList()));
registrationHistoryService.updateById(history);
}
} else {
registration.setPromoter("");
......@@ -1291,7 +1294,6 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
executeOneStep(registration, taskName1, nextUserIds, op);
}
JgChangeRegistrationUnitMapper.updateById(registration);
// redis流程实时数据更新
commonServiceImpl.saveExecuteFlowData2Redis(dto.getInstanceId(), this.buildInstanceRuntimeData(registration));
this.delRepeatUseEquipData(registration.getApplyNo(), registration.getStatus(), registration.getNewUseUnitCreditCode());
......
......@@ -1314,6 +1314,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
.approvalUnit(jgInstallationNotice.getReceiveOrgName())
.approvalUnitCode(jgInstallationNotice.getReceiveOrgCreditCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName() + "业务办理")
.routePath(taskV2Model1.getRoutePath())
.build()));
} else {
......@@ -1400,6 +1401,7 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
.approvalUnit(jgInstallationNotice.getReceiveOrgName())
.approvalUnitCode(jgInstallationNotice.getReceiveOrgCreditCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_INSTALLATION_NOTIFICATION.getName() + "业务办理")
.routePath(taskV2Model1.getRoutePath())
.build())
.collect(Collectors.toList())
......
......@@ -733,6 +733,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
.approvalUnit(jgMaintenanceContract.getReceiveOrgName())
.approvalUnitCode(jgMaintenanceContract.getReceiveOrgCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName() + "业务办理")
.routePath(taskV2Model.getRoutePath())
.build())
.collect(Collectors.toList())
......
......@@ -767,6 +767,7 @@ public class JgOverDesignServiceLifeServiceImpl extends BaseService<JgOverDesign
.approvalUnit(jgOverDesignServiceLife.getReceiveOrgName())
.approvalUnitCode(jgOverDesignServiceLife.getReceiveCompanyCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_OVER_DESIGN_SERVICE_LIFE.getName() + "业务办理")
.routePath(taskV2Model.getRoutePath())
.build());
}
......
......@@ -1681,6 +1681,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.equId((String) mapData.get("equipId"))
.approvalUnit(jgUseRegistration.getReceiveOrgName())
.approvalUnitCode(jgUseRegistration.getReceiveCompanyCode())
.changeContent(BusinessTypeEnum.JG_USAGE_REGISTRATION.getName() + "业务办理")
.status("正常")
.routePath(taskV2Model.getRoutePath())
.build());
......@@ -3482,6 +3483,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
changeRecord.setCreateDate(new Date());
firstRecord.ifPresent(record -> changeRecord.setRoutePath(record.getRoutePath()));
certificateChangeRecordService.save(changeRecord);
jgResumeInfoService.deleteByBusinessId(jgUseRegistration.getSequenceNbr()+"");
}
private void rollBackSupervisionInfo(String record) {
......@@ -3993,6 +3995,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
.approvalUnit(jgUseRegistration.getReceiveOrgName())
.approvalUnitCode(jgUseRegistration.getReceiveOrgCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_HISTORY_USAGE_REGISTRATION.getName() + "业务办理")
.build());
}
return this.baseMapper.getDetailById(jgUseRegistration.getSequenceNbr());
......
......@@ -972,6 +972,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
.approvalUnit(jgVehicleInformation.getReceiveOrgName())
.approvalUnitCode(jgVehicleInformation.getReceiveCompanyCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_VEHICLE_GAS_APPLICATION.getName() + "业务办理")
.routePath(taskV2Model.getRoutePath())
.build())
.collect(Collectors.toList())
......@@ -1516,6 +1517,7 @@ public class JgVehicleInformationServiceImpl extends BaseService<JgVehicleInform
changeRecord.setCreateDate(new Date());
firstRecord.ifPresent(record -> changeRecord.setRoutePath(record.getRoutePath()));
certificateChangeRecordService.save(changeRecord);
jgResumeInfoService.deleteByBusinessId(jgVehicleInformation.getSequenceNbr()+"");
}
/**
......
......@@ -54,4 +54,7 @@ public class JgResumeInfoDto extends BaseDto {
@ApiModelProperty(value = "详情路径")
private String routePath;
@ApiModelProperty(value = "变更内容")
private String changeContent;
}
......@@ -815,7 +815,11 @@ public class JyjcInspectionApplicationServiceImpl extends BaseService<JyjcInspec
resultModels.add(resultModel);
// TODO 暂存json,在结果录入后,将数据更新技术参数-检验详情使用 考虑兼容老数据
// 新增设备履历信息
jgResumeInfoDtoList.add(JgResumeInfoDto.builder().applyNo(entity.getApplicationNo()).businessType(resultModel.getInspectionTypeName()).businessId(String.valueOf(entity.getSequenceNbr())).equId(applicationEquipModels.get(i).getEquipUnicode()).approvalUnit(model.getInspectionUnitName()).approvalUnitCode(model.getInspectionUnitCode()).status("正常").routePath(taskV2Model.getRoutePath()).build());
jgResumeInfoDtoList.add(JgResumeInfoDto.builder().applyNo(entity.getApplicationNo())
.businessType(resultModel.getInspectionTypeName())
.businessId(String.valueOf(entity.getSequenceNbr()))
.changeContent(resultModel.getInspectionTypeName() + "业务办理")
.equId(applicationEquipModels.get(i).getEquipUnicode()).approvalUnit(model.getInspectionUnitName()).approvalUnitCode(model.getInspectionUnitCode()).status("正常").routePath(taskV2Model.getRoutePath()).build());
}
}
inspectionResultService.saveOrUpdateBatch(resultModels);
......
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