Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/main/resources/mybatis/business/product/BizProcessInspecionMapper.xml
ezhizao_zx 10 months ago
parent
commit
0ea6e7aac7
36 changed files with 1697 additions and 22 deletions
  1. 107 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandards/controller/BizInspectionStandardsController.java
  2. 59 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandards/domain/BizInspectionStandards.java
  3. 31 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandards/mapper/BizInspectionStandardsMapper.java
  4. 32 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandards/service/IBizInspectionStandardsService.java
  5. 45 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandards/service/impl/BizInspectionStandardsServiceImpl.java
  6. 110 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/controller/BizInspectionStandardsCheckController.java
  7. 71 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/domain/BizInspectionStandardsCheck.java
  8. 31 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/mapper/BizInspectionStandardsCheckMapper.java
  9. 31 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/service/IBizInspectionStandardsCheckService.java
  10. 45 0
      src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/service/impl/BizInspectionStandardsCheckServiceImpl.java
  11. 18 1
      src/main/java/cn/ezhizao/project/business/product/controller/BizDayworkController.java
  12. 231 4
      src/main/java/cn/ezhizao/project/business/product/controller/BizProcessInspecionController.java
  13. 11 1
      src/main/java/cn/ezhizao/project/business/product/domain/BizDaywork.java
  14. 2 0
      src/main/java/cn/ezhizao/project/business/product/domain/BizDayworkItem.java
  15. 22 1
      src/main/java/cn/ezhizao/project/business/product/domain/BizLot.java
  16. 6 0
      src/main/java/cn/ezhizao/project/business/product/domain/BizProcessInspecion.java
  17. 1 0
      src/main/java/cn/ezhizao/project/business/product/domain/BizProcessInspectionDetail.java
  18. 1 0
      src/main/java/cn/ezhizao/project/business/product/mapper/BizDayworkMapper.java
  19. 1 0
      src/main/java/cn/ezhizao/project/business/product/service/IBizDayworkService.java
  20. 5 0
      src/main/java/cn/ezhizao/project/business/product/service/impl/BizDayworkServiceImpl.java
  21. 125 0
      src/main/java/cn/ezhizao/project/business/takeStockPeriod/controller/BizTakeStockPeriodController.java
  22. 48 0
      src/main/java/cn/ezhizao/project/business/takeStockPeriod/domain/BizTakeStockPeriod.java
  23. 31 0
      src/main/java/cn/ezhizao/project/business/takeStockPeriod/mapper/BizTakeStockPeriodMapper.java
  24. 32 0
      src/main/java/cn/ezhizao/project/business/takeStockPeriod/service/IBizTakeStockPeriodService.java
  25. 45 0
      src/main/java/cn/ezhizao/project/business/takeStockPeriod/service/impl/BizTakeStockPeriodServiceImpl.java
  26. 159 0
      src/main/java/cn/ezhizao/project/business/taksStockLot/controller/BizTaksStockLotController.java
  27. 121 0
      src/main/java/cn/ezhizao/project/business/taksStockLot/domain/BizTaksStockLot.java
  28. 31 0
      src/main/java/cn/ezhizao/project/business/taksStockLot/mapper/BizTaksStockLotMapper.java
  29. 32 0
      src/main/java/cn/ezhizao/project/business/taksStockLot/service/IBizTaksStockLotService.java
  30. 45 0
      src/main/java/cn/ezhizao/project/business/taksStockLot/service/impl/BizTaksStockLotServiceImpl.java
  31. 32 0
      src/main/resources/mybatis/business/BizInspectionStandards/BizInspectionStandardsMapper.xml
  32. 34 0
      src/main/resources/mybatis/business/BizInspectionStandardsCheck/BizInspectionStandardsCheckMapper.xml
  33. 12 1
      src/main/resources/mybatis/business/product/BizDayworkMapper.xml
  34. 15 14
      src/main/resources/mybatis/business/product/BizProcessInspecionMapper.xml
  35. 31 0
      src/main/resources/mybatis/business/takeStockPeriod/BizTakeStockPeriodMapper.xml
  36. 44 0
      src/main/resources/mybatis/business/taksStockLot/BizTaksStockLotMapper.xml

+ 107 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandards/controller/BizInspectionStandardsController.java

@@ -0,0 +1,107 @@
+package cn.ezhizao.project.business.BizInspectionStandards.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+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.BizInspectionStandards.domain.BizInspectionStandards;
+import cn.ezhizao.project.business.BizInspectionStandards.service.IBizInspectionStandardsService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 检查标准Controller
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@RestController
+@RequestMapping("/business/standards")
+public class BizInspectionStandardsController extends BaseController
+{
+    @Resource
+    private IBizInspectionStandardsService bizInspectionStandardsService;
+
+    /**
+     * 查询检查标准列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(BizInspectionStandards bizInspectionStandards) throws NoSuchFieldException, IllegalAccessException
+    {
+        List<BizInspectionStandards> list = bizInspectionStandardsService.getList(bizInspectionStandards);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出检查标准列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:standards:export')")
+    @Log(title = "检查标准", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizInspectionStandards bizInspectionStandards) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandards);
+        List<BizInspectionStandards> list = bizInspectionStandardsService.getList(bizInspectionStandards);
+        ExcelUtil<BizInspectionStandards> util = new ExcelUtil<BizInspectionStandards>(BizInspectionStandards.class);
+        util.exportExcel(response, list, "检查标准数据");
+    }
+
+    /**
+     * 获取检查标准详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:standards:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizInspectionStandardsService.getById(id));
+    }
+
+    /**
+     * 新增检查标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:standards:add')")
+    @Log(title = "检查标准", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizInspectionStandards bizInspectionStandards) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandards);
+        return toAjax(bizInspectionStandardsService.save(bizInspectionStandards));
+    }
+
+    /**
+     * 修改检查标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:standards:edit')")
+    @Log(title = "检查标准", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizInspectionStandards bizInspectionStandards) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandards);
+        return toAjax(bizInspectionStandardsService.updateById(bizInspectionStandards));
+    }
+
+    /**
+     * 删除检查标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:standards:remove')")
+    @Log(title = "检查标准", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizInspectionStandardsService.removeBatchByIds(ids));
+    }
+}

+ 59 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandards/domain/BizInspectionStandards.java

@@ -0,0 +1,59 @@
+package cn.ezhizao.project.business.BizInspectionStandards.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_inspection_standards
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@Data
+@TableName(value = "biz_inspection_standards")
+public class BizInspectionStandards extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户id,厂别或类型1:Ⅰ类2:Ⅱ类 */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 检查仪器 */
+    @Excel(name = "检查仪器")
+    @ApiModelProperty(value = "检查仪器")
+    private String instrument;
+
+    /** 产品版本 */
+    @Excel(name = "产品版本")
+    @ApiModelProperty(value = "产品版本")
+    private String productVersion;
+
+    /** 工序编码 */
+    @Excel(name = "工序编码")
+    @ApiModelProperty(value = "工序编码")
+    private String processCode;
+
+    /** 检查标准 */
+    @Excel(name = "检查标准")
+    @ApiModelProperty(value = "检查标准")
+    private String standard;
+
+    /** 产品id */
+    @ApiModelProperty(value = "检查标准")
+    private Long productId;
+
+    /** 工序id */
+    @ApiModelProperty(value = "检查标准")
+    private Long processId;
+
+    private Long inspecionStandardsId;
+    @TableField(exist = false)
+    private String inspectionCode;
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandards/mapper/BizInspectionStandardsMapper.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.BizInspectionStandards.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.BizInspectionStandards.domain.BizInspectionStandards;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 检查标准Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+public interface BizInspectionStandardsMapper extends BaseMapper<BizInspectionStandards>
+{
+    /**
+     * 查询检查标准列表
+     *
+     * @param bizInspectionStandards 检查标准
+     * @return 检查标准集合
+     */
+    public List<BizInspectionStandards> getList(BizInspectionStandards bizInspectionStandards);
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandards
+     * @return 删除结果
+    */
+    public int physicalDelete(BizInspectionStandards bizInspectionStandards);
+}

+ 32 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandards/service/IBizInspectionStandardsService.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.BizInspectionStandards.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.BizInspectionStandards.domain.BizInspectionStandards;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+
+/**
+ * 检查标准Service接口
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+public interface IBizInspectionStandardsService extends IService<BizInspectionStandards>
+{
+    /**
+     * 查询检查标准列表
+     *
+     * @param bizInspectionStandards 检查标准
+     * @return 检查标准集合
+     */
+    public List<BizInspectionStandards> getList(BizInspectionStandards bizInspectionStandards);
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandards
+     * @return 删除结果
+     */
+    public int physicalDelete(BizInspectionStandards bizInspectionStandards);
+
+}

+ 45 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandards/service/impl/BizInspectionStandardsServiceImpl.java

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.BizInspectionStandards.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.BizInspectionStandards.domain.BizInspectionStandards;
+import cn.ezhizao.project.business.BizInspectionStandards.mapper.BizInspectionStandardsMapper;
+import cn.ezhizao.project.business.BizInspectionStandards.service.IBizInspectionStandardsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 检查标准Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@Service
+public class BizInspectionStandardsServiceImpl  extends ServiceImpl<BizInspectionStandardsMapper, BizInspectionStandards> implements IBizInspectionStandardsService
+{
+    @Resource
+    private BizInspectionStandardsMapper bizInspectionStandardsMapper;
+
+    /**
+     * 查询检查标准列表
+     *
+     * @param bizInspectionStandards 检查标准
+     * @return 检查标准
+     */
+    @Override
+    public List<BizInspectionStandards> getList(BizInspectionStandards bizInspectionStandards)
+    {
+        return bizInspectionStandardsMapper.getList(bizInspectionStandards);
+    }
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandards
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizInspectionStandards bizInspectionStandards){ return bizInspectionStandardsMapper.physicalDelete(bizInspectionStandards); };
+
+}

+ 110 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/controller/BizInspectionStandardsCheckController.java

@@ -0,0 +1,110 @@
+package cn.ezhizao.project.business.BizInspectionStandardsCheck.controller;
+
+import java.util.List;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+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.BizInspectionStandardsCheck.domain.BizInspectionStandardsCheck;
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.service.IBizInspectionStandardsCheckService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 检查类别标准Controller
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@RestController
+@RequestMapping("/business/check")
+public class BizInspectionStandardsCheckController extends BaseController
+{
+    @Resource
+    private IBizInspectionStandardsCheckService bizInspectionStandardsCheckService;
+
+    /**
+     * 查询检查类别标准列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BizInspectionStandardsCheck bizInspectionStandardsCheck) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandardsCheck);
+        startPage();
+        List<BizInspectionStandardsCheck> list = bizInspectionStandardsCheckService.getList(bizInspectionStandardsCheck);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出检查类别标准列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:export')")
+    @Log(title = "检查类别标准", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizInspectionStandardsCheck bizInspectionStandardsCheck) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandardsCheck);
+        List<BizInspectionStandardsCheck> list = bizInspectionStandardsCheckService.getList(bizInspectionStandardsCheck);
+        ExcelUtil<BizInspectionStandardsCheck> util = new ExcelUtil<BizInspectionStandardsCheck>(BizInspectionStandardsCheck.class);
+        util.exportExcel(response, list, "检查类别标准数据");
+    }
+
+    /**
+     * 获取检查类别标准详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizInspectionStandardsCheckService.getById(id));
+    }
+
+    /**
+     * 新增检查类别标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:add')")
+    @Log(title = "检查类别标准", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizInspectionStandardsCheck bizInspectionStandardsCheck) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandardsCheck);
+        return toAjax(bizInspectionStandardsCheckService.save(bizInspectionStandardsCheck));
+    }
+
+    /**
+     * 修改检查类别标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:edit')")
+    @Log(title = "检查类别标准", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizInspectionStandardsCheck bizInspectionStandardsCheck) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizInspectionStandardsCheck);
+        return toAjax(bizInspectionStandardsCheckService.updateById(bizInspectionStandardsCheck));
+    }
+
+    /**
+     * 删除检查类别标准
+     */
+    @PreAuthorize("@ss.hasPermi('business:check:remove')")
+    @Log(title = "检查类别标准", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizInspectionStandardsCheckService.removeBatchByIds(ids));
+    }
+}

+ 71 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/domain/BizInspectionStandardsCheck.java

@@ -0,0 +1,71 @@
+package cn.ezhizao.project.business.BizInspectionStandardsCheck.domain;
+
+import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
+import cn.ezhizao.framework.web.domain.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableName;
+import lombok.Data;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 检查类别标准对象 biz_inspection_standards_check
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@Data
+@TableName(value = "biz_inspection_standards_check")
+public class BizInspectionStandardsCheck extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户id,厂别或类型1:Ⅰ类2:Ⅱ类 */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 检查仪器 */
+    @Excel(name = "检查仪器")
+    @ApiModelProperty(value = "检查仪器")
+    private String instrument;
+
+    /** 产品版本 */
+    @Excel(name = "产品版本")
+    @ApiModelProperty(value = "产品版本")
+    private String productVersion;
+
+    /** 工序编码 */
+    @Excel(name = "工序编码")
+    @ApiModelProperty(value = "工序编码")
+    private String processCode;
+
+    /** 检查标准 */
+    @Excel(name = "检查标准")
+    @ApiModelProperty(value = "检查标准")
+    private String standard;
+
+    /** 产品id */
+    @ApiModelProperty(value = "检查标准")
+    private Long productId;
+
+    /** 检查类别编码 */
+    @Excel(name = "检查类别编码")
+    @ApiModelProperty(value = "检查类别编码")
+    private String inspectionCode;
+
+    /** 检查类别id */
+    @ApiModelProperty(value = "检查类别编码")
+    private Long inspectionId;
+
+    /** 检查类别名称 */
+    @Excel(name = "检查类别名称")
+    @ApiModelProperty(value = "检查类别名称")
+    private String inspectionName;
+
+    /** 检查标准id */
+    @ApiModelProperty(value = "检查类别名称")
+    private Long standardsId;
+
+    /** 工序id */
+    @ApiModelProperty(value = "检查类别名称")
+    private Long processId;
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/mapper/BizInspectionStandardsCheckMapper.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.BizInspectionStandardsCheck.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.domain.BizInspectionStandardsCheck;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 检查类别标准Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+public interface BizInspectionStandardsCheckMapper extends BaseMapper<BizInspectionStandardsCheck>
+{
+    /**
+     * 查询检查类别标准列表
+     *
+     * @param bizInspectionStandardsCheck 检查类别标准
+     * @return 检查类别标准集合
+     */
+    public List<BizInspectionStandardsCheck> getList(BizInspectionStandardsCheck bizInspectionStandardsCheck);
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandardsCheck
+     * @return 删除结果
+    */
+    public int physicalDelete(BizInspectionStandardsCheck bizInspectionStandardsCheck);
+}

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

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.BizInspectionStandardsCheck.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.domain.BizInspectionStandardsCheck;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 检查类别标准Service接口
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+public interface IBizInspectionStandardsCheckService extends IService<BizInspectionStandardsCheck>
+{
+    /**
+     * 查询检查类别标准列表
+     *
+     * @param bizInspectionStandardsCheck 检查类别标准
+     * @return 检查类别标准集合
+     */
+    public List<BizInspectionStandardsCheck> getList(BizInspectionStandardsCheck bizInspectionStandardsCheck);
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandardsCheck
+     * @return 删除结果
+     */
+    public int physicalDelete(BizInspectionStandardsCheck bizInspectionStandardsCheck);
+
+}

+ 45 - 0
src/main/java/cn/ezhizao/project/business/BizInspectionStandardsCheck/service/impl/BizInspectionStandardsCheckServiceImpl.java

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.BizInspectionStandardsCheck.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.domain.BizInspectionStandardsCheck;
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.mapper.BizInspectionStandardsCheckMapper;
+import cn.ezhizao.project.business.BizInspectionStandardsCheck.service.IBizInspectionStandardsCheckService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 检查类别标准Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-08-09
+ */
+@Service
+public class BizInspectionStandardsCheckServiceImpl  extends ServiceImpl<BizInspectionStandardsCheckMapper, BizInspectionStandardsCheck> implements IBizInspectionStandardsCheckService
+{
+    @Resource
+    private BizInspectionStandardsCheckMapper bizInspectionStandardsCheckMapper;
+
+    /**
+     * 查询检查类别标准列表
+     *
+     * @param bizInspectionStandardsCheck 检查类别标准
+     * @return 检查类别标准
+     */
+    @Override
+    public List<BizInspectionStandardsCheck> getList(BizInspectionStandardsCheck bizInspectionStandardsCheck)
+    {
+        return bizInspectionStandardsCheckMapper.getList(bizInspectionStandardsCheck);
+    }
+
+    /**
+     * 物理删除
+     * @param bizInspectionStandardsCheck
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizInspectionStandardsCheck bizInspectionStandardsCheck){ return bizInspectionStandardsCheckMapper.physicalDelete(bizInspectionStandardsCheck); };
+
+}

+ 18 - 1
src/main/java/cn/ezhizao/project/business/product/controller/BizDayworkController.java

@@ -8,6 +8,7 @@ import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
 import cn.ezhizao.framework.web.controller.BaseController;
 import cn.ezhizao.framework.web.domain.AjaxResult;
 import cn.ezhizao.project.business.deptProcess.domain.BizDeptProcess;
+import cn.ezhizao.project.business.equipment.domain.BizEquipmentDetail;
 import cn.ezhizao.project.business.process.domain.BizProcess;
 import cn.ezhizao.project.business.product.domain.*;
 import cn.ezhizao.project.business.product.service.*;
@@ -798,6 +799,21 @@ public class BizDayworkController extends BaseController {
         ExcelUtil<BizDaywork> util = new ExcelUtil<BizDaywork>(BizDaywork.class);
         util.exportExcel(response, list, "报工数据");
     }
+    @PostMapping("/getDayworkInfoById")
+    public AjaxResult getDayworkInfoById(@RequestBody BizDaywork bizDaywork) throws NoSuchFieldException, IllegalAccessException {
+        List<BizDayworkItem> dayworkItemList = bizDayworkItemService.query().eq("daywork_id", bizDaywork.getId()).orderByDesc("process_step_number").list();
+        List<BizDayworkItem> latestDayworkItem = dayworkItemList.stream().filter(item -> item.getProcessStepNumber().equals(dayworkItemList.get(0).getProcessStepNumber())).collect(Collectors.toList());
+        List<BizEquipmentDetail> equipmentDetailList = new ArrayList<>();
+        latestDayworkItem.forEach(item -> {
+            BizEquipmentDetail equipmentDetail = new BizEquipmentDetail();
+            equipmentDetail.setEquipmentId(item.getEquipmentDetailId());
+            equipmentDetail.setEquipmentCode(item.getEquipmentDetailCode());
+            equipmentDetailList.add(equipmentDetail);
+        });
+        bizDaywork = bizDayworkService.getDayworkInfoById(bizDaywork);
+        bizDaywork.setEquipmentDetails(equipmentDetailList.stream().distinct().collect(Collectors.toList()));
+        return success(bizDaywork);
+    }
 
     /**
      * 获取报工详细信息
@@ -850,7 +866,7 @@ public class BizDayworkController extends BaseController {
                     bizDayworkItem.setProductionPlanDetailId(bizDaywork.getProductionPlanDetailId());
                     bizDayworkItem.setTechnologicalProcessId(bizDaywork.getTechnologicalProcessId());
                     bizDayworkItem.setQualifiedNum(bizDaywork.getProcessQualifiedNum());
-                    bizDayworkItem.setProdNum(bizDaywork.getProcessQualifiedNum());
+                    bizDayworkItem.setProdNum(bizDaywork.getProdNum());
                     bizDayworkItem.setProcessStepNumber(bizDaywork.getProcessStepNumber());
                     /* 20230408修改 */
                     // 如果是修改,则取当前工序的工序详情
@@ -1240,6 +1256,7 @@ public class BizDayworkController extends BaseController {
             bizDayworkItem.setProcessId(l.getDaywork().getProcessId());
             bizDayworkItem.setTechnologicalProcessDetailId(l.getDaywork().getTechnologicalProcessDetailId());
             bizDayworkItem.setDeptId(l.getDeptId());
+            bizDayworkItem.setIsSort(l.getIsSort());
             bizDayworkItem.setDeptName(l.getDeptName());
             bizDayworkItem.setLotId(l.getDaywork().getLotId());
             adds.add(bizDayworkItem);

+ 231 - 4
src/main/java/cn/ezhizao/project/business/product/controller/BizProcessInspecionController.java

@@ -1,11 +1,13 @@
 package cn.ezhizao.project.business.product.controller;
 
+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 cn.ezhizao.common.utils.SecurityUtils;
 import cn.ezhizao.common.utils.bean.BeanUtils;
 import cn.ezhizao.common.utils.poi.ExcelUtil;
 import cn.ezhizao.framework.aspectj.lang.annotation.Log;
@@ -165,12 +167,41 @@ public class BizProcessInspecionController extends BaseController {
      * @throws NoSuchFieldException
      * @throws IllegalAccessException
      */
+    //@PostMapping("/selectInspecion")
+//    public AjaxResult selectInspecion(@RequestBody BizProcessInspecion processInspecion) throws NoSuchFieldException, IllegalAccessException {
+//        List<BizDayworkItemConsult> itemConsults = bizDayworkItemConsultService.query().eq("process_inspection_id", processInspecion.getId()).eq("is_process_inspection", 1).list();
+//        List<BizDayworkItemReject> itemRejects = bizDayworkItemRejectService.query().eq("process_inspection_id", processInspecion.getId()).list();
+//        processInspecion.setDayworkItemConsults(itemConsults);
+//        processInspecion.setDayworkItemRejects(itemRejects);
+//
+//        BizDayworkItem dayworkItem = bizDayworkItemService.selById(processInspecion.getDayworkItemId());
+//
+//        BizLot lot = new BizLot();
+//        lot.setId(processInspecion.getLotId());
+//        lot = bizLotService.getAllList(lot).get(0);
+//
+//        if (lot.getIsAmend() == 1 || lot.getIsWasteRecycling() == 1) {
+//            BizLotTechnologicalProcessDetail process = bizLotTechnologicalProcessDetailService.getById(dayworkItem.getTechnologicalProcessDetailId());
+//            lot.setProcessAlias(process.getProcessAlias());
+//        } else {
+//            BizTechnologicalProcessDetail process = bizTechnologicalProcessDetailService.getById(dayworkItem.getTechnologicalProcessDetailId());
+//            lot.setProcessAlias(process.getProcessAlias());
+//        }
+//
+//        lot.setAllCarrierName(dayworkItem.getCarrierName());
+//        lot.setDayworkItemId(dayworkItem.getId());
+//        lot.setCarrierCode(dayworkItem.getCarrierCode());
+//        lot.setCarrierId(dayworkItem.getCarrierId());
+//        lot.setPudName(dayworkItem.getProdNum() == 0 ? lot.getProductionQuantity() : dayworkItem.getProdNum());
+//        processInspecion.setLot(lot);
+//        return success(processInspecion);
+//    }
     @PostMapping("/selectInspecion")
     public AjaxResult selectInspecion(@RequestBody BizProcessInspecion processInspecion) throws NoSuchFieldException, IllegalAccessException {
         List<BizDayworkItemConsult> itemConsults = bizDayworkItemConsultService.query().eq("process_inspection_id", processInspecion.getId()).eq("is_process_inspection", 1).list();
-        List<BizDayworkItemReject> itemRejects = bizDayworkItemRejectService.query().eq("process_inspection_id", processInspecion.getId()).list();
+        List<BizProcessInspectionDetail> itemRejects = processInspectionDetailService.query().eq("process_inspection_id", processInspecion.getId()).list();
         processInspecion.setDayworkItemConsults(itemConsults);
-        processInspecion.setDayworkItemRejects(itemRejects);
+        processInspecion.setProcessInspectionDetails(itemRejects);
 
         BizDayworkItem dayworkItem = bizDayworkItemService.selById(processInspecion.getDayworkItemId());
 
@@ -213,11 +244,21 @@ public class BizProcessInspecionController extends BaseController {
         if (lot.getIsAmend() == 1 || lot.getIsWasteRecycling() == 1) {
             BizLotTechnologicalProcessDetail process = bizLotTechnologicalProcessDetailService.getById(dayworkItem.getTechnologicalProcessDetailId());
             lot.setProcessAlias(process.getProcessAlias());
+            lot.setProcessCode(process.getProcessCode());
+            lot.setProcessId(process.getProcessId());
         } else {
             BizTechnologicalProcessDetail process = bizTechnologicalProcessDetailService.getById(dayworkItem.getTechnologicalProcessDetailId());
             lot.setProcessAlias(process.getProcessAlias());
+            lot.setProcessCode(process.getProcessCode());
+            lot.setProcessId(process.getProcessId());
         }
-
+        lot.setNickName(processInspecion.getNickName());
+        lot.setUserId(processInspecion.getUserId());
+        lot.setEquipmentDetailCode(processInspecion.getEquipmentDetailCode());
+        lot.setEquipmentDetailId(processInspecion.getEquipmentDetailId());
+        lot.setInspectionCarrierCode(processInspecion.getInspectionCarrierCode());
+        lot.setInspectionCarrierId(processInspecion.getInspectionCarrierId());
+        lot.setDeptName(dayworkItem.getDeptName());
         lot.setAllCarrierName(dayworkItem.getCarrierName());
         lot.setDayworkItemId(dayworkItem.getId());
         lot.setCarrierCode(dayworkItem.getCarrierCode());
@@ -542,6 +583,23 @@ public class BizProcessInspecionController extends BaseController {
         // 下序未报工
         return items.stream().noneMatch(v -> v.getCreateTime().compareTo(bizDayworkItem.getCreateTime()) > 0 && v.getStatus().compareTo("0") >= 0 && v.getStatus().compareTo("3") <= 0);
     }
+    private boolean checkDayworkItem(Long dayworkItemId) {
+        BizDayworkItem bizDayworkItem = bizDayworkItemService.query().eq("id", dayworkItemId).one();BizDaywork bizDaywork = bizDayworkService.getById(bizDayworkItem.getDayworkId());
+        List<BizDayworkItem> items = bizDayworkItemService.query().eq("daywork_id", bizDayworkItem.getDayworkId()).list();
+        boolean allStepsLessThanOrEqual = items.stream()
+                .noneMatch(v -> {
+                    try {
+                        int itemStepNumber = Integer.parseInt(v.getProcessStepNumber());
+                        int bizStepNumber = Integer.parseInt(bizDayworkItem.getProcessStepNumber());
+                        return itemStepNumber > bizStepNumber;
+                    } catch (NumberFormatException e) {
+                        // 如果转换失败,可以记录日志或处理异常
+                        e.printStackTrace();
+                        return false; // 或者根据需要返回其他值
+                    }
+                });
+        return allStepsLessThanOrEqual;
+    }
 
     @Transactional
     @PostMapping("/saveOutsourcedInspecion")
@@ -884,6 +942,139 @@ public class BizProcessInspecionController extends BaseController {
         dayworkItem.setIsProcessInspection(1);
         return success(bizDayworkItemService.saveOrUpdate(dayworkItem));
     }
+    @Transactional
+    @PostMapping("/saveOnSiteInspection")
+    public AjaxResult saveOnSiteInspection(@RequestBody BizProcessInspecion processInspecion) throws NoSuchFieldException, IllegalAccessException {
+        //根据lot信息保存序检表
+        BizDaywork daywork = bizDayworkService.query().eq("lot_code", processInspecion.getLot().getLotCode()).one();
+        BizProduct product = bizProductService.getById(processInspecion.getLot().getProductId());
+        SysUser technicianUser = sysUserService.selectUserById(product.getTechnicianId());
+        BizDayworkItem dayworkItem = bizDayworkItemService.getById(processInspecion.getLot().getDayworkItemId());
+        processInspecion.setUserId(processInspecion.getLot().getUserId());
+        processInspecion.setNickName(processInspecion.getLot().getNickName());
+        processInspecion.setCarrierId(processInspecion.getLot().getCarrierId());
+        processInspecion.setCarrierCode(processInspecion.getLot().getCarrierCode());
+        processInspecion.setDayworkId(daywork.getId());
+        processInspecion.setProductionPlanId(daywork.getProductionPlanId());
+        processInspecion.setDayworkItemId(dayworkItem.getId());
+        processInspecion.setProductionPlanDetailId(daywork.getProductionPlanDetailId());
+        processInspecion.setProductionPlanDetailSubDetailId(daywork.getProductionPlanDetailSubDetailId());
+        processInspecion.setProductDescription(processInspecion.getLot().getProductDescription());
+        processInspecion.setLotId(processInspecion.getLot().getId());
+        processInspecion.setLotCode(processInspecion.getLot().getLotCode());
+        processInspecion.setDeptId(daywork.getDeptId());
+        processInspecion.setProductId(processInspecion.getLot().getProductId());
+        processInspecion.setTechnologicalProcessId(processInspecion.getLot().getTechnologicalProcessId());
+        processInspecion.setInspectionCarrierCode(processInspecion.getInspectionCarrierCode());
+        processInspecion.setInspectionCarrierId(processInspecion.getInspectionCarrierId());
+        processInspecion.setEquipmentDetailCode(processInspecion.getLot().getEquipmentDetailCode());
+        processInspecion.setEquipmentDetailId(processInspecion.getLot().getEquipmentDetailId());
+        processInspecion.setReviewerId(SecurityUtils.getLoginUser().getUserId());
+        processInspecion.setType("patrolInspection");
+        if (processInspecion.getStartTime() == null) {
+            processInspecion.setStartTime(new Date());
+        }
+        if (processInspecion.getStatus() != 0) {
+            processInspecion.setEndTime(new Date());
+            processInspecion.setFirstUpdaterId(processInspecion.getFirstUpdaterId() == null || processInspecion.getFirstUpdaterId().equals(0L) ? SecurityUtils.getLoginUser().getUserId() : processInspecion.getFirstUpdaterId());
+        }
+        if (!checkDayworkItem(processInspecion.getLot().getDayworkItemId())) {
+            return error("编辑失败,下序已经生产加工");
+        }
+
+        //BizCarrier carrier = bizCarrierService.query().eq("id", processInspecion.getInspectionCarrierId()).one();
+        List<BizDayworkCarrier> dayworkCarriers = bizDayworkCarrierService.query().eq("carrier_id", processInspecion.getInspectionCarrierId()).eq("is_changed", 0).list();
+        if (dayworkCarriers.stream().anyMatch(v -> !v.getDayworkId().equals(processInspecion.getDayworkId()))) {
+            return error("检测载具已绑定其他批次");
+        }
+
+        //保存
+        bizProcessInspecionService.saveOrUpdate(processInspecion);
+
+        if (dayworkCarriers.stream().noneMatch(v -> v.getDayworkId().equals(processInspecion.getDayworkId())) && (processInspecion.getIsInspectionCarrierChanged() == null || processInspecion.getIsInspectionCarrierChanged().equals(0))) {
+            // 该检测载具需要绑定到当前批次
+            BizDayworkCarrier newDayworkCarrier = new BizDayworkCarrier();
+            newDayworkCarrier.setDayworkId(processInspecion.getDayworkId());
+            newDayworkCarrier.setCarrierCode(processInspecion.getInspectionCarrierCode());
+            newDayworkCarrier.setCarrierId(processInspecion.getInspectionCarrierId());
+            newDayworkCarrier.setLotCode(processInspecion.getLotCode());
+            newDayworkCarrier.setLotId(processInspecion.getLotId());
+            newDayworkCarrier.setProductionPlanDetailId(processInspecion.getProductionPlanDetailId());
+            newDayworkCarrier.setProcessInspectionId(processInspecion.getId());
+            bizDayworkCarrierService.save(newDayworkCarrier);
+        }
+
+        //保存废品信息
+        List<BizProcessInspectionDetail> rejects = processInspecion.getProcessInspectionDetails();
+        //保存前先删除原先废品信息
+        BizDayworkItemReject rej = new BizDayworkItemReject();
+        rej.setProcessInspectionId(processInspecion.getId());
+        List<BizProcessInspectionDetail> processInspectionDetailList = processInspectionDetailService.query().eq("process_inspection_id", processInspecion.getId()).list();
+        processInspectionDetailService.removeBatchByIds(processInspectionDetailList);
+
+        if (rejects != null && rejects.size() > 0) {
+            for (BizProcessInspectionDetail reject : rejects) {
+                reject.setId(null);
+                reject.setUserId(processInspecion.getLot().getUserId());
+                reject.setProcessInspectionId(processInspecion.getId());
+                reject.setDayworkId(0L);
+                reject.setProductionPlanId(daywork.getProductionPlanId());
+                reject.setProductionPlanDetailId(daywork.getProductionPlanDetailId());
+                reject.setProductionPlanDetailSubDetailId(daywork.getProductionPlanDetailSubDetailId());
+                reject.setLotId(processInspecion.getLot().getId());
+                reject.setDayworkItemId(dayworkItem.getId());
+            }
+        }
+        processInspectionDetailService.saveBatch(rejects);
+        //保存咨询信息
+
+        List<BizDayworkItemConsult> consults = processInspecion.getDayworkItemConsults().stream().filter(item-> item.getId()==null).collect(Collectors.toList());
+        List<BizDayworkItemConsult> needAdd = new ArrayList<>();
+        if (consults != null && consults.size() > 0) {
+            for (BizDayworkItemConsult consult : consults) {
+                BizDayworkItemConsult consultInfo = new BizDayworkItemConsult();
+                consultInfo.setPictures(consult.getPictures());
+                consultInfo.setUserId(SecurityUtils.getLoginUser().getUserId());
+                consultInfo.setNickName(SecurityUtils.getLoginUser().getUser().getNickName());
+                consultInfo.setDayworkId(daywork.getId());
+                consultInfo.setContent(consult.getContent());
+                consultInfo.setConsultDepartment(consult.getConsultDepartment());
+                consultInfo.setProcessInspectionId(processInspecion.getId());
+                consultInfo.setProductionPlanId(daywork.getProductionPlanId());
+                consultInfo.setProductionPlanDetailId(daywork.getProductionPlanDetailId());
+                consultInfo.setProductionPlanDetailSubDetailId(daywork.getProductionPlanDetailSubDetailId());
+                consultInfo.setLotId(processInspecion.getLot().getId());
+                consultInfo.setLotCode(processInspecion.getLot().getLotCode());
+                consultInfo.setDayworkId(daywork.getId());
+                consultInfo.setDayworkItemId(dayworkItem.getId());
+                consultInfo.setProductId(processInspecion.getLot().getProductId());
+                consultInfo.setProductDescription(processInspecion.getLot().getProductDescription());
+                consultInfo.setTechnologicalProcessId(processInspecion.getLot().getTechnologicalProcessId());
+                consultInfo.setTechnologicalProcessDetailId(dayworkItem.getTechnologicalProcessDetailId());
+                consultInfo.setProcessId(dayworkItem.getProcessId());
+                consultInfo.setIsProcessInspection(1);
+                consultInfo.setProcessAlias(processInspecion.getLot().getProcessAlias());
+                consultInfo.setTechnicianId(technicianUser == null ? 0L : technicianUser.getUserId());
+                needAdd.add(consultInfo);
+            }
+            bizDayworkItemConsultService.saveBatch(needAdd);
+            List<BizDayworkItemConsultPicture> pictures = new ArrayList<>();
+            needAdd.forEach(ne ->{
+                ne.getPictures().forEach(info ->{
+                    BizDayworkItemConsultPicture consultPicture = new BizDayworkItemConsultPicture();
+                    consultPicture.setDayworkItemConsultId(ne.getId());
+                    consultPicture.setPictureName(info.getPictureName());
+                    consultPicture.setUrl(info.getUrl());
+                    pictures.add(consultPicture);
+                });
+            });
+            bizDayworkItemConsultPictureService.saveBatch(pictures);
+        }
+
+        //修改daywaork信息
+        dayworkItem.setIsProcessInspection(1);
+        return success(bizDayworkItemService.saveOrUpdate(dayworkItem));
+    }
 
 
 //    /**
@@ -1085,6 +1276,8 @@ public class BizProcessInspecionController extends BaseController {
             return error("该批次未开始加工");
         }
         BizDayworkItem item = itemList.get(0);
+        List<BizDayworkItem> latestList = itemList.stream().filter(v -> v.getProcessStepNumber().equals(item.getProcessStepNumber())).collect(Collectors.toList());
+
         BizProductionPlanDetail productionPlanDetail = productionPlanDetailService.getById(item.getProductionPlanDetailId());
         BizProduct product = productService.getById(productionPlanDetail.getProductId());
         SysUser user = sysUserService.selectUserById(product.getTechnicianId());
@@ -1106,11 +1299,42 @@ public class BizProcessInspecionController extends BaseController {
         if (lot.getIsAmend() == 1 || lot.getIsWasteRecycling() == 1) {
             BizLotTechnologicalProcessDetail process = bizLotTechnologicalProcessDetailService.getById(item.getTechnologicalProcessDetailId());
             lot.setProcessAlias(process.getProcessAlias());
+            lot.setProcessCode(process.getProcessCode());
+            lot.setProcessId(process.getProcessId());
         } else {
             BizTechnologicalProcessDetail process = bizTechnologicalProcessDetailService.getById(item.getTechnologicalProcessDetailId());
             lot.setProcessAlias(process.getProcessAlias());
+            lot.setProcessCode(process.getProcessCode());
+            lot.setProcessId(process.getProcessId());
         }
         lot.setAllCarrierName(item.getCarrierName());
+        if(latestList.stream().map(BizDayworkItem::getStatus).collect(Collectors.toList()).contains("0")){
+            return error("该批次未开始加工");
+        }
+        if(latestList.stream().map(BizDayworkItem::getStatus).collect(Collectors.toList()).contains("3")) {
+            return error("当前批次,工序已完成");
+        }
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
+        Date date = new Date();
+        String startTime = simpleDateFormat.format(date) + " 00:00:00";
+        String endTime = simpleDateFormat.format(date) + " 23:59:59";
+        List<BizDayworkItem> collect = latestList.stream().filter(v -> v.getStatus().equals("1") || v.getStatus().equals("2")).collect(Collectors.toList());
+        lot.setDayworkItemList(collect.stream().filter(info -> {
+            try {
+                if (info.getEndTime() == null) {
+                    // 如果为 null,可以选择返回 false(排除该项),或者根据需要处理
+                    return true;
+                }
+                // 确保 info 的状态为 "1" 或 "2",且结束时间不晚于当天结束时间
+                // 并且结束时间不早于当天开始时间
+                return info.getEndTime().before(sdf.parse(endTime))
+                        && info.getEndTime().after(sdf.parse(startTime));
+            } catch (ParseException e) {
+                throw new RuntimeException(e);
+            }
+        }).collect(Collectors.toList()));
+        lot.setDeptName(item.getDeptName());
         lot.setDayworkItemId(item.getId());
         lot.setCarrierCode(dayworkCarrier.getCarrierCode());
         lot.setCarrierId(dayworkCarrier.getCarrierId());
@@ -1234,7 +1458,10 @@ public class BizProcessInspecionController extends BaseController {
         List<BizDayworkCarrier> carriers = bizDayworkCarrierService.query().in("process_inspection_id", ids).list();
         List<BizDayworkItemReject> rejects = bizDayworkItemRejectService.query().in("process_inspection_id", ids).list();
         List<BizDayworkItemConsult> consults = bizDayworkItemConsultService.query().in("process_inspection_id", ids).list();
-
+        if(consults.size()>0){
+            List<BizDayworkItemConsultPicture> consultPictures = bizDayworkItemConsultPictureService.query().in("daywork_item_consult_id", consults.stream().map(BizDayworkItemConsult::getId).collect(Collectors.toList())).list();
+            bizDayworkItemConsultPictureService.removeBatchByIds(consultPictures);
+        }
         processInspectionDetailService.removeBatchByIds(bizProcessInspectionDetails);
         bizDayworkItemRejectService.removeBatchByIds(rejects);
         bizDayworkCarrierService.removeBatchByIds(carriers);

+ 11 - 1
src/main/java/cn/ezhizao/project/business/product/domain/BizDaywork.java

@@ -5,6 +5,7 @@ import java.util.List;
 
 import cn.ezhizao.framework.aspectj.lang.annotation.Excel;
 import cn.ezhizao.framework.web.domain.BaseEntity;
+import cn.ezhizao.project.business.equipment.domain.BizEquipmentDetail;
 import cn.ezhizao.project.business.process.domain.BizProcess;
 import cn.ezhizao.project.business.resourceGroup.domain.BizProductionResourceGroupDetail;
 import cn.ezhizao.project.business.technologicalProcessDetail.domain.BizTechnologicalProcessDetail;
@@ -197,6 +198,10 @@ public class BizDaywork extends BaseEntity
     @TableField(exist = false)
     private String productDescription;
     @TableField(exist = false)
+    private String drawingNumber;
+    @TableField(exist = false)
+    private String technologyVersion;
+    @TableField(exist = false)
     private String currentNickName;
     @TableField(exist = false)
     private String currentEquipmentCode;
@@ -206,6 +211,11 @@ public class BizDaywork extends BaseEntity
     private String creatorName;
     @TableField(exist = false)
     private String protemProcessStepNumber;
-
+    @TableField(exist = false)
+    private List<BizEquipmentDetail> equipmentDetails;
+//    @TableField(exist = false)
+//    private List<BizInspectionChamber> inspectionChambers;
+    @TableField(exist = false)
+    private Integer prodNum;
 
 }

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

@@ -281,5 +281,7 @@ public class BizDayworkItem extends BaseEntity
     private Integer isInnerTurnover;
     @TableField(exist = false)
     private String protemProcessStepNumber;
+    @TableField(exist = false)
+    private Boolean isNextPacking;
 
 }

+ 22 - 1
src/main/java/cn/ezhizao/project/business/product/domain/BizLot.java

@@ -9,6 +9,8 @@ import com.baomidou.mybatisplus.annotation.TableName;
 import lombok.Data;
 import io.swagger.annotations.ApiModelProperty;
 
+import java.util.List;
+
 /**
  * 企业租户对象 biz_lot
  *
@@ -130,6 +132,25 @@ public class BizLot extends BaseEntity
     @ApiModelProperty("外协单id")
     @TableField(exist = false)
     private Long outsourceOrderDetailId;
-
+    @TableField(exist = false)
+    private String deptName;
+    @TableField(exist = false)
+    private List<BizDayworkItem> dayworkItemList;
+    @TableField(exist = false)
+    private String equipmentDetailCode;
+    @TableField(exist = false)
+    private Long equipmentDetailId;
+    @TableField(exist = false)
+    private String nickName;
+    @TableField(exist = false)
+    private Long userId;
+    @TableField(exist = false)
+    private Long processId;
+    @TableField(exist = false)
+    private String processCode;
+    @TableField(exist = false)
+    private String inspectionCarrierCode;
+    @TableField(exist = false)
+    private Long inspectionCarrierId;
 
 }

+ 6 - 0
src/main/java/cn/ezhizao/project/business/product/domain/BizProcessInspecion.java

@@ -182,6 +182,7 @@ public class BizProcessInspecion extends BaseEntity
 
     @ApiModelProperty("外协序检工序")
     private String processNames;
+    private Long reviewerId;
 
     @ApiModelProperty("外协单明细id")
     private Long outsourceOrderDetailId;
@@ -202,6 +203,11 @@ public class BizProcessInspecion extends BaseEntity
     private Integer auditStatus;
     @ApiModelProperty("是否为外协序检")
     private Integer isOutsourcedInspection;
+    private String type;
+    private String equipmentDetailCode;
+    private Long equipmentDetailId;
+    @TableField(exist = false)
+    private String technicianName;
 
     public BizProcessInspecion() {
     }

+ 1 - 0
src/main/java/cn/ezhizao/project/business/product/domain/BizProcessInspectionDetail.java

@@ -124,5 +124,6 @@ public class BizProcessInspectionDetail extends BaseEntity
     private Integer status;
     @TableField(exist = false)
     private String inspectionName;
+    private Long inspectionStandardsId;
 
 }

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

@@ -21,6 +21,7 @@ public interface BizDayworkMapper extends BaseMapper<BizDaywork> {
      * @return 报工集合
      */
     public List<BizDaywork> getList(BizDaywork bizDaywork);
+    public BizDaywork getDayworkInfoById(BizDaywork bizDaywork);
 
     /**
      * 物理删除

+ 1 - 0
src/main/java/cn/ezhizao/project/business/product/service/IBizDayworkService.java

@@ -22,6 +22,7 @@ public interface IBizDayworkService extends IService<BizDaywork>
      * @return 报工集合
      */
     public List<BizDaywork> getList(BizDaywork bizDaywork);
+    public BizDaywork getDayworkInfoById(BizDaywork bizDaywork);
 
     /**
      * 物理删除

+ 5 - 0
src/main/java/cn/ezhizao/project/business/product/service/impl/BizDayworkServiceImpl.java

@@ -36,6 +36,11 @@ public class BizDayworkServiceImpl extends ServiceImpl<BizDayworkMapper, BizDayw
         return bizDayworkMapper.getList(bizDaywork);
     }
 
+    @Override
+    public BizDaywork getDayworkInfoById(BizDaywork bizDaywork) {
+        return bizDayworkMapper.getDayworkInfoById(bizDaywork);
+    }
+
     /**
      * 物理删除
      * @param bizDaywork

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

@@ -0,0 +1,125 @@
+package cn.ezhizao.project.business.takeStockPeriod.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+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.takeStockPeriod.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.takeStockPeriod.service.IBizTakeStockPeriodService;
+import cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot;
+import cn.ezhizao.project.business.taksStockLot.service.IBizTaksStockLotService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 盘点时间Controller
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@RestController
+@RequestMapping("/business/takeStockPeriod")
+public class BizTakeStockPeriodController extends BaseController
+{
+    @Resource
+    private IBizTakeStockPeriodService bizTakeStockPeriodService;
+    @Resource
+    private IBizTaksStockLotService bizTaksStockLotService;
+
+    /**
+     * 查询盘点时间列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(BizTakeStockPeriod bizTakeStockPeriod) throws NoSuchFieldException, IllegalAccessException
+    {
+        startPage();
+        List<BizTakeStockPeriod> list = bizTakeStockPeriodService.getList(bizTakeStockPeriod);
+        return getDataTable(list);
+    }
+    @GetMapping("/getTakeStockPeriod")
+    public AjaxResult getTakeStockPeriod(BizTakeStockPeriod bizTakeStockPeriod)
+    {
+        List<BizTakeStockPeriod> list = bizTakeStockPeriodService.query().eq("status", 1).list();
+        if(!list.isEmpty()) {
+            //判断该批次是否在此次盘点批次内
+            List<BizTaksStockLot> taksStockLotList = bizTaksStockLotService.query().eq("take_stock_period_id", list.get(0).getId()).list();
+            List<BizTaksStockLot> collect = taksStockLotList.stream().filter(item -> item.getDayworkId().equals(bizTakeStockPeriod.getDayworkId())).collect(Collectors.toList());
+            return success(collect);
+        }else {
+            return success(new ArrayList<>());
+        }
+    }
+
+    /**
+     * 导出盘点时间列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:export')")
+    @Log(title = "盘点时间", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizTakeStockPeriod bizTakeStockPeriod) throws NoSuchFieldException, IllegalAccessException
+    {
+        List<BizTakeStockPeriod> list = bizTakeStockPeriodService.getList(bizTakeStockPeriod);
+        ExcelUtil<BizTakeStockPeriod> util = new ExcelUtil<BizTakeStockPeriod>(BizTakeStockPeriod.class);
+        util.exportExcel(response, list, "盘点时间数据");
+    }
+
+    /**
+     * 获取盘点时间详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizTakeStockPeriodService.getById(id));
+    }
+
+    /**
+     * 新增盘点时间
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:add')")
+    @Log(title = "盘点时间", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizTakeStockPeriod bizTakeStockPeriod) throws NoSuchFieldException, IllegalAccessException
+    {
+        return toAjax(bizTakeStockPeriodService.save(bizTakeStockPeriod));
+    }
+
+    /**
+     * 修改盘点时间
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:edit')")
+    @Log(title = "盘点时间", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody BizTakeStockPeriod bizTakeStockPeriod) throws NoSuchFieldException, IllegalAccessException
+    {
+        return toAjax(bizTakeStockPeriodService.updateById(bizTakeStockPeriod));
+    }
+
+    /**
+     * 删除盘点时间
+     */
+    @PreAuthorize("@ss.hasPermi('business:takeStockPeriod:remove')")
+    @Log(title = "盘点时间", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizTakeStockPeriodService.removeBatchByIds(ids));
+    }
+}

+ 48 - 0
src/main/java/cn/ezhizao/project/business/takeStockPeriod/domain/BizTakeStockPeriod.java

@@ -0,0 +1,48 @@
+package cn.ezhizao.project.business.takeStockPeriod.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_take_stock_period
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@Data
+@TableName(value = "biz_take_stock_period")
+public class BizTakeStockPeriod extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 盘点状态(1:开始盘点,2:结束盘点) */
+    @Excel(name = "盘点状态", readConverterExp = "1=:开始盘点,2:结束盘点")
+    @ApiModelProperty(value = "盘点状态")
+    private Integer status;
+
+    /** 盘点开始时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "盘点开始时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "盘点开始时间")
+    private Date startTime;
+
+    /** 盘点结束时间 */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "盘点结束时间", width = 30, dateFormat = "yyyy-MM-dd")
+    @ApiModelProperty(value = "盘点结束时间")
+    private Date endTime;
+    @TableField(exist = false)
+    private Long tenantId;
+    @TableField(exist = false)
+    private Long dayworkId;
+
+}

+ 31 - 0
src/main/java/cn/ezhizao/project/business/takeStockPeriod/mapper/BizTakeStockPeriodMapper.java

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.takeStockPeriod.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.takeStockPeriod.domain.BizTakeStockPeriod;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 盘点时间Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+public interface BizTakeStockPeriodMapper extends BaseMapper<BizTakeStockPeriod>
+{
+    /**
+     * 查询盘点时间列表
+     *
+     * @param bizTakeStockPeriod 盘点时间
+     * @return 盘点时间集合
+     */
+    public List<BizTakeStockPeriod> getList(BizTakeStockPeriod bizTakeStockPeriod);
+
+    /**
+     * 物理删除
+     * @param bizTakeStockPeriod
+     * @return 删除结果
+    */
+    public int physicalDelete(BizTakeStockPeriod bizTakeStockPeriod);
+}

+ 32 - 0
src/main/java/cn/ezhizao/project/business/takeStockPeriod/service/IBizTakeStockPeriodService.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.takeStockPeriod.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.takeStockPeriod.domain.BizTakeStockPeriod;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+
+/**
+ * 盘点时间Service接口
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+public interface IBizTakeStockPeriodService extends IService<BizTakeStockPeriod>
+{
+    /**
+     * 查询盘点时间列表
+     *
+     * @param bizTakeStockPeriod 盘点时间
+     * @return 盘点时间集合
+     */
+    public List<BizTakeStockPeriod> getList(BizTakeStockPeriod bizTakeStockPeriod);
+
+    /**
+     * 物理删除
+     * @param bizTakeStockPeriod
+     * @return 删除结果
+     */
+    public int physicalDelete(BizTakeStockPeriod bizTakeStockPeriod);
+
+}

+ 45 - 0
src/main/java/cn/ezhizao/project/business/takeStockPeriod/service/impl/BizTakeStockPeriodServiceImpl.java

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.takeStockPeriod.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.takeStockPeriod.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.takeStockPeriod.mapper.BizTakeStockPeriodMapper;
+import cn.ezhizao.project.business.takeStockPeriod.service.IBizTakeStockPeriodService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 盘点时间Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@Service
+public class BizTakeStockPeriodServiceImpl  extends ServiceImpl<BizTakeStockPeriodMapper, BizTakeStockPeriod> implements IBizTakeStockPeriodService
+{
+    @Resource
+    private BizTakeStockPeriodMapper bizTakeStockPeriodMapper;
+
+    /**
+     * 查询盘点时间列表
+     *
+     * @param bizTakeStockPeriod 盘点时间
+     * @return 盘点时间
+     */
+    @Override
+    public List<BizTakeStockPeriod> getList(BizTakeStockPeriod bizTakeStockPeriod)
+    {
+        return bizTakeStockPeriodMapper.getList(bizTakeStockPeriod);
+    }
+
+    /**
+     * 物理删除
+     * @param bizTakeStockPeriod
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizTakeStockPeriod bizTakeStockPeriod){ return bizTakeStockPeriodMapper.physicalDelete(bizTakeStockPeriod); };
+
+}

+ 159 - 0
src/main/java/cn/ezhizao/project/business/taksStockLot/controller/BizTaksStockLotController.java

@@ -0,0 +1,159 @@
+package cn.ezhizao.project.business.taksStockLot.controller;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.ezhizao.common.utils.poi.ExcelUtil;
+import cn.ezhizao.framework.aspectj.lang.annotation.Log;
+import cn.ezhizao.framework.aspectj.lang.enums.BusinessType;
+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.product.domain.BizCarrier;
+import cn.ezhizao.project.business.product.domain.BizDayworkCarrier;
+import cn.ezhizao.project.business.product.service.IBizCarrierService;
+import cn.ezhizao.project.business.product.service.IBizDayworkCarrierService;
+import cn.ezhizao.project.business.takeStockPeriod.domain.BizTakeStockPeriod;
+import cn.ezhizao.project.business.takeStockPeriod.service.IBizTakeStockPeriodService;
+import cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot;
+import cn.ezhizao.project.business.taksStockLot.service.IBizTaksStockLotService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+
+/**
+ * 盘点批次信息Controller
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@RestController
+@RequestMapping("/business/taksStockLot")
+public class BizTaksStockLotController extends BaseController
+{
+    @Resource
+    private IBizTaksStockLotService bizTaksStockLotService;
+    @Resource
+    private IBizTakeStockPeriodService bizTakeStockPeriodService;
+    @Resource
+    private IBizCarrierService bizCarrierService;
+    @Resource
+    private IBizDayworkCarrierService bizDayworkCarrierService;
+
+    /**
+     * 查询盘点批次信息列表
+     */
+    @GetMapping("/list")
+    public TableDataInfo list(BizTaksStockLot bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
+    {
+        BizTakeStockPeriod takeStockPeriod = bizTakeStockPeriodService.query().eq("status", 1).one();
+        if(takeStockPeriod == null) {
+            return getDataTable(new ArrayList<>());
+        }
+        bizTaksStockLot.setTakeStockPeriodId(takeStockPeriod.getId());
+        List<BizTaksStockLot> list = bizTaksStockLotService.getList(bizTaksStockLot);
+        return getDataTable(list);
+    }
+    @PostMapping("/getTakesStockByCarrierCode")
+    @Transactional
+    public AjaxResult getTakesStockByCarrierCode(@RequestBody BizTaksStockLot bizTaksStockLot)
+    {
+        BizCarrier bizCarrier = bizCarrierService.query().eq("code", bizTaksStockLot.getCarrierCode()).one();
+        if (bizCarrier == null) {
+            return error("该箱号不存在");
+        }
+        List<BizDayworkCarrier> bizDayworkCarriers = bizDayworkCarrierService.query().eq("process_inspection_id", 0L).eq("carrier_id", bizCarrier.getId()).eq("is_changed", 0).list();
+        if (bizDayworkCarriers.isEmpty()) {
+            return error("该载具未绑定任何批次!");
+        }
+        //查询
+        List<Long> dayworkIds = bizDayworkCarriers.stream().map(BizDayworkCarrier::getDayworkId).collect(Collectors.toList());
+        BizTakeStockPeriod takeStockPeriod = bizTakeStockPeriodService.query().eq("status", 1).one();
+        List<BizTaksStockLot> taksStockLotsList = bizTaksStockLotService.query().eq("take_stock_period_id", takeStockPeriod.getId()).list();
+        List<Long> taksStockDayworkIds = taksStockLotsList.stream().map(BizTaksStockLot::getDayworkId).collect(Collectors.toList());
+        List<Long> needQueryDayworkIds = new ArrayList<>();
+        dayworkIds.forEach(item ->{
+            if(taksStockDayworkIds.contains(item)) {
+                needQueryDayworkIds.add(item);
+            }
+        });
+        if(needQueryDayworkIds.isEmpty()) {
+            return error("该载具绑定的批次未在此次盘点内!");
+        }
+        List<BizTaksStockLot> list = taksStockLotsList.stream()
+                .filter(item -> needQueryDayworkIds.contains(item.getDayworkId()))
+                .collect(Collectors.toList());
+        return success(list);
+    }
+
+    /**
+     * 导出盘点批次信息列表
+     */
+    @PreAuthorize("@ss.hasPermi('business:taksStockLot:export')")
+    @Log(title = "盘点批次信息", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, BizTaksStockLot bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizTaksStockLot);
+        List<BizTaksStockLot> list = bizTaksStockLotService.getList(bizTaksStockLot);
+        ExcelUtil<BizTaksStockLot> util = new ExcelUtil<BizTaksStockLot>(BizTaksStockLot.class);
+        util.exportExcel(response, list, "盘点批次信息数据");
+    }
+
+    /**
+     * 获取盘点批次信息详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:taksStockLot:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id)
+    {
+        return success(bizTaksStockLotService.getById(id));
+    }
+
+    /**
+     * 新增盘点批次信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:taksStockLot:add')")
+    @Log(title = "盘点批次信息", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody BizTaksStockLot bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
+    {
+        setTenantId(bizTaksStockLot);
+        return toAjax(bizTaksStockLotService.save(bizTaksStockLot));
+    }
+
+    /**
+     * 修改盘点批次信息
+     */
+    @Log(title = "盘点批次信息", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody List<BizTaksStockLot> bizTaksStockLot) throws NoSuchFieldException, IllegalAccessException
+    {
+        bizTaksStockLot.forEach(item -> {
+            item.setIsTaksStock(1);
+        });
+        return toAjax(bizTaksStockLotService.updateBatchById(bizTaksStockLot));
+    }
+
+    /**
+     * 删除盘点批次信息
+     */
+    @PreAuthorize("@ss.hasPermi('business:taksStockLot:remove')")
+    @Log(title = "盘点批次信息", businessType = BusinessType.DELETE)
+	@DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable List<Long> ids)
+    {
+        return toAjax(bizTaksStockLotService.removeBatchByIds(ids));
+    }
+}

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

@@ -0,0 +1,121 @@
+package cn.ezhizao.project.business.taksStockLot.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_lot
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@Data
+@TableName(value = "biz_taks_stock_lot")
+public class BizTaksStockLot extends BaseEntity
+{
+    private static final long serialVersionUID = 1L;
+
+    /** 租户(厂别)id */
+    @ApiModelProperty(value = "${comment}")
+    private Long tenantId;
+
+    /** 计划单id */
+    @ApiModelProperty(value = "${comment}")
+    private Long productionPlanId;
+
+    /** 计划单明细id */
+    @ApiModelProperty(value = "${comment}")
+    private Long productionPlanDetailId;
+
+    /** 产品描述 */
+    @Excel(name = "产品描述")
+    @ApiModelProperty(value = "产品描述")
+    private String productDescription;
+
+    /** 子计划id */
+    @ApiModelProperty(value = "产品描述")
+    private Long productionPlanDetailSubDetailId;
+
+    /** daywork_id */
+    @ApiModelProperty(value = "产品描述")
+    private Long dayworkId;
+
+    /** 批次id */
+    @ApiModelProperty(value = "产品描述")
+    private Long lotId;
+
+    /** 批次号 */
+    @Excel(name = "批次号")
+    @ApiModelProperty(value = "批次号")
+    private String lotCode;
+
+    /** 工段id(当前工段的id) */
+    @ApiModelProperty(value = "批次号")
+    private Long deptId;
+
+    /** 产品id */
+    @ApiModelProperty(value = "批次号")
+    private Long productId;
+
+    /** 是否盘点(0:未盘点,1:已盘点) */
+    @Excel(name = "是否盘点(0:未盘点,1:已盘点)")
+    @ApiModelProperty(value = "是否盘点(0:未盘点,1:已盘点)")
+    private Integer isTaksStock;
+
+    /** 盘点数量 */
+    @Excel(name = "盘点数量")
+    @ApiModelProperty(value = "盘点数量")
+    private Long taksStockNum;
+
+    /** 工艺id(通过工艺id,获取版本号) */
+    @ApiModelProperty(value = "盘点数量")
+    private Long technologicalProcessId;
+
+    /** 投产数 */
+    @Excel(name = "投产数")
+    @ApiModelProperty(value = "投产数")
+    private Long prodNum;
+
+    /** 是否尾批(0:默认,1: 是尾批) */
+    @Excel(name = "是否尾批", readConverterExp = "0=:默认,1:,是=尾批")
+    @ApiModelProperty(value = "是否尾批")
+    private Integer isLast;
+
+    /** 是否是废品回用(0:否;1:是) */
+    @Excel(name = "是否是废品回用(0:否;1:是)")
+    @ApiModelProperty(value = "是否是废品回用(0:否;1:是)")
+    private Integer isWasteRecycling;
+
+    /** 是否修改(0 否 ,1 是)单批单改;多批单改;回退 */
+    @Excel(name = "是否修改(0 否 ,1 是)单批单改;多批单改;回退")
+    @ApiModelProperty(value = "是否修改(0 否 ,1 是)单批单改;多批单改;回退")
+    private Integer isAmend;
+
+    /** 工序合格数 */
+    @Excel(name = "工序合格数")
+    @ApiModelProperty(value = "工序合格数")
+    private Long temporaryProcessQualifiedNum;
+
+    /** 批次生产状态(0:未开始,1:进行中,2:已完成) */
+    @Excel(name = "批次生产状态", readConverterExp = "0=:未开始,1:进行中,2:已完成")
+    @ApiModelProperty(value = "批次生产状态")
+    private Integer status;
+
+    /** 是否经过特殊报工(0:否,1:是) */
+    @Excel(name = "是否经过特殊报工", readConverterExp = "0=:否,1:是")
+    @ApiModelProperty(value = "是否经过特殊报工")
+    private Integer hasSpecial;
+    private Long takeStockPeriodId;
+    @TableField(exist = false)
+    private String keywords;
+    @TableField(exist = false)
+    private String carrierNames;
+    @TableField(exist = false)
+    private String carrierCode;
+    private String processAlias;
+
+}

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

@@ -0,0 +1,31 @@
+package cn.ezhizao.project.business.taksStockLot.mapper;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+
+/**
+ * 盘点批次信息Mapper接口
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+public interface BizTaksStockLotMapper extends BaseMapper<BizTaksStockLot>
+{
+    /**
+     * 查询盘点批次信息列表
+     *
+     * @param bizTaksStockLot 盘点批次信息
+     * @return 盘点批次信息集合
+     */
+    public List<BizTaksStockLot> getList(BizTaksStockLot bizTaksStockLot);
+
+    /**
+     * 物理删除
+     * @param bizTaksStockLot
+     * @return 删除结果
+    */
+    public int physicalDelete(BizTaksStockLot bizTaksStockLot);
+}

+ 32 - 0
src/main/java/cn/ezhizao/project/business/taksStockLot/service/IBizTaksStockLotService.java

@@ -0,0 +1,32 @@
+package cn.ezhizao.project.business.taksStockLot.service;
+
+import java.util.List;
+
+import cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+
+/**
+ * 盘点批次信息Service接口
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+public interface IBizTaksStockLotService extends IService<BizTaksStockLot>
+{
+    /**
+     * 查询盘点批次信息列表
+     *
+     * @param bizTaksStockLot 盘点批次信息
+     * @return 盘点批次信息集合
+     */
+    public List<BizTaksStockLot> getList(BizTaksStockLot bizTaksStockLot);
+
+    /**
+     * 物理删除
+     * @param bizTaksStockLot
+     * @return 删除结果
+     */
+    public int physicalDelete(BizTaksStockLot bizTaksStockLot);
+
+}

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

@@ -0,0 +1,45 @@
+package cn.ezhizao.project.business.taksStockLot.service.impl;
+
+import java.util.List;
+import javax.annotation.Resource;
+
+import cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot;
+import cn.ezhizao.project.business.taksStockLot.mapper.BizTaksStockLotMapper;
+import cn.ezhizao.project.business.taksStockLot.service.IBizTaksStockLotService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 盘点批次信息Service业务层处理
+ *
+ * @author ezhizao
+ * @date 2024-08-15
+ */
+@Service
+public class BizTaksStockLotServiceImpl  extends ServiceImpl<BizTaksStockLotMapper, BizTaksStockLot> implements IBizTaksStockLotService
+{
+    @Resource
+    private BizTaksStockLotMapper bizTaksStockLotMapper;
+
+    /**
+     * 查询盘点批次信息列表
+     *
+     * @param bizTaksStockLot 盘点批次信息
+     * @return 盘点批次信息
+     */
+    @Override
+    public List<BizTaksStockLot> getList(BizTaksStockLot bizTaksStockLot)
+    {
+        return bizTaksStockLotMapper.getList(bizTaksStockLot);
+    }
+
+    /**
+     * 物理删除
+     * @param bizTaksStockLot
+     * @return 删除结果
+     */
+    @Override
+    public int physicalDelete(BizTaksStockLot bizTaksStockLot){ return bizTaksStockLotMapper.physicalDelete(bizTaksStockLot); };
+
+}

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

@@ -0,0 +1,32 @@
+<?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.BizInspectionStandards.mapper.BizInspectionStandardsMapper">
+
+    <resultMap type="cn.ezhizao.project.business.BizInspectionStandards.domain.BizInspectionStandards" id="BizInspectionStandardsResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizInspectionStandards" resultMap="BizInspectionStandardsResult">
+        SELECT t1.id,t1.standard FROM biz_inspection_standards t1 left join biz_inspection_standards_check t2 on t1.id = t2.standards_id
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0 and t2.deleted = 0
+            <if test="inspectionCode != null"> AND t2.inspection_code = #{inspectionCode}</if>
+            <if test="standard != null"> AND t1.standard like concat('%',#{standard},'%')</if>
+            <if test="productId != null"> AND t1.product_id = #{productId}</if>
+            <if test="processId != null"> AND t1.process_id = #{processId}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_inspection_standards
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 34 - 0
src/main/resources/mybatis/business/BizInspectionStandardsCheck/BizInspectionStandardsCheckMapper.xml

@@ -0,0 +1,34 @@
+<?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.BizInspectionStandardsCheck.mapper.BizInspectionStandardsCheckMapper">
+
+    <resultMap type="cn.ezhizao.project.business.BizInspectionStandardsCheck.domain.BizInspectionStandardsCheck" id="BizInspectionStandardsCheckResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizInspectionStandardsCheck" resultMap="BizInspectionStandardsCheckResult">
+        SELECT * FROM biz_inspection_standards_check
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="instrument != null  and instrument != ''"> AND instrument = #{instrument}</if>
+            <if test="productVersion != null  and productVersion != ''"> AND product_version = #{productVersion}</if>
+            <if test="processCode != null  and processCode != ''"> AND process_code = #{processCode}</if>
+            <if test="standard != null  and standard != ''"> AND standard = #{standard}</if>
+            <if test="inspectionCode != null  and inspectionCode != ''"> AND inspection_code = #{inspectionCode}</if>
+            <if test="inspectionName != null  and inspectionName != ''"> AND inspection_name like concat('%', #{inspectionName}, '%')</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_inspection_standards_check
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 12 - 1
src/main/resources/mybatis/business/product/BizDayworkMapper.xml

@@ -44,15 +44,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <resultMap id="BizFurnaceNoInfoResult" type="cn.ezhizao.project.business.product.domain.BizFurnaceNoInfo">
         <id column="id" property="id"/>
     </resultMap>
+    <resultMap id="BizDayworkInfoResult" type="cn.ezhizao.project.business.product.domain.BizDaywork">
+        <id column="id" property="id"/>
+        <result column="dept_id" property="deptId"/>
+    </resultMap>
     <select id="getFurnaceNoInfo" resultMap="BizFurnaceNoInfoResult">
         select * from biz_furnace_no_info where deleted = 0 and daywork_id = #{id}
     </select>
     <select id="getDeptProcess" resultType="cn.ezhizao.project.business.deptProcess.domain.BizDeptProcess">
         select * from biz_dept_process where deleted = 0 and process_id = #{id}
     </select>
+    <select id="getProcessStepNumber" resultType="String">
+        select process_step_number from biz_daywork_item where deleted = 0 and daywork_id = #{id} order by create_time desc limit 1
+    </select>
     <select id="getDeptName" resultType="java.lang.String" >
         select dept_name from sys_dept where del_flag = 0 and dept_id = #{deptId}
     </select>
+    <select id="getDayworkInfoById" resultMap="BizDayworkInfoResult">
+        select t1.*,t2.dept_name from biz_daywork t1 left join sys_dept t2 on t1.dept_id = t2.dept_id where deleted = 0 and t1.id = #{id}
+    </select>
+
 
     <select id="getItemList" resultMap="BizDayworkItemResult">
         select * from biz_daywork_item where deleted = 0 and daywork_id = #{id} ORDER BY create_time DESC
@@ -118,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     </delete>
     <select id="getLotInfo" resultMap="BizLotInfo">
-        select t1.*,t2.product_description,t3.production_quantity from biz_daywork t1 left join biz_production_plan_detail t2 on t1.production_plan_detail_id = t2.id left join biz_lot t3 on t1.lot_id = t3.id
+        select t1.*,t2.product_description,t2.drawing_number,t3.production_quantity,t3.technology_version from biz_daywork t1 left join biz_production_plan_detail t2 on t1.production_plan_detail_id = t2.id left join biz_lot t3 on t1.lot_id = t3.id
         where t1.deleted = 0 and t2.deleted = 0 and t3.deleted = 0 and t1.id =#{id}
     </select>
 <!--    周转区查看-->

+ 15 - 14
src/main/resources/mybatis/business/product/BizProcessInspecionMapper.xml

@@ -36,23 +36,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 <!--    AND DATE_FORMAT( start_time, '%Y-%m-%d' ) =${timeString}-->
     <select id="getList" parameterType="BizProcessInspecion" resultMap="BizProcessInspecionResult">
-        SELECT * FROM biz_process_inspecion
+        SELECT t1.*,t2.nick_name as technicianName FROM biz_process_inspecion t1 left join sys_user t2 on t1.reviewer_id = t2.user_id
         <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
-            deleted = 0
-            AND return_receipt_detail_id =0
-            <if test="lotCode != null  and lotCode != ''">AND lot_code = #{lotCode}</if>
-            <if test="userId != null  ">AND user_id = #{userId}</if>
-            <if test="isAuto != null  ">AND is_auto = #{isAuto}</if>
-            <if test="startTimeString != null and startTimeString!=''">AND start_time &gt;= #{startTimeString}</if>
-            <if test="endTimeString != null and endTimeString!='' ">AND start_time &lt;= #{endTimeString}</if>
+            t1.deleted = 0
+            AND t1.return_receipt_detail_id =0
+            <if test="lotCode != null  and lotCode != ''">AND t1.lot_code = #{lotCode}</if>
+            <if test="userId != null  ">AND t1.user_id = #{userId}</if>
+            <if test="deptId != null  ">AND t1.dept_id = #{deptId}</if>
+            <if test="creatorId != null  ">AND t1.creator_id = #{creatorId}</if>
+            <if test="startTimeString != null and startTimeString!=''">AND t1.start_time &gt;= #{startTimeString}</if>
+            <if test="endTimeString != null and endTimeString!='' ">AND t1.start_time &lt;= #{endTimeString}</if>
+            <if test="type != null  ">AND t1.type = #{type}</if>
+            <if test="status != null ">AND t1.status = #{status}</if>
+            <if test="keyword != null  and keyword != '' ">AND (t1.lot_code LIKE CONCAT('%',#{keyword},'%') OR carrier_code LIKE CONCAT('%',#{keyword},'%') OR
+            t1.product_description LIKE CONCAT('%',#{keyword},'%'))
+            <if test="isAuto != null  ">AND t1.is_auto = #{isAuto}</if>
 
-            <if test="status != null ">AND status = #{status}</if>
-            <if test="keyword != null  and keyword != '' ">AND (lot_code LIKE CONCAT('%',#{keyword},'%') OR carrier_code
-                LIKE CONCAT('%',#{keyword},'%') OR
-                product_description LIKE CONCAT('%',#{keyword},'%'))
-            </if>
         </trim>
-        order by ( case when status = 0 then 3 else status end) desc, create_time asc
+        order by ( case when t1.status = 0 then 3 else t1.status end) desc, t1.create_time asc
     </select>
 
     <select id="getOutsourcedlist" parameterType="BizProcessInspecion" resultMap="BizProcessInspecionResult">

+ 31 - 0
src/main/resources/mybatis/business/takeStockPeriod/BizTakeStockPeriodMapper.xml

@@ -0,0 +1,31 @@
+<?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.takeStockPeriod.mapper.BizTakeStockPeriodMapper">
+
+    <resultMap type="cn.ezhizao.project.business.takeStockPeriod.domain.BizTakeStockPeriod" id="BizTakeStockPeriodResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizTakeStockPeriod" resultMap="BizTakeStockPeriodResult">
+        SELECT * FROM biz_take_stock_period
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            deleted = 0
+            <if test="status != null "> AND status = #{status}</if>
+            <if test="startTime != null "> AND start_time = #{startTime}</if>
+            <if test="endTime != null "> AND end_time = #{endTime}</if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_take_stock_period
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>

+ 44 - 0
src/main/resources/mybatis/business/taksStockLot/BizTaksStockLotMapper.xml

@@ -0,0 +1,44 @@
+<?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.taksStockLot.mapper.BizTaksStockLotMapper">
+
+    <resultMap type="cn.ezhizao.project.business.taksStockLot.domain.BizTaksStockLot" id="BizTaksStockLotResult">
+        <id column="id" property="id"/>
+    </resultMap>
+
+
+    <select id="getList" parameterType="BizTaksStockLot" resultMap="BizTaksStockLotResult">
+        SELECT distinct t1.*
+<!--        , (-->
+<!--        SELECT-->
+<!--        GROUP_CONCAT(t2.carrier_code ORDER BY t2.carrier_code SEPARATOR ',')-->
+<!--        FROM biz_daywork_carrier t2-->
+<!--        WHERE t2.daywork_id = t1.daywork_id-->
+<!--        AND t2.is_changed=0-->
+<!--        and t2.process_inspection_id = 0-->
+<!--        AND t2.deleted = 0-->
+<!--        ) AS carrierNames -->
+        from biz_taks_stock_lot t1
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            t1.deleted = 0 and t1.dept_id = #{deptId} and t1.take_stock_period_id = #{takeStockPeriodId} and t1.daywork_id != 0
+            <if test="keywords != null  and keywords != ''"> AND (t1.lot_code LIKE CONCAT('%',#{keywords},'%')
+<!--                OR-->
+<!--                t1.daywork_id in (select daywork_id from-->
+<!--                biz_daywork_carrier where deleted = 0 AND is_changed=0 and carrier_code LIKE CONCAT('%',-->
+<!--                #{keywords}, '%')))-->
+            </if>
+        </trim>
+    </select>
+
+    <delete id="physicalDelete">
+        DELETE FROM biz_taks_stock_lot
+        <trim prefix=" WHERE" suffix="" suffixOverrides="AND">
+            <if test="id != null">
+                id = #{id} AND
+            </if>
+       <!-- 删除条件为其他外键可以在这里加 -->
+        </trim>
+    </delete>
+</mapper>