Commit 5db7516e authored by tianbo's avatar tianbo

refactor(jg): 导入设备接口增加创建日期赋值

- 在 DataDockServiceImpl 中为 ESEquipmentCategoryDto 添加 CREATE_DATE 字段 - 在 IdxBizJgRegisterInfoServiceImpl 中更新 CREATE_DATE 字段的设置逻辑
parent 02299408
......@@ -717,6 +717,7 @@ public class DataDockServiceImpl {
ESEquipmentCategoryDto equipmentCategoryDto = JSON.parseObject(toJSONString(map), ESEquipmentCategoryDto.class);
if (!ObjectUtils.isEmpty(equipmentCategoryDto)) {
long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime();
equipmentCategoryDto.setCREATE_DATE(time);
equipmentCategoryDto.setREC_DATE(time);
equipmentCategoryDto.setSTATUS("已认领");
equipmentCategoryDto.setIS_DO_BUSINESS(Boolean.TRUE);
......@@ -2110,6 +2111,7 @@ public class DataDockServiceImpl {
ESEquipmentCategoryDto esEquipmentDto = JSON.parseObject(toJSONString(pipeline), ESEquipmentCategoryDto.class);
esEquipmentDto.setDATA_SOURCE(paramsDto.getDataSource());
esEquipmentDto.setREC_DATE(System.currentTimeMillis());
esEquipmentDto.setCREATE_DATE(System.currentTimeMillis());
esEquipmentDto.setSEQUENCE_NBR(record);
esEquipmentDto.setIS_INTO_MANAGEMENT(Boolean.TRUE);
esEquipmentDto.setEQU_CATEGORY_CODE(paramsDto.getEquCategoryCode());
......
......@@ -3742,9 +3742,8 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
}
if (!ObjectUtils.isEmpty(dto)) {
long time = Timestamp.valueOf(map.get("REC_DATE").toString().substring(0, 19)).getTime();
long now = new Date().getTime();
dto.setREC_DATE(time);
dto.setCREATE_DATE(now);
dto.setCREATE_DATE(time);
// 需要安装的设备 安装告知审批通过 清除设备的USC_UNIT_CREDIT_CODE安装单位信息
// 使用单位编辑 防止更新设备时将安改维单位信息更新到es中
CompanyBo company = getSelectedOrgInfo().getCompany();
......@@ -4139,6 +4138,7 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
if (inspectionDetectionInfo.getNextInspectDate() != null) {
esEquipmentDto.setNEXT_INSPECT_DATE(inspectionDetectionInfo.getNextInspectDate().getTime());
}
esEquipmentDto.setCREATE_DATE(System.currentTimeMillis());
esEquipmentDto.setREC_DATE(System.currentTimeMillis());
esEquipmentDto.setSEQUENCE_NBR(record);
esEquipmentDto.setFACTORY_NUM(factoryInfo.getFactoryNum());
......
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