From 9733594dd881627b4c00665e6f9bfbf08c1cacec Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期一, 17 二月 2025 17:49:29 +0800
Subject: [PATCH] 业务管理移植

---
 inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java                                        |   42 
 ruoyi-common/src/main/java/com/ruoyi/common/properties/WechatProperty.java                                   |   21 
 ruoyi-common/src/main/java/com/ruoyi/common/utils/IfsApiUtils.java                                           |  180 +
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java                                    |  131 +
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarter.java                                    |   67 
 performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java       |    9 
 inspect-server/src/main/java/com/ruoyi/inspect/dto/ProductResultDto2.java                                    |   19 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderTemplate.java                                    |   43 
 inspect-server/src/main/resources/static/small-report-template.docx                                          |    0 
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java                 | 1708 ++++++------
 ruoyi-common/src/main/java/com/ruoyi/common/utils/IndustryChainUtils.java                                    |   93 
 inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java                            |    5 
 performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java                    |   10 
 basic-server/src/main/java/com/ruoyi/basic/pojo/Laboratory.java                                              |    1 
 performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java    |   18 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterItemMapper.java                        |   17 
 performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java            |    6 
 inspect-server/pom.xml                                                                                       |    6 
 inspect-server/src/main/java/com/ruoyi/inspect/service/InsSampleService.java                                 |   13 
 performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java                   |    9 
 inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java                                  |    8 
 inspect-server/src/main/resources/static/factory_verify.docx                                                 |    0 
 performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java |   12 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java                                              |   10 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java                                        |   78 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java                                  |   67 
 ruoyi-common/src/main/java/com/ruoyi/common/properties/IfsProperties.java                                    |   46 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductUserMapper.java                              |   18 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFile.java                                        |   57 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java                                 |   31 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandler.java                               |  131 +
 ruoyi-common/src/main/java/com/ruoyi/common/utils/Base64.java                                                |   27 
 inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java                                      |   35 
 inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductBindingDto.java                                 |   21 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStateMapper.java                               |   19 
 inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java                    |  636 ++--
 inspect-server/src/main/java/com/ruoyi/inspect/service/InsReportService.java                                 |   61 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java                                   |  130 
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java                        | 1174 ++++++++
 performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java               |    3 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java                                   |   38 
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsSampleServiceImpl.java                        |   22 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerify.java                               |  100 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java                                  |   23 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java                               |   17 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderDeviceRecord.java                                |   64 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandlerFile.java                           |   79 
 ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java                                     |    4 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSampleUser.java                                       |   72 
 ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java                                          |   33 
 ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java                              |   19 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnPass.java                                           |   83 
 inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java                         | 1050 ++++++++
 inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java                                             |   22 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsReport.java                                           |  125 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestProductMapper.java                 |   34 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYear.java                                       |   67 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java                              |   35 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java                                    |   58 
 basic-server/src/main/resources/mapper/SealMapper.xml                                                        |    4 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java                                  |  155 +
 inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductExportDto.java                               |  128 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestResult.java                          |   51 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYearItem.java                                   |   84 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductUser.java                                      |   40 
 inspect-server/src/main/java/com/ruoyi/inspect/dto/OmitOrderProductDto.java                                  |   21 
 inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java                               |   18 
 inspect-server/src/main/resources/static/spot_check_year.docx                                                |    0 
 performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java    |    2 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderStandardTemplate.java                            |   57 
 inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java                                |   51 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerifyItem.java                           |   57 
 inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductRawAnalysisDto.java                          |   41 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderState.java                                       |   67 
 inspect-server/src/main/resources/static/report-template.docx                                                |    0 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java                                    |   47 
 inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java                                 |   17 
 inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarterItem.java                                |   69 
 inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java                          |   10 
 inspect-server/src/main/resources/static/spot_check_quarter.docx                                             |    0 
 performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java      |    8 
 81 files changed, 6,598 insertions(+), 1,236 deletions(-)

diff --git a/basic-server/src/main/java/com/ruoyi/basic/pojo/Laboratory.java b/basic-server/src/main/java/com/ruoyi/basic/pojo/Laboratory.java
index a9343a1..92226bc 100644
--- a/basic-server/src/main/java/com/ruoyi/basic/pojo/Laboratory.java
+++ b/basic-server/src/main/java/com/ruoyi/basic/pojo/Laboratory.java
@@ -44,6 +44,7 @@
     private Integer createUser;
 
     @ApiModelProperty(value = "鍒涘缓浜�")
+    @TableField(select = false,exist = false)
     private String createUserName;
 
     @ApiModelProperty(value = "淇敼浜篿d")
diff --git a/basic-server/src/main/resources/mapper/SealMapper.xml b/basic-server/src/main/resources/mapper/SealMapper.xml
index 5cb3595..79e036c 100644
--- a/basic-server/src/main/resources/mapper/SealMapper.xml
+++ b/basic-server/src/main/resources/mapper/SealMapper.xml
@@ -4,8 +4,8 @@
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="com.ruoyi.basic.mapper.SealMapper">
     <select id="selectSeal" resultType="com.ruoyi.basic.pojo.Seal">
-        select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time
-        from seal s  LEFT JOIN laboratory l  on s.lab_id=l.id
+        select * from (select l.id,s.lab_id,l.laboratory_name ,s.address, s.type as Type,s.create_time
+        from seal s  LEFT JOIN laboratory l  on s.lab_id=l.id) a
         <if test="ew.customSqlSegment != null and ew.customSqlSegment != ''">
             ${ew.customSqlSegment}
         </if>
diff --git a/inspect-server/pom.xml b/inspect-server/pom.xml
index c124706..0484757 100644
--- a/inspect-server/pom.xml
+++ b/inspect-server/pom.xml
@@ -36,6 +36,12 @@
             <artifactId>ruoyi-system</artifactId>
         </dependency>
 
+        <!-- 缁╂晥鏈ㄥ潡 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>performance-server</artifactId>
+        </dependency>
+
         <!-- poi-tl鍖呯敓鎴愭姤鍛� -->
         <dependency>
             <groupId>com.deepoove</groupId>
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
index b9ac989..a0cec57 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/InsOrderController.java
@@ -5,6 +5,11 @@
 //import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 //import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 //import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
+//import com.ruoyi.common.core.domain.Result;
+//import com.ruoyi.inspect.dto.OmitOrderProductDto;
+//import com.ruoyi.inspect.dto.SampleOrderDto;
+//import com.ruoyi.inspect.service.InsOrderService;
 //import io.swagger.annotations.Api;
 //import io.swagger.annotations.ApiImplicitParam;
 //import io.swagger.annotations.ApiImplicitParams;
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java b/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
index 40bdd0d..eb03d93 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/controller/RawMaterialOrderController.java
@@ -1,319 +1,317 @@
-package com.ruoyi.inspect.controller;
-
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONArray;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.basic.dto.*;
-import com.ruoyi.basic.pojo.IfsInventoryQuantity;
-import com.ruoyi.inspect.dto.SampleProductDto;
-import com.ruoyi.inspect.pojo.InsOrder;
-import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate;
-import com.ruoyi.inspect.service.RawMaterialOrderService;
-import com.ruoyi.inspect.service.RawMaterialOrderTemplateService;
-import com.ruoyi.common.core.domain.Result;
-import com.ruoyi.common.utils.JackSonUtil;
-import com.ruoyi.common.utils.WxCpUtils;
-import com.ruoyi.inspect.dto.CopperInsOrderDto;
-import io.swagger.annotations.Api;
-import io.swagger.annotations.ApiOperation;
-import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.*;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
-/**
- * @Author zhuo
- * @Date 2024/7/31
- */
-@RequestMapping("/rawMaterialOrder")
-@RestController
-@AllArgsConstructor
-@Api(tags = "鍘熸潗鏂欎笅鍗�")
-public class RawMaterialOrderController {
-
-    private RawMaterialOrderService rawMaterialOrderService;
-    private RawMaterialOrderTemplateService rawMaterialOrderTemplateService;
-
-    @ApiOperation(value = "鏇村叿闆朵欢鍙疯幏鍙栨爣鍑嗘爲")
-    @GetMapping("/selectStandardTreeListByPartNo")
-    public Result selectStandardTreeListByPartNo(String partNo) {
-        return Result.success(rawMaterialOrderService.selectStandardTreeListByPartNo(partNo));
-    }
-
-    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇唬涓嬪崟")
-    @GetMapping("/getPurchaseOrder")
-    public Result getPurchaseOrder(Page page, IfsInventoryQuantityCheckDto ifsInventoryQuantity){
-        return Result.success(rawMaterialOrderService.selectIfsInventoryQuantity(page, ifsInventoryQuantity));
-    }
-
-    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈡楠屼腑")
-    @GetMapping("/getIfsByStateOne")
-    public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto) throws Exception {
-        return Result.success(rawMaterialOrderService.getIfsByStateOne(page, ifsInventoryQuantityDto));
-    }
-
-    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠凡妫�楠�")
-    @GetMapping("/getIfsByOver")
-    public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) throws Exception {
-        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
-    }
-
-    @ApiOperation(value = "娣诲姞鍘熸潗鏂欐楠屽崟妯℃澘")
-    @PostMapping("/addRawMaterOrderTemplate")
-    public Result<?> addRawMaterOrderTemplate(@RequestBody RawMaterialOrderTemplate rawMaterialOrderTemplate) {
-        return Result.success(rawMaterialOrderTemplateService.addRawMaterOrderTemplate(rawMaterialOrderTemplate));
-    }
-    @ApiOperation(value = "鏌ヨ鍘熸潗鏂欐楠屽崟妯℃澘鍒楄〃")
-    @GetMapping("/selectRawMaterOrderTemplate")
-    public Result<?> selectRawMaterOrderTemplate(String partNo) {
-        return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplate(partNo));
-    }
-
-    @ApiOperation(value = "閫氳繃鍘熸潗鏂欐楠屽崟妯℃澘id鑾峰彇妫�楠屽崟妯℃澘鍐呭")
-    @GetMapping("/selectRawMaterOrderTemplateById")
-    public Result<?> selectRawMaterOrderTemplateById(Integer id) {
-        return Result.success("鎴愬姛", rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id));
-    }
-
-    @ApiOperation(value = "鍒犻櫎鍘熸潗鏂欐楠屽崟妯℃澘")
-    @PostMapping("/delRawMaterOrderTemplate")
-    public Result<?> delRawMaterOrderTemplate(Integer id) {
-        return Result.success(rawMaterialOrderTemplateService.delRawMaterOrderTemplate(id));
-    }
-
-
-    /**
-     * 鎶ユ鎵归噺
-     * @param param 鍘熸潗鏂檌d
-     * @return
-     */
-    @ApiOperation(value = "鎶ユ鎵归噺")
-    @PostMapping("/inspectionReport")
-    public Result<?> inspectionReport(@RequestBody Map<String, Object> param) {
-        List<Integer> ids = (List<Integer>) param.get("ids");
-        return Result.success(rawMaterialOrderService.inspectionReport(ids));
-    }
-
-    /**
-     * 鍙栨秷鎶ユ
-     * @param id 鍘熸潗鏂欎笅鍗�
-     * @return
-     */
-    @ApiOperation(value = "鎾ら攢鎶ユ")
-    @PostMapping("/revokeInspectionReport")
-    public Result<?> revokeInspectionReport(Integer id) {
-        return Result.success(rawMaterialOrderService.revokeInspectionReport(id));
-    }
-
-    /**
-     * 鎵撳嵃鏍囩鏌ヨ
-     * @param param 鍘熸潗鏂檌d
-     * @return
-     */
-    @ApiOperation(value = "鎵撳嵃鏍囩鏌ヨ")
-    @PostMapping("/printLabel")
-    public Result<?> printLabel(@RequestBody Map<String, Object> param) {
-        List<Integer> ids = (List<Integer>) param.get("ids");
-        return Result.success(rawMaterialOrderService.printLabel(ids));
-    }
-
-    /**
-     * 鎶ユ
-     * @param ifsInventoryQuantity 鍘熸潗鏂�
-     * @return
-     */
-    @ApiOperation(value = "鎶ユ")
-    @PostMapping("/inspectionReportOne")
-    public Result<?> inspectionReportOne(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) {
-
-        return Result.success(rawMaterialOrderService.inspectionReportOne(ifsInventoryQuantity));
-    }
-
-    /**
-     * 鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�
-     * @param id 鍘熸潗鏂檌d
-     * @return
-     */
-    @ApiOperation(value = "鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�")
-    @GetMapping("/getIndustryChain")
-    public Result<?> getIndustryChain(Integer id) {
-        return Result.success("鎴愬姛", rawMaterialOrderService.getIndustryChain(id));
-    }
-
-    /**
-     * 鍘熸潗鏂欐挙閿�
-     * @param ifsInventoryId
-     * @return
-     */
-    @ApiOperation(value = "鍘熸潗鏂欐挙閿�涓嬪崟")
-    @PutMapping("/repealRawOrder")
-    public Result<?> repealRawOrder(Integer ifsInventoryId){
-        return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId));
-    }
-
-
-    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曞厤妫�")
-    @PostMapping("/addExemptionOrder")
-    public Result<?> addExemptionOrder(String str) {
-        Map<String, Object> map = JSON.parseObject(str, Map.class);
-        JSONArray jsonArray = JSON.parseArray(map.get("list")+"");
-        List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class);
-        InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class);
-        return Result.success(rawMaterialOrderService.addExemptionOrder(list, insOrder));
-    }
-
-
-    @ApiOperation(value = "浠撳簱鎶ユ鏌ヨ")
-    @PostMapping("/getWarehouseSubmit")
-    public Result getWarehouseSubmit(@RequestBody Map<String, Object> data) throws Exception {
-        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
-        IfsInventoryQuantity ifsInventoryQuantity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantity.class);
-        return Result.success(rawMaterialOrderService.getWarehouseSubmit(page, ifsInventoryQuantity));
-    }
-
-    /**
-     * 鍙栨秷鎶ユ
-     * @param id 鍘熸潗鏂欎笅鍗�
-     * @return
-     */
-    @ApiOperation(value = "鍒犻櫎鍘熸潗鏂欐姤妫�淇℃伅")
-    @PostMapping("/delIfsInventory")
-    public Result<?> delIfsInventory(Integer id) {
-        return Result.success(rawMaterialOrderService.delIfsInventory(id));
-    }
-
-    /**
-     * 鍘熸潗鏂欎笅鍗曟斁琛�
-     * @param param
-     * @return
-     */
-    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曟斁琛屽厤妫�")
-    @PostMapping("/rawOrderRelease")
-    public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){
-        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
-        String partDetail = (String) param.get("partDetail");
-        return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail));
-    }
-
-    /**
-     * 鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�
-     * @param ifsInventoryId
-     * @return
-     */
-    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�")
-    @GetMapping("/notificationRawOrder")
-    public Result<?> notificationRawOrder(Integer ifsInventoryId){
-        return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId));
-    }
-
-
-    @ApiOperation(value = "鍘熸潗鏂欐姤妫�鏌ヨ鍏ㄩ儴")
-    @PostMapping("/getIfsByAll")
-    public Result getIfsByAll(@RequestBody Map<String, Object> data) throws Exception {
-        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
-        IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
-        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
-    }
-
-
-    @ApiOperation(value = "鏂板鍘熸潗鏂欐姤妫�淇℃伅")
-    @PostMapping("/addIfsInventoryQuantity")
-    public Result addIfsInventoryQuantity(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) {
-        rawMaterialOrderService.addIfsInventoryQuantity(ifsInventoryQuantity);
-        return Result.success();
-    }
-
-    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曟煡鐪嬪凡瀹屾垚淇℃伅")
-    @PostMapping("/getIfsByFinish")
-    public Result getIfsByFinish(@RequestBody Map<String, Object> data) throws Exception {
-        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
-        IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
-        ifsInventoryQuantityDto.setIsFinish(1);
-        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
-    }
-
-    @ApiOperation(value = "娴嬭瘯绉诲簱")
-    @PostMapping("/shiftingParking")
-    public Result shiftingParking(@RequestBody List<Integer> ids){
-        rawMaterialOrderService.shiftingParking(ids);
-        return Result.success();
-    }
-
-    @ApiOperation(value = "寰俊鍙戦�佹枃浠舵祴璇�")
-    @GetMapping("/wxSend")
-    public Result wxSend(String user, String content, String filePath) throws Exception {
-        WxCpUtils.inform(user, content, new File(filePath));
-        return Result.success();
-    }
-
-    @ApiOperation(value = "閾滃崟涓濅笅鍗曞厤妫�")
-    @PostMapping("/addRawCopperOrderExemptionOrder")
-    public Result<?> addRawCopperOrderExemptionOrder(String str) {
-        Map<String, Object> map = JSON.parseObject(str, Map.class);
-        JSONArray jsonArray = JSON.parseArray(map.get("list")+"");
-        List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class);
-        CopperInsOrderDto CopperInsOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), CopperInsOrderDto.class);
-        return Result.success(rawMaterialOrderService.addRawCopperOrderExemptionOrder(list, CopperInsOrder));
-    }
-
-    /**
-     * 璁╂鏀捐
-     * @param ifsInventoryId
-     * @return
-     */
-    @ApiOperation(value = "璁╂鏀捐")
-    @PostMapping("/concessionRelease")
-    public Result<?> concessionRelease(Integer ifsInventoryId){
-        return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId));
-    }
-
-    /**
-     * 鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟
-     * @param enterOrderId
-     * @return
-     */
-    @ApiOperation(value = "鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟")
-    @PostMapping("/repealEnterRawOrder")
-    public Result<?> repealEnterRawOrder(Integer enterOrderId){
-        return Result.success(rawMaterialOrderService.repealEnterRawOrder(enterOrderId));
-    }
-
-    /**
-     * 鍘熸潗鏂欏搴︽挙閿�涓嬪崟
-     * @param quarterOrderId
-     * @return
-     */
-    @ApiOperation(value = "鍘熸潗鏂欏搴︽挙閿�涓嬪崟")
-    @PostMapping("/repealQuarterRawOrder")
-    public Result<?> repealQuarterRawOrder(Integer quarterOrderId){
-        return Result.success(rawMaterialOrderService.repealQuarterRawOrder(quarterOrderId));
-    }
-
-    @ApiOperation(value = "鍏ㄩ儴淇℃伅瀵煎嚭")
-    @PostMapping("/rawAllExport")
-    public void rawAllExport(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception {
-        IfsInventoryQuantitySupplierDto dto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
-        rawMaterialOrderService.rawAllExport(dto,response);
-    }
-
-    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠搴︽楠�")
-    @GetMapping("/getIfsByQuarter")
-    public Result getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
-        return Result.success(rawMaterialOrderService.getIfsByQuarter(page, ifsInventoryQuantityDto));
-    }
-
-    /**
-     * 鎻愬墠鍏ュ簱
-     * @param ifsInventoryId
-     * @return
-     */
-    @ApiOperation(value = "鎻愬墠鍏ュ簱")
-    @PostMapping("/advancedGodown")
-    public Result<?> advancedGodown(Integer ifsInventoryId){
-        return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId));
-    }
-
-}
+//package com.ruoyi.inspect.controller;
+//
+//import com.alibaba.fastjson.JSON;
+//import com.alibaba.fastjson.JSONArray;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.ruoyi.basic.dto.*;
+//import com.ruoyi.basic.pojo.IfsInventoryQuantity;
+//import com.ruoyi.inspect.dto.SampleProductDto;
+//import com.ruoyi.inspect.pojo.InsOrder;
+//import com.ruoyi.inspect.pojo.RawMaterialOrderTemplate;
+//import com.ruoyi.inspect.service.RawMaterialOrderService;
+//import com.ruoyi.inspect.service.RawMaterialOrderTemplateService;
+//import com.ruoyi.common.core.domain.Result;
+//import com.ruoyi.common.utils.JackSonUtil;
+//import com.ruoyi.common.utils.WxCpUtils;
+//import com.ruoyi.inspect.dto.CopperInsOrderDto;
+//import io.swagger.annotations.Api;
+//import io.swagger.annotations.ApiOperation;
+//import lombok.AllArgsConstructor;
+//import org.springframework.web.bind.annotation.*;
+//
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.File;
+//import java.util.List;
+//import java.util.Map;
+//
+///**
+// * @Author zhuo
+// * @Date 2024/7/31
+// */
+//@RequestMapping("/rawMaterialOrder")
+//@RestController
+//@AllArgsConstructor
+//@Api(tags = "鍘熸潗鏂欎笅鍗�")
+//public class RawMaterialOrderController {
+//
+//    private RawMaterialOrderService rawMaterialOrderService;
+//    private RawMaterialOrderTemplateService rawMaterialOrderTemplateService;
+//
+//    @ApiOperation(value = "鏇村叿闆朵欢鍙疯幏鍙栨爣鍑嗘爲")
+//    @GetMapping("/selectStandardTreeListByPartNo")
+//    public Result selectStandardTreeListByPartNo(String partNo) {
+//        return Result.success(rawMaterialOrderService.selectStandardTreeListByPartNo(partNo));
+//    }
+//
+//    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇唬涓嬪崟")
+//    @GetMapping("/getPurchaseOrder")
+//    public Result getPurchaseOrder(Page page, IfsInventoryQuantityCheckDto ifsInventoryQuantity){
+//        return Result.success(rawMaterialOrderService.selectIfsInventoryQuantity(page, ifsInventoryQuantity));
+//    }
+//
+//    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈡楠屼腑")
+//    @GetMapping("/getIfsByStateOne")
+//    public Result getIfsByStateOne(Page page, IfsInventoryQuantityDto ifsInventoryQuantityDto) throws Exception {
+//        return Result.success(rawMaterialOrderService.getIfsByStateOne(page, ifsInventoryQuantityDto));
+//    }
+//
+//    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠凡妫�楠�")
+//    @GetMapping("/getIfsByOver")
+//    public Result getIfsByOver(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) throws Exception {
+//        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
+//    }
+//
+//    @ApiOperation(value = "娣诲姞鍘熸潗鏂欐楠屽崟妯℃澘")
+//    @PostMapping("/addRawMaterOrderTemplate")
+//    public Result<?> addRawMaterOrderTemplate(@RequestBody RawMaterialOrderTemplate rawMaterialOrderTemplate) {
+//        return Result.success(rawMaterialOrderTemplateService.addRawMaterOrderTemplate(rawMaterialOrderTemplate));
+//    }
+//    @ApiOperation(value = "鏌ヨ鍘熸潗鏂欐楠屽崟妯℃澘鍒楄〃")
+//    @GetMapping("/selectRawMaterOrderTemplate")
+//    public Result<?> selectRawMaterOrderTemplate(String partNo) {
+//        return Result.success(rawMaterialOrderTemplateService.selectRawMaterOrderTemplate(partNo));
+//    }
+//
+//    @ApiOperation(value = "閫氳繃鍘熸潗鏂欐楠屽崟妯℃澘id鑾峰彇妫�楠屽崟妯℃澘鍐呭")
+//    @GetMapping("/selectRawMaterOrderTemplateById")
+//    public Result<?> selectRawMaterOrderTemplateById(Integer id) {
+//        return Result.success("鎴愬姛", rawMaterialOrderTemplateService.selectRawMaterOrderTemplateById(id));
+//    }
+//
+//    @ApiOperation(value = "鍒犻櫎鍘熸潗鏂欐楠屽崟妯℃澘")
+//    @PostMapping("/delRawMaterOrderTemplate")
+//    public Result<?> delRawMaterOrderTemplate(Integer id) {
+//        return Result.success(rawMaterialOrderTemplateService.delRawMaterOrderTemplate(id));
+//    }
+//
+//
+//    /**
+//     * 鎶ユ鎵归噺
+//     * @param param 鍘熸潗鏂檌d
+//     * @return
+//     */
+//    @ApiOperation(value = "鎶ユ鎵归噺")
+//    @PostMapping("/inspectionReport")
+//    public Result<?> inspectionReport(@RequestBody Map<String, Object> param) {
+//        List<Integer> ids = (List<Integer>) param.get("ids");
+//        return Result.success(rawMaterialOrderService.inspectionReport(ids));
+//    }
+//
+//    /**
+//     * 鍙栨秷鎶ユ
+//     * @param id 鍘熸潗鏂欎笅鍗�
+//     * @return
+//     */
+//    @ApiOperation(value = "鎾ら攢鎶ユ")
+//    @PostMapping("/revokeInspectionReport")
+//    public Result<?> revokeInspectionReport(Integer id) {
+//        return Result.success(rawMaterialOrderService.revokeInspectionReport(id));
+//    }
+//
+//    /**
+//     * 鎵撳嵃鏍囩鏌ヨ
+//     * @param param 鍘熸潗鏂檌d
+//     * @return
+//     */
+//    @ApiOperation(value = "鎵撳嵃鏍囩鏌ヨ")
+//    @PostMapping("/printLabel")
+//    public Result<?> printLabel(@RequestBody Map<String, Object> param) {
+//        List<Integer> ids = (List<Integer>) param.get("ids");
+//        return Result.success(rawMaterialOrderService.printLabel(ids));
+//    }
+//
+//    /**
+//     * 鎶ユ
+//     * @param ifsInventoryQuantity 鍘熸潗鏂�
+//     * @return
+//     */
+//    @ApiOperation(value = "鎶ユ")
+//    @PostMapping("/inspectionReportOne")
+//    public Result<?> inspectionReportOne(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) {
+//
+//        return Result.success(rawMaterialOrderService.inspectionReportOne(ifsInventoryQuantity));
+//    }
+//
+//    /**
+//     * 鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�
+//     * @param id 鍘熸潗鏂檌d
+//     * @return
+//     */
+//    @ApiOperation(value = "鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�")
+//    @GetMapping("/getIndustryChain")
+//    public Result<?> getIndustryChain(Integer id) {
+//        return Result.success("鎴愬姛", rawMaterialOrderService.getIndustryChain(id));
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欐挙閿�
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @ApiOperation(value = "鍘熸潗鏂欐挙閿�涓嬪崟")
+//    @PutMapping("/repealRawOrder")
+//    public Result<?> repealRawOrder(Integer ifsInventoryId){
+//        return Result.success(rawMaterialOrderService.repealRawOrder(ifsInventoryId));
+//    }
+//
+//
+//    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曞厤妫�")
+//    @PostMapping("/addExemptionOrder")
+//    public Result<?> addExemptionOrder(String str) {
+//        Map<String, Object> map = JSON.parseObject(str, Map.class);
+//        JSONArray jsonArray = JSON.parseArray(map.get("list")+"");
+//        List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class);
+//        InsOrder insOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), InsOrder.class);
+//        return Result.success(rawMaterialOrderService.addExemptionOrder(list, insOrder));
+//    }
+//
+//
+//    @ApiOperation(value = "浠撳簱鎶ユ鏌ヨ")
+//    @PostMapping("/getWarehouseSubmit")
+//    public Result getWarehouseSubmit(Page page, IfsInventoryQuantity ifsInventoryQuantity) throws Exception {
+//        return Result.success(rawMaterialOrderService.getWarehouseSubmit(page, ifsInventoryQuantity));
+//    }
+//
+//    /**
+//     * 鍙栨秷鎶ユ
+//     * @param id 鍘熸潗鏂欎笅鍗�
+//     * @return
+//     */
+//    @ApiOperation(value = "鍒犻櫎鍘熸潗鏂欐姤妫�淇℃伅")
+//    @PostMapping("/delIfsInventory")
+//    public Result<?> delIfsInventory(Integer id) {
+//        return Result.success(rawMaterialOrderService.delIfsInventory(id));
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欎笅鍗曟斁琛�
+//     * @param param
+//     * @return
+//     */
+//    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曟斁琛屽厤妫�")
+//    @PostMapping("/rawOrderRelease")
+//    public Result<?> rawOrderRelease(@RequestBody Map<String, Object> param){
+//        Integer ifsInventoryId = (Integer) param.get("ifsInventoryId");
+//        String partDetail = (String) param.get("partDetail");
+//        return Result.success(rawMaterialOrderService.rawOrderRelease(ifsInventoryId, partDetail));
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�")
+//    @GetMapping("/notificationRawOrder")
+//    public Result<?> notificationRawOrder(Integer ifsInventoryId){
+//        return Result.success(rawMaterialOrderService.notificationRawOrder(ifsInventoryId));
+//    }
+//
+//
+//    @ApiOperation(value = "鍘熸潗鏂欐姤妫�鏌ヨ鍏ㄩ儴")
+//    @PostMapping("/getIfsByAll")
+//    public Result getIfsByAll(@RequestBody Map<String, Object> data) throws Exception {
+//        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
+//        IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
+//        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
+//    }
+//
+//
+//    @ApiOperation(value = "鏂板鍘熸潗鏂欐姤妫�淇℃伅")
+//    @PostMapping("/addIfsInventoryQuantity")
+//    public Result addIfsInventoryQuantity(@RequestBody IfsInventoryQuantity ifsInventoryQuantity) {
+//        rawMaterialOrderService.addIfsInventoryQuantity(ifsInventoryQuantity);
+//        return Result.success();
+//    }
+//
+//    @ApiOperation(value = "鍘熸潗鏂欎笅鍗曟煡鐪嬪凡瀹屾垚淇℃伅")
+//    @PostMapping("/getIfsByFinish")
+//    public Result getIfsByFinish(@RequestBody Map<String, Object> data) throws Exception {
+//        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
+//        IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
+//        ifsInventoryQuantityDto.setIsFinish(1);
+//        return Result.success(rawMaterialOrderService.getIfsByOver(page, ifsInventoryQuantityDto));
+//    }
+//
+//    @ApiOperation(value = "娴嬭瘯绉诲簱")
+//    @PostMapping("/shiftingParking")
+//    public Result shiftingParking(@RequestBody List<Integer> ids){
+//        rawMaterialOrderService.shiftingParking(ids);
+//        return Result.success();
+//    }
+//
+//    @ApiOperation(value = "寰俊鍙戦�佹枃浠舵祴璇�")
+//    @GetMapping("/wxSend")
+//    public Result wxSend(String user, String content, String filePath) throws Exception {
+//        WxCpUtils.inform(user, content, new File(filePath));
+//        return Result.success();
+//    }
+//
+//    @ApiOperation(value = "閾滃崟涓濅笅鍗曞厤妫�")
+//    @PostMapping("/addRawCopperOrderExemptionOrder")
+//    public Result<?> addRawCopperOrderExemptionOrder(String str) {
+//        Map<String, Object> map = JSON.parseObject(str, Map.class);
+//        JSONArray jsonArray = JSON.parseArray(map.get("list")+"");
+//        List<SampleProductDto> list = jsonArray.toJavaList(SampleProductDto.class);
+//        CopperInsOrderDto CopperInsOrder = JSON.parseObject(JSON.toJSONString(map.get("insOrder")), CopperInsOrderDto.class);
+//        return Result.success(rawMaterialOrderService.addRawCopperOrderExemptionOrder(list, CopperInsOrder));
+//    }
+//
+//    /**
+//     * 璁╂鏀捐
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @ApiOperation(value = "璁╂鏀捐")
+//    @PostMapping("/concessionRelease")
+//    public Result<?> concessionRelease(Integer ifsInventoryId){
+//        return Result.success(rawMaterialOrderService.concessionRelease(ifsInventoryId));
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟
+//     * @param enterOrderId
+//     * @return
+//     */
+//    @ApiOperation(value = "鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟")
+//    @PostMapping("/repealEnterRawOrder")
+//    public Result<?> repealEnterRawOrder(Integer enterOrderId){
+//        return Result.success(rawMaterialOrderService.repealEnterRawOrder(enterOrderId));
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欏搴︽挙閿�涓嬪崟
+//     * @param quarterOrderId
+//     * @return
+//     */
+//    @ApiOperation(value = "鍘熸潗鏂欏搴︽挙閿�涓嬪崟")
+//    @PostMapping("/repealQuarterRawOrder")
+//    public Result<?> repealQuarterRawOrder(Integer quarterOrderId){
+//        return Result.success(rawMaterialOrderService.repealQuarterRawOrder(quarterOrderId));
+//    }
+//
+//    @ApiOperation(value = "鍏ㄩ儴淇℃伅瀵煎嚭")
+//    @PostMapping("/rawAllExport")
+//    public void rawAllExport(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception {
+//        IfsInventoryQuantitySupplierDto dto = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), IfsInventoryQuantitySupplierDto.class);
+//        rawMaterialOrderService.rawAllExport(dto,response);
+//    }
+//
+//    @ApiOperation(value = "鍘熸潗鏂欐楠屾煡璇㈠搴︽楠�")
+//    @GetMapping("/getIfsByQuarter")
+//    public Result getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto){
+//        return Result.success(rawMaterialOrderService.getIfsByQuarter(page, ifsInventoryQuantityDto));
+//    }
+//
+//    /**
+//     * 鎻愬墠鍏ュ簱
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @ApiOperation(value = "鎻愬墠鍏ュ簱")
+//    @PostMapping("/advancedGodown")
+//    public Result<?> advancedGodown(Integer ifsInventoryId){
+//        return Result.success(rawMaterialOrderService.advancedGodown(ifsInventoryId));
+//    }
+//
+//}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java
new file mode 100644
index 0000000..bfaa09b
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsOrderPlanDTO.java
@@ -0,0 +1,35 @@
+package com.ruoyi.inspect.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class InsOrderPlanDTO implements Serializable {
+
+    @ApiModelProperty("妫�楠屼换鍔′富閿甶d")
+    private Long insSampleId;
+
+    @ApiModelProperty("鐢ㄦ埛id")
+    private Long userId;
+
+    @ApiModelProperty("鐘舵��(妫�楠屽鐞�)")
+    private Integer state;
+
+    @ApiModelProperty("瀛愬疄楠屽")
+    private String sonLaboratory;
+
+    @ApiModelProperty("妫�楠岀姸鎬�")
+    private String insState;
+
+    @ApiModelProperty("濮旀墭缂栧彿")
+    private String entrustCode;
+
+    @ApiModelProperty("妫�楠岀被鍨�")
+    private Integer typeSource;
+
+    @ApiModelProperty("鏄惁澶嶆牳")
+    private Integer isCheck;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductBindingDto.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductBindingDto.java
new file mode 100644
index 0000000..95b4ad7
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/InsProductBindingDto.java
@@ -0,0 +1,21 @@
+package com.ruoyi.inspect.dto;
+
+import com.ruoyi.inspect.pojo.InsProduct;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author zhuo
+ * @Date 2024/11/29
+ */
+@Data
+public class InsProductBindingDto {
+    @ApiModelProperty("闇�瑕佺粦瀹氱殑id")
+    private Integer insProductId;
+
+
+    @ApiModelProperty("闇�瑕佺粦瀹氱殑妫�楠岄」")
+    private List<InsProduct> insProductBindingList;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/OmitOrderProductDto.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/OmitOrderProductDto.java
new file mode 100644
index 0000000..b6c80f4
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/OmitOrderProductDto.java
@@ -0,0 +1,21 @@
+package com.ruoyi.inspect.dto;
+
+import com.ruoyi.inspect.pojo.InsProduct;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @Author zhuo
+ * @Date 2024/12/12
+ */
+@Data
+public class OmitOrderProductDto {
+    @ApiModelProperty("闇�瑕佹坊鍔犵殑鏍峰搧Id")
+    private Integer insSampleId;
+
+
+    @ApiModelProperty("闇�瑕佺粦瀹氱殑妫�楠岄」")
+    private List<InsProduct> insProductBindingList;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/ProductResultDto2.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/ProductResultDto2.java
new file mode 100644
index 0000000..f3beda5
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/ProductResultDto2.java
@@ -0,0 +1,19 @@
+package com.ruoyi.inspect.dto;
+
+import com.ruoyi.inspect.pojo.InsProduct;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class ProductResultDto2 extends InsProduct {
+
+    @ApiModelProperty("妫�楠岃澶�")
+    private String equipValue;
+
+    @ApiModelProperty("妫�楠屼汉")
+    private String updateUserName;
+
+    @ApiModelProperty("濮旀墭缂栧彿")
+    private String entrustCode;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java
new file mode 100644
index 0000000..6f2ef15
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/ReportPageDto.java
@@ -0,0 +1,42 @@
+package com.ruoyi.inspect.dto;
+
+import com.ruoyi.inspect.pojo.InsReport;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class ReportPageDto extends InsReport implements Serializable {
+
+    @ApiModelProperty(value = "濮旀墭缂栧彿")
+    private String entrustCode;
+
+    @ApiModelProperty(value = "鎻愪氦浜�")
+    private String writeUserName;
+
+    @ApiModelProperty(value = "鎵瑰噯浜�")
+    private String ratifyUser;
+
+    @ApiModelProperty(value = "瀹℃牳浜�")
+    private String examineUser;
+
+    @ApiModelProperty(value = "涓嬪崟绫诲埆")
+    private Integer typeSource;
+
+    @ApiModelProperty(value = "妫�楠岀被鍒�")
+    private String orderType;
+
+    @ApiModelProperty(value = "鍘熸潗鏂檌d")
+    private Integer ifsInventoryId;
+
+    @ApiModelProperty(value = "鏄惁澶嶆牳閫氳繃")
+    private String queryStatus;
+
+    @ApiModelProperty(value = "鏄惁鏄摐鏉�, 0鍚�, 1鏄�")
+    private Integer isCopper;
+
+    @ApiModelProperty(value = "瀹為獙瀹�")
+    private String sonLaboratory;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductExportDto.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductExportDto.java
new file mode 100644
index 0000000..5473df4
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductExportDto.java
@@ -0,0 +1,128 @@
+package com.ruoyi.inspect.dto;
+
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.TreeMap;
+
+/**
+ * @Author zhuo
+ * @Date 2024/11/30
+ */
+@Data
+public class SampleProductExportDto {
+
+    @ApiModelProperty("鏍峰搧id")
+    private Integer id;
+
+    @ApiModelProperty("浜у搧id")
+    private Integer insProductId;
+
+    @ApiModelProperty("鏍峰搧缂栧彿")
+    private String sampleCode;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+
+    @ApiModelProperty("妫�楠岄」鍒嗙被")
+    private String inspectionItemClass;
+    private String inspectionItemClassEN;
+
+    @ApiModelProperty("妫�楠岄」")
+    private String inspectionItem;
+    private String inspectionItemEn;
+
+    @ApiModelProperty("妫�楠屽瓙椤�")
+    private String inspectionItemSubclass;
+    private String inspectionItemSubclassEn;
+
+    @ApiModelProperty("鍗曚綅")
+    private String unit;
+
+    @ApiModelProperty("鏍峰搧鍨嬪彿")
+    private String model;
+
+    @ApiModelProperty("鏍峰搧鐘舵��")
+    private Integer insState;
+
+    @ApiModelProperty("瀹為獙瀹�")
+    private String sonLaboratory;
+
+    @ApiModelProperty("妫�楠岄」绫诲瀷")
+    private String inspectionItemType;
+
+    @ApiModelProperty("妫�楠屽�肩被鍨�")
+    private String inspectionValueType;
+
+    @ApiModelProperty("瑕佹眰鍊�")
+    private String ask;
+
+    @ApiModelProperty("璇曢獙瑕佹眰")
+    private String tell;
+
+    @ApiModelProperty("妫�楠岀粨鏋�")
+    private String lastValue;
+
+    @ApiModelProperty("缁撴灉鍒ゅ畾")
+    private Integer insResult;
+
+    @ApiModelProperty("妫�楠屼汉")
+    private String checkName;
+
+    @ApiModelProperty("妫�楠屾棩鏈�")
+    private String checkTime;
+
+    @ApiModelProperty("搴忓彿")
+    private String index;
+
+    @ApiModelProperty("鍚嶇О")
+    private String inspectionName;
+
+    //鏉′欢
+    private String radius;
+
+    // 妫�楠岀粨鏋滃垪琛�
+    private List<String> lastValueList;
+
+    // 妫�楠岀粨鏋滃垪琛�
+    private List<Integer> insResultList;
+
+    //鏈�缁堢粨鏋�
+    private String finalResult;
+
+    //鍘熸潗鏂檌d
+    private Integer ifsInventoryId;
+
+    //妫�楠屽崟绫诲瀷
+    private String orderType;
+
+    //妫�楠屽崟绫诲瀷
+    private Integer quantity;
+
+    //妫�楠屽崟绫诲瀷
+    private Integer sort;
+
+    //鐢电紗鏍囪瘑
+    private String cableTag;
+
+    // 鍞竴缁撴灉鍊�
+    private LinkedHashSet<String> tellSet;
+
+    // 鐢电紗鏍囪瘑鍐呭闆嗗悎
+    private TreeMap<String, String> cableTagValueMap;
+
+    // 鐢电紗鏍囪瘑缁撴灉闆嗗悎
+    private TreeMap<String, Integer> cableTagResultMap;
+
+    // 妫�楠岄」鍜屾潯浠跺悎骞跺叧鑱�
+    public String getInspectionItemRadius() {
+        if (StringUtils.isBlank(radius)) {
+            return inspectionItem;
+        }
+        return inspectionItem + radius;
+    }
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductRawAnalysisDto.java b/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductRawAnalysisDto.java
new file mode 100644
index 0000000..aacead7
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/dto/SampleProductRawAnalysisDto.java
@@ -0,0 +1,41 @@
+package com.ruoyi.inspect.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author zhuo
+ * @Date 2024/10/17
+ */
+@Data
+public class SampleProductRawAnalysisDto {
+
+    @ApiModelProperty("鏍峰搧id")
+    private Integer insSampleId;
+
+    @ApiModelProperty("妫�楠岄」id")
+    private Integer insProductId;
+
+    @ApiModelProperty("鏍峰搧缂栧彿")
+    private String sampleCode;
+
+    @ApiModelProperty("妫�楠岄」鍚嶇О")
+    private String inspectionItem;
+
+    @ApiModelProperty("妫�楠岀粨鏋�")
+    private String lastValue;
+
+    @ApiModelProperty("鍚堟牸鍒ゆ柇, 1:鍚堟牸, 0:涓嶅悎鏍�, 3:涓嶅垽瀹�")
+    private Integer insResult;
+
+    @ApiModelProperty("鎵规鍙�")
+    private String updateBatchNo;
+
+    @ApiModelProperty("鍘傚鍚嶇О")
+    private String supplierName;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java
new file mode 100644
index 0000000..f637cc1
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderMapper.java
@@ -0,0 +1,131 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.basic.pojo.StructureTestObject;
+import com.ruoyi.inspect.dto.CostStatisticsDto;
+import com.ruoyi.inspect.dto.SampleOrderDto;
+import com.ruoyi.inspect.dto.SampleProductDto2;
+import com.ruoyi.inspect.dto.SampleProductExportDto;
+import com.ruoyi.inspect.pojo.InsOrder;
+import com.ruoyi.inspect.vo.InsOrderPrintingVo;
+import com.ruoyi.inspect.vo.SampleDefectsFatherVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author gaoaoy
+ * @description 閽堝琛ㄣ�恑ns_order(妫�楠屼笅鍗�)銆戠殑鏁版嵁搴撴搷浣淢apper
+ * @createDate 2024-03-12 16:17:55
+ * @Entity com.yuanchu.mom.pojo.InsOrder
+ */
+public interface InsOrderMapper extends BaseMapper<InsOrder> {
+
+    //鑾峰彇妫�楠屼笅鍗曟暟鎹�
+    IPage<SampleOrderDto> selectInsOrderPage(IPage<InsOrder> page, QueryWrapper<SampleOrderDto> ew, String laboratory, String isOrderAll);
+
+
+    String getLaboratoryCode(String name);
+
+    IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, QueryWrapper<SampleProductDto2> ew, Integer id);
+
+    IPage<CostStatisticsDto> selectCostStatistics(IPage<CostStatisticsDto> page, QueryWrapper<CostStatisticsDto> ew);
+
+    List<CostStatisticsDto> selectCostStatistics2(@Param("ew") QueryWrapper<CostStatisticsDto> ew);
+
+    List<Map<String, String>> selectDeviceList(Set<String> names);
+    List<SampleDefectsFatherVo> selectSampleDefects(Page page, @Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber);
+
+    Long getCount(@Param("inspectionItems") String inspectionItems, @Param("orderNumber") String orderNumber);
+
+    String getEnumLabelByValue(String value);
+
+    String getStandardMethodCode(Integer id);
+
+    int updateStatus( Integer id);
+
+    String selLaboratoryCode(String laboratory);
+
+    List<Map<Integer, Object>> selectReportModelByOrderId(@Param("id") Integer id, @Param("laboratory") String laboratory);
+
+    String seldepLimsId(int depLimsId);
+
+    /**
+     * 鏌ヨ妫�楠岀粨鏋�
+     * @param ids
+     * @return
+     */
+    List<SampleProductExportDto> selectSampleBySampleId(@Param("ids") List<Integer> ids);
+
+    /**
+     * 鑾峰彇鎵归噺妫�楠岀殑鎬绘暟
+     * @param id
+     * @return
+     */
+    int selectSampleMax(Integer id);
+
+    /**
+     * 鑾峰彇绾胯姱棰滆壊
+     * @param id
+     * @return
+     */
+    List<String> selectSampleCableTag(Integer id);
+
+    /**
+     *
+     * @param orderId
+     * @return
+     */
+    int selectSampleItemS(Integer orderId);
+
+    /**
+     * 鍙煡璇㈤粯璁ょ涓�涓殑浜у搧
+     * @param id
+     * @return
+     */
+    List<SampleProductExportDto> selectSampleBySampleIdOne(Integer id);
+
+    /**
+     * 鏌ヨ鏃ュ巻鍥�
+     * @param
+     * @return
+     */
+    List<Map<String, Object>> selectCalendarWorkByWeek(int day);
+
+    /**
+     *
+     * @param partNo
+     * @return
+     */
+    StructureTestObject selectProductByPartNo(String partNo);
+
+    /**
+     *
+     * @param partNo
+     * @return
+     */
+    StructureTestObject selectByPartNo(String partNo);
+
+    /**
+     * 鎴愬搧鏍囩鎵撳嵃
+     * @param ids
+     * @return
+     */
+    List<InsOrderPrintingVo> labelOrderPrinting(List<Integer> ids);
+
+    List<SampleOrderDto> rawAllInsOrderExport(QueryWrapper<SampleOrderDto> ew,  String laboratory, String isOrderAll);
+
+    /**
+     * 鏍规嵁璁㈠崟鏌ヨ璇曢獙瀹�
+     * @param insOrderId
+     * @return
+     */
+    String selectLaboratoryByOrderId(Integer insOrderId);
+
+    InsOrder selectFirstSubmit(Integer insSampleId);
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStateMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStateMapper.java
new file mode 100644
index 0000000..15d102f
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsOrderStateMapper.java
@@ -0,0 +1,19 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.inspect.pojo.InsOrderState;
+
+/**
+* @author admin
+* @description 閽堝琛ㄣ�恑ns_order_state銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-04-01 11:44:50
+* @Entity com.yuanchu.mom.pojo.InsOrderState
+*/
+public interface InsOrderStateMapper extends BaseMapper<InsOrderState> {
+
+
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
new file mode 100644
index 0000000..52a8ef0
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductMapper.java
@@ -0,0 +1,67 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.inspect.dto.ProductResultDto2;
+import com.ruoyi.inspect.dto.SampleProductRawAnalysisDto;
+import com.ruoyi.inspect.pojo.InsProduct;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_product(妫�楠岄」鐩�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-03-08 09:45:03
+* @Entity com.yuanchu.mom.pojo.InsProduct
+*/
+public interface InsProductMapper extends BaseMapper<InsProduct> {
+
+    int selectOrderManDay(Integer orderId);
+
+    Map<String, String> selectUserById(Integer userId);
+
+    List<ProductResultDto2> getProductAndResult(Integer sampleId);
+
+    int updateInspected(@Param("id") Integer id);
+
+    List<InsProduct> selectFiberInsProduct(List<Integer> ids, String laboratory);
+
+    IPage<InsProduct> selectNoProducts(Page page, Integer orderId, List<Integer> noIds);
+
+    int selectInsProductCountByOrderId(Integer orderId);
+
+    /**
+     * 鏍规嵁鏍峰搧id鏌ヨ妫�楠岄」鐩�
+     * @param sampleIds
+     * @return
+     */
+    List<SampleProductRawAnalysisDto> selectListBySampleIds(@Param("sampleIds") List<Integer> sampleIds);
+
+    /**
+     * 鏌ヨ鎵�鏈夌殑妫�楠岄」
+     * @param sampleIds
+     * @return
+     */
+    List<String> selectItemNameBySampleIds(@Param("sampleIds") List<Integer> sampleIds);
+
+    /**
+     * 鏍规嵁璁㈠崟id鏌ヨ涓嶅悎鏍奸」
+     * @param orderId
+     * @return
+     */
+    List<String> selectUnqualifiedList(Integer orderId);
+
+    /**
+     * 鏌ヨ鍒ゆ柇鏄惁鏈変笉鍒ゅ畾椤圭洰,鍜屽叏閮芥槸鍒ゅ畾椤�
+     * @param orderId
+     * @return
+     */
+    int selectNoJudge(Integer orderId);
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductUserMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductUserMapper.java
new file mode 100644
index 0000000..0598f28
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsProductUserMapper.java
@@ -0,0 +1,18 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.inspect.pojo.InsProductUser;
+
+/**
+* @author z1292
+* @description 閽堝琛ㄣ�恑ns_product_user(妫�楠岄」鐩殑浜哄憳妫�楠岃褰�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-04-17 13:42:44
+* @Entity com.yuanchu.mom.pojo.InsProductUser
+*/
+public interface InsProductUserMapper extends BaseMapper<InsProductUser> {
+
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java
new file mode 100644
index 0000000..f9be2da
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsReportMapper.java
@@ -0,0 +1,38 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.ruoyi.inspect.dto.ReportPageDto;
+import com.ruoyi.inspect.pojo.InsReport;
+import org.apache.ibatis.annotations.Param;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_report(妫�楠屾姤鍛�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-03-17 22:10:02
+* @Entity com.yuanchu.mom.pojo.InsReport
+*/
+public interface InsReportMapper extends BaseMapper<InsReport> {
+
+    /**
+     * 鏌ヨ妫�楠屼换鍔�
+     * @param userId 褰撳墠鐧诲綍浜篿d
+     * @param queryStatus  鐘舵��
+     * @param createOrderUser  鏄惁鏄彧鏈夋煡鐪嬭嚜宸辩殑鏉冮檺
+     * @return
+     */
+    IPage<ReportPageDto> pageInsReport(IPage<ReportPageDto> page,
+                                       @Param("ew") QueryWrapper<ReportPageDto> ew,
+                                       @Param("laboratory") String laboratory,
+                                       @Param("userId") Integer userId,
+                                       @Param("queryStatus") String queryStatus,
+                                       @Param("createOrderUser") Integer createOrderUser);
+
+    String getLaboratoryByName(String name, String type);
+
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java
new file mode 100644
index 0000000..b074da0
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleMapper.java
@@ -0,0 +1,130 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.ruoyi.inspect.dto.InsOrderPlanDTO;
+import com.ruoyi.inspect.dto.SampleProductDto;
+import com.ruoyi.inspect.pojo.InsProduct;
+import com.ruoyi.inspect.pojo.InsSample;
+import com.ruoyi.inspect.vo.InsOrderPlanTaskSwitchVo;
+import com.ruoyi.inspect.vo.InsOrderPlanVO;
+import com.ruoyi.inspect.vo.SampleVo;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_sample(妫�楠屾牱鍝�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-03-14 17:14:57
+* @Entity com.yuanchu.mom.pojo.InsSample
+*/
+public interface InsSampleMapper extends BaseMapper<InsSample> {
+
+    IPage<InsOrderPlanVO> findInsSampleAndOrder(Page page,
+                                                @Param("ew") QueryWrapper<InsOrderPlanDTO> ew,
+                                                @Param("userName") String userName ,
+                                                @Param("userId") Integer userId,
+                                                @Param("sonLaboratory") String sonLaboratory,
+                                                @Param("laboratory") String laboratory,
+                                                @Param("isCheck") Integer isCheck);
+
+    IPage<InsOrderPlanTaskSwitchVo> inspectionOrderDetailsTaskSwitching(Page page, @Param("ew") QueryWrapper<InsOrderPlanDTO> ew, @Param("userId") Integer userId, @Param("sonLaboratory") String sonLaboratory, @Param("laboratory") String laboratory);
+
+    List<SampleProductDto> selectSampleProductListByOrderId(Integer id);
+
+    List<SampleProductDto> selectSampleProductListByOrderId2(Integer id);
+
+    Map<String,Object> selectInsOrder(Integer id);
+
+    List<SampleProductDto> getInsOrderAndSample(Integer id, String laboratory);
+
+    String getSampleEn(String sample);
+
+    /**
+     * 鍙兘娌℃湁浜у搧鐩存帴灏辨槸瀵硅薄
+     * @param sample
+     * @return
+     */
+    String getSampleEnByObject(String sample);
+
+    /**
+     * 鏍峰搧
+     * @param id
+     * @param laboratory
+     * @return
+     */
+    List<InsProduct> getInsProduct1(Integer id, String laboratory, String cableTag, String repetitionTag, String isDisqualification);
+
+
+    /**
+     * 鍘熸潗鏂�
+     * @param id
+     * @param laboratory
+     * @param rawMaterialTag
+     * @return
+     */
+    List<InsProduct> getInsProduct6(Integer id, String laboratory, String rawMaterialTag, String isDisqualification);
+
+    SampleVo getDetailById(Integer sampleId);
+
+    String selMethodById(Integer sampleId);
+
+    /**
+     * 鐢电紗閰嶇疆鏌ョ湅閰嶇疆鏍囪瘑
+     * @param id
+     * @param laboratory
+     * @return
+     */
+    List<Map<String, Object>> getCableTag(@Param("id") Integer id, @Param("laboratory") String laboratory);
+
+    /**
+     * 鍘熸潗鏂欐煡鐪嬮厤缃爣璇�
+     * @param id
+     * @param laboratory
+     * @return
+     */
+    List<Map<String, Object>> getRawMaterialTag(@Param("id") Integer id, @Param("laboratory") String laboratory);
+
+    /**
+     * 鏌ョ湅閲嶅鏍囪瘑
+     * @param id
+     * @param laboratory
+     * @return
+     */
+    List<Map<String, Object>> getRepetitionTag(@Param("id") Integer id, @Param("laboratory") String laboratory, @Param("cableTag") String cableTag);
+
+
+    List<SampleProductDto> selectExemptionByOrderId(Integer id);
+
+    /**
+     * 鏌ヨ鍘傚瀵嗗害(鏈夊瀷鍙�)
+     * @param sample
+     * @param production
+     * @return
+     */
+    String selectSupplierDensityModel(@Param("sample") String sample, @Param("production") String production, @Param("model") String model);
+
+    /**
+     * 鏌ヨ鍘傚瀵嗗害(娌″瀷鍙�)
+     * @param sample
+     * @param production
+     * @return
+     */
+    String selectSupplierDensity(@Param("sample") String sample, @Param("production") String production);
+
+
+    /**
+     * 鏌ヨ妫�楠岄」妫�楠岀粨鏋�
+     * @param itemIds
+     * @return
+     */
+    List<InsProduct> selectProductResult(List<Integer> itemIds);
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java
new file mode 100644
index 0000000..b3f0c19
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsSampleUserMapper.java
@@ -0,0 +1,18 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.inspect.pojo.InsSampleUser;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_sample_user(鏍峰搧璐熻矗浜鸿褰�)銆戠殑鏁版嵁搴撴搷浣淢apper
+* @createDate 2024-03-14 17:12:02
+* @Entity com.yuanchu.mom.pojo.InsSampleUser
+*/
+public interface InsSampleUserMapper extends BaseMapper<InsSampleUser> {
+
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestProductMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestProductMapper.java
new file mode 100644
index 0000000..440ca63
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/InsUnqualifiedRetestProductMapper.java
@@ -0,0 +1,34 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.inspect.pojo.InsProduct;
+import com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 涓嶅悎鏍兼楠岄」鐩娴�
+ * @author 榉�
+ * @since 2024-09-03
+ */
+@Mapper
+public interface InsUnqualifiedRetestProductMapper extends BaseMapper<InsUnqualifiedRetestProduct> {
+
+    /**
+     * 鏌ヨ涓嶅悎鏍煎唴瀹�
+     * @param ids
+     * @return
+     */
+    List<InsUnqualifiedRetestProduct> selectRetestProduct(List<Integer> ids);
+
+    // 鏍峰搧
+    List<InsProduct> getInsProductUnqualifiedRetest1(Integer id, String laboratory, String retestTag);
+
+    // 鐢电紗閰嶇疆
+    List<InsProduct> getInsProductUnqualifiedRetest5(Integer id, String laboratory, String cableTag, String retestTag);
+
+    // 鍘熸潗鏂欎笅鍗�
+    List<InsProduct> getInsProductUnqualifiedRetest6(Integer id, String laboratory, String rawMaterialTag, String retestTag);
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterItemMapper.java b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterItemMapper.java
new file mode 100644
index 0000000..82d1085
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/mapper/SpotCheckQuarterItemMapper.java
@@ -0,0 +1,17 @@
+package com.ruoyi.inspect.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.inspect.pojo.SpotCheckQuarterItem;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * 瀛e害鎶芥牱璁″垝璇︽儏琛�
+ *
+ * @author zhuo
+ * @since 2024-10-09
+ */
+@Mapper
+public interface SpotCheckQuarterItemMapper extends BaseMapper<SpotCheckQuarterItem> {
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderDeviceRecord.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderDeviceRecord.java
new file mode 100644
index 0000000..7eec57d
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderDeviceRecord.java
@@ -0,0 +1,64 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * cnas璁惧浣跨敤璁板綍琛�(DeviceRecord)$desc
+ *
+ * @author makejava
+ * @since 2024-12-21 11:11:01
+ */
+@Data
+@TableName("device_record")
+public class InsOrderDeviceRecord {
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("璁惧id")
+    private Integer deviceId;
+
+    @ApiModelProperty("璁㈠崟id")
+    private Integer insOrderId;
+
+    @ApiModelProperty("鏍峰搧缂栧彿")
+    private String sampleCode;
+
+    @ApiModelProperty("娓╁害")
+    private String temperature;
+
+    @ApiModelProperty("婀垮害")
+    private String humidity;
+
+    @ApiModelProperty("浣跨敤鍓�0浠h〃涓嶆甯�1浠h〃姝e父")
+    private Integer useBefore;
+
+    @ApiModelProperty("浣跨敤鍚�0浠h〃涓嶆甯�1浠h〃姝e父")
+    private Integer useAfter;
+
+    @ApiModelProperty("寮傚父鎯呭喌")
+    private String abnormal;
+
+    @ApiModelProperty("浣跨敤浜篿d")
+    private Integer usePersonId;
+
+    @ApiModelProperty("浣跨敤浜�")
+    private String usePerson;
+
+    @ApiModelProperty("澶囨敞")
+    private String remark;
+
+    @ApiModelProperty("浣跨敤寮�濮嬫棩鏈�")
+    private LocalDateTime useStartDate;
+
+    @ApiModelProperty("浣跨敤缁撴潫鏃ユ湡")
+    private LocalDateTime useEndDate;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerify.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerify.java
new file mode 100644
index 0000000..0a43688
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerify.java
@@ -0,0 +1,100 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * 鍘熸潗鏂欏巶瀹惰繘璐ч獙璇�
+ *
+ * @author zhuo
+ * @since 2024-09-26
+ */
+@Data
+@TableName("ins_order_factory_verify")
+public class InsOrderFactoryVerify {
+
+    @ApiModelProperty(value = "涓婚敭")
+    @TableId(type = IdType.AUTO)
+    private Integer factoryVerifyId;
+
+    @ApiModelProperty(value = "澶栭敭:  ins_order琛� id")
+    private Integer insOrderId;
+
+    @ApiModelProperty(value = "濮旀墭缂栧彿")
+    private String entrustCode;
+
+    @ApiModelProperty("鏉愭枡鍘傚")
+    private String supplierName;
+
+    @ApiModelProperty("鍒拌揣鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime declareDate;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+
+    @ApiModelProperty("瑙勬牸鍨嬪彿")
+    private String model;
+
+    @ApiModelProperty("鏉愭枡鎵瑰彿")
+    private String updateBatchNo;
+
+    @ApiModelProperty(value = "楠岃瘉鏂囦欢缂栧彿")
+    private String verifyFileCode;
+
+    @ApiModelProperty(value = "1鏉愭枡鍚嶇О")
+    private String basicName;
+
+    @ApiModelProperty(value = "2瑙勬牸鍨嬪彿")
+    private String basicModel;
+
+    @ApiModelProperty(value = "3鏉愭枡鎵瑰彿")
+    private String basicBatchNo;
+
+    @ApiModelProperty(value = "4鎵ц鏍囧噯")
+    private String basicStandard;
+
+    @ApiModelProperty(value = "5鐢熶骇鏃ユ湡")
+    private String basicDate;
+
+    @ApiModelProperty(value = "6渚涜揣鏁伴噺")
+    private String basicNumber;
+
+    @ApiModelProperty(value = "7鏉愭枡棰滆壊")
+    private String basicColor;
+
+    @ApiModelProperty(value = "8鍏朵粬(鍚嶇О)")
+    private String basicOtherValue;
+
+    @ApiModelProperty(value = "8鍏朵粬")
+    private String basicOther;
+
+    @ApiModelProperty(value = "鍒涘缓浜篿d")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+    @TableField(exist = false,select = false)
+    @ApiModelProperty(value = "楠岃瘉椤圭洰闆嗗悎")
+    private List<InsOrderFactoryVerifyItem>  factoryVerifyItemList;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerifyItem.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerifyItem.java
new file mode 100644
index 0000000..304837a
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFactoryVerifyItem.java
@@ -0,0 +1,57 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 鍘熸潗鏂欏巶瀹惰繘璐ч獙璇佹楠岄」
+ *
+ * @author zhuo
+ * @since 2024-09-26
+ */
+@Data
+@TableName("ins_order_factory_verify_item")
+public class InsOrderFactoryVerifyItem {
+
+
+    @ApiModelProperty(value = "涓婚敭")
+    @TableId(type = IdType.AUTO)
+    private Integer factoryVerifyItemId;
+
+    @ApiModelProperty(value = "澶栭敭: 杩涘巶楠岃瘉琛� id")
+    private Integer factoryVerifyId;
+
+    @ApiModelProperty(value = "楠岃瘉椤圭洰")
+    private String inspectionItem;
+
+    @ApiModelProperty(value = "楠岃瘉缁撴灉")
+    private String result;
+
+    @ApiModelProperty(value = "鎺掑簭")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer sort;
+
+    @ApiModelProperty(value = "鍒涘缓浜篿d")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFile.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFile.java
new file mode 100644
index 0000000..fab1430
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderFile.java
@@ -0,0 +1,57 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * <p>
+ * 妫�楠屽崟涓嬬殑闄勪欢鍒楄〃
+ * </p>
+ *
+ * @author 姹熻嫃榈烽洀缃戠粶绉戞妧鏈夐檺鍏徃
+ * @since 2024-06-06 10:08:21
+ */
+@Getter
+@Setter
+@TableName("ins_order_file")
+@ApiModel(value = "InsOrderFile瀵硅薄", description = "妫�楠屽崟涓嬬殑闄勪欢鍒楄〃")
+public class InsOrderFile implements Serializable {
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("鍏宠仈 妫�楠屽崟澶栭敭id")
+    private Integer insOrderId;
+
+    @ApiModelProperty("绫诲瀷")
+    private Integer type;
+
+    @ApiModelProperty("闄勪欢璺緞")
+    private String fileUrl;
+
+    @ApiModelProperty("闄勪欢鍚嶇О")
+    private String fileName;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("涓婁紶浜�")
+    @TableField(exist = false, select = false)
+    private String name;
+
+    @TableField(fill = FieldFill.INSERT)
+    @ApiModelProperty("涓婁紶鏃堕棿")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderStandardTemplate.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderStandardTemplate.java
new file mode 100644
index 0000000..921d222
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderStandardTemplate.java
@@ -0,0 +1,57 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 璁㈠崟鏍囧噯妯℃澘澶嶅埗
+ *
+ * @author zhuo
+ * @since 2024-11-05
+ */
+@Data
+@TableName(value = "ins_order_standard_template")
+public class InsOrderStandardTemplate {
+
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("妯℃澘id")
+    private Integer templateId;
+
+    @ApiModelProperty("璁㈠崟id")
+    private Integer insOrderId;
+
+    @ApiModelProperty("妯℃澘鍚嶇О")
+    private String name;
+
+    @ApiModelProperty("澶囨敞")
+    private String remark;
+
+    @ApiModelProperty("妯℃澘缁撴瀯")
+    private String thing;
+
+    @TableField(fill = FieldFill.INSERT)
+    @ApiModelProperty("鍒涘缓浜�")
+    private Integer createUser;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ApiModelProperty("淇敼浜�")
+    private Integer updateUser;
+
+    @TableField(fill = FieldFill.INSERT)
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private Date createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @ApiModelProperty("淇敼鏃堕棿")
+    private Date updateTime;
+
+    @ApiModelProperty("妯℃澘缂栧彿")
+    private String number;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderState.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderState.java
new file mode 100644
index 0000000..829689a
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderState.java
@@ -0,0 +1,67 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *
+ * @TableName ins_order_state
+ */
+@TableName(value ="ins_order_state")
+@Data
+public class InsOrderState implements Serializable {
+    /**
+     *
+     */
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 澶栭敭锛歩ns_order琛╥d
+     */
+    @TableField(value = "ins_order_id")
+    private Integer insOrderId;
+
+    /**
+     * 瀹為獙瀹�
+     */
+    @TableField(value = "laboratory")
+    private String laboratory;
+
+    /**
+     * 妫�楠岀姸鎬�(0锛氬緟妫�楠�1:妫�楠屼腑 2:宸叉楠�3锛氬緟澶嶆牳4锛氬鏍告湭閫氳繃 5锛氬鏍搁�氳繃)
+     */
+    @TableField(value = "ins_state")
+    private Integer insState;
+
+    @ApiModelProperty("妫�楠屾椂闂�")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime insTime;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty("淇敼鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+    @ApiModelProperty("澶嶆牳浜�")
+    private Integer verifyUser;
+
+    @ApiModelProperty("澶嶆牳鐞嗙敱")
+    private String verifyTell;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderTemplate.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderTemplate.java
new file mode 100644
index 0000000..eca4601
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsOrderTemplate.java
@@ -0,0 +1,43 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ *
+ * @TableName ins_order_template
+ */
+@TableName(value ="ins_order_template")
+@Data
+public class InsOrderTemplate implements Serializable {
+    /**
+     *
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 妯℃澘鍚嶇О
+     */
+    @ApiModelProperty("妯℃澘鍚嶇О")
+    private String name;
+
+    /**
+     * 妯℃澘鍐呭
+     */
+    @ApiModelProperty("妯℃澘鍐呭")
+    private String thing;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductUser.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductUser.java
new file mode 100644
index 0000000..dfdeca6
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsProductUser.java
@@ -0,0 +1,40 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 妫�楠岄」鐩殑浜哄憳妫�楠岃褰�
+ * @TableName ins_product_user
+ */
+@TableName(value ="ins_product_user")
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class InsProductUser implements Serializable {
+    /**
+     *
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    /**
+     * 澶栭敭锛歩ns_product琛╥d
+     */
+    private Integer insProductId;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsReport.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsReport.java
new file mode 100644
index 0000000..9d69801
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsReport.java
@@ -0,0 +1,125 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 妫�楠屾姤鍛�
+ * @TableName ins_report
+ */
+@TableName(value ="ins_report")
+@Data
+public class InsReport implements Serializable {
+    /**
+     *
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty("鎶ュ憡缂栧彿")
+    private String code;
+
+    /**
+     * 澶栭敭锛氭楠屽崟id
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private Integer insOrderId;
+
+    /**
+     * 绯荤粺鐢熸垚鎶ュ憡鍦板潃
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private String url;
+
+    /**
+     * 鎵嬪姩涓婁紶鎶ュ憡鍦板潃
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private String urlS;
+
+    /**
+     * 涓存椂鎶ュ憡鍦板潃
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private String tempUrlPdf;
+
+    /**
+     * 1锛氭壒鍑� 0锛氫笉鎵瑰噯
+     */
+    @ApiModelProperty("鎵瑰噯鐘舵��")
+    private Integer isRatify;
+
+    @ApiModelProperty("鎵瑰噯澶囨敞")
+    private String ratifyTell;
+
+    /**
+     * 1锛氬鏍搁�氳繃 0锛氬鏍镐笉閫氳繃
+     */
+    @ApiModelProperty("瀹℃牳鐘舵��")
+    private Integer isExamine;
+
+    @ApiModelProperty("瀹℃牳澶囨敞")
+    private String examineTell;
+
+    /**
+     * 澶栭敭锛氱敤鎴穒d锛堟彁浜や汉锛�
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private Integer writeUserId;
+
+    /**
+     * 澶栭敭锛氱敤鎴穒d锛堟壒鍑嗕汉锛�
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private Integer ratifyUserId;
+
+    /**
+     * 澶栭敭锛氱敤鎴穒d锛堝鏍镐汉锛�
+     */
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    private Integer examineUserId;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty("淇敼鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+    /**
+     * 1锛氬凡鎻愪氦 0锛氬緟鎻愪氦
+     */
+    @ApiModelProperty("鎻愪氦鐘舵��")
+    private Integer state;
+
+    @ApiModelProperty("鎻愪氦鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime writeTime;
+
+    @ApiModelProperty("瀹℃牳鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime examineTime;
+
+    @ApiModelProperty("鎵瑰噯鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime ratifyTime;
+
+
+    @ApiModelProperty(value = "鏄惁鏄�氳繃鐨勬姤鍛�, 0:鏈�氳繃, 1:閫氳繃")
+    private Integer isPass;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSampleUser.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSampleUser.java
new file mode 100644
index 0000000..52807bb
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsSampleUser.java
@@ -0,0 +1,72 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 鏍峰搧璐熻矗浜鸿褰�
+ * @TableName ins_sample_user
+ */
+@TableName(value ="ins_sample_user")
+@Data
+@NoArgsConstructor
+public class InsSampleUser implements Serializable {
+    /**
+     *
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 澶栭敭锛氭楠屾牱鍝乮ns_sample琛╥d
+     */
+    private Integer insSampleId;
+
+    /**
+     * 澶栭敭锛氱敤鎴穒d 璐熻矗浜�
+     */
+    private Integer userId;
+
+    /**
+     * 1锛氱‘璁� 0锛氭湭纭
+     */
+    //1鏄鏍镐汉 0鏄楠屼汉
+    private Integer state;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty("淇敼鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+    /**
+     * 瀛愯瘯楠屽
+     * @param insSampleId
+     * @param userId
+     * @param state
+     */
+    private String sonLaboratory;
+
+    public InsSampleUser(Integer insSampleId, Integer userId, Integer state,String sonLaboratory) {
+        this.insSampleId = insSampleId;
+        this.userId = userId;
+        this.state = state;
+        this.sonLaboratory = sonLaboratory;
+    }
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnPass.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnPass.java
new file mode 100644
index 0000000..3dfa2c8
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnPass.java
@@ -0,0 +1,83 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * @author 鏈变匠鍚�
+ * @date 2024/5/8 14:11
+ */
+@Data
+@TableName("ins_un_pass")
+public class InsUnPass implements Serializable {
+    /**
+     * 涓嶅悎鏍糹d
+     */
+    @ApiModelProperty(value = "涓婚敭")
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 瑙勬牸鍨嬪彿
+     */
+    @ApiModelProperty("瑙勬牸鍨嬪彿")
+    private String model;
+    /**
+     * 鏍峰搧鍚嶇О
+     */
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+    /**
+     * 妫�娴嬮」
+     */
+    @ApiModelProperty("妫�娴嬮」")
+    private String inspectionItem;
+    /**
+     * 妫�娴嬪瓙椤�
+     */
+    @ApiModelProperty("妫�娴嬪瓙椤�")
+    private String inspectionItemSubclass;
+    /**
+     * 妫�娴嬬粨鏋�
+     */
+    @ApiModelProperty("妫�娴嬬粨鏋�")
+    @TableField("`last_value`")
+    private String lastValue;
+    /**
+     * 澶勭悊鎰忚
+     */
+    @ApiModelProperty("澶勭悊鎰忚")
+    private String handleSuggestion;
+    /**
+     * 濮旀墭缂栧彿
+     */
+    @ApiModelProperty("濮旀墭缂栧彿")
+    private String entrustCode;
+    /**
+     * 鐢ㄦ埛鍚�
+     */
+    @ApiModelProperty("妫�楠屼汉")
+    private String name;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty("淇敼鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandler.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandler.java
new file mode 100644
index 0000000..7004dce
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandler.java
@@ -0,0 +1,131 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDate;
+
+/**
+ * 涓嶅悎鏍煎鐞嗚〃
+ * @TableName ins_unqualified_handler
+ */
+@TableName(value ="ins_unqualified_handler")
+@Data
+public class InsUnqualifiedHandler implements Serializable {
+    /**
+     * 涓婚敭id
+     */
+    @ApiModelProperty(value = "涓婚敭id")
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 缂栧彿
+     */
+    @ApiModelProperty(value = "缂栧彿")
+    private String no;
+
+    /**
+     * 鏍囬
+     */
+    @ApiModelProperty(value = "鏍囬")
+    private String headline;
+
+    /**
+     * 鐗╂枡鍚嶇О
+     */
+    @ApiModelProperty(value = "鐗╂枡鍚嶇О")
+    private String materialName;
+
+    /**
+     * 鐢熶骇鎵规
+     */
+    @ApiModelProperty(value = "鐢熶骇鎵规")
+    private String productionBatch;
+
+    /**
+     * 鍒拌揣鏁伴噺
+     */
+    @ApiModelProperty(value = "鍒拌揣鏁伴噺")
+    private String cargoQuantity;
+
+    /**
+     * 瑙勬牸鍨嬪彿
+     */
+    @ApiModelProperty(value = "瑙勬牸鍨嬪彿")
+    private String specsModels;
+
+    /**
+     * 鎶ユ鏃ユ湡
+     */
+    @ApiModelProperty(value = "鎶ユ鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate inspectTime;
+
+    /**
+     * 鍙嶉浜�
+     */
+    @ApiModelProperty(value = "鍙嶉浜�")
+    private String feedbackUser;
+
+    /**
+     * 鍙嶉鏃ユ湡
+     */
+    @ApiModelProperty(value = "鍙嶉鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    private LocalDate feedbackTime;
+
+    /**
+     * 鍒嗙被
+     */
+    @ApiModelProperty(value = "")
+    private String classification;
+
+    /**
+     * 涓嶅悎鏍煎綊灞�
+     */
+    @ApiModelProperty(value = "涓嶅悎鏍煎綊灞�")
+    private String offGradeAscription;
+
+    /**
+     * 涓嶅悎鏍兼弿杩�
+     */
+    @ApiModelProperty(value = "涓嶅悎鏍兼弿杩�")
+    private String unqualifiedDesc;
+
+    /**
+     * 鍘熸潗鏂欐楠宨d
+     */
+    @ApiModelProperty(value = "鍘熸潗鏂欐楠宨d")
+    private Integer inventoryQuantityId;
+
+    /**
+     * 鍘熸潗鏂欐楠宨d
+     */
+    @ApiModelProperty(value = "璁㈠崟id")
+    private Integer insOrderId;
+
+    /**
+     * oa宸ヤ綔娴乮d
+     */
+    @ApiModelProperty(value = "oa宸ヤ綔娴乮d")
+    private Integer requestId;
+
+    /**
+     * oa瀹℃牳鐘舵��(1:寰呭鏍� 2:瀹℃牳涓� 3:閫氳繃 4:椹冲洖)
+     */
+    @ApiModelProperty(value = "oa瀹℃牳鐘舵��")
+    private Integer oaState;
+
+    /**
+     * oa闄勪欢url鍦板潃
+     */
+    @ApiModelProperty("oa闄勪欢url鍦板潃")
+    private String fileUrl;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandlerFile.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandlerFile.java
new file mode 100644
index 0000000..326ddb9
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedHandlerFile.java
@@ -0,0 +1,79 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 涓嶅悎鏍煎鐞嗛檮浠惰褰曡〃
+ * @TableName ins_unqualified_handler_file
+ */
+@TableName(value ="ins_unqualified_handler_file")
+@Data
+public class InsUnqualifiedHandlerFile implements Serializable {
+    /**
+     * 涓婚敭id
+     */
+    @ApiModelProperty(value = "涓婚敭id")
+    @TableId(type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 涓嶅悎鏍煎鐞唅d
+     */
+    @ApiModelProperty(value = "涓嶅悎鏍煎鐞唅d")
+    private Long unqualifiedId;
+
+    /**
+     * 鏂囦欢绫诲瀷(1:鍥剧墖 2:鏂囦欢)
+     */
+    @ApiModelProperty(value = "鏂囦欢绫诲瀷(1:鍥剧墖 2:鏂囦欢)")
+    private Integer type;
+
+    /**
+     * 鏂囦欢涓婁紶璺緞
+     */
+    @ApiModelProperty(value = "鏂囦欢涓婁紶璺緞")
+    private String fileUrl;
+
+    /**
+     * 鏂囦欢鍚嶇О
+     */
+    @ApiModelProperty(value = "鏂囦欢鍚嶇О")
+    private String fileName;
+
+    /**
+     * 鍒涘缓浜�
+     */
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    @TableField(fill= FieldFill.INSERT)
+    private Integer createUser;
+
+    /**
+     * 鍒涘缓鏃堕棿
+     */
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill= FieldFill.INSERT)
+    private LocalDateTime createTime;
+
+    /**
+     * 鏇存柊浜�
+     */
+    @ApiModelProperty(value = "鏇存柊浜�")
+    @TableField(fill= FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    /**
+     * 鏇存柊鏃堕棿
+     */
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    @TableField(fill= FieldFill.INSERT_UPDATE)
+    private LocalDateTime updateTime;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestResult.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestResult.java
new file mode 100644
index 0000000..7fce98b
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/InsUnqualifiedRetestResult.java
@@ -0,0 +1,51 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 涓嶅悎鏍煎娴嬫楠岄」鐩殑缁撴灉
+ *
+ * @author zhuo
+ * @since 2024-09-03
+ */
+@TableName(value = "ins_unqualified_retest_result")
+@Data
+public class InsUnqualifiedRetestResult implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+    //澶栭敭锛氫笉鍚堟牸妫�楠岄」鐩甶d
+    private Integer retestProductId;
+    //妫�楠屽��
+    private String insValue;
+    //璁$畻鍊�
+    private String comValue;
+    //璁惧缂栫爜
+    private String equipValue;
+    //璁惧鍚嶇О
+    private String equipName;
+
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty("鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty("淇敼鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarter.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarter.java
new file mode 100644
index 0000000..c5ed9df
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarter.java
@@ -0,0 +1,67 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 瀛e害鎶芥牱璁″垝
+ *
+ * @author zhuo
+ * @since 2024-10-09
+ */
+@TableName(value = "spot_check_quarter")
+@Data
+public class SpotCheckQuarter implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Integer quarterId;
+
+    @ApiModelProperty("缂栧彿")
+    private String quarterNo;
+
+    @ApiModelProperty("鎶ュ憡鐢熸垚鍦板潃")
+    private String fileUrl;
+
+    @ApiModelProperty("瀛e害瀹屾垚鐘舵��")
+    private Integer quarterStatus;
+
+    @ApiModelProperty("澶囨敞")
+    private String remark;
+
+    @ApiModelProperty("缂栧埗浜�")
+    private Integer writeUser;
+
+    @ApiModelProperty("浼氱浜�")
+    private String countersignUser;
+
+    @ApiModelProperty("瀹℃牳浜�")
+    private Integer examineUser;
+
+    @ApiModelProperty("鎵瑰噯浜�")
+    private Integer ratifyUser;
+
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarterItem.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarterItem.java
new file mode 100644
index 0000000..bba9e4a
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckQuarterItem.java
@@ -0,0 +1,69 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 瀛e害鎶芥牱璁″垝璇︽儏琛�
+ *
+ * @author makejava
+ * @since 2024-10-09
+ */
+@TableName(value ="spot_check_quarter_item")
+@Data
+public class SpotCheckQuarterItem {
+
+    @TableId(type = IdType.AUTO)
+    private Integer quarterItemId;
+
+    @ApiModelProperty("涓昏〃id")
+    private Integer quarterId;
+
+    @ApiModelProperty("浜у搧绫诲瀷")
+    private String productType;
+
+    @ApiModelProperty("浜у搧鍨嬪彿")
+    private String productModel;
+
+    @ApiModelProperty("璐d换浜�")
+    private String dutyUser;
+
+    @ApiModelProperty("鎶芥牱鏁伴噺")
+    private String spotCheckNumber;
+
+    @ApiModelProperty("鎶芥牱鏃堕棿")
+    private String spotCheckTime;
+
+    @ApiModelProperty("璇曟牱缁撹")
+    private String result;
+
+    @ApiModelProperty("鍙栨牱浜哄憳")
+    private String samplingUser;
+
+    @ApiModelProperty("澶囨敞")
+    private String itemRemark;
+
+    @ApiModelProperty(value = "鍒涘缓浜篿d")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYear.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYear.java
new file mode 100644
index 0000000..8e535cb
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYear.java
@@ -0,0 +1,67 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+
+/**
+ * 骞村害鎶芥牱璁″垝
+ *
+ * @author zhuo
+ * @since 2024-10-10
+ */
+@TableName(value ="spot_check_year")
+@Data
+public class SpotCheckYear implements Serializable {
+
+    @TableId(type = IdType.AUTO)
+    private Integer yearId;
+
+    @ApiModelProperty("鍚嶇О")
+    private String yearHead;
+
+    @ApiModelProperty("鎶ュ憡鐢熸垚鍦板潃")
+    private String fileUrl;
+
+    @ApiModelProperty("琛ㄦ牸鍐呭娉�")
+    private String tableRemark;
+
+    @ApiModelProperty("澶囨敞")
+    private String remark;
+
+    @ApiModelProperty("缂栧埗浜�")
+    private Integer writeUser;
+
+    @ApiModelProperty("浼氱浜�")
+    private String countersignUser;
+
+    @ApiModelProperty("鎵瑰噯浜�")
+    private Integer examineUser;
+
+    @ApiModelProperty("鎵瑰噯浜�")
+    private Integer ratifyUser;
+
+    @ApiModelProperty(value = "鍒涘缓浜�")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYearItem.java b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYearItem.java
new file mode 100644
index 0000000..ca05992
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/pojo/SpotCheckYearItem.java
@@ -0,0 +1,84 @@
+package com.ruoyi.inspect.pojo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * 骞村害鎶芥牱璁″垝璇︽儏琛�
+ *
+ * @author zhuo
+ * @since 2024-10-10
+ */
+@TableName(value = "spot_check_year_item")
+@Data
+public class SpotCheckYearItem {
+
+    @TableId(type = IdType.AUTO)
+    private Integer yearItemId;
+    //涓昏〃id
+    @ApiModelProperty("涓昏〃id")
+    private Integer yearId;
+
+    @ApiModelProperty("绫诲埆")
+    private String yearType;
+
+    @ApiModelProperty("涓�鏈�")
+    private String january;
+
+    @ApiModelProperty("浜屾湀")
+    private String february;
+
+    @ApiModelProperty("涓夋湀")
+    private String march;
+
+    @ApiModelProperty("鍥涙湀")
+    private String april;
+
+    @ApiModelProperty("浜旀湀")
+    private String may;
+
+    @ApiModelProperty("鍏湀")
+    private String june;
+
+    @ApiModelProperty("涓冩湀")
+    private String july;
+
+    @ApiModelProperty("鍏湀")
+    private String august;
+
+    @ApiModelProperty("涔濇湀")
+    private String september;
+
+    @ApiModelProperty("鍗佹湀")
+    private String october;
+
+    @ApiModelProperty("鍗佷竴鏈�")
+    private String november;
+
+    @ApiModelProperty("鍗佷簩鏈�")
+    private String december;
+
+    @ApiModelProperty(value = "鍒涘缓浜篿d")
+    @TableField(fill = FieldFill.INSERT)
+    private Integer createUser;
+
+    @ApiModelProperty(value = "淇敼浜篿d")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    private Integer updateUser;
+
+    @ApiModelProperty(value = "鍒涘缓鏃堕棿")
+    @TableField(fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime createTime;
+
+    @ApiModelProperty(value = "鏇存柊鏃堕棿")
+    @TableField(fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime updateTime;
+
+}
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java
index 07dd05d..ea5ac0a 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsOrderService.java
@@ -3,9 +3,11 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.basic.pojo.StandardProductList;
 import com.ruoyi.inspect.pojo.InsOrder;
 import com.ruoyi.inspect.pojo.InsUnqualifiedRetestProduct;
 import com.ruoyi.inspect.dto.*;
+import com.ruoyi.inspect.vo.InsOrderPrintingVo;
 
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletResponse;
@@ -21,7 +23,7 @@
 public interface InsOrderService extends IService<InsOrder> {
 
     //鑾峰彇鍗曚綅妫�楠屼笅鍗曟暟鎹�
-    Map<String, Object> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto);
+    IPage<SampleOrderDto> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto);
 
 
     //淇敼妫�楠屼笅鍗曟暟鎹�
@@ -35,9 +37,9 @@
 
     Map<String, Object> getInsOrderAndSample(Integer id, String laboratory);
 
-    Map<String, Object> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto);
+    IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto);
 
-    Map<String, Object> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto);
+    IPage<CostStatisticsDto> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto);
 
     Map<String, Object> costStatistics2(CostStatisticsDto costStatisticsDto);
 
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java
new file mode 100644
index 0000000..f1e6f22
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsProductService.java
@@ -0,0 +1,51 @@
+package com.ruoyi.inspect.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.inspect.dto.InsProductBindingDto;
+import com.ruoyi.inspect.pojo.InsOrder;
+import com.ruoyi.inspect.pojo.InsProduct;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_product(妫�楠岄」鐩�)銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2024-03-17 23:57:39
+*/
+public interface InsProductService extends IService<InsProduct> {
+
+    int selectOrderManDay(Integer orderId);
+
+    int updateInspected(Integer id,String ids);
+
+    boolean write(InsOrder insOrder);
+
+    Map<String,Object> selectNoProducts(Page page, InsProduct insProduct,Integer orderId,String ids);
+
+    void checkUpdate(Integer orderId,Integer state);
+
+
+    /**
+     * 鏍规嵁妫�楠岄」id鏌ヨ妫�楠岄」鏍戜俊鎭�
+     * @param productId
+     * @return
+     */
+    List<InsProduct> getProductTreeByProductId(Integer productId);
+
+
+    /**
+     * 鐗规畩妫�楠岄」缁戝畾
+     * @param insProductBindingDto
+     * @return
+     */
+    boolean bindingProductTreeByProductId(InsProductBindingDto insProductBindingDto);
+
+    /**
+     * 鍒犻櫎鐗规畩妫�楠岄」缁戝畾淇℃伅
+     * @param productId
+     * @return
+     */
+    boolean removeBindingProductTree(Integer productId);
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/InsReportService.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsReportService.java
new file mode 100644
index 0000000..c082507
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsReportService.java
@@ -0,0 +1,61 @@
+package com.ruoyi.inspect.service;
+
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.basic.pojo.IfsInventoryQuantity;
+import com.ruoyi.inspect.dto.ReportPageDto;
+import com.ruoyi.inspect.pojo.InsOrder;
+import com.ruoyi.inspect.pojo.InsReport;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.io.IOException;
+import java.util.Map;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_report(妫�楠屾姤鍛�)銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2024-03-17 22:10:02
+*/
+public interface InsReportService extends IService<InsReport> {
+
+    Map<String,Object> pageInsReport(Page page, ReportPageDto reportPageDto);
+
+    void wordToPdf(String path,String sealUrl, boolean isRawMater);
+
+    int inReport(String url, Integer id);
+
+    int upReportUrl(Integer id);
+
+    //鎻愪氦
+    int writeReport(Integer id, Integer userId, Integer submitUserId);
+
+    //瀹℃牳
+    int examineReport(Integer id, Integer isExamine, String examineTell, Integer userId);
+
+    //鎵瑰噯
+    int ratifyReport(Integer id, Integer isRatify, String ratifyTell);
+
+    int wordInsertUrl(Map<String, Object> map, String url);
+
+    String downAll(String ids);
+
+    int upAll(MultipartFile file) throws IOException;
+
+    void isRawMaterial(InsOrder insOrder);
+
+    Long getUnqualifiedCount(InsOrder insOrder);
+
+    /**
+     * 绉诲簱鎿嶄綔
+     * @param one
+     * @return
+     */
+    String moveRawMaterial(IfsInventoryQuantity one);
+
+    /**
+     * 閫�鍥炲埌妫�楠屼换鍔�
+     * @param id
+     * @return
+     */
+    boolean sendBackTask(Integer id);
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/InsSampleService.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsSampleService.java
new file mode 100644
index 0000000..b87df95
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/InsSampleService.java
@@ -0,0 +1,13 @@
+package com.ruoyi.inspect.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.inspect.pojo.InsSample;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_sample(妫�楠屾牱鍝�)銆戠殑鏁版嵁搴撴搷浣淪ervice
+* @createDate 2024-03-14 17:14:57
+*/
+public interface InsSampleService extends IService<InsSample> {
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java
index 9881b40..6869015 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/RawMaterialOrderService.java
@@ -28,7 +28,7 @@
      * @param ifsInventoryQuantity
      * @return
      */
-    Map<String,Object> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity);
+    IPage<IfsInventoryQuantity> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity);
 
     /**
      * 鏌ヨ妫�楠屽��
@@ -36,7 +36,7 @@
      * @param ifsInventoryQuantityDto
      * @return
      */
-    Map<String,Object> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto);
+    IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto);
 
     int inspectionReport(List<Integer> ids);
 
@@ -63,7 +63,7 @@
      */
     int addExemptionOrder(List<SampleProductDto> list, InsOrder insOrder);
 
-    Map<String,Object> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity);
+    IPage<IfsInventoryQuantityCheckDto> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity);
 
     /**
      * 鏌ヨ宸叉楠�
@@ -71,7 +71,7 @@
      * @param ifsInventoryQuantityDto
      * @return
      */
-    Map<String,Object>  getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
+    IPage<IfsInventoryQuantitySupplierDto>  getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
 
     int delIfsInventory(Integer id);
 
@@ -138,7 +138,7 @@
      * @param ifsInventoryQuantityDto
      * @return
      */
-    Map<String,Object> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
+    IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto);
 
     /**
      * advancedGodown
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
new file mode 100644
index 0000000..f70a18d
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderServiceImpl.java
@@ -0,0 +1,1050 @@
+//package com.ruoyi.inspect.service.impl;
+//
+//import cn.hutool.core.collection.CollUtil;
+//import cn.hutool.core.util.ObjectUtil;
+//import cn.hutool.core.util.StrUtil;
+//import cn.hutool.json.JSONUtil;
+//import com.alibaba.excel.EasyExcel;
+//import com.alibaba.excel.ExcelWriter;
+//import com.alibaba.excel.write.metadata.WriteSheet;
+//import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+//import com.alibaba.excel.write.style.column.SimpleColumnWidthStyleStrategy;
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+//import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+//import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
+//import com.ruoyi.basic.mapper.StandardProductListMapper;
+//import com.ruoyi.basic.pojo.IfsInventoryQuantity;
+//import com.ruoyi.basic.pojo.StandardProductList;
+//import com.ruoyi.basic.pojo.StructureTestObject;
+//import com.ruoyi.common.constant.InsOrderTypeConstants;
+//import com.ruoyi.common.core.domain.entity.User;
+//import com.ruoyi.common.numgen.NumberGenerator;
+//import com.ruoyi.common.utils.*;
+//import com.ruoyi.framework.exception.ErrorException;
+//import com.ruoyi.inspect.dto.*;
+//import com.ruoyi.inspect.mapper.*;
+//import com.ruoyi.inspect.pojo.*;
+//import com.ruoyi.inspect.service.InsOrderService;
+//import com.ruoyi.inspect.service.InsProductService;
+//import com.ruoyi.inspect.service.InsSampleService;
+//import com.ruoyi.inspect.vo.InsOrderPrintingVo;
+//import com.ruoyi.inspect.vo.SampleDefectsFatherVo;
+//import com.ruoyi.system.mapper.CustomMapper;
+//import com.ruoyi.system.mapper.UserMapper;
+//import lombok.AllArgsConstructor;
+//import org.apache.commons.lang3.StringUtils;
+//import org.springframework.beans.BeanUtils;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
+//import java.math.BigDecimal;
+//import java.net.URLEncoder;
+//import java.time.LocalDate;
+//import java.time.LocalDateTime;
+//import java.time.Month;
+//import java.time.format.DateTimeFormatter;
+//import java.util.*;
+//import java.util.concurrent.atomic.AtomicInteger;
+//import java.util.stream.Collectors;
+//
+///**
+// * @author gaoaoy
+// * @description 閽堝琛ㄣ�恑ns_order(妫�楠屼笅鍗�)銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+// * @createDate 2024-03-12 16:17:55
+// */
+//@Service
+//@AllArgsConstructor
+//public class InsOrderServiceImpl extends ServiceImpl<InsOrderMapper, InsOrder>
+//        implements InsOrderService {
+//
+//    private InsOrderMapper insOrderMapper;
+//    private InsSampleService insSampleService;
+//    private InsSampleMapper insSampleMapper;
+//    private InsProductService insProductService;
+//    private InsProductMapper insProductMapper;
+//    private InsProductUserMapper insProductUserMapper;
+//    private InsSampleUserMapper insSampleUserMapper;
+//    private InsOrderStateMapper insOrderStateMapper;
+//    private UserMapper userMapper;
+//    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
+//    private CustomMapper customMapper;
+//    private final NumberGenerator<InsOrder> numberGenerator;
+//    private InsReportMapper insReportMapper;
+//    private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper;
+//    private IfsApiUtils ifsApiUtils;
+//    private SpotCheckQuarterItemMapper spotCheckQuarterItemMapper;
+//    private StandardProductListMapper standardProductListMapper;
+//
+//
+//
+//    //鑾峰彇妫�楠屼笅鍗曟暟鎹�
+//    @Override
+//    public IPage<SampleOrderDto> selectInsOrderParameter(IPage<InsOrder> page, SampleOrderDto sampleOrderDto) {
+//        //todo: 鍙湅鎴戝垽鏂叏閮�,涓汉,缁勭粐鐨勬潈闄�
+//        String laboratory = null;
+//        // 鍒ゆ柇鏄惁鏄叏閮�
+//        String isOrderAll = null;
+//        if (sampleOrderDto.getState() != null && sampleOrderDto.getState() == -2) {
+//            isOrderAll = "1";
+//            sampleOrderDto.setState(null);
+//        }
+//        IPage<SampleOrderDto> sampleOrderDtoIPage = insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), laboratory, isOrderAll);
+//        return insOrderMapper.selectInsOrderPage(page, QueryWrappers.queryWrappers(sampleOrderDto), laboratory, isOrderAll);
+//    }
+//
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int upInsOrder(Integer orderId, Integer sampleId, String appointed, Integer userId, String sonLaboratory) {
+//        InsOrder insOrder = new InsOrder();
+//        insOrder.setId(orderId);
+//        insOrder.setAppointed(StringUtils.isNotEmpty(appointed) ? LocalDate.parse(appointed) : null);
+//        insOrder.setSendTime(LocalDateTime.now());
+//        insOrderMapper.updateById(insOrder);
+//        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery().eq(InsSample::getInsOrderId, orderId).select(InsSample::getId));
+//        List<Integer> ids = insSamples.stream().map(a -> a.getId()).collect(Collectors.toList());
+//        List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
+//                .in(InsProduct::getInsSampleId, ids)
+//                .eq(InsProduct::getState, 1)
+//                .select(InsProduct::getSonLaboratory).groupBy(InsProduct::getSonLaboratory));
+//        for (InsProduct insProduct : insProducts) {
+//            InsOrderState insOrderState = new InsOrderState();
+//            insOrderState.setInsOrderId(orderId);
+//            try {
+//                insOrderState.setLaboratory(insProduct.getSonLaboratory());
+//            } catch (NullPointerException e) {
+//                throw new ErrorException("璇ユ楠屽崟鏈夋湭缁存姢瀹為獙瀹ょ殑妫�楠岄」鐩�");
+//            }
+//            insOrderState.setInsState(0);
+//            insOrderStateMapper.insert(insOrderState);
+//        }
+//        if (userId != null) {
+//            InsSampleUser insSampleUser = new InsSampleUser();
+//            insSampleUser.setState(0);
+//            insSampleUser.setUserId(userId);
+//            insSampleUser.setInsSampleId(orderId);
+//            insSampleUser.setSonLaboratory(sonLaboratory);
+//            insSampleUserMapper.insert(insSampleUser);
+//        }
+//
+//        // 鍒ゆ柇璁㈠崟鏈夋病鏈夌粦瀹氭娊鏍疯鍒�
+//        InsOrder order = insOrderMapper.selectById(orderId);
+//        if (order.getQuarterItemId() != null) {
+//           // 闇�瑕佹坊鍔犱笅鍙戞椂闂村埌鎶芥牱鏃堕棿, 鍙栨牱浜哄憳灏辨槸妫�娴嬩汉
+//            SpotCheckQuarterItem spotCheckQuarterItem = spotCheckQuarterItemMapper.selectById(order.getQuarterItemId());
+//            spotCheckQuarterItem.setSpotCheckTime(order.getSendTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")));
+//            User user = userMapper.selectById(userId);
+//            spotCheckQuarterItem.setSamplingUser(user.getName());
+//            spotCheckQuarterItemMapper.updateById(spotCheckQuarterItem);
+//        }
+//        return 1;
+//    }
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int addInsOrder(List<SampleProductDto> list, InsOrder insOrder, List<List<Integer>> pairing) {
+//        // todo: 涓嬪崟鍒ゆ柇鎶芥牱璁″垝鐨勫敮涓�鎬�
+//        if (insOrder.getQuarterItemId() != null) {
+//            Long quarterItemCount = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
+//                    .eq(InsOrder::getQuarterItemId, insOrder.getQuarterItemId())
+//                    .notIn(InsOrder::getState, -1 ,2 ,3));
+//            if (quarterItemCount > 0) {
+//                throw new ErrorException("璇ユ娊鏍疯鍒掑凡琚粦瀹氳繃");
+//            }
+//        }
+//
+//        insOrder.setState(0);
+//
+//        LocalDate appointed = insOrder.getAppointed();
+//
+//        insOrderMapper.insert(insOrder); // 涓昏〃
+//
+//        list.forEach(a -> {
+//            a.setId(null);
+//            a.setInsOrderId(insOrder.getId());
+//            insSampleMapper.insert(a);
+//            if (ObjectUtil.isNotEmpty(a.getInsProduct())) {
+//                // 鍒ゆ柇鏄惁濉啓寰呮椤规暟閲�
+//                if (a.getQuantity() != null) {
+//                    List<InsProduct> ip2 = new ArrayList<>();
+//                    for (Integer i = 1; i <= a.getQuantity(); i++) {
+//                        // 閲嶆柊鎷疯礉 鍒涘缓鏂板璞�
+//                        AtomicInteger atomicInteger = new AtomicInteger(i);
+//                        List<InsProduct> insProducts = a.getInsProduct().stream().map(insProduct -> {
+//                            insProduct.setRawMaterialTag(String.valueOf(atomicInteger.get()));
+//                            InsProduct product = new InsProduct();
+//                            BeanUtils.copyProperties(insProduct, product);
+//                            return product;
+//                        }).collect(Collectors.toList());
+//
+//                        ip2.addAll(insProducts);
+//                    }
+//                    addInsProductMethod(a.getId(), ip2);
+//                } else {
+//                    addInsProductMethod(a.getId(), a.getInsProduct());
+//                }
+//            }
+//            // 鍒ゆ柇鏄惁鏈夌數缂嗛厤缃�
+//            if (ObjectUtil.isNotEmpty(a.getInsulating())) {
+//                // 鍒ゆ柇鏄惁鏈夎緟鍔╃嚎鑺�
+//                if (ObjectUtil.isNotEmpty(a.getAuxiliaryWireCore())) {
+//                    if (a.getAuxiliaryWireCore().getInsProduct().stream().filter(insProduct -> insProduct.getState() == 1).count() !=
+//                            a.getInsulating().getInsProduct().stream().filter(insProduct -> insProduct.getState() == 1).count()) {
+//                        throw new ErrorException("鐢电紗閰嶇疆杈呭姪绾胯姱妫�楠岄」鏁伴噺涓嶇粺涓�, 璇锋鏌�");
+//                    }
+//                }
+//                List<InsProduct> ip2 = new ArrayList<>();
+//                for (String s : a.getInsulating().getNum()) {
+//                    // 閲嶆柊鎷疯礉 鍒涘缓鏂板璞�
+//                    List<InsProduct> insProducts = a.getInsulating().getInsProduct().stream().map(insProduct -> {
+//                        insProduct.setCableTag(s);
+//                        InsProduct product = new InsProduct();
+//                        BeanUtils.copyProperties(insProduct, product);
+//                        return product;
+//                    }).collect(Collectors.toList());
+//                    ip2.addAll(insProducts);
+//                }
+//                for (InsProduct product : ip2) {
+//                    product.setStandardMethodListId(a.getInsulating().getStandardMethodListId());
+//                }
+//                addInsProductMethod(a.getId(), ip2);
+//            }
+//            // 鍒ゆ柇鏄惁鏈夎緟鍔╃嚎鑺�
+//            if (ObjectUtil.isNotEmpty(a.getAuxiliaryWireCore())) {
+//                List<InsProduct> ip2 = new ArrayList<>();
+//                for (String s : a.getAuxiliaryWireCore().getNum()) {
+//                    // 閲嶆柊鎷疯礉 鍒涘缓鏂板璞�
+//                    List<InsProduct> insProducts = a.getAuxiliaryWireCore().getInsProduct().stream().map(insProduct -> {
+//                        insProduct.setCableTag(s);
+//                        InsProduct product = new InsProduct();
+//                        BeanUtils.copyProperties(insProduct, product);
+//                        return product;
+//                    }).collect(Collectors.toList());
+//                    ip2.addAll(insProducts);
+//                }
+//                for (InsProduct product : ip2) {
+//                    product.setStandardMethodListId(a.getAuxiliaryWireCore().getStandardMethodListId());
+//                }
+//                addInsProductMethod(a.getId(), ip2);
+//            }
+//            // 瀛愭牱鍝侀厤缃�
+//            if (ObjectUtil.isNotEmpty(a.getChildSampleList())) {
+//                for (SampleProductDto b : a.getChildSampleList()) {
+//                    for (int i = 0; i < b.getNum(); i++) {
+//                        b.setId(null);
+//                        b.setInsOrderId(insOrder.getId());
+//                        b.setParentId(a.getId());
+//                        insSampleMapper.insert(b);
+//                        if (ObjectUtil.isNotEmpty(b.getInsProduct())) {
+//                            addInsProductMethod(b.getId(), b.getInsProduct());
+//                        }
+//                    }
+//                }
+//            }
+//        });
+//        //鏄惁涓哄師鏉愭枡涓嬪崟
+//        if (insOrder.getTypeSource() != null && insOrder.getTypeSource().equals(1)) {
+//            // 鍘熸潗鏂欎笅鍗�: 濮旀墭浜哄氨鏄姤妫�浜�, 鐢熶骇鍗曚綅灏辨槸渚涘簲鍟嗗崟浣�
+//            IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
+//            Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
+//            User user = userMapper.selectById(declareUserId);
+//            if (user == null) {
+//               throw new ErrorException("缂哄皯鎶ユ浜轰俊鎭�");
+//            }
+//            // 渚涘簲鍟嗗悕绉�
+//            insOrder.setProduction(ifsInventoryQuantity.getSupplierName());
+//            insOrder.setProductionEn("");
+//            // 濮旀墭浜哄悕绉�
+//            insOrder.setPrepareUserId(user.getId());
+//            insOrder.setPrepareUser(user.getName());
+//            insOrder.setPrepareUserEn(user.getNameEn());
+//            insOrder.setPhone(user.getPhone());
+//            insOrder.setState(1);
+//            Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
+//                    .eq(InsOrder::getIfsInventoryId, insOrder.getIfsInventoryId())
+//                    .ne(InsOrder::getState, -1)
+//                    .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY)
+//                    .ne(InsOrder::getId, insOrder.getId()));
+//            // 鍒ゆ柇涔嬪墠鏄惁鏈夎繘鍘傛楠�
+//            if (count1 == 0) {
+//                ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>().set(IfsInventoryQuantity::getState, 1)
+//                        .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
+//            }
+//
+//            // 鍒ゆ柇缁撴潫鐘舵�佷慨鏀瑰悎鏍肩姸鎬�
+//            if (ifsInventoryQuantity.getIsFinish().equals(0)) {
+//                ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                        .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())
+//                        .set(IfsInventoryQuantity::getInspectStatus, 0));
+//            }
+//
+//            upInsOrderOfState(insOrder);
+//            upInsOrder(insOrder.getId(), null, appointed != null ? appointed.toString() : null, SecurityUtils.getUserId().intValue(), "鍘熸潗鏂�");
+//
+//
+//            // 鏍规嵁闆朵欢鍙峰垽鏂槸鍚︽槸杈呮潗
+//            boolean isRaw = false;
+//            StructureTestObject productObject = insOrderMapper.selectProductByPartNo(ifsInventoryQuantity.getPartNo());
+//            // 鏌ヨ浜у搧
+//            if (productObject != null && StrUtil.isNotBlank(productObject.getObjectType()) && productObject.getObjectType().equals("1")) {
+//                isRaw = true;
+//            } else {
+//            // 鏌ヨ瀵硅薄
+//                StructureTestObject testObject = insOrderMapper.selectByPartNo(ifsInventoryQuantity.getPartNo());
+//                if (testObject != null && StrUtil.isNotBlank(testObject.getObjectType()) && testObject.getObjectType().equals("1")) {
+//                    isRaw = true;
+//                }
+//            }
+//
+//            if (isRaw) {
+//                // 鑾峰彇褰撳墠瀛e害鐨勫紑濮嬫椂闂村拰缁撴潫鏃堕棿
+//                LocalDateTime now = LocalDateTime.now();
+//                // 鑾峰彇褰撳墠鏈堜唤
+//                int month = now.getMonthValue();
+//                // 纭畾褰撳墠瀛e害鐨勫紑濮嬫湀浠�
+//                int startMonth = (month - 1) / 3 * 3 + 1;
+//                // 鏋勯�犲搴︾殑寮�濮嬫椂闂�
+//                LocalDateTime startOfQuarter = LocalDateTime.of(now.getYear(), Month.of(startMonth), 1, 0, 0);
+//                // 璁$畻涓嬩竴涓搴︾殑寮�濮嬫椂闂�
+//                LocalDateTime startOfNextQuarter = startOfQuarter.plusMonths(3);
+//                // 璁$畻褰撳墠瀛e害鐨勭粨鏉熸椂闂�
+//                LocalDateTime endOfQuarter = startOfNextQuarter.minusSeconds(1);
+//
+//                // 鏍规嵁涓嬪崟鐨勮鏍煎瀷鍙峰垽鏂槸鍚︿负瀛e害棣栨鍑虹幇
+//                Integer count = ifsInventoryQuantityMapper.selectIsFirst(insOrder.getPartDetail(),
+//                        ifsInventoryQuantity.getSupplierName(),
+//                        startOfNextQuarter,
+//                        endOfQuarter);
+//
+//                if(count == 0) {
+//                    ifsInventoryQuantity.setIsFirst(1);
+//                    ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                            .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())
+//                            .set(IfsInventoryQuantity::getIsFirst, 1));
+//                }
+//            }
+//        }
+//        return insOrder.getId();
+//    }
+//
+//    /**
+//     * 娣诲姞妫�楠岄」
+//     * @param sampleId
+//     * @param productList
+//     */
+//    private void addInsProductMethod(Integer sampleId, List<InsProduct> productList) {
+//        for (InsProduct product : productList) {
+//            if (product.getState() == 1) {
+//                product.setId(null);
+//                product.setCreateTime(null);
+//                product.setCreateUser(null);
+//                product.setUpdateTime(null);
+//                product.setUpdateUser(null);
+//                product.setInsSampleId(sampleId);
+//                if (product.getInspectionItemSubclass() == null) {
+//                    product.setInspectionItemSubclass("");
+//                }
+//                if (StringUtils.isBlank(product.getAsk()) || StringUtils.isBlank(product.getTell())) {
+//                    throw new ErrorException("鏈夋楠岄」鐨勮姹傚�兼垨瑕佹眰鎻忚堪涓虹┖, 璇峰厛鍘绘爣鍑嗗簱閰嶇疆瑕佹眰鍊兼垨瑕佹眰鎻忚堪");
+//                }
+//                insProductMapper.insert(product);
+//            }
+//        }
+//    }
+//
+//
+//    @Override
+//    public Map<String, Object> getInsOrder(Integer id) {
+//        Map<String, Object> map = new HashMap<>();
+//        InsOrder insOrder = insOrderMapper.selectById(id);
+//        List<SampleProductDto> list;
+//        // 鍒ゆ柇鏄惁鏄繘鍘傛姤鍛婂厤妫�
+//        if (insOrder.getIsExemption().equals(1)) {
+//            list = insSampleMapper.selectExemptionByOrderId(id);
+//        } else {
+//            list = insSampleMapper.selectSampleProductListByOrderId2(id);
+//        }
+//        Map<String, Object> map1 = insSampleMapper.selectInsOrder(id);
+//        map.put("insOrder", insOrder);
+//        map.put("sampleProduct", list);
+//        map.put("insOrderTemplate", map1);
+//        return map;
+//    }
+//
+//    @Override
+//    public int upInsOrderOfState(InsOrder insOrder) {
+//        insOrder.setExamineTime(LocalDateTime.now());
+//        if (insOrder.getState() == 1) {
+//            //瀹℃牳閫氳繃鎵嶄細鐢熸垚濮旀墭缂栧彿
+//            // todo: 妫�楠岀被鍨嬬紪鍙�
+//            InsOrder order = this.getById(insOrder.getId());
+//            String code = "";
+//            switch (order.getOrderType()) {
+//                case InsOrderTypeConstants.SPOT_CHECK:
+//                    code = "C";
+//                    break;
+//                case InsOrderTypeConstants.CUSTOMER_ORDERED:
+//                    code = "W";
+//                    break;
+//                case InsOrderTypeConstants.ENTER_THE_FACTORY:
+//                case InsOrderTypeConstants.QUARTERLY_TEST:
+//                    code = "Y";
+//                    break;
+//            }
+//            // 鐢熸垚缂栧彿
+//            String no = numberGenerator.generateNumberWithPrefix(3,
+//                    "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
+//                    InsOrder::getEntrustCode);
+//            // 鍒ゆ柇鏄惁鏄搴︽楠�, 鏄搴︽楠屽彇娑堝師鏉愭枡瀛e害妫�楠屼笅鍗�
+//            if (InsOrderTypeConstants.QUARTERLY_TEST.equals(order.getOrderType())) {
+//                ifsInventoryQuantityMapper.update(null,  Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                        .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId())
+//                        .set(IfsInventoryQuantity::getIsQuarter, 0));
+//
+//                // 鏌ヨ鏄惁鏈夎繃杩涘巶妫�楠�, 鏈夎幏鍙栭噷闈㈢殑缂栧彿
+//                InsOrder order1 = insOrderMapper.selectOne(Wrappers.<InsOrder>lambdaQuery()
+//                        .eq(InsOrder::getIfsInventoryId, order.getIfsInventoryId())
+//                        .ne(InsOrder::getState, -1)
+//                        .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY));
+//                if (order1 != null) {
+//                  no = order1.getEntrustCode();
+//                }
+//            }
+//
+//            int count = 1;
+//            // 鏌ヨ鏍峰搧琛�
+//            List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery()
+//                    .eq(InsSample::getInsOrderId, insOrder.getId()));
+//            for (InsSample insSample : insSamples) {
+//                if (StringUtils.isBlank(insSample.getSampleCode())) {
+//                    // 濡傛灉鍙湁涓�涓牱鍝佸氨涓嶉渶瑕佹嫾鎺ユ暟瀛�
+//                    if (insSamples.size() != 1) {
+//                        insSample.setSampleCode(no + "-" + count);
+//                        count++;
+//                    } else {
+//                        insSample.setSampleCode(no);
+//                    }
+//                }
+//            }
+//            insSampleService.updateBatchById(insSamples);
+//
+//            insOrder.setEntrustCode(no);
+//        }
+//        return insOrderMapper.updateById(insOrder);
+//    }
+//
+//    @Override
+//    public Map<String, Object> getInsOrderAndSample(Integer id, String laboratory) {
+//        Map<String, Object> map = new HashMap<>();
+//        InsOrder insOrder = insOrderMapper.selectById(id);
+//        List<SampleProductDto> list = insSampleMapper.getInsOrderAndSample(id, laboratory);
+//        for (SampleProductDto sampleProductDto : list) {
+//            List<Integer> ids = sampleProductDto.getInsProduct().stream().map(InsProduct::getId).collect(Collectors.toList());
+//            List<InsProductUser> insProductUsers = insProductUserMapper.selectList(Wrappers.<InsProductUser>lambdaQuery()
+//                    .in(InsProductUser::getInsProductId, ids));
+//            if (CollectionUtils.isNotEmpty(insProductUsers)) {
+//                List<Integer> userIds = insProductUsers.stream().map(InsProductUser::getCreateUser).distinct().collect(Collectors.toList());
+//                String collect = userMapper.selectBatchIds(userIds).stream().map(User::getName).collect(Collectors.joining(","));
+//                sampleProductDto.setCheckName(collect);
+//            }
+//        }
+//        map.put("insOrder", insOrder);
+//        map.put("sampleProduct", list);
+//        //鏌ヨ鎵�鏈夎褰曟ā鐗堝幓閲�
+//        List<Map<Integer, Object>> list2 = insOrderMapper.selectReportModelByOrderId(id, laboratory);
+//        map.put("reportModel", list2);
+//        return map;
+//    }
+//
+//    @Override
+//    public IPage<SampleProductDto2> selectSampleAndProductByOrderId(IPage<SampleProductDto2> page, SampleProductDto2 sampleProductDto) {
+//        IPage<SampleProductDto2> productDto2IPage = insOrderMapper.selectSampleAndProductByOrderId(page,
+//                QueryWrappers.queryWrappers(sampleProductDto)
+//                        .orderByAsc("sample_code")
+//                        .orderByAsc("cable_tag")
+//                        .orderByAsc("sort"),
+//                sampleProductDto.getId());
+//        return productDto2IPage;
+//    }
+//
+//    @Override
+//    public IPage<CostStatisticsDto> costStatistics(IPage<CostStatisticsDto> page, CostStatisticsDto costStatisticsDto) {
+//        String dates = costStatisticsDto.getDates();
+//        String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
+//        costStatisticsDto.setDates(null);
+//
+//        //todo:浠呯湅鑷繁
+//
+//        IPage<CostStatisticsDto> dtoIPage = insOrderMapper.selectCostStatistics(page, QueryWrappers.queryWrappers(costStatisticsDto).ge("create_time", split[0]).le("create_time", split[1] + " 23:59:59"));
+//        List<CostStatisticsDto> collect = dtoIPage.getRecords().stream().map(dto -> {
+//            Set<String> uniqueTags = new HashSet<>();
+//            if (dto.getInspectionItem().contains(",")) {
+//                for (String s : dto.getInspectionItem().split(",")) {
+//                    uniqueTags.add(s.split("@")[0]);
+//                }
+//            } else {
+//                uniqueTags.add(dto.getInspectionItem().split("@")[0]);
+//            }
+//            dto.setInspectionItem(uniqueTags.toString());
+//            return dto;
+//        }).collect(Collectors.toList());
+//        dtoIPage.setRecords(collect);
+//        return dtoIPage;
+//    }
+//
+//    @Override
+//    public Map<String, Object> costStatistics2(CostStatisticsDto costStatisticsDto) {
+//        Map<String, Object> map = new HashMap<>();
+//        String dates = costStatisticsDto.getDates();
+//        String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
+//        costStatisticsDto.setDates(null);
+//        List<CostStatisticsDto> costStatisticsDtos = insOrderMapper.selectCostStatistics2(QueryWrappers.queryWrappers(costStatisticsDto).ge("create_time", split[0]).le("create_time", split[1] + " 23:59:59"));
+//        double totalPrice = costStatisticsDtos.stream()
+//                .filter(dto -> dto.getPrice() != null) // 杩囨护鎺変环鏍间负 null 鐨勫璞�
+//                .mapToDouble(value -> value.getPrice().doubleValue() * value.getNum())
+//                .sum();
+//        map.put("total", totalPrice);
+//        return map;
+//    }
+//
+//    @Override
+//    public Map<String, Object> selectSampleDefects(Page page, String inspectionItems, String orderNumber) {
+//        List<SampleDefectsFatherVo> sampleDefectsFatherVos = insOrderMapper.selectSampleDefects(page, inspectionItems, orderNumber);
+//        Map<String, Object> map = new HashMap<>();
+//        map.put("records", sampleDefectsFatherVos);
+//        Long aLong = insOrderMapper.getCount(inspectionItems, orderNumber);
+//        map.put("total", aLong);
+//        return map;
+//    }
+//
+//    @Override
+//    public int updateStatus(Integer id) {
+//        return insOrderMapper.updateStatus(id);
+//    }
+//
+//
+//    @Override
+//    public void export(CostStatisticsDto costStatisticsDto, HttpServletResponse response) throws IOException {
+//        //鏌ヨ瀵煎嚭鐨勮垂鐢ㄧ粺璁℃暟鎹�
+//        String dates = costStatisticsDto.getDates();
+//        String[] split = dates.replaceAll("\\[", "").replaceAll("]", "").replaceAll("\"", "").split(",");
+//        costStatisticsDto.setDates(null);
+//        List<CostStatisticsDto> costStatisticsDtos = insOrderMapper.selectCostStatistics2(QueryWrappers.queryWrappers(costStatisticsDto).ge("create_time", split[0]).le("create_time", split[1] + " 23:59:59"));
+//        costStatisticsDtos = costStatisticsDtos.stream().map(dto -> {
+//            Set<String> uniqueTags = new HashSet<>();
+//            if (dto.getInspectionItem().contains(",")) {
+//                for (String s : dto.getInspectionItem().split(",")) {
+//                    uniqueTags.add(s.split("@")[0]);
+//                }
+//            } else {
+//                uniqueTags.add(dto.getInspectionItem().split("@")[0]);
+//            }
+//            dto.setInspectionItem(uniqueTags.toString());
+//            return dto;
+//        }).collect(Collectors.toList());
+//
+//        response.setContentType("application/vnd.ms-excel");
+//        response.setCharacterEncoding("UTF-8");
+//        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+//        String fileName = URLEncoder.encode("鏍峰搧璐圭敤缁熻瀵煎嚭", "UTF-8");
+//        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+//        Map<String, List<CostStatisticsDto>> groupByCompany =
+//                costStatisticsDtos.stream().filter(e -> StrUtil.isNotEmpty(e.getCompany()))
+//                        .collect(Collectors.groupingBy(CostStatisticsDto::getCompany));
+//        try {
+//            // 鏂板缓ExcelWriter
+//            // 鏂板缓ExcelWriter
+//            ExcelWriter excelWriter =
+//                    EasyExcel.write(response.getOutputStream())
+//                            .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25))
+//                            .build();
+//            for (Map.Entry<String, List<CostStatisticsDto>> companyDataEntry : groupByCompany.entrySet()) {
+//                String sheetName = companyDataEntry.getKey();
+//                List<CostStatisticsDto> dataList = companyDataEntry.getValue();
+//                WriteSheet mainSheet = EasyExcel.writerSheet(sheetName)
+//                        .head(CostStatisticsDto.class)
+//                        .registerWriteHandler(new SimpleColumnWidthStyleStrategy(25))
+//                        .build();
+//                excelWriter.write(dataList, mainSheet);
+//            }
+//            // 鍏抽棴娴�
+//            excelWriter.finish();
+//        } catch (IOException e) {
+//            throw new RuntimeException("瀵煎嚭澶辫触");
+//        }
+//    }
+//
+//    /**
+//     * 鑾峰彇ifs搴撳瓨淇℃伅
+//     * @param
+//     * @return
+//     */
+//    @Override
+//    public void getIfsOrder() {
+//        HashMap<String, Object> map = new HashMap<>();
+//        map.put("LOCATION_NO","1302");
+//        map.put("STATE_DB","To be Inspected");
+//        List<Map<String, Object>> inventory = ifsApiUtils.getInventory(JSONUtil.toJsonStr(map));
+//        if(inventory.size() == 0) {
+//            return;
+//        }
+//        // 杩涜淇濆瓨
+//        for (Map<String, Object> map1 : inventory) {
+//            DateTimeFormatter dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); // 鏃堕棿鏍煎紡鍖�
+//            IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity();
+//            ifsInventoryQuantity.setContract(map1.get("CONTRACT") == null ? "" : map1.get("CONTRACT").toString()); // 鍩�
+//            ifsInventoryQuantity.setPartNo(map1.get("PART_NO") == null ? "" : map1.get("PART_NO").toString() ); // 闆朵欢鍙�
+//            ifsInventoryQuantity.setPartDesc(map1.get("PART_DESC") == null ? "" : map1.get("PART_DESC").toString()); // 闆朵欢鎻忚堪
+//            ifsInventoryQuantity.setOrderNo(map1.get("ORDER_NO") == null ? "" : map1.get("ORDER_NO").toString()); // 璁㈠崟鍙�
+//            ifsInventoryQuantity.setLineNo(map1.get("LINE_NO") == null ? "" : map1.get("LINE_NO").toString()); // 琛屽彿
+//            ifsInventoryQuantity.setReleaseNo(map1.get("RELEASE_NO") == null ? "" : map1.get("RELEASE_NO").toString()); // 涓嬭揪鍙�
+//            ifsInventoryQuantity.setReceiptNo(Integer.parseInt(map1.get("RECEIPT_NO") == null ? "" : map1.get("RECEIPT_NO").toString())); // 鎺ユ敹鍙�
+//            ifsInventoryQuantity.setStatus(map1.get("STATE") == null ? "" : map1.get("STATE").toString()); // 鐘舵�佹弿杩�
+//            ifsInventoryQuantity.setStatusDb(map1.get("STATE_DB") == null ? "" : map1.get("STATE_DB").toString()); // 鐘舵��
+//            if(map1.get("QTY_ARRIVED") != null) {
+//                ifsInventoryQuantity.setQtyArrived(new BigDecimal(map1.get("QTY_ARRIVED").toString())); // 鎶佃揪鐨勯噰璐暟閲�
+//            }
+//            if(map1.get("QTY_INSPECTED") != null) {
+//                ifsInventoryQuantity.setQtyInspected(new BigDecimal(map1.get("QTY_INSPECTED").toString())); // 宸叉楠岀殑璐拱鏁伴噺
+//            }
+//            if(map1.get("QTY_TO_INSPECT") != null) {
+//                ifsInventoryQuantity.setQtyToInspect(new BigDecimal(map1.get("QTY_TO_INSPECT").toString())); // 瑕佹楠岀殑閲囪喘鏁伴噺
+//            }
+//            if(map1.get("INV_QTY_IN_STORE") != null) {
+//                ifsInventoryQuantity.setInvQtyInStore(new BigDecimal(map1.get("INV_QTY_IN_STORE").toString())); // 鎶佃揪鐨勫簱瀛樻暟閲�
+//            }
+//            if(map1.get("PUR_QTY_IN_STORE") != null) {
+//                ifsInventoryQuantity.setPurQtyInStore(new BigDecimal( map1.get("PUR_QTY_IN_STORE").toString())); // 鎶佃揪鐨勯噰璐暟閲�
+//
+//            }
+//            ifsInventoryQuantity.setSupplierId(map1.get("SUPPLIER_ID") == null ? "" : map1.get("SUPPLIER_ID").toString()); // 渚涘簲鍟咺D
+//            ifsInventoryQuantity.setSupplierName(map1.get("SUPPLIER_NAME") == null ? "" : map1.get("SUPPLIER_NAME").toString()); // 渚涘簲鍟嗗悕绉�
+//            ifsInventoryQuantity.setConfigurationId(map1.get("CONFIGURATION_ID") == null ? "" : map1.get("CONFIGURATION_ID").toString()); // 閰嶇疆鏍囪瘑
+//            ifsInventoryQuantity.setLotBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // 鎵规鍙�
+//            ifsInventoryQuantity.setUpdateBatchNo(map1.get("LOT_BATCH_NO") == null ? "" : map1.get("LOT_BATCH_NO").toString()); // 鎵规鍙�
+//            ifsInventoryQuantity.setWaivDevRejNo(map1.get("WAIV_DEV_REJ_NO") == null ? "" : map1.get("WAIV_DEV_REJ_NO").toString()); // WDR鍙�
+//            ifsInventoryQuantity.setActivitySeq(map1.get("ACTIVITY_SEQ") == null ? null : Integer.parseInt(map1.get("ACTIVITY_SEQ").toString())); // 娲诲姩搴忓垪
+//            ifsInventoryQuantity.setSerialNo(map1.get("SERIAL_NO") == null ? "" : map1.get("SERIAL_NO").toString()); // 搴忓垪鍙�
+//            ifsInventoryQuantity.setLocationNo(map1.get("LOCATION_NO") == null ? "" : map1.get("LOCATION_NO").toString()); // 搴撲綅鍙�
+//            ifsInventoryQuantity.setEngChgLevel(map1.get("ENG_CHG_LEVEL") == null ? "" : map1.get("ENG_CHG_LEVEL").toString()); // 鐗堟湰鍙�
+//            ifsInventoryQuantity.setReceiver(map1.get("RECEIVER") == null ? "" : map1.get("RECEIVER").toString()); // 鎺ユ敹浜�
+//            ifsInventoryQuantity.setReceiverName(map1.get("RECEIVER_NAME") == null ? "" : map1.get("RECEIVER_NAME").toString()); // 鎺ユ敹浜哄悕绉�
+//            ifsInventoryQuantity.setBuyerCode(map1.get("BUYER_CODE") == null ? "" : map1.get("BUYER_CODE").toString()); // 閲囪喘鍛�
+//            ifsInventoryQuantity.setBuyerName(map1.get("BUYER_NAME") == null ? "" : map1.get("BUYER_NAME").toString()); // 閲囪喘鍛樺悕绉�
+//
+//            if(map1.get("ARRIVE_DATE") != null) {
+//                ifsInventoryQuantity.setArriveDate(LocalDateTime.parse(map1.get("ARRIVE_DATE").toString(),dateTimeFormatter)); // 瀹為檯鍒拌揣鏃ユ湡
+//            }
+//            if(map1.get("DELIVERY_DATE") != null) {
+//                ifsInventoryQuantity.setDeliveryDate(LocalDateTime.parse(map1.get("DELIVERY_DATE").toString(),dateTimeFormatter)); // 瀹為檯浜よ揣鏃ユ湡
+//            }
+//            if(map1.get("PRODUCT_DATE") != null) {
+//                ifsInventoryQuantity.setProductDate(LocalDateTime.parse(map1.get("PRODUCT_DATE").toString(),dateTimeFormatter)); // 鐢熶骇鏃ユ湡
+//
+//            }
+//            if(map1.get("INVALID_DATE") != null) {
+//                ifsInventoryQuantity.setInvalidDate(LocalDateTime.parse(map1.get("INVALID_DATE").toString(),dateTimeFormatter)); // 澶辨晥鏃ユ湡
+//            }
+//            if(map1.get("APPROVED_DATE") != null) {
+//                ifsInventoryQuantity.setApprovedDate(LocalDateTime.parse(map1.get("APPROVED_DATE").toString(),dateTimeFormatter)); // 瀹℃壒鏃ユ湡
+//            }
+//            ifsInventoryQuantity.setReqCeater(map1.get("REQ_CEATER") == null ? "" : map1.get("REQ_CEATER").toString()); // 閲囪喘鐢宠鍒涘缓浜�
+//            ifsInventoryQuantity.setReqCeaterName(map1.get("REQ_CEATER_NAME") == null ? "" : map1.get("REQ_CEATER_NAME").toString()); // 閲囪喘鐢宠鍒涘缓浜哄悕绉�
+//            ifsInventoryQuantity.setLineRemarks(map1.get("LINE_REMARKS") == null ? "" : map1.get("LINE_REMARKS").toString()); // 閲囪喘璁㈠崟琛屽娉�
+//            ifsInventoryQuantity.setBuyUnitMeas(map1.get("BUY_UNIT_MEAS") == null ? "" : map1.get("BUY_UNIT_MEAS").toString()); // 閲囪喘鍗曚綅
+//            ifsInventoryQuantity.setReceiverDate(LocalDateTime.now()); // 鎺ユ敹鏃ユ湡
+//            ifsInventoryQuantity.setIsSource(1);
+//            ifsInventoryQuantity.setState(0);
+//
+//            IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
+//                    .eq(IfsInventoryQuantity::getOrderNo, ifsInventoryQuantity.getOrderNo())
+//                    .eq(IfsInventoryQuantity::getLineNo, ifsInventoryQuantity.getLineNo())
+//                    .eq(IfsInventoryQuantity::getReleaseNo, ifsInventoryQuantity.getReleaseNo())
+//                    .eq(IfsInventoryQuantity::getReceiptNo, ifsInventoryQuantity.getReceiptNo())
+//                    .eq(IfsInventoryQuantity::getLocationNo, ifsInventoryQuantity.getLocationNo())
+//                    .eq(IfsInventoryQuantity::getLotBatchNo, ifsInventoryQuantity.getLotBatchNo())
+//                    .eq(IfsInventoryQuantity::getSerialNo, ifsInventoryQuantity.getSerialNo())
+//                    .eq(IfsInventoryQuantity::getEngChgLevel, ifsInventoryQuantity.getEngChgLevel())
+//                    .eq(IfsInventoryQuantity::getWaivDevRejNo, ifsInventoryQuantity.getWaivDevRejNo())
+//                    .eq(IfsInventoryQuantity::getActivitySeq, ifsInventoryQuantity.getActivitySeq())
+//            );
+//            if(Objects.isNull(one)) {
+//
+//                ifsInventoryQuantity.setIsFirst(0);
+//                // 鏌ヨ浜т笟閾炬娴嬫暟鎹�
+//                String industryChainAttrFields = IndustryChainUtils.getIndustryChainAttrFields(ifsInventoryQuantity.getOrderNo(),
+//                        ifsInventoryQuantity.getLineNo(),
+//                        ifsInventoryQuantity.getReleaseNo());
+//                ifsInventoryQuantity.setIndustryChain(industryChainAttrFields);
+//
+//                ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
+//            }
+//        }
+//    }
+//
+//    /**
+//     * id鏄師鏉愭枡鐨刬d
+//     *
+//     * 淇敼璁㈠崟鍗曞彿
+//     * @param insOrder
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public void updateEntrustCode(InsOrder insOrder) {
+//        // 鍒ゆ柇褰撳墠璁㈠崟鏄惁鐢熸垚浜嗘姤鍛�, 鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀瑰崟鍙�
+//        List<InsOrder> insOrders = insOrderMapper.selectList(Wrappers.<InsOrder>lambdaQuery()
+//                .eq(InsOrder::getIfsInventoryId, insOrder.getId())
+//                .ne(InsOrder::getState, -1));
+//        List<Integer> insOrderIds = insOrders.stream().map(InsOrder::getId).collect(Collectors.toList());
+//        Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery()
+//                .in(InsReport::getInsOrderId, insOrderIds));
+//        if (count > 0 ) {
+//            throw new ErrorException("褰撳墠璁㈠崟宸茬粡鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀圭紪鍙�");
+//        }
+//
+//
+//        Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
+//                .eq(InsOrder::getEntrustCode, insOrder.getEntrustCode())
+//                .ne(InsOrder::getIfsInventoryId, insOrder.getId())
+//                .ne(InsOrder::getInsState, -1));
+//        if (count1 > 0) {
+//            throw new ErrorException("璇ョ紪鍙烽噸澶�");
+//        }
+//
+//        //淇敼鎶ュ憡鐨勭紪鍙�
+//        insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getIfsInventoryId, insOrder.getId())
+//                .set(InsOrder::getEntrustCode, insOrder.getEntrustCode()));
+//
+//        // 淇敼鏍峰搧鐨勭紪鍙�
+//        // 鏌ヨ鎵�鏈夌殑鏍峰搧
+//        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery()
+//                .in(InsSample::getInsOrderId, insOrderIds));
+//        for (InsSample insSample : insSamples) {
+//            String sampleCode = insSample.getSampleCode();
+//            String updateCode = insOrder.getEntrustCode();
+//            // 鏌ユ壘鏈�鍚庝竴涓�'-'鐨勪綅缃�
+//            int lastDashIndex = sampleCode.lastIndexOf('-');
+//            if (lastDashIndex != -1) {
+//                int secondLastDashIndex = sampleCode.lastIndexOf('-', lastDashIndex - 1);
+//                // 澶勭悊鏈�鍚庝竴涓�'-'鍓嶇殑閮ㄥ垎
+//                if (secondLastDashIndex != -1) {
+//                    // 澶勭悊鏈�鍚庝竴涓�'-'鍙婁箣鍚庣殑閮ㄥ垎
+//                    String afterLastDash = sampleCode.substring(lastDashIndex);
+//
+//                    updateCode = updateCode + afterLastDash;
+//                }
+//            }
+//            insSampleMapper.update(null, Wrappers.<InsSample>lambdaUpdate()
+//                    .eq(InsSample::getId, insSample.getId())
+//                    .set(InsSample::getSampleCode, updateCode));
+//
+//        }
+//    }
+//
+//    @Override
+//    public List<InsUnqualifiedRetestProduct> getRetestResult(Integer insProductId) {
+//        return insUnqualifiedRetestProductMapper.selectList(Wrappers.<InsUnqualifiedRetestProduct>lambdaQuery()
+//                .eq(InsUnqualifiedRetestProduct::getInsProductId, insProductId));
+//    }
+//
+//    /**
+//     * 淇敼閲囪喘璁㈠崟鎺ユ敹鐘舵��, 閬垮厤鍥炴粴
+//     * @param id
+//     */
+//    @Transactional
+//    public void updateIfsInventoryQuantity(Integer id) {
+//        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                .set(IfsInventoryQuantity::getIsRegister, 1)
+//                .eq(IfsInventoryQuantity::getId, id));
+//    }
+//
+//    /**
+//     * 鏂板閾滃崟涓濅笅鍗�
+//     * @param list
+//     * @param insOrder
+//     * @return
+//     */
+//    @Override
+//    public int addRawCopperOrder(List<SampleProductDto> list, CopperInsOrderDto insOrder) {
+//        insOrder.setState(1);
+//        insOrder.setTypeSource(1);
+//
+//        LocalDate appointed = insOrder.getAppointed();
+//
+//        insOrderMapper.insert(insOrder); // 涓昏〃
+//
+//        list.forEach(a -> {
+//            a.setId(null);
+//            a.setInsOrderId(insOrder.getId());
+//            insSampleMapper.insert(a);
+//            if (ObjectUtil.isNotEmpty(a.getInsProduct())) {
+//                // 鍒ゆ柇鏄惁濉啓寰呮椤规暟閲�
+//                if (a.getQuantity() != null) {
+//                    List<InsProduct> ip2 = new ArrayList<>();
+//                    for (Integer i = 1; i <= a.getQuantity(); i++) {
+//                        // 閲嶆柊鎷疯礉 鍒涘缓鏂板璞�
+//                        AtomicInteger atomicInteger = new AtomicInteger(i);
+//                        List<InsProduct> insProducts = a.getInsProduct().stream().map(insProduct -> {
+//                            insProduct.setRawMaterialTag(String.valueOf(atomicInteger.get()));
+//                            InsProduct product = new InsProduct();
+//                            BeanUtils.copyProperties(insProduct, product);
+//                            return product;
+//                        }).collect(Collectors.toList());
+//
+//                        ip2.addAll(insProducts);
+//                    }
+//                    addInsProductMethod(a.getId(), ip2);
+//                } else {
+//                    addInsProductMethod(a.getId(), a.getInsProduct());
+//                }
+//            }
+//            if (ObjectUtil.isNotEmpty(a.getChildSampleList())) {
+//                for (SampleProductDto b : a.getChildSampleList()) {
+//                    for (int i = 0; i < b.getNum(); i++) {
+//                        b.setId(null);
+//                        b.setInsOrderId(insOrder.getId());
+//                        b.setParentId(a.getId());
+//                        insSampleMapper.insert(b);
+//                        if (ObjectUtil.isNotEmpty(b.getInsProduct())) {
+//                            addInsProductMethod(b.getId(), b.getInsProduct());
+//                        }
+//                    }
+//                }
+//            }
+//        });
+//
+//        // 娣诲姞鍘熸潗鏂欎俊鎭�
+//        IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity();
+//        // 鍩烘湰淇℃伅
+//        ifsInventoryQuantity.setIsSource(0);
+//        ifsInventoryQuantity.setIsInspect(1);
+//        ifsInventoryQuantity.setState(1);
+//        ifsInventoryQuantity.setIsFinish(0);
+//        ifsInventoryQuantity.setIsCopper(1);
+//        ifsInventoryQuantity.setIsQuarter(0);
+//        ifsInventoryQuantity.setInspectStatus(0);
+//
+//        ifsInventoryQuantity.setQtyArrived(insOrder.getQtyArrived());
+//        ifsInventoryQuantity.setBuyUnitMeas(insOrder.getBuyUnitMeas());
+//        ifsInventoryQuantity.setSupplierName(insOrder.getSupplierName());
+//        ifsInventoryQuantity.setUpdateBatchNo(insOrder.getUpdateBatchNo());
+//        ifsInventoryQuantity.setDeclareDate(insOrder.getDeclareDate());
+//
+//        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
+//
+//
+//        insOrder.setIfsInventoryId(ifsInventoryQuantity.getId());
+//        insOrder.setState(1);
+//
+//
+//        upInsOrderOfState(insOrder);
+//        upInsOrder(insOrder.getId(), null, appointed != null ? appointed.toString() : null, SecurityUtils.getUserId().intValue(), "鍘熸潗鏂�");
+//
+//        return insOrder.getId();
+//    }
+//
+//    /**
+//     * 淇敼濮旀墭涓嬪崟缂栧彿
+//     * @param insOrder
+//     */
+//    @Override
+//    public void updateOrderEntrustCode(InsOrder insOrder) {
+//        // 鍒ゆ柇褰撳墠璁㈠崟鏄惁鐢熸垚浜嗘姤鍛�, 鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀瑰崟鍙�
+//        Long count = insReportMapper.selectCount(Wrappers.<InsReport>lambdaQuery()
+//                .eq(InsReport::getInsOrderId, insOrder.getId()));
+//        if (count > 0 ) {
+//            throw new ErrorException("褰撳墠璁㈠崟宸茬粡鐢熸垚浜嗘姤鍛婁笉鑳戒慨鏀圭紪鍙�");
+//        }
+//
+//        Long count1 = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
+//                .eq(InsOrder::getEntrustCode, insOrder.getEntrustCode()));
+//        if (count1 > 0) {
+//            throw new ErrorException("璇ョ紪鍙烽噸澶�");
+//        }
+//
+//        //淇敼鎶ュ憡鐨勭紪鍙�
+//        insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getId, insOrder.getId())
+//                .set(InsOrder::getEntrustCode, insOrder.getEntrustCode()));
+//
+//        // 淇敼鏍峰搧鐨勭紪鍙�
+//        // 鏌ヨ鎵�鏈夌殑鏍峰搧
+//        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery()
+//                .eq(InsSample::getInsOrderId, insOrder.getId()));
+//        for (InsSample insSample : insSamples) {
+//            String sampleCode = insSample.getSampleCode();
+//            String updateCode = insOrder.getEntrustCode();
+//            // 鏌ユ壘鏈�鍚庝竴涓�'-'鐨勪綅缃�
+//            int lastDashIndex = sampleCode.lastIndexOf('-');
+//            if (lastDashIndex != -1) {
+//                int secondLastDashIndex = sampleCode.lastIndexOf('-', lastDashIndex - 1);
+//                // 澶勭悊鏈�鍚庝竴涓�'-'鍓嶇殑閮ㄥ垎
+//                if (secondLastDashIndex != -1) {
+//                    // 澶勭悊鏈�鍚庝竴涓�'-'鍙婁箣鍚庣殑閮ㄥ垎
+//                    String afterLastDash = sampleCode.substring(lastDashIndex);
+//
+//                    updateCode = updateCode + afterLastDash;
+//                }
+//            }
+//            insSampleMapper.update(null, Wrappers.<InsSample>lambdaUpdate()
+//                    .eq(InsSample::getId, insSample.getId())
+//                    .set(InsSample::getSampleCode, updateCode));
+//
+//        }
+//    }
+//
+//    /**
+//     * 淇敼妫�楠屼笅鍗曞唴瀹�
+//     * @param insOrderUpdateDto
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public Boolean updateInsOrder(InsOrderUpdateDto insOrderUpdateDto) {
+//        // 淇敼璁㈠崟
+//        insOrderUpdateDto.getInsOrder().setState(0);
+//        insOrderUpdateDto.getInsOrder().setTell("");
+//        insOrderMapper.updateById(insOrderUpdateDto.getInsOrder());
+//
+//        // 淇敼妫�楠岄」
+//        for (SampleProductDto sampleProductDto : insOrderUpdateDto.getSampleProduct()) {
+//            insProductService.updateBatchById(sampleProductDto.getInsProduct());
+//        }
+//
+//        return true;
+//    }
+//
+//    /**
+//     * 鎴愬搧鏍囩鎵撳嵃
+//     * @param ids
+//     * @return
+//     */
+//    @Override
+//    public List<InsOrderPrintingVo> labelOrderPrinting(List<Integer> ids) {
+//        return insOrderMapper.labelOrderPrinting(ids);
+//    }
+//
+//    /**
+//     * 鏍规嵁鏍峰搧id鏌ヨ妫�楠岄」鏍�
+//     * @param insSampleId
+//     * @return
+//     */
+//    @Override
+//    public List<StandardProductList> getProductTreeBySampleId(Integer insSampleId) {
+//        // 鏌ヨ绗竴涓楠岄」鑾峰彇妫�楠岄」鏍�
+//        InsProduct insProduct = insProductMapper.selectOne(Wrappers.<InsProduct>lambdaQuery()
+//                .eq(InsProduct::getInsSampleId, insSampleId)
+//                .last("limit 1"));
+//        String tree = insProduct.getFactory() + " - " +
+//                insProduct.getLaboratory() + " - " +
+//                insProduct.getSampleType() + " - " +
+//                insProduct.getSample() + " - " +
+//                insProduct.getModel();
+//        // 鏌ヨ鏍囧噯鏍�
+//        List<StandardProductList> standardProductLists = standardProductListMapper.selectList(Wrappers.<StandardProductList>lambdaQuery()
+//                .eq(StandardProductList::getStandardMethodListId, insProduct.getStandardMethodListId())
+//                .eq(StandardProductList::getTree, tree));
+//        for (StandardProductList standardProductList : standardProductLists) {
+//            standardProductList.setId(null);
+//        }
+//
+//        return standardProductLists;
+//    }
+//
+//    /**
+//     * 娣诲姞閬楁紡鐨勬楠岄」
+//     * @param omitOrderProductDto
+//     * @return
+//     */
+//    @Override
+//    public boolean addOmitOrderProduct(OmitOrderProductDto omitOrderProductDto) {
+//        if (omitOrderProductDto.getInsSampleId() == null) {
+//            throw new ErrorException("缂哄皯鏍峰搧Id");
+//        }
+//        for (InsProduct product : omitOrderProductDto.getInsProductBindingList()) {
+//            if (product.getState() == 1) {
+//                product.setId(null);
+//                product.setCreateTime(null);
+//                product.setCreateUser(null);
+//                product.setUpdateTime(null);
+//                product.setUpdateUser(null);
+//                product.setInsSampleId(omitOrderProductDto.getInsSampleId());
+//                if (StringUtils.isBlank(product.getCableTag())) {
+//                    product.setCableTag(null);
+//                }
+//                if (product.getInspectionItemSubclass() == null) {
+//                    product.setInspectionItemSubclass("");
+//                }
+//                if (StringUtils.isBlank(product.getAsk()) || StringUtils.isBlank(product.getTell())) {
+//                    throw new ErrorException("鏈夋楠岄」鐨勮姹傚�兼垨瑕佹眰鎻忚堪涓虹┖, 璇峰~鍐欒姹傚�兼垨瑕佹眰鎻忚堪");
+//                }
+//                insProductMapper.insert(product);
+//            }
+//        }
+//
+//        return true;
+//    }
+//
+//    /**
+//     * 鎴愬搧妫�楠屽崟瀵煎嚭
+//     * @param sampleOrderDto
+//     * @param response
+//     */
+//    @Override
+//    public void rawAllInsOrderExport(SampleOrderDto sampleOrderDto, HttpServletResponse response) {
+//        //鍒ゆ柇鍏ㄩ儴,涓汉,缁勭粐鐨勬潈闄�
+//        //todo:浠呯湅鎴戣幏鍙栧綋鍓嶄汉鎵�灞炲疄楠屽id
+//        String laboratory = null;
+//        // 鍒ゆ柇鏄惁鏄叏閮�
+//        String isOrderAll = null;
+//        if (sampleOrderDto.getState() != null && sampleOrderDto.getState() == -2) {
+//            isOrderAll = "1";
+//            sampleOrderDto.setState(null);
+//        }
+//        List<SampleOrderDto> sampleOrderDtoList = insOrderMapper.rawAllInsOrderExport(QueryWrappers.queryWrappers(sampleOrderDto), laboratory, isOrderAll);
+//
+//        // 鍒ゆ柇鏄惁鏄笉鍚堟牸, 涓嶅悎鏍兼煡璇笉鍚堟牸椤�
+//        for (SampleOrderDto orderDto : sampleOrderDtoList) {
+//            if (orderDto.getInsResult() != null && orderDto.getInsResult() == 0){
+//                // 鏌ヨ涓嶅悎鏍奸」
+//                List<String> unqualifiedList = insProductMapper.selectUnqualifiedList(orderDto.getId());
+//                orderDto.setUnqualifiedItem(CollUtil.join(unqualifiedList, ","));
+//            }
+//            orderDto.setCreateTimeString(orderDto.getCreateTime() == null ? "" : orderDto.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+//
+//        }
+//
+//        response.setContentType("application/vnd.ms-excel");
+//        response.setCharacterEncoding("UTF-8");
+//        try {
+//            // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+//            String fileName = URLEncoder.encode("濮旀墭妫�娴嬩俊鎭鍑�", "UTF-8");
+//            response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+//            //鏂板缓ExcelWriter
+//            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
+//            //鑾峰彇sheet0瀵硅薄
+//            WriteSheet mainSheet = EasyExcel.writerSheet(0, "濮旀墭妫�娴嬩俊鎭鍑�").head(SampleOrderDto.class).build();
+//
+//            //鍚憇heet0鍐欏叆鏁版嵁 浼犲叆绌簂ist杩欐牱鍙鍑鸿〃澶�
+//            excelWriter.write(sampleOrderDtoList, mainSheet);
+//            //鍏抽棴娴�
+//            excelWriter.finish();
+//        } catch (IOException e) {
+//            throw new RuntimeException("瀵煎嚭澶辫触");
+//        }
+//    }
+//
+//}
+//
+//
+//
+//
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
new file mode 100644
index 0000000..18a9488
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsReportServiceImpl.java
@@ -0,0 +1,1174 @@
+//package com.ruoyi.inspect.service.impl;
+//
+//import cn.hutool.core.util.StrUtil;
+//import cn.hutool.json.JSONUtil;
+//import com.aspose.words.*;
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+//import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+//import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+//import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+//import com.deepoove.poi.XWPFTemplate;
+//import com.deepoove.poi.data.Pictures;
+//import com.itextpdf.text.BadElementException;
+//import com.itextpdf.text.DocumentException;
+//import com.itextpdf.text.pdf.PdfContentByte;
+//import com.itextpdf.text.pdf.PdfReader;
+//import com.itextpdf.text.pdf.PdfStamper;
+//import com.yuanchu.mom.common.GetLook;
+//import com.yuanchu.mom.common.InsOrderTypeConstants;
+//import com.yuanchu.mom.common.PrintChina;
+//import com.yuanchu.mom.dto.ReportPageDto;
+//import com.yuanchu.mom.exception.ErrorException;
+//import com.yuanchu.mom.mapper.*;
+//import com.yuanchu.mom.pojo.*;
+//import com.yuanchu.mom.properties.WechatProperty;
+//import com.yuanchu.mom.service.InformationNotificationService;
+//import com.yuanchu.mom.service.InsOrderService;
+//import com.yuanchu.mom.service.InsReportService;
+//import com.yuanchu.mom.utils.DateImageUtil;
+//import com.yuanchu.mom.utils.IfsApiUtils;
+//import com.yuanchu.mom.utils.QueryWrappers;
+//import com.yuanchu.mom.utils.WxCpUtils;
+//import com.yuanchu.mom.vo.Result;
+//import org.apache.poi.xwpf.usermodel.*;
+//import org.springframework.beans.factory.annotation.Value;
+//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//import org.springframework.web.multipart.MultipartFile;
+//
+//import javax.annotation.Resource;
+//import javax.imageio.ImageIO;
+//import java.awt.image.BufferedImage;
+//import java.io.*;
+//import java.nio.file.Files;
+//import java.nio.file.Path;
+//import java.nio.file.Paths;
+//import java.nio.file.StandardCopyOption;
+//import java.time.LocalDateTime;
+//import java.time.format.DateTimeFormatter;
+//import java.util.*;
+//import java.util.stream.Collectors;
+//import java.util.zip.ZipEntry;
+//import java.util.zip.ZipFile;
+//import java.util.zip.ZipOutputStream;
+//
+///**
+// * @author Administrator
+// * @description 閽堝琛ㄣ�恑ns_report(妫�楠屾姤鍛�)銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+// * @createDate 2024-03-17 22:10:02
+// */
+//@Service
+//public class InsReportServiceImpl extends ServiceImpl<InsReportMapper, InsReport>
+//        implements InsReportService {
+//
+//    @Resource
+//    private GetLook getLook;
+//    @Resource
+//    private UserMapper userMapper;
+//    @Resource
+//    private InsReportMapper insReportMapper;
+//    @Resource
+//    private InsOrderStateMapper insOrderStateMapper;
+//    @Resource
+//    private InsProductMapper insProductMapper;
+//    @Resource
+//    private InformationNotificationService informationNotificationService;
+//    @Value("${wordUrl}")
+//    private String wordUrl;
+//    @Value("${file.path}")
+//    private String imgUrl;
+//    @Value("${file.licenseUrl}")
+//    private String licenseUrl;
+//    @Resource
+//    private InsOrderMapper insOrderMapper;
+//    @Resource
+//    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
+//    @Resource
+//    private InsUnqualifiedHandlerMapper insUnqualifiedHandlerMapper;
+//    @Resource
+//    private InsSampleMapper insSampleMapper;
+//    @Resource
+//    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
+//    @Resource
+//    private InsOrderService insOrderService;
+//    @Resource
+//    private WechatProperty wechatProperty;
+//    @Resource
+//    private InsUnqualifiedRetestProductMapper insUnqualifiedRetestProductMapper;
+//    @Resource
+//    private IfsApiUtils ifsApiUtils;
+//    @Resource
+//    private InsSampleUserMapper insSampleUserMapper;
+//
+//
+//    @Override
+//    public Map<String, Object> pageInsReport(Page page, ReportPageDto reportPageDto) {
+//        Map<String, Object> map = new HashMap<>();
+//        map.put("head", PrintChina.printChina(ReportPageDto.class));
+//        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("pageInsReport");
+//        User user = userMapper.selectById(map1.get("userId"));//褰撳墠鐧诲綍鐨勪汉
+//        //鑾峰彇褰撳墠浜烘墍灞炲疄楠屽id
+//        String departLimsId = user.getDepartLimsId();
+//        String laboratory = null;
+////        if (ObjectUtils.isNotEmpty(departLimsId) && !departLimsId.equals("")) {
+////            String[] split = departLimsId.split(",");
+////            //鏌ヨ瀵瑰簲鏋舵瀯鍚嶇О(閫氫俊瀹為獙瀹�,鐢靛姏瀹為獙瀹�,妫�娴嬪姙)
+////            String departLims = insOrderMapper.seldepLimsId(Integer.parseInt(split[split.length - 1]));
+////            if (departLims.contains("瀹為獙瀹�")) {
+////                laboratory = departLims;
+////            }
+////        }
+//
+//        Integer createOrderUser = null;
+//        if (map1.get("look") == 1) {
+//            //涓汉
+//            createOrderUser = map1.get("userId");
+//        }
+//        String queryStatus = reportPageDto.getQueryStatus();
+//        reportPageDto.setQueryStatus(null);
+//
+//        map.put("body", insReportMapper.pageInsReport(page,
+//                QueryWrappers.queryWrappers(reportPageDto),
+//                laboratory,
+//                map1.get("userId"),
+//                queryStatus,
+//                createOrderUser));
+//        return map;
+//    }
+//
+//    @Override
+//    public int inReport(String url, Integer id) {
+//        InsReport insReport = new InsReport();
+//        insReport.setId(id);
+//        insReport.setUrlS(url);
+//        // 杩樺師pdf
+//        String tempUrlPdf = wordToPdfTemp(insReport.getUrlS().replace("/word", wordUrl));
+//        insReport.setTempUrlPdf("/word/" + tempUrlPdf);
+//        return insReportMapper.updateById(insReport);
+//    }
+//
+//    @Override
+//    public int upReportUrl(Integer id) {
+//        InsReport report = insReportMapper.selectById(id);
+//        // 杩樺師pdf
+//        String tempUrlPdf = wordToPdfTemp(report.getUrl().replace("/word", wordUrl));
+//
+//        return insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate()
+//                .eq(InsReport::getId, id)
+//                .set(InsReport::getUrlS, null)
+//                .set(InsReport::getTempUrlPdf, "/word/" + tempUrlPdf));
+//    }
+//
+//    //鎻愪氦
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int writeReport(Integer id, Integer userId, Integer submitUserId) {
+//        submitUserId = submitUserId == null ? getLook.selectPowerByMethodAndUserId(null).get("userId") : submitUserId;
+//        InsReport insReport = insReportMapper.selectById(id);
+//        insReport.setId(id);
+//        insReport.setState(1);
+//        insReport.setWriteUserId(submitUserId);//鎻愪氦浜�
+//        if (userId == null) {
+//            throw new ErrorException("缂哄皯瀹℃牳浜�");
+//        }
+//        insReport.setExamineUserId(userId);//瀹℃牳浜�
+//        insReport.setWriteTime(LocalDateTime.now());//鎻愪氦鏃堕棿
+//        //鑾峰彇鎻愪氦浜虹殑绛惧悕鍦板潃
+//        String signatureUrl;
+//        try {
+//            signatureUrl = userMapper.selectById(insReport.getWriteUserId()).getSignatureUrl();
+//        } catch (Exception e) {
+//            throw new ErrorException("鎵句笉鍒扮紪鍒朵汉鐨勭鍚�");
+//        }
+//        if (ObjectUtils.isEmpty(signatureUrl) || signatureUrl.equals("")) {
+//            throw new ErrorException("鎵句笉鍒版楠屼汉鐨勭鍚�");
+//        }
+//
+//        Integer insOrderId = insReportMapper.selectById(id).getInsOrderId();
+//        InsOrder order = insOrderMapper.selectById(insOrderId);
+//        boolean isRawMater = order.getTypeSource() != null && order.getTypeSource().equals(1);
+//
+//        //鍙戦�佹秷鎭�
+//        InformationNotification info = new InformationNotification();
+//        info.setCreateUser(insProductMapper.selectUserById(userId).get("name"));
+//        info.setMessageType("3");
+//        info.setTheme("瀹℃牳閫氱煡");
+//        info.setContent("鎮ㄦ湁涓�鏉℃姤鍛婄紪鍒跺緟瀹℃牳娑堟伅, 缂栧彿:" + insReport.getCode());
+//        info.setSenderId(submitUserId);    //鍙戦�佷汉
+//        info.setConsigneeId(userId);     //鏀朵欢浜�
+//        info.setViewStatus(false);
+//        info.setJumpPath("b1-report-preparation");
+//        informationNotificationService.addInformationNotification(info);
+//        //绯荤粺鐢熸垚鎶ュ憡鍦板潃
+//        String url = insReport.getUrl();
+//        //鎵嬪姩涓婁紶鎶ュ憡鍦板潃
+//        String urlS = insReport.getUrlS();
+//
+//        // 鍒ゆ柇鏄惁鏄師鏉愭枡  闇�瑕佹浛鎹�****鎴愪緵搴斿晢
+//        IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
+//                .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
+//        if (one != null) {
+//            if (isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
+//                changeText(new HashMap<String, String>() {{
+//                    put("**********", one.getSupplierName());
+//                }}, (StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl));
+//            }
+//        }
+//
+//        wordInsertUrl(new HashMap<String, Object>() {{
+//            put("writeUrl", Pictures.ofLocal(imgUrl + "/" + signatureUrl).create());
+//            put("writeDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create());
+//            put("insUrl", Pictures.ofLocal(imgUrl + "/" + signatureUrl).create());
+//        }}, (StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl));
+//
+//        // 淇敼涓存椂pdf
+//        String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl));
+//        insReport.setTempUrlPdf("/word/" + tempUrlPdf);
+//
+//        insReportMapper.updateById(insReport);
+//
+//        // 娓呯┖瀹℃牳鏃堕棿, 瀹℃牳鐘舵��
+//        insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate()
+//                .eq(InsReport::getId, insReport.getId())
+//                .set(InsReport::getRatifyTime, null)
+//                .set(InsReport::getIsRatify, null)
+//                .set(InsReport::getExamineTime, null)
+//                .set(InsReport::getIsExamine, null));
+//
+//        return 1;
+//    }
+//
+//    //瀹℃牳
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int examineReport(Integer id, Integer isExamine, String examineTell, Integer userId) {
+//        InsReport insReport = insReportMapper.selectById(id);
+//        insReport.setIsExamine(isExamine);
+//        if (ObjectUtils.isNotEmpty(examineTell)) {
+//            insReport.setExamineTell(examineTell);
+//        }
+//
+//        // 妫�楠屼汉
+//        String userName = insProductMapper.selectUserById(insReport.getWriteUserId()).get("name");
+//        String userAccount = insProductMapper.selectUserById(insReport.getWriteUserId()).get("account");
+//
+//        // 瀹℃牳浜�
+//        Integer checkUserId = getLook.selectPowerByMethodAndUserId(null).get("userId");
+//        String checkUserName = insProductMapper.selectUserById(checkUserId).get("name");
+//
+//        insReport.setExamineTime(LocalDateTime.now());//瀹℃牳鏃堕棿
+//        if (isExamine == 0) {
+//            // 鍙戦�佷紒涓氬井淇¢�氱煡(瀹℃牳閫�鍥�)
+//            threadPoolTaskExecutor.execute(() -> {
+//                // 鏌ヨ璁㈠崟
+//                InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId());
+//                InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
+//                        .eq(InsSample::getInsOrderId, insReport.getInsOrderId())
+//                        .last("limit 1"));
+//                // 鏌ヨ鍘熸潗鏂�
+//                IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId());
+//
+//                String message = "";
+//                message += "鎶ュ憡缂栧埗瀹℃牳閫�鍥為�氱煡";
+//                message += "\n瀹℃牳浜�: " + checkUserName;
+//                message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
+//                message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
+//                message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
+//                if (ifsInventoryQuantity != null) {
+//                    message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
+//                }
+//                message += "\n閫�鍥炲師鍥�: " + examineTell;
+//                //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡  鎻愪氦澶嶆牳
+//                try {
+//                    WxCpUtils.inform(userAccount, message, null);
+//                } catch (Exception e) {
+//                    throw new RuntimeException(e);
+//                }
+//            });
+//
+//            //濡傛灉瀹℃牳涓嶉�氳繃
+//            insReport.setState(0);//鎻愪氦鐘舵�佹敼涓哄緟鎻愪氦
+//            return insReportMapper.updateById(insReport);
+//        } else {
+//            if (userId == null) {
+//                throw new ErrorException("缂哄皯鎵瑰噯浜�");
+//            }
+//        }
+//        insReport.setRatifyUserId(userId);//鎵瑰噯浜�
+//        //鑾峰彇瀹℃牳浜虹殑绛惧悕鍦板潃
+//        String signatureUrl;
+//        try {
+//            signatureUrl = userMapper.selectById(insReport.getExamineUserId()).getSignatureUrl();
+//        } catch (Exception e) {
+//            throw new ErrorException("鎵句笉鍒板鏍镐汉鐨勭鍚�");
+//        }
+//        if (StringUtils.isBlank(signatureUrl)) {
+//            throw new ErrorException("鎵句笉鍒板鏍镐汉鐨勭鍚�");
+//        }
+//
+//        // 鎵瑰噯浜�
+//        String sendUserAccount = insProductMapper.selectUserById(userId).get("account");
+//
+//        //鍙戦�佹秷鎭�
+//        //褰撳墠鐢ㄦ埛
+//        Integer currentUser = getLook.selectPowerByMethodAndUserId(null).get("userId");
+//        InformationNotification info = new InformationNotification();
+//        info.setCreateUser(insProductMapper.selectUserById(userId).get("name"));
+//        info.setMessageType("3");
+//        info.setTheme("鎵瑰噯閫氱煡");
+//        info.setContent("鎮ㄦ湁涓�鏉℃姤鍛婄紪鍒跺緟鎵瑰噯娑堟伅, 缂栧彿:" + insReport.getCode());
+//        info.setSenderId(currentUser);    //鍙戦�佷汉
+//        info.setConsigneeId(userId);     //鏀朵欢浜�
+//        info.setViewStatus(false);
+//        info.setJumpPath("b1-report-preparation");
+//        informationNotificationService.addInformationNotification(info);
+//        //绯荤粺鐢熸垚鎶ュ憡鍦板潃
+//        String url = insReport.getUrl();
+//        //鎵嬪姩涓婁紶鎶ュ憡鍦板潃
+//        String urlS = insReport.getUrlS();
+//        wordInsertUrl(new HashMap<String, Object>() {{
+//            put("examineUrl", Pictures.ofLocal(imgUrl + "/" + signatureUrl).create());
+//            put("examineDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create());
+//        }}, (StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl));
+//
+//        // 淇敼涓存椂pdf
+//        String tempUrlPdf = wordToPdfTemp((StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl));
+//        insReport.setTempUrlPdf("/word/" + tempUrlPdf);
+//
+//        // 鍙戦�佷紒涓氬井淇¢�氱煡(閫氱煡鎵瑰噯浜哄鎵�)
+//        threadPoolTaskExecutor.execute(() -> {
+//            // 鏌ヨ璁㈠崟
+//            InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId());
+//            InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
+//                    .eq(InsSample::getInsOrderId, insReport.getInsOrderId())
+//                    .last("limit 1"));
+//            // 鏌ヨ鍘熸潗鏂�
+//            IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId());
+//
+//            String message = "";
+//            message += "鎶ュ憡缂栧埗鎵瑰噯閫氱煡";
+//            message += "\n妫�楠屼汉: " + userName;
+//            message += "\n澶嶆牳浜�: " + checkUserName;
+//            message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
+//            message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
+//            message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
+//            if (ifsInventoryQuantity != null) {
+//                message += "\n鐢熶骇鍘傚: " + ifsInventoryQuantity.getSupplierName();
+//                message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
+//            }
+//            //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡  鎻愪氦澶嶆牳
+//            try {
+//                WxCpUtils.inform(sendUserAccount, message, null);
+//            } catch (Exception e) {
+//                throw new RuntimeException(e);
+//            }
+//        });
+//        insReportMapper.updateById(insReport);
+//
+//        // 娓呯┖鎵瑰噯澶囨敞, 鎵瑰噯鏃堕棿, 鎵瑰噯鐘舵��
+//        insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate()
+//                .eq(InsReport::getId, insReport.getId())
+//                .set(InsReport::getExamineTell, null)
+//                .set(InsReport::getRatifyTime, null)
+//                .set(InsReport::getIsRatify, null));
+//        return 1;
+//    }
+//
+//    //鎵瑰噯
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int ratifyReport(Integer id, Integer isRatify, String ratifyTell) {
+//        InsReport insReport = insReportMapper.selectById(id);
+//        insReport.setIsRatify(isRatify);
+//        if (ObjectUtils.isNotEmpty(ratifyTell)) {
+//            insReport.setRatifyTell(ratifyTell);
+//        }
+//        insReport.setRatifyTime(LocalDateTime.now());//鎵瑰噯鏃堕棿
+//        if (isRatify == 0) {
+//
+//            // 鎵瑰噯浜�
+//            Integer ratifyUserId = getLook.selectPowerByMethodAndUserId(null).get("userId");
+//            String ratifyUserName = insProductMapper.selectUserById(ratifyUserId).get("name");
+//
+//            // 鍙戦�佷汉(瀹℃牳浜�)(妫�楠屼汉)
+//            // 妫�楠屼汉
+//            String userAccount = insProductMapper.selectUserById(insReport.getWriteUserId()).get("account");
+//            // 瀹℃牳浜�
+//            String checkUserAccount = insProductMapper.selectUserById(insReport.getExamineUserId()).get("account");
+//
+//
+//            // 鍙戦�佷紒涓氬井淇¢�氱煡(鎵瑰噯閫�鍥�)
+//            threadPoolTaskExecutor.execute(() -> {
+//                // 鏌ヨ璁㈠崟
+//                InsOrder order = insOrderMapper.selectById(insReport.getInsOrderId());
+//                InsSample insSample = insSampleMapper.selectOne(Wrappers.<InsSample>lambdaQuery()
+//                        .eq(InsSample::getInsOrderId, insReport.getInsOrderId())
+//                        .last("limit 1"));
+//                // 鏌ヨ鍘熸潗鏂�
+//                IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId());
+//
+//                String message = "";
+//                message += "鎶ュ憡缂栧埗鎵瑰噯閫�鍥為�氱煡";
+//                message += "\n鎵瑰噯浜�: " + ratifyUserName;
+//                message += "\n濮旀墭缂栧彿: " + order.getEntrustCode();
+//                message += "\n鏍峰搧鍚嶇О: " + insSample.getModel();
+//                message += "\n瑙勬牸鍨嬪彿: " + order.getPartDetail();
+//                if (ifsInventoryQuantity != null) {
+//                    message += "\n鎵规鍙�: " + ifsInventoryQuantity.getUpdateBatchNo();
+//                }
+//                message += "\n閫�鍥炲師鍥�: " + ratifyTell;
+//                //鍙戦�佷紒涓氬井淇℃秷鎭�氱煡  鎻愪氦澶嶆牳
+//                try {
+//                    // 瀹℃壒浜�
+//                    WxCpUtils.inform(checkUserAccount, message, null);
+//
+//                    // 妫�楠屼汉
+//                    WxCpUtils.inform(userAccount, message, null);
+//                } catch (Exception e) {
+//                    throw new RuntimeException(e);
+//                }
+//            });
+//
+//            //濡傛灉鎵瑰噯涓嶉�氳繃 鐩存帴閫�鍥炲埌鎻愪氦浜洪偅杈瑰幓
+//            insReport.setState(0);
+//            insReport.setIsExamine(0);
+//            return insReportMapper.updateById(insReport);
+//        }
+//        //鑾峰彇鎵瑰噯浜虹殑绛惧悕鍦板潃
+//        String signatureUrl;
+//        try {
+//            signatureUrl = userMapper.selectById(insReport.getRatifyUserId()).getSignatureUrl();
+//        } catch (Exception e) {
+//            throw new ErrorException("鎵句笉鍒版壒鍑嗕汉鐨勭鍚�");
+//        }
+//        if (StringUtils.isBlank(signatureUrl)) {
+//            throw new ErrorException("鎵句笉鍒版壒鍑嗕汉鐨勭鍚�");
+//        }
+//        Integer insOrderId = insReportMapper.selectById(id).getInsOrderId();
+//        InsOrder order = insOrderMapper.selectById(insOrderId);
+//        boolean isRawMater = order.getTypeSource() != null && order.getTypeSource().equals(1);
+//
+//        //鑾峰彇鍦烘墍鐨勬姤鍛婁笓鐢ㄧ珷
+//        String sealUrl;
+//        String laboratory = insOrderMapper.selectById(insReport.getInsOrderId()).getLaboratory();
+//        try {
+//            String type = "";
+//            if (isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
+//                type = "杩涘巶鎶ュ憡";
+//            } else {
+//                type = "濮旀墭鎶ュ憡";
+//            }
+//            sealUrl = insReportMapper.getLaboratoryByName(laboratory, type);
+//        } catch (Exception e) {
+//            throw new ErrorException(laboratory + "鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
+//        }
+//        if (StringUtils.isBlank(sealUrl)) {
+//            throw new ErrorException(laboratory + "鎵句笉鍒版姤鍛婁笓鐢ㄧ珷");
+//        }
+//        //绯荤粺鐢熸垚鎶ュ憡鍦板潃
+//        String url = insReport.getUrl();
+//        //鎵嬪姩涓婁紶鎶ュ憡鍦板潃
+//        String urlS = insReport.getUrlS();
+//        String finalUrl = (StrUtil.isBlank(urlS) ? url : urlS).replace("/word", wordUrl);
+//
+//        wordInsertUrl(new HashMap<String, Object>() {{
+//            put("ratifyUrl", Pictures.ofLocal(imgUrl + "/" + signatureUrl).create());
+//            put("ratifyDateUrl", Pictures.ofStream(DateImageUtil.createDateImage(null)).create());
+//            put("seal1", Pictures.ofLocal(imgUrl + "/" + sealUrl).create());
+//            put("seal2", Pictures.ofLocal(imgUrl + "/" + sealUrl).create());
+//        }}, finalUrl);
+//
+//        // 淇敼涓存椂pdf
+//        insReport.setTempUrlPdf((StrUtil.isBlank(urlS) ? url : urlS).replace(".docx", ".pdf"));
+//
+//        InsOrder insOrder = new InsOrder();
+//        insOrder.setId(insOrderId);
+//        insOrder.setState(4);
+//        insOrderMapper.updateById(insOrder);
+//
+//        wordToPdf(finalUrl, sealUrl, isRawMater && order.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY));
+//
+//        // 鍒ゆ柇鏄惁涓哄師鏉愭枡
+//        if (isRawMater) {
+//            // 淇敼ifs搴撳瓨鐘舵��
+//            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                    .set(IfsInventoryQuantity::getState, 2)
+//                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
+//        }
+//        insReport.setRatifyTell("");
+//
+//        // 鍙戦�佹枃浠跺埌濮旀墭浜�
+//        if (StringUtils.isNotBlank(order.getPrepareCode())) {
+//            threadPoolTaskExecutor.execute(() -> {
+//                String message = "";
+//                message += "濮旀墭缂栧彿: " + order.getEntrustCode();
+//                message += "濮旀墭鏍峰搧: " + order.getSampleView();
+//                message += "宸叉娴嬬粨鏉�, 璇锋帴鏀�";
+//                try {
+//                    WxCpUtils.inform(order.getPrepareCode(), message, new File(finalUrl.replace(".docx", ".pdf")));
+//                } catch (Exception e) {
+//                    throw new RuntimeException(e);
+//                }
+//            });
+//        }
+//
+//        return insReportMapper.updateById(insReport);
+//    }
+//
+//    @Override
+//    public int wordInsertUrl(Map<String, Object> map, String url) {
+//        XWPFTemplate template = XWPFTemplate.compile(url).render(map);
+//        try {
+//            template.writeAndClose(Files.newOutputStream(Paths.get(url)));
+//        } catch (IOException e) {
+//            throw new RuntimeException(e);
+//        }
+//        return 1;
+//    }
+//
+//
+//    //鎶ュ憡鎵归噺涓嬭浇
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public String downAll(String ids) {
+//        List<Long> list = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList());
+//        List<InsReport> insReports = insReportMapper.selectBatchIds(list);
+//        String zipFilePath = null;
+//        // 涓存椂鏂囦欢澶硅矾寰�
+//        try {
+//            String tempFolderPath = wordUrl + "/tempFolder";
+//            File tempFolder = new File(tempFolderPath);
+//            if (tempFolder.exists()) {
+//                deleteDirectory(tempFolder); // 鍒犻櫎鏃х殑涓存椂鏂囦欢澶�
+//            }
+//            tempFolder.mkdirs(); // 鍒涘缓鏂扮殑涓存椂鏂囦欢澶�
+//            for (InsReport insReport : insReports) {
+//                File sourceFile = new File((ObjectUtils.isNotEmpty(insReport.getUrlS()) ? insReport.getUrlS() : insReport.getUrl()).replace("/word", wordUrl));
+//                File destinationFile = new File(tempFolder, sourceFile.getName());
+//                Files.copy(sourceFile.toPath(), destinationFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
+//            }
+//            // 鍘嬬缉涓存椂鏂囦欢澶�
+//            zipFilePath = wordUrl + "/zip/output.zip";
+//            zipDirectory(tempFolderPath, zipFilePath);
+//
+//            // 娓呯悊涓存椂鏂囦欢澶�
+//            deleteDirectory(tempFolder);
+//
+//            System.out.println("ZIP鏂囦欢鍒涘缓瀹屾垚锛�");
+//        } catch (IOException e) {
+//            e.printStackTrace();
+//        }
+//        return "/word/zip/output.zip";
+//    }
+//
+//    //鎵归噺涓婁紶
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int upAll(MultipartFile file) throws IOException {
+//        File tempFile = null;
+//        File unzipDir = null;
+//        try {
+//            tempFile = File.createTempFile(wordUrl, ".zip");
+//            file.transferTo(tempFile);
+//
+//            unzipDir = new File("uploaded_files");
+//            if (!unzipDir.exists()) {
+//                unzipDir.mkdir();
+//            }
+//            unzip(tempFile, unzipDir);
+//            // 澶勭悊瑙e帇鍚庣殑鏂囦欢
+//            File[] files = unzipDir.listFiles();
+//            if (files != null) {
+//                for (File f : files) {
+//                    // 鏍规嵁鏂囦欢鍚嶆煡璇d
+//                    String name = f.getName();
+//                    InsReport insReport = insReportMapper.selectOne(Wrappers.<InsReport>lambdaQuery().like(InsReport::getCode, f.getName().replace(".docx", "").replace("JCZX", "JCZX/")));
+//                    if (ObjectUtils.isEmpty(insReport)) {
+//                        throw new ErrorException("娌℃湁鎵惧埌 " + f.getName() + " 杩欎釜鏂囦欢瀵瑰簲鐨勬姤鍛婃暟鎹�");
+//                    }
+//                    String urlString;
+//                    String pathName;
+//                    try {
+//                        String path = wordUrl;
+//                        File realpath = new File(path);
+//                        if (!realpath.exists()) {
+//                            realpath.mkdirs();
+//                        }
+//                        pathName = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyMMddHHmmss")) + "_" + f.getName();
+//                        urlString = realpath + "/" + pathName;
+//                        // 澶嶅埗鏂囦欢鍒版寚瀹氳矾寰�
+//                        Files.copy(f.toPath(), new File(urlString).toPath(), StandardCopyOption.REPLACE_EXISTING);
+//                        inReport("/word/" + pathName, insReport.getId());
+//                    } catch (IOException e) {
+//                        throw new ErrorException("鏂囦欢涓婁紶澶辫触");
+//                    }
+//                }
+//            }
+//        } catch (IOException e) {
+//            throw new ErrorException("鏂囦欢澶勭悊澶辫触");
+//        } finally {
+//            if (tempFile != null && tempFile.exists()) {
+//                tempFile.delete();
+//            }
+//            // 閫掑綊鍒犻櫎瑙e帇鐩綍鍙婂叾涓殑鏂囦欢
+//            if (unzipDir.exists()) {
+//                deleteDirectory(unzipDir); // 鍒犻櫎鏃х殑涓存椂鏂囦欢澶�
+//            }
+//        }
+//        return 0;
+//    }
+//
+//
+//    //瑙e帇鏂囦欢澶�
+//    private void unzip(File zipFile, File destDir) throws IOException {
+//        try (ZipFile zip = new ZipFile(zipFile)) {
+//            Enumeration<? extends ZipEntry> entries = zip.entries();
+//            while (entries.hasMoreElements()) {
+//                ZipEntry entry = entries.nextElement();
+//                File file = new File(destDir, entry.getName());
+//                if (entry.isDirectory()) {
+//                    file.mkdirs();
+//                } else {
+//                    file.getParentFile().mkdirs();
+//                    try (InputStream in = zip.getInputStream(entry);
+//                         OutputStream out = new FileOutputStream(file)) {
+//                        byte[] buffer = new byte[1024];
+//                        int len;
+//                        while ((len = in.read(buffer)) > 0) {
+//                            out.write(buffer, 0, len);
+//                        }
+//                    }
+//                }
+//            }
+//        }
+//    }
+//
+//    // 鍘嬬缉鏂囦欢澶�
+//    public static void zipDirectory(String sourceDirPath, String zipFilePath) throws IOException {
+//        try (ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(zipFilePath))) {
+//            Path sourceDir = Paths.get(sourceDirPath);
+//            Files.walk(sourceDir)
+//                    .filter(path -> !Files.isDirectory(path))
+//                    .forEach(path -> {
+//                        ZipEntry zipEntry = new ZipEntry(sourceDir.relativize(path).toString());
+//                        try {
+//                            zipOut.putNextEntry(zipEntry);
+//                            Files.copy(path, zipOut);
+//                            zipOut.closeEntry();
+//                        } catch (IOException e) {
+//                            e.printStackTrace();
+//                        }
+//                    });
+//        }
+//    }
+//
+//    // 鍒犻櫎鏂囦欢澶瑰強鍏跺唴瀹�
+//    public static void deleteDirectory(File directory) throws IOException {
+//        if (directory.isDirectory()) {
+//            File[] files = directory.listFiles();
+//            if (files != null) {
+//                for (File file : files) {
+//                    deleteDirectory(file);
+//                }
+//            }
+//        }
+//        Files.delete(directory.toPath());
+//    }
+//
+//    @Override
+//    public void wordToPdf(String path, String sealUrl, boolean isRawMater) {
+//        try {
+//            wordToPdf(path, path.replace(".docx", ".pdf"), sealUrl, isRawMater);
+//        } catch (Exception e) {
+//            throw new ErrorException("杞崲澶辫触");
+//        }
+//    }
+//
+//
+//    public String wordToPdf(String wordPath, String pdfPath, String sealUrl, boolean isRawMater) {
+//        FileOutputStream os = null;
+//        try {
+//            //鍑瘉 涓嶇劧鍒囨崲鍚庢湁姘村嵃
+////            InputStream is = this.getClass().getResourceAsStream("/lib/license.xml");
+////            InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("license.xml");
+//            InputStream is = Files.newInputStream(new File(licenseUrl).toPath());
+//            License license = new License();
+//            license.setLicense(is);
+//            if (!license.getIsLicensed()) {
+//                System.out.println("License楠岃瘉涓嶉�氳繃...");
+//                return null;
+//            }
+//            //鐢熸垚涓�涓┖鐨凱DF鏂囦欢
+//            File file;
+//            //鍒ゆ柇鏄惁鏄繘鍘傛姤鍛�
+//            if (!isRawMater) {
+//                file = new File(pdfPath.replace(".pdf", "-1.pdf"));
+//            } else {
+//                file = new File(pdfPath.replace(".pdf", ".pdf"));
+//            }
+//            os = new FileOutputStream(file);
+//            //瑕佽浆鎹㈢殑word鏂囦欢
+//            com.aspose.words.Document doc = new com.aspose.words.Document(wordPath);
+//            doc.save(os, SaveFormat.PDF);
+//
+//            //娣诲姞楠戠紳绔�
+//            if (!isRawMater) {
+//                stamperCheckMarkPDF(pdfPath.replace(".pdf", "-1.pdf"), pdfPath, imgUrl + "/" + sealUrl);
+//            }
+//
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        } finally {
+//            if (os != null) {
+//                try {
+//                    os.close();
+//                } catch (IOException e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//        }
+//        return null;
+//    }
+//
+//    /**
+//     * 鍒囧壊鍥剧墖
+//     *
+//     * @param Path 鍥剧墖璺緞
+//     * @param n    鍒囧壊浠芥暟
+//     */
+//    public static com.itextpdf.text.Image[] slicingImages(String Path, int n) throws IOException, BadElementException {
+//        com.itextpdf.text.Image[] nImage = new com.itextpdf.text.Image[n];
+//        BufferedImage img = ImageIO.read(new File(Path));
+//
+//        int h = img.getHeight();
+//        int w = img.getWidth();
+//
+//        int sw = w / n;
+//        for (int i = 0; i < n; i++) {
+//            BufferedImage subImg;
+//            if (i == n - 1) {//鏈�鍚庡墿浣欓儴鍒�
+//                subImg = img.getSubimage(i * sw, 0, w - i * sw, h);
+//            } else {//鍓峮-1鍧楀潎鍖�鍒�
+//                subImg = img.getSubimage(i * sw, 0, sw, h);
+//            }
+//            ByteArrayOutputStream out = new ByteArrayOutputStream();
+//            ImageIO.write(subImg, Path.substring(Path.lastIndexOf('.') + 1), out);
+//            nImage[i] = com.itextpdf.text.Image.getInstance(out.toByteArray());
+//
+//        }
+//        return nImage;
+//    }
+//
+//    /**
+//     * 鐩栭獞缂濈珷
+//     *
+//     * @param infilePath  鍘烶DF璺緞
+//     * @param outFilePath 杈撳嚭PDF璺緞
+//     */
+//    public static void stamperCheckMarkPDF(String infilePath, String outFilePath, String picPath) throws IOException, DocumentException {
+//        PdfReader reader = new PdfReader(infilePath);//閫夋嫨闇�瑕佸嵃绔犵殑pdf
+//        PdfStamper stamp = new PdfStamper(reader, new FileOutputStream(outFilePath));//鍔犲畬鍗扮珷鍚庣殑pdf
+//
+//
+//        com.itextpdf.text.Rectangle pageSize = reader.getPageSize(1);//鑾峰緱绗竴椤�
+//        float height = pageSize.getHeight();
+//        float width = pageSize.getWidth();
+//
+//        int nums = reader.getNumberOfPages();
+//        com.itextpdf.text.Image[] nImage = slicingImages(picPath, nums);//鐢熸垚楠戠紳绔犲垏鍓插浘鐗�
+//
+//        for (int n = 1; n <= nums; n++) {
+//            PdfContentByte over = stamp.getOverContent(n);//璁剧疆鍦ㄧ鍑犻〉鎵撳嵃鍗扮珷
+//            com.itextpdf.text.Image img = nImage[n - 1];//閫夋嫨鍥剧墖
+//            float newHeight = 100f;
+//            float newWidth = img.getWidth() / (img.getHeight() / 100);
+//            img.scaleAbsolute(newWidth, newHeight);//鎺у埗鍥剧墖澶у皬
+//            img.setAbsolutePosition(width - newWidth, height / 2 - newHeight / 2);//鎺у埗鍥剧墖浣嶇疆
+//            over.addImage(img);
+//        }
+//        stamp.close();
+//    }
+//
+//    @Transactional(rollbackFor = Exception.class)
+//    public void isRawMaterial(InsOrder insOrder) {
+//        IfsInventoryQuantity one = ifsInventoryQuantityMapper.selectOne(new LambdaQueryWrapper<IfsInventoryQuantity>()
+//                .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
+//        if (Objects.isNull(one)) {
+//            throw new ErrorException("鎵句笉鍒板師鏉愭枡淇℃伅");
+//        }
+//        // 鍒ゆ柇鏄惁鏈変笉鍚堟牸淇℃伅
+//        Long count = insUnqualifiedHandlerMapper.selectCount(Wrappers.<InsUnqualifiedHandler>lambdaQuery()
+//                .eq(InsUnqualifiedHandler::getInventoryQuantityId, one.getId()));
+//        String toLocation = null;
+//
+//        // 鍒ゆ柇鏄惁鏈変笉鍚堟牸
+//        Long unqualifiedCount = getUnqualifiedCount(insOrder);
+//
+//        if (count.equals(0L) && unqualifiedCount.equals(0L) && one.getIsFinish().equals(0) && one.getIsSource().equals(1)) {
+//            // 鍘熸潗鏂欑Щ搴�
+//            toLocation = this.moveRawMaterial(one);
+//        }
+//
+//        // 鍒ゆ柇缁撴潫鐘舵�佷慨鏀瑰悎鏍肩姸鎬�
+//        int inspectStatus = (count == 0 && unqualifiedCount == 0) ? 1 : 2;
+//        insOrderMapper.update(null, Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getId, insOrder.getId())
+//                .set(InsOrder::getInsResult, inspectStatus));
+//
+//        if (one.getIsFinish().equals(0)) {
+//            ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                    .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId())
+//                    .set(IfsInventoryQuantity::getInspectStatus, inspectStatus));
+//
+//            // 淇敼ifs搴撳瓨鐘舵��
+//            if (StringUtils.isBlank(toLocation)) {
+//                ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                        .set(IfsInventoryQuantity::getIsFinish, 1)
+//                        .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
+//            } else {
+//                ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                        .set(IfsInventoryQuantity::getIsFinish, 1)
+//                        .set(IfsInventoryQuantity::getToLocation, toLocation)
+//                        .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
+//            }
+//
+//            threadPoolTaskExecutor.execute(() -> {
+//                // 浼佷笟寰俊閫氱煡
+//                String message = "";
+//                message += "妫�娴嬬粨鏋滄彁浜ら�氱煡";
+//                message += "\n鎵规鍙�: " + one.getUpdateBatchNo();
+//                message += "\n闆朵欢鍙�: " + one.getPartNo();
+//                message += "\n闆朵欢鎻忚堪: " + one.getPartDesc();
+//                message += "\n渚涘簲鍟嗗悕绉�: " + one.getSupplierName();
+//                message += "\n鎶佃揪鏁伴噺: " + one.getQtyArrived().stripTrailingZeros().toPlainString() + one.getBuyUnitMeas();
+//                // 鍙戦�佷紒涓歩nspectStatus淇¢�氱煡
+//                if (inspectStatus == 1) {
+//                    message += "\n妫�娴嬬粨鏋�: 鍚堟牸";
+//                } else {
+//                    message += "\n妫�娴嬬粨鏋�: 涓嶅悎鏍�";
+//                }
+//                WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
+//            });
+//
+//        }
+//
+//
+//    }
+//
+//    /**
+//     * 鍒ゆ柇鏄惁鏈変笉鍚堟牸
+//     * @param insOrder
+//     * @return
+//     */
+//    @Override
+//    public Long getUnqualifiedCount(InsOrder insOrder) {
+//        Long unqualifiedCount = 0L;
+//        List<InsSample> insSamples = insSampleMapper.selectList(Wrappers.<InsSample>lambdaQuery()
+//                .eq(InsSample::getInsOrderId, insOrder.getId()));
+//        if (CollectionUtils.isNotEmpty(insSamples)) {
+//            unqualifiedCount = insProductMapper.selectCount(Wrappers.<InsProduct>lambdaQuery()
+//                    .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).collect(Collectors.toList()))
+//                    .eq(InsProduct::getInsResult, 0));
+//
+//            // 鍒ゆ柇濡傛灉鏈変笉鍚堟牸鐨勬楠岄」, 鍒ゆ柇鏈夋病鏈夋楠岄」澶嶆祴, 澶嶆牳鍚堟牸涔熺畻鍚堟牸閫氳繃
+//            if (!unqualifiedCount.equals(0L)) {
+//                List<InsProduct> insProducts = insProductMapper.selectList(Wrappers.<InsProduct>lambdaQuery()
+//                        .in(InsProduct::getInsSampleId, insSamples.stream().map(InsSample::getId).collect(Collectors.toList()))
+//                        .eq(InsProduct::getInsResult, 0));
+//
+//                boolean flag = true;
+//                for (InsProduct insProduct : insProducts) {
+//                    Long unqualifiedProductCount = insUnqualifiedRetestProductMapper.selectCount(Wrappers.<InsUnqualifiedRetestProduct>lambdaQuery()
+//                            .eq(InsUnqualifiedRetestProduct::getInsProductId, insProduct.getId())
+//                            .ne(InsUnqualifiedRetestProduct::getInsResult, 0));
+//                    if (unqualifiedProductCount != 2) {
+//                        flag = false;
+//                    }
+//                }
+//                if (flag) {
+//                    unqualifiedCount = 0L;
+//                }
+//            }
+//        }
+//        return unqualifiedCount;
+//    }
+//
+//    /**
+//     * ifs绉诲簱鎿嶄綔
+//     * @param one
+//     * @return
+//     */
+//    @Override
+//    public String moveRawMaterial(IfsInventoryQuantity one) {
+//        String toLocation;
+//        // 鐧昏閲囪喘妫�楠岀粨鏋淪TD
+//        if (one.getIsRegister().equals(0)) {
+//            Map<String, Object> resultMap = new HashMap<>();
+//            List<Map<String, Object>> resultList = new ArrayList<>();
+//            Map<String, Object> map = new HashMap<>();
+//            map.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙�
+//            map.put("LINE_NO", one.getLineNo()); // 琛屽彿
+//            map.put("RELEASE_NO", one.getReleaseNo()); // 涓嬭揪鍙�
+//            map.put("RECEIPT_NO", one.getReceiptNo()); // 鎺ユ敹鍙�
+//            map.put("PURCH_QTY", one.getQtyToInspect()); // 瑕佹楠岀殑閲囪喘鏁伴噺
+//            resultList.add(map);
+//            resultMap.put("RECORD_ID", UUID.randomUUID().toString());
+//            resultMap.put("SYSCODE", "LIMS");
+//            resultMap.put("SYSMODEL", "鐧昏閲囪喘妫�楠岀粨鏋�");
+//            resultMap.put("BATCH_INFO", resultList);
+//            Result result = ifsApiUtils.getProcurementResults(JSONUtil.toJsonStr(resultMap));
+//            if (result.getCode() != 200) {
+//                throw new ErrorException("IFS鐧昏閲囪喘妫�楠岀粨鏋滃け璐�: " + result.getMessage());
+//            }
+//        }
+//        insOrderService.updateIfsInventoryQuantity(one.getId());
+//        /**
+//         * TODO 鍚庣画闇�瑕佽皟鐢↖FS鐨勬帴鍙� 绉诲叆鐨勫簱浣嶅彿 toLocation
+//         */
+//        // 妫�楠屽悗绉诲簱
+//        toLocation = "1301";
+//        Map<String, Object> moveResultMap = new HashMap<>();
+//        List<Map<String, Object>> moveResultList = new ArrayList<>();
+//        Map<String, Object> moveMap = new HashMap<>();
+//        moveMap.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙�
+//        moveMap.put("LINE_NO", one.getLineNo());
+//        moveMap.put("RELEASE_NO", one.getReleaseNo());
+//        moveMap.put("RECEIPT_NO", one.getReceiptNo());
+//        moveMap.put("PART_NO", one.getPartNo());
+//        moveMap.put("QTY", one.getQtyArrived());
+//        moveMap.put("LOCATION_NO", one.getLocationNo());
+//        moveMap.put("TO_LOCATION_NO", toLocation);
+//        moveMap.put("LOT_BATCH_NO", one.getLotBatchNo());
+//        moveMap.put("SERIAL_NO", one.getSerialNo());
+//        moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo());
+//        moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel());
+//        moveMap.put("ACTIVITY_SEQ", one.getActivitySeq());
+//        moveResultList.add(moveMap);
+//        moveResultMap.put("RECORD_ID", UUID.randomUUID().toString());
+//        moveResultMap.put("SYSCODE", "LIMS");
+//        moveResultMap.put("SYSMODEL", "妫�楠屽悗绉诲簱");
+//        moveResultMap.put("BATCH_INFO", moveResultList);
+//
+//        Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap));
+//        // 濡傛灉鏈夊繀椤讳负闆朵欢鎸囧畾鎵瑰彿鎶ラ敊闇�瑕侀噸鏂版彁浜ょЩ搴撲俊鎭幓鎸囧畾鎵瑰彿
+//        if (result1.getCode() != 200) {
+//            String message = result1.getMessage();
+//            if (message.contains("蹇呴』涓洪浂浠�") && message.contains("鎸囧畾鎵瑰彿")) {
+//                updaeBatch(one, toLocation);
+//            } else {
+//                throw new ErrorException("IFS妫�楠屽悗绉诲簱澶辫触: " + result1.getMessage());
+//            }
+//        }
+//        return toLocation;
+//    }
+//
+//    /**
+//     * 閫�鍥炲埌妫�楠屼换鍔�
+//     * @param id
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public boolean sendBackTask(Integer id) {
+//        InsReport report = insReportMapper.selectById(id);
+//        // 鏍规嵁璁㈠崟鏌ヨ璇曢獙瀹�
+//        String laboratory = insOrderMapper.selectLaboratoryByOrderId(report.getInsOrderId());
+//
+//        // 淇敼璁㈠崟鐘舵��
+//        insOrderStateMapper.update(null, Wrappers.<InsOrderState>lambdaUpdate()
+//                .eq(InsOrderState::getInsOrderId, report.getInsOrderId())
+//                .eq(InsOrderState::getLaboratory, laboratory)
+//                .set(InsOrderState::getInsState, 4));
+//
+//        Integer insSampleId = insSampleUserMapper.selectOne(Wrappers.<InsSampleUser>lambdaQuery()
+//                .eq(InsSampleUser::getInsSampleId, report.getInsOrderId())
+//                .orderByDesc(InsSampleUser::getId)
+//                .last("limit 1")).getId();
+//        insSampleUserMapper.deleteById(insSampleId);
+//
+//        // 淇敼鎶ュ憡琛屼负鏈樉绀�
+//        insReportMapper.update(null, Wrappers.<InsReport>lambdaUpdate()
+//                .eq(InsReport::getId, id)
+//                .set(InsReport::getIsPass, 0));
+//
+//        return false;
+//    }
+//
+//
+//    /**
+//     * 鍏堜慨鏀归噰璐鍗曟壒娆″彿, 鍚庤繘琛岀Щ搴撴搷浣�
+//     * @param one
+//     * @param toLocation
+//     */
+//    private void updaeBatch(IfsInventoryQuantity one, String toLocation) {
+//        if (one.getIsUpdateBatch().equals(0)) {
+//            // 鍏堜慨鏀规壒娆″彿鍚庤繘琛岀Щ搴�
+//            Map<String, Object> resultMap = new HashMap<>();
+//            List<Map<String, Object>> resultList = new ArrayList<>();
+//            Map<String, Object> map = new HashMap<>();
+//            map.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙�
+//            map.put("LINE_NO", one.getLineNo()); // 琛屽彿
+//            map.put("RELEASE_NO", one.getReleaseNo()); // 涓嬭揪鍙�
+//            map.put("RECEIPT_NO", one.getReceiptNo()); // 鎺ユ敹鍙�
+//            map.put("PART_NO", one.getPartNo()); //闆朵欢鍙�
+//            map.put("CONFIGURATION_ID", one.getConfigurationId()); // 閰嶇疆鏍囪瘑
+//            map.put("LOCATION_NO", one.getLocationNo()); // 搴撲綅鍙�
+//            map.put("LOT_BATCH_NO", one.getLotBatchNo());// 鎵规鍙�
+//            map.put("NEW_LOT_BATCH_NO", one.getUpdateBatchNo()); // 鐩爣鎵规鍙�
+//            map.put("SERIAL_NO", one.getSerialNo()); // 搴忓垪鍙�
+//            map.put("ENG_CHG_LEVEL", one.getEngChgLevel()); // 鐗堟湰鍙�
+//            map.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo()); // wdr鍙�
+//            map.put("ACTIVITY_SEQ", one.getActivitySeq()); // 娲诲姩搴忓彿
+//            map.put("QTY_TO_CHANGE", one.getQtyArrived()); // 鍙樻洿鏁伴噺
+//            resultList.add(map);
+//            resultMap.put("RECORD_ID", UUID.randomUUID().toString());
+//            resultMap.put("SYSCODE", "LIMS");
+//            resultMap.put("SYSMODEL", "淇敼閲囪喘璁㈠崟鎵规鍙�");
+//            resultMap.put("BATCH_INFO", resultList);
+//
+//            Result result = ifsApiUtils.updateMoveReceiptLot(JSONUtil.toJsonStr(resultMap));
+//
+//            if (result.getCode() != 200) {
+//                throw new ErrorException("IFS淇敼鎵规鍙峰け璐�: " + result.getMessage());
+//            }
+//            ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                    .set(IfsInventoryQuantity::getIsUpdateBatch, 1)
+//                    .eq(IfsInventoryQuantity::getId, one.getId()));
+//        }
+//
+//        Map<String, Object> moveResultMap = new HashMap<>();
+//        List<Map<String, Object>> moveResultList = new ArrayList<>();
+//        Map<String, Object> moveMap = new HashMap<>();
+//        moveMap.put("ORDER_NO", one.getOrderNo()); // 閲囪喘璁㈠崟鍙�
+//        moveMap.put("LINE_NO", one.getLineNo());
+//        moveMap.put("RELEASE_NO", one.getReleaseNo());
+//        moveMap.put("RECEIPT_NO", one.getReceiptNo());
+//        moveMap.put("PART_NO", one.getPartNo());
+//        moveMap.put("QTY", one.getQtyArrived());
+//        moveMap.put("LOCATION_NO", one.getLocationNo());
+//        moveMap.put("TO_LOCATION_NO", toLocation);
+//        moveMap.put("LOT_BATCH_NO", one.getUpdateBatchNo());
+//        moveMap.put("SERIAL_NO", one.getSerialNo());
+//        moveMap.put("WAIV_DEV_REJ_NO", one.getWaivDevRejNo());
+//        moveMap.put("ENG_CHG_LEVEL", one.getEngChgLevel());
+//        moveMap.put("ACTIVITY_SEQ", one.getActivitySeq());
+//        moveResultList.add(moveMap);
+//        moveResultMap.put("RECORD_ID", UUID.randomUUID().toString());
+//        moveResultMap.put("SYSCODE", "LIMS");
+//        moveResultMap.put("SYSMODEL", "妫�楠屽悗绉诲簱");
+//        moveResultMap.put("BATCH_INFO", moveResultList);
+//
+//        Result result1 = ifsApiUtils.moveReceipt(JSONUtil.toJsonStr(moveResultMap));
+//        if (result1.getCode() != 200) {
+//            throw new ErrorException("IFS妫�楠屽悗绉诲簱澶辫触: " + result1.getMessage());
+//        }
+//
+//    }
+//
+//    /**
+//     * 鏇挎崲娈佃惤鏂囨湰
+//     * @param filePath docx瑙f瀽瀵硅薄
+//     * @param textMap 闇�瑕佹浛鎹㈢殑淇℃伅闆嗗悎
+//     */
+//    public static void changeText(Map<String, String> textMap, String filePath) {
+//        try {
+//            FileInputStream stream = new FileInputStream(filePath);
+//            XWPFDocument document = new XWPFDocument(stream);
+//            List<XWPFTable> tables = document.getTables();
+//            for (XWPFTable table : tables) {
+//                for (XWPFTableRow row : table.getRows()) {
+//                    for (XWPFTableCell cell : row.getTableCells()) {
+//
+//                        textMap.forEach((s, s2) -> {
+//                            if (cell.getText().equals(s)) {
+//                                XWPFParagraph paragraph = cell.getParagraphs().get(0);
+//                                XWPFRun oldRun = paragraph.getRuns().get(0);
+//                                // 淇濆瓨鍘熸牱寮�
+//                                String fontFamily = oldRun.getFontFamily();
+//                                int fontSize = oldRun.getFontSize();
+//                                String color = oldRun.getColor();
+//                                ParagraphAlignment alignment = paragraph.getAlignment();
+//                                // 鏇挎崲鍐呭
+//                                paragraph.removeRun(0); // 绉婚櫎鍘熸湁鐨� run
+//                                XWPFRun newRun = paragraph.createRun();
+//                                newRun.setText(s2);
+//                                // 搴旂敤鍘熸牱寮�
+//                                newRun.setFontFamily(fontFamily);
+//                                newRun.setFontSize(fontSize);
+//                                newRun.setColor(color);
+//                                paragraph.setAlignment(alignment);
+//                            }
+//                        });
+//                    }
+//                }
+//            }
+//            FileOutputStream fileOutputStream = new FileOutputStream(filePath);
+//            document.write(fileOutputStream);
+//            fileOutputStream.close();
+//
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//            throw new ErrorException(e.getMessage());
+//        }
+//    }
+//
+//    /**
+//     * word杞崲pdf
+//     * @param path
+//     * @return
+//     */
+//    private String wordToPdfTemp(String path) {
+//        try {
+//            return wordToPdf(path, path.replace(".docx", "-涓存椂.pdf"));
+//        } catch (Exception e) {
+//            throw new ErrorException("杞崲澶辫触");
+//        }
+//    }
+//
+//    private String wordToPdf(String wordPath, String pdfPath) {
+//        FileOutputStream os = null;
+//        try {
+//            //鍑瘉 涓嶇劧鍒囨崲鍚庢湁姘村嵃
+//            InputStream is = Files.newInputStream(new File(licenseUrl).toPath());
+//            License license = new License();
+//            license.setLicense(is);
+//            if (!license.getIsLicensed()) {
+//                System.out.println("License楠岃瘉涓嶉�氳繃...");
+//                return null;
+//            }
+//            //鐢熸垚涓�涓┖鐨凱DF鏂囦欢
+//            File file;
+//            //鍒ゆ柇鏄惁鏄繘鍘傛姤鍛�
+//            file = new File(pdfPath);
+//            os = new FileOutputStream(file);
+//            //瑕佽浆鎹㈢殑word鏂囦欢
+//            com.aspose.words.Document doc = new com.aspose.words.Document(wordPath);
+//            doc.save(os, SaveFormat.PDF);
+//            String name = file.getName();
+//            return file.getName();
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        } finally {
+//            if (os != null) {
+//                try {
+//                    os.close();
+//                } catch (IOException e) {
+//                    e.printStackTrace();
+//                }
+//            }
+//        }
+//        return null;
+//    }
+//}
+//
+//
+//
+//
+//
+//
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsSampleServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsSampleServiceImpl.java
new file mode 100644
index 0000000..f16964d
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsSampleServiceImpl.java
@@ -0,0 +1,22 @@
+package com.ruoyi.inspect.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.inspect.mapper.InsSampleMapper;
+import com.ruoyi.inspect.pojo.InsSample;
+import com.ruoyi.inspect.service.InsSampleService;
+import org.springframework.stereotype.Service;
+
+/**
+* @author Administrator
+* @description 閽堝琛ㄣ�恑ns_sample(妫�楠屾牱鍝�)銆戠殑鏁版嵁搴撴搷浣淪ervice瀹炵幇
+* @createDate 2024-03-14 17:14:57
+*/
+@Service
+public class InsSampleServiceImpl extends ServiceImpl<InsSampleMapper, InsSample>
+    implements InsSampleService {
+
+}
+
+
+
+
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
index 4c81840..1faaee4 100644
--- a/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/service/impl/RawMaterialOrderServiceImpl.java
@@ -1,861 +1,847 @@
-package com.ruoyi.inspect.service.impl;
-
-import cn.hutool.core.collection.CollUtil;
-import cn.hutool.core.collection.CollectionUtil;
-import cn.hutool.core.date.DateTime;
-import cn.hutool.core.date.DateUtil;
-import cn.hutool.core.util.StrUtil;
-import com.alibaba.excel.EasyExcel;
-import com.alibaba.excel.ExcelWriter;
-import com.alibaba.excel.write.metadata.WriteSheet;
-import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
-import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
-import com.baomidou.mybatisplus.core.metadata.IPage;
-import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
-import com.baomidou.mybatisplus.core.toolkit.StringUtils;
-import com.baomidou.mybatisplus.core.toolkit.Wrappers;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.ruoyi.basic.dto.FactoryDto;
-import com.ruoyi.basic.dto.LaboratoryDto;
-import com.ruoyi.inspect.dto.RawMaterialStandardTreeDto;
-import com.ruoyi.basic.dto.SampleTypeDto;
-import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
-import com.ruoyi.basic.mapper.StandardTreeMapper;
-import com.ruoyi.inspect.pojo.InsOrder;
-import com.ruoyi.inspect.service.InsOrderService;
-import com.ruoyi.inspect.service.RawMaterialOrderService;
-import com.ruoyi.common.numgen.NumberGenerator;
-import com.ruoyi.framework.exception.ErrorException;
-import com.ruoyi.system.mapper.UserMapper;
-import lombok.AllArgsConstructor;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.UnsupportedEncodingException;
-import java.math.BigDecimal;
-import java.net.URLEncoder;
-import java.text.SimpleDateFormat;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import java.util.concurrent.atomic.AtomicInteger;
-
-/**
- * @Author zhuo
- * @Date 2024/7/31
- */
-@Service
-@AllArgsConstructor
-public class RawMaterialOrderServiceImpl implements RawMaterialOrderService {
-
-    private StandardTreeMapper standardTreeMapper;
-    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
-    private GetLook getLook;
-    private UserMapper userMapper;
-    private InsOrderService insOrderService;
-    private InsOrderMapper insOrderMapper;
-    private InsSampleMapper insSampleMapper;
-    private final NumberGenerator<InsOrder> numberGenerator;
-    private InsReportService insReportService;
-    private WechatProperty wechatProperty;
-    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
-    private InsProductMapper insProductMapper;
-    private AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper;
-
-
-    @Override
-    public RawMaterialStandardTreeDto selectStandardTreeListByPartNo(String partNo) {
-        if (StringUtils.isBlank(partNo)) {
-            throw new ErrorException("闆朵欢鍙蜂涪澶�");
-        }
-        List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeListByPartNo(partNo);
-        if (CollectionUtil.isEmpty(factoryDtos)) {
-            throw new ErrorException("闆朵欢鍙蜂负" + partNo + "鐨勫師鏉愭枡娌℃湁瀵瑰簲鐨勬爣鍑嗗簱閰嶇疆");
-        }
-        RawMaterialStandardTreeDto rawMaterialStandardTreeDto = new RawMaterialStandardTreeDto();
-        for (FactoryDto factoryDto : factoryDtos) {
-            for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) {
-                for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) {
-                    if (sampleTypeDto.getChildren().size() == 0) {
-                        sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue()));
-                    }
-                    // 鍒ゆ柇缁戝畾鐨勬槸鍚︽槸褰撳墠闆朵欢鍙�
-                    if (sampleTypeDto.getPartNo() != null && sampleTypeDto.getPartNo().equals(partNo)) {
-                        // 娣诲姞瀵硅薄
-                        rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-"
-                                + laboratoryDto.getValue() + "-"
-                                + sampleTypeDto.getValue());
-                        rawMaterialStandardTreeDto.setCode(sampleTypeDto.getCode());
-                        rawMaterialStandardTreeDto.setLabel(sampleTypeDto.getLabel());
-                        rawMaterialStandardTreeDto.setValue(sampleTypeDto.getValue());
-                        rawMaterialStandardTreeDto.setChildren1(sampleTypeDto.getChildren());
-                    } else {
-                        for (SampleDto sampleDto : sampleTypeDto.getChildren()) {
-                            if (sampleDto.getPartNo() != null && sampleDto.getPartNo().equals(partNo)) {
-                                // 娣诲姞瀵硅薄
-                                rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-"
-                                        + laboratoryDto.getValue() + "-"
-                                        + sampleTypeDto.getValue() + "-"
-                                        + sampleDto.getValue());
-                                rawMaterialStandardTreeDto.setCode(sampleDto.getCode());
-                                rawMaterialStandardTreeDto.setLabel(sampleDto.getLabel());
-                                rawMaterialStandardTreeDto.setValue(sampleDto.getValue());
-                                rawMaterialStandardTreeDto.setChildren2(sampleDto.getChildren());
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return rawMaterialStandardTreeDto;
-    }
-
-    @Override
-    public Map<String, Object> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity) {
-        Map<String, Object> map = new HashMap<>();
-        map.put("head", PrintChina.printChina(IfsInventoryQuantity.class));
-        map.put("body", standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity)));
-        return map;
-    }
-
-    @Override
-    public Map<String, Object> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) {
-        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne");
-        if (map1.get("look") == 1) {
-            //涓汉
-            ifsInventoryQuantityDto.setCreateUser(map1.get("userId"));
-        }
-        Map<String, Object> map = new HashMap<>();
-//        ifsInventoryQuantityDto.setOrderState(null);
-        map.put("head", PrintChina.printChina(IfsInventoryQuantityDto.class));
-        map.put("body", standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto)));
-        return map;
-    }
-
-
-    /**
-     * 鎶ユ
-     * @param ids
-     * @return
-     */
-    @Override
-    public int inspectionReport(List<Integer> ids) {
-        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
-        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
-                .in(IfsInventoryQuantity::getId, ids)
-                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
-                .set(IfsInventoryQuantity::getDeclareUserId, userId)
-                .set(IfsInventoryQuantity::getIsInspect, 1)
-                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
-        );
-        threadPoolTaskExecutor.execute(() -> {
-            List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
-                    .in(IfsInventoryQuantity::getId, ids));
-            // 浼佷笟寰俊閫氱煡
-            String message = "";
-            message += "鏂板鎶ユ閫氱煡";
-            for (IfsInventoryQuantity inventoryQuantity : quantityList) {
-                message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
-                message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
-                message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
-
-                // 鍒ゆ柇鏈夋病鏈夊埌20鍚�. 鎴栬�呰兘鍚﹀厤妫�
-                int result = notificationRawOrder(inventoryQuantity.getId());
-                switch (result) {
-                    case 1:
-                        message += "\n褰撳墠鏍峰搧宸叉楠岃繃, 鍙互鍏嶆";
-                        break;
-                    case 2:
-                        message += "\n褰撳墠鏍峰搧宸茶秴杩�20鍚�";
-                        break;
-                }
-                message += "\n";
-            }
-            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
-        });
-        return 1;
-    }
-
-    /**
-     * 鎾ら攢鎶ユ
-     * @param id
-     * @return
-     */
-    @Override
-    public int revokeInspectionReport(Integer id) {
-        return ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
-                .eq(IfsInventoryQuantity::getId, id)
-                .set(IfsInventoryQuantity::getIsInspect, 0)
-        );
-    }
-
-    /**
-     * 鎵撳嵃鏍囩鏌ヨ
-     * @param ids
-     * @return
-     */
-    @Override
-    public List<IfsInventoryQuantityDto> printLabel(List<Integer> ids) {
-        return ifsInventoryQuantityMapper.printLabel(ids);
-    }
-
-    /**
-     * 鎶ユ
-     * @param ifsInventoryQuantity
-     * @return
-     */
-    @Override
-    public int inspectionReportOne(IfsInventoryQuantity ifsInventoryQuantity) {
-        Integer userId = getLook.selectPowerByMethodAndUserId(null).get("userId");
-        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
-                .eq(IfsInventoryQuantity::getId, ifsInventoryQuantity.getId())
-                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
-                .set(IfsInventoryQuantity::getDeclareUserId, userId)
-                .set(IfsInventoryQuantity::getIsInspect, 1)
-                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
-                .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
-        );
-
-        threadPoolTaskExecutor.execute(() -> {
-            IfsInventoryQuantity inventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryQuantity.getId());
-            // 浼佷笟寰俊閫氱煡
-            String message = "";
-            message += "鏂板鎶ユ閫氱煡";
-            message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
-            message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
-            message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
-            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
-        });
-        return 1;
-    }
-
-    /**
-     * 鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�
-     * @param id
-     * @return
-     */
-    @Override
-    public String getIndustryChain(Integer id) {
-        return ifsInventoryQuantityMapper.selectById(id).getIndustryChain();
-    }
-
-    /**
-     * 鍘熸潗鏂欐挙閿�鎺ュ彛
-     * @param ifsInventoryId
-     * @return
-     */
-    @Override
-    public boolean repealRawOrder(Integer ifsInventoryId) {
-        // 鏌ヨ鍒ゆ柇鏄惁鏄摐鍗曚笣
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
-        if (ifsInventoryQuantity.getIsCopper() != null && ifsInventoryQuantity.getIsCopper().equals(1)) {
-            // 閾滃崟涓濈洿鎺ュ垹闄ゅ氨琛�
-            ifsInventoryQuantityMapper.deleteById(ifsInventoryId);
-        } else {
-            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                    .set(IfsInventoryQuantity::getState, 0)
-                    .set(IfsInventoryQuantity::getIsQuarter, 1)
-                    .eq(IfsInventoryQuantity::getId, ifsInventoryId));
-        }
-
-        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
-                .eq(InsOrder::getIfsInventoryId, ifsInventoryId)
-                .set(InsOrder::getState, -1)
-                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
-        return true;
-    }
-
-    /**
-     * 鍘熸潗鏂欏厤妫�涓嬪崟
-     * @param list
-     * @param insOrder
-     * @return
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public int addExemptionOrder(List<SampleProductDto> list, InsOrder insOrder) {
-        if (!insOrder.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
-            throw new ErrorException("鍙湁杩涘巶妫�楠屾墠鑳藉厤妫�");
-        }
-        insOrder.setSendTime(LocalDateTime.now());
-        // 淇敼璁㈠崟琛ㄧ洿鎺ヤ负宸叉楠�
-        insOrder.setState(4);
-        insOrder.setTypeSource(1);
-
-        String code = "Y";
-        // 鐢熸垚缂栧彿
-        String no = numberGenerator.generateNumberWithPrefix(3,
-                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
-                InsOrder::getEntrustCode);
-
-        insOrderMapper.insert(insOrder); // 涓昏〃
-
-        AtomicInteger count = new AtomicInteger();
-        list.forEach(a -> {
-            count.getAndIncrement();
-            a.setId(null);
-            a.setInsOrderId(insOrder.getId());
-            if (StrUtil.isEmpty(a.getSampleCode())) {
-                // 濡傛灉鍙湁涓�涓牱鍝佸氨涓嶉渶瑕佹嫾鎺ユ暟瀛�
-                if (list.size() != 1) {
-                    a.setSampleCode(no + "-" + count.get());
-                } else {
-                    a.setSampleCode(no);
-                }
-            }
-            insSampleMapper.insert(a);
-
-            if (!CollectionUtil.isEmpty(a.getInsProduct())) {
-                throw new ErrorException("鍏嶆涓嶉渶瑕佸~鍐欐楠岄」");
-            }
-        });
-
-        // 鍘熸潗鏂欎笅鍗�: 濮旀墭浜哄氨鏄姤妫�浜�, 鐢熶骇鍗曚綅灏辨槸渚涘簲鍟嗗崟浣�
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
-        Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
-        User user = userMapper.selectById(declareUserId);
-        // 渚涘簲鍟嗗悕绉�
-        insOrder.setProduction(ifsInventoryQuantity.getSupplierName());
-        // 濮旀墭浜哄悕绉�
-        insOrder.setPrepareUser(user.getName());
-        insOrder.setPhone(user.getPhone());
-
-        // 淇敼鍘熸潗鏂欐暟鎹洿鎺ヤ负宸叉楠�
-        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>().set(IfsInventoryQuantity::getState, 2)
-                .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
-
-        insOrder.setExamineTime(LocalDateTime.now());
-
-        insOrder.setEntrustCode(no);
-        insOrder.setIsExemption(1);
-
-        insOrderMapper.updateById(insOrder);
-
-        // 娣诲姞宸ユ椂
-        addAuxiliary(insOrder, ifsInventoryQuantity);
-
-        // todo: ifs鐩存帴绉诲簱
-        insReportService.isRawMaterial(insOrder);
-
-        return insOrder.getId();
-    }
-
-
-    /**
-     * 鏌ヨ寰呬笅鍗�
-     * @param page
-     * @param ifsInventoryQuantity
-     * @return
-     */
-    @Override
-    public Map<String, Object> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity) {
-        Map<String, Object> map = new HashMap<>();
-        map.put("head", PrintChina.printChina(IfsInventoryQuantityCheckDto.class));
-        map.put("body", standardTreeMapper.selectIfsInventoryQuantity(page, QueryWrappers.queryWrappers(ifsInventoryQuantity)));
-        return map;
-    }
-
-    /**
-     * 鏌ヨ宸叉楠�
-     * @param page
-     * @param ifsInventoryQuantityDto
-     * @return
-     */
-    @Override
-    public Map<String, Object> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
-        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne");
-        if (map1.get("look") == 1) {
-            //涓汉
-            ifsInventoryQuantityDto.setCreateUser(map1.get("userId"));
-        }
-        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
-        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
-        ifsInventoryQuantityDto.setBeginDeclareDate(null);
-        ifsInventoryQuantityDto.setEndDeclareDate(null);
-
-        Map<String, Object> map = new HashMap<>();
-        map.put("head", PrintChina.printChina(IfsInventoryQuantitySupplierDto.class));
-        map.put("body", standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate));
-        return map;
-    }
-
-    /**
-     * 鍒犻櫎鍘熸潗鏂欐姤妫�淇℃伅
-     * @param id
-     * @return
-     */
-    @Override
-    public int delIfsInventory(Integer id) {
-        return ifsInventoryQuantityMapper.deleteById(id);
-    }
-
-    /**
-     * 鍘熸潗鏂欐斁琛屽厤妫�
-     * @param ifsInventoryId
-     * @return
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean rawOrderRelease(Integer ifsInventoryId, String partDetail) {
-        // 淇敼鍘熸潗鏂欐暟鎹洿鎺ヤ负宸叉楠�
-        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                .set(IfsInventoryQuantity::getState, 2)
-                .set(IfsInventoryQuantity::getIsQuarter, 0)
-                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
-
-        // 鏌ヨ鍘熸潗鏂欎俊鎭�
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
-        // 濮旀墭浜哄氨鏄姤妫�浜�, 鐢熶骇鍗曚綅灏辨槸渚涘簲鍟嗗崟浣�
-        Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
-        User user = userMapper.selectById(declareUserId);
-
-        InsOrder insOrder = new InsOrder();
-        insOrder.setState(4);
-        insOrder.setTypeSource(1);
-        String code = "Y";
-        // 鐢熸垚缂栧彿
-        String no = numberGenerator.generateNumberWithPrefix(3,
-                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
-                InsOrder::getEntrustCode);
-        insOrder.setExamineTime(LocalDateTime.now());
-        insOrder.setEntrustCode(no);
-        insOrder.setIsExemption(1);
-        // 渚涘簲鍟嗗悕绉�
-        insOrder.setProduction(ifsInventoryQuantity.getSupplierName());
-        // 濮旀墭浜哄悕绉�
-        insOrder.setPrepareUser(user.getName());
-        insOrder.setPhone(user.getPhone());
-        insOrder.setIfsInventoryId(ifsInventoryId);
-        insOrder.setPartDetail(partDetail);
-        insOrder.setSendTime(LocalDateTime.now());
-        insOrder.setSample(ifsInventoryQuantity.getPartDesc());
-        // 杩涘巶妫�楠�
-        insOrder.setOrderType(InsOrderTypeConstants.ENTER_THE_FACTORY);
-
-        insOrderMapper.insert(insOrder);
-
-        // 娣诲姞宸ユ椂
-        addAuxiliary(insOrder, ifsInventoryQuantity);
-
-        // todo: ifs鐩存帴绉诲簱
-        insReportService.isRawMaterial(insOrder);
-        return true;
-    }
-
-    /**
-     * 0, 鏃犳彁绀�, 1鎻愮ず  褰撳墠鎵规鐨勬牱鍝佸凡妫�楠岃繃, 鍙互鍏嶆, 2 鎻愮ず 褰撳墠鎵规鐨勬牱鍝佸凡瓒�20鍚�, 闇�瑕佸绾у娆℃楠�
-     *
-     * 鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�
-     * @param ifsInventoryId
-     * @return
-     */
-    @Override
-    public int notificationRawOrder(Integer ifsInventoryId) {
-        IfsInventoryQuantity ifsInventory = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
-        // 鏌ヨ褰撳墠鎵规, 渚涘簲鍟�, 闆朵欢鍙风殑鍘熸潗鏂欐槸鍚﹁秴杩囦簡20鍚�, 瓒呰繃浜�20鍚ㄩ渶瑕佽繘琛屽娆℃楠屾彁閱�
-        List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
-                .eq(IfsInventoryQuantity::getPartNo, ifsInventory.getPartNo())
-                .eq(IfsInventoryQuantity::getUpdateBatchNo, ifsInventory.getUpdateBatchNo())
-                .eq(IfsInventoryQuantity::getSupplierId, ifsInventory.getSupplierId())
-                .eq(IfsInventoryQuantity::getSupplierName, ifsInventory.getSupplierName()));
-
-        // 鍒ゆ柇鏄惁澶т簬20鍚�
-        BigDecimal bigDecimal = new BigDecimal("20000");
-        BigDecimal count = BigDecimal.ZERO;
-        for (IfsInventoryQuantity inventoryQuantity : quantityList) {
-            // 鍒ゆ柇鍗曚綅鏄痥g鎴栬�卼
-            if (inventoryQuantity.getBuyUnitMeas().equalsIgnoreCase("t")) {
-                count = count.add(inventoryQuantity.getQtyArrived().multiply(new BigDecimal("1000")));
-            } else if (inventoryQuantity.getBuyUnitMeas().equalsIgnoreCase("kg")) {
-                count = count.add(inventoryQuantity.getQtyArrived());
-            }
-        }
-
-        if (count.compareTo(bigDecimal) >= 0) {
-            return 2;
-        } else {
-            // 鍒ゆ柇涔嬪墠鏄惁鍑鸿繃鎶ュ憡, 鍑鸿繃鎶ュ憡鍙互鍏嶆
-            int reportCount = ifsInventoryQuantityMapper.selectReportCountById(ifsInventoryId);
-            if (reportCount > 0) {
-                return 1;
-            }
-        }
-        return 0;
-    }
-
-    /**
-     * 鎶ユ鍙互鏂板鎶ユ淇℃伅
-     * @param ifsInventoryQuantity
-     */
-    @Override
-    public void addIfsInventoryQuantity(IfsInventoryQuantity ifsInventoryQuantity) {
-        ifsInventoryQuantity.setIsSource(0);
-        ifsInventoryQuantity.setState(0);
-        ifsInventoryQuantity.setIsFinish(0);
-        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
-    }
-
-    @Override
-    public void shiftingParking(List<Integer> ids) {
-        for (Integer id : ids) {
-            InsOrder order = insOrderService.getById(id);
-            // todo: ifs鐩存帴绉诲簱
-            insReportService.isRawMaterial(order);
-        }
-    }
-
-    /**
-     * 閾滃崟涓濅笅鍗曞厤妫�
-     * @param list
-     * @param insOrder
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public int addRawCopperOrderExemptionOrder(List<SampleProductDto> list, CopperInsOrderDto insOrder) {
-        if (!insOrder.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
-            throw new ErrorException("鍙湁杩涘巶妫�楠屾墠鑳藉厤妫�");
-        }
-        insOrder.setSendTime(LocalDateTime.now());
-        // 淇敼璁㈠崟琛ㄧ洿鎺ヤ负宸叉楠�
-        insOrder.setState(4);
-        insOrder.setTypeSource(1);
-
-        String code = "Y";
-        // 鐢熸垚缂栧彿
-        String no = numberGenerator.generateNumberWithPrefix(3,
-                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
-                InsOrder::getEntrustCode);
-
-        insOrderMapper.insert(insOrder); // 涓昏〃
-
-        AtomicInteger count = new AtomicInteger();
-        list.forEach(a -> {
-            count.getAndIncrement();
-            a.setId(null);
-            a.setInsOrderId(insOrder.getId());
-            if (StrUtil.isEmpty(a.getSampleCode())) {
-                // 濡傛灉鍙湁涓�涓牱鍝佸氨涓嶉渶瑕佹嫾鎺ユ暟瀛�
-                if (list.size() != 1) {
-                    a.setSampleCode(no + "-" + count.get());
-                } else {
-                    a.setSampleCode(no);
-                }
-            }
-            insSampleMapper.insert(a);
-
-            if (!CollectionUtil.isEmpty(a.getInsProduct())) {
-                throw new ErrorException("鍏嶆涓嶉渶瑕佸~鍐欐楠岄」");
-            }
-        });
-        // 娣诲姞鍘熸潗鏂欎俊鎭�
-        IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity();
-        // 鍩烘湰淇℃伅
-        ifsInventoryQuantity.setIsSource(0);
-        ifsInventoryQuantity.setState(2);
-        ifsInventoryQuantity.setIsInspect(1);
-        ifsInventoryQuantity.setIsFinish(1);
-        ifsInventoryQuantity.setIsCopper(1);
-        ifsInventoryQuantity.setInspectStatus(1);
-        ifsInventoryQuantity.setIsQuarter(0);
-
-        ifsInventoryQuantity.setQtyArrived(insOrder.getQtyArrived());
-        ifsInventoryQuantity.setBuyUnitMeas(insOrder.getBuyUnitMeas());
-        ifsInventoryQuantity.setSupplierName(insOrder.getSupplierName());
-        ifsInventoryQuantity.setUpdateBatchNo(insOrder.getUpdateBatchNo());
-        ifsInventoryQuantity.setDeclareDate(insOrder.getDeclareDate());
-
-        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
-
-        insOrder.setIfsInventoryId(ifsInventoryQuantity.getId());
-        insOrder.setExamineTime(LocalDateTime.now());
-
-        insOrder.setEntrustCode(no);
-        insOrder.setIsExemption(1);
-
-        insOrderMapper.updateById(insOrder);
-
-        // 娣诲姞宸ユ椂
-        addAuxiliary(insOrder, ifsInventoryQuantity);
-
-        return insOrder.getId();
-    }
-
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean concessionRelease(Integer ifsInventoryId) {
-        // 鏌ヨ鍘熸潗鏂欎俊鎭�
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
-        if (!ifsInventoryQuantity.getInspectStatus().equals(2)) {
-            throw new ErrorException("涓嶅悎鏍肩殑鍘熸潗鏂欐墠鑳借姝ユ斁琛�");
-        }
-
-        // todo:闇�瑕佸垽鏂璷a娴佺▼鏄惁鏄姝ユ斁琛�
-        String toLocation = insReportService.moveRawMaterial(ifsInventoryQuantity);
-
-        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                .set(IfsInventoryQuantity::getInspectStatus, 4)
-                .set(IfsInventoryQuantity::getToLocation, toLocation)
-                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
-
-        return true;
-    }
-
-    /**
-     * 鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟
-     * @param enterOrderId
-     * @return
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean repealEnterRawOrder(Integer enterOrderId) {
-        // 鏌ヨ璁㈠崟
-        InsOrder order = insOrderMapper.selectById(enterOrderId);
-
-        // 鏌ヨ鍒ゆ柇鏄惁鏄摐鍗曚笣
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId());
-        if (ifsInventoryQuantity.getIsCopper() != null && ifsInventoryQuantity.getIsCopper().equals(1)) {
-            // 閾滃崟涓濈洿鎺ュ垹闄ゅ氨琛�
-            ifsInventoryQuantityMapper.deleteById(order.getIfsInventoryId());
-        } else {
-            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                    .set(IfsInventoryQuantity::getState, 0)
-                    .set(IfsInventoryQuantity::getIsQuarter, 1)
-                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
-        }
-        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
-                .eq(InsOrder::getId, enterOrderId)
-                .set(InsOrder::getState, -1)
-                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
-
-        // 娓呴櫎涔嬪墠鐨勫伐鏃�
-        auxiliaryOutputWorkingHoursMapper.delete(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery()
-                .eq(AuxiliaryOutputWorkingHours::getOrderId, enterOrderId));
-
-        // 娓呴櫎涔嬪墠鎶ュ憡
-        insReportService.remove(Wrappers.<InsReport>lambdaQuery()
-                .eq(InsReport::getInsOrderId, enterOrderId));
-
-        return true;
-    }
-
-    /**
-     * 鍘熸潗鏂欏搴︽挙閿�涓嬪崟
-     * @param quarterOrderId
-     * @return
-     */
-    @Override
-    @Transactional(rollbackFor = Exception.class)
-    public boolean repealQuarterRawOrder(Integer quarterOrderId) {
-        // 鏌ヨ璁㈠崟
-        InsOrder order = insOrderMapper.selectById(quarterOrderId);
-
-        Long count = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
-                .eq(InsOrder::getIfsInventoryId, order.getIfsInventoryId())
-                .ne(InsOrder::getState, -1)
-                .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY)
-                .ne(InsOrder::getId, order.getId()));
-        // 鍒ゆ柇涔嬪墠鏄惁鏈夎繘鍘傛楠�, 娌℃湁闇�瑕佷慨鏀瑰師鏉愭枡淇℃伅
-        if (count == 0) {
-            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                    .set(IfsInventoryQuantity::getState, 0)
-                    .set(IfsInventoryQuantity::getIsQuarter, 1)
-                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
-        } else {
-            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                    .set(IfsInventoryQuantity::getIsQuarter, 1)
-                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
-        }
-
-        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
-                .eq(InsOrder::getId, quarterOrderId)
-                .set(InsOrder::getState, -1)
-                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
-        auxiliaryOutputWorkingHoursMapper.delete(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery()
-                .eq(AuxiliaryOutputWorkingHours::getOrderId, quarterOrderId));
-        // 娓呴櫎涔嬪墠鎶ュ憡
-        insReportService.remove(Wrappers.<InsReport>lambdaQuery()
-                .eq(InsReport::getInsOrderId, quarterOrderId));
-        return true;
-    }
-
-    /**
-     * 鍘熸潗鏂欐姤妫�鍏ㄩ儴淇℃伅瀵煎嚭
-     * @param ifsInventoryQuantityDto
-     * @param response
-     */
-    @Override
-    public void rawAllExport(IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto, HttpServletResponse response) throws UnsupportedEncodingException {
-        //鏌ヨ瀵煎嚭鐨勮垂鐢ㄧ粺璁℃暟鎹�
-        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
-        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
-        ifsInventoryQuantityDto.setBeginDeclareDate(null);
-        ifsInventoryQuantityDto.setEndDeclareDate(null);
-        List<IfsInventoryQuantitySupplierDto> ifsByOverList = standardTreeMapper.getIfsByOverList(QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
-
-        for (IfsInventoryQuantitySupplierDto dto : ifsByOverList) {
-            dto.setSendTimeString(dto.getSendTime() == null ? "" : dto.getSendTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-            dto.setReceiverDateString(dto.getReceiverDate() == null ? "" : dto.getReceiverDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-            dto.setDeclareDateString(dto.getDeclareDate() == null ? "" : dto.getDeclareDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-            switch (dto.getInspectStatus()) {
-                case 1:
-                    dto.setInspectStatusString("鍚堟牸");
-                    break;
-                case 2:
-                    dto.setInspectStatusString("涓嶅悎鏍�");
-                    // 鏌ヨ涓嶅悎鏍奸」
-                    List<String> unqualifiedList = insProductMapper.selectUnqualifiedList(dto.getEnterOrderId() == null ? dto.getQuarterOrderId() : dto.getEnterOrderId());
-                    dto.setUnqualifiedItem(CollUtil.join(unqualifiedList, ","));
-                    break;
-                case 3:
-                    dto.setInspectStatusString("鏈笅鍗�");
-                    break;
-                case 4:
-                    dto.setInspectStatusString("璁╂鏀捐");
-                    break;
-                case 0:
-                    dto.setInspectStatusString("妫�楠屼腑");
-                    break;
-
-            }
-        }
-
-
-        response.setContentType("application/vnd.ms-excel");
-        response.setCharacterEncoding("UTF-8");
-        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
-        String fileName = URLEncoder.encode("鍘熸潗鏂欐娴嬩俊鎭鍑�", "UTF-8");
-        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
-        try {
-            //鏂板缓ExcelWriter
-            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
-            //鑾峰彇sheet0瀵硅薄
-            WriteSheet mainSheet = EasyExcel.writerSheet(0, "鍘熸潗鏂欐娴嬩俊鎭鍑�").head(IfsInventoryQuantitySupplierDto.class).build();
-
-            //鍚憇heet0鍐欏叆鏁版嵁 浼犲叆绌簂ist杩欐牱鍙鍑鸿〃澶�
-            excelWriter.write(ifsByOverList, mainSheet);
-            //鍏抽棴娴�
-            excelWriter.finish();
-        } catch (IOException e) {
-            throw new RuntimeException("瀵煎嚭澶辫触");
-        }
-    }
-
-    /**
-     * 鍘熸潗鏂欐煡璇㈠彲浠ュ搴︽楠岀殑鍐呭
-     * @param page
-     * @param ifsInventoryQuantityDto
-     * @return
-     */
-    @Override
-    public Map<String, Object> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
-        Map<String, Integer> map1 = getLook.selectPowerByMethodAndUserId("getIfsByStateOne");
-        if (map1.get("look") == 1) {
-            //涓汉
-            ifsInventoryQuantityDto.setCreateUser(map1.get("userId"));
-        }
-        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
-        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
-        ifsInventoryQuantityDto.setBeginDeclareDate(null);
-        ifsInventoryQuantityDto.setEndDeclareDate(null);
-
-        Map<String, Object> map = new HashMap<>();
-        map.put("head", PrintChina.printChina(IfsInventoryQuantitySupplierDto.class));
-        map.put("body", standardTreeMapper.getIfsByQuarter(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate));
-        return map;
-    }
-
-    /**
-     * 鎻愬墠鍏ュ簱
-     * @param ifsInventoryId
-     * @return
-     */
-    @Override
-    public boolean advancedGodown(Integer ifsInventoryId) {
-        // 鏌ヨ鍘熸潗鏂欎俊鎭�
-        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
-        if (!ifsInventoryQuantity.getInspectStatus().equals(0)
-                && !ifsInventoryQuantity.getInspectStatus().equals(3)) {
-            throw new ErrorException("鏈娴嬪畬鎴愭暟鎹墠鑳芥彁鍓嶅叆搴�");
-        }
-
-        // todo:闇�瑕佸垽鏂璷a娴佺▼鏄惁鏄姝ユ斁琛�
-        String toLocation = insReportService.moveRawMaterial(ifsInventoryQuantity);
-
-        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
-                .set(IfsInventoryQuantity::getInspectStatus, 1)
-                .set(IfsInventoryQuantity::getIsFinish, 1)
-                .set(IfsInventoryQuantity::getToLocation, toLocation)
-                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
-
-        return true;
-    }
-
-
-    /**
-     * 娣诲姞宸ユ椂
-     * @param insOrder
-     * @param ifsInventoryQuantity
-     */
-    private void addAuxiliary(InsOrder insOrder, IfsInventoryQuantity ifsInventoryQuantity) {
-        AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours = new AuxiliaryOutputWorkingHours();
-        auxiliaryOutputWorkingHours.setInspectionItemClass(ifsInventoryQuantity.getUpdateBatchNo() + "鍏嶆");//妫�娴嬮」鍒嗙被
-        auxiliaryOutputWorkingHours.setSample(insOrder.getEntrustCode());//鏍峰搧缂栧彿
-        auxiliaryOutputWorkingHours.setOrderId(insOrder.getId());//璁㈠崟id
-        auxiliaryOutputWorkingHours.setOrderNo(insOrder.getEntrustCode());//闈炲姞鐝鎵樺崟鍙�
-
-        // 鍏嶆榛樿2
-        auxiliaryOutputWorkingHours.setWorkTime(new BigDecimal("2"));//闈炲姞鐝伐鏃�
-        auxiliaryOutputWorkingHours.setAmount(1);//闈炲姞鐝暟閲�
-        auxiliaryOutputWorkingHours.setOutputWorkTime((ObjectUtils.isNotEmpty(auxiliaryOutputWorkingHours.getOvertimeWorkTime()) ? auxiliaryOutputWorkingHours.getOvertimeWorkTime() : BigDecimal.ZERO).add(ObjectUtils.isNotEmpty(auxiliaryOutputWorkingHours.getWorkTime()) ? auxiliaryOutputWorkingHours.getWorkTime() : BigDecimal.ZERO));//浜ч噺宸ユ椂
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
-        DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        auxiliaryOutputWorkingHours.setDateTime(LocalDateTime.now().toLocalDate().atStartOfDay().format(formatters));//鏃ユ湡
-        LocalDateTime localDateTime = LocalDateTime.now();
-        DateTime parse = DateUtil.parse(localDateTime.format(formatter));
-        auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//鏄熸湡
-        auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ
-        auxiliaryOutputWorkingHours.setCheck(getLook.selectPowerByMethodAndUserId(null).get("userId"));//妫�娴嬩汉
-        auxiliaryOutputWorkingHours.setPrice(new BigDecimal("1"));//鍗曚环
-
-        auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours);
-    }
-
-    public static String getWeek(String dayStr) {
-        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-        try {
-            Date date = sdf.parse(dayStr);
-            Calendar calendar = Calendar.getInstance();
-            calendar.setTime(date);
-            int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
-            int day = calendar.get(Calendar.DAY_OF_MONTH);
-            return getWeekDay(dayOfWeek);
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return null;
-    }
-
-    public static String getWeekDay(int dayOfWeek) {
-        switch (dayOfWeek) {
-            case Calendar.MONDAY:
-                return "鍛ㄤ竴";
-            case Calendar.TUESDAY:
-                return "鍛ㄤ簩";
-            case Calendar.WEDNESDAY:
-                return "鍛ㄤ笁";
-            case Calendar.THURSDAY:
-                return "鍛ㄥ洓";
-            case Calendar.FRIDAY:
-                return "鍛ㄤ簲";
-            case Calendar.SATURDAY:
-                return "鍛ㄥ叚";
-            case Calendar.SUNDAY:
-                return "鍛ㄦ棩";
-            default:
-                return "鏈煡";
-        }
-    }
-}
+//package com.ruoyi.inspect.service.impl;
+//
+//import cn.hutool.core.collection.CollUtil;
+//import cn.hutool.core.collection.CollectionUtil;
+//import cn.hutool.core.date.DateTime;
+//import cn.hutool.core.date.DateUtil;
+//import cn.hutool.core.util.StrUtil;
+//import com.alibaba.excel.EasyExcel;
+//import com.alibaba.excel.ExcelWriter;
+//import com.alibaba.excel.write.metadata.WriteSheet;
+//import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
+//import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+//import com.baomidou.mybatisplus.core.metadata.IPage;
+//import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+//import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+//import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.ruoyi.basic.dto.*;
+//import com.ruoyi.basic.pojo.IfsInventoryQuantity;
+//import com.ruoyi.common.constant.InsOrderTypeConstants;
+//import com.ruoyi.common.core.domain.entity.User;
+//import com.ruoyi.common.utils.LimsDateUtil;
+//import com.ruoyi.common.utils.QueryWrappers;
+//import com.ruoyi.common.utils.SecurityUtils;
+//import com.ruoyi.common.utils.WxCpUtils;
+//import com.ruoyi.framework.properties.WechatProperty;
+//import com.ruoyi.inspect.dto.CopperInsOrderDto;
+//import com.ruoyi.inspect.dto.RawMaterialStandardTreeDto;
+//import com.ruoyi.basic.mapper.IfsInventoryQuantityMapper;
+//import com.ruoyi.basic.mapper.StandardTreeMapper;
+//import com.ruoyi.inspect.dto.SampleProductDto;
+//import com.ruoyi.inspect.mapper.InsOrderMapper;
+//import com.ruoyi.inspect.mapper.InsProductMapper;
+//import com.ruoyi.inspect.mapper.InsSampleMapper;
+//import com.ruoyi.inspect.pojo.InsOrder;
+//import com.ruoyi.inspect.pojo.InsReport;
+//import com.ruoyi.inspect.service.InsOrderService;
+//import com.ruoyi.inspect.service.InsReportService;
+//import com.ruoyi.inspect.service.RawMaterialOrderService;
+//import com.ruoyi.common.numgen.NumberGenerator;
+//import com.ruoyi.framework.exception.ErrorException;
+//import com.ruoyi.performance.mapper.AuxiliaryOutputWorkingHoursMapper;
+//import com.ruoyi.performance.pojo.AuxiliaryOutputWorkingHours;
+//import com.ruoyi.system.mapper.UserMapper;
+//import lombok.AllArgsConstructor;
+//import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
+//import org.springframework.stereotype.Service;
+//import org.springframework.transaction.annotation.Transactional;
+//
+//import javax.servlet.http.HttpServletResponse;
+//import java.io.IOException;
+//import java.io.UnsupportedEncodingException;
+//import java.math.BigDecimal;
+//import java.net.URLEncoder;
+//import java.text.SimpleDateFormat;
+//import java.time.LocalDateTime;
+//import java.time.format.DateTimeFormatter;
+//import java.util.*;
+//import java.util.concurrent.atomic.AtomicInteger;
+//
+///**
+// * @Author zhuo
+// * @Date 2024/7/31
+// */
+//@Service
+//@AllArgsConstructor
+//public class RawMaterialOrderServiceImpl implements RawMaterialOrderService {
+//
+//    private StandardTreeMapper standardTreeMapper;
+//    private IfsInventoryQuantityMapper ifsInventoryQuantityMapper;
+//    private UserMapper userMapper;
+//    private InsOrderService insOrderService;
+//    private InsOrderMapper insOrderMapper;
+//    private InsSampleMapper insSampleMapper;
+//    private final NumberGenerator<InsOrder> numberGenerator;
+//    private InsReportService insReportService;
+//    private WechatProperty wechatProperty;
+//    private ThreadPoolTaskExecutor threadPoolTaskExecutor;
+//    private InsProductMapper insProductMapper;
+//    private AuxiliaryOutputWorkingHoursMapper auxiliaryOutputWorkingHoursMapper;
+//
+//
+//    @Override
+//    public RawMaterialStandardTreeDto selectStandardTreeListByPartNo(String partNo) {
+//        if (StringUtils.isBlank(partNo)) {
+//            throw new ErrorException("闆朵欢鍙蜂涪澶�");
+//        }
+//        List<FactoryDto> factoryDtos = standardTreeMapper.selectStandardTreeListByPartNo(partNo);
+//        if (CollectionUtil.isEmpty(factoryDtos)) {
+//            throw new ErrorException("闆朵欢鍙蜂负" + partNo + "鐨勫師鏉愭枡娌℃湁瀵瑰簲鐨勬爣鍑嗗簱閰嶇疆");
+//        }
+//        RawMaterialStandardTreeDto rawMaterialStandardTreeDto = new RawMaterialStandardTreeDto();
+//        for (FactoryDto factoryDto : factoryDtos) {
+//            for (LaboratoryDto laboratoryDto : factoryDto.getChildren()) {
+//                for (SampleTypeDto sampleTypeDto : laboratoryDto.getChildren()) {
+//                    if (sampleTypeDto.getChildren().size() == 0) {
+//                        sampleTypeDto.setChildren(standardTreeMapper.getStandardTree3(sampleTypeDto.getValue()));
+//                    }
+//                    // 鍒ゆ柇缁戝畾鐨勬槸鍚︽槸褰撳墠闆朵欢鍙�
+//                    if (sampleTypeDto.getPartNo() != null && sampleTypeDto.getPartNo().equals(partNo)) {
+//                        // 娣诲姞瀵硅薄
+//                        rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-"
+//                                + laboratoryDto.getValue() + "-"
+//                                + sampleTypeDto.getValue());
+//                        rawMaterialStandardTreeDto.setCode(sampleTypeDto.getCode());
+//                        rawMaterialStandardTreeDto.setLabel(sampleTypeDto.getLabel());
+//                        rawMaterialStandardTreeDto.setValue(sampleTypeDto.getValue());
+//                        rawMaterialStandardTreeDto.setChildren1(sampleTypeDto.getChildren());
+//                    } else {
+//                        for (SampleDto sampleDto : sampleTypeDto.getChildren()) {
+//                            if (sampleDto.getPartNo() != null && sampleDto.getPartNo().equals(partNo)) {
+//                                // 娣诲姞瀵硅薄
+//                                rawMaterialStandardTreeDto.setTreeName(factoryDto.getValue() + "-"
+//                                        + laboratoryDto.getValue() + "-"
+//                                        + sampleTypeDto.getValue() + "-"
+//                                        + sampleDto.getValue());
+//                                rawMaterialStandardTreeDto.setCode(sampleDto.getCode());
+//                                rawMaterialStandardTreeDto.setLabel(sampleDto.getLabel());
+//                                rawMaterialStandardTreeDto.setValue(sampleDto.getValue());
+//                                rawMaterialStandardTreeDto.setChildren2(sampleDto.getChildren());
+//                            }
+//                        }
+//                    }
+//                }
+//            }
+//        }
+//        return rawMaterialStandardTreeDto;
+//    }
+//
+//    @Override
+//    public IPage<IfsInventoryQuantity> getWarehouseSubmit(IPage<IfsInventoryQuantity> page, IfsInventoryQuantity ifsInventoryQuantity) {
+//        return standardTreeMapper.selectIfsPage(page, QueryWrappers.queryWrappers(ifsInventoryQuantity));
+//    }
+//
+//    @Override
+//    public IPage<IfsInventoryQuantityDto> getIfsByStateOne(IPage<IfsInventoryQuantityDto> page, IfsInventoryQuantityDto ifsInventoryQuantityDto) {
+//        return standardTreeMapper.getIfsByStateOne(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto));
+//    }
+//
+//
+//    /**
+//     * 鎶ユ
+//     * @param ids
+//     * @return
+//     */
+//    @Override
+//    public int inspectionReport(List<Integer> ids) {
+//        Integer userId = SecurityUtils.getUserId().intValue();
+//        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                .in(IfsInventoryQuantity::getId, ids)
+//                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
+//                .set(IfsInventoryQuantity::getDeclareUserId, userId)
+//                .set(IfsInventoryQuantity::getIsInspect, 1)
+//                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
+//        );
+//        threadPoolTaskExecutor.execute(() -> {
+//            List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
+//                    .in(IfsInventoryQuantity::getId, ids));
+//            // 浼佷笟寰俊閫氱煡
+//            String message = "";
+//            message += "鏂板鎶ユ閫氱煡";
+//            for (IfsInventoryQuantity inventoryQuantity : quantityList) {
+//                message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
+//                message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
+//                message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
+//
+//                // 鍒ゆ柇鏈夋病鏈夊埌20鍚�. 鎴栬�呰兘鍚﹀厤妫�
+//                int result = notificationRawOrder(inventoryQuantity.getId());
+//                switch (result) {
+//                    case 1:
+//                        message += "\n褰撳墠鏍峰搧宸叉楠岃繃, 鍙互鍏嶆";
+//                        break;
+//                    case 2:
+//                        message += "\n褰撳墠鏍峰搧宸茶秴杩�20鍚�";
+//                        break;
+//                }
+//                message += "\n";
+//            }
+//            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
+//        });
+//        return 1;
+//    }
+//
+//    /**
+//     * 鎾ら攢鎶ユ
+//     * @param id
+//     * @return
+//     */
+//    @Override
+//    public int revokeInspectionReport(Integer id) {
+//        return ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                .eq(IfsInventoryQuantity::getId, id)
+//                .set(IfsInventoryQuantity::getIsInspect, 0)
+//        );
+//    }
+//
+//    /**
+//     * 鎵撳嵃鏍囩鏌ヨ
+//     * @param ids
+//     * @return
+//     */
+//    @Override
+//    public List<IfsInventoryQuantityDto> printLabel(List<Integer> ids) {
+//        return ifsInventoryQuantityMapper.printLabel(ids);
+//    }
+//
+//    /**
+//     * 鎶ユ
+//     * @param ifsInventoryQuantity
+//     * @return
+//     */
+//    @Override
+//    public int inspectionReportOne(IfsInventoryQuantity ifsInventoryQuantity) {
+//        Integer userId = SecurityUtils.getUserId().intValue();
+//        ifsInventoryQuantityMapper.update(null, Wrappers.<IfsInventoryQuantity>lambdaUpdate()
+//                .eq(IfsInventoryQuantity::getId, ifsInventoryQuantity.getId())
+//                .set(IfsInventoryQuantity::getDeclareUser, userMapper.selectById(userId).getName())
+//                .set(IfsInventoryQuantity::getDeclareUserId, userId)
+//                .set(IfsInventoryQuantity::getIsInspect, 1)
+//                .set(IfsInventoryQuantity::getDeclareDate, LocalDateTime.now())
+//                .set(IfsInventoryQuantity::getUpdateBatchNo, ifsInventoryQuantity.getUpdateBatchNo())
+//        );
+//
+//        threadPoolTaskExecutor.execute(() -> {
+//            IfsInventoryQuantity inventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryQuantity.getId());
+//            // 浼佷笟寰俊閫氱煡
+//            String message = "";
+//            message += "鏂板鎶ユ閫氱煡";
+//            message += "\n鎵规鍙�: " + inventoryQuantity.getUpdateBatchNo();
+//            message += "\n闆朵欢鎻忚堪: " + inventoryQuantity.getPartDesc();
+//            message += "\n鎶佃揪鏁伴噺: " + inventoryQuantity.getQtyArrived().stripTrailingZeros().toPlainString() + inventoryQuantity.getBuyUnitMeas();
+//            WxCpUtils.informWebHook(wechatProperty.getExaminingUrl(), message);
+//        });
+//        return 1;
+//    }
+//
+//    /**
+//     * 鑾峰彇閾滀骇涓氶摼妫�娴嬫暟鎹�
+//     * @param id
+//     * @return
+//     */
+//    @Override
+//    public String getIndustryChain(Integer id) {
+//        return ifsInventoryQuantityMapper.selectById(id).getIndustryChain();
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欐挙閿�鎺ュ彛
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @Override
+//    public boolean repealRawOrder(Integer ifsInventoryId) {
+//        // 鏌ヨ鍒ゆ柇鏄惁鏄摐鍗曚笣
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
+//        if (ifsInventoryQuantity.getIsCopper() != null && ifsInventoryQuantity.getIsCopper().equals(1)) {
+//            // 閾滃崟涓濈洿鎺ュ垹闄ゅ氨琛�
+//            ifsInventoryQuantityMapper.deleteById(ifsInventoryId);
+//        } else {
+//            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                    .set(IfsInventoryQuantity::getState, 0)
+//                    .set(IfsInventoryQuantity::getIsQuarter, 1)
+//                    .eq(IfsInventoryQuantity::getId, ifsInventoryId));
+//        }
+//
+//        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getIfsInventoryId, ifsInventoryId)
+//                .set(InsOrder::getState, -1)
+//                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
+//        return true;
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欏厤妫�涓嬪崟
+//     * @param list
+//     * @param insOrder
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int addExemptionOrder(List<SampleProductDto> list, InsOrder insOrder) {
+//        if (!insOrder.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
+//            throw new ErrorException("鍙湁杩涘巶妫�楠屾墠鑳藉厤妫�");
+//        }
+//        insOrder.setSendTime(LocalDateTime.now());
+//        // 淇敼璁㈠崟琛ㄧ洿鎺ヤ负宸叉楠�
+//        insOrder.setState(4);
+//        insOrder.setTypeSource(1);
+//
+//        String code = "Y";
+//        // 鐢熸垚缂栧彿
+//        String no = numberGenerator.generateNumberWithPrefix(3,
+//                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
+//                InsOrder::getEntrustCode);
+//
+//        insOrderMapper.insert(insOrder); // 涓昏〃
+//
+//        AtomicInteger count = new AtomicInteger();
+//        list.forEach(a -> {
+//            count.getAndIncrement();
+//            a.setId(null);
+//            a.setInsOrderId(insOrder.getId());
+//            if (StrUtil.isEmpty(a.getSampleCode())) {
+//                // 濡傛灉鍙湁涓�涓牱鍝佸氨涓嶉渶瑕佹嫾鎺ユ暟瀛�
+//                if (list.size() != 1) {
+//                    a.setSampleCode(no + "-" + count.get());
+//                } else {
+//                    a.setSampleCode(no);
+//                }
+//            }
+//            insSampleMapper.insert(a);
+//
+//            if (!CollectionUtil.isEmpty(a.getInsProduct())) {
+//                throw new ErrorException("鍏嶆涓嶉渶瑕佸~鍐欐楠岄」");
+//            }
+//        });
+//
+//        // 鍘熸潗鏂欎笅鍗�: 濮旀墭浜哄氨鏄姤妫�浜�, 鐢熶骇鍗曚綅灏辨槸渚涘簲鍟嗗崟浣�
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
+//        Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
+//        User user = userMapper.selectById(declareUserId);
+//        // 渚涘簲鍟嗗悕绉�
+//        insOrder.setProduction(ifsInventoryQuantity.getSupplierName());
+//        // 濮旀墭浜哄悕绉�
+//        insOrder.setPrepareUser(user.getName());
+//        insOrder.setPhone(user.getPhone());
+//
+//        // 淇敼鍘熸潗鏂欐暟鎹洿鎺ヤ负宸叉楠�
+//        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>().set(IfsInventoryQuantity::getState, 2)
+//                .eq(IfsInventoryQuantity::getId, insOrder.getIfsInventoryId()));
+//
+//        insOrder.setExamineTime(LocalDateTime.now());
+//
+//        insOrder.setEntrustCode(no);
+//        insOrder.setIsExemption(1);
+//
+//        insOrderMapper.updateById(insOrder);
+//
+//        // 娣诲姞宸ユ椂
+//        addAuxiliary(insOrder, ifsInventoryQuantity);
+//
+//        // todo: ifs鐩存帴绉诲簱
+//        insReportService.isRawMaterial(insOrder);
+//
+//        return insOrder.getId();
+//    }
+//
+//
+//    /**
+//     * 鏌ヨ寰呬笅鍗�
+//     * @param page
+//     * @param ifsInventoryQuantity
+//     * @return
+//     */
+//    @Override
+//    public IPage<IfsInventoryQuantityCheckDto> selectIfsInventoryQuantity(Page<IfsInventoryQuantityCheckDto> page, IfsInventoryQuantityCheckDto ifsInventoryQuantity) {
+//        return standardTreeMapper.selectIfsInventoryQuantity(page, QueryWrappers.queryWrappers(ifsInventoryQuantity));
+//    }
+//
+//    /**
+//     * 鏌ヨ宸叉楠�
+//     * @param page
+//     * @param ifsInventoryQuantityDto
+//     * @return
+//     */
+//    @Override
+//    public IPage<IfsInventoryQuantitySupplierDto> getIfsByOver(Page<IfsInventoryQuantitySupplierDto> page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
+//        // todo: 鍙湅鎴�
+//        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
+//        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
+//        ifsInventoryQuantityDto.setBeginDeclareDate(null);
+//        ifsInventoryQuantityDto.setEndDeclareDate(null);
+//
+//        return standardTreeMapper.getIfsByOver(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
+//    }
+//
+//    /**
+//     * 鍒犻櫎鍘熸潗鏂欐姤妫�淇℃伅
+//     * @param id
+//     * @return
+//     */
+//    @Override
+//    public int delIfsInventory(Integer id) {
+//        return ifsInventoryQuantityMapper.deleteById(id);
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欐斁琛屽厤妫�
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public boolean rawOrderRelease(Integer ifsInventoryId, String partDetail) {
+//        // 淇敼鍘熸潗鏂欐暟鎹洿鎺ヤ负宸叉楠�
+//        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                .set(IfsInventoryQuantity::getState, 2)
+//                .set(IfsInventoryQuantity::getIsQuarter, 0)
+//                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
+//
+//        // 鏌ヨ鍘熸潗鏂欎俊鎭�
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
+//        // 濮旀墭浜哄氨鏄姤妫�浜�, 鐢熶骇鍗曚綅灏辨槸渚涘簲鍟嗗崟浣�
+//        Integer declareUserId = ifsInventoryQuantity.getDeclareUserId();
+//        User user = userMapper.selectById(declareUserId);
+//
+//        InsOrder insOrder = new InsOrder();
+//        insOrder.setState(4);
+//        insOrder.setTypeSource(1);
+//        String code = "Y";
+//        // 鐢熸垚缂栧彿
+//        String no = numberGenerator.generateNumberWithPrefix(3,
+//                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
+//                InsOrder::getEntrustCode);
+//        insOrder.setExamineTime(LocalDateTime.now());
+//        insOrder.setEntrustCode(no);
+//        insOrder.setIsExemption(1);
+//        // 渚涘簲鍟嗗悕绉�
+//        insOrder.setProduction(ifsInventoryQuantity.getSupplierName());
+//        // 濮旀墭浜哄悕绉�
+//        insOrder.setPrepareUser(user.getName());
+//        insOrder.setPhone(user.getPhone());
+//        insOrder.setIfsInventoryId(ifsInventoryId);
+//        insOrder.setPartDetail(partDetail);
+//        insOrder.setSendTime(LocalDateTime.now());
+//        insOrder.setSample(ifsInventoryQuantity.getPartDesc());
+//        // 杩涘巶妫�楠�
+//        insOrder.setOrderType(InsOrderTypeConstants.ENTER_THE_FACTORY);
+//
+//        insOrderMapper.insert(insOrder);
+//
+//        // 娣诲姞宸ユ椂
+//        addAuxiliary(insOrder, ifsInventoryQuantity);
+//
+//        // todo: ifs鐩存帴绉诲簱
+//        insReportService.isRawMaterial(insOrder);
+//        return true;
+//    }
+//
+//    /**
+//     * 0, 鏃犳彁绀�, 1鎻愮ず  褰撳墠鎵规鐨勬牱鍝佸凡妫�楠岃繃, 鍙互鍏嶆, 2 鎻愮ず 褰撳墠鎵规鐨勬牱鍝佸凡瓒�20鍚�, 闇�瑕佸绾у娆℃楠�
+//     *
+//     * 鍘熸潗鏂欎笅鍗曢�氱煡鍏嶆鎴栬�呭娆℃楠�
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @Override
+//    public int notificationRawOrder(Integer ifsInventoryId) {
+//        IfsInventoryQuantity ifsInventory = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
+//        // 鏌ヨ褰撳墠鎵规, 渚涘簲鍟�, 闆朵欢鍙风殑鍘熸潗鏂欐槸鍚﹁秴杩囦簡20鍚�, 瓒呰繃浜�20鍚ㄩ渶瑕佽繘琛屽娆℃楠屾彁閱�
+//        List<IfsInventoryQuantity> quantityList = ifsInventoryQuantityMapper.selectList(Wrappers.<IfsInventoryQuantity>lambdaQuery()
+//                .eq(IfsInventoryQuantity::getPartNo, ifsInventory.getPartNo())
+//                .eq(IfsInventoryQuantity::getUpdateBatchNo, ifsInventory.getUpdateBatchNo())
+//                .eq(IfsInventoryQuantity::getSupplierId, ifsInventory.getSupplierId())
+//                .eq(IfsInventoryQuantity::getSupplierName, ifsInventory.getSupplierName()));
+//
+//        // 鍒ゆ柇鏄惁澶т簬20鍚�
+//        BigDecimal bigDecimal = new BigDecimal("20000");
+//        BigDecimal count = BigDecimal.ZERO;
+//        for (IfsInventoryQuantity inventoryQuantity : quantityList) {
+//            // 鍒ゆ柇鍗曚綅鏄痥g鎴栬�卼
+//            if (inventoryQuantity.getBuyUnitMeas().equalsIgnoreCase("t")) {
+//                count = count.add(inventoryQuantity.getQtyArrived().multiply(new BigDecimal("1000")));
+//            } else if (inventoryQuantity.getBuyUnitMeas().equalsIgnoreCase("kg")) {
+//                count = count.add(inventoryQuantity.getQtyArrived());
+//            }
+//        }
+//
+//        if (count.compareTo(bigDecimal) >= 0) {
+//            return 2;
+//        } else {
+//            // 鍒ゆ柇涔嬪墠鏄惁鍑鸿繃鎶ュ憡, 鍑鸿繃鎶ュ憡鍙互鍏嶆
+//            int reportCount = ifsInventoryQuantityMapper.selectReportCountById(ifsInventoryId);
+//            if (reportCount > 0) {
+//                return 1;
+//            }
+//        }
+//        return 0;
+//    }
+//
+//    /**
+//     * 鎶ユ鍙互鏂板鎶ユ淇℃伅
+//     * @param ifsInventoryQuantity
+//     */
+//    @Override
+//    public void addIfsInventoryQuantity(IfsInventoryQuantity ifsInventoryQuantity) {
+//        ifsInventoryQuantity.setIsSource(0);
+//        ifsInventoryQuantity.setState(0);
+//        ifsInventoryQuantity.setIsFinish(0);
+//        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
+//    }
+//
+//    @Override
+//    public void shiftingParking(List<Integer> ids) {
+//        for (Integer id : ids) {
+//            InsOrder order = insOrderService.getById(id);
+//            // todo: ifs鐩存帴绉诲簱
+//            insReportService.isRawMaterial(order);
+//        }
+//    }
+//
+//    /**
+//     * 閾滃崟涓濅笅鍗曞厤妫�
+//     * @param list
+//     * @param insOrder
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public int addRawCopperOrderExemptionOrder(List<SampleProductDto> list, CopperInsOrderDto insOrder) {
+//        if (!insOrder.getOrderType().equals(InsOrderTypeConstants.ENTER_THE_FACTORY)) {
+//            throw new ErrorException("鍙湁杩涘巶妫�楠屾墠鑳藉厤妫�");
+//        }
+//        insOrder.setSendTime(LocalDateTime.now());
+//        // 淇敼璁㈠崟琛ㄧ洿鎺ヤ负宸叉楠�
+//        insOrder.setState(4);
+//        insOrder.setTypeSource(1);
+//
+//        String code = "Y";
+//        // 鐢熸垚缂栧彿
+//        String no = numberGenerator.generateNumberWithPrefix(3,
+//                "JCZX/ZB-" + code + LimsDateUtil.resetDate(LocalDateTime.now()),
+//                InsOrder::getEntrustCode);
+//
+//        insOrderMapper.insert(insOrder); // 涓昏〃
+//
+//        AtomicInteger count = new AtomicInteger();
+//        list.forEach(a -> {
+//            count.getAndIncrement();
+//            a.setId(null);
+//            a.setInsOrderId(insOrder.getId());
+//            if (StrUtil.isEmpty(a.getSampleCode())) {
+//                // 濡傛灉鍙湁涓�涓牱鍝佸氨涓嶉渶瑕佹嫾鎺ユ暟瀛�
+//                if (list.size() != 1) {
+//                    a.setSampleCode(no + "-" + count.get());
+//                } else {
+//                    a.setSampleCode(no);
+//                }
+//            }
+//            insSampleMapper.insert(a);
+//
+//            if (!CollectionUtil.isEmpty(a.getInsProduct())) {
+//                throw new ErrorException("鍏嶆涓嶉渶瑕佸~鍐欐楠岄」");
+//            }
+//        });
+//        // 娣诲姞鍘熸潗鏂欎俊鎭�
+//        IfsInventoryQuantity ifsInventoryQuantity = new IfsInventoryQuantity();
+//        // 鍩烘湰淇℃伅
+//        ifsInventoryQuantity.setIsSource(0);
+//        ifsInventoryQuantity.setState(2);
+//        ifsInventoryQuantity.setIsInspect(1);
+//        ifsInventoryQuantity.setIsFinish(1);
+//        ifsInventoryQuantity.setIsCopper(1);
+//        ifsInventoryQuantity.setInspectStatus(1);
+//        ifsInventoryQuantity.setIsQuarter(0);
+//
+//        ifsInventoryQuantity.setQtyArrived(insOrder.getQtyArrived());
+//        ifsInventoryQuantity.setBuyUnitMeas(insOrder.getBuyUnitMeas());
+//        ifsInventoryQuantity.setSupplierName(insOrder.getSupplierName());
+//        ifsInventoryQuantity.setUpdateBatchNo(insOrder.getUpdateBatchNo());
+//        ifsInventoryQuantity.setDeclareDate(insOrder.getDeclareDate());
+//
+//        ifsInventoryQuantityMapper.insert(ifsInventoryQuantity);
+//
+//        insOrder.setIfsInventoryId(ifsInventoryQuantity.getId());
+//        insOrder.setExamineTime(LocalDateTime.now());
+//
+//        insOrder.setEntrustCode(no);
+//        insOrder.setIsExemption(1);
+//
+//        insOrderMapper.updateById(insOrder);
+//
+//        // 娣诲姞宸ユ椂
+//        addAuxiliary(insOrder, ifsInventoryQuantity);
+//
+//        return insOrder.getId();
+//    }
+//
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public boolean concessionRelease(Integer ifsInventoryId) {
+//        // 鏌ヨ鍘熸潗鏂欎俊鎭�
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
+//        if (!ifsInventoryQuantity.getInspectStatus().equals(2)) {
+//            throw new ErrorException("涓嶅悎鏍肩殑鍘熸潗鏂欐墠鑳借姝ユ斁琛�");
+//        }
+//
+//        // todo:闇�瑕佸垽鏂璷a娴佺▼鏄惁鏄姝ユ斁琛�
+//        String toLocation = insReportService.moveRawMaterial(ifsInventoryQuantity);
+//
+//        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                .set(IfsInventoryQuantity::getInspectStatus, 4)
+//                .set(IfsInventoryQuantity::getToLocation, toLocation)
+//                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
+//
+//        return true;
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欒繘鍘傛挙閿�涓嬪崟
+//     * @param enterOrderId
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public boolean repealEnterRawOrder(Integer enterOrderId) {
+//        // 鏌ヨ璁㈠崟
+//        InsOrder order = insOrderMapper.selectById(enterOrderId);
+//
+//        // 鏌ヨ鍒ゆ柇鏄惁鏄摐鍗曚笣
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(order.getIfsInventoryId());
+//        if (ifsInventoryQuantity.getIsCopper() != null && ifsInventoryQuantity.getIsCopper().equals(1)) {
+//            // 閾滃崟涓濈洿鎺ュ垹闄ゅ氨琛�
+//            ifsInventoryQuantityMapper.deleteById(order.getIfsInventoryId());
+//        } else {
+//            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                    .set(IfsInventoryQuantity::getState, 0)
+//                    .set(IfsInventoryQuantity::getIsQuarter, 1)
+//                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
+//        }
+//        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getId, enterOrderId)
+//                .set(InsOrder::getState, -1)
+//                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
+//
+//        // 娓呴櫎涔嬪墠鐨勫伐鏃�
+//        auxiliaryOutputWorkingHoursMapper.delete(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery()
+//                .eq(AuxiliaryOutputWorkingHours::getOrderId, enterOrderId));
+//
+//        // 娓呴櫎涔嬪墠鎶ュ憡
+//        insReportService.remove(Wrappers.<InsReport>lambdaQuery()
+//                .eq(InsReport::getInsOrderId, enterOrderId));
+//
+//        return true;
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欏搴︽挙閿�涓嬪崟
+//     * @param quarterOrderId
+//     * @return
+//     */
+//    @Override
+//    @Transactional(rollbackFor = Exception.class)
+//    public boolean repealQuarterRawOrder(Integer quarterOrderId) {
+//        // 鏌ヨ璁㈠崟
+//        InsOrder order = insOrderMapper.selectById(quarterOrderId);
+//
+//        Long count = insOrderMapper.selectCount(Wrappers.<InsOrder>lambdaQuery()
+//                .eq(InsOrder::getIfsInventoryId, order.getIfsInventoryId())
+//                .ne(InsOrder::getState, -1)
+//                .eq(InsOrder::getOrderType, InsOrderTypeConstants.ENTER_THE_FACTORY)
+//                .ne(InsOrder::getId, order.getId()));
+//        // 鍒ゆ柇涔嬪墠鏄惁鏈夎繘鍘傛楠�, 娌℃湁闇�瑕佷慨鏀瑰師鏉愭枡淇℃伅
+//        if (count == 0) {
+//            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                    .set(IfsInventoryQuantity::getState, 0)
+//                    .set(IfsInventoryQuantity::getIsQuarter, 1)
+//                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
+//        } else {
+//            ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                    .set(IfsInventoryQuantity::getIsQuarter, 1)
+//                    .eq(IfsInventoryQuantity::getId, order.getIfsInventoryId()));
+//        }
+//
+//        insOrderService.update(Wrappers.<InsOrder>lambdaUpdate()
+//                .eq(InsOrder::getId, quarterOrderId)
+//                .set(InsOrder::getState, -1)
+//                .set(InsOrder::getEntrustCode, ""));// 鎾ら攢
+//        auxiliaryOutputWorkingHoursMapper.delete(Wrappers.<AuxiliaryOutputWorkingHours>lambdaQuery()
+//                .eq(AuxiliaryOutputWorkingHours::getOrderId, quarterOrderId));
+//        // 娓呴櫎涔嬪墠鎶ュ憡
+//        insReportService.remove(Wrappers.<InsReport>lambdaQuery()
+//                .eq(InsReport::getInsOrderId, quarterOrderId));
+//        return true;
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欐姤妫�鍏ㄩ儴淇℃伅瀵煎嚭
+//     * @param ifsInventoryQuantityDto
+//     * @param response
+//     */
+//    @Override
+//    public void rawAllExport(IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto, HttpServletResponse response) throws UnsupportedEncodingException {
+//        //鏌ヨ瀵煎嚭鐨勮垂鐢ㄧ粺璁℃暟鎹�
+//        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
+//        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
+//        ifsInventoryQuantityDto.setBeginDeclareDate(null);
+//        ifsInventoryQuantityDto.setEndDeclareDate(null);
+//        List<IfsInventoryQuantitySupplierDto> ifsByOverList = standardTreeMapper.getIfsByOverList(QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
+//
+//        for (IfsInventoryQuantitySupplierDto dto : ifsByOverList) {
+//            dto.setSendTimeString(dto.getSendTime() == null ? "" : dto.getSendTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+//            dto.setReceiverDateString(dto.getReceiverDate() == null ? "" : dto.getReceiverDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+//            dto.setDeclareDateString(dto.getDeclareDate() == null ? "" : dto.getDeclareDate().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
+//            switch (dto.getInspectStatus()) {
+//                case 1:
+//                    dto.setInspectStatusString("鍚堟牸");
+//                    break;
+//                case 2:
+//                    dto.setInspectStatusString("涓嶅悎鏍�");
+//                    // 鏌ヨ涓嶅悎鏍奸」
+//                    List<String> unqualifiedList = insProductMapper.selectUnqualifiedList(dto.getEnterOrderId() == null ? dto.getQuarterOrderId() : dto.getEnterOrderId());
+//                    dto.setUnqualifiedItem(CollUtil.join(unqualifiedList, ","));
+//                    break;
+//                case 3:
+//                    dto.setInspectStatusString("鏈笅鍗�");
+//                    break;
+//                case 4:
+//                    dto.setInspectStatusString("璁╂鏀捐");
+//                    break;
+//                case 0:
+//                    dto.setInspectStatusString("妫�楠屼腑");
+//                    break;
+//
+//            }
+//        }
+//
+//
+//        response.setContentType("application/vnd.ms-excel");
+//        response.setCharacterEncoding("UTF-8");
+//        // 杩欓噷URLEncoder.encode鍙互闃叉涓枃涔辩爜 褰撶劧鍜宔asyexcel娌℃湁鍏崇郴
+//        String fileName = URLEncoder.encode("鍘熸潗鏂欐娴嬩俊鎭鍑�", "UTF-8");
+//        response.setHeader("Content-disposition", "attachment;filename=" + fileName + ".xlsx");
+//        try {
+//            //鏂板缓ExcelWriter
+//            ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream()).registerWriteHandler(new LongestMatchColumnWidthStyleStrategy()).build();
+//            //鑾峰彇sheet0瀵硅薄
+//            WriteSheet mainSheet = EasyExcel.writerSheet(0, "鍘熸潗鏂欐娴嬩俊鎭鍑�").head(IfsInventoryQuantitySupplierDto.class).build();
+//
+//            //鍚憇heet0鍐欏叆鏁版嵁 浼犲叆绌簂ist杩欐牱鍙鍑鸿〃澶�
+//            excelWriter.write(ifsByOverList, mainSheet);
+//            //鍏抽棴娴�
+//            excelWriter.finish();
+//        } catch (IOException e) {
+//            throw new RuntimeException("瀵煎嚭澶辫触");
+//        }
+//    }
+//
+//    /**
+//     * 鍘熸潗鏂欐煡璇㈠彲浠ュ搴︽楠岀殑鍐呭
+//     * @param page
+//     * @param ifsInventoryQuantityDto
+//     * @return
+//     */
+//    @Override
+//    public IPage<IfsInventoryQuantitySupplierDto> getIfsByQuarter(Page page, IfsInventoryQuantitySupplierDto ifsInventoryQuantityDto) {
+//
+//        // todo: 鍙湅鎴�
+//        String beginDeclareDate = ifsInventoryQuantityDto.getBeginDeclareDate();
+//        String endDeclareDate = ifsInventoryQuantityDto.getEndDeclareDate();
+//        ifsInventoryQuantityDto.setBeginDeclareDate(null);
+//        ifsInventoryQuantityDto.setEndDeclareDate(null);
+//
+//        return standardTreeMapper.getIfsByQuarter(page, QueryWrappers.queryWrappers(ifsInventoryQuantityDto), beginDeclareDate, endDeclareDate);
+//    }
+//
+//    /**
+//     * 鎻愬墠鍏ュ簱
+//     * @param ifsInventoryId
+//     * @return
+//     */
+//    @Override
+//    public boolean advancedGodown(Integer ifsInventoryId) {
+//        // 鏌ヨ鍘熸潗鏂欎俊鎭�
+//        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(ifsInventoryId);
+//        if (!ifsInventoryQuantity.getInspectStatus().equals(0)
+//                && !ifsInventoryQuantity.getInspectStatus().equals(3)) {
+//            throw new ErrorException("鏈娴嬪畬鎴愭暟鎹墠鑳芥彁鍓嶅叆搴�");
+//        }
+//
+//        // todo:闇�瑕佸垽鏂璷a娴佺▼鏄惁鏄姝ユ斁琛�
+//        String toLocation = insReportService.moveRawMaterial(ifsInventoryQuantity);
+//
+//        ifsInventoryQuantityMapper.update(null, new LambdaUpdateWrapper<IfsInventoryQuantity>()
+//                .set(IfsInventoryQuantity::getInspectStatus, 1)
+//                .set(IfsInventoryQuantity::getIsFinish, 1)
+//                .set(IfsInventoryQuantity::getToLocation, toLocation)
+//                .eq(IfsInventoryQuantity::getId, ifsInventoryId));
+//
+//        return true;
+//    }
+//
+//
+//    /**
+//     * 娣诲姞宸ユ椂
+//     * @param insOrder
+//     * @param ifsInventoryQuantity
+//     */
+//    private void addAuxiliary(InsOrder insOrder, IfsInventoryQuantity ifsInventoryQuantity) {
+//        AuxiliaryOutputWorkingHours auxiliaryOutputWorkingHours = new AuxiliaryOutputWorkingHours();
+//        auxiliaryOutputWorkingHours.setInspectionItemClass(ifsInventoryQuantity.getUpdateBatchNo() + "鍏嶆");//妫�娴嬮」鍒嗙被
+//        auxiliaryOutputWorkingHours.setSample(insOrder.getEntrustCode());//鏍峰搧缂栧彿
+//        auxiliaryOutputWorkingHours.setOrderId(insOrder.getId());//璁㈠崟id
+//        auxiliaryOutputWorkingHours.setOrderNo(insOrder.getEntrustCode());//闈炲姞鐝鎵樺崟鍙�
+//
+//        // 鍏嶆榛樿2
+//        auxiliaryOutputWorkingHours.setWorkTime(new BigDecimal("2"));//闈炲姞鐝伐鏃�
+//        auxiliaryOutputWorkingHours.setAmount(1);//闈炲姞鐝暟閲�
+//        auxiliaryOutputWorkingHours.setOutputWorkTime((ObjectUtils.isNotEmpty(auxiliaryOutputWorkingHours.getOvertimeWorkTime()) ? auxiliaryOutputWorkingHours.getOvertimeWorkTime() : BigDecimal.ZERO).add(ObjectUtils.isNotEmpty(auxiliaryOutputWorkingHours.getWorkTime()) ? auxiliaryOutputWorkingHours.getWorkTime() : BigDecimal.ZERO));//浜ч噺宸ユ椂
+//        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+//        DateTimeFormatter formatters = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
+//        auxiliaryOutputWorkingHours.setDateTime(LocalDateTime.now().toLocalDate().atStartOfDay().format(formatters));//鏃ユ湡
+//        LocalDateTime localDateTime = LocalDateTime.now();
+//        DateTime parse = DateUtil.parse(localDateTime.format(formatter));
+//        auxiliaryOutputWorkingHours.setWeekDay(getWeek(localDateTime.format(formatters)));//鏄熸湡
+//        auxiliaryOutputWorkingHours.setWeek(String.valueOf(DateUtil.weekOfYear(DateUtil.offsetDay(parse, 1))));//鍛ㄦ
+//        auxiliaryOutputWorkingHours.setCheck(SecurityUtils.getUserId().intValue());//妫�娴嬩汉
+//        auxiliaryOutputWorkingHours.setPrice(new BigDecimal("1"));//鍗曚环
+//
+//        auxiliaryOutputWorkingHoursMapper.insert(auxiliaryOutputWorkingHours);
+//    }
+//
+//    public static String getWeek(String dayStr) {
+//        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        try {
+//            Date date = sdf.parse(dayStr);
+//            Calendar calendar = Calendar.getInstance();
+//            calendar.setTime(date);
+//            int dayOfWeek = calendar.get(Calendar.DAY_OF_WEEK);
+//            int day = calendar.get(Calendar.DAY_OF_MONTH);
+//            return getWeekDay(dayOfWeek);
+//        } catch (Exception e) {
+//            e.printStackTrace();
+//        }
+//        return null;
+//    }
+//
+//    public static String getWeekDay(int dayOfWeek) {
+//        switch (dayOfWeek) {
+//            case Calendar.MONDAY:
+//                return "鍛ㄤ竴";
+//            case Calendar.TUESDAY:
+//                return "鍛ㄤ簩";
+//            case Calendar.WEDNESDAY:
+//                return "鍛ㄤ笁";
+//            case Calendar.THURSDAY:
+//                return "鍛ㄥ洓";
+//            case Calendar.FRIDAY:
+//                return "鍛ㄤ簲";
+//            case Calendar.SATURDAY:
+//                return "鍛ㄥ叚";
+//            case Calendar.SUNDAY:
+//                return "鍛ㄦ棩";
+//            default:
+//                return "鏈煡";
+//        }
+//    }
+//}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java
new file mode 100644
index 0000000..3b98458
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/DeviationAnalyzeVo.java
@@ -0,0 +1,58 @@
+package com.ruoyi.inspect.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 鍋忓樊鍒嗘瀽瀵硅薄
+ *
+ * @Author zhuo
+ * @Date 2024/10/25
+ */
+@Data
+public class DeviationAnalyzeVo {
+
+    @ApiModelProperty("鍘傚妫�娴嬫暟鎹�")
+    private List<Object> supplierData;
+
+    @ApiModelProperty("鏈湴妫�娴嬫暟鎹�")
+    private List<Object> localData;
+
+    @ApiModelProperty("缁濆鍋忓樊")
+    private List<Object> absoluteDeviation;
+
+    @ApiModelProperty("骞冲潎鍊�")
+    private List<Object> average;
+
+    /**
+     * 鍘傚
+     */
+    @ApiModelProperty("UCL")
+    private List<Object> supplierULC;
+
+    @ApiModelProperty("LCL")
+    private List<Object> supplierLCL;
+
+    @ApiModelProperty("骞冲潎鍊�")
+    private List<Object> supplierAverage;
+
+    @ApiModelProperty("鏋佸樊")
+    private List<Object> supplierRange;
+
+    /**
+     * 鏈湴
+     */
+    @ApiModelProperty("UCL")
+    private List<Object> localULC;
+
+    @ApiModelProperty("LCL")
+    private List<Object> localLCL;
+
+    @ApiModelProperty("骞冲潎鍊�")
+    private List<Object> localAverage;
+
+    @ApiModelProperty("鏋佸樊")
+    private List<Object> localRange;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java
new file mode 100644
index 0000000..4a064d3
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanTaskSwitchVo.java
@@ -0,0 +1,35 @@
+package com.ruoyi.inspect.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class InsOrderPlanTaskSwitchVo{
+    private String id;
+
+    private String entrustCode;
+
+    private String sampleType;
+
+    @ApiModelProperty("绱ф�ョ▼搴�")
+    private String type;
+
+    @ApiModelProperty("鐘舵��")
+    private String insState;
+
+    @ApiModelProperty("绾﹀畾鏃堕棿")
+    private String appointed;
+
+    @ApiModelProperty("涓嬪彂鏃堕棿")
+    private String sendTime;
+
+    private Integer userId;
+
+    private String sonLaboratory;
+
+    private String laboratory;
+
+    private Integer orderUserId;
+
+    private Integer verifyUser;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java
new file mode 100644
index 0000000..fe6ff0c
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPlanVO.java
@@ -0,0 +1,78 @@
+package com.ruoyi.inspect.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+public class InsOrderPlanVO{
+
+
+    private String id;
+
+    @ApiModelProperty("濮旀墭缂栧彿")
+    private String entrustCode;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+
+    @ApiModelProperty("鏍峰搧鍨嬪彿")
+    private String sampleModel;
+
+    @ApiModelProperty("绱ф�ョ▼搴�")
+    private String type;
+
+    @ApiModelProperty("妫�楠岀被鍨�")
+    private String orderType;
+
+    @ApiModelProperty("鐘舵��")
+    private String insState;
+
+    @ApiModelProperty("妫�楠屼汉")
+    private String userName;
+
+    @ApiModelProperty("澶嶆牳浜�")
+    private String checkName;
+
+    private Integer userId;
+
+    @ApiModelProperty("妫�楠屽紑濮嬫椂闂�")
+    private String insTime;
+
+    @ApiModelProperty("绾﹀畾鏃堕棿")
+    private String appointed;
+
+    @ApiModelProperty("涓嬪彂鏃堕棿")
+    private String sendTime;
+
+    @ApiModelProperty("鐞嗙敱")
+    private String verifyTell;
+
+
+    private String sonLaboratory;
+
+    private Integer orderUserId;
+
+    private Integer verifyUser;
+
+    @ApiModelProperty("涓嬪崟绫诲埆")
+    private Integer typeSource;
+
+    @ApiModelProperty("鍘熸潗鏂檌d")
+    private Integer ifsInventoryId;
+
+    @ApiModelProperty("鎶ュ憡鍦板潃")
+    private String url;
+
+    @ApiModelProperty("鏂板湴鍧�")
+    private String urlS;
+
+    @ApiModelProperty("鏄惁鏄摐鍗曚笣")
+    private Integer isCopper;
+
+    @ApiModelProperty("鏌ョ湅涓存椂鎶ュ憡鍦板潃")
+    private String tempUrlPdf;
+
+    @ApiModelProperty("鎶ュ憡id")
+    private String insReportId;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java
new file mode 100644
index 0000000..46595ea
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/InsOrderPrintingVo.java
@@ -0,0 +1,47 @@
+package com.ruoyi.inspect.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.time.LocalDateTime;
+
+/**
+ * @Author zhuo
+ * @Date 2024/12/3
+ */
+@Data
+public class InsOrderPrintingVo {
+
+    @ApiModelProperty("璁㈠崟缂栧彿")
+    private Integer insOrderId;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sampleView;
+
+    @ApiModelProperty("鐢熶骇鍗曚綅")
+    private String production;
+
+    @ApiModelProperty("瑙勬牸鍨嬪彿")
+    private String sampleModel;
+
+    @ApiModelProperty("濮旀墭鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private LocalDateTime sendTime;
+
+    @ApiModelProperty("濮旀墭浜�")
+    private String prepareUser;
+
+    @ApiModelProperty("妫�娴嬬紪鍙�")
+    private String entrustCode;
+
+    @ApiModelProperty("鏍峰搧鏁伴噺")
+    private String testQuantity;
+
+    @ApiModelProperty("鏉″舰鐮�")
+    private String labelBarCode;
+
+    @ApiModelProperty("璁㈠崟鐘舵��")
+    private Integer insState;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java
new file mode 100644
index 0000000..bb99385
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/ProductVo.java
@@ -0,0 +1,22 @@
+package com.ruoyi.inspect.vo;
+
+import com.ruoyi.inspect.pojo.InsProduct;
+import lombok.Data;
+
+@Data
+public class ProductVo  {
+
+    //绠¤壊鏍�
+    private String bushColor;
+
+    //鍏夌氦鑹叉爣
+    private String color;
+
+    //鍏夌氦甯︾紪鍙�
+    private String code;
+
+    //妫�楠岄」鐩�
+    private InsProduct insProduct;
+
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java
new file mode 100644
index 0000000..3b047ab
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawMaterialSupplierVo.java
@@ -0,0 +1,31 @@
+package com.ruoyi.inspect.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @Author zhuo
+ * @Date 2024/10/24
+ */
+@Data
+public class RawMaterialSupplierVo {
+
+    @ApiModelProperty("璁㈠崟id")
+    private Integer OrderId;
+
+    @ApiModelProperty("渚涘簲鍟嗗悕绉�")
+    private String supplierName;
+
+    @ApiModelProperty("妫�娴嬬紪鍙�")
+    private String entrustCode;
+
+    @ApiModelProperty("鏍峰搧鍚嶇О")
+    private String sample;
+
+    @ApiModelProperty("鍨嬪彿")
+    private String model;
+
+    @ApiModelProperty("妫�娴嬪��")
+    private String lastValue;
+
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java
new file mode 100644
index 0000000..39efd36
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/RawProductAnalysisVo.java
@@ -0,0 +1,23 @@
+package com.ruoyi.inspect.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 椤规鍒嗘瀽杩斿洖瀵硅薄
+ *
+ * @Author zhuo
+ * @Date 2024/10/17
+ */
+@Data
+public class RawProductAnalysisVo {
+
+    @ApiModelProperty("妫�楠岄」鍚嶇О")
+    private List<String> itemNames;
+
+    @ApiModelProperty("妫�楠岄」鍐呭")
+    private List<Map<String, Object>> productList;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java
new file mode 100644
index 0000000..466ac2e
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsChildrenVo.java
@@ -0,0 +1,17 @@
+package com.ruoyi.inspect.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class SampleDefectsChildrenVo {
+    private String entrust_code;//濮旀墭缂栫爜
+    private String inspection_item;//妫�楠岄」
+    private String name;//妫�楠屼汉
+    private LocalDateTime create_time;//妫�楠屾棩鏈�
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java
new file mode 100644
index 0000000..c9e8d24
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleDefectsFatherVo.java
@@ -0,0 +1,17 @@
+package com.ruoyi.inspect.vo;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+@Data
+@AllArgsConstructor
+@NoArgsConstructor
+public class SampleDefectsFatherVo {
+    private Integer id;//鏍峰搧id
+    private String sample;//鏍峰搧鍚嶇О
+
+    private List<SampleDefectsChildrenVo> children;//瀛愮被
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java
new file mode 100644
index 0000000..90e0429
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/SampleVo.java
@@ -0,0 +1,10 @@
+package com.ruoyi.inspect.vo;
+
+import com.ruoyi.inspect.pojo.InsSample;
+import lombok.Data;
+
+@Data
+public class SampleVo extends InsSample {
+    //璇曢獙鏂规硶
+    private  String methodName;
+}
diff --git a/inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java b/inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java
new file mode 100644
index 0000000..bebc1ca
--- /dev/null
+++ b/inspect-server/src/main/java/com/ruoyi/inspect/vo/UnqualifiedHandlerVO.java
@@ -0,0 +1,155 @@
+package com.ruoyi.inspect.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruoyi.inspect.pojo.InsUnqualifiedHandler;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+
+@Data
+public class UnqualifiedHandlerVO extends InsUnqualifiedHandler {
+
+    @ApiModelProperty("涓嶅悎鏍煎鐞嗕富閿甶d")
+    private Long handlerId;
+
+    @ApiModelProperty("鍩�")
+    private String contract;
+
+    @ApiModelProperty("璁㈠崟鍙�")
+    private String orderNo;
+
+    @ApiModelProperty("琛屽彿")
+    private String lineNo;
+
+    @ApiModelProperty("涓嬭揪鍙�")
+    private String releaseNo;
+
+    @ApiModelProperty("鎺ユ敹鍙�")
+    private Integer receiptNo;
+
+    @ApiModelProperty("闆朵欢鍙�")
+    private String partNo;
+
+    @ApiModelProperty("闆朵欢鎻忚堪")
+    private String partDesc;
+
+    @ApiModelProperty("鐘舵�佹弿杩�")
+    private String status;
+
+    @ApiModelProperty("鐘舵��")
+    private String statusDB;
+
+    @ApiModelProperty("鎶佃揪鐨勯噰璐暟閲�")
+    private BigDecimal qtyArrived;
+
+    @ApiModelProperty("宸叉楠岀殑璐拱鏁伴噺")
+    private BigDecimal qtyInspected;
+
+    @ApiModelProperty("瑕佹楠岀殑閲囪喘鏁伴噺")
+    private BigDecimal qtyToInspect;
+
+    @ApiModelProperty("渚涘簲鍟嗙紪鍙�")
+    private String supplierId;
+
+    @ApiModelProperty("渚涘簲鍟嗗悕绉�")
+    private String supplierName;
+
+    @ApiModelProperty("鎶佃揪鐨勫簱瀛樻暟閲�")
+    private BigDecimal invQtyInStore;
+
+    @ApiModelProperty("鎶佃揪鐨勯噰璐暟閲�")
+    private BigDecimal purQtyInStore;
+
+    @ApiModelProperty("閰嶇疆鏍囪瘑")
+    private String configurationId;
+
+    @ApiModelProperty("鎵瑰彿")
+    private String lotBatchNo;
+
+    @ApiModelProperty("wdr鍙�")
+    private String waivDevRejNo;
+
+    @ApiModelProperty("娲诲姩搴忓垪")
+    private String activitySeq;
+
+
+    @ApiModelProperty("搴忓垪鍙�")
+    private String serialNo;
+
+    @ApiModelProperty("搴撲綅鍙�")
+    private String locationNo;
+
+    @ApiModelProperty("鐗堟湰鍙�")
+    private String engChgLevel;
+
+    @ApiModelProperty("鎺ユ敹浜�")
+    private String receiver;
+
+    @ApiModelProperty("鎺ユ敹浜哄鍚�")
+    private String receiverName;
+
+    @ApiModelProperty("閲囪喘鍛�")
+    private String buyerCode;
+
+    @ApiModelProperty("閲囪喘鍛樺鍚�")
+    private String buyerName;
+
+    @ApiModelProperty("瀹為檯鍒拌揣鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime arriveDate;
+
+    @ApiModelProperty("瀹為檯浜よ揣鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime deliveryDate;
+
+    @ApiModelProperty("鐢熶骇鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime productDate;
+
+    @ApiModelProperty("澶辨晥鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime invalidDate;
+
+
+    @ApiModelProperty("瀹℃壒鏃ユ湡")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime approvedDate;
+
+    @ApiModelProperty("閲囪喘鐢宠鍒涘缓浜�")
+    private String reqCeater;
+
+    @ApiModelProperty("閲囪喘鐢宠鍒涘缓浜哄鍚�")
+    private String reqCeaterName;
+
+    @ApiModelProperty("閲囪喘璁㈠崟琛屽娉�")
+    private String lineRemarks;
+
+    @ApiModelProperty("閲囪喘鍗曚綅")
+    private String buyUnitMeas;
+
+    /**
+     * 鏄惁涓篿fs鎷夊彇 1:鏄� 0:鍚�
+     */
+    @ApiModelProperty("鏄惁涓篿fs鎷夊彇 1:鏄� 0:鍚�")
+    private Integer isSource;
+
+    /**
+     * 鎷嗗垎鏁伴噺
+     */
+    @ApiModelProperty("鎷嗗垎鏁伴噺")
+    private Integer number;
+
+
+    /**
+     * 妫�楠岀姸鎬�
+     */
+    @ApiModelProperty("妫�楠岀姸鎬�")
+    private Integer state;
+
+    @ApiModelProperty("鎺ユ敹鏃堕棿")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
+    private LocalDateTime receiverDate;
+
+}
diff --git a/inspect-server/src/main/resources/static/factory_verify.docx b/inspect-server/src/main/resources/static/factory_verify.docx
new file mode 100644
index 0000000..c74f9d8
--- /dev/null
+++ b/inspect-server/src/main/resources/static/factory_verify.docx
Binary files differ
diff --git a/inspect-server/src/main/resources/static/report-template.docx b/inspect-server/src/main/resources/static/report-template.docx
new file mode 100644
index 0000000..446e3f9
--- /dev/null
+++ b/inspect-server/src/main/resources/static/report-template.docx
Binary files differ
diff --git a/inspect-server/src/main/resources/static/small-report-template.docx b/inspect-server/src/main/resources/static/small-report-template.docx
new file mode 100644
index 0000000..8fc7a23
--- /dev/null
+++ b/inspect-server/src/main/resources/static/small-report-template.docx
Binary files differ
diff --git a/inspect-server/src/main/resources/static/spot_check_quarter.docx b/inspect-server/src/main/resources/static/spot_check_quarter.docx
new file mode 100644
index 0000000..0d1c843
--- /dev/null
+++ b/inspect-server/src/main/resources/static/spot_check_quarter.docx
Binary files differ
diff --git a/inspect-server/src/main/resources/static/spot_check_year.docx b/inspect-server/src/main/resources/static/spot_check_year.docx
new file mode 100644
index 0000000..0df5e76
--- /dev/null
+++ b/inspect-server/src/main/resources/static/spot_check_year.docx
Binary files differ
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java
index 290e0f2..80cb612 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryCorrectionHoursController.java
@@ -35,7 +35,7 @@
     AuxiliaryCorrectionHoursService auxiliaryCorrectionHoursService;
 
     @ApiOperation(value = "鏌ヨ淇宸ユ椂")
-    @PostMapping("/selectAuxiliaryCorrectionHours")
+    @GetMapping("/selectAuxiliaryCorrectionHours")
     public Result selectAuxiliaryCorrectionHours(Page page,AuxiliaryCorrectionHoursDto entity) throws Exception {
         return Result.success(auxiliaryCorrectionHoursService.selectAuxiliaryCorrectionHours(page, entity));
     }
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java
index e70636c..62e128b 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOriginalHoursController.java
@@ -25,20 +25,20 @@
     AuxiliaryOriginalHoursService auxiliaryOriginalHoursService;
 
     @ApiOperation(value = "鏌ヨ鍘熷宸ユ椂")
-    @PostMapping("/selectAuxiliaryOriginalHours")
+    @GetMapping("/selectAuxiliaryOriginalHours")
     public Result selectAuxiliaryOriginalHours(Page page, AuxiliaryOriginalHoursLookDto entity) throws Exception {
         return Result.success(auxiliaryOriginalHoursService.selectAuxiliaryOriginalHours(page, entity));
     }
 
     @ApiOperation(value = "瀵煎嚭鍘熷宸ユ椂")
-    @PostMapping("/exportOriginalHours")
+    @GetMapping("/exportOriginalHours")
     public void exportOriginalHours(@RequestParam("month") String month,  @RequestParam("name") String name,  @RequestParam("departLims") String departLims,HttpServletResponse response) throws IOException {
         auxiliaryOriginalHoursService.exportWorkingHours(month,name,departLims,response);
     }
 
     @ApiOperation(value = "鏌ヨ鏈堜唤鍏ㄩ儴宸ユ椂")
-    @PostMapping("/selectAuxiliaryAllByMonth")
-    public Result selectAuxiliaryAllByMonth(@RequestBody AuxiliaryOriginalHoursLookDto dto){
+    @GetMapping("/selectAuxiliaryAllByMonth")
+    public Result selectAuxiliaryAllByMonth(AuxiliaryOriginalHoursLookDto dto){
         return Result.success(auxiliaryOriginalHoursService.selectAuxiliaryAllByMonth(dto));
     }
 }
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java
index 5fb7d13..2bd041b 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryOutputWorkingHoursController.java
@@ -33,15 +33,14 @@
     private AuxiliaryOutputWorkingHoursService auxiliaryOutputWorkingHoursService;
 
     @ApiOperation(value = "鏌ヨ浜ч噺宸ユ椂")
-    @PostMapping("/selectAuxiliaryOutputWorkingHours")
+    @GetMapping("/selectAuxiliaryOutputWorkingHours")
     public Result selectAuxiliaryOutputWorkingHours(Page page,AuxiliaryOutputWorkingHoursDto entity) throws Exception {
         return Result.success(auxiliaryOutputWorkingHoursService.selectAuxiliaryOutputWorkingHours(page, entity));
     }
 
     @ApiOperation(value = "缁熻浜ч噺宸ユ椂姹囨�诲拰杈呭姪宸ユ椂姹囨��")
-    @PostMapping("/collectWorkingHours")
-    public Result collectWorkingHours(@RequestBody Map<String, Object> data)throws Exception{
-        AuxiliaryOutputWorkingHoursDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryOutputWorkingHoursDto.class);
+    @GetMapping("/collectWorkingHours")
+    public Result collectWorkingHours(AuxiliaryOutputWorkingHoursDto entity)throws Exception{
         return Result.success(auxiliaryOutputWorkingHoursService.collectWorkingHours(entity));
     }
 
@@ -65,9 +64,8 @@
      * @throws IOException
      */
     @ApiOperation(value = "瀵煎嚭浜ч噺宸ユ椂")
-    @PostMapping("/exportOutputHours")
-    public void exportOutputHours(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception {
-        AuxiliaryOutputWorkingHoursDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryOutputWorkingHoursDto.class);
+    @GetMapping("/exportOutputHours")
+    public void exportOutputHours(AuxiliaryOutputWorkingHoursDto entity, HttpServletResponse response) throws Exception {
         auxiliaryOutputWorkingHoursService.exportOutputHours(entity, response);
     }
 
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java
index bab8fc7..4afdf9f 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursController.java
@@ -8,10 +8,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import java.util.Map;
@@ -33,13 +30,13 @@
     private AuxiliaryWorkingHoursService auxiliaryWorkingHoursService;
 
     @ApiOperation(value="鏌ヨ杈呭姪宸ユ椂")
-    @PostMapping("/selectAuxiliaryWorkingHours")
+    @GetMapping("/selectAuxiliaryWorkingHours")
     public Result selectAuxiliaryWorkingHours(Page page,AuxiliaryWorkingHours entity) throws Exception {
         return Result.success(auxiliaryWorkingHoursService.selectAuxiliaryWorkingHours(page,entity));
     }
 
     @ApiOperation(value="鍒犻櫎杈呭姪宸ユ椂")
-    @PostMapping("/deleteAuxiliaryWorkingHours")
+    @DeleteMapping("/deleteAuxiliaryWorkingHours")
     public Result deleteAuxiliaryWorkingHours(Integer id){
         return Result.success(auxiliaryWorkingHoursService.deleteAuxiliaryWorkingHours(id));
     }
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java
index 97b0a81..4fce31e 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/AuxiliaryWorkingHoursDayController.java
@@ -10,10 +10,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
@@ -39,19 +36,19 @@
     private AuxiliaryWorkingHoursDayService auxiliaryWorkingHoursDayService;
 
     @ApiOperation(value = "鏌ヨ宸ユ椂缁熻鐨勮緟鍔╁伐鏃�")
-    @PostMapping("/selectAuxiliaryWorkingHoursDay")
+    @GetMapping("/selectAuxiliaryWorkingHoursDay")
     public Result selectAuxiliaryWorkingHoursDay(Page page,AuxiliaryWorkingHoursDayDto entity) throws Exception {
         return Result.success(auxiliaryWorkingHoursDayService.selectAuxiliaryWorkingHoursDay(page, entity));
     }
 
     @ApiOperation(value = "鏍规嵁缂栧彿鏌ヨ杈呭姪宸ユ椂閰嶇疆淇℃伅")
-    @PostMapping("/selectAuxiliaryWorkingHoursByNumber")
+    @GetMapping("/selectAuxiliaryWorkingHoursByNumber")
     public Result selectAuxiliaryWorkingHoursByNumber(String number) {
         return Result.success(auxiliaryWorkingHoursDayService.selectAuxiliaryWorkingHoursByNumber(number));
     }
 
     @ApiOperation(value = "鏍规嵁缂栧彿褰撳墠鐢ㄦ埛淇℃伅鏌ヨ鎵�鍦ㄧ彮娆�")
-    @PostMapping("/selectshiftByUser")
+    @GetMapping("/selectshiftByUser")
     public Result selectshiftByUser(LocalDateTime dateTime) {
         return Result.success(auxiliaryWorkingHoursDayService.selectshiftByUser(dateTime));
     }
@@ -81,7 +78,7 @@
     }
 
     @ApiOperation(value = "鍒犻櫎宸ユ椂缁熻鐨勮緟鍔╁伐鏃�")
-    @PostMapping("/deleteAuxiliaryWorkingHoursDay")
+    @DeleteMapping("/deleteAuxiliaryWorkingHoursDay")
     public Result deleteAuxiliaryWorkingHoursDay(Integer id) {
         return Result.success(auxiliaryWorkingHoursDayService.deleteAuxiliaryWorkingHoursDay(id));
     }
@@ -92,9 +89,8 @@
      * @throws IOException
      */
     @ApiOperation(value = "瀵煎嚭杈呭姪宸ユ椂")
-    @PostMapping("/exportAssistantHours")
-    public void exportAssistantHours(@RequestBody Map<String, Object> data, HttpServletResponse response) throws Exception {
-        AuxiliaryWorkingHoursDayDto entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), AuxiliaryWorkingHoursDayDto.class);
+    @GetMapping("/exportAssistantHours")
+    public void exportAssistantHours(AuxiliaryWorkingHoursDayDto entity, HttpServletResponse response) throws Exception {
         auxiliaryWorkingHoursDayService.exportWorkingHours(entity, response);
     }
 
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java
index ecdabdb..7b02c03 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/PerformanceShiftController.java
@@ -63,19 +63,19 @@
     }
 
     @ApiOperation(value = "鏈堜唤鍒嗛〉鏌ヨ")
-    @PostMapping("page")
+    @GetMapping("page")
     public Result<?> performanceShiftPage(Integer size, Integer current, String time, String userName, String laboratory) {
         return Result.success(performanceShiftService.performanceShiftPage(new Page<>(current, size), time, userName, laboratory));
     }
 
     @ApiOperation(value = "骞翠唤鍒嗛〉鏌ヨ")
-    @PostMapping("pageYear")
+    @GetMapping("pageYear")
     public Result<?> performanceShiftPageYear(Integer size, Integer current, String time, String userName, String laboratory) {
         return Result.success(performanceShiftService.performanceShiftPageYear(new Page<>(current, size), time, userName, laboratory));
     }
 
     @ApiOperation(value = "鐝鐘舵�佷慨鏀�")
-    @PutMapping("update")
+    @PostMapping("update")
     public Result<?> performanceShiftUpdate(@RequestBody PerformanceShift performanceShift) {
         performanceShiftService.performanceShiftUpdate(performanceShift);
         return Result.success();
diff --git a/performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java b/performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java
index 96364e1..6286cd5 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/controller/ShiftTimeController.java
@@ -6,10 +6,7 @@
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
 
 /**
  * <p>
@@ -35,13 +32,13 @@
     }
 
     @ApiOperation(value = "鎺掔彮鏃堕棿閰嶇疆鏌ヨ")
-    @PostMapping("list")
+    @GetMapping("list")
     public Result<?> shiftTimeList() {
         return Result.success(shiftTimeService.shiftTimeList());
     }
 
     @ApiOperation(value = "鎺掔彮鏃堕棿閰嶇疆鍒犻櫎")
-    @PostMapping("remove")
+    @DeleteMapping("remove")
     public Result<?> shiftTimeRemove(Long id) {
         return Result.success(shiftTimeService.removeById(id));
     }
diff --git a/performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java b/performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java
index 46f2c6a..d412e8b 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/mapper/AuxiliaryWorkingHoursMapper.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.performance.pojo.AuxiliaryWorkingHours;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * <p>
@@ -15,5 +16,5 @@
  * @since 2024-05-09 06:58:31
  */
 public interface AuxiliaryWorkingHoursMapper extends BaseMapper<AuxiliaryWorkingHours> {
-    IPage<AuxiliaryWorkingHours> selectAuxiliaryWorkingHours(Page page, QueryWrapper<AuxiliaryWorkingHours> ew);
+    IPage<AuxiliaryWorkingHours> selectAuxiliaryWorkingHours(@Param("page") Page page, @Param("ew") QueryWrapper<AuxiliaryWorkingHours> ew);
 }
diff --git a/performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java b/performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java
index 091ad29..b339b4f 100644
--- a/performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java
+++ b/performance-server/src/main/java/com/ruoyi/performance/mapper/PerformanceShiftMapper.java
@@ -5,7 +5,7 @@
 import com.ruoyi.framework.mybatis_config.MyBaseMapper;
 import com.ruoyi.performance.dto.PerformanceShiftMapDto;
 import com.ruoyi.performance.pojo.PerformanceShift;
-import org.springframework.data.repository.query.Param;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
 import java.util.Map;
@@ -31,11 +31,11 @@
                                                        @Param("userName") String userName,
                                                        @Param("laboratory") String laboratory);
 
-    IPage<Map<String, Object>> performanceShiftYear(Page<Object> page, String time, String userName, String laboratory);
+    IPage<Map<String, Object>> performanceShiftYear(@Param("page") Page<Object> page, @Param("time") String time, @Param("userName") String userName, @Param("laboratory") String laboratory);
 
-    List<Map<String, Object>> performanceShiftYearList(String time, String userName, String laboratory);
+    List<Map<String, Object>> performanceShiftYearList(@Param("time") String time, @Param("userName") String userName, @Param("laboratory") String laboratory);
 
-    List<PerformanceShiftMapDto> performanceShiftList(String time, String userName, String laboratory);
+    List<PerformanceShiftMapDto> performanceShiftList(@Param("time") String time, @Param("userName") String userName, @Param("laboratory") String laboratory);
 
-    String seldepLimsId(int depLimsId);
+    String seldepLimsId(@Param("depLimsId") int depLimsId);
 }
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java b/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java
new file mode 100644
index 0000000..676efa1
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/constant/InsOrderTypeConstants.java
@@ -0,0 +1,19 @@
+package com.ruoyi.common.constant;
+
+/**
+ * 妫�楠岀被鍨�
+ *
+ * @Author zhuo
+ * @Date 2024/8/11
+ */
+public class InsOrderTypeConstants {
+    // 妫�楠岀被鍨�
+    public static final String SPOT_CHECK = "鎶芥";
+    // 濮旀墭妫�楠�
+    public static final String CUSTOMER_ORDERED = "Customer-ordered test";
+    // 杩涘巶妫�楠�
+    public static final String ENTER_THE_FACTORY = "杩涘巶妫�楠�";
+    // 瀛e害妫�楠�
+    public static final String QUARTERLY_TEST = "Quarterly inspection";
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java
index 29d18a7..eb50fe3 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/core/domain/entity/User.java
@@ -18,10 +18,10 @@
 
     @ApiModelProperty(value = "涓婚敭")
     @TableId(type = IdType.AUTO)
-    private Long id;
+    private Integer id;
 
     @ApiModelProperty(value = "閮ㄩ棬ID")
-    private Long deptId;
+    private Integer deptId;
 
     @ApiModelProperty(value = "鐢ㄦ埛璐﹀彿")
     private String account;
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/properties/IfsProperties.java b/ruoyi-common/src/main/java/com/ruoyi/common/properties/IfsProperties.java
new file mode 100644
index 0000000..655a7d3
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/properties/IfsProperties.java
@@ -0,0 +1,46 @@
+package com.ruoyi.common.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/29
+ */
+@Configuration
+@ConfigurationProperties(prefix = "ifs")
+@Data
+public class IfsProperties {
+
+    /**
+     * 鍩�
+     */
+    private String contract;
+
+    /**
+     * 绉橀挜-get
+     */
+    private String contractKeyGet;
+
+
+    /**
+     * 绉橀挜-post
+     */
+    private String contractKeyPost;
+
+    /**
+     * 80
+     */
+    private String custorder;
+
+    /**
+     * 8008
+     */
+    private String custorderPort;
+
+    /**
+     * 8081
+     */
+    private String erpServices;
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/properties/WechatProperty.java b/ruoyi-common/src/main/java/com/ruoyi/common/properties/WechatProperty.java
new file mode 100644
index 0000000..cf484eb
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/properties/WechatProperty.java
@@ -0,0 +1,21 @@
+package com.ruoyi.common.properties;
+
+import lombok.Data;
+import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.annotation.Configuration;
+
+/**
+ * @author ZTT
+ */
+@Configuration
+@ConfigurationProperties(prefix = "wechat")
+@Data
+public class WechatProperty {
+
+	/**
+	 * 瑁呭鐢电紗锛氭姤妫�閫氱煡url
+	 */
+	private String examiningUrl;
+
+
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/Base64.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Base64.java
new file mode 100644
index 0000000..abd4425
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/Base64.java
@@ -0,0 +1,27 @@
+package com.ruoyi.common.utils;
+
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+
+import javax.xml.bind.DatatypeConverter;
+import java.nio.charset.StandardCharsets;
+
+public class Base64 {
+    /**
+     * base64 缂栫爜锛堟柟娉曚竴锛�
+     * @explain DatatypeConverter.java瀹炵幇
+     * @param str 寰呯紪鐮佸瓧绗︿覆
+     * @return 缂栫爜瀛楃涓�
+     */
+    public static String encode(String str) {
+        // base64瀛楃涓�
+        String base64Str = "";
+        // 闈炲瓧绗︿覆鎵嶈繘琛岀紪鐮�
+        if (StringUtils.isNotBlank(str)) {
+            // String 杞� byte[]
+            byte[] bytes = str.getBytes(StandardCharsets.UTF_8);
+            // 缂栫爜
+            base64Str = DatatypeConverter.printBase64Binary(bytes);
+        }
+        return base64Str;
+    }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IfsApiUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IfsApiUtils.java
new file mode 100644
index 0000000..21460ef
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IfsApiUtils.java
@@ -0,0 +1,180 @@
+package com.ruoyi.common.utils;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.json.JSONUtil;
+import com.alibaba.fastjson.JSONObject;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.ruoyi.common.core.domain.Result;
+import com.ruoyi.common.properties.IfsProperties;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Component;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/29
+ */
+@Slf4j
+@AllArgsConstructor
+@Component
+public class IfsApiUtils {
+
+    private IfsProperties ifsProperties;
+
+
+    /**
+     * 鏌ヨ閲囪喘璁㈠崟鏈楠�
+     */
+    private String getStock(String inAttr) {
+        return ifsProperties.getCustorderPort() + "contract=" + ifsProperties.getContract() + "&contractKey=" + ifsProperties.getContractKeyGet() + "&procedureName=QUERY_POL_RECEIPT_STD&userId=lims_user&inAttr=" + inAttr;
+    }
+
+    public List<Map<String, Object>> getInventory(String inAttr) {
+        String body = HttpRequest.get(getStock(inAttr)).execute().body();
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            Map map = objectMapper.readValue(body, Map.class);
+            List<Map<String, Object>> maps = objectMapper.readValue(JSONUtil.toJsonStr(map.get("LIST_INFO")), new TypeReference<List<Map<String, Object>>>() {
+            });
+            log.info("鑾峰彇閲囪喘璁㈠崟-->>" + maps);
+            return maps;
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * 鐧昏閲囪喘妫�楠岀粨鏋淪TD
+     */
+    private String ProcurementResultsURL(String inAttr) {
+        return ifsProperties.getCustorder() + "contract=" + ifsProperties.getContract() + "&contractKey=" + ifsProperties.getContractKeyGet() + "&procedureName=REGIST_INSPECTION_RESULTS_STD&userId=lims_user&inAttr=" + inAttr;
+    }
+
+    public Result getProcurementResults(String inAttr) {
+        String body = HttpRequest.get(ProcurementResultsURL(inAttr)).execute().body();
+        log.info("鐧昏閲囪喘妫�楠岀粨鏋�-->" + body);
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            Map map = objectMapper.readValue(body, Map.class);
+            String successFlag = map.get("SuccessFlag").toString();
+            if (Integer.valueOf(successFlag) == 1) {
+                return Result.success(map);
+            } else {
+                return Result.fail(map.get("ErrorMsg").toString());
+            }
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+            return Result.fail(e.getMessage());
+        }
+    }
+
+
+    /**
+     * 妫�楠屽悗绉诲簱
+     */
+    private String getMoveReceiptApi(String inAttr) {
+
+        return ifsProperties.getCustorder() + "contract=" + ifsProperties.getContract() + "&contractKey=" + ifsProperties.getContractKeyGet() + "&procedureName=MOVE_RECEIPT_STD&userId=lims_user&inAttr=" + inAttr;
+    }
+
+    /**
+     * 鍘熸潗鏂欐楠�-妫�楠屽悗绉诲簱
+     *
+     * @param inAttr
+     * @return
+     */
+    public Result moveReceipt(String inAttr) {
+        String body = HttpRequest.get(getMoveReceiptApi(inAttr)).execute().body();
+        log.info("妫�楠屽悗绉诲簱-->" + body);
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            Map map = objectMapper.readValue(body, Map.class);
+            String successFlag = map.get("SuccessFlag").toString();
+            if (Integer.valueOf(successFlag) == 1) {
+                return Result.success(map);
+            } else {
+                return Result.fail(map.get("ErrorMsg").toString());
+            }
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+            return Result.fail(e.getMessage());
+        }
+    }
+
+    /**
+     * 閲囪喘鎺ユ敹鏇存敼鎵瑰彿
+     */
+    private String getMoveReceiptLotApi(String inAttr) {
+
+        return ifsProperties.getCustorder() + "contract=" + ifsProperties.getContract() + "&contractKey=" + ifsProperties.getContractKeyGet() + "&procedureName=MODIFY_PURCH_RECEIPT_LOT_STD&userId=lims_user&inAttr=" + inAttr;
+    }
+
+    /**
+     * 鍘熸潗鏂欐楠�-妫�楠屽悗绉诲簱
+     *
+     * @param inAttr
+     * @return
+     */
+    public Result updateMoveReceiptLot(String inAttr) {
+        String body = HttpRequest.get(getMoveReceiptLotApi(inAttr)).execute().body();
+        log.info("淇敼閲囪喘璁㈠崟鎵规鍙�-->" + body);
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            Map map = objectMapper.readValue(body, Map.class);
+            String successFlag = map.get("SuccessFlag").toString();
+            if (Integer.valueOf(successFlag) == 1) {
+                return Result.success(map);
+            } else {
+                return Result.fail(map.get("ErrorMsg").toString());
+            }
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+            return Result.fail(e.getMessage());
+        }
+    }
+
+
+    /**
+     * 鏌ヨ搴撳瓨鏁版嵁
+     */
+    private String getIfsStockApi(String inAttr) {
+
+        return ifsProperties.getCustorderPort() + "contract=" + ifsProperties.getContract() + "&contractKey=" + ifsProperties.getContractKeyGet() + "&procedureName=QUERY_INVENTORY_INFO_STD&userId=lims_user&inAttr=" + inAttr;
+    }
+
+    /**
+     * 鏌ヨ搴撳瓨鏁版嵁
+     *
+     * @param inAttr
+     * @return
+     */
+    public Result getIfsStock(String inAttr) {
+        JSONObject stockMap = new JSONObject();
+        stockMap.put("procedureName", "QUERY_INVENTORY_INFO_STD");
+        stockMap.put("contract", ifsProperties.getContract());
+        stockMap.put("contractKey", ifsProperties.getContractKeyPost());
+        stockMap.put("userId", "userId");
+        stockMap.put("inAttr", inAttr);
+        String body = HttpRequest.post(ifsProperties.getCustorderPort()).form(stockMap).execute().body();
+        log.info("鏌ヨ搴撳瓨淇℃伅-->" + body);
+        ObjectMapper objectMapper = new ObjectMapper();
+        try {
+            Map map = objectMapper.readValue(body, Map.class);
+            String successFlag = map.get("SuccessFlag").toString();
+            if (Integer.valueOf(successFlag) == 1) {
+                return Result.success(map);
+            } else {
+                return Result.fail(map.get("ErrorMsg").toString());
+            }
+        } catch (JsonProcessingException e) {
+            e.printStackTrace();
+            return Result.fail(e.getMessage());
+        }
+    }
+}
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/IndustryChainUtils.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IndustryChainUtils.java
new file mode 100644
index 0000000..b3620ee
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/IndustryChainUtils.java
@@ -0,0 +1,93 @@
+package com.ruoyi.common.utils;
+
+import cn.hutool.http.HttpRequest;
+import cn.hutool.http.HttpResponse;
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+public class IndustryChainUtils {
+    private static final String CLOUD_LOGIN = "https://gym.ztt.cn:1443/openApi/v1/user/login";
+    private static final String CLOUD_REQUEST = "https://gym.ztt.cn:1443/openApi/codeGenerate/getCodeDetailByOrder";
+    //璇锋眰琛ㄥ崟璐﹀彿
+    private static final String USERNAME = "ZTKJ-N002096";
+    //璇锋眰琛ㄥ崟瀵嗙爜
+    private static final String PASSWORD = "Abc12345@";
+    //Base64鏍煎紡缂栫爜
+    private static final String PWDBASE64 = Base64.encode(PASSWORD);
+
+    //鑾峰彇token
+    public static String getToken() {
+        HttpRequest request = HttpRequest.post(CLOUD_LOGIN)
+                .header("Content-Type", "application/x-www-form-urlencoded")
+                .form("username", USERNAME)
+                .form("password", PWDBASE64);
+        HttpResponse response = request.execute();
+        ObjectMapper objectMapper = new ObjectMapper();
+        JsonNode jsonNode;
+        try {
+            jsonNode = objectMapper.readTree(response.body());
+            //閫氳繃杩斿洖鏁版嵁鑾峰彇token
+            String accessToken = jsonNode.get("data").get("token").asText();
+            return accessToken;
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    //杈撳嚭鎵�鏈夋暟鎹�
+    public static String getIndustryChainAll(String orderNo, String lineNum, String releaseNum) {
+        String token = getToken();
+        HttpRequest request = HttpRequest.get(CLOUD_REQUEST)
+                .header("Authorization", "Bearer " + token)
+                .form("orderNo", orderNo)
+                .form("lineNum", lineNum)
+                .form("releaseNum", releaseNum);
+        HttpResponse response = request.execute();
+        ObjectMapper objectMapper = new ObjectMapper();
+        JsonNode jsonNode;
+        try {
+            jsonNode = objectMapper.readTree(response.body());
+            return jsonNode.toString();
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+    }
+
+    /**
+     *
+     * @param orderNo  璁㈠崟鍙�
+     * @param lineNum  琛屽彿
+     * @param releaseNum  涓嬭揪鍙�
+     * @return
+     */
+    public static String getIndustryChainAttrFields(String orderNo, String lineNum, String releaseNum) {
+        String token = getToken();
+        HttpRequest request = HttpRequest.get(CLOUD_REQUEST)
+                .header("Authorization", "Bearer " + token)
+                .form("orderNo", orderNo)
+                .form("lineNum", lineNum)
+                .form("releaseNum", releaseNum);
+        HttpResponse response = request.execute();
+        ObjectMapper objectMapper = new ObjectMapper();
+        JsonNode jsonNode;
+        try {
+            jsonNode = objectMapper.readTree(response.body());
+            // 鍒ゆ柇鏄惁閫氳繃
+            if (jsonNode.get("code").asInt() != 200) {
+                return null;
+            }
+            JsonNode data = jsonNode.get("data");
+            for (JsonNode dataNode : data) {
+                //鑾峰彇attrFields鏁版嵁
+                String attrFields = dataNode.get("attrFields").toPrettyString();
+                return attrFields;
+            }
+        } catch (Exception e) {
+            throw new RuntimeException(e.getMessage());
+        }
+        return null;
+    }
+
+
+}
+
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java
new file mode 100644
index 0000000..a40ea33
--- /dev/null
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/LimsDateUtil.java
@@ -0,0 +1,33 @@
+package com.ruoyi.common.utils;
+
+import cn.hutool.core.date.DateUtil;
+
+import java.time.LocalDateTime;
+
+/**
+ * @Author zhuo
+ * @Date 2024/9/28
+ */
+public class LimsDateUtil {
+
+
+    /**
+     * 鏃ユ湡鏍煎紡鍒�26鍙锋湀浠藉姞涓�
+     * @param localDateTime
+     * @return
+     */
+    public static String resetDate(LocalDateTime localDateTime) {
+        // 鑾峰彇褰撳墠鏃�
+        int dayOfMonth = localDateTime.getDayOfMonth();
+
+        // 鍒ゆ柇鏄惁鏄�26鏃ュ強浠ヤ笂
+        if (dayOfMonth >= 26) {
+            // 鏈堜唤鍔�1
+            localDateTime = localDateTime.plusMonths(1);
+        }
+
+        // 鏍煎紡鍖栦负"yyMM"鏍煎紡
+        String formattedDate = DateUtil.format(localDateTime, "yyMM");
+        return formattedDate;
+    }
+}

--
Gitblit v1.9.3