Pārlūkot izejas kodu

新增实验室报表接口和导出接口

王苗苗 5 mēneši atpakaļ
vecāks
revīzija
40c41f7302

+ 63 - 2
ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/BusinessController.java

@@ -11,6 +11,7 @@ import com.ruoyi.business.mapper.*;
 import com.ruoyi.business.req.AssayReq;
 import com.ruoyi.business.req.DeviceReq;
 import com.ruoyi.business.res.AssayDetailRes;
+import com.ruoyi.business.res.AssayQualityDetailRes;
 import com.ruoyi.business.res.DeviceRes;
 import com.ruoyi.business.res.HomeCountsRes;
 import com.ruoyi.business.service.IBusinessService;
@@ -57,9 +58,12 @@ public class BusinessController extends BaseController {
     @Autowired
     private IBusinessService businessService;
 
-    @Value("${assay.report.dir}")
+    @Value("${assay.report.recordDir}")
     private String reportDir;
 
+    @Value("${assay.report.countDir}")
+    private String countDir;
+
     @GetMapping("/hello")
     public String hello() {
         return "hello world";
@@ -149,7 +153,7 @@ public class BusinessController extends BaseController {
     }
 
     /**
-     * 导出 通过设备编号和日期获取质控样的化验记录的明细和各个指标的偏差度等到Excel
+     * 接口5:导出 通过设备编号和日期获取质控样的化验记录的明细和各个指标的偏差度等到Excel
      * @param response
      */
 //    @PostMapping("/exportAssayPageListByDeviceNoAndDate")
@@ -188,4 +192,61 @@ public class BusinessController extends BaseController {
         writer.close();
         return R.ok("下载成功");
     }
+
+
+    /**
+     *
+     * 接口6:通过日期获取的化验室质控样的报表统计信息
+     */
+    @GetMapping("/assayCountListByDates")
+    public TableDataInfo assayCountListByDates(AssayReq assayReq){
+        log.info("进入了 通过日期获取的化验室质控样的报表统计信息 接口,请求参数是{}", JSON.toJSONString(assayReq));
+        DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.SLAVE.name());
+        List<AssayQualityDetailRes> list = this.businessService.assayCountListByDates(assayReq);
+        DynamicDataSourceContextHolder.clearDataSourceType();
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 接口7:导出 通过日期获取的化验室质控样的报表统计信息到Excel
+     * @param response
+     */
+//    @PostMapping("/exportAssayPageListByDeviceNoAndDate")
+    @GetMapping("/exportAssayCountListByDates")
+    public R<String> exportAssayCountListByDates(HttpServletResponse response, AssayReq assayReq)
+    {
+        log.info("进入了 导出 通过日期获取的化验室质控样的报表统计信息到Excel 接口,请求参数是{}", JSON.toJSONString(assayReq));
+        DynamicDataSourceContextHolder.setDataSourceType(DataSourceType.SLAVE.name());
+        List<AssayQualityDetailRes> list = this.businessService.assayCountListByDates(assayReq);
+        DynamicDataSourceContextHolder.clearDataSourceType();
+        // 模板文件路径
+        String templateFilePath = this.getClass().getClassLoader().getResource("").getPath() + "/assay-count.xlsx";
+//        String templateFilePath = "classpath:/assay-record.xlsx";
+        // 输出文件路径
+//        String outFilePath = "/Users/wangmiaomiao/Desktop/" + DateUtils.parseDateToStr("yyyy-MM-dd HH:mm:ss", DateUtils.getNowDate()) + ".xlsx";
+        log.info("配置的输出文件路径及名称是{}", countDir);
+        // 创建 ExcelWriter 实例
+        ExcelWriter writer = EasyExcel
+                // 写入到
+                .write(countDir)
+                // 指定模板
+                .withTemplate(templateFilePath)
+                .build();
+        WriteSheet sheet = EasyExcel.writerSheet().build();
+
+        FillConfig fillConfig = FillConfig.builder()
+                // 开启填充换行
+                .forceNewRow(true)
+                .build();
+
+        // 执行填充操作
+        writer.fill(list, fillConfig, sheet);
+
+        // 结束
+        writer.finish();
+        writer.close();
+        return R.ok("下载成功");
+    }
+
 }

+ 2 - 1
ruoyi-admin/src/main/resources/application-dev.yml

@@ -67,4 +67,5 @@ log:
 #自定义参数
 assay:
     report:
-        dir: /home/smartrobot/化验记录.xlsx
+        recordDir: /home/smartrobot/化验记录.xlsx
+        countDir: /home/smartrobot/实验室报表.xlsx

+ 2 - 1
ruoyi-admin/src/main/resources/application-local.yml

@@ -69,4 +69,5 @@ log:
 #自定义参数
 assay:
     report:
-        dir: /Users/wangmiaomiao/Desktop/化验记录.xlsx
+        recordDir: /Users/wangmiaomiao/Desktop/化验记录.xlsx
+        countDir: /Users/wangmiaomiao/Desktop/实验室报表.xlsx

BIN
ruoyi-admin/src/main/resources/assay-count.xlsx


+ 10 - 0
ruoyi-system/src/main/java/com/ruoyi/business/domain/ZAssayResult.java

@@ -167,4 +167,14 @@ public class ZAssayResult
     /** 更新者 */
     private String updateBy;
 
+
+    //请求参数
+    /**  开始时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String timeBegin;
+
+    /** 截止时间 */
+//    @JsonFormat(pattern = "yyyy-MM-dd")
+    private String timeEnd;
+
 }

+ 2 - 2
ruoyi-system/src/main/java/com/ruoyi/business/req/AssayReq.java

@@ -12,9 +12,9 @@ import lombok.NoArgsConstructor;
 @NoArgsConstructor
 public class AssayReq {
 
-    private String assayDateBegin;//化验日期-开始
+    private String timeBegin;//化验日期-开始
 
-    private String assayDateEnd;//化验日期-截止
+    private String timeEnd;//化验日期-截止
 
     private String deviceNo;//设备编号
 }

+ 74 - 0
ruoyi-system/src/main/java/com/ruoyi/business/res/AssayQualityDetailRes.java

@@ -0,0 +1,74 @@
+package com.ruoyi.business.res;
+
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+@Builder
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class AssayQualityDetailRes {
+
+
+    private String worksName;//所属水厂
+
+    @JsonIgnore
+    private String assayNo;//化验编号
+
+    private Integer highCodArrayCounts;//高COD质控次数
+
+    private Integer highCodPassedCounts;//高COD质控合格数
+
+    private String highCodDeviationRate;//高COD质控合格率
+
+    private Integer lowCodArrayCounts;//低COD质控次数
+
+    private Integer lowCodPassedCounts;//低COD质控合格数
+
+    private String lowCodDeviationRate;//低COD质控合格率
+
+    private Integer anDanArrayCounts;//氨氮质控次数
+
+    private Integer anDanPassedCounts;//氨氮质控合格数
+
+    private String anDanDeviationRate;//氨氮质控合格率
+
+    private Integer tnArrayCounts;//总氮质控次数
+
+    private Integer tnPassedCounts;//总氮质控合格数
+
+    private String tnDeviationRate;//总氮质控合格率
+
+    private Integer tpArrayCounts;//总磷质控次数
+
+    private Integer tpPassedCounts;//总磷质控合格数
+
+    private String tpDeviationRate;//总磷质控合格率
+
+    private Integer xsydArrayCounts;//硝酸盐氮质控次数
+
+    private Integer xsydPassedCounts;//硝酸盐氮质控合格数
+
+    private String xsydDeviationRate;//硝酸盐氮质控合格率
+
+    private Integer yxsyArrayCounts;//亚硝酸盐质控次数
+
+    private Integer yxsyPassedCounts;//亚硝酸盐质控合格数
+
+    private String yxsyDeviationRate;//亚硝酸盐质控合格率
+
+    private Integer zlsyArrayCounts;//正磷酸质控次数
+
+    private Integer zlsyPassedCounts;//正磷酸盐质控合格数
+
+    private String zlsyDeviationRate;//正磷酸质控合格率
+
+    private String totalDeviationRate;//总质控合格率(8项的平均值)
+
+
+
+
+}

+ 3 - 0
ruoyi-system/src/main/java/com/ruoyi/business/service/IBusinessService.java

@@ -3,6 +3,7 @@ package com.ruoyi.business.service;
 import com.ruoyi.business.req.AssayReq;
 import com.ruoyi.business.req.DeviceReq;
 import com.ruoyi.business.res.AssayDetailRes;
+import com.ruoyi.business.res.AssayQualityDetailRes;
 import com.ruoyi.business.res.DeviceRes;
 import com.ruoyi.business.res.HomeCountsRes;
 
@@ -15,4 +16,6 @@ public interface IBusinessService {
     List<DeviceRes> devicePageList(DeviceReq deviceReq);
 
     List<AssayDetailRes> assayPageListByDeviceNoAndDate(AssayReq assayReq);
+
+    List<AssayQualityDetailRes> assayCountListByDates(AssayReq assayReq);
 }

+ 150 - 0
ruoyi-system/src/main/java/com/ruoyi/business/service/impl/BusinessServiceImpl.java

@@ -5,6 +5,7 @@ import com.ruoyi.business.mapper.*;
 import com.ruoyi.business.req.AssayReq;
 import com.ruoyi.business.req.DeviceReq;
 import com.ruoyi.business.res.AssayDetailRes;
+import com.ruoyi.business.res.AssayQualityDetailRes;
 import com.ruoyi.business.res.DeviceRes;
 import com.ruoyi.business.res.HomeCountsRes;
 import com.ruoyi.business.service.IBusinessService;
@@ -108,6 +109,155 @@ public class BusinessServiceImpl implements IBusinessService {
         return list;
     }
 
+    @Override
+    public List<AssayQualityDetailRes> assayCountListByDates(AssayReq assayReq) {
+        List<ZAssayResult> zAssayResults = this.zAssayResultMapper.selectZAssayResultList(ZAssayResult.builder().timeBegin(assayReq.getTimeBegin()).timeEnd(assayReq.getTimeEnd()).assayType("3").build());
+        if(CollectionUtils.isEmpty(zAssayResults)){
+            return Collections.emptyList();
+        }
+        //有数据 处理统计信息
+        return this.getCountInfoByAssayResults(zAssayResults);
+    }
+
+    private List<AssayQualityDetailRes> getCountInfoByAssayResults(List<ZAssayResult> zAssayResults) {
+        List<AssayQualityDetailRes> result = new ArrayList<>();
+        if(!CollectionUtils.isEmpty(zAssayResults)){
+            //先按照水厂进行分组
+            Map<String, List<ZAssayResult>> map = zAssayResults.stream().collect(Collectors.groupingBy(ZAssayResult::getDeviceNo));
+            map.forEach((deviceNo, value) -> {
+                AssayQualityDetailRes assayQualityDetailRes = new AssayQualityDetailRes();
+                //获取水厂的名称
+                //先查询化验室,再获取水厂信息
+                List<BizDevice> bizDevices = this.bizDeviceMapper.selectBizDeviceList(BizDevice.builder().deviceNo(deviceNo).build());
+                if(!CollectionUtils.isEmpty(bizDevices)){
+                    //水厂
+                    List<BizWaterWork> bizWaterWorks = this.bizWaterWorkMapper.selectBizWaterWorkList(BizWaterWork.builder().worksId(bizDevices.get(0).getDeviceWorks()).build());
+                    if(!CollectionUtils.isEmpty(bizWaterWorks)){
+                        assayQualityDetailRes.setWorksName(bizWaterWorks.get(0).getWorksName());
+                    }
+                }
+                //处理统计信息
+                //高COD
+                List<ZAssayResult> highCodList = value.stream().filter(zAssayResult -> "1".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double highCodDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(highCodList)){
+                    int highCodArrayCounts = highCodList.size();
+                    assayQualityDetailRes.setHighCodArrayCounts(highCodArrayCounts);
+                    int highCodPassedCounts = this.getPassedCounts(highCodList);
+                    assayQualityDetailRes.setHighCodPassedCounts(highCodPassedCounts);
+                    highCodDeviationRate = (double) highCodPassedCounts / (double) highCodArrayCounts;
+                    assayQualityDetailRes.setHighCodDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, highCodDeviationRate, INT_2));
+                }
+                //低COD
+                List<ZAssayResult> lowCodList = value.stream().filter(zAssayResult -> "2".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double lowCodDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(lowCodList)){
+                    int lowCodArrayCounts = lowCodList.size();
+                    assayQualityDetailRes.setLowCodArrayCounts(lowCodArrayCounts);
+                    int lowCodPassedCounts = this.getPassedCounts(lowCodList);
+                    assayQualityDetailRes.setLowCodPassedCounts(lowCodPassedCounts);
+                    lowCodDeviationRate = (double) lowCodPassedCounts / (double) lowCodArrayCounts;
+                    assayQualityDetailRes.setLowCodDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, lowCodDeviationRate, INT_2));
+                }
+                //氨氮
+                List<ZAssayResult> anDanList = value.stream().filter(zAssayResult -> "3".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double anDanDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(anDanList)){
+                    int anDanArrayCounts = anDanList.size();
+                    assayQualityDetailRes.setAnDanArrayCounts(anDanArrayCounts);
+                    int anDanPassedCounts = this.getPassedCounts(anDanList);
+                    assayQualityDetailRes.setAnDanPassedCounts(anDanPassedCounts);
+                    anDanDeviationRate = (double) anDanPassedCounts / (double) anDanArrayCounts;
+                    assayQualityDetailRes.setAnDanDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, anDanDeviationRate, INT_2));
+                }
+                //总氮
+                List<ZAssayResult> tnList = value.stream().filter(zAssayResult -> "4".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double tnDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(tnList)){
+                    int tnArrayCounts = tnList.size();
+                    assayQualityDetailRes.setTnArrayCounts(tnArrayCounts);
+                    int tnPassedCounts = this.getPassedCounts(tnList);
+                    assayQualityDetailRes.setTnPassedCounts(tnPassedCounts);
+                    tnDeviationRate = (double) tnPassedCounts / (double) tnArrayCounts;
+                    assayQualityDetailRes.setTnDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, tnDeviationRate, INT_2));
+                }
+                //总磷
+                List<ZAssayResult> tpList = value.stream().filter(zAssayResult -> "5".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double tpDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(tpList)){
+                    int tpArrayCounts = tpList.size();
+                    assayQualityDetailRes.setTpArrayCounts(tpArrayCounts);
+                    int tpPassedCounts = this.getPassedCounts(tpList);
+                    assayQualityDetailRes.setTpPassedCounts(tpPassedCounts);
+                    tpDeviationRate = (double) tpPassedCounts / (double) tpArrayCounts;
+                    assayQualityDetailRes.setTpDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, tpDeviationRate, INT_2));
+                }
+                //正磷酸盐
+                List<ZAssayResult> zlsyList = value.stream().filter(zAssayResult -> "6".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double zlsyDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(zlsyList)){
+                    int zlsyArrayCounts = zlsyList.size();
+                    assayQualityDetailRes.setZlsyArrayCounts(zlsyArrayCounts);
+                    int zlsyPassedCounts = this.getPassedCounts(zlsyList);
+                    assayQualityDetailRes.setZlsyPassedCounts(zlsyPassedCounts);
+                    zlsyDeviationRate = (double) zlsyPassedCounts / (double) zlsyArrayCounts;
+                    assayQualityDetailRes.setZlsyDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, zlsyDeviationRate, INT_2));
+                }
+                //亚硝酸盐氮
+                List<ZAssayResult> yxsydList = value.stream().filter(zAssayResult -> "7".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double yxsydDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(yxsydList)){
+                    int yxsydArrayCounts = yxsydList.size();
+                    assayQualityDetailRes.setYxsyArrayCounts(yxsydArrayCounts);
+                    int ysxydPassedCounts = this.getPassedCounts(yxsydList);
+                    assayQualityDetailRes.setYxsyPassedCounts(ysxydPassedCounts);
+                    yxsydDeviationRate = (double) ysxydPassedCounts / (double) yxsydArrayCounts;
+                    assayQualityDetailRes.setYxsyDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, yxsydDeviationRate, INT_2));
+                }
+                //硝酸盐氮
+                List<ZAssayResult> xsydList = value.stream().filter(zAssayResult -> "8".equals(zAssayResult.getAssayItem())).collect(Collectors.toList());
+                Double xsydDeviationRate = null;//后续有个总的合格率,这里用null默认,后面计算分别做判断
+                if(!CollectionUtils.isEmpty(xsydList)){
+                    int xsydArrayCounts = xsydList.size();
+                    assayQualityDetailRes.setXsydArrayCounts(xsydArrayCounts);
+                    int xsydPassedCounts = this.getPassedCounts(xsydList);
+                    assayQualityDetailRes.setXsydPassedCounts(xsydPassedCounts);
+                    xsydDeviationRate = (double) xsydPassedCounts / (double) xsydArrayCounts;
+                    assayQualityDetailRes.setXsydDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, xsydDeviationRate, INT_2));
+                }
+                //处理总的合格率
+                Double totalDeviationRate = 0D;
+                if(!Objects.isNull(highCodDeviationRate)){
+                    totalDeviationRate += highCodDeviationRate;
+                }
+                if(!Objects.isNull(lowCodDeviationRate)){
+                    totalDeviationRate += lowCodDeviationRate;
+                }
+                if(!Objects.isNull(anDanDeviationRate)){
+                    totalDeviationRate += anDanDeviationRate;
+                }
+                if(!Objects.isNull(tnDeviationRate)){
+                    totalDeviationRate += tnDeviationRate;
+                }
+                if(!Objects.isNull(tpDeviationRate)){
+                    totalDeviationRate += tpDeviationRate;
+                }
+                if(!Objects.isNull(zlsyDeviationRate)){
+                    totalDeviationRate += zlsyDeviationRate;
+                }
+                if(!Objects.isNull(yxsydDeviationRate)){
+                    totalDeviationRate += yxsydDeviationRate;
+                }
+                if(!Objects.isNull(xsydDeviationRate)){
+                    totalDeviationRate += xsydDeviationRate;
+                }
+                assayQualityDetailRes.setTotalDeviationRate(NumberUtils.getDoublePercentAndNLength(INT_4, totalDeviationRate / 8, INT_2));
+                result.add(assayQualityDetailRes);
+            });
+        }
+        return result;
+    }
+
     private void addAssayExtra(String assayNo, AssayDetailRes assayDetailRes) {
         //分别处理化验设备的名称、水厂的名字字段(没有通过SQL关联查询,数据量大会很慢。。。)
         //化验室

+ 43 - 40
ruoyi-system/src/main/resources/mapper/business/ZAssayResultMapper.xml

@@ -47,46 +47,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <sql id="selectZAssayResultVo">
         select result_id, assay_no, result_no, sample_no, sample_volume, device_no, assay_item, result_concentration, result_abs, result_date, result_time, curve_k0, curve_k1, curve_id, create_by, create_time, update_by, update_time, j_1901_s0_1, j_1901_d0_1, j_1901_R0_1, j_1901_s_1, j_1901_d_1, j_1901_r_1, j_1901_s0_2, j_1901_d0_2, j_1901_r0_2, j_1901_s_2, j_1901_d_2, j_1901_r_2, assay_type, sample_post, result_wendu, result_shidu, original_concentration, curve_no, read_flag from z_assay_result
     </sql>
-
-    <select id="selectZAssayResultList" parameterType="ZAssayResult" resultMap="ZAssayResultResult">
-        <include refid="selectZAssayResultVo"/>
-        <where>
-            1 = 1
-            <if test="assayNo != null  and assayNo != ''"> and assay_no = #{assayNo}</if>
-            <if test="resultNo != null  and resultNo != ''"> and result_no = #{resultNo}</if>
-            <if test="sampleNo != null  and sampleNo != ''"> and sample_no = #{sampleNo}</if>
-            <if test="sampleVolume != null "> and sample_volume = #{sampleVolume}</if>
-            <if test="deviceNo != null  and deviceNo != ''"> and device_no = #{deviceNo}</if>
-            <if test="assayItem != null  and assayItem != ''"> and assay_item = #{assayItem}</if>
-            <if test="resultConcentration != null "> and result_concentration = #{resultConcentration}</if>
-            <if test="resultAbs != null "> and result_abs = #{resultAbs}</if>
-            <if test="resultDate != null  and resultDate != ''"> and result_date = #{resultDate}</if>
-            <if test="resultTime != null  and resultTime != ''"> and result_time = #{resultTime}</if>
-            <if test="curveK0 != null "> and curve_k0 = #{curveK0}</if>
-            <if test="curveK1 != null "> and curve_k1 = #{curveK1}</if>
-            <if test="curveId != null "> and curve_id = #{curveId}</if>
-            <if test="j1901S01 != null "> and j_1901_s0_1 = #{j1901S01}</if>
-            <if test="j1901D01 != null "> and j_1901_d0_1 = #{j1901D01}</if>
-            <if test="j1901R01 != null "> and j_1901_R0_1 = #{j1901R01}</if>
-            <if test="j1901S1 != null "> and j_1901_s_1 = #{j1901S1}</if>
-            <if test="j1901D1 != null "> and j_1901_d_1 = #{j1901D1}</if>
-            <if test="j1901R1 != null "> and j_1901_r_1 = #{j1901R1}</if>
-            <if test="j1901S02 != null "> and j_1901_s0_2 = #{j1901S02}</if>
-            <if test="j1901D02 != null "> and j_1901_d0_2 = #{j1901D02}</if>
-            <if test="j1901R02 != null "> and j_1901_r0_2 = #{j1901R02}</if>
-            <if test="j1901S2 != null "> and j_1901_s_2 = #{j1901S2}</if>
-            <if test="j1901D2 != null "> and j_1901_d_2 = #{j1901D2}</if>
-            <if test="j1901R2 != null "> and j_1901_r_2 = #{j1901R2}</if>
-            <if test="assayType != null  and assayType != ''"> and assay_type = #{assayType}</if>
-            <if test="samplePost != null "> and sample_post = #{samplePost}</if>
-            <if test="resultWendu != null "> and result_wendu = #{resultWendu}</if>
-            <if test="resultShidu != null "> and result_shidu = #{resultShidu}</if>
-            <if test="originalConcentration != null "> and original_concentration = #{originalConcentration}</if>
-            <if test="curveNo != null  and curveNo != ''"> and curve_no = #{curveNo}</if>
-            <if test="readFlag != null  and readFlag != ''"> and read_flag = #{readFlag}</if>
-        </where>
-        order by result_id desc
-    </select>
     
     <select id="selectZAssayResultByResultId" parameterType="Long" resultMap="ZAssayResultResult">
         <include refid="selectZAssayResultVo"/>
@@ -230,4 +190,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             #{resultId}
         </foreach>
     </delete>
+
+    <!-- 2024年10月07日14:30:17  下面是新增或者调整的,不允许覆盖-->
+    <select id="selectZAssayResultList" parameterType="ZAssayResult" resultMap="ZAssayResultResult">
+        <include refid="selectZAssayResultVo"/>
+        <where>
+            1 = 1
+            <if test="assayNo != null  and assayNo != ''"> and assay_no = #{assayNo}</if>
+            <if test="resultNo != null  and resultNo != ''"> and result_no = #{resultNo}</if>
+            <if test="sampleNo != null  and sampleNo != ''"> and sample_no = #{sampleNo}</if>
+            <if test="sampleVolume != null "> and sample_volume = #{sampleVolume}</if>
+            <if test="deviceNo != null  and deviceNo != ''"> and device_no = #{deviceNo}</if>
+            <if test="assayItem != null  and assayItem != ''"> and assay_item = #{assayItem}</if>
+            <if test="resultConcentration != null "> and result_concentration = #{resultConcentration}</if>
+            <if test="resultAbs != null "> and result_abs = #{resultAbs}</if>
+            <if test="resultDate != null  and resultDate != ''"> and result_date = #{resultDate}</if>
+            <if test="resultTime != null  and resultTime != ''"> and result_time = #{resultTime}</if>
+            <if test="curveK0 != null "> and curve_k0 = #{curveK0}</if>
+            <if test="curveK1 != null "> and curve_k1 = #{curveK1}</if>
+            <if test="curveId != null "> and curve_id = #{curveId}</if>
+            <if test="j1901S01 != null "> and j_1901_s0_1 = #{j1901S01}</if>
+            <if test="j1901D01 != null "> and j_1901_d0_1 = #{j1901D01}</if>
+            <if test="j1901R01 != null "> and j_1901_R0_1 = #{j1901R01}</if>
+            <if test="j1901S1 != null "> and j_1901_s_1 = #{j1901S1}</if>
+            <if test="j1901D1 != null "> and j_1901_d_1 = #{j1901D1}</if>
+            <if test="j1901R1 != null "> and j_1901_r_1 = #{j1901R1}</if>
+            <if test="j1901S02 != null "> and j_1901_s0_2 = #{j1901S02}</if>
+            <if test="j1901D02 != null "> and j_1901_d0_2 = #{j1901D02}</if>
+            <if test="j1901R02 != null "> and j_1901_r0_2 = #{j1901R02}</if>
+            <if test="j1901S2 != null "> and j_1901_s_2 = #{j1901S2}</if>
+            <if test="j1901D2 != null "> and j_1901_d_2 = #{j1901D2}</if>
+            <if test="j1901R2 != null "> and j_1901_r_2 = #{j1901R2}</if>
+            <if test="assayType != null  and assayType != ''"> and assay_type = #{assayType}</if>
+            <if test="samplePost != null "> and sample_post = #{samplePost}</if>
+            <if test="resultWendu != null "> and result_wendu = #{resultWendu}</if>
+            <if test="resultShidu != null "> and result_shidu = #{resultShidu}</if>
+            <if test="originalConcentration != null "> and original_concentration = #{originalConcentration}</if>
+            <if test="curveNo != null  and curveNo != ''"> and curve_no = #{curveNo}</if>
+            <if test="readFlag != null  and readFlag != ''"> and read_flag = #{readFlag}</if>
+            <if test="timeBegin != null  and timeBegin != ''"> and result_date &gt;= #{timeBegin}</if>
+            <if test="timeEnd != null  and timeEnd != ''"> and result_date &lt;= #{timeEnd}</if>
+        </where>
+        order by result_id desc
+    </select>
 </mapper>