From 3ad65283c54059e0c61110589fb19398ac3525fe Mon Sep 17 00:00:00 2001 From: zwl <1051256694@qq.com> Date: 星期二, 08 七月 2025 08:32:32 +0800 Subject: [PATCH] 完善拣料转全板 --- src/main/java/com/zy/asrs/entity/OrderDetl.java | 126 +++++++++++++++++++++++++++--------------- 1 files changed, 81 insertions(+), 45 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java index fc0fd35..3cc397c 100644 --- a/src/main/java/com/zy/asrs/entity/OrderDetl.java +++ b/src/main/java/com/zy/asrs/entity/OrderDetl.java @@ -6,7 +6,11 @@ import com.baomidou.mybatisplus.enums.IdType; import com.core.common.Cools; import com.core.common.SpringUtils; +import com.zy.asrs.service.LocDetlService; +import com.zy.asrs.service.LocOwnerService; +import com.zy.asrs.service.OrderDetlService; 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; @@ -85,28 +89,59 @@ private String specs; /** - * 鍨嬪彿 + * 缁勭粐缂栫爜 */ - @ApiModelProperty(value= "鍨嬪彿") + @ApiModelProperty(value= "缁勭粐缂栫爜") + private String manu; + + /** + * 椤规 + */ + @ApiModelProperty(value= "椤规") private String model; /** - * 棰滆壊 + * 浠诲姟浠撳簱 */ - @ApiModelProperty(value= "棰滆壊") + @ApiModelProperty(value= "浠诲姟浠撳簱") private String color; /** - * 鍝佺墝 + * 浠诲姟鍌ㄤ綅 */ - @ApiModelProperty(value= "鍝佺墝") + @ApiModelProperty(value= "浠诲姟鍌ㄤ綅") private String brand; /** - * 鍗曚綅 + * 鍗曚綅缂栫爜 */ - @ApiModelProperty(value= "鍗曚綅") + @ApiModelProperty(value= "鍗曚綅缂栫爜") private String unit; + + /** + * 鍗曚綅鍚嶇О + */ + @ApiModelProperty(value= "鍗曚綅鍚嶇О") + private String sku; + + /** + * 渚涘簲鍟嗙紪鐮� + */ + @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") + @TableField("item_num") + private String itemNum; + + /** + * 鎵樼洏鐮� + */ + @ApiModelProperty(value= "鎵樼洏鐮�") + private String barcode; + + /** + * 渚涘簲鍟嗗悕绉� + */ + @ApiModelProperty(value= "渚涘簲鍟嗗悕绉�") + private String origin; /** * 鍗曚环 @@ -115,34 +150,11 @@ private Double price; /** - * sku - */ - @ApiModelProperty(value= "sku") - private String sku; - - /** * 鍗曚綅閲� */ @ApiModelProperty(value= "鍗曚綅閲�") private Double units; - /** - * 鏉$爜 - */ - @ApiModelProperty(value= "鏉$爜") - private String barcode; - - /** - * 浜у湴 - */ - @ApiModelProperty(value= "浜у湴") - private String origin; - - /** - * 鍘傚 - */ - @ApiModelProperty(value= "鍘傚") - private String manu; /** * 鐢熶骇鏃ユ湡 @@ -150,13 +162,6 @@ @ApiModelProperty(value= "鐢熶骇鏃ユ湡") @TableField("manu_date") private String manuDate; - - /** - * 鍝侀」鏁� - */ - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; /** * 瀹夊叏搴撳瓨閲� @@ -234,7 +239,7 @@ * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer check; + private Integer inspect; /** * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� @@ -284,9 +289,18 @@ @ApiModelProperty(value= "澶囨敞") private String memo; + /** + * 搴撳瓨姹囨�绘暟閲� + */ + @TableField(exist=false) + private Double sum; + + @ApiModelProperty(value= "瀹㈡埛淇℃伅ID") + private Long owner; + public OrderDetl() {} - public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double length, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer check, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { + public OrderDetl(Long orderId, String orderNo, Double anfme, Double qty, String matnr, String maktx, String batch, String specs, String model, String color, String brand, String unit, Double price, String sku, Double units, String barcode, String origin, String manu, String manuDate, String itemNum, Double safeQty, Double weight, Double length, Double volume, String threeCode, String supp, String suppCode, Integer beBatch, String deadTime, Integer deadWarn, Integer source, Integer inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { this.orderId = orderId; this.orderNo = orderNo; this.anfme = anfme; @@ -318,7 +332,7 @@ this.deadTime = deadTime; this.deadWarn = deadWarn; this.source = source; - this.check = check; + this.inspect = inspect; this.danger = danger; this.status = status; this.createBy = createBy; @@ -327,6 +341,16 @@ this.updateTime = updateTime; this.memo = memo; } + + public String getOwner$(){ + LocOwnerService service = SpringUtils.getBean(LocOwnerService.class); + LocOwner locOwner = service.selectById(this.owner); + if (!Cools.isEmpty(locOwner)){ + return String.valueOf(locOwner.getOwner()); + } + return null; + } + public String getOrderId$(){ OrderService service = SpringUtils.getBean(OrderService.class); @@ -363,15 +387,15 @@ } } - public String getCheck$(){ - if (null == this.check){ return null; } - switch (this.check){ + public String getInspect$(){ + if (null == this.inspect){ return null; } + switch (this.inspect){ case 1: return "鏄�"; case 0: return "鍚�"; default: - return String.valueOf(this.check); + return String.valueOf(this.inspect); } } @@ -438,4 +462,16 @@ return null; } + public void sync(Object source) { + Synchro.Copy(source, this); + } + + public Double getSum(){ + LocDetlService service = SpringUtils.getBean(LocDetlService.class); + if (!Cools.isEmpty(this.getMatnr())) { + return service.selectSumByMatnr(this.getMatnr()); + } else { + return null; + } + } } -- Gitblit v1.9.1