Commit 57ad59c6 authored by suhuiguang's avatar suhuiguang

1.移转变更不再更新监管码

2.ymt码生成接口接收参数监管码,有则不再重新生成
parent 04b3b1a2
...@@ -838,21 +838,21 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang ...@@ -838,21 +838,21 @@ public class JgChangeRegistrationTransferServiceImpl extends BaseService<JgChang
.map(s -> s.split("_")[0]) .map(s -> s.split("_")[0])
.orElse(""); .orElse("");
String isXiXian = "0".equals(changeData.get("transferIsXixian")) ? "null" : "1"; String isXiXian = "0".equals(changeData.get("transferIsXixian")) ? "null" : "1";
// 移转不需要重新生成监管码,只需要新生成96333码,接口上送supervisoryCode则不再生成监管码 // 移转不需要重新生成监管码,只需要新生成96333码,接口上送superviseCode则不再生成监管码
IdxBizJgOtherInfo otherInfo = otherInfoService.getOneData(record); IdxBizJgOtherInfo otherInfo = otherInfoService.getOneData(record);
String supervisoryCode = otherInfo.getSupervisoryCode(); String superviseCode = otherInfo.getSupervisoryCode();
ImmutableMap<String, Object> map = ImmutableMap.<String, Object>builder() ImmutableMap<String, Object> map = ImmutableMap.<String, Object>builder()
.put("cityCode", cityCode) .put("cityCode", cityCode)
.put("countyCode", countyCode) .put("countyCode", countyCode)
.put("equCategory", equCategoryCode) .put("equCategory", equCategoryCode)
.put("isXiXian", isXiXian) .put("isXiXian", isXiXian)
.put("superviseCode", supervisoryCode) .put("superviseCode", superviseCode)
.build(); .build();
Map<String, Object> result = tzsServiceFeignClient.createCode(map).getResult(); Map<String, Object> result = tzsServiceFeignClient.createCode(map).getResult();
return ImmutableMap.<String, String>builder() return ImmutableMap.<String, String>builder()
.put("superviseCode", supervisoryCode) .put("superviseCode", superviseCode)
.put("code96333", Optional.ofNullable(result) .put("code96333", Optional.ofNullable(result)
.map(r -> (String) r.get("code96333")) .map(r -> (String) r.get("code96333"))
.orElse("")) .orElse(""))
......
...@@ -1134,8 +1134,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN ...@@ -1134,8 +1134,6 @@ public class JgInstallationNoticeServiceImpl extends BaseService<JgInstallationN
ResponseModel<String> responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode); ResponseModel<String> responseModel = tzsServiceFeignClient.deviceRegistrationCode(registrationCode);
String deviceRegistrationCode = responseModel.getResult(); String deviceRegistrationCode = responseModel.getResult();
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("code96333", tzsJgOtherInfo.getCode96333());
map.put("superviseCode", tzsJgOtherInfo.getSupervisoryCode());
map.put("cityCode", jgInstallationNotice.getCity()); map.put("cityCode", jgInstallationNotice.getCity());
map.put("countyCode", jgInstallationNotice.getCounty()); map.put("countyCode", jgInstallationNotice.getCounty());
map.put("equCategory", idxBizJgRegisterInfo.getEquCategory()); map.put("equCategory", idxBizJgRegisterInfo.getEquCategory());
......
...@@ -431,12 +431,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -431,12 +431,12 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
*/ */
@Override @Override
public Map<String, String> createSupervisorCode(Map<String, Object> map) { public Map<String, String> createSupervisorCode(Map<String, Object> map) {
String city, county, equipCategory, isNotXiXian, code96333, supervisionCode; String city, county, equipCategory, isNotXiXian, code96333, superviseCode;
// 获取对应行政区划 // 获取对应行政区划
city = String.valueOf(map.get("cityCode")); city = String.valueOf(map.get("cityCode"));
county = String.valueOf(map.get("countyCode")); county = String.valueOf(map.get("countyCode"));
code96333 = String.valueOf(map.get("code96333")); code96333 = String.valueOf(map.get("code96333"));
supervisionCode = String.valueOf(map.get("supervisionCode")); superviseCode = String.valueOf(map.get("superviseCode"));
// 获取对应设备分类 // 获取对应设备分类
equipCategory = String.valueOf(map.get("equCategory")); equipCategory = String.valueOf(map.get("equCategory"));
if ("null".equals(equipCategory) || "null".equals(city) || "null".equals(county)) { if ("null".equals(equipCategory) || "null".equals(city) || "null".equals(county)) {
...@@ -444,7 +444,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD ...@@ -444,7 +444,7 @@ public class EquipmentCategoryServiceImpl extends BaseService<EquipmentCategoryD
} }
isNotXiXian = Optional.ofNullable(map.get("isXiXian")).orElse("0").toString(); isNotXiXian = Optional.ofNullable(map.get("isXiXian")).orElse("0").toString();
// 生成码 // 生成码
Map<String, String> codeMap = creatCode(isNotXiXian, city, county, equipCategory, code96333, supervisionCode); Map<String, String> codeMap = creatCode(isNotXiXian, city, county, equipCategory, code96333, superviseCode);
if (ObjectUtils.isEmpty(codeMap)) { if (ObjectUtils.isEmpty(codeMap)) {
throw new BadRequest("该请求参数未生成监管码或96333码,请核对参数"); throw new BadRequest("该请求参数未生成监管码或96333码,请核对参数");
} }
......
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