Commit 669a29ca authored by 刘林's avatar 刘林

fix(jg):场车单位变更bug修改

parent e44d26d5
......@@ -839,6 +839,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
String city = Objects.toString(tableData.get("city"), "");
String userCity = Optional.ofNullable(city).map(c -> c.split("_")[0]).orElseThrow(() -> new BadRequest("请选择地市后暂存!"));
this.validateDeviceCity(deviceList, userCity, "0".equals(model.getChangeType()));
this.setEquAddress(model);
}
// 获取单位变更单号
......@@ -914,7 +915,6 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
model.setCreateUserName(reginParams.getUserModel().getRealName());
model.setUseRegistCode(String.join(",", registrationNoList));
model.setEquList(registrationList.get(0).get("equList").toString());
this.setEquAddress(model);
JgChangeRegistrationUnit registrationUnit = new JgChangeRegistrationUnit();
BeanUtils.copyProperties(model, registrationUnit);
setNewUnitInfo(reginParams, registrationUnit);
......@@ -1018,7 +1018,7 @@ public class JgChangeRegistrationUnitServiceImpl extends BaseService<JgChangeReg
private String getRegionNameByCode(String type, String code) {
List<LinkedHashMap<String, Object>> regions = (List<LinkedHashMap<String, Object>>) redisUtils.get(type.toUpperCase());
return regions.stream()
.filter(item -> code.equals(String.valueOf(item.get("regionCode"))))
.filter(item -> String.valueOf(item.get("regionCode")).equals(code))
.map(item -> (String) item.get("regionName"))
.findFirst()
.orElse("");
......
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