Commit f697f252 authored by 韩桐桐's avatar 韩桐桐

fix(jg):管道导入校验

parent 824c86a4
...@@ -43,6 +43,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -43,6 +43,7 @@ import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils; import org.apache.commons.lang3.math.NumberUtils;
import org.aspectj.weaver.ast.Var;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
...@@ -56,6 +57,7 @@ import java.io.InputStream; ...@@ -56,6 +57,7 @@ import java.io.InputStream;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.text.ParseException; import java.text.ParseException;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.time.temporal.ValueRange;
import java.util.*; import java.util.*;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
import java.util.regex.Pattern; import java.util.regex.Pattern;
...@@ -1444,10 +1446,23 @@ public class DataDockServiceImpl { ...@@ -1444,10 +1446,23 @@ public class DataDockServiceImpl {
List<PipingExcelDto> equLists = equListsJSONArr.toJavaList(PipingExcelDto.class); List<PipingExcelDto> equLists = equListsJSONArr.toJavaList(PipingExcelDto.class);
for (int i = 0; i < equLists.size(); i++) { for (int i = 0; i < equLists.size(); i++) {
PipingExcelDto equ = equLists.get(i); PipingExcelDto equ = equLists.get(i);
JSONObject fileData = JSON.parseObject(toJSONString(JSONArray.parseArray(toJSONString(JSON.parseObject(toJSONString(equListsJSONArr.get(i)), JSONObject.class).get("fileData"))).get(0)), JSONObject.class); JSONObject equJson = JSON.parseObject(toJSONString(equListsJSONArr.get(i)));
if (!ValidationUtil.isEmpty(fileData) && "inspectReport".equals(String.valueOf(fileData.get("key")))) { JSONArray fileDataArray = equJson.getJSONArray("fileData");
JSONArray value = JSONArray.parseArray(toJSONString(fileData.get("value")));
equ.setInspectReport(JSON.toJSONString(value)); if (fileDataArray == null || fileDataArray.isEmpty()) {
continue;
}
for (Object arr : fileDataArray) {
JSONObject fileData = JSON.parseObject(toJSONString(arr));
if (ValidationUtil.isEmpty(fileData) || !"inspectReport".equals(fileData.getString("key"))) {
continue;
}
JSONArray value = fileData.getJSONArray("value");
if (value != null) {
equ.setInspectReport(value.toJSONString());
}
} }
} }
ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class); ReginParams reginParams = JSONObject.parseObject(redisUtils.get(RedisKey.buildReginKey(RequestContext.getExeUserId(), RequestContext.getToken())).toString(), ReginParams.class);
...@@ -1515,11 +1530,12 @@ public class DataDockServiceImpl { ...@@ -1515,11 +1530,12 @@ public class DataDockServiceImpl {
} }
/** /**
* 检查本单位是否存在使用等级证编号 * 检查本单位是否存在使用等级证编号 + 不能是系统未生成的
* *
* @param paramsDto * @param paramsDto
*/ */
public void checkTheUnitRegManageAlreadyExists(EquipRequestParamsDto paramsDto) { public void checkTheUnitRegManageAlreadyExists(EquipRequestParamsDto paramsDto) {
idxBizJgRegisterInfoServiceImpl.checkUseRegistrationCode(paramsDto.getUseOrgCode(),"unit");
Integer useRegManageCount = jgUseRegistrationManageService.lambdaQuery() Integer useRegManageCount = jgUseRegistrationManageService.lambdaQuery()
.eq(JgUseRegistrationManage::getUseUnitCreditCode, paramsDto.getCompanyCode()) .eq(JgUseRegistrationManage::getUseUnitCreditCode, paramsDto.getCompanyCode())
.eq(JgUseRegistrationManage::getUseUnitName, paramsDto.getCompanyName()) .eq(JgUseRegistrationManage::getUseUnitName, paramsDto.getCompanyName())
......
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