Commit 04e80df8 authored by hezhuozhi's avatar hezhuozhi

27530 监管业务系统,历史无证压力管道使用登记时,监管审核人员查看详情,查看使用登记表预览,预览内容与上传的附件内容不符

parent c6bab10a
......@@ -2260,10 +2260,14 @@ public class CommonServiceImpl implements ICommonService {
DateTimeFormatter inputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
DateTimeFormatter outputFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
Pattern timePattern = Pattern.compile("\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}");
//如果是历史无证的修改类型为SP_TT并且枚举没有在登记类型中
if(Objects.isNull(RegistrationTypeEnum.getNameByType(formData.getString("type"))) && "jg_his_black".equals(formData.getString("dataSource"))){
formData.put("type","SP_TT");
}
//登记类型
if (jsonObject.containsKey("type")){
formData.put("registrationType",RegistrationTypeEnum.getNameByType(jsonObject.getString("type")));
if (formData.containsKey("type")){
formData.put("registrationType",RegistrationTypeEnum.getNameByType(formData.getString("type")));
}
for (String key : formData.keySet()) {
if (key.contains("Date") && timePattern.matcher(formData.getString(key)).matches()){
......@@ -2318,7 +2322,7 @@ public class CommonServiceImpl implements ICommonService {
.map(obj -> (Map<String, Object>) obj).collect(Collectors.toList());
if (manageType.equals(UNIT) && !CollectionUtils.isEmpty(equips)){
//管道计算的是管道长度
if (formData.containsKey("equListCode") && formData.getString("equListCode").equals("8000")){
if ("8000".equals(formData.getString("equListCode")) || "8000".equals(formData.getString("EQU_LIST_CODE"))){
double pipeLength = equips.stream().filter(Objects::nonNull)
.filter(map -> map.containsKey("pipeLength") && StringUtils.isNotEmpty((String)map.get("pipeLength")))
.mapToDouble(map -> Double.parseDouble((String) map.get("pipeLength")))
......
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