|
@@ -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 这一块逻辑怎么交互
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
}
|