From 67d48a7ccdd121272db3680eac1f36f4d7ba519c Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 13 十月 2025 15:41:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/MobileController.java | 197 +++++++++++++++++++++++++------------------------
1 files changed, 101 insertions(+), 96 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MobileController.java b/src/main/java/com/zy/asrs/controller/MobileController.java
index d16713a..1a0a1f5 100644
--- a/src/main/java/com/zy/asrs/controller/MobileController.java
+++ b/src/main/java/com/zy/asrs/controller/MobileController.java
@@ -15,6 +15,7 @@
import com.zy.asrs.entity.result.MobileAdjustResult;
import com.zy.asrs.mapper.ManLocDetlMapper;
import com.zy.asrs.service.*;
+import com.zy.asrs.service.impl.MatServiceImpl;
import com.zy.common.model.WrkDto;
import com.zy.common.utils.HttpHandler;
import com.zy.common.web.BaseController;
@@ -81,6 +82,8 @@
@Autowired
private ExdMaterialMapper exdMaterialMapper;
+ @Autowired
+ private MatServiceImpl matService;
// 鍟嗗搧涓婃灦
@RequestMapping("/mat/onSale/auth")
@@ -129,6 +132,7 @@
@RequestMapping("/comb/auth")
@ManagerAuth(memo = "缁勬墭")
public R comb(@RequestBody CombParam combParam) {
+ log.info("缁勬墭鏁版嵁锛歿}", combParam.toString());
mobileService.comb(combParam, getUserId(), getUser().getEmail());
return R.ok("缁勬墭鎴愬姛");
}
@@ -464,120 +468,118 @@
//绌烘墭鐩樼紦鍐插尯 灏忥細E8 澶э細E9
String rStaNo = "E8";
if (barcode.substring(0, 1).equals("9")) {
- String rStaNo ="E8";
- String type ="ZONE"; //鍖哄煙
- if(barcode.substring(0,1).equals("9")){
- rStaNo = "E9";
- }
- String type = "ZONE"; //鍖哄煙
- Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "autoE").eq("status", "1"));
- if (config != null) {
- type = "STACK"; //宸烽亾
- if (Cools.isEmpty(config.getValue())) {
- rStaNo = rStaNo + "01";
- config.setValue("2");
- } else if (config.getValue().equals("1")) {
- rStaNo = rStaNo + "01";
- config.setValue("2");
- } else if (config.getValue().equals("2")) {
- rStaNo = rStaNo + "02";
- config.setValue("3");
- } else if (config.getValue().equals("3")) {
- rStaNo = rStaNo + "03";
- config.setValue("1");
+ String type = "ZONE"; //鍖哄煙
+ if (barcode.substring(0, 1).equals("9")) {
+ rStaNo = "E9";
}
- configService.updateById(config);
- }else{
Config config = configService.selectOne(new EntityWrapper<Config>().eq("code", "autoE").eq("status", "1"));
-
if (config != null) {
- type ="STACK"; //宸烽亾
+ type = "STACK"; //宸烽亾
if (Cools.isEmpty(config.getValue())) {
rStaNo = rStaNo + "01";
config.setValue("2");
- }else if (config.getValue().equals("1")) {
+ } else if (config.getValue().equals("1")) {
rStaNo = rStaNo + "01";
config.setValue("2");
- }else if (config.getValue().equals("2")) {
+ } else if (config.getValue().equals("2")) {
rStaNo = rStaNo + "02";
config.setValue("3");
- }else if (config.getValue().equals("3")) {
+ } else if (config.getValue().equals("3")) {
rStaNo = rStaNo + "03";
config.setValue("1");
}
configService.updateById(config);
- }
- }
-
- LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>();
- rcsParam.put("taskType", "PF-FMR-COMMON");
- List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>();
- LinkedHashMap<String, Object> t1 = new LinkedHashMap<>();
- LinkedHashMap<String, Object> t2 = new LinkedHashMap<>();
- t1.put("seq", 0);
- t1.put("type", "SITE");
- t1.put("code", sourceStaNo);
- t1.put("autoStart", 0);
- t1.put("operation", "COLLECT");
-
- t2.put("seq", 0);
- t2.put("type", type);
- t2.put("code", rStaNo);
- t2.put("autoStart", 0);
- t2.put("operation", "DELIVERY");
-
- targetRoutes.add(t1);
- targetRoutes.add(t2);
- rcsParam.put("targetRoute", targetRoutes);
- rcsParam.put("initPriority", 100);
-
-
- String response = "";
- Boolean bool = false;
- String msg = "";
- HashMap<String, Object> map = new HashMap<>();
- Date date = new Date();
- String time = date.getTime() + "";
-
- map.put("X-LR-REQUEST-ID", time);
- try {
- log.info("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍={}", rcsParam);
- response = new HttpHandler.Builder()
- .setHeaders(map)
- .setUri(url)
- .setHttps(true)
- .setPath(attrcs)
- .setJson(JSON.toJSONString(rcsParam))
- .build()
- .doPostCloseSSL();
- JSONObject jsonObject = JSON.parseObject(response);
- if (jsonObject.getString("code").equals("SUCCESS")) {
- bool = true;
} else {
- msg = jsonObject.getString("message");
+ config = configService.selectOne(new EntityWrapper<Config>().eq("code", "autoE").eq("status", "1"));
+
+ if (config != null) {
+ type = "STACK"; //宸烽亾
+ if (Cools.isEmpty(config.getValue())) {
+ rStaNo = rStaNo + "01";
+ config.setValue("2");
+ } else if (config.getValue().equals("1")) {
+ rStaNo = rStaNo + "01";
+ config.setValue("2");
+ } else if (config.getValue().equals("2")) {
+ rStaNo = rStaNo + "02";
+ config.setValue("3");
+ } else if (config.getValue().equals("3")) {
+ rStaNo = rStaNo + "03";
+ config.setValue("1");
+ }
+ configService.updateById(config);
+ }
}
- } catch (Exception e) {
- e.printStackTrace();
- log.error("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍澶辫触杩斿洖鍊�={}", response);
- } finally {
- apiLogService.save("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍"
- , url + attrcs
- , null
- , "127.0.0.1"
- , JSON.toJSONString(rcsParam)
- , response
- , bool
- );
- }
- if (bool) {
- return R.ok();
- } else {
- return R.error(msg);
- }
+ LinkedHashMap<String, Object> rcsParam = new LinkedHashMap<>();
+ rcsParam.put("taskType", "PF-FMR-COMMON");
+ List<LinkedHashMap<String, Object>> targetRoutes = new ArrayList<>();
+ LinkedHashMap<String, Object> t1 = new LinkedHashMap<>();
+ LinkedHashMap<String, Object> t2 = new LinkedHashMap<>();
+ t1.put("seq", 0);
+ t1.put("type", "SITE");
+ t1.put("code", sourceStaNo);
+ t1.put("autoStart", 0);
+ t1.put("operation", "COLLECT");
+ t2.put("seq", 0);
+ t2.put("type", type);
+ t2.put("code", rStaNo);
+ t2.put("autoStart", 0);
+ t2.put("operation", "DELIVERY");
+
+ targetRoutes.add(t1);
+ targetRoutes.add(t2);
+ rcsParam.put("targetRoute", targetRoutes);
+ rcsParam.put("initPriority", 100);
+
+
+ String response = "";
+ Boolean bool = false;
+ String msg = "";
+ HashMap<String, Object> map = new HashMap<>();
+ Date date = new Date();
+ String time = date.getTime() + "";
+
+ map.put("X-LR-REQUEST-ID", time);
+ try {
+ log.info("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍={}", rcsParam);
+ response = new HttpHandler.Builder()
+ .setHeaders(map)
+ .setUri(url)
+ .setHttps(true)
+ .setPath(attrcs)
+ .setJson(JSON.toJSONString(rcsParam))
+ .build()
+ .doPostCloseSSL();
+ JSONObject jsonObject = JSON.parseObject(response);
+ if (jsonObject.getString("code").equals("SUCCESS")) {
+ bool = true;
+ } else {
+ msg = jsonObject.getString("message");
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ log.error("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍澶辫触杩斿洖鍊�={}", response);
+ } finally {
+ apiLogService.save("wms娲惧彂鎼繍浠诲姟缁橝GV鎼繍"
+ , url + attrcs
+ , null
+ , "127.0.0.1"
+ , JSON.toJSONString(rcsParam)
+ , response
+ , bool
+ );
+ }
+
+ if (bool) {
+ return R.ok();
+ } else {
+ return R.error();
+ }
+ }
+ return R.error();
}
-
/**
* 鎵ц绉诲簱浠诲姟--鐐瑰埌鐐�
@@ -1003,7 +1005,10 @@
if (barcode1 == null) {
return R.error("鎵规瀵瑰簲鐨勯獙甯冩暟鎹笉瀛樺湪");
}
- return R.ok(barcode1);
+ Mat mat = matService.selectByMatnr(barcode1.getItemnumber());
+ mat.setAnfme(barcode1.getQty());
+ mat.setBc(barcode);
+ return R.ok(mat);
}
@RequestMapping(value = "/getOrderNo/auth")
--
Gitblit v1.9.1