From e064028d87f0d9335d095c2f646a7ce7635e13f1 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 18 十二月 2025 13:38:54 +0800
Subject: [PATCH] *
---
src/main/java/com/zy/asrs/controller/MonitorController.java | 146 +++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 141 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/MonitorController.java b/src/main/java/com/zy/asrs/controller/MonitorController.java
index e6c188b..c29889d 100644
--- a/src/main/java/com/zy/asrs/controller/MonitorController.java
+++ b/src/main/java/com/zy/asrs/controller/MonitorController.java
@@ -1,12 +1,19 @@
package com.zy.asrs.controller;
+import com.alibaba.fastjson.JSON;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Arith;
import com.core.common.Cools;
import com.core.common.R;
import com.zy.asrs.domain.dto.AxisBean;
import com.zy.asrs.domain.dto.WorkChartAxis;
import com.zy.asrs.domain.vo.LocChartPie;
+import com.zy.asrs.entity.RgvOneSign;
+import com.zy.asrs.entity.WaitPakin;
import com.zy.asrs.mapper.ReportQueryMapper;
+import com.zy.asrs.mapper.RgvOneSignMapper;
+import com.zy.asrs.mapper.WaitPakinMapper;
+import com.zy.asrs.service.ApiLogService;
import com.zy.asrs.service.WrkDetlService;
import com.zy.common.model.MatDto;
import com.zy.common.service.CommonService;
@@ -43,6 +50,12 @@
private SlaveProperties slaveProperties;
@Autowired
private WrkDetlService wrkDetlService;
+ @Autowired
+ private WaitPakinMapper waitPakinMapper;
+ @Autowired
+ private ApiLogService apiLogService;
+ @Autowired
+ private RgvOneSignMapper rgvOneSignMapper;
/**
* 鑾峰彇褰撳墠鏃堕棿
@@ -63,9 +76,40 @@
} else {
staProtocolPall = staProtocolPall.clone();
}
+ String errorSta = "";
+ boolean signSta = false;
- if (!staProtocolPall.isAutoing() || !staProtocolPall.isLoading() || staProtocolPall.getWorkNo() != 0 || !staProtocolPall.isPakMk()){
- return R.error("鏈氨缁紒锛侊紒");
+ if (!staProtocolPall.isAutoing()){
+ errorSta = errorSta+"绔欑偣闈炶嚜鍔紒锛侊紒";
+ signSta = true;
+ }
+ if (!staProtocolPall.isLoading()){
+ errorSta = errorSta+"绔欑偣鏃犳墭鐩橈紒锛侊紒";
+ signSta = true;
+ }
+ if (staProtocolPall.getWorkNo() != 0 ){
+ errorSta = errorSta+"绔欑偣瀛樺湪浠诲姟鍙凤紒锛侊紒";
+ signSta = true;
+ }
+ if (!staProtocolPall.isPakMk()){
+ errorSta = errorSta+"绔欑偣瀛樺湪閿佸畾鏍囪锛侊紒锛�";
+ signSta = true;
+ }
+ if (signSta){
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ "鏈氨缁紒锛侊紒璇风瓑寰�... 鍘熷洜锛�"+errorSta,
+ false
+ );
+ }catch (Exception e){
+ }
+ return R.error("鏈氨缁紒锛侊紒璇风瓑寰�... 鍘熷洜锛�"+errorSta);
}
// 鑾峰彇鏉$爜鎵弿浠俊鎭�
@@ -89,11 +133,103 @@
// Calendar calendar = Calendar.getInstance();
// calendar.setTime(now);
if (Cools.isEmpty(barcode) || barcode.equals("")){
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ "鏈氨缁紒锛侊紒鎵樼洏鏉$爜涓虹┖锛侊紒锛佽妫�鏌ワ紒锛侊紒",
+ false
+ );
+ }catch (Exception e){
+ }
return R.error("鏈氨缁紒锛侊紒鎵樼洏鏉$爜涓虹┖锛侊紒锛佽妫�鏌ワ紒锛侊紒");
}
- return R.ok(
- Cools.add("barcode", barcode).add("Date",now)
- );
+ if (waitPakinMapper.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", barcode))!=0){
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ "鏈氨缁紒锛侊紒鎵樼洏鏉$爜涓嶄负绌轰絾鏄凡瀛樺湪鏁版嵁锛屼笉鍙噸澶嶄娇鐢紒锛侊紒璇锋鏌ワ紒锛侊紒",
+ false
+ );
+ }catch (Exception e){
+ }
+ return R.error("鏈氨缁紒锛侊紒鎵樼洏鏉$爜涓嶄负绌轰絾鏄凡瀛樺湪鏁版嵁锛屼笉鍙噸澶嶄娇鐢紒锛侊紒璇锋鏌ユ垨閲嶆柊鑾峰彇锛侊紒锛�");
+ }
+
+
+ RgvOneSign JarTwo = rgvOneSignMapper.selectOneSign(palletizingNo+"barcode"+barcode);
+ if (!Cools.isEmpty(JarTwo)){
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ "鏈氨缁紒锛侊紒鏉$爜鏇存柊涓�....",
+ false
+ );
+ }catch (Exception e){
+ }
+ return R.error("鏈氨缁紒锛侊紒鏉$爜鏇存柊涓�....");
+ }
+
+ try{
+ rgvOneSignMapper.deleteBarcode(palletizingNo+"barcode");
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ JSON.toJSONString("娓呴櫎鎵樼洏鐮佹爣璁版垚鍔燂紒锛侊紒"),
+ true
+ );
+ }catch (Exception e){
+ }
+ } catch (Exception e){
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ JSON.toJSONString("娓呴櫎鎵樼洏鐮佹爣璁板紓甯革紒锛侊紒"),
+ false
+ );
+ }catch (Exception e1){
+ }
+ }
+
+ Cools.CoolMap coolMap = Cools.add("barcode", barcode).add("Date", now);
+ try{
+ // 淇濆瓨鎺ュ彛鏃ュ織
+ apiLogService.save(
+ "涓帶鐢宠鑾峰彇"+palletizingNo+"绔欑偣褰撳墠鏉$爜淇℃伅",
+ "/monitor/barcode/two",
+ null,
+ null,
+ JSON.toJSONString(palletizingNo),
+ JSON.toJSONString("barcode:"+barcode),
+ true
+ );
+ }catch (Exception e){
+ }
+ return R.ok(coolMap);
}
/**
--
Gitblit v1.9.1