Commit 43fa673f authored by 刘林's avatar 刘林

fix(ymt):许可信息不能为空校验

parent 7514da46
...@@ -717,8 +717,8 @@ public class TzBaseEnterpriseInfoServiceImpl ...@@ -717,8 +717,8 @@ public class TzBaseEnterpriseInfoServiceImpl
if (unitLicences instanceof Collection && !((Collection<?>) unitLicences).isEmpty()) { if (unitLicences instanceof Collection && !((Collection<?>) unitLicences).isEmpty()) {
JSON.parseArray(JSON.toJSONString(unitLicences)).forEach(obj -> { JSON.parseArray(JSON.toJSONString(unitLicences)).forEach(obj -> {
BaseUnitLicence baseUnitLicence = JSON.toJavaObject((JSONObject) obj, BaseUnitLicence.class); BaseUnitLicence baseUnitLicence = JSON.toJavaObject((JSONObject) obj, BaseUnitLicence.class);
if (ObjectUtils.isEmpty(baseUnitLicence.getLicAddress())) { if (ObjectUtils.isEmpty(baseUnitLicence.getCertTypeCode())) {
throw new IllegalArgumentException("许可地址不能为空!"); throw new BadRequest("请完善资质/许可信息后保存!");
} }
baseUnitLicence.setUnitCode(ObjectUtils.isEmpty(map.get("useCode")) ? null : (String) map.get("useCode")); baseUnitLicence.setUnitCode(ObjectUtils.isEmpty(map.get("useCode")) ? null : (String) map.get("useCode"));
baseUnitLicence.setUnitName(ObjectUtils.isEmpty(map.get("useUnit")) ? null : (String) map.get("useUnit")); baseUnitLicence.setUnitName(ObjectUtils.isEmpty(map.get("useUnit")) ? null : (String) map.get("useUnit"));
......
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