guoyujia преди 2 седмици
родител
ревизия
5805f19a2e
променени са 25 файла, в които са добавени 975 реда и са изтрити 7 реда
  1. 63 0
      src/main/java/cn/ezhizao/project/business/controller/BizTakeStockPeriodController.java
  2. 140 4
      src/main/java/cn/ezhizao/project/business/controller/BizTaksStockLotController.java
  3. 147 0
      src/main/java/cn/ezhizao/project/business/domain/BizTaksStockCertificateLot.java
  4. 175 0
      src/main/java/cn/ezhizao/project/business/domain/BizTaksStockInboundOrderDetail.java
  5. 2 0
      src/main/java/cn/ezhizao/project/business/domain/BizTaksStockLot.java
  6. 3 0
      src/main/java/cn/ezhizao/project/business/mapper/BizCertificateLotMapper.java
  7. 3 0
      src/main/java/cn/ezhizao/project/business/mapper/BizInboundOrderDetailMapper.java
  8. 32 0
      src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockCertificateLotMapper.java
  9. 30 0
      src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockInboundOrderDetailMapper.java
  10. 1 0
      src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockLotMapper.java
  11. 3 0
      src/main/java/cn/ezhizao/project/business/service/IBizCertificateLotService.java
  12. 3 0
      src/main/java/cn/ezhizao/project/business/service/IBizInboundOrderDetailService.java
  13. 28 0
      src/main/java/cn/ezhizao/project/business/service/IBizTaksStockCertificateLotService.java
  14. 31 0
      src/main/java/cn/ezhizao/project/business/service/IBizTaksStockInboundOrderDetailService.java
  15. 1 2
      src/main/java/cn/ezhizao/project/business/service/IBizTaksStockLotService.java
  16. 7 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizCertificateLotServiceImpl.java
  17. 7 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizInboundOrderDetailServiceImpl.java
  18. 1 1
      src/main/java/cn/ezhizao/project/business/service/impl/BizOutsourcedRecordsServiceImpl.java
  19. 52 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockCertificateLotServiceImpl.java
  20. 48 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockInboundOrderDetailServiceImpl.java
  21. 1 0
      src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockLotServiceImpl.java
  22. 48 0
      src/main/resources/mybatis/business/BizCertificateLotMapper.xml
  23. 32 0
      src/main/resources/mybatis/business/BizInboundOrderDetailMapper.xml
  24. 57 0
      src/main/resources/mybatis/business/BizTaksStockCertificateLotMapper.xml
  25. 60 0
      src/main/resources/mybatis/business/BizTaksStockInboundOrderDetailMapper.xml

+ 63 - 0
src/main/java/cn/ezhizao/project/business/controller/BizTakeStockPeriodController.java

@@ -5,6 +5,7 @@ import java.sql.SQLException;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.stream.Collectors;
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.sql.DataSource;
@@ -58,6 +59,16 @@ public class BizTakeStockPeriodController extends BaseController
     private IBizStorageRetrievalService bizStorageRetrievalService;
     @Resource
     private IBizDayworkItemService bizDayworkItemService;
+    @Resource
+    private IBizInboundOrderDetailService bizInboundOrderDetailService;
+    @Resource
+    private IBizTaksStockCertificateLotService bizTaksStockCertificateLotService;
+    @Resource
+    private IBizTaksStockInboundOrderDetailService bizTaksStockInboundOrderDetailService;
+    @Resource
+    private IBizCertificateLotService bizCertificateLotService;
+    @Resource
+    private IBizCompanyService bizCompanyService;
 
     /**
      * 查询盘点时间列表
@@ -263,6 +274,58 @@ public class BizTakeStockPeriodController extends BaseController
                 });
                 bizTaksStockStorageRetrievalService.saveBatch(needAddList);
             }
+            //盘点入库信息表
+            List<BizTaksStockInboundOrderDetail> taskStockList = bizInboundOrderDetailService.getTaskStockList();
+            if(taskStockList.size()>0) {
+                List<Long> lotIds = taskStockList.stream().map(BizTaksStockInboundOrderDetail::getLotId).distinct().collect(Collectors.toList());
+                List<BizLot> lotList = bizLotService.query().in("id", lotIds).list();
+                List<Long> certificateLotIds = taskStockList.stream().map(BizTaksStockInboundOrderDetail::getCertificateLotId).distinct().collect(Collectors.toList());
+                List<BizCertificateLot> certificateLotList = bizCertificateLotService.query().in("id", certificateLotIds).list();
+                for (BizTaksStockInboundOrderDetail item : taskStockList) {
+                    item.setTakeStockPeriodId(bizTakeStockPeriod.getId());
+                    item.setStockYear(bizTakeStockPeriod.getStockYear());
+                    item.setStockMonth(bizTakeStockPeriod.getStockMonth());
+                    //投入数是当前批次所有的入库数量
+                    List<BizTaksStockInboundOrderDetail> collect = taskStockList.stream().filter(task -> task.getLotCode().equals(item.getLotCode())).collect(Collectors.toList());
+                    item.setProdNum(collect.stream().mapToLong(BizTaksStockInboundOrderDetail::getInboundNum).sum());
+                    BizLot bizLot = lotList.stream().filter(lot -> lot.getId().equals(item.getLotId())).findFirst().orElse(null);
+                    item.setIsWaste(bizLot.getIsWaste());
+                    item.setIsAmend(bizLot.getIsAmend());
+                    item.setIsWasteRecycling(bizLot.getIsWasteRecycling());
+                    item.setIsSuperaddition(bizLot.getIsSuperaddition());
+
+                    item.setFromId(bizLot.getFromId());
+                    BizCertificateLot bizCertificateLot = certificateLotList.stream().filter(certificateLot -> certificateLot.getId().equals(item.getCertificateLotId())).findFirst().orElse(null);
+                    item.setBarcode(bizCertificateLot.getBarcode());
+                }
+                bizTaksStockInboundOrderDetailService.saveBatch(taskStockList);
+            }
+            //盘点合格证信息表
+            List<BizTaksStockCertificateLot> certificateList = bizCertificateLotService.getTaskStockList();
+            if(certificateList.size()>0){
+                List<Long> companyIds = certificateList.stream().map(BizTaksStockCertificateLot::getCompanyId).distinct().collect(Collectors.toList());
+                List<BizCompany> companyList = bizCompanyService.query().in("id", companyIds).list();
+                List<Long> lotIds = certificateList.stream().map(BizTaksStockCertificateLot::getLotId).distinct().collect(Collectors.toList());
+                List<BizLot> lotList = bizLotService.query().in("id", lotIds).list();
+                for (BizTaksStockCertificateLot item : certificateList){
+                    item.setTakeStockPeriodId(bizTakeStockPeriod.getId());
+                    item.setStockYear(bizTakeStockPeriod.getStockYear());
+                    item.setStockMonth(bizTakeStockPeriod.getStockMonth());
+                    //投入数是当前批次所有的入库数量
+                    List<BizTaksStockCertificateLot> collect = certificateList.stream().filter(task -> task.getLotCode().equals(item.getLotCode())).collect(Collectors.toList());
+                    item.setProdNum(collect.stream().mapToLong(BizTaksStockCertificateLot::getTempProdNum).sum());
+                    BizCompany bizCompany = companyList.stream().filter(company -> company.getId().equals(item.getCompanyId())).findFirst().orElse(null);
+                    item.setCompanyName(bizCompany.getCompanyName());
+                    item.setCompanyCode(bizCompany.getCompanyCode());
+                    BizLot bizLot = lotList.stream().filter(lot -> lot.getId().equals(item.getLotId())).findFirst().orElse(null);
+                    item.setIsWaste(bizLot.getIsWaste());
+                    item.setIsAmend(bizLot.getIsAmend());
+                    item.setIsWasteRecycling(bizLot.getIsWasteRecycling());
+                    item.setIsSuperaddition(bizLot.getIsSuperaddition());
+                    item.setFromId(bizLot.getFromId());
+                }
+                bizTaksStockCertificateLotService.saveBatch(certificateList);
+            }
         }else{
             //缩小连接池
             bizTakeStockPeriodService.updateDruidPoolSize(200);

+ 140 - 4
src/main/java/cn/ezhizao/project/business/controller/BizTaksStockLotController.java

@@ -12,10 +12,7 @@ import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.framework.web.page.TableDataInfo;
 import cn.ezhizao.project.business.domain.*;
-import cn.ezhizao.project.business.service.IBizDayworkService;
-import cn.ezhizao.project.business.service.IBizOutsourcedOrderDetailService;
-import cn.ezhizao.project.business.service.IBizProductionPlanDetailSubDetailService;
-import cn.ezhizao.project.business.service.IBizTaksStockLotService;
+import cn.ezhizao.project.business.service.*;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -45,6 +42,10 @@ public class BizTaksStockLotController extends BaseController {
     private IBizProductionPlanDetailSubDetailService bizProductionPlanDetailSubDetailService;
     @Resource
     private IBizDayworkService bizDayworkService;
+    @Resource
+    private IBizTaksStockCertificateLotService bizTaksStockCertificateLotService;
+    @Resource
+    private IBizTaksStockInboundOrderDetailService bizTaksStockInboundOrderDetailService;
 
     /**
      * 查询盘点批次信息列表
@@ -122,7 +123,112 @@ public class BizTaksStockLotController extends BaseController {
         List<BizTaksStockLot> outsourcedOrderDetailList = bizTaksStockLotService.getOutsourceDetailList(bizTaksStockLot);
         return getDataTable(outsourcedOrderDetailList);
     }
+    @GetMapping(value = "/getNotInboundInfo")
+    @Log(title = "查询未入库盘点明细列表", businessType = BusinessType.SELECT)
+    public TableDataInfo getNotInboundInfo(BizTaksStockCertificateLot bizTaksStockCertificateLot) {
+        startPage();
+        List<BizTaksStockCertificateLot> data = bizTaksStockCertificateLotService.getNotInboundInfo(bizTaksStockCertificateLot);
+        return getDataTable(data);
+    }
+    @GetMapping(value = "/getAnyInboundInfo")
+    @Log(title = "查询部分库盘点明细列表", businessType = BusinessType.SELECT)
+    public TableDataInfo getAnyInboundInfo(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail) {
+        startPage();
+        List<BizTaksStockInboundOrderDetail> data = bizTaksStockInboundOrderDetailService.getAnyInboundInfo(bizTaksStockInboundOrderDetail);
+        return getDataTable(data);
+    }
+    @Log(title = "未入库盘点导出", businessType = BusinessType.EXPORT)
+    @PostMapping("/notInboundExport")
+    public void notInboundExport(HttpServletResponse response,BizTaksStockCertificateLot bizTaksStockCertificateLot) throws NoSuchFieldException, IllegalAccessException {
+        List<BizTaksStockCertificateLot> data = bizTaksStockCertificateLotService.getNotInboundInfo(bizTaksStockCertificateLot);
+        if(data.isEmpty()){
+            throw new RuntimeException("没有可导出的数据");
+        }
+        data.forEach(item -> {
+           item.setIsTaksStockStr(item.getIsTaksStock() == 1 ? "已盘点" : "未盘点");
+            StringBuilder flagsBuilder = new StringBuilder();
+            if (item.getIsWaste() == 1) {
+                flagsBuilder.append("批废");
+            }
+            if (item.getIsAmend() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("工艺修改");
+            }
+
+            if (item.getIsWasteRecycling() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("废品回用");
+            }
 
+            if (item.getFromId()!=0) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("分批");
+            }
+            if (item.getIsSuperaddition() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("追增");
+            }
+
+            String flags = flagsBuilder.toString();
+            item.setFlags(flags);
+        });
+        ExcelUtil<BizTaksStockCertificateLot> util = new ExcelUtil<>(BizTaksStockCertificateLot.class);
+        util.exportExcel(response, data, "未入库盘点");
+    }
+    @Log(title = "部分入库盘点导出", businessType = BusinessType.EXPORT)
+    @PostMapping("/anyInboundExport")
+    public void anyInboundExport(HttpServletResponse response,BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail) throws NoSuchFieldException, IllegalAccessException {
+        List<BizTaksStockInboundOrderDetail> data = bizTaksStockInboundOrderDetailService.getAnyInboundInfo(bizTaksStockInboundOrderDetail);
+        if(data.isEmpty()){
+            throw new RuntimeException("没有可导出的数据");
+        }
+        data.forEach(item -> {
+            item.setIsTaksStockStr(item.getIsTaksStock() == 1 ? "已盘点" : "未盘点");
+            StringBuilder flagsBuilder = new StringBuilder();
+            if (item.getIsWaste() == 1) {
+                flagsBuilder.append("批废");
+            }
+            if (item.getIsAmend() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("工艺修改");
+            }
+
+            if (item.getIsWasteRecycling() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("废品回用");
+            }
+
+            if (item.getFromId()!=0) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("分批");
+            }
+            if (item.getIsSuperaddition() == 1) {
+                if (flagsBuilder.length() > 0) {
+                    flagsBuilder.append(",");
+                }
+                flagsBuilder.append("追增");
+            }
+
+            String flags = flagsBuilder.toString();
+            item.setFlags(flags);
+        });
+        ExcelUtil<BizTaksStockInboundOrderDetail> util = new ExcelUtil<>(BizTaksStockInboundOrderDetail.class);
+        util.exportExcel(response, data, "部分入库盘点");
+    }
 
     /**
      * 一键盘点未收回批次信息
@@ -142,6 +248,36 @@ public class BizTaksStockLotController extends BaseController {
         });
         return success(bizTaksStockLotService.saveOrUpdateBatch(outsourcedOrderDetailList));
     }
+    @PostMapping(value = "/saveNotInboundInfo")
+    @Log(title = "一键盘点未入库", businessType = BusinessType.UPDATE)
+    public AjaxResult saveNotInboundInfo(@RequestBody BizTaksStockCertificateLot bizTaksStockCertificateLot) {
+
+        //查询出未收回的批次信息
+        List<BizTaksStockCertificateLot> data = bizTaksStockCertificateLotService.query().eq("take_stock_period_id", bizTaksStockCertificateLot.getTakeStockPeriodId()).list();
+        if(data.isEmpty()){
+            return error("没有可盘点的批次");
+        }
+        data.forEach(item -> {
+            item.setTaksStockNum(item.getProdNum().intValue());
+            item.setIsTaksStock(1);
+        });
+        return success(bizTaksStockCertificateLotService.updateBatchById(data));
+    }
+    @PostMapping(value = "/saveAnyInboundInfo")
+    @Log(title = "一键盘点部分入库", businessType = BusinessType.UPDATE)
+    public AjaxResult saveAnyInboundInfo(@RequestBody BizTaksStockCertificateLot bizTaksStockCertificateLot) {
+
+        //查询出未收回的批次信息
+        List<BizTaksStockInboundOrderDetail> data = bizTaksStockInboundOrderDetailService.query().eq("take_stock_period_id", bizTaksStockCertificateLot.getTakeStockPeriodId()).list();
+        if(data.isEmpty()){
+            return error("没有可盘点的批次");
+        }
+        data.forEach(item -> {
+            item.setTaksStockNum(item.getProdNum().intValue());
+            item.setIsTaksStock(1);
+        });
+        return success(bizTaksStockInboundOrderDetailService.updateBatchById(data));
+    }
 
     /**
      * 新增盘点批次信息

+ 147 - 0
src/main/java/cn/ezhizao/project/business/domain/BizTaksStockCertificateLot.java

@@ -0,0 +1,147 @@
+package cn.ezhizao.project.business.domain;
+
+import java.util.Date;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 盘点合格证信息对象 biz_taks_stock_certificate_lot
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+@Data
+@TableName(value = "biz_taks_stock_certificate_lot")
+public class BizTaksStockCertificateLot extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户id */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 盘点时间表id */
+    @ApiModelProperty(value = "${comment}")
+    private Long takeStockPeriodId;
+
+    /** 合格证外键 */
+    @ApiModelProperty(value = "${comment}")
+    private Long certificateId;
+
+    /** 打印次数 */
+    @ApiModelProperty(value = "打印次数")
+    private Long sort;
+
+    /** 开始序号 */
+    @ApiModelProperty(value = "开始序号")
+    private String startCode;
+
+    /** 结束序号 */
+    @ApiModelProperty(value = "结束序号")
+    private String endCode;
+
+    /** 打印时间 */
+    @ApiModelProperty(value = "打印时间")
+    private Date printDate;
+
+    /** 二维码信息 */
+    @ApiModelProperty(value = "二维码信息")
+    private String qrcode;
+
+    /** 二维码地址 */
+    @ApiModelProperty(value = "二维码地址")
+    private String qrcodeUrl;
+
+    /** 条形码信息 */
+    @ApiModelProperty(value = "条形码信息")
+    private String barcode;
+
+    /** 条形码地址 */
+    @ApiModelProperty(value = "条形码地址")
+    private String barcodeUrl;
+
+    /** 批次id */
+    @ApiModelProperty(value = "条形码地址")
+    private Long lotId;
+
+    /** 批次号 */
+    @Excel(name = "批次号",sort = 3)
+    @ApiModelProperty(value = "批次号")
+    private String lotCode;
+
+    /** 投产数 */
+    @Excel(name = "投入数",sort = 9)
+    @ApiModelProperty(value = "投产数")
+    private Long prodNum;
+
+    /** 客户id */
+    @ApiModelProperty(value = "投产数")
+    private Long companyId;
+
+    /** 客户编码 */
+    @ApiModelProperty(value = "客户编码")
+    private String companyCode;
+
+    /** 公司简称 */
+    @ApiModelProperty(value = "公司简称")
+    private String companyName;
+
+    /** 是否盘点(0:未盘点,1:已盘点) */
+
+    @ApiModelProperty(value = "是否盘点(0:未盘点,1:已盘点)")
+    private Integer isTaksStock;
+    @Excel(name = "盘点状态",sort = 7)
+    @TableField(exist = false)
+    private String isTaksStockStr;
+
+    /** 盘点年 */
+    @Excel(name = "盘点年",sort = 1)
+    @ApiModelProperty(value = "盘点年")
+    private String stockYear;
+
+    /** 盘点月 */
+    @Excel(name = "盘点月",sort = 2)
+    @ApiModelProperty(value = "盘点月")
+    private String stockMonth;
+
+    /** 工段id(当前工段的id) */
+    @ApiModelProperty(value = "盘点月")
+    private Long deptId;
+
+    /** 工段名称 */
+    @Excel(name = "工段",sort = 8)
+    @ApiModelProperty(value = "工段名称")
+    private String deptName;
+    @Excel(name = "产品编码",sort = 6)
+    private String productCode;
+    private Long productId;
+    @Excel(name = "产品描述",sort = 5)
+    private String productDescription;
+    @Excel(name = "盘点数量",sort = 10)
+    private Integer taksStockNum;
+    @Excel(name = "产品图号",sort = 4)
+    private String drawingNumber;
+    @ApiModelProperty(value = "是否是废品回用(0:否;1:是)")
+    private Long isWasteRecycling;
+
+    /** 是否修改(0 否 ,1 是)单批单改;多批单改;回退 */
+    @ApiModelProperty(value = "是否修改(0 否 ,1 是)单批单改;多批单改;回退")
+    private Integer isAmend;
+    private Integer isSuperaddition;
+    private Integer isWaste;
+    @TableField(exist = false)
+    private String barcodes;
+    @Excel(name = "标识",sort = 11)
+    @TableField(exist = false)
+    private String flags;
+    private Long fromId;
+    @TableField(exist = false)
+    private Long tempProdNum;
+
+}

+ 175 - 0
src/main/java/cn/ezhizao/project/business/domain/BizTaksStockInboundOrderDetail.java

@@ -0,0 +1,175 @@
+package cn.ezhizao.project.business.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 盘点入库明细对象 biz_taks_stock_inbound_order_detail
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+@Data
+@TableName(value = "biz_taks_stock_inbound_order_detail")
+public class BizTaksStockInboundOrderDetail extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 入库单id */
+    @ApiModelProperty(value = "${comment}")
+    private Long inboundOrderId;
+
+    /** 合格证id */
+    @ApiModelProperty(value = "${comment}")
+    private Long certificateId;
+
+    /** 合格证批次id */
+    @ApiModelProperty(value = "${comment}")
+    private Long certificateLotId;
+
+    /** 合格证编码 */
+    @ApiModelProperty(value = "合格证编码")
+    private String certificateCode;
+
+    /** 批号 */
+    @Excel(name = "批号",sort = 4)
+    @ApiModelProperty(value = "批号")
+    private String lotCode;
+
+    /** 批次id */
+    @ApiModelProperty(value = "批号")
+    private Long lotId;
+
+    /** 入库数量 */
+    @ApiModelProperty(value = "入库数量")
+    private Long inboundNum;
+
+    /** 是否入库 */
+    @ApiModelProperty(value = "是否入库")
+    private Integer isInbound;
+
+    /** 操作者1id */
+    @ApiModelProperty(value = "是否入库")
+    private Long firstOperatorUserId;
+
+    /** 操作者1编码 */
+
+    @ApiModelProperty(value = "操作者1编码")
+    private String firstOperatorUserName;
+
+    /** 操作者1名称 */
+
+    @ApiModelProperty(value = "操作者1名称")
+    private String firstOperatorNickName;
+
+    /** 操作者2id */
+    @ApiModelProperty(value = "操作者1名称")
+    private Long secondOperatorUserId;
+
+    /** 操作者2编码 */
+
+    @ApiModelProperty(value = "操作者2编码")
+    private String secondOperatorUserName;
+
+    /** 操作者2名称 */
+
+    @ApiModelProperty(value = "操作者2名称")
+    private String secondOperatorNickName;
+
+    /** 操作者3id */
+    @ApiModelProperty(value = "操作者2名称")
+    private Long thirdOperatorUserId;
+
+    /** 操作者3编码 */
+
+    @ApiModelProperty(value = "操作者3编码")
+    private String thirdOperatorUserName;
+
+    /** 操作者3名称 */
+
+    @ApiModelProperty(value = "操作者3名称")
+    private String thirdOperatorNickName;
+
+    /** 包装形式码 */
+
+    @ApiModelProperty(value = "包装形式码")
+    private String packageTypeCode;
+
+    /** 转运托盘码 */
+
+    @ApiModelProperty(value = "转运托盘码")
+    private String transferCode;
+
+    /** 入库转运码 */
+
+    @ApiModelProperty(value = "入库转运码")
+    private String transferEntryCode;
+
+    /** 租户(厂别)id */
+    @ApiModelProperty(value = "入库转运码")
+    private Long tenantId;
+
+    /** 盘点时间表id */
+    @ApiModelProperty(value = "入库转运码")
+    private Long takeStockPeriodId;
+
+    /** 入库单号 */
+    @Excel(name = "入库单号",sort = 1)
+    @ApiModelProperty(value = "入库单号")
+    private String inboundNumber;
+
+    /** 投产数 */
+    @Excel(name = "投入数",sort = 10)
+    @ApiModelProperty(value = "投产数")
+    private Long prodNum;
+
+    /** 是否盘点(0:未盘点,1:已盘点) */
+    @ApiModelProperty(value = "是否盘点(0:未盘点,1:已盘点)")
+    private Integer isTaksStock;
+
+    /** 盘点年 */
+    @Excel(name = "盘点年",sort = 2)
+    @ApiModelProperty(value = "盘点年")
+    private String stockYear;
+
+    /** 盘点月 */
+    @Excel(name = "盘点月",sort = 3)
+    @ApiModelProperty(value = "盘点月")
+    private String stockMonth;
+    @ApiModelProperty(value = "是否是废品回用(0:否;1:是)")
+    private Long isWasteRecycling;
+
+    /** 是否修改(0 否 ,1 是)单批单改;多批单改;回退 */
+    @ApiModelProperty(value = "是否修改(0 否 ,1 是)单批单改;多批单改;回退")
+    private Integer isAmend;
+    private Integer isSuperaddition;
+    private Integer isWaste;
+    private Long deptId;
+    @Excel(name = "工段",sort = 9)
+    private String deptName;
+    private String deptCode;
+    @Excel(name = "产品编码",sort = 7)
+    private String productCode;
+    private Long productId;
+    @Excel(name = "产品描述",sort = 6)
+    private String productDescription;
+    @Excel(name = "盘点数量",sort = 11)
+    private Integer taksStockNum;
+    @Excel(name = "产品图号",sort = 5)
+    private String drawingNo;
+    private String barcode;
+    private Long fromId;
+    @Excel(name = "标识",sort = 12)
+    @TableField(exist = false)
+    private String flags;
+    @TableField(exist = false)
+    private String barcodes;
+    @Excel(name = "盘点状态",sort = 8)
+    @TableField(exist = false)
+    private String isTaksStockStr;
+
+}

+ 2 - 0
src/main/java/cn/ezhizao/project/business/domain/BizTaksStockLot.java

@@ -172,4 +172,6 @@ public class BizTaksStockLot extends BaseEntity
     @TableField(exist =false)
     @Excel(name = "产品编码", sort = 4)
     private String productCode;
+    @TableField(exist =false)
+    private String barcode;
 }

+ 3 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizCertificateLotMapper.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.mapper;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import cn.ezhizao.project.business.domain.BizCertificateLot;
 
@@ -19,6 +21,7 @@ public interface BizCertificateLotMapper extends BaseMapper<BizCertificateLot>
      * @return 合格证打印明细集合
      */
     public List<BizCertificateLot> getList(BizCertificateLot bizCertificateLot);
+    public List<BizTaksStockCertificateLot> getTaskStockList();
 
     /**
      * 物理删除

+ 3 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizInboundOrderDetailMapper.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.mapper;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import cn.ezhizao.project.business.domain.BizInboundOrderDetail;
 
@@ -19,6 +21,7 @@ public interface BizInboundOrderDetailMapper extends BaseMapper<BizInboundOrderD
      * @return 生产入库明细集合
      */
     public List<BizInboundOrderDetail> getList(BizInboundOrderDetail bizInboundOrderDetail);
+    public List<BizTaksStockInboundOrderDetail> getTaskStockList();
 
     /**
      * 物理删除

+ 32 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockCertificateLotMapper.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockLot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
+
+/**
+ * 盘点合格证信息Mapper接口
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+public interface BizTaksStockCertificateLotMapper extends BaseMapper<BizTaksStockCertificateLot>
+{
+    /**
+     * 查询盘点合格证信息列表
+     *
+     * @param bizTaksStockCertificateLot 盘点合格证信息
+     * @return 盘点合格证信息集合
+     */
+    public List<BizTaksStockCertificateLot> getList(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+
+    /**
+     * 物理删除
+     * @param bizTaksStockCertificateLot
+     * @return 删除结果
+    */
+    public int physicalDelete(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+    public List<BizTaksStockCertificateLot> getNotInboundInfo(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+}

+ 30 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockInboundOrderDetailMapper.java

@@ -0,0 +1,30 @@
+package cn.ezhizao.project.business.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
+
+/**
+ * 盘点入库明细Mapper接口
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+public interface BizTaksStockInboundOrderDetailMapper extends BaseMapper<BizTaksStockInboundOrderDetail>
+{
+    /**
+     * 查询盘点入库明细列表
+     *
+     * @param bizTaksStockInboundOrderDetail 盘点入库明细
+     * @return 盘点入库明细集合
+     */
+    public List<BizTaksStockInboundOrderDetail> getList(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+
+    public List<BizTaksStockInboundOrderDetail> getAnyInboundInfo(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+    /**
+     * 物理删除
+     * @param bizTaksStockInboundOrderDetail
+     * @return 删除结果
+    */
+    public int physicalDelete(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+}

+ 1 - 0
src/main/java/cn/ezhizao/project/business/mapper/BizTaksStockLotMapper.java

@@ -3,6 +3,7 @@ package cn.ezhizao.project.business.mapper;
 import java.util.List;
 
 import cn.ezhizao.project.business.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import cn.ezhizao.project.business.domain.BizTaksStockLot;
 

+ 3 - 0
src/main/java/cn/ezhizao/project/business/service/IBizCertificateLotService.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.service;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.extension.service.IService;
 import cn.ezhizao.project.business.domain.BizCertificateLot;
 
@@ -19,6 +21,7 @@ public interface IBizCertificateLotService extends IService<BizCertificateLot>
      * @return 合格证打印明细集合
      */
     public List<BizCertificateLot> getList(BizCertificateLot bizCertificateLot);
+    public List<BizTaksStockCertificateLot> getTaskStockList();
 
     /**
      * 物理删除

+ 3 - 0
src/main/java/cn/ezhizao/project/business/service/IBizInboundOrderDetailService.java

@@ -1,6 +1,8 @@
 package cn.ezhizao.project.business.service;
 
 import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
 import com.baomidou.mybatisplus.extension.service.IService;
 import cn.ezhizao.project.business.domain.BizInboundOrderDetail;
 
@@ -19,6 +21,7 @@ public interface IBizInboundOrderDetailService extends IService<BizInboundOrderD
      * @return 生产入库明细集合
      */
     public List<BizInboundOrderDetail> getList(BizInboundOrderDetail bizInboundOrderDetail);
+    public List<BizTaksStockInboundOrderDetail> getTaskStockList();
 
     /**
      * 物理删除

+ 28 - 0
src/main/java/cn/ezhizao/project/business/service/IBizTaksStockCertificateLotService.java

@@ -0,0 +1,28 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.domain.BizTaksStockLot;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
+
+/**
+ * 盘点合格证信息Service接口
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+public interface IBizTaksStockCertificateLotService extends IService<BizTaksStockCertificateLot>
+{
+    /**
+     * 查询盘点合格证信息列表
+     *
+     * @param bizTaksStockCertificateLot 盘点合格证信息
+     * @return 盘点合格证信息集合
+     */
+    public List<BizTaksStockCertificateLot> getList(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+
+    public int physicalDelete(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+    public List<BizTaksStockCertificateLot> getNotInboundInfo(BizTaksStockCertificateLot bizTaksStockCertificateLot);
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/service/IBizTaksStockInboundOrderDetailService.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.service;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.IService;
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
+
+/**
+ * 盘点入库明细Service接口
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+public interface IBizTaksStockInboundOrderDetailService extends IService<BizTaksStockInboundOrderDetail>
+{
+    /**
+     * 查询盘点入库明细列表
+     *
+     * @param bizTaksStockInboundOrderDetail 盘点入库明细
+     * @return 盘点入库明细集合
+     */
+    public List<BizTaksStockInboundOrderDetail> getList(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+
+    /**
+     * 物理删除
+     * @param bizTaksStockInboundOrderDetail
+     * @return 删除结果
+     */
+    public int physicalDelete(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+
+    public List<BizTaksStockInboundOrderDetail> getAnyInboundInfo(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail);
+}

+ 1 - 2
src/main/java/cn/ezhizao/project/business/service/IBizTaksStockLotService.java

@@ -3,6 +3,7 @@ package cn.ezhizao.project.business.service;
 import java.util.List;
 
 import cn.ezhizao.project.business.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.extension.service.IService;
 import cn.ezhizao.project.business.domain.BizTaksStockLot;
 
@@ -33,6 +34,4 @@ public interface IBizTaksStockLotService extends IService<BizTaksStockLot>
     public int physicalDelete(BizTaksStockLot bizTaksStockLot);
 
     List<BizTaksStockLot> getOutsourceDetailList(BizTaksStockLot bizTaksStockLot);
-
-
 }

+ 7 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizCertificateLotServiceImpl.java

@@ -2,6 +2,8 @@ package cn.ezhizao.project.business.service.impl;
 
 import java.util.List;
 import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.mapper.BizCertificateLotMapper;
@@ -32,6 +34,11 @@ public class BizCertificateLotServiceImpl  extends ServiceImpl<BizCertificateLot
         return bizCertificateLotMapper.getList(bizCertificateLot);
     }
 
+    @Override
+    public List<BizTaksStockCertificateLot> getTaskStockList() {
+        return bizCertificateLotMapper.getTaskStockList();
+    }
+
     /**
      * 物理删除
      * @param bizCertificateLot

+ 7 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizInboundOrderDetailServiceImpl.java

@@ -2,6 +2,8 @@ package cn.ezhizao.project.business.service.impl;
 
 import java.util.List;
 import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.mapper.BizInboundOrderDetailMapper;
@@ -32,6 +34,11 @@ public class BizInboundOrderDetailServiceImpl  extends ServiceImpl<BizInboundOrd
         return bizInboundOrderDetailMapper.getList(bizInboundOrderDetail);
     }
 
+    @Override
+    public List<BizTaksStockInboundOrderDetail> getTaskStockList() {
+        return bizInboundOrderDetailMapper.getTaskStockList();
+    }
+
     /**
      * 物理删除
      * @param bizInboundOrderDetail

+ 1 - 1
src/main/java/cn/ezhizao/project/business/service/BizOutsourcedRecordsServiceImpl.java → src/main/java/cn/ezhizao/project/business/service/impl/BizOutsourcedRecordsServiceImpl.java

@@ -1,4 +1,4 @@
-package cn.ezhizao.project.business.service;
+package cn.ezhizao.project.business.service.impl;
 
 import java.util.List;
 import javax.annotation.Resource;

+ 52 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockCertificateLotServiceImpl.java

@@ -0,0 +1,52 @@
+package cn.ezhizao.project.business.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.domain.BizTaksStockLot;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.mapper.BizTaksStockCertificateLotMapper;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
+import cn.ezhizao.project.business.service.IBizTaksStockCertificateLotService;
+
+/**
+ * 盘点合格证信息Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+@Service
+public class BizTaksStockCertificateLotServiceImpl  extends ServiceImpl<BizTaksStockCertificateLotMapper, BizTaksStockCertificateLot> implements IBizTaksStockCertificateLotService
+{
+    @Resource
+    private BizTaksStockCertificateLotMapper bizTaksStockCertificateLotMapper;
+
+    /**
+     * 查询盘点合格证信息列表
+     *
+     * @param bizTaksStockCertificateLot 盘点合格证信息
+     * @return 盘点合格证信息
+     */
+    @Override
+    public List<BizTaksStockCertificateLot> getList(BizTaksStockCertificateLot bizTaksStockCertificateLot)
+    {
+        return bizTaksStockCertificateLotMapper.getList(bizTaksStockCertificateLot);
+    }
+
+    /**
+     * 物理删除
+     * @param bizTaksStockCertificateLot
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizTaksStockCertificateLot bizTaksStockCertificateLot){ return bizTaksStockCertificateLotMapper.physicalDelete(bizTaksStockCertificateLot); }
+
+    @Override
+    public List<BizTaksStockCertificateLot> getNotInboundInfo(BizTaksStockCertificateLot bizTaksStockCertificateLot) {
+        return bizTaksStockCertificateLotMapper.getNotInboundInfo(bizTaksStockCertificateLot);
+    }
+
+    ;
+
+}

+ 48 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockInboundOrderDetailServiceImpl.java

@@ -0,0 +1,48 @@
+package cn.ezhizao.project.business.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import cn.ezhizao.project.business.mapper.BizTaksStockInboundOrderDetailMapper;
+import cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail;
+import cn.ezhizao.project.business.service.IBizTaksStockInboundOrderDetailService;
+
+/**
+ * 盘点入库明细Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2025-06-03
+ */
+@Service
+public class BizTaksStockInboundOrderDetailServiceImpl  extends ServiceImpl<BizTaksStockInboundOrderDetailMapper, BizTaksStockInboundOrderDetail> implements IBizTaksStockInboundOrderDetailService
+{
+    @Resource
+    private BizTaksStockInboundOrderDetailMapper bizTaksStockInboundOrderDetailMapper;
+
+    /**
+     * 查询盘点入库明细列表
+     *
+     * @param bizTaksStockInboundOrderDetail 盘点入库明细
+     * @return 盘点入库明细
+     */
+    @Override
+    public List<BizTaksStockInboundOrderDetail> getList(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail)
+    {
+        return bizTaksStockInboundOrderDetailMapper.getList(bizTaksStockInboundOrderDetail);
+    }
+
+    /**
+     * 物理删除
+     * @param bizTaksStockInboundOrderDetail
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail){ return bizTaksStockInboundOrderDetailMapper.physicalDelete(bizTaksStockInboundOrderDetail); }
+
+    @Override
+    public List<BizTaksStockInboundOrderDetail> getAnyInboundInfo(BizTaksStockInboundOrderDetail bizTaksStockInboundOrderDetail) {
+        return bizTaksStockInboundOrderDetailMapper.getAnyInboundInfo(bizTaksStockInboundOrderDetail);
+    }
+
+}

+ 1 - 0
src/main/java/cn/ezhizao/project/business/service/impl/BizTaksStockLotServiceImpl.java

@@ -4,6 +4,7 @@ import java.util.List;
 import javax.annotation.Resource;
 
 import cn.ezhizao.project.business.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.domain.BizTaksStockCertificateLot;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import org.springframework.stereotype.Service;
 import cn.ezhizao.project.business.mapper.BizTaksStockLotMapper;

+ 48 - 0
src/main/resources/mybatis/business/BizCertificateLotMapper.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.mapper.BizCertificateLotMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizCertificateLot" id="BizCertificateLotResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizCertificateLot" resultMap="BizCertificateLotResult">
+        SELECT * FROM biz_certificate_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="startCode != null  and startCode != ''"> AND start_code = #{startCode}</if>
+            <if test="endCode != null  and endCode != ''"> AND end_code = #{endCode}</if>
+            <if test="printDate != null "> AND print_date = #{printDate}</if>
+            <if test="qrcode != null  and qrcode != ''"> AND qrcode = #{qrcode}</if>
+            <if test="qrcodeUrl != null  and qrcodeUrl != ''"> AND qrcode_url = #{qrcodeUrl}</if>
+            <if test="barcode != null  and barcode != ''"> AND barcode = #{barcode}</if>
+            <if test="barcodeUrl != null  and barcodeUrl != ''"> AND barcode_url = #{barcodeUrl}</if>
+        </trim>
+    </select>
+    <select id="getTaskStockList" resultType="cn.ezhizao.project.business.domain.BizTaksStockCertificateLot">
+        SELECT t1.tenant_id,t1.certificate_id,t1.sort,t1.start_code,t1.end_code,t1.qrcode,t1.qrcode_url,t1.barcode,t1.barcode_url,t2.print_date,t2.product_id,t2.product_code,t2.product_description,t2.drawing_number,t2.dept_id,t2.dept_name,t2.print_time,t2.company_id,t2.lot_id,t2.lot_code,t2.number as tempProdNum
+        FROM `biz_certificate_lot` t1
+        JOIN biz_certificate t2
+        ON t1.certificate_id = t2.id
+        AND t2.deleted = 0
+        WHERE t1.deleted = 0
+        AND (
+        t2.lot_code NOT IN (SELECT lot_code FROM biz_inbound_order_detail WHERE deleted = 0)
+        OR t2.lot_code NOT IN (SELECT lot_code FROM biz_inbound_order_detail WHERE deleted = 0 AND is_inbound = 1)
+        );
+
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_certificate_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 32 - 0
src/main/resources/mybatis/business/BizInboundOrderDetailMapper.xml

@@ -26,6 +26,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="transferCode != null  and transferCode != ''"> AND transfer_code = #{transferCode}</if>
         </trim>
     </select>
+    <select id="getTaskStockList" resultType="cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail">
+        SELECT
+        t1.inbound_order_id,
+        t1.certificate_id,
+        t1.certificate_lot_id,
+        t1.certificate_code,
+        t1.lot_code,
+        t1.lot_id,
+        t1.inbound_num,
+        t1.is_inbound,
+        t1.first_operator_user_id,
+        t1.first_operator_user_name,
+        t1.first_operator_nick_name,
+        t1.second_operator_user_id,
+        t1.second_operator_user_name,
+        t1.second_operator_nick_name,
+        t1.third_operator_user_id,
+        t1.third_operator_user_name,
+        t1.third_operator_nick_name,
+        t1.package_type_code,
+        t1.transfer_code,
+        t1.pallet_code,
+        t3.dept_id,t3.dept_name,t3.dept_code,t3.product_code,t3.product_id,t3.product_description,t3.inbound_number,t3.drawing_no
+        FROM biz_inbound_order_detail t1
+        left join biz_inbound_order t3 on t1.inbound_order_id = t3.id
+        WHERE t1.is_inbound = 0 AND t1.deleted = 0 and t3.deleted = 0
+        AND t1.lot_code IN (
+        SELECT lot_code
+        FROM biz_inbound_order_detail
+        WHERE is_inbound = 1 AND deleted = 0
+        );
+    </select>
 
     <delete id="physicalDelete">
         DELETE FROM biz_inbound_order_detail

+ 57 - 0
src/main/resources/mybatis/business/BizTaksStockCertificateLotMapper.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.mapper.BizTaksStockCertificateLotMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizTaksStockCertificateLot" id="BizTaksStockCertificateLotResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizTaksStockCertificateLot" resultMap="BizTaksStockCertificateLotResult">
+        SELECT * FROM biz_taks_stock_certificate_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="startCode != null  and startCode != ''"> AND start_code = #{startCode}</if>
+            <if test="endCode != null  and endCode != ''"> AND end_code = #{endCode}</if>
+            <if test="printDate != null "> AND print_date = #{printDate}</if>
+            <if test="qrcode != null  and qrcode != ''"> AND qrcode = #{qrcode}</if>
+            <if test="qrcodeUrl != null  and qrcodeUrl != ''"> AND qrcode_url = #{qrcodeUrl}</if>
+            <if test="barcode != null  and barcode != ''"> AND barcode = #{barcode}</if>
+            <if test="barcodeUrl != null  and barcodeUrl != ''"> AND barcode_url = #{barcodeUrl}</if>
+            <if test="lotCode != null  and lotCode != ''"> AND lot_code = #{lotCode}</if>
+            <if test="prodNum != null "> AND prod_num = #{prodNum}</if>
+            <if test="companyCode != null  and companyCode != ''"> AND company_code = #{companyCode}</if>
+            <if test="companyName != null  and companyName != ''"> AND company_name like concat('%', #{companyName}, '%')</if>
+            <if test="isTaksStock != null "> AND is_taks_stock = #{isTaksStock}</if>
+            <if test="stockYear != null  and stockYear != ''"> AND stock_year = #{stockYear}</if>
+            <if test="stockMonth != null  and stockMonth != ''"> AND stock_month = #{stockMonth}</if>
+            <if test="deptName != null  and deptName != ''"> AND dept_name like concat('%', #{deptName}, '%')</if>
+        </trim>
+    </select>
+    <select id="getNotInboundInfo" resultType="BizTaksStockCertificateLot">
+        SELECT *,
+        GROUP_CONCAT(barcode SEPARATOR ',') AS barcodes
+        FROM
+        biz_taks_stock_certificate_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+        deleted = 0
+        <if test="barcode != null  and barcode != ''"> AND barcode like concat('%', #{barcode}, '%')</if>
+            <if test="takeStockPeriodId != null and takeStockPeriodId != ''"> AND take_stock_period_id = #{takeStockPeriodId}</if>
+        <if test="lotCode != null  and lotCode != ''"> AND lot_code like concat('%', #{lotCode}, '%')</if>
+       </trim>
+        GROUP BY
+        lot_code
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_taks_stock_certificate_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 60 - 0
src/main/resources/mybatis/business/BizTaksStockInboundOrderDetailMapper.xml

@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="cn.ezhizao.project.business.mapper.BizTaksStockInboundOrderDetailMapper">
+
+    <resultMap type="cn.ezhizao.project.business.domain.BizTaksStockInboundOrderDetail" id="BizTaksStockInboundOrderDetailResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizTaksStockInboundOrderDetail" resultMap="BizTaksStockInboundOrderDetailResult">
+        SELECT * FROM biz_taks_stock_inbound_order_detail
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="certificateCode != null  and certificateCode != ''"> AND certificate_code = #{certificateCode}</if>
+            <if test="lotCode != null  and lotCode != ''"> AND lot_code = #{lotCode}</if>
+            <if test="inboundNum != null "> AND inbound_num = #{inboundNum}</if>
+            <if test="isInbound != null "> AND is_inbound = #{isInbound}</if>
+            <if test="firstOperatorUserName != null  and firstOperatorUserName != ''"> AND first_operator_user_name like concat('%', #{firstOperatorUserName}, '%')</if>
+            <if test="firstOperatorNickName != null  and firstOperatorNickName != ''"> AND first_operator_nick_name like concat('%', #{firstOperatorNickName}, '%')</if>
+            <if test="secondOperatorUserName != null  and secondOperatorUserName != ''"> AND second_operator_user_name like concat('%', #{secondOperatorUserName}, '%')</if>
+            <if test="secondOperatorNickName != null  and secondOperatorNickName != ''"> AND second_operator_nick_name like concat('%', #{secondOperatorNickName}, '%')</if>
+            <if test="thirdOperatorUserName != null  and thirdOperatorUserName != ''"> AND third_operator_user_name like concat('%', #{thirdOperatorUserName}, '%')</if>
+            <if test="thirdOperatorNickName != null  and thirdOperatorNickName != ''"> AND third_operator_nick_name like concat('%', #{thirdOperatorNickName}, '%')</if>
+            <if test="packageTypeCode != null  and packageTypeCode != ''"> AND package_type_code = #{packageTypeCode}</if>
+            <if test="transferCode != null  and transferCode != ''"> AND transfer_code = #{transferCode}</if>
+            <if test="transferEntryCode != null  and transferEntryCode != ''"> AND transfer_entry_code = #{transferEntryCode}</if>
+            <if test="inboundNumber != null  and inboundNumber != ''"> AND inbound_number = #{inboundNumber}</if>
+            <if test="prodNum != null "> AND prod_num = #{prodNum}</if>
+            <if test="isTaksStock != null "> AND is_taks_stock = #{isTaksStock}</if>
+            <if test="stockYear != null  and stockYear != ''"> AND stock_year = #{stockYear}</if>
+            <if test="stockMonth != null  and stockMonth != ''"> AND stock_month = #{stockMonth}</if>
+        </trim>
+    </select>
+    <select id="getAnyInboundInfo" resultType="BizTaksStockInboundOrderDetail">
+        SELECT *,
+        GROUP_CONCAT(barcode SEPARATOR ',') AS barcodes
+        FROM
+        biz_taks_stock_inbound_order_detail
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="inboundNumber != null  and inboundNumber != ''"> AND inbound_number like concat('%', #{inboundNumber}, '%')</if>
+            <if test="barcode != null  and barcode != ''"> AND barcode like concat('%', #{barcode}, '%')</if>
+            <if test="takeStockPeriodId != null and takeStockPeriodId != ''"> AND take_stock_period_id = #{takeStockPeriodId}</if>
+            <if test="lotCode != null  and lotCode != ''"> AND lot_code like concat('%', #{lotCode}, '%')</if>
+        </trim>
+        GROUP BY inbound_number,lot_code
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_taks_stock_inbound_order_detail
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>