From e66095ce55dcc9450b953f77dd753c698c53fd55 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期一, 27 十月 2025 08:12:27 +0800
Subject: [PATCH] 更新erp对接 1.销售订单按子单自动上报 2.其他订单按主单上报 3.客户可以选择物料进行出库
---
src/main/java/com/zy/asrs/entity/OrderDetl.java | 80 +++++++++++++++++++++++++++-------------
1 files changed, 54 insertions(+), 26 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java
index 9f51f3c..f0e9733 100644
--- a/src/main/java/com/zy/asrs/entity/OrderDetl.java
+++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import com.zy.asrs.service.DocTypeService;
import com.zy.asrs.service.OrderService;
import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
@@ -17,6 +18,7 @@
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.Objects;
@Data
@TableName("man_order_detl")
@@ -55,11 +57,27 @@
/**
* 浣滀笟鏁伴噺
*
- * 1. 鍏ュ簱 : qty 馃憜
- * 1. 鍑哄簱 : qty 馃憜
+ * 鍏ュ簱 : 缁勬墭瀹屾垚锛岀粍鎵樻。銆佸伐浣滄。銆佸叆搴撳畬鎴愭暟閲�
+ * 鍑哄簱 : 宸ヤ綔妗c�佸嚭搴撳畬鎴愭暟閲�
*/
@ApiModelProperty(value= "浣滀笟鏁伴噺")
+ @TableField("work_qty")
+ private Double workQty;
+
+ /**
+ * 瀹屾垚鏁伴噺
+ *
+ * 鍏ュ簱 : qty 馃憜
+ * 鍑哄簱 : qty 馃憜
+ */
+ @ApiModelProperty(value= "瀹屾垚鏁伴噺")
private Double qty;
+
+ /**
+ * 涓婃姤鏁伴噺
+ */
+ @ApiModelProperty(value= "涓婃姤鏁伴噺")
+ private Double units=0.0;
/**
* 鍟嗗搧缂栫爜
@@ -121,11 +139,6 @@
@ApiModelProperty(value= "sku")
private String sku;
- /**
- * 鍗曚綅閲�
- */
- @ApiModelProperty(value= "鍗曚綅閲�")
- private Double units;
/**
* 鏉$爜
@@ -205,9 +218,9 @@
private String suppCode;
/**
- * 鏄惁鎵规 1: 鏄� 0: 鍚�
+ * 绾㈣摑瀛�
*/
- @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ")
+ @ApiModelProperty(value= "绾㈣摑瀛�")
@TableField("be_batch")
private Integer beBatch;
@@ -232,9 +245,9 @@
private Integer source;
/**
- * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚�
+ * 涓婃姤娆℃暟
*/
- @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ")
+ @ApiModelProperty(value= "涓婃姤娆℃暟")
private Integer inspect;
/**
@@ -338,6 +351,30 @@
return null;
}
+ public String getAnfme$(){
+ if(Objects.equals(this.qty, this.anfme)){
+ return "宸插畬鎴�";
+ }else if(this.workQty==0){
+ return "寰呭鐞�";
+ }else if(this.anfme>this.qty){
+ return "浣滀笟涓�";
+ }else if(this.anfme<this.qty){
+ return "寮傚父";
+ }
+ return "";
+ }
+
+ public String getDanger$(){
+ DocTypeService service = SpringUtils.getBean(DocTypeService.class);
+ OrderService orderServicer=SpringUtils.getBean(OrderService.class);
+ Order order = orderServicer.selectByNo(this.orderNo);
+ DocType docType = service.selectById(order.getDocType());
+ if (!Cools.isEmpty(docType)){
+ return String.valueOf(docType.getDocName());
+ }
+ return null;
+ }
+
public String getBeBatch$(){
if (null == this.beBatch){ return null; }
switch (this.beBatch){
@@ -373,18 +410,6 @@
return "鍚�";
default:
return String.valueOf(this.inspect);
- }
- }
-
- public String getDanger$(){
- if (null == this.danger){ return null; }
- switch (this.danger){
- case 1:
- return "鏄�";
- case 0:
- return "鍚�";
- default:
- return String.valueOf(this.danger);
}
}
@@ -433,9 +458,12 @@
}
public Double getEnableQty() {
- if (null != this.anfme && this.qty != null) {
- return this.anfme - this.qty;
+ if (null != this.anfme && this.workQty != null) {
+ return this.anfme - this.workQty;
}
+// if (null != this.anfme && this.qty != null) {
+// return this.anfme - this.qty;
+// }
return null;
}
@@ -443,4 +471,4 @@
Synchro.Copy(source, this);
}
-}
+}
\ No newline at end of file
--
Gitblit v1.9.1