Commit 82aa88aa authored by 刘林's avatar 刘林

fix(jg):暂存bug修改

parent 09097542
......@@ -1052,9 +1052,9 @@ public class DataDockServiceImpl {
if (remark.equals("his")){
checkNotBlank(data.getUseOrgCode(), "使用登记证编号不能为空;", rowError);
if (!StringUtils.isEmpty(data.getUseOrgCode())) {
if (!this.useOrgCodeRegularMatching(data)) {
rowError.append("使用登记证编号格式不正确;");
}
// if (!this.useOrgCodeRegularMatching(data)) {
// rowError.append("使用登记证编号格式不正确;");
// }
if (!isYLGD && useOrgCodeList.contains(data.getUseOrgCode())) {
rowError.append("使用登记证编号不能重复;");
}
......
......@@ -566,6 +566,13 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
@GlobalTransactional(rollbackFor = Exception.class)
public List<Map<String, Object>> handleUseRegistration(JSONObject map) {
try {
String equipId = Optional.ofNullable(Objects.toString(map.get("equipId"), null))
.map(String::trim)
.filter(s -> !"null".equalsIgnoreCase(s))
.orElse(null);
if (equipId == null) {
throw new BadRequest("请选择设备后进行暂存!");
}
if (!ObjectUtils.isEmpty(map.get("submit"))) {
// 校验登记表字段是否有值
JSONArray useRegistrationFormFile = map.getJSONArray("useRegistrationFormFile");
......@@ -843,8 +850,8 @@ public class JgUseRegistrationServiceImpl extends BaseService<JgUseRegistrationD
CompanyBo company = reginParams.getCompany();
String equListCode = String.valueOf(map.get("EQU_LIST_CODE"));
List<Map<String, Object>> equipmentLists = (List<Map<String, Object>>) map.get("equipmentLists");
if (!ObjectUtils.isEmpty(map.get("submit")) && CollectionUtils.isEmpty(equipmentLists)) {
throw new BadRequest("请选择设备信息!");
if (CollectionUtils.isEmpty(equipmentLists)) {
throw new BadRequest("请选择设备后进行暂存!");
}
if (CylinderTypeEnum.CYLINDER.getCode().equals(map.get("EQU_CATEGORY_CODE"))) {
......
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