瀏覽代碼

2024 5 14 号

zhuwei 1 年之前
父節點
當前提交
a4c2ebade1

+ 7 - 1
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TrialSampleDataInfoVO.java

@@ -91,7 +91,7 @@ public class TrialSampleDataInfoVO extends TrialSampleInfo {
     /**
      * 试验数量
      */
-    @ApiModelProperty(value = "待测时间")
+    @ApiModelProperty(value = "试验数量")
     private int expCount;
 
     /**
@@ -100,4 +100,10 @@ public class TrialSampleDataInfoVO extends TrialSampleInfo {
     @ApiModelProperty(value = "剩余数量")
     private int sxCount;
 
+    /**
+     * 是否留样
+     */
+    @ApiModelProperty(value = "是否留样")
+    private String isSample;
+
 }

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

@@ -436,7 +436,11 @@ public class TrialDetectionController extends BladeController {
     @PostMapping("/self/getSamplePdfUrl")
     @ApiOperationSupport(order = 28)
     @ApiOperation(value = "获取样品pdf", notes = "获取样品pdf")
-    public R<String> getSamplePdfUrl(@ApiParam(value = "试验Id", required = true)String testId, @ApiParam(value = "合同段Id", required = true)String contractId){
+    @ApiImplicitParams(value = {
+            @ApiImplicitParam(name = "testId", value = "试验单id", required = true),
+            @ApiImplicitParam(name = "contractId", value = "合同段ID", required = true)
+    })
+    public R getSamplePdfUrl1(String testId,String contractId){
         return iTrialSelfInspectionRecordService.getSamplePdfUrl(testId,contractId);
     }
 }

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

@@ -2,7 +2,10 @@ package org.springblade.business.service.impl;
 
 import cn.hutool.core.date.LocalDateTimeUtil;
 import com.alibaba.fastjson.JSONArray;
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
@@ -76,6 +79,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     private final TrialDeviceUseServiceImpl trialDeviceUseService;
     private final InformationQueryServiceImpl informationQueryService;
     private final TrialDetectionDataServiceImpl trialDetectionDataService;
+    private final IEntrustInfoService entrustInfoService;
 
     @Override
     public IPage<TrialSelfInspectionRecordVO> selfPage(IPage<TrialSelfInspectionRecord> page, TrialSelfInspectionRecordPageDTO dto) throws FileNotFoundException {
@@ -985,8 +989,11 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
             this.trialDeviceUseService.addDeviceUseInfo(dto);
         }
 
-        // 修改entr上报状态
-       // jdbcTemplate
+        // ---- 修改样品单号信息 --------
+        if(dto!=null && Func.isNotEmpty(dto.getEntrustId())){
+            //修改项目节点基础信息
+            jdbcTemplate.update("update u_entrust_info set sample_status=4 where id ='"+dto.getEntrustId()+"'");
+        }
 
         return dto.getId().toString();
     }
@@ -1509,7 +1516,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
     public R getSamplePdfUrl(String id, String contrctId) {
         try {
             String  pdf = this.getMergePdfToTrial(Func.toLong(contrctId), Func.toLong(id));
-            return R.success(pdf);
+            return R.data(pdf);
         } catch (FileNotFoundException e) {
             throw new RuntimeException(e);
         }