Przeglądaj źródła

金川镍盐蝌蚪文后端需求

ChenYang 1 rok temu
rodzic
commit
76b0e0289a
22 zmienionych plików z 469 dodań i 13 usunięć
  1. 35 0
      doc/金川镍盐蝌蚪文.sql
  2. 1 3
      ruoyi-admin/src/main/java/com/ruoyi/nieyan/controller/pda/PdaAgvCallController.java
  3. 74 0
      ruoyi-admin/src/main/java/com/ruoyi/nieyan/controller/pda/PdaDocQcController.java
  4. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask.java
  5. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask01.java
  6. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask02.java
  7. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask03.java
  8. 1 2
      warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoPhotoelectricTask.java
  9. 8 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dao/LotInfoFctAgvDao.java
  10. 8 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dao/QcInfoFctAgvDao.java
  11. 22 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dto/LotInfoFctAgvDTO.java
  12. 22 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dto/QcInfoFctAgvDTO.java
  13. 46 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/LotInfoFctAgvEntity.java
  14. 34 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/QcInfoFctAgvEntity.java
  15. 23 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/base/BaseBMSEntity.java
  16. 26 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/ILotInfoFctAgvService.java
  17. 26 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/IQcInfoFctAgvService.java
  18. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/AgvCallProxyService.java
  19. 1 1
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/BaseLocationInfoSubService.java
  20. 67 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/impl/LotInfoFctAgvService.java
  21. 68 0
      warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/impl/QcInfoFctAgvService.java
  22. 2 2
      warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java

+ 35 - 0
doc/金川镍盐蝌蚪文.sql

@@ -0,0 +1,35 @@
+
+## 蝌蚪文需求建表语句
+    CREATE TABLE `fct_agv1` (
+        `ID` varchar(50) NOT NULL COMMENT 'ID',
+        `SLOT` varchar(50) NOT NULL COMMENT '生产批号',
+        `SPLT` varchar(50) NOT NULL COMMENT '产品托盘号',
+        `SPROD` varchar(50) NOT NULL COMMENT '产品',
+        `SSHIFT` varchar(50) NOT NULL COMMENT '班组',
+        `CREATEDATE` date NOT NULL COMMENT '创建时间',
+        `CREATEBY` varchar(50) NOT NULL COMMENT '创建人',
+        `STATUS` varchar(10) NOT NULL COMMENT '状态 0-未处理 1-AGV处理 2-人工处理',
+        PRIMARY KEY (`ID`)
+    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='批号相关信息表(BMS系统直连)';
+
+
+    CREATE TABLE `fct_agv2` (
+        `ID` varchar(50) NOT NULL COMMENT 'ID',
+        `SLOT` varchar(50) NOT NULL COMMENT '生产批号',
+        `ISQCL` varchar(10) NOT NULL COMMENT '是否质检(Y:已质检  N:未质检)',
+        `DSQCDATE` date NOT NULL COMMENT '质检时间',
+        `PROCESSFLAG` varchar(10) NOT NULL COMMENT '是否已处理(Y:已处理  N:未处理)由AGV更新',
+        `CREATEDATE` date NOT NULL COMMENT '创建时间',
+        `CREATEBY` varchar(50) NOT NULL COMMENT '创建人',
+        `STATUS` varchar(10) NOT NULL COMMENT '状态 0-未处理 1-AGV处理 2-人工处理',
+        PRIMARY KEY (`ID`)
+    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='质检相关信息(BMS系统直连)';
+
+
+
+## 给蝌蚪文系统账号赋权限
+CREATE USER `KDW`@`%` IDENTIFIED WITH mysql_native_password;
+GRANT Delete, Insert, Select, Update ON TABLE `warewms-jnmc-jinco`.`fct_agv1` TO `KDW`@`%`;
+GRANT Delete, Insert, Select, Update ON TABLE `warewms-jnmc-jinco`.`fct_agv2` TO `KDW`@`%`;
+ALTER USER `KDW`@`%` IDENTIFIED WITH mysql_native_password BY 'kdwadmin';
+FLUSH PRIVILEGES;

+ 1 - 3
ruoyi-admin/src/main/java/com/ruoyi/nieyan/controller/pda/PdaAgvCallController.java

@@ -4,11 +4,9 @@ import com.ruoyi.ams.config.domain.dto.AgvCallItemDTO;
 import com.ruoyi.ams.inv.domain.form.InvLotLocIdMoveForm;
 import com.ruoyi.ams.inv.service.IInvLotLocIdService;
 import com.ruoyi.ams.nieyan.domain.form.AgvCallForm;
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.base.constant.Constant;
-import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.StringUtils;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;

+ 74 - 0
ruoyi-admin/src/main/java/com/ruoyi/nieyan/controller/pda/PdaDocQcController.java

@@ -1,12 +1,20 @@
 package com.ruoyi.nieyan.controller.pda;
 
+import cn.hutool.core.lang.Assert;
+import com.ruoyi.ams.nieyan.dto.LotInfoFctAgvDTO;
+import com.ruoyi.ams.nieyan.entity.QcInfoFctAgvEntity;
+import com.ruoyi.ams.nieyan.service.ILotInfoFctAgvService;
+import com.ruoyi.ams.nieyan.service.IQcInfoFctAgvService;
 import com.ruoyi.ams.qc.domain.vo.DocQcListVo;
 import com.ruoyi.ams.qc.service.IDocQcDetailsService;
 import com.ruoyi.ams.qc.service.IDocQcHeaderService;
+import com.ruoyi.base.constant.Constant;
 import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.constant.Constants;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.StringUtils;
+import org.apache.http.util.Asserts;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
@@ -29,6 +37,12 @@ public class PdaDocQcController {
     @Autowired
     private IDocQcDetailsService iDocQcDetailsService;
 
+    @Autowired
+    private ILotInfoFctAgvService iLotInfoFctAgvService;
+
+    @Autowired
+    private IQcInfoFctAgvService  iQcInfoFctAgvService;
+
 
     /**
      * 获取质检列表(根据sku)
@@ -95,4 +109,64 @@ public class PdaDocQcController {
         return iDocQcDetailsService.qcSubmit(qcNo, qcLineNo, qualityStatus
                 , description, updateBy);
     }
+
+
+    /**
+     * 对接BMS获取批次列表
+     * @param lotNo 批次号
+     * @param spltNo 托盘号
+     * @return
+     */
+    @GetMapping("/getLotInfoList")
+    public AjaxResult getLotInfoList(@RequestParam(required = false) String lotNo, @RequestParam(required = false) String spltNo) {
+        Assert.isTrue(StringUtils.isNotBlank(lotNo) || StringUtils.isNotBlank(spltNo), "lotNo or spltNo is null");
+        List<LotInfoFctAgvDTO>  lotInfoList = iLotInfoFctAgvService.getLotInfoList(lotNo, spltNo);
+        return AjaxResult.success("success", lotInfoList);
+    }
+
+    /**
+     * 对接BMS获取质检列表
+     * @param lotNo 批次号
+     * @return
+     */
+    @GetMapping("/getQcInfoList")
+    public AjaxResult getQcInfoList(@RequestParam(required = false) String lotNo) {
+        Assert.isTrue(StringUtils.isNotBlank(lotNo), "lotNo is null");
+        List<QcInfoFctAgvEntity> qcInfoList = iQcInfoFctAgvService.getQcInfoList(lotNo);
+        return AjaxResult.success("success", qcInfoList);
+    }
+
+
+    /**
+     * 更新批次信息的状态
+     * @param id 业务id
+     * @param status 批次状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    @PostMapping("/updateLotInfoStatus")
+    public AjaxResult updateLotInfoStatus(@RequestParam("id") String id, @RequestParam("status") String status) {
+        Assert.isTrue(StringUtils.isNotBlank(id) && StringUtils.isNotBlank(status), "id or status is null");
+        return AjaxResult.success("success", iLotInfoFctAgvService.updateLotInfoStatus(id, status));
+    }
+
+    /**
+     * 更新质检的信息
+     * @param id 业务id
+     * @param status 质检状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    @PostMapping("/updateQcInfoStatus")
+    public AjaxResult updateQcInfoStatus(@RequestParam("id") String id, @RequestParam("status") String status) {
+        Assert.isTrue(StringUtils.isNotBlank(id) && StringUtils.isNotBlank(status), "id or status is null");
+        return AjaxResult.success("success", iQcInfoFctAgvService.updateQcInfoStatus(id, status));
+    }
+
+    //TODO agv搬货完成之后要反馈给wms 这一块逻辑怎么交互
+
+
+
+
+
+
+
 }

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask.java

@@ -1,6 +1,6 @@
 package com.ruoyi.ams.agv.ndc.thread;
 
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask01.java

@@ -1,6 +1,6 @@
 package com.ruoyi.ams.agv.ndc.thread;
 
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask02.java

@@ -1,6 +1,6 @@
 package com.ruoyi.ams.agv.ndc.thread;
 
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoButtonBoxTask03.java

@@ -1,6 +1,6 @@
 package com.ruoyi.ams.agv.ndc.thread;
 
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
 import lombok.extern.slf4j.Slf4j;

+ 1 - 2
warewms-ams/src/main/java/com/ruoyi/ams/agv/ndc/thread/AutoPhotoelectricTask.java

@@ -1,8 +1,7 @@
 package com.ruoyi.ams.agv.ndc.thread;
 
-import com.ruoyi.ams.nieyan.service.AgvCallProxyService;
+import com.ruoyi.ams.nieyan.service.impl.AgvCallProxyService;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.hard.modbus.tcp.ButtonBoxClient;
 import com.ruoyi.hard.modbus.tcp.ModbusTcpWeigherClient;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;

+ 8 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dao/LotInfoFctAgvDao.java

@@ -0,0 +1,8 @@
+package com.ruoyi.ams.nieyan.dao;
+
+import com.ruoyi.ams.nieyan.entity.LotInfoFctAgvEntity;
+import com.ruoyi.framework.dao.BaseDao;
+
+public interface LotInfoFctAgvDao extends BaseDao<LotInfoFctAgvEntity> {
+
+}

+ 8 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dao/QcInfoFctAgvDao.java

@@ -0,0 +1,8 @@
+package com.ruoyi.ams.nieyan.dao;
+
+import com.ruoyi.ams.nieyan.entity.QcInfoFctAgvEntity;
+import com.ruoyi.framework.dao.BaseDao;
+
+public interface QcInfoFctAgvDao extends BaseDao<QcInfoFctAgvEntity> {
+
+}

+ 22 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dto/LotInfoFctAgvDTO.java

@@ -0,0 +1,22 @@
+package com.ruoyi.ams.nieyan.dto;
+
+import lombok.Data;
+
+@Data
+public class LotInfoFctAgvDTO {
+
+    private String id;
+
+    private String slot;
+
+    private String splt;
+
+    private String sprod;
+
+    private String sshift;
+
+    private String createBy;
+
+    private String createDate;
+
+}

+ 22 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/dto/QcInfoFctAgvDTO.java

@@ -0,0 +1,22 @@
+package com.ruoyi.ams.nieyan.dto;
+
+import com.ruoyi.ams.nieyan.entity.base.BaseBMSEntity;
+import lombok.Data;
+
+@Data
+public class QcInfoFctAgvDTO {
+
+    private String id;
+
+    private String slot;
+
+    private String isQcl;
+
+    private String dsqcDate;
+
+    private String processFlag;
+
+    private String createBy;
+
+    private String createDate;
+}

+ 46 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/LotInfoFctAgvEntity.java

@@ -0,0 +1,46 @@
+package com.ruoyi.ams.nieyan.entity;
+
+import cn.hutool.core.lang.Chain;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.ams.nieyan.entity.base.BaseBMSEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@EqualsAndHashCode(callSuper = true)
+@TableName("fct_agv1")
+@Data
+@Accessors(chain = true)
+public class LotInfoFctAgvEntity extends BaseBMSEntity {
+
+    private static final long serialVersionUID = -1339303881910524787L;
+    @TableId
+    private String id;
+
+    /**
+     * 生产批号
+     */
+    @TableField("SLOT")
+    private String slot;
+
+    /**
+     * 产品托盘号
+     */
+    @TableField("SPLT")
+    private String splt;
+
+    /**
+     * 产品
+     */
+    @TableField("SPROD")
+    private String sprod;
+
+    /**
+     * 班组
+     */
+    @TableField("SSHIFT")
+    private String sshift;
+
+}

+ 34 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/QcInfoFctAgvEntity.java

@@ -0,0 +1,34 @@
+package com.ruoyi.ams.nieyan.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.ruoyi.ams.nieyan.entity.base.BaseBMSEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+
+@EqualsAndHashCode(callSuper = true)
+@TableName("fct_agv2")
+@Data
+@Accessors(chain = true)
+public class QcInfoFctAgvEntity extends BaseBMSEntity {
+
+    private static final long serialVersionUID = 6286594817558491544L;
+
+    @TableId
+    private String id;
+
+    @TableField("SLOT")
+    private String slot;
+
+    @TableField("ISQCL")
+    private String isQcl;
+
+    @TableField("DSQCDATE")
+    private String dsqcDate;
+
+    @TableField("PROCESSFLAG")
+    private String processFlag;
+
+}

+ 23 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/entity/base/BaseBMSEntity.java

@@ -0,0 +1,23 @@
+package com.ruoyi.ams.nieyan.entity.base;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import lombok.Data;
+
+import java.io.Serializable;
+
+@Data
+public class BaseBMSEntity implements Serializable {
+
+    private static final long serialVersionUID = 1965773431626512523L;
+    /**
+     * 状态
+     */
+    @TableField("STATUS")
+    private String status;
+
+    @TableField("CREATEBY")
+    private String createBy;
+
+    @TableField("CREATEDATE")
+    private String createDate;
+}

+ 26 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/ILotInfoFctAgvService.java

@@ -0,0 +1,26 @@
+package com.ruoyi.ams.nieyan.service;
+
+import com.ruoyi.ams.nieyan.dto.LotInfoFctAgvDTO;
+import com.ruoyi.ams.nieyan.entity.LotInfoFctAgvEntity;
+import com.ruoyi.framework.service.CrudService;
+
+import java.util.List;
+
+public interface ILotInfoFctAgvService extends CrudService<LotInfoFctAgvEntity, LotInfoFctAgvDTO> {
+
+    /**
+     * 根据批次号托盘号获取批次信息列表
+     * @param lotNo 批次号
+     * @param spltNo 托盘号
+     * @return
+     */
+    List<LotInfoFctAgvDTO> getLotInfoList(String lotNo, String spltNo);
+
+    /**
+     * 更新批次号的状态
+     * @param id 业务id
+     * @param status 批次号状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    Boolean updateLotInfoStatus(String id, String status);
+}

+ 26 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/IQcInfoFctAgvService.java

@@ -0,0 +1,26 @@
+package com.ruoyi.ams.nieyan.service;
+
+import com.ruoyi.ams.nieyan.dto.QcInfoFctAgvDTO;
+import com.ruoyi.ams.nieyan.entity.QcInfoFctAgvEntity;
+import com.ruoyi.framework.service.CrudService;
+
+import java.util.List;
+
+public interface IQcInfoFctAgvService extends CrudService<QcInfoFctAgvEntity, QcInfoFctAgvDTO> {
+
+
+    /**
+     * 根据批号获取质检信息列表
+     * @param lotNo 批次号
+     * @return
+     */
+    List<QcInfoFctAgvEntity> getQcInfoList(String lotNo);
+
+    /**
+     * 更新质检信息的状态
+     * @param id 信息的id
+     * @param status 信息的状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    Boolean updateQcInfoStatus(String id, String status);
+}

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/AgvCallProxyService.java

@@ -1,4 +1,4 @@
-package com.ruoyi.ams.nieyan.service;
+package com.ruoyi.ams.nieyan.service.impl;
 
 import com.ruoyi.ams.business.IBusinessService;
 import com.ruoyi.ams.config.domain.dto.AgvCallDTO;

+ 1 - 1
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/BaseLocationInfoSubService.java

@@ -1,4 +1,4 @@
-package com.ruoyi.ams.nieyan.service;
+package com.ruoyi.ams.nieyan.service.impl;
 
 import com.alibaba.fastjson.JSON;
 import com.ruoyi.ams.config.domain.dto.LotattDTO;

+ 67 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/impl/LotInfoFctAgvService.java

@@ -0,0 +1,67 @@
+package com.ruoyi.ams.nieyan.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.ams.nieyan.dao.LotInfoFctAgvDao;
+import com.ruoyi.ams.nieyan.dto.LotInfoFctAgvDTO;
+import com.ruoyi.ams.nieyan.entity.LotInfoFctAgvEntity;
+import com.ruoyi.ams.nieyan.service.ILotInfoFctAgvService;
+import com.ruoyi.common.utils.ConvertUtils;
+import com.ruoyi.framework.service.impl.CrudServiceImpl;
+import org.apache.commons.collections4.SetUtils;
+import org.apache.commons.compress.utils.Lists;
+import org.apache.commons.compress.utils.Sets;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class LotInfoFctAgvService extends CrudServiceImpl<LotInfoFctAgvDao, LotInfoFctAgvEntity, LotInfoFctAgvDTO> implements ILotInfoFctAgvService  {
+
+
+
+
+    /**
+     * 根据批次号托盘号获取批次信息列表
+     * @param lotNo 批次号
+     * @param spltNo 托盘号
+     * @return
+     */
+    @Override
+    public List<LotInfoFctAgvDTO> getLotInfoList(String lotNo, String spltNo) {
+        Wrapper<LotInfoFctAgvEntity> lambdaQueryWrapper = Wrappers.<LotInfoFctAgvEntity>lambdaQuery()
+                .eq(StringUtils.isNotBlank(lotNo), LotInfoFctAgvEntity::getSlot, lotNo)
+                .eq(StringUtils.isNotBlank(spltNo), LotInfoFctAgvEntity::getSplt, spltNo);
+        List<LotInfoFctAgvEntity> lotInfoFctAgvEntities = baseDao.selectList(lambdaQueryWrapper);
+        return CollectionUtils.isEmpty(lotInfoFctAgvEntities)
+                ? Lists.newArrayList() : ConvertUtils.sourceToTarget(lotInfoFctAgvEntities, LotInfoFctAgvDTO.class);
+    }
+
+    /**
+     * 更新批次号的状态
+     * @param id 业务id
+     * @param status 批次号状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    @Override
+    public Boolean updateLotInfoStatus(String id, String status) {
+        LotInfoFctAgvEntity lotInfoFctAgvEntity = new LotInfoFctAgvEntity();
+        lotInfoFctAgvEntity.setId(id).setStatus(status);
+        return baseDao.updateById(lotInfoFctAgvEntity) == 1;
+    }
+
+    @Override
+    public QueryWrapper<LotInfoFctAgvEntity> getWrapper(Map<String, Object> params) {
+        QueryWrapper<LotInfoFctAgvEntity> queryWrapper = new QueryWrapper();
+        queryWrapper.lambda().eq(StringUtils.isBlank((String)params.get("slot")), LotInfoFctAgvEntity::getSlot, params.get("slot"))
+                .eq(StringUtils.isBlank((String)params.get("splt")), LotInfoFctAgvEntity::getSplt, params.get("splt"));
+        return queryWrapper;
+    }
+
+
+}

+ 68 - 0
warewms-ams/src/main/java/com/ruoyi/ams/nieyan/service/impl/QcInfoFctAgvService.java

@@ -0,0 +1,68 @@
+package com.ruoyi.ams.nieyan.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.ams.nieyan.dao.QcInfoFctAgvDao;
+import com.ruoyi.ams.nieyan.dto.QcInfoFctAgvDTO;
+import com.ruoyi.ams.nieyan.entity.QcInfoFctAgvEntity;
+import com.ruoyi.ams.nieyan.service.IQcInfoFctAgvService;
+import com.ruoyi.common.constant.Constants;
+import com.ruoyi.common.utils.ConvertUtils;
+import com.ruoyi.framework.service.impl.CrudServiceImpl;
+import org.apache.commons.compress.utils.Lists;
+import org.apache.commons.compress.utils.Sets;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+@Service
+public class QcInfoFctAgvService extends CrudServiceImpl<QcInfoFctAgvDao, QcInfoFctAgvEntity, QcInfoFctAgvDTO> implements IQcInfoFctAgvService {
+
+
+    private static final String AVG_PROCESS = "1";
+
+    private static final String PERSON_PROCESS = "2";
+
+    /**
+     * 根据批号获取质检信息列表
+     * @param lotNo 批次号
+     * @return
+     */
+    @Override
+    public List<QcInfoFctAgvEntity> getQcInfoList(String lotNo) {
+        LambdaQueryWrapper<QcInfoFctAgvEntity> queryWrapper = Wrappers.<QcInfoFctAgvEntity>lambdaQuery()
+                .eq(StringUtils.isNotBlank(lotNo), QcInfoFctAgvEntity::getSlot, lotNo);
+        List<QcInfoFctAgvEntity> qcInfoFctAgvEntities = baseDao.selectList(queryWrapper);
+        return CollectionUtils.isEmpty(qcInfoFctAgvEntities) ?
+                Lists.newArrayList() : ConvertUtils.sourceToTarget(qcInfoFctAgvEntities, QcInfoFctAgvEntity.class);
+    }
+
+    /**
+     * 更新质检信息的状态
+     * @param id 质检信息的id
+     * @param status 信息的状态 0-未处理 1-AGV处理 2-人工处理
+     * @return
+     */
+    @Override
+    public Boolean updateQcInfoStatus(String id, String status) {
+        QcInfoFctAgvEntity qcInfoFctAgvEntity = new QcInfoFctAgvEntity();
+        String processFlag = Sets.newHashSet(AVG_PROCESS, PERSON_PROCESS).add(status)
+                ? Constants.NO : Constants.YES;
+        qcInfoFctAgvEntity.setId(id).setProcessFlag(processFlag).setStatus(status);
+        baseDao.updateById(qcInfoFctAgvEntity);
+        return baseDao.updateById(qcInfoFctAgvEntity) == 1;
+    }
+
+
+    @Override
+    public QueryWrapper<QcInfoFctAgvEntity> getWrapper(Map<String, Object> params) {
+        QueryWrapper<QcInfoFctAgvEntity> queryWrapper = new QueryWrapper<>();
+        queryWrapper.lambda().eq(StringUtils.isBlank((String) params.get("lotNo")), QcInfoFctAgvEntity::getSlot, params.get("lotNo"));
+        return queryWrapper;
+    }
+
+}

+ 2 - 2
warewms-base/src/main/java/com/ruoyi/base/domain/BaseLocationInfo.java

@@ -1,9 +1,9 @@
 package com.ruoyi.base.domain;
 
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
 
 /**
  * 库位信息对象 base_location_info