Browse Source

试验基础信息修改重新获取接口

lvy 1 month ago
parent
commit
1f0012da75

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

@@ -544,7 +544,7 @@ public class TrialDetectionController extends BladeController {
     @GetMapping("/self/getBaseInfo")
     @ApiOperationSupport(order = 30)
     @ApiOperation(value = "获取试验自检基础信息", notes = "传入节点pKeyId")
-    public R<TrialSeleInspectionRecordInfoDTO> getBaseInfo(@RequestParam Long projectId, @RequestParam Long contractId, @RequestParam Long nodeId, @RequestParam(required = false) Long id) {
+    public R<TrialSeleInspectionRecordInfoDTO> getBaseInfo(@RequestParam Long projectId, @RequestParam Long contractId, @RequestParam Long nodeId, @RequestParam(required = false) Long id, @RequestParam(required = false) Boolean isReacquire) {
         ProjectInfo projectInfo = jdbcTemplate.query("select * from m_project_info where id = " + projectId, new BeanPropertyRowMapper<>(ProjectInfo.class)).stream().findAny().orElse(null);
         if (projectInfo == null) {
             return R.fail("未获取到项目信息");
@@ -571,7 +571,7 @@ public class TrialDetectionController extends BladeController {
         vo.setSupervisionUnit(contractInfo.getSupervisionUnitName());
         vo.setLabName(contractInfo.getLaboratoryName());
         vo.setContractName(contractInfo.getContractName());
-        if (id != null) {
+        if (id != null && isReacquire) {
             TrialSelfInspectionRecord record = jdbcTemplate.query("select * from u_trial_self_inspection_record where id = " + id, new BeanPropertyRowMapper<>(TrialSelfInspectionRecord.class)).stream().findAny().orElse(null);
             if (record != null) {
                 String baseInfo = record.getBaseInfo();

+ 1 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/TrialSelfInspectionRecordMapper.xml

@@ -65,7 +65,7 @@
     </delete>
 
     <select id="selectAll" resultType="org.springblade.business.entity.TrialSelfInspectionRecord">
-        select record_no,report_no from u_trial_self_inspection_record where node_id = #{nodeId} and contract_id = #{contractId} and is_deleted = 0 and type = #{type}
+        select id,record_no,report_no from u_trial_self_inspection_record where node_id = #{nodeId} and contract_id = #{contractId} and is_deleted = 0 and type = #{type}
     </select>
 
     <select id="selectSelfSampleRecord" resultType="java.lang.String">

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

@@ -1816,7 +1816,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                     HashMap<String, String> stringStringHashMap = new HashMap<>();
                     stringStringHashMap.put("type","记录表");
                     if (trialSelfInspectionRecord != null) {
-                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getReportNo());
+                        stringStringHashMap.put("valueStr",trialSelfInspectionRecord.getRecordNo());
                         return stringStringHashMap;
                     }
                     String str1 = "JL" +