From 43efe016c156158b9fc3a8b647810f612fb126e6 Mon Sep 17 00:00:00 2001
From: zwl <1051256694@qq.com>
Date: 星期二, 02 九月 2025 11:39:52 +0800
Subject: [PATCH] 自动补货单新增 1.订单中只能生成两笔自动补货单 2.CTU库是否有足够的空库位,空库位数需要大于100才会生成自动补货单 3.在补货时加上订单明细的数量进行判断
---
src/main/java/com/zy/asrs/entity/LocDetl.java | 78 +++++++++++++++++++++++---------------
1 files changed, 47 insertions(+), 31 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/LocDetl.java b/src/main/java/com/zy/asrs/entity/LocDetl.java
index 33fa2c6..cd7e72a 100644
--- a/src/main/java/com/zy/asrs/entity/LocDetl.java
+++ b/src/main/java/com/zy/asrs/entity/LocDetl.java
@@ -6,16 +6,14 @@
import com.baomidou.mybatisplus.annotations.TableName;
import com.core.common.Cools;
import com.core.common.SpringUtils;
-import com.core.exception.CoolException;
import com.zy.asrs.service.LocMastService;
+import com.zy.common.utils.Synchro;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
-import java.beans.BeanInfo;
-import java.beans.Introspector;
-import java.beans.PropertyDescriptor;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
@@ -38,16 +36,16 @@
@ExcelProperty("鏁伴噺")
private Double anfme;
- @ApiModelProperty(value= "鍟嗗搧缂栧彿")
- @ExcelProperty("鍟嗗搧缂栧彿")
+ @ApiModelProperty(value= "鐗╂枡鍙�")
+ @ExcelProperty("鐗╂枡鍙�")
private String matnr;
- @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
- @ExcelProperty("鍟嗗搧鍚嶇О")
+ @ApiModelProperty(value= "鐗╂枡鍚嶇О")
+ @ExcelProperty("鐗╂枡鍚嶇О")
private String maktx;
- @ApiModelProperty(value= "鎵瑰彿")
- @ExcelProperty("鎵瑰彿")
+ @ApiModelProperty(value= "搴忓垪鐮�")
+ @ExcelProperty("搴忓垪鐮�")
private String batch;
@ApiModelProperty(value= "鍗曟嵁缂栧彿")
@@ -58,7 +56,7 @@
@ApiModelProperty(value= "瑙勬牸")
private String specs;
- @ApiModelProperty(value= "鍨嬪彿")
+ @ApiModelProperty(value= "鎵规")
private String model;
@ApiModelProperty(value= "棰滆壊")
@@ -76,19 +74,19 @@
@ApiModelProperty(value= "sku")
private String sku;
- @ApiModelProperty(value= "鍗曚綅閲�")
+ @ApiModelProperty(value= "鍖呮暟")
private Double units;
@ApiModelProperty(value= "鏉$爜")
private String barcode;
- @ApiModelProperty(value= "浜у湴")
+ @ApiModelProperty(value= "鐗╂枡鐘舵��")
private String origin;
@ApiModelProperty(value= "鍘傚")
private String manu;
- @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+ @ApiModelProperty(value= "鍗曟嵁鏃堕棿")
@TableField("manu_date")
private String manuDate;
@@ -159,6 +157,33 @@
@ApiModelProperty(value= "澶囨敞")
private String memo;
+
+ @TableField("stock_freeze")
+ @ApiModelProperty(value= "搴撳瓨鍐荤粨{1:姝e父,0:鍐荤粨}")
+ private Integer stockFreeze;
+
+ @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+ @TableField("proddate")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+
+ private Date proddate;
+ @ApiModelProperty(value= "鍒版湡鏃ユ湡")
+ @TableField("deadline")
+ @DateTimeFormat(pattern="yyyy-MM-dd")
+ private Date deadline;
+
+ public String getProddate$(){
+ if (Cools.isEmpty(this.proddate)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd").format(this.proddate);
+ }
+ public String getDeadline$(){
+ if (Cools.isEmpty(this.deadline)){
+ return "";
+ }
+ return new SimpleDateFormat("yyyy-MM-dd").format(this.deadline);
+ }
public String getLocNo$(){
LocMastService service = SpringUtils.getBean(LocMastService.class);
@@ -235,7 +260,6 @@
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime);
}
-
public String getAppeUser$(){
UserService service = SpringUtils.getBean(UserService.class);
User user = service.selectById(this.appeUser);
@@ -252,23 +276,15 @@
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime);
}
- public void sync(Object dest) {
- try {
- BeanInfo sourceBean = Introspector.getBeanInfo(this.getClass(),Object.class);
- PropertyDescriptor[] sourceProperty = sourceBean.getPropertyDescriptors();
- BeanInfo destBean = Introspector.getBeanInfo(dest.getClass(),Object.class);
- PropertyDescriptor[] destProperty = destBean.getPropertyDescriptors();
- for (PropertyDescriptor propertyDescriptor : sourceProperty) {
- for (PropertyDescriptor descriptor : destProperty) {
- if (propertyDescriptor.getName().equals(descriptor.getName()) && propertyDescriptor.getPropertyType() == descriptor.getPropertyType()) {
- descriptor.getWriteMethod().invoke(dest, propertyDescriptor.getReadMethod().invoke(this));
- break;
- }
- }
- }
- } catch (Exception e) {
- throw new CoolException("灞炴�у鍒跺け璐�:" + e.getMessage());
+ public void sync(Object source) {
+ Synchro.Copy(source, this);
+ }
+
+ public String getStockFreeze$() {
+ if (Cools.isEmpty(this.stockFreeze)){
+ return "";
}
+ return this.stockFreeze == 1 ? "姝e父" : "鍐荤粨";
}
}
--
Gitblit v1.9.1