From 25e47300d32d8781d96340e6663596ce270cafd3 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期一, 17 十一月 2025 12:29:08 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java | 76 ++++++++++++++++++++++++++++++++++++--
1 files changed, 72 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
index 6fcaf19..d4a5055 100644
--- a/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -160,6 +160,74 @@
}
@Override
+ public R agv2fPack(Map<String, Object> map) {
+ String orgSite = map.get("orgSite").toString();
+ String tarSite = map.get("tarSite").toString();
+ if (Cools.isEmpty(orgSite) || Cools.isEmpty(tarSite)) {
+ return R.error("鏁版嵁涓虹┖");
+ }
+ if (orgSite.charAt(0) != 'd'){
+ throw new CoolException("绔欑偣寮傚父锛屽彧鍏佽d寮�澶寸珯鐐�");
+ }
+// 鍛煎彨agv
+ boolean success = sendAgvTask2(orgSite, tarSite,"GT5");
+ if (!success){
+ throw new CoolException("鍛煎彨agv澶辫触");
+ }
+
+ return R.ok();
+ }
+
+ @Override
+ public List<ManLocDetl> pingKuGetList(PKInventoryAdjustment combParam) {
+ Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", combParam.getLocno()).eq("type", 3));
+ if (Cools.isEmpty(node)){
+ throw new CoolException("鏈壘鍒板钩搴撳簱浣嶄俊鎭�");
+ }
+ EntityWrapper<ManLocDetl> manLocDetlEntityWrapper = new EntityWrapper<>();
+ manLocDetlEntityWrapper.eq("loc_no", node.getName());
+ manLocDetlEntityWrapper.eq(!Cools.isEmpty(combParam.getMatnr()),"matnr", combParam.getMatnr());
+ List<ManLocDetl> manLocDetls = manLocDetlService.selectList(manLocDetlEntityWrapper);
+ if (Cools.isEmpty(manLocDetls)){
+ throw new CoolException("鏈壘鍒板簱瀛樹俊鎭�");
+ }
+ return manLocDetls;
+ }
+
+ @Override
+ @Transactional(rollbackFor = Exception.class)
+ public void pingKuInventoryAdjustment(PKInventoryAdjustment combParam) {
+ Node node = nodeService.selectOne(new EntityWrapper<Node>().eq("name", combParam.getLocno()).eq("type", 3));
+ if (Cools.isEmpty(node)){
+ throw new CoolException("鏈壘鍒板钩搴撳簱浣嶄俊鎭�");
+ }
+ for (ManLocDetl manLocDetl :combParam.getManLocDetls()){
+ EntityWrapper<ManLocDetl> manLocDetlEntityWrapper = new EntityWrapper<>();
+ manLocDetlEntityWrapper.eq("loc_no", manLocDetl.getLocNo());
+ manLocDetlEntityWrapper.eq("matnr", manLocDetl.getMatnr());
+ manLocDetlEntityWrapper.eq("batch", manLocDetl.getBatch());
+ List<ManLocDetl> manLocDetls = manLocDetlService.selectList(manLocDetlEntityWrapper);
+ if (Cools.isEmpty(manLocDetls) || manLocDetls.size() > 1){
+ throw new CoolException("鏁版嵁閿欒");
+ }
+
+ ManLocDetl manLocDetl1 = manLocDetls.get(0);
+ BigDecimal adjustBigDecimal = new BigDecimal(manLocDetl.getAnfme().toString());
+ BigDecimal orgBigDecimal = new BigDecimal(manLocDetl1.getAnfme().toString());
+ if (orgBigDecimal.compareTo(adjustBigDecimal) == 0){
+ continue;
+ }
+ manLocDetl1.setAnfme(adjustBigDecimal.doubleValue());
+ if (!manLocDetlService.update(manLocDetl1,manLocDetlEntityWrapper)){
+ throw new CoolException("鏇存柊鏁版嵁澶辫触");
+ }
+
+
+
+ }
+ }
+
+ @Override
public R inLocCallAgv(String sta, String inSta) {
BasDevp basDevp = basDevpMapper.selectById(inSta);
@@ -280,7 +348,7 @@
.build()
.doPost();
JSONObject res = JSON.parseObject(response);
- message = jsonObject.getString("message");
+ message = res.getString("message");
if (res.getInteger("code").equals(0)) {
success = true;
} else {
@@ -410,8 +478,8 @@
}
return success;
}
-
- private boolean bindPodAndBerth(String sta) {
+ @Override
+ public boolean bindPodAndBerth(String sta) {
String staMap = AgvSiteConstant.SiteMap.get(sta);
if (staMap == null) {
log.error("娌℃湁鎵惧埌璇ョ珯鐐圭殑鍏ュ簱鏄犲皠:{}",sta);
@@ -419,7 +487,7 @@
}
JSONObject jsonObject = new JSONObject();
jsonObject.put("reqCode",UUID.randomUUID().toString().replace("-", "")); // 璇锋眰鍞竴鍊�
- jsonObject.put("ctnrTyp","2"); // 瀹瑰櫒绫诲瀷2
+ jsonObject.put("ctnrTyp","3"); // 瀹瑰櫒绫诲瀷2
jsonObject.put("stgBinCode",staMap); // 浠撲綅缂栧彿锛屾牴鎹浠撶紪鍙疯浆鎹�
jsonObject.put("indBind","1"); // 1缁戝畾锛�0瑙g粦
--
Gitblit v1.9.1