Commit 6cd2d9d2 authored by hcing's avatar hcing

Merge remote-tracking branch 'origin/develop_tzs_register' into develop_tzs_register

parents 214e1f12 2d2e4591
......@@ -214,7 +214,9 @@ public class JgChangeRegistrationUnitDto extends BaseDto {
@ApiModelProperty(value = "详细地址")
private String address;
@ApiModelProperty(value = "属地监管部门")
@ApiModelProperty(value = "属地监管部门code")
private String orgBranchCode;
@ApiModelProperty(value = "属地监管部门")
private String orgBranchName;
}
......@@ -321,8 +321,14 @@ public class JgChangeRegistrationUnit extends BaseEntity {
private String address;
/**
* 属地监管部门
* 属地监管部门code
*/
@TableField(value = "org_branch_code")
private String orgBranchCode;
/**
* 属地监管部门
*/
@TableField(value = "org_branch_name")
private String orgBranchName;
}
......@@ -54,5 +54,5 @@ public interface JgVehicleInformationMapper extends BaseMapper<JgVehicleInformat
List<Map<String, Object>> getVehicleInfoOfPassWithEquId();
List<ReminderItemDto> queryUnitVehiclesForReminderList(List<String> records);
List<ReminderItemDto> queryUnitVehiclesForReminderList(@Param("records") List<String> records);
}
......@@ -717,7 +717,7 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
updateEquipMessage(contract.getSequenceNbr(), taskV2Model);
// 发送数据刷新消息
this.sendDataRefreshMsg(sequenceNbr);
// 创建设备履历
// 创建设备履历
this.createResume(contract, taskV2Model.getRoutePath());
}
this.getBaseMapper().updateById(contract);
......@@ -789,22 +789,6 @@ public class JgMaintenanceContractServiceImpl extends BaseService<JgMaintenanceC
.set(IdxBizJgUseInfo::getSafetyManager, jgMaintenanceContract.getMaintenanceManagerName())
.set(IdxBizJgUseInfo::getPhone, jgMaintenanceContract.getMaintenanceManagerPhone()));
}
jgResumeInfoService.saveBatchResume(
list.stream()
.map(v -> JgResumeInfoDto.builder()
.applyNo(jgMaintenanceContract.getApplyNo())
.businessType(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName())
.businessId(String.valueOf(jgMaintenanceContract.getSequenceNbr()))
.equId(String.valueOf(v.getEquId()))
.approvalUnit(jgMaintenanceContract.getReceiveOrgName())
.approvalUnitCode(jgMaintenanceContract.getReceiveOrgCode())
.status("正常")
.changeContent(BusinessTypeEnum.JG_MAINTENANCE_RECORD.getName() + "业务办理")
.routePath(taskV2Model.getRoutePath())
.build())
.collect(Collectors.toList())
);
idxBizJgMaintenanceRecordInfoService.saveBatch(maintenanceRecordInfoList);
// 维保备案后更新安全追溯对应设备状态
emqKeeper.getMqttClient().publish(SafetyProblemTypeEnum.WBBA.getTopic(), JSON.toJSONBytes(maintenanceRecordInfoList), 2, false);
......
......@@ -1809,6 +1809,7 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
changeRecordEq.setEquId(registerInfo.getRecord());//设备主键
changeRecordEq.setProductCode(idxBizJgFactoryInfo.getFactoryNum());
certificateChangeRecordEqService.save(changeRecordEq);
this.createResume(jgUseRegistration, registerInfo.getRecord(), taskV2Model.getRoutePath());
});
eventPublisher.publish(new EquipCreateOrEditEvent(this, BusinessTypeEnum.JG_USAGE_REGISTRATION.name(), Sets.newHashSet(registerInfo.getRecord()), EquipCreateOrEditEvent.EquipType.equip));
}
......@@ -1817,6 +1818,20 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
return jgUseRegistration;
}
private void createResume(JgUseRegistration jgUseRegistration, String equId, String routePath) {
jgResumeInfoService.createWithModel(JgResumeInfoDto.builder()
.applyNo(jgUseRegistration.getApplyNo())
.businessType(BusinessTypeEnum.JG_USAGE_REGISTRATION.getName())
.businessId(jgUseRegistration.getSequenceNbr() + "")
.equId(equId)
.approvalUnit(jgUseRegistration.getReceiveOrgName())
.approvalUnitCode(jgUseRegistration.getReceiveOrgCode())
.status("正常")
.routePath(routePath)
.changeContent(BusinessTypeEnum.JG_USAGE_REGISTRATION.getName() + "业务办理")
.build());
}
private HashMap<String, Map<String, Object>> processMapData(Long sequenceNbr, JSONObject mapData, JgUseRegistration jgUseRegistration,
JgRegistrationHistory jgRegistrationHistory, IdxBizJgRegisterInfo registerInfo, IdxBizJgOtherInfo otherInfo,
TaskV2Model taskV2Model, JSONObject jsonObject, Boolean flag, String useRegistrationCode,
......
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