Browse Source

中审报告数据处理

徐滕 1 month ago
parent
commit
2343f5f5e8

+ 18 - 3
jeeplus-modules/jeeplus-centrecareful/src/main/java/com/jeeplus/centrecareful/reportArchieve/service/ZsReportArchieveService.java

@@ -304,7 +304,12 @@ public class ZsReportArchieveService {
             //报告文号类型
             //报告文号类型
             try {
             try {
                 String reportNo = reportArchieveDTO.getReportNo();
                 String reportNo = reportArchieveDTO.getReportNo();
-                String type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+                String type = "";
+                if(reportNo.contains("字")){
+                    type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+                }else if(reportNo.contains("水")){
+                    type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("水")+1);
+                }
                 if (StringUtils.isNotBlank(type)){
                 if (StringUtils.isNotBlank(type)){
                     for (String key : reportNoTypeDTOs.keySet()) {
                     for (String key : reportNoTypeDTOs.keySet()) {
                         if(type.equals(key)){
                         if(type.equals(key)){
@@ -490,7 +495,12 @@ public class ZsReportArchieveService {
      */
      */
     public ZsReportArchieve findByReportNo(String reportNo) {
     public ZsReportArchieve findByReportNo(String reportNo) {
         if (StringUtils.isNotBlank(reportNo)){
         if (StringUtils.isNotBlank(reportNo)){
-            String type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+            String type = "";
+            if(reportNo.contains("字")){
+                type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+            }else if(reportNo.contains("水")){
+                type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("水")+1);
+            }
             String noType = SpringUtil.getBean(IDictApi.class).getDictValue(type, "report_no_type", "");
             String noType = SpringUtil.getBean(IDictApi.class).getDictValue(type, "report_no_type", "");
             if (StringUtils.isNotBlank(noType)){
             if (StringUtils.isNotBlank(noType)){
                 ZsReportArchieve reportArchieve = reportArchieveMapper.findByReportNoType(noType);
                 ZsReportArchieve reportArchieve = reportArchieveMapper.findByReportNoType(noType);
@@ -507,7 +517,12 @@ public class ZsReportArchieveService {
      * @return
      * @return
      */
      */
     public boolean checkReportTypeAndReportNo(String reportNoType, String reportNo) {
     public boolean checkReportTypeAndReportNo(String reportNoType, String reportNo) {
-        String type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+        String type = "";
+        if(reportNo.contains("字")){
+            type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("字")+1);
+        }else if(reportNo.contains("水")){
+            type = reportNo.substring(reportNo.indexOf("环")+1, reportNo.indexOf("水")+1);
+        }
         String noType = SpringUtil.getBean(IDictApi.class).getDictValue(type, "report_no_type", "");
         String noType = SpringUtil.getBean(IDictApi.class).getDictValue(type, "report_no_type", "");
         if (StringUtils.isNotBlank(noType)){
         if (StringUtils.isNotBlank(noType)){
             if (noType.equals(reportNoType)){
             if (noType.equals(reportNoType)){