Commit e6f2a499 authored by 韩桐桐's avatar 韩桐桐

feat(jg):历史设备录入维护

parent 4be60996
......@@ -125,6 +125,14 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
public static final String INSPECTION_AND_TESTING_INSTITUTIONS = "检验检测机构";
// 设备纳管 纳管:true 未纳管:false
public static final String IS_INTO_MANAGEMENT = "IS_INTO_MANAGEMENT";
/**
* 设备来源 new:新设备录入 his:历史数据录入
*/
public static final String EQUIP_SOURCE = "EQUIP_SOURCE";
/**
* 业务类型 0:单个新增 1:批量导入
*/
public static final String BUSINESS_SCENARIOS = "businessScenarios";
// 需要转化成jsonObject的附件字段
public static String[] jsonFields = {"insOtherAccessories", "installContractAttachment", "installProxyStatementAttachment"};
@Autowired
......@@ -1598,18 +1606,20 @@ public class IdxBizJgRegisterInfoServiceImpl extends BaseService<IdxBizJgRegiste
// 设备品种
String equDefine = String.valueOf(equipmentClassForm.get(EQU_DEFINE));
// 业务场景
String businessScenarios = String.valueOf(equipmentClassForm.get("businessScenarios"));
String businessScenarios = String.valueOf(equipmentClassForm.get(BUSINESS_SCENARIOS));
// 数据来源 历史数据his 新数据new
String equipSource = String.valueOf(equipmentClassForm.get(EQUIP_SOURCE));
// 操作类型
String operateType = ValidationUtil.isEmpty(equipmentInfoForm.get(SEQUENCE_NBR)) ? OPERATESAVE : OPERATEEDIT;
// 设备是否复制而来,复制来的设备走新增
boolean isCopy = !ValidationUtil.isEmpty(equipmentInfoForm.get(IS_COPY));
operateType = isCopy ? OPERATESAVE : operateType;
String dataSource = OPERATESAVE.equals(operateType) ? "jg" : equipmentInfoForm.get("DATA_SOURCE").toString();
// 新增设备保存时 : 历史设备=》dataSource为"his" jg新录入设备dataSource为"jg"
String dataSource = OPERATESAVE.equals(operateType) ? ("new".equals(equipSource) ? "jg" : "his") : equipmentInfoForm.get("DATA_SOURCE").toString();
if (isCopy) {
String sourceRecord = equipmentClassForm.get(RECORD).toString();
dataSource = "jg_" + sourceRecord;
dataSource = "new".equals(equipSource) ? ("jg_" + sourceRecord) : ("his_" + sourceRecord);
}
record = OPERATESAVE.equals(operateType) ? UUID.randomUUID().toString() : equipmentInfoForm.get(RECORD).toString();
......
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