Commit 260ea63c authored by 韩桐桐's avatar 韩桐桐

fix(jg):bug-26985 历史无证燃气管道导入报错

parent 99ca7203
......@@ -1563,10 +1563,10 @@ public class DataDockServiceImpl {
String equListCode = String.valueOf(equipInfo.get("EQU_LIST"));
String equCategoryCode = String.valueOf(equipInfo.get("EQU_CATEGORY"));
String equDefineCode = String.valueOf(equipInfo.get("EQU_DEFINE"));
String receiveOrgCode = String.valueOf(equipInfo.get("RECEIVE_ORG_CODE"));
String receiveOrgCode = Optional.ofNullable(equipInfo.get("RECEIVE_ORG_CODE")).map(String::valueOf).orElse(null);
String inspectUnitCreditCode = Optional.ofNullable(equLists.get(0).getInspectOrgCode()).orElse("");
String inspectUnitName = Optional.ofNullable(equLists.get(0).getInspectOrgName()).orElse("");
String useOrgCode = String.valueOf(equipInfo.get("USE_ORG_CODE"));
String useOrgCode = Optional.ofNullable(equipInfo.get("USE_ORG_CODE")).map(String::valueOf).orElse(null);
String province = String.valueOf(equipInfo.get("province"));
String city = String.valueOf(equipInfo.get("city"));
String county = String.valueOf(equipInfo.get("county"));
......@@ -1598,8 +1598,16 @@ public class DataDockServiceImpl {
.setOrgBranchName(orgBranchCode.split("_").length > 1 ? orgBranchCode.split("_")[1] : "")
.setUseOrgCode(useOrgCode)
.setVehicleApanage(String.valueOf(equipInfo.get("VEHICLE_APANAGE")))
.setReceiveOrgCode(receiveOrgCode.split("_")[0])
.setReceiveOrgName(receiveOrgCode.split("_")[1])
.setReceiveOrgCode(Optional.ofNullable(receiveOrgCode)
.map(code -> code.split("_"))
.filter(parts -> parts.length > 0)
.map(parts -> parts[0])
.orElse(null))
.setReceiveOrgName(Optional.ofNullable(receiveOrgCode)
.map(code -> code.split("_"))
.filter(parts -> parts.length > 1)
.map(parts -> parts[1])
.orElse(null))
.setProjectContraption(String.valueOf(equipInfo.get("PROJECT_CONTRAPTION")))
.setProjectContraptionNo(String.valueOf(equipInfo.get("PROJECT_CONTRAPTION_NO")))
.setProductPhoto(toJSONString(equipInfo.get("PRODUCT_PHOTO")))
......
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