Commit 87442a21 authored by tianbo's avatar tianbo

feat(module): 补充创建时间字段并更新相关业务逻辑

- 在 ESEquipmentCategoryDto 中添加 CREATE_DATE 字段,用于记录创建时间 - 在 IdxBizJgRegisterInfoServiceImpl 中设置 CREATE_DATE 为当前时间 - 更新 JgUseRegistrationServiceImpl 中的工厂信息 - 在 ShCarServiceImpl 中设置创建时间
parent ec2ed9e8
...@@ -196,4 +196,10 @@ public class ESEquipmentCategoryDto { ...@@ -196,4 +196,10 @@ public class ESEquipmentCategoryDto {
*/ */
@Field(type = FieldType.Integer, name = "DATA_QUALITY_SCORE") @Field(type = FieldType.Integer, name = "DATA_QUALITY_SCORE")
private Integer dataQualityScore; private Integer dataQualityScore;
/**
* 创建时间
*/
@Field(type = FieldType.Long)
private Long CREATE_DATE;
} }
...@@ -3742,7 +3742,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste ...@@ -3742,7 +3742,9 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
} }
if (!ObjectUtils.isEmpty(dto)) { if (!ObjectUtils.isEmpty(dto)) {
long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime(); long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime();
long now = new Date().getTime();
dto.setREC_DATE(time); dto.setREC_DATE(time);
dto.setCREATE_DATE(now);
// 需要安装的设备 安装告知审批通过 清除设备的USC_UNIT_CREDIT_CODE安装单位信息 // 需要安装的设备 安装告知审批通过 清除设备的USC_UNIT_CREDIT_CODE安装单位信息
// 使用单位编辑 防止更新设备时将安改维单位信息更新到es中 // 使用单位编辑 防止更新设备时将安改维单位信息更新到es中
CompanyBo company = getSelectedOrgInfo().getCompany(); CompanyBo company = getSelectedOrgInfo().getCompany();
......
...@@ -421,6 +421,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD ...@@ -421,6 +421,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
IdxBizJgRegLambda.eq(IdxBizJgRegisterInfo::getRecord, map.get("equipId")) IdxBizJgRegLambda.eq(IdxBizJgRegisterInfo::getRecord, map.get("equipId"))
.set(IdxBizJgRegisterInfo::getRegisterState, this.getRegCode()).set(IdxBizJgRegisterInfo::getCylinderCategory, map.get("cylinderCategory")); .set(IdxBizJgRegisterInfo::getRegisterState, this.getRegCode()).set(IdxBizJgRegisterInfo::getCylinderCategory, map.get("cylinderCategory"));
idxBizJgRegisterInfoService.update(IdxBizJgRegLambda); idxBizJgRegisterInfoService.update(IdxBizJgRegLambda);
// 更新制造信息-产品编号
LambdaUpdateWrapper<IdxBizJgFactoryInfo> factoryLambda = new UpdateWrapper<IdxBizJgFactoryInfo>().lambda();
factoryLambda.eq(IdxBizJgFactoryInfo::getRecord, map.get("equipId"))
.set(IdxBizJgFactoryInfo::getFactoryNum, map.get("factoryNum"));
idxBizJgFactoryInfoService.update(factoryLambda);
// 更新设备监管部门 // 更新设备监管部门
IdxBizJgSupervisionInfo idxBizJgSupervisionInfo = new IdxBizJgSupervisionInfo(); IdxBizJgSupervisionInfo idxBizJgSupervisionInfo = new IdxBizJgSupervisionInfo();
if (map.containsKey("orgBranchCode") && !ObjectUtils.isEmpty(map.get("orgBranchCode"))) { if (map.containsKey("orgBranchCode") && !ObjectUtils.isEmpty(map.get("orgBranchCode"))) {
......
...@@ -432,6 +432,7 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp ...@@ -432,6 +432,7 @@ public class ShCarServiceImpl extends BaseService<ShCar, ShCar, ShCarMapper> imp
IdxBizJgUseInfo useInfo = JSON.parseObject(JSON.toJSONString(equObj), IdxBizJgUseInfo.class); IdxBizJgUseInfo useInfo = JSON.parseObject(JSON.toJSONString(equObj), IdxBizJgUseInfo.class);
useInfo.setRecord(equRecord); useInfo.setRecord(equRecord);
useInfo.setRecDate(date); useInfo.setRecDate(date);
useInfo.setCreateDate(date);
useInfo.setDataSource("jg_his_sh"); useInfo.setDataSource("jg_his_sh");
useInfo.setIsIntoManagement(Boolean.TRUE); useInfo.setIsIntoManagement(Boolean.TRUE);
useInfo.setEquState("1"); useInfo.setEquState("1");
......
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