Ver Fonte

试验系统试验自检保存优化

lvy há 1 mês atrás
pai
commit
8f7f1e0910

+ 6 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/dto/TrialSeleInspectionRecordBaseInfoDTO.java

@@ -68,6 +68,12 @@ public class TrialSeleInspectionRecordBaseInfoDTO implements Serializable {
 	@ApiModelProperty("报告编号")
 	private String reportNo;
 
+	@ApiModelProperty(value = "记录表自增流水号")
+	private String recordAutoNumber;
+
+	@ApiModelProperty(value = "报告单自增流水号")
+	private String reportAutoNumber;
+
 	@ApiModelProperty("判断依据列表")
 	private List<StandardVo> standardVos;
 

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TrialDetectionController.java

@@ -637,10 +637,12 @@ public class TrialDetectionController extends BladeController {
         if (vo.getRecordNo() == null) {
             Map<String, String> map = trialNumberRuleService.getTrialNumber(projectId, contractId, 4, nodeId, true);
             vo.setRecordNo(map.get("trialNumber"));
+            vo.setRecordAutoNumber(map.get("trialAutoNumber"));
         }
         if (vo.getReportNo() == null) {
             Map<String, String> map = trialNumberRuleService.getTrialNumber(projectId, contractId, 5, nodeId, true);
             vo.setReportNo(map.get("trialNumber"));
+            vo.setReportAutoNumber(map.get("trialAutoNumber"));
         }
         List<TrialSeleInspectionRecordBaseInfoDTO.StandardVo> mapList = jdbcTemplate.query("SELECT id,name from u_wbs_private_standard WHERE type = 2 and is_deleted = 0 and status = 1 and private_id = " + nodeId,
                 new BeanPropertyRowMapper<>(TrialSeleInspectionRecordBaseInfoDTO.StandardVo.class));

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

@@ -1415,16 +1415,16 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
 
             //取样信息
             List<TrialSampleInfo> trialSampleInfos = trialSampleInfoMapper.selectList(Wrappers.<TrialSampleInfo>lambdaQuery().in(TrialSampleInfo::getId, ids));
-            List<String> samplingLocations = trialSampleInfos.stream().map(TrialSampleInfo::getSamplingLocation).filter(string -> !string.isEmpty()).collect(Collectors.toList());
+            List<String> samplingLocations = trialSampleInfos.stream().map(TrialSampleInfo::getSamplingLocation).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
             String samplingLocation = org.apache.commons.lang.StringUtils.join(samplingLocations, "、");
 
-            List<String> calculationUnits = trialSampleInfos.stream().map(TrialSampleInfo::getCalculationUnit).filter(string -> !string.isEmpty()).collect(Collectors.toList());
+            List<String> calculationUnits = trialSampleInfos.stream().map(TrialSampleInfo::getCalculationUnit).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
             String calculationUnit = org.apache.commons.lang.StringUtils.join(calculationUnits, "、");
 
-            List<String> specificationNumbers = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationNumber).filter(string -> !string.isEmpty()).collect(Collectors.toList());
+            List<String> specificationNumbers = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationNumber).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
             String specificationNumber = org.apache.commons.lang.StringUtils.join(specificationNumbers, "、");
 
-            List<String> specificationModels = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationModel).filter(string -> !string.isEmpty()).collect(Collectors.toList());
+            List<String> specificationModels = trialSampleInfos.stream().map(TrialSampleInfo::getSpecificationModel).filter(string -> string !=null && !string.isEmpty()).collect(Collectors.toList());
             String specificationModel = org.apache.commons.lang.StringUtils.join(specificationModels, "、");
 
             //更新

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/IWbsTreeService.java

@@ -80,5 +80,5 @@ public interface IWbsTreeService extends BaseService<WbsTree> {
 
     List<WbsTreePrivate> getTitleRange(String projectId);
 
-    Object getQueryValueByNodeType(String wbsId, String projectId, Integer nodeType, Integer majorDataType);
+    Object getQueryValueByNodeType(String wbsId, String projectId, String queryValue, Integer nodeType, Integer majorDataType);
 }