From 08b4403ec8d6b69528d161cfcad80b5d64dea76c Mon Sep 17 00:00:00 2001 From: Administrator <876263681@qq.com> Date: 星期三, 02 七月 2025 15:12:43 +0800 Subject: [PATCH] #优化库位检索 --- src/main/java/com/zy/asrs/entity/Mat.java | 77 +++++++++++++++++++++++++++++++------- 1 files changed, 62 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/Mat.java b/src/main/java/com/zy/asrs/entity/Mat.java index 24494d3..428d94c 100644 --- a/src/main/java/com/zy/asrs/entity/Mat.java +++ b/src/main/java/com/zy/asrs/entity/Mat.java @@ -1,5 +1,7 @@ package com.zy.asrs.entity; +import com.alibaba.excel.annotation.ExcelIgnore; +import com.alibaba.excel.annotation.ExcelProperty; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; @@ -7,6 +9,7 @@ import com.core.common.Cools; import com.core.common.SpringUtils; import com.zy.asrs.service.TagService; +import com.zy.common.utils.Synchro; import com.zy.system.entity.User; import com.zy.system.service.UserService; import io.swagger.annotations.ApiModelProperty; @@ -21,6 +24,7 @@ @TableName("man_mat") public class Mat implements Serializable { + @ExcelIgnore @TableField(exist = false) private Double stock; @@ -37,6 +41,7 @@ /** * ID */ + @ExcelIgnore @ApiModelProperty(value= "ID") @TableId(value = "id", type = IdType.AUTO) private Long id; @@ -44,6 +49,8 @@ /** * 缂栧彿 */ + // 瀵煎嚭鍊熺敤璇ュ瓧娈靛瓨鎵�灞炲綊绫讳腑鏂囨弿杩� + @ExcelProperty(value = "褰掔被鍚嶇О") @ApiModelProperty(value= "缂栧彿") private String uuid; @@ -52,96 +59,114 @@ */ @ApiModelProperty(value= "鎵�灞炲綊绫�") @TableField("tag_id") + @ExcelProperty(value = "褰掔被") private Long tagId; /** - * 鍟嗗搧缂栧彿 + * 鍝佸彿 */ - @ApiModelProperty(value= "鍟嗗搧缂栧彿") + @ApiModelProperty(value= "鍝佸彿") + @ExcelProperty(value = "鍝佸彿") private String matnr; + /** - * 鍟嗗搧鍚嶇О + * 鍝佸悕 */ - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") + @ApiModelProperty(value= "鍝佸悕") + @ExcelProperty(value = "鍝佸悕") private String maktx; /** * 鍒悕 */ @ApiModelProperty(value= "鍒悕") + @ExcelIgnore private String name; /** * 瑙勬牸 */ @ApiModelProperty(value= "瑙勬牸") + @ExcelProperty(value = "瑙勬牸") private String specs; /** * 鍨嬪彿 */ @ApiModelProperty(value= "鍨嬪彿") + @ExcelIgnore private String model; /** * 棰滆壊 */ @ApiModelProperty(value= "棰滆壊") + @ExcelIgnore private String color; /** * 鍝佺墝 */ - @ApiModelProperty(value= "鍝佺墝") + @ApiModelProperty(value= "绫诲瀷") +// @ApiModelProperty(value= "鍝佺墝") + @ExcelProperty(value = "绫诲瀷") private String brand; /** * 鍗曚綅 */ @ApiModelProperty(value= "鍗曚綅") + @ExcelProperty(value = "鍗曚綅") private String unit; /** * 鍗曚环 */ @ApiModelProperty(value= "鍗曚环") + @ExcelIgnore private Double price; /** * sku */ @ApiModelProperty(value= "sku") + @ExcelIgnore private String sku; /** * 鍗曚綅閲� */ @ApiModelProperty(value= "鍗曚綅閲�") + @ExcelIgnore private Double units; /** * 鏉$爜 */ @ApiModelProperty(value= "鏉$爜") + @ExcelIgnore private String barcode; /** * 浜у湴 */ @ApiModelProperty(value= "浜у湴") + @ExcelIgnore private String origin; /** * 鍘傚 */ @ApiModelProperty(value= "鍘傚") + @ExcelIgnore private String manu; /** * 鐢熶骇鏃ユ湡 */ @ApiModelProperty(value= "鐢熶骇鏃ユ湡") + @ExcelIgnore @TableField("manu_date") private String manuDate; @@ -149,6 +174,7 @@ * 鍝侀」鏁� */ @ApiModelProperty(value= "鍝侀」鏁�") + @ExcelIgnore @TableField("item_num") private String itemNum; @@ -156,6 +182,7 @@ * 瀹夊叏搴撳瓨閲� */ @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") + @ExcelIgnore @TableField("safe_qty") private Double safeQty; @@ -163,24 +190,28 @@ * 閲嶉噺 */ @ApiModelProperty(value= "閲嶉噺") + @ExcelIgnore private Double weight; /** * 闀垮害 */ @ApiModelProperty(value= "闀垮害") + @ExcelIgnore private Double length; /** * 浣撶Н */ @ApiModelProperty(value= "浣撶Н") + @ExcelIgnore private Double volume; /** * 涓夋柟缂栫爜 */ @ApiModelProperty(value= "涓夋柟缂栫爜") + @ExcelIgnore @TableField("three_code") private String threeCode; @@ -188,12 +219,14 @@ * 渚涘簲鍟� */ @ApiModelProperty(value= "渚涘簲鍟�") + @ExcelIgnore private String supp; /** * 渚涘簲鍟嗙紪鐮� */ @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") + @ExcelIgnore @TableField("supp_code") private String suppCode; @@ -201,7 +234,7 @@ * 鏄惁鎵规 1: 鏄� 0: 鍚� */ @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") + @ExcelIgnore private Integer beBatch; /** @@ -209,6 +242,7 @@ */ @ApiModelProperty(value= "淇濊川鏈�") @TableField("dead_time") + @ExcelIgnore private String deadTime; /** @@ -216,35 +250,41 @@ */ @ApiModelProperty(value= "棰勮澶╂暟") @TableField("dead_warn") + @ExcelIgnore private Integer deadWarn; /** * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 */ + @ExcelIgnore @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") private Integer source; /** * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� */ + @ExcelIgnore @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer check; + private Integer inspect; /** * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� */ + @ExcelIgnore @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") private Integer danger; /** * 鐘舵�� 1: 姝e父 0: 绂佺敤 */ + @ExcelIgnore @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ") private Integer status; /** * 娣诲姞浜哄憳 */ + @ExcelIgnore @ApiModelProperty(value= "娣诲姞浜哄憳") @TableField("create_by") private Long createBy; @@ -252,6 +292,7 @@ /** * 娣诲姞鏃堕棿 */ + @ExcelIgnore @ApiModelProperty(value= "娣诲姞鏃堕棿") @TableField("create_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @@ -260,6 +301,7 @@ /** * 淇敼浜哄憳 */ + @ExcelIgnore @ApiModelProperty(value= "淇敼浜哄憳") @TableField("update_by") private Long updateBy; @@ -267,6 +309,7 @@ /** * 淇敼鏃堕棿 */ + @ExcelIgnore @ApiModelProperty(value= "淇敼鏃堕棿") @TableField("update_time") @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") @@ -276,11 +319,12 @@ * 澶囨敞 */ @ApiModelProperty(value= "澶囨敞") + @ExcelProperty(value = "澶囨敞") private String memo; public Mat() {} - public Mat(String uuid,Long tagId,String matnr,String maktx,String name,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 Mat(String uuid,Long tagId,String matnr,String maktx,String name,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.uuid = uuid; this.tagId = tagId; this.matnr = matnr; @@ -310,7 +354,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; @@ -323,8 +367,8 @@ // Mat mat = new Mat( // null, // 缂栧彿 // null, // 鎵�灞炲綊绫� -// null, // 鍟嗗搧缂栧彿 -// null, // 鍟嗗搧鍚嶇О +// null, // 鍝佸彿 +// null, // 鍝佸悕 // null, // 鍒悕 // null, // 瑙勬牸 // null, // 鍨嬪彿 @@ -395,15 +439,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); } } @@ -463,5 +507,8 @@ return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); } + public void sync(Object source) { + Synchro.Copy(source, this); + } } -- Gitblit v1.9.1