From 560061f07be81dd4436f940b26a4cb26941a4201 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期三, 12 六月 2024 17:12:16 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/AgvMobileController.java | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/AgvMobileController.java b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
index 2e5c799..6b12669 100644
--- a/src/main/java/com/zy/asrs/controller/AgvMobileController.java
+++ b/src/main/java/com/zy/asrs/controller/AgvMobileController.java
@@ -12,6 +12,8 @@
import com.zy.common.web.BaseController;
import io.swagger.models.auth.In;
import lombok.Synchronized;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -27,6 +29,8 @@
@RequestMapping("agvMobile")
public class AgvMobileController extends BaseController {
+
+ private static final Logger log = LoggerFactory.getLogger(AgvMobileController.class);
@Autowired
private AgvMobileService agvMobileService;
@Autowired
@@ -421,6 +425,11 @@
if (mT.equals("unAuto")) {
moveType = "2";
ioType = 111;
+ //int count = agvWrkMastService.selectCount(new EntityWrapper<AgvWrkMast>().eq("io_type", ioType));
+ //if (count>3){
+ // log.equals("111浠诲姟鍫靛锛岀◢鍚庡啀璇曪紒锛侊紒褰撳墠闄愬埗鏁伴噺3鏉★紝闄愬埗鏉′欢锛歩o_type = 111");
+ // throw new CoolException("111浠诲姟鍫靛锛岀◢鍚庡啀璇曪紒");
+ //}
} else {
moveType = "1";
ioType = 108;
@@ -431,6 +440,10 @@
AgvWrkMast source_loc_no = agvWrkMastService.selectOne(new EntityWrapper<AgvWrkMast>().eq("source_loc_no", locNo));
if (!Cools.isEmpty(source_loc_no)) {
throw new CoolException("褰撳墠搴撲綅宸茬敓鎴愪换鍔★紒");
+ }
+ AgvLocMast locMastS = agvLocMastService.selectOne(new EntityWrapper<AgvLocMast>().eq("loc_no", locNo).eq("loc_sts","F"));
+ if (Cools.isEmpty(locMastS)) {
+ throw new CoolException("褰撳墠搴撲綅闈炲湪搴撶姸鎬侊紒搴撲綅鍙�="+locNo);
}
AgvWrkMast wrkMast = createWrkMast(ioType, 22L, locNo, "", barcode, now, getUserId(), 30,floor);
// 鍚屾璋冩嫧鍗�
@@ -513,6 +526,9 @@
@ManagerAuth(memo = "绔欑偣鍥為��")
@Synchronized
public R doBack(@RequestBody AgvMobileStartPakin param){
+ if (Cools.isEmpty(param)){
+ return R.error("鍙傛暟涓虹┖");
+ }
agvMobileService.doBack(param, getUserId());
return R.ok();
}
@@ -526,6 +542,15 @@
return R.ok();
}
+ @PostMapping("/hand/control/processed")
+ @Transactional
+ @ManagerAuth(memo = "纭鍔犲伐瀹屾垚")
+ @Synchronized
+ public R processed(@RequestBody AgvMobileStartPakin param){
+ agvMobileService.processed(param, getUserId());
+ return R.ok();
+ }
+
public static void main(String[] args) {
List<AgvLocDetl> agvLocDetls1 = new ArrayList<>();
List<AgvLocDetl> agvLocDetls2 = new ArrayList<>();
--
Gitblit v1.9.1