From f35fc1f577af2cb76198a520f47b4c7b85fb170e Mon Sep 17 00:00:00 2001
From: zyx <zyx123456>
Date: 星期四, 21 十二月 2023 15:19:52 +0800
Subject: [PATCH] 合并订单bug修改
---
src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
index 9ab7e0c..188d814 100644
--- a/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/WorkServiceImpl.java
@@ -1,6 +1,8 @@
package com.zy.asrs.service.impl;
import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.core.common.BaseRes;
@@ -1213,13 +1215,28 @@
}
private void generateAgvWaitpakin(WrkDetl wrkDetl){
- Order order = orderService.selectByNo(wrkDetl.getOrderNo());
- DocType docType = docTypeService.selectById(order.getDocType());
- if("浜哄伐琛ヨ揣鍗�".equals(docType.getDocName())){
- AgvWaitPakin agvWaitPakin = new AgvWaitPakin();
- BeanUtils.copyProperties(wrkDetl,agvWaitPakin);
- agvWaitPakinService.insert(agvWaitPakin);
+ String orderNo = wrkDetl.getOrderNo();
+ if(orderNo.contains("{")){
+ JSONArray orderArray = JSON.parseArray(orderNo);
+ for (Object o : orderArray){
+ JSONObject jsonobject = (JSONObject) o;
+ Order order = orderService.selectByNo(jsonobject.get("orderNo").toString());
+ DocType docType = docTypeService.selectById(order.getDocType());
+ if("浜哄伐琛ヨ揣鍗�".equals(docType.getDocName())){
+ throw new CoolException("鍚堝苟鍗曟嵁涓寘鍚汉宸ヨˉ璐у崟锛屽崟鎹负: " + jsonobject.get("orderNo"));
+ }
+ }
+
+ }else {
+ Order order = orderService.selectByNo(orderNo);
+ DocType docType = docTypeService.selectById(order.getDocType());
+ if("浜哄伐琛ヨ揣鍗�".equals(docType.getDocName())){
+ AgvWaitPakin agvWaitPakin = new AgvWaitPakin();
+ BeanUtils.copyProperties(wrkDetl,agvWaitPakin);
+ agvWaitPakinService.insert(agvWaitPakin);
+ }
}
+
}
}
--
Gitblit v1.9.1