From 4665167843394f4586db8198d5d1c5852ede3bf7 Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期三, 19 七月 2023 10:27:44 +0800
Subject: [PATCH] agv 入库接口调整
---
src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java | 38 +++++++++++++++++++++-----------------
1 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
index 8dd6f85..60f20e7 100644
--- a/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/AgvMobileServiceImpl.java
@@ -1,34 +1,22 @@
package com.zy.asrs.service.impl;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.BaseRes;
import com.core.common.Cools;
-import com.core.common.DateUtils;
-import com.core.common.SnowflakeIdWorker;
import com.core.exception.CoolException;
import com.zy.asrs.entity.*;
import com.zy.asrs.entity.param.CombParam;
import com.zy.asrs.entity.param.MobileAdjustParam;
-import com.zy.asrs.entity.param.OpenOrderPakinParam;
import com.zy.asrs.service.*;
-import com.zy.asrs.task.core.ReturnT;
-import com.zy.asrs.task.handler.WorkLogHandler;
-import com.zy.asrs.utils.MatUtils;
-import com.zy.common.constant.MesConstant;
-import com.zy.common.entity.Parameter;
import com.zy.common.model.DetlDto;
-import com.zy.common.model.MesCombParam;
-import com.zy.common.utils.HttpHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.StringUtils;
import java.util.ArrayList;
import java.util.Date;
-import java.util.Iterator;
import java.util.List;
/**
@@ -53,7 +41,7 @@
@Override
@Transactional
- public void comb(CombParam param, Long userId) {
+ public String comb(CombParam param, Long userId) {
if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
throw new CoolException(BaseRes.PARAM);
}
@@ -84,8 +72,9 @@
throw new CoolException(detlDto.getMatnr() + "鍟嗗搧妗f涓嶅瓨鍦�");
}
AgvWaitPakin waitPakin = new AgvWaitPakin();
+ waitPakin.setBatch(detlDto.getBatch());//鎵瑰彿
+
waitPakin.sync(mat);
- waitPakin.setBatch(detlDto.getBatch());
waitPakin.setZpallet(param.getBarcode()); // 鎵樼洏鐮�
waitPakin.setIoStatus("N"); // 鍏ュ嚭鐘舵��
waitPakin.setAnfme(detlDto.getAnfme()); // 鏁伴噺
@@ -99,6 +88,7 @@
}
});
}else {
+ //鍏宠仈缁勬墭
Order order = orderService.selectByNo(param.getOrderNo());
if (order.getSettle() > 2) {
throw new CoolException("鍗曟嵁缂栧彿宸茶繃鏈�");
@@ -150,7 +140,12 @@
orderService.updateSettle(order.getId(), 2L, userId);
}
- //鍏宠仈缁勬墭
+ if(StringUtils.isEmpty(param.getLocno())){
+ return "缁勬墭鎴愬姛";
+ }else {
+ combBinding(param.getBarcode(),param.getLocno());
+ return "缁勬墭鎴愬姛锛岀粦瀹氱珯鐐规垚鍔�";
+ }
}
@@ -171,8 +166,11 @@
EntityWrapper<AgvBasDevp> wrapper = new EntityWrapper<>();
wrapper.eq("dev_no",stationCode);
AgvBasDevp agvBasDevp = agvBasDevpService.selectOne(wrapper);
+ if(agvBasDevp == null){
+ throw new CoolException(stationCode + "绔欑偣淇℃伅閿欒");
+ }
if(!"O".equals(agvBasDevp.getLocSts())){
- throw new CoolException(barcode + "璇ョ珯鐐归潪绌�");
+ throw new CoolException(stationCode + "璇ョ珯鐐硅揣浣嶇姸鎬侀潪绌�");
}
agvBasDevp.setBarcode(barcode);
@@ -180,4 +178,10 @@
agvBasDevpService.update(agvBasDevp,wrapper);
}
+ public List<AgvBasDevp> getAgvBasDevpByFloor(int floor) {
+ EntityWrapper<AgvBasDevp> wrapper = new EntityWrapper<>();
+ wrapper.eq("floor",floor).eq("cache_shelves","Y").eq("loc_sts","F");
+ return agvBasDevpService.selectList(wrapper);
+ }
+
}
--
Gitblit v1.9.1