From dbe87fddc43db7e5486489c3a011cc6474c4701c Mon Sep 17 00:00:00 2001
From: 1 <1>
Date: 星期四, 09 十月 2025 16:46:42 +0800
Subject: [PATCH] #和得服务器
---
src/main/java/com/zy/asrs/task/OrderToSortLineScheduler.java | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/main/java/com/zy/asrs/task/OrderToSortLineScheduler.java b/src/main/java/com/zy/asrs/task/OrderToSortLineScheduler.java
index 9776730..add09c1 100644
--- a/src/main/java/com/zy/asrs/task/OrderToSortLineScheduler.java
+++ b/src/main/java/com/zy/asrs/task/OrderToSortLineScheduler.java
@@ -1,9 +1,11 @@
package com.zy.asrs.task;
import com.alibaba.fastjson.JSON;
+import com.zy.asrs.entity.BasArmMastSign;
import com.zy.asrs.entity.BasArmRules;
import com.zy.asrs.entity.OrderDetl;
import com.zy.asrs.entity.param.OrderToLine;
+import com.zy.asrs.service.BasArmMastSignService;
import com.zy.asrs.service.BasArmRulesService;
import com.zy.asrs.service.OrderDetlService;
import com.zy.asrs.service.OrderService;
@@ -30,6 +32,8 @@
private BasArmRulesService basArmRulesService;
@Autowired
private OrderToLineHandler orderToLineHandler;
+ @Autowired
+ private BasArmMastSignService basArmMastSignService;
@Scheduled(cron = "0/3 * * * * ? ")
@@ -69,7 +73,8 @@
}
Double anfme = orderDetl.getAnfme();
Double remainder = anfme % number; //鍙栦綑 浣欐暟娣锋惌
- if(remainder != 0){
+// remainder = 0D;
+ if(!remainder.equals(0D)){
// 缁勮鐗╂枡淇℃伅
OrderToLine.MatList matMix = new OrderToLine.MatList(
orderDetl.getMatnr(), // matnr -> sku
@@ -108,6 +113,22 @@
if (!returnT.isSuccess()) {
log.error("涓嬪彂鍗曟嵁澶辫触===>"+ JSON.toJSON(orderToLine));
}
+ try{
+ for (OrderToLine.MatList matList:orderToLine.getMatList()){
+ BasArmMastSign basArmMastSign = new BasArmMastSign();
+ basArmMastSign.setMatnr(matList.getSku());
+ basArmMastSign.setOrderNo(orderToLine.getOrderNo());
+ basArmMastSign.setSku(matList.getSku());
+ basArmMastSign.setPo(matList.getPo());
+ basArmMastSign.setUpc(matList.getUpc());
+ basArmMastSign.setSupplier(matList.getSupplier());
+ basArmMastSign.setStatus(0);
+ basArmMastSign.setCreateTime(matList.getBindingTags());
+ basArmMastSignService.insert(basArmMastSign);
+ }
+ }catch (Exception e){
+
+ }
} catch (Exception e){
log.error("涓嬪彂鍗曟嵁寮傚父===>"+e.getMessage());
}
--
Gitblit v1.9.1