Browse Source

试验自检获取记录编号和报告编号

lvy 2 weeks ago
parent
commit
1b96595d03

+ 4 - 4
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1829,7 +1829,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (StringUtils.isNotEmpty(maxRecordNo)) {
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
                     stringStringHashMap.put("type", "记录表");
-                    if (trialSelfInspectionRecord != null) {
+                    if (trialSelfInspectionRecord != null && StringUtils.isNotEmpty(trialSelfInspectionRecord.getRecordNo())) {
                         stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getRecordNo());
                         return stringStringHashMap;
                     }
@@ -1846,7 +1846,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (StringUtils.isNotEmpty(maxReportNo)) {
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
                     stringStringHashMap.put("type", "报告单");
-                    if (trialSelfInspectionRecord != null) {
+                    if (trialSelfInspectionRecord != null && StringUtils.isNotEmpty(trialSelfInspectionRecord.getReportNo())) {
                         stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getReportNo());
                         return stringStringHashMap;
                     }
@@ -1893,7 +1893,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     //记录表
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
                     stringStringHashMap.put("type", "记录表");
-                    if (trialSelfInspectionRecord != null) {
+                    if (trialSelfInspectionRecord != null && StringUtils.isNotEmpty(trialSelfInspectionRecord.getRecordNo())) {
                         stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getRecordNo());
                         return stringStringHashMap;
                     }
@@ -1940,7 +1940,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     //报告单
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
                     stringStringHashMap.put("type", "报告单");
-                    if (trialSelfInspectionRecord != null) {
+                    if (trialSelfInspectionRecord != null && StringUtils.isNotEmpty(trialSelfInspectionRecord.getReportNo())) {
                         stringStringHashMap.put("valueStr", trialSelfInspectionRecord.getReportNo());
                         return stringStringHashMap;
                     }

+ 6 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -3237,6 +3237,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     //报告编号
                     if (bgBH.size() >= 1) {
                         for (Element element : bgBH) {
+                            if (ObjectUtils.isEmpty(record.getReportNo()) && ObjectUtils.isNotEmpty(reData.get(element.attr("keyname"))) ) {
+                                break;
+                            }
                             reData.put(element.attr("keyname"), ObjectUtils.isNotEmpty(record.getReportNo()) ? record.getReportNo() : "");
                             break;
                         }
@@ -3244,6 +3247,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     //记录编号
                     if (jlBH.size() >= 1) {
                         for (Element element : jlBH) {
+                            if (ObjectUtils.isEmpty(record.getRecordNo()) && ObjectUtils.isNotEmpty(reData.get(element.attr("keyname"))) ) {
+                                break;
+                            }
                             reData.put(element.attr("keyname"), ObjectUtils.isNotEmpty(record.getRecordNo()) ? record.getRecordNo() : "");
                             break;
                         }