From 88fc713144a877a4257b4173fbfadafd926c94de Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期五, 09 一月 2026 20:35:19 +0800
Subject: [PATCH] 出库再入库
---
src/main/java/com/zy/asrs/entity/OrderDetl.java | 87 +++++++++++++++++++++++++++++++++++++++++--
1 files changed, 83 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java
index e17cb96..8f25411 100644
--- a/src/main/java/com/zy/asrs/entity/OrderDetl.java
+++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java
@@ -1,22 +1,29 @@
package com.zy.asrs.entity;
+import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import com.zy.asrs.service.BasProcessProceduresService;
+import com.zy.asrs.service.BasQualityTestingService;
import com.zy.asrs.service.OrderService;
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.beans.BeanUtils;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;
+import java.util.List;
+import java.util.Objects;
@Data
@TableName("man_order_detl")
@@ -42,6 +49,7 @@
* 鍗曟嵁缂栧彿
*/
@ApiModelProperty(value= "鍗曟嵁缂栧彿")
+ @ExcelProperty(index = 0, value = "鍗曞彿")
@TableField("order_no")
private String orderNo;
@@ -50,6 +58,7 @@
* 鏁伴噺
*/
@ApiModelProperty(value= "鏁伴噺")
+ @ExcelProperty(value = "鏁伴噺")
private Double anfme;
/**
@@ -75,30 +84,35 @@
* 鍟嗗搧缂栫爜
*/
@ApiModelProperty(value= "鍟嗗搧缂栫爜")
+ @ExcelProperty(value = "鍟嗗搧缂栫爜")
private String matnr;
/**
* 鍟嗗搧鍚嶇О
*/
@ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+ @ExcelProperty(value = "鍟嗗搧鍚嶇О")
private String maktx;
/**
* 鎵瑰彿
*/
@ApiModelProperty(value= "鎵瑰彿")
+ @ExcelProperty(value = "鎵瑰彿")
private String batch;
/**
* 瑙勬牸
*/
@ApiModelProperty(value= "瑙勬牸")
+ @ExcelProperty(value = "瑙勬牸")
private String specs;
/**
* 鍨嬪彿
*/
@ApiModelProperty(value= "鍨嬪彿")
+ @ExcelProperty(value = "鍨嬪彿")
private String model;
/**
@@ -111,12 +125,14 @@
* 鍝佺墝
*/
@ApiModelProperty(value= "鍝佺墝")
+ @ExcelProperty(value = "鍝佺墝")
private String brand;
/**
* 鍗曚綅
*/
@ApiModelProperty(value= "鍗曚綅")
+ @ExcelProperty(value = "鍗曚綅")
private String unit;
/**
@@ -141,6 +157,7 @@
* 鏉$爜
*/
@ApiModelProperty(value= "鏉$爜")
+ @ExcelProperty(value = "SN鐮�")
private String barcode;
/**
@@ -174,6 +191,7 @@
*/
@ApiModelProperty(value= "瀹夊叏搴撳瓨閲�")
@TableField("safe_qty")
+ @ExcelProperty(value = "褰掗浂闃�鍊�")
private Double safeQty;
/**
@@ -193,6 +211,7 @@
* 浣撶Н
*/
@ApiModelProperty(value= "浣撶Н")
+ @ExcelProperty(value = "km/cm")
private Double volume;
/**
@@ -314,19 +333,40 @@
* 澶囩敤1
*/
@ApiModelProperty(value= "澶囩敤1")
- private String standby1;
+ private String standby1 = "";
/**
* 澶囩敤2
*/
@ApiModelProperty(value= "澶囩敤2")
- private String standby2;
+ private String standby2 = "";
/**
* 澶囩敤3
*/
@ApiModelProperty(value= "澶囩敤3")
- private String standby3;
+ private String standby3 = "";
+
+ /**
+ * 澶囩敤1
+ */
+ @ApiModelProperty(value= "澶囩敤1")
+ @TableField("box_type1")
+ private String boxType1 = "1";
+
+ /**
+ * 澶囩敤2
+ */
+ @ApiModelProperty(value= "澶囩敤2")
+ @TableField("box_type2")
+ private String boxType2 = "1";
+
+ /**
+ * 澶囩敤3
+ */
+ @ApiModelProperty(value= "澶囩敤3")
+ @TableField("box_type3")
+ private String boxType3 = "1";
public OrderDetl() {}
@@ -549,7 +589,27 @@
&& this.standby1.equals(orderDetl.getStandby1())
&& this.standby2.equals(orderDetl.getStandby2())
&& this.standby3.equals(orderDetl.getStandby3())
+ && this.boxType1.equals(orderDetl.getBoxType1())
+ && this.boxType2.equals(orderDetl.getBoxType2())
+ && this.boxType3.equals(orderDetl.getBoxType3())
);
+ }
+
+ public static OrderDetl find(List<OrderDetl> detlDtos, String matnr, String batch, String brand, String standby1, String standby2, String standby3, String boxType1, String boxType2, String boxType3) {
+ if (Cools.isEmpty(matnr)) {
+ return null;
+ }
+ for (OrderDetl detlDto : detlDtos) {
+ if (matnr.equals(detlDto.getMatnr()) && Cools.eq(batch, detlDto.getBatch())
+ && brand.equals(detlDto.getBrand()) && standby1.equals(detlDto.getStandby1())
+ && standby2.equals(detlDto.getStandby2()) && standby3.equals(detlDto.getStandby3())
+ && boxType1.equals(detlDto.getBoxType1())
+ && boxType2.equals(detlDto.getBoxType2()) && boxType3.equals(detlDto.getBoxType3())
+ ) {
+ return detlDto;
+ }
+ }
+ return null;
}
public String getPakinPakoutStatus$(){
@@ -564,9 +624,28 @@
}
}
+ public String getBoxType1$(){
+ BasProcessProceduresService service = SpringUtils.getBean(BasProcessProceduresService.class);
+ BasProcessProcedures processProcedures = service.selectOne(new EntityWrapper<BasProcessProcedures>().eq("box_type", this.boxType1));
+ if (!Cools.isEmpty(processProcedures)){
+ return String.valueOf(processProcedures.getBoxSpecs());
+ }
+ return this.boxType1;
+ }
+
+ public String getBoxType2$(){
+ BasQualityTestingService service = SpringUtils.getBean(BasQualityTestingService.class);
+ BasQualityTesting basQualityTesting = service.selectOne(new EntityWrapper<BasQualityTesting>().eq("box_type", this.boxType1));
+ if (!Cools.isEmpty(basQualityTesting)){
+ return String.valueOf(basQualityTesting.getBoxSpecs());
+ }
+ return this.boxType1;
+ }
public void sync(Object source) {
- Synchro.Copy(source, this);
+ if (!Objects.isNull(source)) {
+ BeanUtils.copyProperties(source, this);
+ }
}
}
\ No newline at end of file
--
Gitblit v1.9.1