From d8f361c9d69271aaa58ba19e75f38e0fee00f3bb Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 24 十二月 2024 08:36:33 +0800 Subject: [PATCH] # --- src/main/java/com/zy/common/model/MatDto.java | 9 /dev/null | 55 --- src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java | 64 --- src/main/java/com/zy/core/thread/LiftThread.java | 15 src/main/java/com/zy/asrs/utils/Utils.java | 119 ------ src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 411 ++++++++-------------- src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java | 6 src/main/java/com/zy/core/thread/NyShuttleThread.java | 45 -- src/main/java/com/zy/asrs/service/LocMastService.java | 57 --- src/main/java/com/zy/common/service/CommonService.java | 277 --------------- src/main/java/com/zy/asrs/entity/BasLift.java | 16 11 files changed, 171 insertions(+), 903 deletions(-) diff --git a/src/main/java/com/zy/asrs/entity/BasLift.java b/src/main/java/com/zy/asrs/entity/BasLift.java index 30e07ee..a72cefb 100644 --- a/src/main/java/com/zy/asrs/entity/BasLift.java +++ b/src/main/java/com/zy/asrs/entity/BasLift.java @@ -1,11 +1,13 @@ package com.zy.asrs.entity; +import com.alibaba.fastjson.JSON; import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.enums.IdType; import com.baomidou.mybatisplus.annotations.TableField; import java.text.SimpleDateFormat; import java.util.Date; +import com.zy.core.model.protocol.NyShuttleProtocol; import org.springframework.format.annotation.DateTimeFormat; import com.core.common.SpringUtils; import com.zy.system.service.UserService; @@ -79,6 +81,13 @@ @TableField("device_status") private String deviceStatus; + /** + * 鎻愬崌鏈哄潗鏍� + */ + @ApiModelProperty(value= "鎻愬崌鏈哄潗鏍�") + @TableField("point") + private String point; + public BasLift() {} public BasLift(Integer liftNo, Integer status, Integer wrkNo, Date updateTime, Long updateBy, String memo, Boolean pakMk, String deviceStatus) { @@ -108,4 +117,11 @@ return null; } + public NyShuttleProtocol.NyShuttlePointClass getPoint$() { + if (Cools.isEmpty(this.point)){ + return null; + } + return JSON.parseObject(this.point, NyShuttleProtocol.NyShuttlePointClass.class); + } + } diff --git a/src/main/java/com/zy/asrs/entity/LocDetl.java b/src/main/java/com/zy/asrs/entity/LocDetl.java deleted file mode 100644 index ea03d50..0000000 --- a/src/main/java/com/zy/asrs/entity/LocDetl.java +++ /dev/null @@ -1,247 +0,0 @@ -package com.zy.asrs.entity; - -import com.baomidou.mybatisplus.annotations.TableField; -import com.baomidou.mybatisplus.annotations.TableName; -import com.core.common.Cools; -import com.core.common.SpringUtils; -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 java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("asr_loc_detl") -public class LocDetl implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value= "搴撲綅鍙�") - @TableField("loc_no") - private String locNo; - - @ApiModelProperty(value= "鎵樼洏鏉$爜") - private String zpallet; - - @ApiModelProperty(value= "鏁伴噺") - private Double anfme; - - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - private String matnr; - - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - private String maktx; - - @ApiModelProperty(value= "搴忓垪鐮�") - private String batch; - - @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @TableField("order_no") - private String orderNo; - - @ApiModelProperty(value= "瑙勬牸") - private String specs; - - @ApiModelProperty(value= "鍨嬪彿") - private String model; - - @ApiModelProperty(value= "棰滆壊") - private String color; - - @ApiModelProperty(value= "鍝佺墝") - private String brand; - - @ApiModelProperty(value= "鍗曚綅") - private String unit; - - @ApiModelProperty(value= "鍗曚环") - private Double price; - - @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; - - @ApiModelProperty(value= "鐢熶骇鏃ユ湡") - @TableField("manu_date") - private String manuDate; - - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - @ApiModelProperty(value= "閲嶉噺") - private Double weight; - - @ApiModelProperty(value= "闀垮害") - private Double length; - - @ApiModelProperty(value= "浣撶Н") - private Double volume; - - @ApiModelProperty(value= "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - @ApiModelProperty(value= "渚涘簲鍟�") - private String supp; - - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - private String deadTime; - - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - private Integer deadWarn; - - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("modi_user") - private Long modiUser; - - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("modi_time") - private Date modiTime; - - @ApiModelProperty(value= "鍒涘缓鑰�") - @TableField("appe_user") - private Long appeUser; - - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("appe_time") - private Date appeTime; - - @ApiModelProperty(value= "澶囨敞") - private String memo; - - public String getLocNo$(){ - LocMastService service = SpringUtils.getBean(LocMastService.class); - LocMast locMast = service.selectById(this.locNo); - if (!Cools.isEmpty(locMast)){ - return String.valueOf(locMast.getLocNo()); - } - return null; - } - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getModiUser$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.modiUser); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getModiTime$(){ - if (Cools.isEmpty(this.modiTime)){ - return ""; - } - 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); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getAppeTime$(){ - if (Cools.isEmpty(this.appeTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); - } - - public void sync(Object source) { - Synchro.Copy(source, this); - } - -} diff --git a/src/main/java/com/zy/asrs/entity/Mat.java b/src/main/java/com/zy/asrs/entity/Mat.java deleted file mode 100644 index 48feb8e..0000000 --- a/src/main/java/com/zy/asrs/entity/Mat.java +++ /dev/null @@ -1,492 +0,0 @@ -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.core.common.Cools; -import com.core.common.SpringUtils; -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.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("man_mat") -public class Mat implements Serializable { - - @TableField(exist = false) - private Double stock; - - public Double getStock() { - return stock; - } - - public void setStock(Double stock) { - this.stock = stock; - } - - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @ApiModelProperty(value= "ID") - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 缂栧彿 - */ - @ApiModelProperty(value= "缂栧彿") - private String uuid; - - /** - * 鎵�灞炲綊绫� - */ - @ApiModelProperty(value= "鎵�灞炲綊绫�") - @TableField("tag_id") - private Long tagId; - - /** - * 鍟嗗搧缂栧彿 - */ - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - @ExcelProperty(value = "鍟嗗搧缂栫爜") - private String matnr; - - - /** - * 鍟嗗搧鍚嶇О - */ - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - @ExcelProperty(value = "鍟嗗搧鍚嶇О") - private String maktx; - - /** - * 鍒悕 - */ - @ApiModelProperty(value= "鍒悕") - @ExcelProperty(value = "鍒悕") - private String name; - - /** - * 瑙勬牸 - */ - @ApiModelProperty(value= "瑙勬牸") - @ExcelProperty(value = "瑙勬牸") - private String specs; - - /** - * 鍨嬪彿 - */ - @ApiModelProperty(value= "鍨嬪彿") - @ExcelProperty(value = "鍨嬪彿") - private String model; - - /** - * 棰滆壊 - */ - @ApiModelProperty(value= "棰滆壊") - @ExcelProperty(value = "棰滆壊") - private String color; - - /** - * 鍝佺墝 - */ - @ApiModelProperty(value= "鍝佺墝") - @ExcelProperty(value = "鍝佺墝") - private String brand; - - /** - * 鍗曚綅 - */ - @ApiModelProperty(value= "鍗曚綅") - @ExcelProperty(value = "鍗曚綅") - private String unit; - - /** - * 鍗曚环 - */ - @ApiModelProperty(value= "鍗曚环") - @ExcelProperty(value = "鍗曚环") - private Double price; - - /** - * sku - */ - @ApiModelProperty(value= "sku") - @ExcelProperty(value = "sku") - private String sku; - - /** - * 鍗曚綅閲� - */ - @ApiModelProperty(value= "鍗曚綅閲�") - @ExcelProperty(value = "鍗曚綅閲�") - private Double units; - - /** - * 鏉$爜 - */ - @ApiModelProperty(value= "鏉$爜") - @ExcelProperty(value = "鏉$爜") - private String barcode; - - /** - * 浜у湴 - */ - @ApiModelProperty(value= "浜у湴") - @ExcelProperty(value = "浜у湴") - private String origin; - - /** - * 鍘傚 - */ - @ApiModelProperty(value= "鍘傚") - @ExcelProperty(value = "鍘傚") - private String manu; - - /** - * 鐢熶骇鏃ユ湡 - */ - @ApiModelProperty(value= "鐢熶骇鏃ユ湡") - @ExcelProperty(value = "鐢熶骇鏃ユ湡") - @TableField("manu_date") - private String manuDate; - - /** - * 鍝侀」鏁� - */ - @ApiModelProperty(value= "鍝侀」鏁�") - @ExcelProperty(value = "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - /** - * 瀹夊叏搴撳瓨閲� - */ - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @ExcelProperty(value = "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - /** - * 閲嶉噺 - */ - @ApiModelProperty(value= "閲嶉噺") - @ExcelProperty(value = "閲嶉噺") - private Double weight; - - /** - * 闀垮害 - */ - @ApiModelProperty(value= "闀垮害") - @ExcelProperty(value = "闀垮害") - private Double length; - - /** - * 浣撶Н - */ - @ApiModelProperty(value= "浣撶Н") - @ExcelProperty(value = "浣撶Н") - private Double volume; - - /** - * 涓夋柟缂栫爜 - */ - @ApiModelProperty(value= "涓夋柟缂栫爜") - @ExcelProperty(value = "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - /** - * 渚涘簲鍟� - */ - @ApiModelProperty(value= "渚涘簲鍟�") - @ExcelProperty(value = "渚涘簲鍟�") - private String supp; - - /** - * 渚涘簲鍟嗙紪鐮� - */ - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @ExcelProperty(value = "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - /** - * 鏄惁鎵规 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - /** - * 淇濊川鏈� - */ - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - @ExcelProperty(value = "淇濊川鏈�") - private String deadTime; - - /** - * 棰勮澶╂暟 - */ - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - @ExcelProperty(value = "棰勮澶╂暟") - private Integer deadWarn; - - /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 - */ - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - /** - * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - /** - * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - /** - * 鐘舵�� 1: 姝e父 0: 绂佺敤 - */ - @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ") - private Integer status; - - /** - * 娣诲姞浜哄憳 - */ - @ApiModelProperty(value= "娣诲姞浜哄憳") - @TableField("create_by") - private Long createBy; - - /** - * 娣诲姞鏃堕棿 - */ - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("create_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 淇敼浜哄憳 - */ - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("update_by") - private Long updateBy; - - /** - * 淇敼鏃堕棿 - */ - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("update_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 澶囨敞 - */ - @ApiModelProperty(value= "澶囨敞") - @ExcelProperty(value = "澶囨敞") - private String memo; - - /** - * 鏃у晢鍝佺紪鍙� - */ - @ApiModelProperty(value= "鏃у晢鍝佺紪鍙�") - @ExcelProperty(value = "鏃у晢鍝佺紪鐮�") - private String matnr2; - - 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 inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { - this.uuid = uuid; - this.tagId = tagId; - this.matnr = matnr; - this.maktx = maktx; - this.name = name; - this.specs = specs; - this.model = model; - this.color = color; - this.brand = brand; - this.unit = unit; - this.price = price; - this.sku = sku; - this.units = units; - this.barcode = barcode; - this.origin = origin; - this.manu = manu; - this.manuDate = manuDate; - this.itemNum = itemNum; - this.safeQty = safeQty; - this.weight = weight; - this.length = length; - this.volume = volume; - this.threeCode = threeCode; - this.supp = supp; - this.suppCode = suppCode; - this.beBatch = beBatch; - this.deadTime = deadTime; - this.deadWarn = deadWarn; - this.source = source; - this.inspect = inspect; - this.danger = danger; - this.status = status; - this.createBy = createBy; - this.createTime = createTime; - this.updateBy = updateBy; - this.updateTime = updateTime; - this.memo = memo; - } - -// Mat mat = new Mat( -// null, // 缂栧彿 -// null, // 鎵�灞炲綊绫� -// null, // 鍟嗗搧缂栧彿 -// null, // 鍟嗗搧鍚嶇О -// null, // 鍒悕 -// null, // 瑙勬牸 -// null, // 鍨嬪彿 -// null, // 棰滆壊 -// null, // 鍝佺墝 -// null, // 鍗曚綅 -// null, // 鍗曚环 -// null, // sku -// null, // 鍗曚綅閲� -// null, // 鏉$爜 -// null, // 浜у湴 -// null, // 鍘傚 -// null, // 鐢熶骇鏃ユ湡 -// null, // 鍝侀」鏁� -// null, // 瀹夊叏搴撳瓨閲� -// null, // 閲嶉噺 -// null, // 闀垮害 -// null, // 浣撶Н -// null, // 涓夋柟缂栫爜 -// null, // 渚涘簲鍟� -// null, // 渚涘簲鍟嗙紪鐮� -// null, // 鏄惁鎵规 -// null, // 淇濊川鏈� -// null, // 棰勮澶╂暟 -// null, // 鍒惰喘 -// null, // 瑕佹眰妫�楠� -// null, // 鍗遍櫓鍝� -// null, // 鐘舵�乕闈炵┖] -// null, // 娣诲姞浜哄憳 -// null, // 娣诲姞鏃堕棿 -// null, // 淇敼浜哄憳 -// null, // 淇敼鏃堕棿 -// null // 澶囨敞 -// ); - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getStatus$(){ - if (null == this.status){ return null; } - switch (this.status){ - case 1: - return "姝e父"; - case 0: - return "绂佺敤"; - default: - return String.valueOf(this.status); - } - } - - public String getCreateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.createBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getCreateTime$(){ - if (Cools.isEmpty(this.createTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); - } - - public String getUpdateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.updateBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getUpdateTime$(){ - if (Cools.isEmpty(this.updateTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); - } - - -} diff --git a/src/main/java/com/zy/asrs/entity/Order.java b/src/main/java/com/zy/asrs/entity/Order.java deleted file mode 100644 index c32bd50..0000000 --- a/src/main/java/com/zy/asrs/entity/Order.java +++ /dev/null @@ -1,422 +0,0 @@ -package com.zy.asrs.entity; - -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.core.common.Cools; -import com.core.common.SpringUtils; -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.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("man_order") -public class Order implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @ApiModelProperty(value= "ID") - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 缂栧彿 - */ - @ApiModelProperty(value= "缂栧彿") - private String uuid; - - /** - * 璁㈠崟缂栧彿 - */ - @ApiModelProperty(value= "璁㈠崟缂栧彿") - @TableField("order_no") - private String orderNo; - - /** - * 鍗曟嵁鏃ユ湡 - */ - @ApiModelProperty(value= "鍗曟嵁鏃ユ湡") - @TableField("order_time") - private String orderTime; - - /** - * 鍗曟嵁绫诲瀷 - */ - @ApiModelProperty(value= "鍗曟嵁绫诲瀷") - @TableField("doc_type") - private Long docType; - - /** - * 椤圭洰缂栧彿 - */ - @ApiModelProperty(value= "椤圭洰缂栧彿") - @TableField("item_id") - private Long itemId; - - @ApiModelProperty(value= "") - @TableField("item_name") - private String itemName; - - /** - * 璋冩嫧椤圭洰缂栧彿 - */ - @ApiModelProperty(value= "璋冩嫧椤圭洰缂栧彿") - @TableField("allot_item_id") - private Long allotItemId; - - /** - * 鍒濆绁ㄦ嵁鍙� - */ - @ApiModelProperty(value= "鍒濆绁ㄦ嵁鍙�") - @TableField("def_number") - private String defNumber; - - /** - * 绁ㄦ嵁鍙� - */ - @ApiModelProperty(value= "绁ㄦ嵁鍙�") - private String number; - - /** - * 瀹㈡埛缂栧彿 - */ - @ApiModelProperty(value= "瀹㈡埛缂栧彿") - private Long cstmr; - - /** - * 瀹㈡埛 - */ - @ApiModelProperty(value= "瀹㈡埛") - @TableField("cstmr_name") - private String cstmrName; - - /** - * 鑱旂郴鏂瑰紡 - */ - @ApiModelProperty(value= "鑱旂郴鏂瑰紡") - private String tel; - - /** - * 鎿嶄綔浜哄憳 - */ - @ApiModelProperty(value= "鎿嶄綔浜哄憳") - @TableField("oper_memb") - private String operMemb; - - /** - * 鍚堣閲戦 - */ - @ApiModelProperty(value= "鍚堣閲戦") - @TableField("total_fee") - private Double totalFee; - - /** - * 浼樻儬鐜� - */ - @ApiModelProperty(value= "浼樻儬鐜�") - private Double discount; - - /** - * 浼樻儬閲戦 - */ - @ApiModelProperty(value= "浼樻儬閲戦") - @TableField("discount_fee") - private Double discountFee; - - /** - * 閿�鍞垨閲囪喘璐圭敤鍚堣 - */ - @ApiModelProperty(value= "閿�鍞垨閲囪喘璐圭敤鍚堣") - @TableField("other_fee") - private Double otherFee; - - /** - * 瀹炰粯閲戦 - */ - @ApiModelProperty(value= "瀹炰粯閲戦") - @TableField("act_fee") - private Double actFee; - - /** - * 浠樻绫诲瀷 1: 鐜伴噾 2: 璁拌处 - */ - @ApiModelProperty(value= "浠樻绫诲瀷 1: 鐜伴噾 2: 璁拌处 ") - @TableField("pay_type") - private Integer payType; - - /** - * 涓氬姟鍛� - */ - @ApiModelProperty(value= "涓氬姟鍛�") - private String salesman; - - /** - * 缁撶畻澶╂暟 - */ - @ApiModelProperty(value= "缁撶畻澶╂暟") - @TableField("account_day") - private Integer accountDay; - - /** - * 閭垂鏀粯绫诲瀷 1: 鍦ㄧ嚎鏀粯 2: 璐у埌浠樻 - */ - @ApiModelProperty(value= "閭垂鏀粯绫诲瀷 1: 鍦ㄧ嚎鏀粯 2: 璐у埌浠樻 ") - @TableField("post_fee_type") - private Integer postFeeType; - - /** - * 閭垂 - */ - @ApiModelProperty(value= "閭垂") - @TableField("post_fee") - private Double postFee; - - /** - * 浠樻鏃堕棿 - */ - @ApiModelProperty(value= "浠樻鏃堕棿") - @TableField("pay_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date payTime; - - /** - * 鍙戣揣鏃堕棿 - */ - @ApiModelProperty(value= "鍙戣揣鏃堕棿") - @TableField("send_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date sendTime; - - /** - * 鐗╂祦鍚嶇О - */ - @ApiModelProperty(value= "鐗╂祦鍚嶇О") - @TableField("ship_name") - private String shipName; - - /** - * 鐗╂祦鍗曞彿 - */ - @ApiModelProperty(value= "鐗╂祦鍗曞彿") - @TableField("ship_code") - private String shipCode; - - /** - * 璁㈠崟鐘舵�� - */ - @ApiModelProperty(value= "璁㈠崟鐘舵��") - private Long settle; - - /** - * 鐘舵�� 1: 姝e父 0: 绂佺敤 - */ - @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ") - private Integer status; - - /** - * 娣诲姞浜哄憳 - */ - @ApiModelProperty(value= "娣诲姞浜哄憳") - @TableField("create_by") - private Long createBy; - - /** - * 娣诲姞鏃堕棿 - */ - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("create_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 淇敼浜哄憳 - */ - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("update_by") - private Long updateBy; - - /** - * 淇敼鏃堕棿 - */ - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("update_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 澶囨敞 - */ - @ApiModelProperty(value= "澶囨敞") - private String memo; - - public Order() {} - - public Order(String uuid,String orderNo,String orderTime,Long docType,Long itemId,String itemName,Long allotItemId,String defNumber,String number,Long cstmr,String cstmrName,String tel,String operMemb,Double totalFee,Double discount,Double discountFee,Double otherFee,Double actFee,Integer payType,String salesman,Integer accountDay,Integer postFeeType,Double postFee,Date payTime,Date sendTime,String shipName,String shipCode,Long settle,Integer status,Long createBy,Date createTime,Long updateBy,Date updateTime,String memo) { - this.uuid = uuid; - this.orderNo = orderNo; - this.orderTime = orderTime; - this.docType = docType; - this.itemId = itemId; - this.itemName = itemName; - this.allotItemId = allotItemId; - this.defNumber = defNumber; - this.number = number; - this.cstmr = cstmr; - this.cstmrName = cstmrName; - this.tel = tel; - this.operMemb = operMemb; - this.totalFee = totalFee; - this.discount = discount; - this.discountFee = discountFee; - this.otherFee = otherFee; - this.actFee = actFee; - this.payType = payType; - this.salesman = salesman; - this.accountDay = accountDay; - this.postFeeType = postFeeType; - this.postFee = postFee; - this.payTime = payTime; - this.sendTime = sendTime; - this.shipName = shipName; - this.shipCode = shipCode; - this.settle = settle; - this.status = status; - this.createBy = createBy; - this.createTime = createTime; - this.updateBy = updateBy; - this.updateTime = updateTime; - this.memo = memo; - } - -// Order order = new Order( -// null, // 缂栧彿[闈炵┖] -// null, // 璁㈠崟缂栧彿 -// null, // 鍗曟嵁鏃ユ湡 -// null, // 鍗曟嵁绫诲瀷 -// null, // 椤圭洰缂栧彿 -// null, // -// null, // 璋冩嫧椤圭洰缂栧彿 -// null, // 鍒濆绁ㄦ嵁鍙� -// null, // 绁ㄦ嵁鍙� -// null, // 瀹㈡埛缂栧彿 -// null, // 瀹㈡埛 -// null, // 鑱旂郴鏂瑰紡 -// null, // 鎿嶄綔浜哄憳 -// null, // 鍚堣閲戦 -// null, // 浼樻儬鐜� -// null, // 浼樻儬閲戦 -// null, // 閿�鍞垨閲囪喘璐圭敤鍚堣 -// null, // 瀹炰粯閲戦 -// null, // 浠樻绫诲瀷 -// null, // 涓氬姟鍛� -// null, // 缁撶畻澶╂暟 -// null, // 閭垂鏀粯绫诲瀷 -// null, // 閭垂 -// null, // 浠樻鏃堕棿 -// null, // 鍙戣揣鏃堕棿 -// null, // 鐗╂祦鍚嶇О -// null, // 鐗╂祦鍗曞彿 -// null, // 璁㈠崟鐘舵�� -// null, // 鐘舵�� -// null, // 娣诲姞浜哄憳 -// null, // 娣诲姞鏃堕棿 -// null, // 淇敼浜哄憳 -// null, // 淇敼鏃堕棿 -// null // 澶囨敞 -// ); - - - public String getPayType$(){ - if (null == this.payType){ return null; } - switch (this.payType){ - case 1: - return "鐜伴噾"; - case 2: - return "璁拌处"; - default: - return String.valueOf(this.payType); - } - } - - public String getPostFeeType$(){ - if (null == this.postFeeType){ return null; } - switch (this.postFeeType){ - case 1: - return "鍦ㄧ嚎鏀粯"; - case 2: - return "璐у埌浠樻"; - default: - return String.valueOf(this.postFeeType); - } - } - - public String getPayTime$(){ - if (Cools.isEmpty(this.payTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.payTime); - } - - public String getSendTime$(){ - if (Cools.isEmpty(this.sendTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.sendTime); - } - - public String getStatus$(){ - if (null == this.status){ return null; } - switch (this.status){ - case 1: - return "姝e父"; - case 0: - return "绂佺敤"; - default: - return String.valueOf(this.status); - } - } - - public String getCreateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.createBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getCreateTime$(){ - if (Cools.isEmpty(this.createTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); - } - - public String getUpdateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.updateBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getUpdateTime$(){ - if (Cools.isEmpty(this.updateTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); - } - - -} diff --git a/src/main/java/com/zy/asrs/entity/OrderDetl.java b/src/main/java/com/zy/asrs/entity/OrderDetl.java deleted file mode 100644 index 0ee978f..0000000 --- a/src/main/java/com/zy/asrs/entity/OrderDetl.java +++ /dev/null @@ -1,441 +0,0 @@ -package com.zy.asrs.entity; - -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.core.common.Cools; -import com.core.common.SpringUtils; -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.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("man_order_detl") -public class OrderDetl implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * ID - */ - @ApiModelProperty(value= "ID") - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 璁㈠崟鍐呯爜 - */ - @ApiModelProperty(value= "璁㈠崟鍐呯爜") - @TableField("order_id") - private Long orderId; - - /** - * 鍗曟嵁缂栧彿 - */ - @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @TableField("order_no") - private String orderNo; - - - /** - * 鏁伴噺 - */ - @ApiModelProperty(value= "鏁伴噺") - private Double anfme; - - /** - * 浣滀笟鏁伴噺 - * - * 1. 鍏ュ簱 : qty 馃憜 - * 1. 鍑哄簱 : qty 馃憜 - */ - @ApiModelProperty(value= "浣滀笟鏁伴噺") - private Double qty; - - /** - * 鐗╂枡鍙� - */ - @ApiModelProperty(value= "鐗╂枡鍙�") - private String matnr; - - /** - * 鐗╂枡鍙� - */ - @ApiModelProperty(value= "鐗╂枡鍙�") - private String maktx; - - /** - * 搴忓垪鐮� - */ - @ApiModelProperty(value= "搴忓垪鐮�") - private String batch; - - /** - * 瑙勬牸 - */ - @ApiModelProperty(value= "瑙勬牸") - private String specs; - - /** - * 鎵规 - */ - @ApiModelProperty(value= "鎵规") - private String model; - - /** - * 棰滆壊 - */ - @ApiModelProperty(value= "棰滆壊") - private String color; - - /** - * 鍝佺墝 - */ - @ApiModelProperty(value= "鍝佺墝") - private String brand; - - /** - * 鍗曚綅 - */ - @ApiModelProperty(value= "鍗曚綅") - private String unit; - - /** - * 鍗曚环 - */ - @ApiModelProperty(value= "鍗曚环") - 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; - - /** - * 鍗曟嵁鏃堕棿 - */ - @ApiModelProperty(value= "鍗曟嵁鏃堕棿") - @TableField("manu_date") - private String manuDate; - - /** - * 鍝侀」鏁� - */ - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - /** - * 瀹夊叏搴撳瓨閲� - */ - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - /** - * 閲嶉噺 - */ - @ApiModelProperty(value= "閲嶉噺") - private Double weight; - - /** - * 闀垮害 - */ - @ApiModelProperty(value= "闀垮害") - private Double length; - - /** - * 浣撶Н - */ - @ApiModelProperty(value= "浣撶Н") - private Double volume; - - /** - * 涓夋柟缂栫爜 - */ - @ApiModelProperty(value= "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - /** - * 渚涘簲鍟� - */ - @ApiModelProperty(value= "渚涘簲鍟�") - private String supp; - - /** - * 渚涘簲鍟嗙紪鐮� - */ - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - /** - * 鏄惁鎵规 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - /** - * 淇濊川鏈� - */ - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - private String deadTime; - - /** - * 棰勮澶╂暟 - */ - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - private Integer deadWarn; - - /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 - */ - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - /** - * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - /** - * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - /** - * 鐘舵�� 1: 姝e父 0: 绂佺敤 - */ - @ApiModelProperty(value= "鐘舵�� 1: 姝e父 0: 绂佺敤 ") - private Integer status; - - /** - * 娣诲姞浜哄憳 - */ - @ApiModelProperty(value= "娣诲姞浜哄憳") - @TableField("create_by") - private Long createBy; - - /** - * 娣诲姞鏃堕棿 - */ - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("create_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date createTime; - - /** - * 淇敼浜哄憳 - */ - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("update_by") - private Long updateBy; - - /** - * 淇敼鏃堕棿 - */ - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("update_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date updateTime; - - /** - * 澶囨敞 - */ - @ApiModelProperty(value= "澶囨敞") - private String memo; - - 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 inspect, Integer danger, Integer status, Long createBy, Date createTime, Long updateBy, Date updateTime, String memo) { - this.orderId = orderId; - this.orderNo = orderNo; - this.anfme = anfme; - this.qty = qty; - this.matnr = matnr; - this.maktx = maktx; - this.batch = batch; - this.specs = specs; - this.model = model; - this.color = color; - this.brand = brand; - this.unit = unit; - this.price = price; - this.sku = sku; - this.units = units; - this.barcode = barcode; - this.origin = origin; - this.manu = manu; - this.manuDate = manuDate; - this.itemNum = itemNum; - this.safeQty = safeQty; - this.weight = weight; - this.length = length; - this.volume = volume; - this.threeCode = threeCode; - this.supp = supp; - this.suppCode = suppCode; - this.beBatch = beBatch; - this.deadTime = deadTime; - this.deadWarn = deadWarn; - this.source = source; - this.inspect = inspect; - this.danger = danger; - this.status = status; - this.createBy = createBy; - this.createTime = createTime; - this.updateBy = updateBy; - this.updateTime = updateTime; - this.memo = memo; - } - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getStatus$(){ - if (null == this.status){ return null; } - switch (this.status){ - case 1: - return "姝e父"; - case 0: - return "绂佺敤"; - default: - return String.valueOf(this.status); - } - } - - public String getCreateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.createBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getCreateTime$(){ - if (Cools.isEmpty(this.createTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime); - } - - public String getUpdateBy$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.updateBy); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getUpdateTime$(){ - if (Cools.isEmpty(this.updateTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime); - } - - public Double getEnableQty() { - Double enableQty = null; - if (null != this.anfme && this.qty != null) { - enableQty = this.anfme - this.qty; - if (enableQty < 0) { - enableQty = 0.0D; - } -// return this.anfme - this.qty; - } - return enableQty; - } - - public void sync(Object source) { - Synchro.Copy(source, this); - } - -} diff --git a/src/main/java/com/zy/asrs/entity/WaitPakin.java b/src/main/java/com/zy/asrs/entity/WaitPakin.java deleted file mode 100644 index 78185ae..0000000 --- a/src/main/java/com/zy/asrs/entity/WaitPakin.java +++ /dev/null @@ -1,222 +0,0 @@ -package com.zy.asrs.entity; - -import com.baomidou.mybatisplus.annotations.TableField; -import com.baomidou.mybatisplus.annotations.TableName; -import com.core.common.Cools; -import com.zy.common.utils.Synchro; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("cust_wait_pakin") -public class WaitPakin implements Serializable { - - private static final long serialVersionUID = 1L; - - @ApiModelProperty(value= "鎵樼洏鏉$爜") - private String zpallet; - - @ApiModelProperty(value= "鏁伴噺") - private Double anfme; - - @ApiModelProperty(value= "搴撲綅鍙�") - @TableField("loc_no") - private String locNo; - - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - private String matnr; - - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - private String maktx; - - @ApiModelProperty(value= "搴忓垪鐮�") - private String batch; - - @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @TableField("order_no") - private String orderNo; - - @ApiModelProperty(value= "瑙勬牸") - private String specs; - - @ApiModelProperty(value= "鍨嬪彿") - private String model; - - @ApiModelProperty(value= "棰滆壊") - private String color; - - @ApiModelProperty(value= "鍝佺墝") - private String brand; - - @ApiModelProperty(value= "鍗曚綅") - private String unit; - - @ApiModelProperty(value= "鍗曚环") - private Double price; - - @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; - - @ApiModelProperty(value= "鐢熶骇鏃ユ湡") - @TableField("manu_date") - private String manuDate; - - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - @ApiModelProperty(value= "閲嶉噺") - private Double weight; - - @ApiModelProperty(value= "闀垮害") - private Double length; - - @ApiModelProperty(value= "浣撶Н") - private Double volume; - - @ApiModelProperty(value= "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - @ApiModelProperty(value= "渚涘簲鍟�") - private String supp; - - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - private String deadTime; - - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - private Integer deadWarn; - - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - @ApiModelProperty(value= "鐘舵��") - private String status; - - @ApiModelProperty(value= "鍏ュ嚭鐘舵��") - @TableField("io_status") - private String ioStatus; - - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("modi_time") - private Date modiTime; - - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("modi_user") - private Long modiUser; - - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("appe_time") - private Date appeTime; - - @ApiModelProperty(value= "鍒涘缓鑰�") - @TableField("appe_user") - private Long appeUser; - - @ApiModelProperty(value= "澶囨敞") - private String memo; - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getModiTime$(){ - if (Cools.isEmpty(this.modiTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.modiTime); - } - - public String getAppeTime$(){ - if (Cools.isEmpty(this.appeTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); - } - - public void sync(Object source) { - Synchro.Copy(source, this); - } -} diff --git a/src/main/java/com/zy/asrs/entity/WrkDetl.java b/src/main/java/com/zy/asrs/entity/WrkDetl.java deleted file mode 100644 index c0e078f..0000000 --- a/src/main/java/com/zy/asrs/entity/WrkDetl.java +++ /dev/null @@ -1,371 +0,0 @@ -package com.zy.asrs.entity; - -import com.baomidou.mybatisplus.annotations.TableField; -import com.baomidou.mybatisplus.annotations.TableName; -import com.core.common.Cools; -import com.core.common.SpringUtils; -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 java.io.Serializable; -import java.text.SimpleDateFormat; -import java.util.Date; - -@Data -@TableName("asr_wrk_detl") -public class WrkDetl implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 宸ヤ綔鍙� - */ - @ApiModelProperty(value= "宸ヤ綔鍙�") - @TableField("wrk_no") - private Integer wrkNo; - - /** - * 宸ヤ綔鏃堕棿 - */ - @ApiModelProperty(value= "宸ヤ綔鏃堕棿") - @TableField("io_time") - private Date ioTime; - - /** - * 浣滀笟鏁伴噺 - */ - @ApiModelProperty(value= "浣滀笟鏁伴噺") - private Double anfme; - - /** - * 鎬诲簱瀛� - */ - @ApiModelProperty(value= "鎬诲簱瀛�") - private Double stock; - - /** - * 鎵樼洏鏉$爜 - */ - @ApiModelProperty(value= "鎵樼洏鏉$爜") - private String zpallet; - - /** - * 鐗╂枡 - */ - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - private String matnr; - - /** - * 鐗╂枡鎻忚堪 - */ - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - private String maktx; - - /** - * 搴忓垪鐮� - */ - @ApiModelProperty(value= "搴忓垪鐮�") - private String batch; - - /** - * 鍗曟嵁缂栧彿 - */ - @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @TableField("order_no") - private String orderNo; - - /** - * 瑙勬牸 - */ - @ApiModelProperty(value= "瑙勬牸") - private String specs; - - /** - * 鍨嬪彿 - */ - @ApiModelProperty(value= "鍨嬪彿") - private String model; - - /** - * 棰滆壊 - */ - @ApiModelProperty(value= "棰滆壊") - private String color; - - /** - * 鍝佺墝 - */ - @ApiModelProperty(value= "鍝佺墝") - private String brand; - - /** - * 鍗曚綅 - */ - @ApiModelProperty(value= "鍗曚綅") - private String unit; - - /** - * 鍗曚环 - */ - @ApiModelProperty(value= "鍗曚环") - 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; - - /** - * 鐢熶骇鏃ユ湡 - */ - @ApiModelProperty(value= "鐢熶骇鏃ユ湡") - @TableField("manu_date") - private String manuDate; - - /** - * 鍝侀」鏁� - */ - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - /** - * 瀹夊叏搴撳瓨閲� - */ - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - /** - * 閲嶉噺 - */ - @ApiModelProperty(value= "閲嶉噺") - private Double weight; - - /** - * 闀垮害 - */ - @ApiModelProperty(value= "闀垮害") - private Double length; - - /** - * 浣撶Н - */ - @ApiModelProperty(value= "浣撶Н") - private Double volume; - - /** - * 涓夋柟缂栫爜 - */ - @ApiModelProperty(value= "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - /** - * 渚涘簲鍟� - */ - @ApiModelProperty(value= "渚涘簲鍟�") - private String supp; - - /** - * 渚涘簲鍟嗙紪鐮� - */ - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - /** - * 鏄惁鎵规 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - /** - * 淇濊川鏈� - */ - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - private String deadTime; - - /** - * 棰勮澶╂暟 - */ - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - private Integer deadWarn; - - /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 - */ - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - /** - * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - /** - * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - /** - * 淇敼浜哄憳 - */ - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("modi_user") - private Long modiUser; - - /** - * 淇敼鏃堕棿 - */ - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("modi_time") - private Date modiTime; - - /** - * 鍒涘缓鑰� - */ - @ApiModelProperty(value= "鍒涘缓鑰�") - @TableField("appe_user") - private Long appeUser; - - /** - * 娣诲姞鏃堕棿 - */ - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("appe_time") - private Date appeTime; - - /** - * 澶囨敞 - */ - @ApiModelProperty(value= "澶囨敞") - private String memo; - - public String getIoTime$(){ - if (Cools.isEmpty(this.ioTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); - } - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getModiUser$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.modiUser); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getModiTime$(){ - if (Cools.isEmpty(this.modiTime)){ - return ""; - } - 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); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getAppeTime$(){ - if (Cools.isEmpty(this.appeTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); - } - - public void sync(Object source) { - Synchro.Copy(source, this); - } - -} diff --git a/src/main/java/com/zy/asrs/entity/WrkDetlLog.java b/src/main/java/com/zy/asrs/entity/WrkDetlLog.java deleted file mode 100644 index bed2968..0000000 --- a/src/main/java/com/zy/asrs/entity/WrkDetlLog.java +++ /dev/null @@ -1,463 +0,0 @@ -package com.zy.asrs.entity; - -import com.core.common.Cools;import com.baomidou.mybatisplus.annotations.TableField; -import java.text.SimpleDateFormat; -import java.util.Date; -import org.springframework.format.annotation.DateTimeFormat; -import com.core.common.SpringUtils; -import com.zy.system.service.UserService; -import com.zy.system.entity.User; -import java.text.SimpleDateFormat; -import java.util.Date; -import com.core.common.SpringUtils; -import com.zy.system.service.UserService; -import com.zy.system.entity.User; -import java.text.SimpleDateFormat; -import java.util.Date; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; -import com.baomidou.mybatisplus.annotations.TableName; -import java.io.Serializable; - -@Data -@TableName("asr_wrk_detl_log") -public class WrkDetlLog implements Serializable { - - private static final long serialVersionUID = 1L; - - /** - * 宸ヤ綔鍙� - */ - @ApiModelProperty(value= "宸ヤ綔鍙�") - @TableField("wrk_no") - private Integer wrkNo; - - /** - * 宸ヤ綔鏃堕棿 - */ - @ApiModelProperty(value= "宸ヤ綔鏃堕棿") - @TableField("io_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date ioTime; - - /** - * 浣滀笟鏁伴噺 - */ - @ApiModelProperty(value= "浣滀笟鏁伴噺") - private Double anfme; - - /** - * 鎬诲簱瀛� - */ - @ApiModelProperty(value= "鎬诲簱瀛�") - private Double stock; - - /** - * 鎵樼洏鏉$爜 - */ - @ApiModelProperty(value= "鎵樼洏鏉$爜") - private String zpallet; - - /** - * 鍟嗗搧缂栧彿 - */ - @ApiModelProperty(value= "鍟嗗搧缂栧彿") - private String matnr; - - /** - * 鍟嗗搧鍚嶇О - */ - @ApiModelProperty(value= "鍟嗗搧鍚嶇О") - private String maktx; - - /** - * 鎵瑰彿 - */ - @ApiModelProperty(value= "鎵瑰彿") - private String batch; - - /** - * 鍗曟嵁缂栧彿 - */ - @ApiModelProperty(value= "鍗曟嵁缂栧彿") - @TableField("order_no") - private String orderNo; - - /** - * 瑙勬牸 - */ - @ApiModelProperty(value= "瑙勬牸") - private String specs; - - /** - * 鍨嬪彿 - */ - @ApiModelProperty(value= "鍨嬪彿") - private String model; - - /** - * 棰滆壊 - */ - @ApiModelProperty(value= "棰滆壊") - private String color; - - /** - * 鍝佺墝 - */ - @ApiModelProperty(value= "鍝佺墝") - private String brand; - - /** - * 鍗曚綅 - */ - @ApiModelProperty(value= "鍗曚綅") - private String unit; - - /** - * 鍗曚环 - */ - @ApiModelProperty(value= "鍗曚环") - 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; - - /** - * 鐢熶骇鏃ユ湡 - */ - @ApiModelProperty(value= "鐢熶骇鏃ユ湡") - @TableField("manu_date") - private String manuDate; - - /** - * 鍝侀」鏁� - */ - @ApiModelProperty(value= "鍝侀」鏁�") - @TableField("item_num") - private String itemNum; - - /** - * 瀹夊叏搴撳瓨閲� - */ - @ApiModelProperty(value= "瀹夊叏搴撳瓨閲�") - @TableField("safe_qty") - private Double safeQty; - - /** - * 閲嶉噺 - */ - @ApiModelProperty(value= "閲嶉噺") - private Double weight; - - /** - * 闀垮害 - */ - @ApiModelProperty(value= "闀垮害") - private Double length; - - /** - * 浣撶Н - */ - @ApiModelProperty(value= "浣撶Н") - private Double volume; - - /** - * 涓夋柟缂栫爜 - */ - @ApiModelProperty(value= "涓夋柟缂栫爜") - @TableField("three_code") - private String threeCode; - - /** - * 渚涘簲鍟� - */ - @ApiModelProperty(value= "渚涘簲鍟�") - private String supp; - - /** - * 渚涘簲鍟嗙紪鐮� - */ - @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�") - @TableField("supp_code") - private String suppCode; - - /** - * 鏄惁鎵规 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鏄惁鎵规 1: 鏄� 0: 鍚� ") - @TableField("be_batch") - private Integer beBatch; - - /** - * 淇濊川鏈� - */ - @ApiModelProperty(value= "淇濊川鏈�") - @TableField("dead_time") - private String deadTime; - - /** - * 棰勮澶╂暟 - */ - @ApiModelProperty(value= "棰勮澶╂暟") - @TableField("dead_warn") - private Integer deadWarn; - - /** - * 鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 - */ - @ApiModelProperty(value= "鍒惰喘 1: 鍒堕�� 2: 閲囪喘 3: 澶栧崗 ") - private Integer source; - - /** - * 瑕佹眰妫�楠� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "瑕佹眰妫�楠� 1: 鏄� 0: 鍚� ") - private Integer inspect; - - /** - * 鍗遍櫓鍝� 1: 鏄� 0: 鍚� - */ - @ApiModelProperty(value= "鍗遍櫓鍝� 1: 鏄� 0: 鍚� ") - private Integer danger; - - /** - * 淇敼浜哄憳 - */ - @ApiModelProperty(value= "淇敼浜哄憳") - @TableField("modi_user") - private Long modiUser; - - /** - * 淇敼鏃堕棿 - */ - @ApiModelProperty(value= "淇敼鏃堕棿") - @TableField("modi_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date modiTime; - - /** - * 娣诲姞浜哄憳 - */ - @ApiModelProperty(value= "娣诲姞浜哄憳") - @TableField("appe_user") - private Long appeUser; - - /** - * 娣诲姞鏃堕棿 - */ - @ApiModelProperty(value= "娣诲姞鏃堕棿") - @TableField("appe_time") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") - private Date appeTime; - - /** - * 澶囨敞 - */ - @ApiModelProperty(value= "澶囨敞") - private String memo; - - public WrkDetlLog() {} - - public WrkDetlLog(Integer wrkNo,Date ioTime,Double anfme,String zpallet,String matnr,String maktx,String batch,String orderNo,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,Long modiUser,Date modiTime,Long appeUser,Date appeTime,String memo) { - this.wrkNo = wrkNo; - this.ioTime = ioTime; - this.anfme = anfme; - this.zpallet = zpallet; - this.matnr = matnr; - this.maktx = maktx; - this.batch = batch; - this.orderNo = orderNo; - this.specs = specs; - this.model = model; - this.color = color; - this.brand = brand; - this.unit = unit; - this.price = price; - this.sku = sku; - this.units = units; - this.barcode = barcode; - this.origin = origin; - this.manu = manu; - this.manuDate = manuDate; - this.itemNum = itemNum; - this.safeQty = safeQty; - this.weight = weight; - this.length = length; - this.volume = volume; - this.threeCode = threeCode; - this.supp = supp; - this.suppCode = suppCode; - this.beBatch = beBatch; - this.deadTime = deadTime; - this.deadWarn = deadWarn; - this.source = source; - this.inspect = inspect; - this.danger = danger; - this.modiUser = modiUser; - this.modiTime = modiTime; - this.appeUser = appeUser; - this.appeTime = appeTime; - this.memo = memo; - } - -// WrkDetlLog wrkDetlLog = new WrkDetlLog( -// null, // 宸ヤ綔鍙穂闈炵┖] -// null, // 宸ヤ綔鏃堕棿 -// null, // 鏁伴噺 -// null, // 鎵樼洏鏉$爜 -// null, // 鍟嗗搧缂栧彿[闈炵┖] -// null, // 鍟嗗搧鍚嶇О -// null, // 鎵瑰彿 -// null, // 鍗曟嵁缂栧彿 -// null, // 瑙勬牸 -// null, // 鍨嬪彿 -// null, // 棰滆壊 -// null, // 鍝佺墝 -// null, // 鍗曚綅 -// null, // 鍗曚环 -// null, // sku -// null, // 鍗曚綅閲� -// null, // 鏉$爜 -// null, // 浜у湴 -// null, // 鍘傚 -// null, // 鐢熶骇鏃ユ湡 -// null, // 鍝侀」鏁� -// null, // 瀹夊叏搴撳瓨閲� -// null, // 閲嶉噺 -// null, // 闀垮害 -// null, // 浣撶Н -// null, // 涓夋柟缂栫爜 -// null, // 渚涘簲鍟� -// null, // 渚涘簲鍟嗙紪鐮� -// null, // 鏄惁鎵规 -// null, // 淇濊川鏈� -// null, // 棰勮澶╂暟 -// null, // 鍒惰喘 -// null, // 瑕佹眰妫�楠� -// null, // 鍗遍櫓鍝� -// null, // 淇敼浜哄憳 -// null, // 淇敼鏃堕棿 -// null, // 娣诲姞浜哄憳 -// null, // 娣诲姞鏃堕棿 -// null // 澶囨敞 -// ); - - public String getIoTime$(){ - if (Cools.isEmpty(this.ioTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.ioTime); - } - - public String getBeBatch$(){ - if (null == this.beBatch){ return null; } - switch (this.beBatch){ - case 1: - return "鏄�"; - case 0: - return "鍚�"; - default: - return String.valueOf(this.beBatch); - } - } - - public String getSource$(){ - if (null == this.source){ return null; } - switch (this.source){ - case 1: - return "鍒堕��"; - case 2: - return "閲囪喘"; - case 3: - return "澶栧崗"; - default: - return String.valueOf(this.source); - } - } - - public String getInspect$(){ - if (null == this.inspect){ return null; } - switch (this.inspect){ - case 1: - return "鏄�"; - case 0: - 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); - } - } - - public String getModiUser$(){ - UserService service = SpringUtils.getBean(UserService.class); - User user = service.selectById(this.modiUser); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getModiTime$(){ - if (Cools.isEmpty(this.modiTime)){ - return ""; - } - 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); - if (!Cools.isEmpty(user)){ - return String.valueOf(user.getUsername()); - } - return null; - } - - public String getAppeTime$(){ - if (Cools.isEmpty(this.appeTime)){ - return ""; - } - return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.appeTime); - } - - -} diff --git a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java b/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java deleted file mode 100644 index bc2cd84..0000000 --- a/src/main/java/com/zy/asrs/mapper/LocDetlMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.LocDetl; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.apache.ibatis.annotations.Select; -import org.apache.ibatis.annotations.Update; -import org.springframework.stereotype.Repository; - -import java.util.List; -import java.util.Map; - -@Mapper -@Repository -public interface LocDetlMapper extends BaseMapper<LocDetl> { - - List<LocDetl> getStockOutPage(Map<String, Object> map); - - Integer getStockOutPageCount(Map<String, Object> map); - - @Update("update asr_loc_detl set anfme=#{anfme}, modi_time = getDate() where loc_no = #{locNo} and matnr = #{matnr}") - int updateAnfme(Double anfme, String locNo, String matnr); - - @Update("update asr_loc_detl set loc_no = #{newLocNo}, modi_time=getDate() where loc_no = #{oldLocNo}") - int updateLocNo(String newLocNo, String oldLocNo); - - @Select("SELECT ld.loc_no FROM asr_loc_detl ld LEFT JOIN asr_loc_mast lm ON ld.loc_no = lm.loc_no WHERE (1 = 1 AND ld.matnr = #{matnr} AND (lm.row1 >= #{start} AND lm.row1 <= #{end}) AND lm.loc_sts = 'F' AND DateDiff(dd, lm.modi_time, getdate()) = 0) ORDER BY lm.modi_time ASC") - List<String> selectSameDetlToday(@Param("matnr") String matnr, @Param("start") Integer start, @Param("end") Integer end); - -} diff --git a/src/main/java/com/zy/asrs/mapper/MatMapper.java b/src/main/java/com/zy/asrs/mapper/MatMapper.java deleted file mode 100644 index aa58928..0000000 --- a/src/main/java/com/zy/asrs/mapper/MatMapper.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.Mat; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -@Mapper -@Repository -public interface MatMapper extends BaseMapper<Mat> { - - Mat selectByMatnr(@Param("matnr")String matnr); - -} diff --git a/src/main/java/com/zy/asrs/mapper/OrderDetlMapper.java b/src/main/java/com/zy/asrs/mapper/OrderDetlMapper.java deleted file mode 100644 index 3e7d1ba..0000000 --- a/src/main/java/com/zy/asrs/mapper/OrderDetlMapper.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.OrderDetl; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; -import java.util.Map; - -@Mapper -@Repository -public interface OrderDetlMapper extends BaseMapper<OrderDetl> { - - OrderDetl selectItem(@Param("orderId") Long orderId, @Param("matnr") String matnr, @Param("batch") String batch); - - OrderDetl selectItemByOrderNo(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch); - - OrderDetl selectItemNoneOfBatch(@Param("orderNo")String orderNo, @Param("matnr")String matnr); - - OrderDetl selectItemOfBatch(@Param("matnr")String matnr, @Param("batch")String batch); - - List<OrderDetl> selectWorkingDetls(Long orderId); - - List<OrderDetl> getPakoutPage(Map<String, Object> map); - - Integer getPakoutPageCount(Map<String, Object> map); - - int increaseAnfme(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); - - int increase(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); - - int decrease(@Param("orderNo")String orderNo, @Param("matnr")String matnr, @Param("batch")String batch, @Param("qty")Double qty); - - int modifyStatus(@Param("orderId") Long orderId, @Param("status")Integer status); - - List<OrderDetl> selectRemainder(@Param("orderId") Long orderId); - - List<OrderDetl> selectByMatnr(@Param("matnr") String matnr); - -} diff --git a/src/main/java/com/zy/asrs/mapper/OrderMapper.java b/src/main/java/com/zy/asrs/mapper/OrderMapper.java deleted file mode 100644 index 774c1a7..0000000 --- a/src/main/java/com/zy/asrs/mapper/OrderMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.Order; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Mapper -@Repository -public interface OrderMapper extends BaseMapper<Order> { - - Order selectByOrderNo(@Param("orderNo") String orderNo); - - int updateSettle(@Param("orderId")Long orderId, @Param("settle")Long settle, @Param("userId")Long userId); - - List<Order> selectComplete(); - -} diff --git a/src/main/java/com/zy/asrs/mapper/WaitPakinMapper.java b/src/main/java/com/zy/asrs/mapper/WaitPakinMapper.java deleted file mode 100644 index cbca94b..0000000 --- a/src/main/java/com/zy/asrs/mapper/WaitPakinMapper.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.WaitPakin; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -@Mapper -@Repository -public interface WaitPakinMapper extends BaseMapper<WaitPakin> { - -} diff --git a/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java b/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java deleted file mode 100644 index 539b861..0000000 --- a/src/main/java/com/zy/asrs/mapper/WrkDetlLogMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.zy.asrs.mapper; - -import com.zy.asrs.entity.WrkDetlLog; -import com.baomidou.mybatisplus.mapper.BaseMapper; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Mapper -@Repository -public interface WrkDetlLogMapper extends BaseMapper<WrkDetlLog> { - - List<WrkDetlLog> selectLatestByWorkNo(Integer workNo, String barcode); - -} diff --git a/src/main/java/com/zy/asrs/mapper/WrkDetlMapper.java b/src/main/java/com/zy/asrs/mapper/WrkDetlMapper.java deleted file mode 100644 index 3b597f1..0000000 --- a/src/main/java/com/zy/asrs/mapper/WrkDetlMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.zy.asrs.mapper; - -import com.baomidou.mybatisplus.mapper.BaseMapper; -import com.zy.asrs.entity.WrkDetl; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -import java.util.List; - -@Mapper -@Repository -public interface WrkDetlMapper extends BaseMapper<WrkDetl> { - - List<WrkDetl> findByWorkNo(Integer workNo); - -} diff --git a/src/main/java/com/zy/asrs/service/LocDetlService.java b/src/main/java/com/zy/asrs/service/LocDetlService.java deleted file mode 100644 index 737a98c..0000000 --- a/src/main/java/com/zy/asrs/service/LocDetlService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.zy.asrs.service; - -import com.baomidou.mybatisplus.plugins.Page; -import com.baomidou.mybatisplus.service.IService; -import com.zy.asrs.entity.LocDetl; - -import java.util.List; - -public interface LocDetlService extends IService<LocDetl> { - - Page<LocDetl> getStockOut(Page<LocDetl> page); - - /** - * 淇敼搴撳瓨鏄庣粏鏁伴噺锛屽鏋滄暟閲忎负0锛屽垯鍒犻櫎璁板綍 - */ - boolean updateAnfme(Double anfme, String locNo, String matnr); - - boolean updateLocNo(String newLocNo, String oldLocNo); - - /** - * 鑾峰彇褰撳ぉ鐩稿悓瑙勬牸璐х墿鐨勬繁搴撲綅鍙� - * @param matnr 鐗╂枡鍙� - * @return locNo 搴撲綅鍙� - */ - List<String> getSameDetlToday(String matnr, Integer start, Integer end); - -} diff --git a/src/main/java/com/zy/asrs/service/LocMastService.java b/src/main/java/com/zy/asrs/service/LocMastService.java index 4dd365d..de5270c 100644 --- a/src/main/java/com/zy/asrs/service/LocMastService.java +++ b/src/main/java/com/zy/asrs/service/LocMastService.java @@ -7,63 +7,6 @@ public interface LocMastService extends IService<LocMast> { - /** - * 鍫嗗灈鏈哄搴旂殑鎺掑彿闆嗗悎 - */ - List<Integer> queryDistinctRow(Integer crnNo); - - /** - * 妫�绱㈠彲鐢ㄥ簱浣� - */ - LocMast queryFreeLocMast(Integer row, Short locType1); - - /** - * 鑾峰彇鍚岀粍璐ф灦鐨勭┖搴撲綅 - * @param sourceLocNo 婧愬簱浣� - * @return 鍚岀粍绌哄簱浣嶉泦鍚� - */ - List<String> queryGroupEmptyStock(String sourceLocNo); - - /** - * 鍫嗗灈鏈烘紨绀鸿幏鍙栨簮搴撲綅 - * @param crn - * @return - */ - LocMast queryDemoSourceLoc(Integer crn); - - /** - * 鍫嗗灈鏈烘紨绀鸿幏鍙栫洰鏍囧簱浣� - * @param crn - * @return - */ - LocMast queryDemoLoc(Integer crn); - - /** - * 妫�鏌ュ綋鍓嶅簱浣嶆墍灞炲贩閬撶殑绌哄簱浣嶆暟閲� - * @param locMast - * @return - */ - Boolean checkEmptyCount(LocMast locMast); - - /** - * 鍒ゆ柇褰撳墠搴撲綅鏄惁闇�瑕佸爢鍨涙満鎼Щ灏忚溅鍏�/鍑� - * @param locNo - */ -// void judgeCarInOut(String locNo); - - /** - * 鍒ゆ柇鏄惁鏄渶澶栧眰鐨勫簱浣� - * @param locNo - * @return - */ - Boolean isOutMost(String locNo, Boolean pakin); - - List<String> getDemoNextLoc(Integer crnNo); - - Boolean isShuttle(String locNo); - - Integer getOutCrnNo(LocMast locMast); - LocMast queryByLoc(String locNo); LocMast queryByQrCode(String qrCodeValue); diff --git a/src/main/java/com/zy/asrs/service/MatService.java b/src/main/java/com/zy/asrs/service/MatService.java deleted file mode 100644 index f36a51e..0000000 --- a/src/main/java/com/zy/asrs/service/MatService.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.zy.asrs.service; - -import com.baomidou.mybatisplus.service.IService; -import com.zy.asrs.entity.Mat; - -public interface MatService extends IService<Mat> { - - Mat selectByMatnr(String matnr); - -} diff --git a/src/main/java/com/zy/asrs/service/WrkDetlLogService.java b/src/main/java/com/zy/asrs/service/WrkDetlLogService.java deleted file mode 100644 index c964843..0000000 --- a/src/main/java/com/zy/asrs/service/WrkDetlLogService.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.zy.asrs.service; - -import com.zy.asrs.entity.WrkDetlLog; -import com.baomidou.mybatisplus.service.IService; - -import java.util.List; - -public interface WrkDetlLogService extends IService<WrkDetlLog> { - - List<WrkDetlLog> selectLatestByWorkNo(Integer workNo, String barcode); - -} diff --git a/src/main/java/com/zy/asrs/service/WrkDetlService.java b/src/main/java/com/zy/asrs/service/WrkDetlService.java deleted file mode 100644 index 7e93d07..0000000 --- a/src/main/java/com/zy/asrs/service/WrkDetlService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.zy.asrs.service; - -import com.baomidou.mybatisplus.service.IService; -import com.zy.asrs.entity.WaitPakin; -import com.zy.asrs.entity.WrkDetl; - -import java.util.List; - -public interface WrkDetlService extends IService<WrkDetl> { - - void createWorkDetail(Integer workNo, List<WaitPakin> waitPakins, String barcode); - - List<WrkDetl> findByWorkNo(Integer workNo); - -} diff --git a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java deleted file mode 100644 index 57f3645..0000000 --- a/src/main/java/com/zy/asrs/service/impl/LocDetlServiceImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.zy.asrs.service.impl; - -import com.baomidou.mybatisplus.mapper.EntityWrapper; -import com.baomidou.mybatisplus.plugins.Page; -import com.baomidou.mybatisplus.service.impl.ServiceImpl; -import com.zy.asrs.entity.LocDetl; -import com.zy.asrs.mapper.LocDetlMapper; -import com.zy.asrs.service.LocDetlService; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service("locDetlService") -public class LocDetlServiceImpl extends ServiceImpl<LocDetlMapper, LocDetl> implements LocDetlService { - - @Override - public Page<LocDetl> getStockOut(Page<LocDetl> page) { - page.setRecords(baseMapper.getStockOutPage(page.getCondition())); - page.setTotal(baseMapper.getStockOutPageCount(page.getCondition())); - return page; - } - - @Override - public boolean updateAnfme(Double anfme, String locNo, String matnr) { - if (anfme <= 0) { - return delete(new EntityWrapper<LocDetl>().eq("loc_no", locNo).eq("matnr", matnr)); - } else { - int res = baseMapper.updateAnfme(anfme, locNo, matnr); - return res > 0; - } - } - - @Override - public boolean updateLocNo(String newLocNo, String oldLocNo) { - return baseMapper.updateLocNo(newLocNo, oldLocNo) > 0; - } - - @Override - public List<String> getSameDetlToday(String matnr, Integer start, Integer end) { - return this.baseMapper.selectSameDetlToday(matnr, start, end); - } - -} diff --git a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java index e0b8feb..3fabe71 100644 --- a/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/LocMastServiceImpl.java @@ -15,70 +15,6 @@ public class LocMastServiceImpl extends ServiceImpl<LocMastMapper, LocMast> implements LocMastService { @Override - public List<Integer> queryDistinctRow(Integer crnNo) { - return this.baseMapper.queryDistinctRow(crnNo); - } - - @Override - public LocMast queryFreeLocMast(Integer row, Short locType1) { - return this.baseMapper.queryFreeLocMast(row, locType1); - } - - @Override - public List<String> queryGroupEmptyStock(String sourceLocNo) { - if (Cools.isEmpty(sourceLocNo)) { - return null; - } - LocMast sourceStock = this.selectById(sourceLocNo); - if (Cools.isEmpty(sourceStock)) { - return null; - } - return this.baseMapper.queryGroupEmptyStock(sourceStock.getCrnNo()); - } - - @Override - public LocMast queryDemoSourceLoc(Integer crn) { - return this.baseMapper.queryDemoSourceLoc(crn); - } - - @Override - public LocMast queryDemoLoc(Integer crn) { - return this.baseMapper.queryDemoLoc(crn); - } - - @Override - public Boolean checkEmptyCount(LocMast locMast) { - if (locMast == null) { - return false; - } - return this.baseMapper.selectEmptyLocCount(locMast.getLocType1(), locMast.getCrnNo()) > 1; - } - - @Override - public Boolean isOutMost(String locNo, Boolean pakin) { - return Integer.parseInt(locNo.substring(0, 2)) == Utils.getGroupRow(locNo, pakin); - } - - @Override - public List<String> getDemoNextLoc(Integer crnNo) { - return this.baseMapper.getDemoNextLoc(crnNo); - } - - @Override - public Boolean isShuttle(String locNo) { -// int row = Utils.getRow(locNo); -// if (row >= 2 && row <= 30) { -// return Boolean.TRUE; -// } - return Boolean.TRUE; - } - - @Override - public Integer getOutCrnNo(LocMast locMast) { - return 1; - } - - @Override public LocMast queryByLoc(String locNo) { return this.baseMapper.queryByLoc(locNo); } diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java index 0fd45f1..0d32709 100644 --- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java +++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java @@ -3,10 +3,7 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.baomidou.mybatisplus.mapper.EntityWrapper; -import com.baomidou.mybatisplus.mapper.Wrapper; import com.core.common.Cools; -import com.core.common.SpringUtils; -import com.core.exception.CoolException; import com.zy.asrs.entity.*; import com.zy.asrs.mapper.*; import com.zy.asrs.service.*; @@ -36,7 +33,6 @@ import org.springframework.transaction.interceptor.TransactionAspectSupport; import java.util.*; -import java.util.stream.Collectors; /** * 绔嬩綋浠撳簱WCS绯荤粺涓绘祦绋嬩笟鍔� @@ -55,11 +51,7 @@ @Autowired private WrkMastService wrkMastService; @Autowired - private WrkDetlService wrkDetlService; - @Autowired private LocMastService locMastService; - @Autowired - private LocDetlService locDetlService; @Autowired private StaDescService staDescService; @Autowired @@ -93,10 +85,6 @@ @Autowired private ErpService erpService; @Autowired - private OrderMapper orderMapper; - @Autowired - private OrderDetlMapper orderDetlMapper; - @Autowired private BasLiftService basLiftService; @Autowired private ShuttleDispatchUtils shuttleDispatchUtils; @@ -110,10 +98,6 @@ private ConfigService configService; @Autowired private NavigateMapUtils navigateMapUtils; - @Autowired - private WrkDetlLogService wrkDetlLogService; - @Autowired - private MatService matService; @Autowired private NavigateMapData navigateMapData; @@ -2375,259 +2359,164 @@ * 鍑哄簱 ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣� */ public void ledExecute() { - try { - for (LedSlave led : slaveProperties.getLed()) { - // 鑾峰彇杈撻�佺嚎plc绾跨▼ - DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); - // 鍛戒护闆嗗悎 - List<LedCommand> commands = new ArrayList<>(); - // 宸ヤ綔妗i泦鍚� - List<WrkMast> wrkMasts = new ArrayList<>(); - List<WrkMastLog> wrkMastLogs = new ArrayList<>(); - for (Integer staNo : led.getStaArr()) { - // 鑾峰彇鍙夎溅绔欑偣 - StaProtocol staProtocol = devpThread.getStation().get(staNo); - if (null == staProtocol || null == staProtocol.getWorkNo() || 0 == staProtocol.getWorkNo() || !staProtocol.isLoading()) { - continue; - } else { - staProtocol = staProtocol.clone(); - } - // 鑾峰彇宸ヤ綔妗f暟鎹� - WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo()); - Integer wrkNo = staProtocol.getWorkNo().intValue(); - Integer ioType = null; - String sourceLocNo = null; - String locNo = null; - Integer wrkStaNo = null; - String barcode = null; - if (wrkMast == null) { - //鏌ヨ鍘嗗彶妗� - WrkMastLog wrkMastLog = wrkMastLogMapper.selectLatestByWorkNo(staProtocol.getWorkNo().intValue()); - if (wrkMastLog == null) { - continue; - } - ioType = wrkMastLog.getIoType(); - sourceLocNo = wrkMastLog.getSourceLocNo(); - locNo = wrkMastLog.getLocNo(); - wrkStaNo = wrkMastLog.getStaNo(); - barcode = wrkMastLog.getBarcode(); - wrkMastLogs.add(wrkMastLog); - }else { - if (wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { - continue; - } - ioType = wrkMast.getIoType(); - sourceLocNo = wrkMast.getSourceLocNo(); - locNo = wrkMast.getLocNo(); - wrkStaNo = wrkMast.getStaNo(); - barcode = wrkMast.getBarcode(); - wrkMasts.add(wrkMast); - } - // 缁勮鍛戒护 - LedCommand ledCommand = new LedCommand(); - ledCommand.setWorkNo(wrkNo); - ledCommand.setIoType(ioType); - // 鍑哄簱妯″紡 - switch (ioType) { - case 101: - ledCommand.setTitle("鍏ㄦ澘鍑哄簱"); - break; - case 103: - ledCommand.setTitle("鎷f枡鍑哄簱"); - break; - case 104: - ledCommand.setTitle("骞舵澘鍑哄簱"); - break; - case 107: - ledCommand.setTitle("鐩樼偣鍑哄簱"); - break; - case 110: - ledCommand.setTitle("绌烘澘鍑哄簱"); - ledCommand.setEmptyMk(true); - break; - default: - News.error("浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkNo, ioType); - break; - } - ledCommand.setSourceLocNo(sourceLocNo); - ledCommand.setLocNo(locNo); - ledCommand.setStaNo(wrkStaNo); - ledCommand.setBarcode(barcode); - if (ioType != 110 && ioType != 10) { - List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo)); - if (!wrkDetls.isEmpty()) { - wrkDetls.forEach(wrkDetl -> { - double remainNum = wrkDetl.getStock() - wrkDetl.getAnfme();//鍓╀綑鏁伴噺 - if (remainNum < 0) { - remainNum = 0; - } - String matnr = wrkDetl.getMatnr(); - Mat mat = matService.selectByMatnr(wrkDetl.getMatnr()); - if (mat != null) { - if (!mat.getMatnr().equals(mat.getMatnr2())) { - matnr += " - " + mat.getMatnr2(); - } - } - ledCommand.getMatDtos().add(new MatDto(matnr, wrkDetl.getMaktx(), wrkDetl.getAnfme(), remainNum, wrkDetl.getSpecs(), wrkDetl.getSuppCode(), wrkDetl.getOrderNo())); - }); - }else { - List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectLatestByWorkNo(wrkNo, barcode); - for (WrkDetlLog wrkDetlLog : wrkDetlLogs) { - double remainNum = wrkDetlLog.getStock() - wrkDetlLog.getAnfme();//鍓╀綑鏁伴噺 - if (remainNum < 0) { - remainNum = 0; - } - String matnr = wrkDetlLog.getMatnr(); - Mat mat = matService.selectByMatnr(wrkDetlLog.getMatnr()); - if (mat != null) { - if (!mat.getMatnr().equals(mat.getMatnr2())) { - matnr += " - " + mat.getMatnr2(); - } - } - ledCommand.getMatDtos().add(new MatDto(matnr, wrkDetlLog.getMaktx(), wrkDetlLog.getAnfme(), remainNum, wrkDetlLog.getSpecs(), wrkDetlLog.getSuppCode())); - } - } - -// List<LocDetl> locDetls = locDetlService.selectList(new EntityWrapper<LocDetl>().eq("loc_no", sourceLocNo)); -// if (ioType == 101) { -// List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo)); -// wrkDetls.forEach(wrkDetl -> { -// ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(), 0D, wrkDetl.getSpecs(), wrkDetl.getSuppCode())); -// }); -//// locDetls.forEach(locDetl -> { -//// Wrapper<WrkDetl> wrapper = new EntityWrapper<WrkDetl>().eq("matnr", locDetl.getMatnr()).eq("wrk_no", wrkNo); -//// Utils.wapperSetCondition(wrapper, "batch", locDetl.getBatch()); -//// Utils.wapperSetCondition(wrapper, "three_code", locDetl.getThreeCode()); -//// Utils.wapperSetCondition(wrapper, "dead_time", locDetl.getDeadTime()); -//// Utils.wapperSetCondition(wrapper, "supp_code", locDetl.getSuppCode());//鏂欑鐮� -//// List<WrkDetl> detl = wrkDetlService.selectList(wrapper); -//// if (Cools.isEmpty(detl)) { -//// String suppCode = ""; -//// if (locDetl.getSuppCode() != null) { -//// suppCode = locDetl.getSuppCode(); -//// } -//// ledCommand.getMatDtos().add(new MatDto(locDetl.getMatnr(), locDetl.getMaktx(), 0D, locDetl.getAnfme(), locDetl.getSpecs(), suppCode)); -//// } else { -//// //鍑哄簱鏁伴噺绱 -//// Double conut = 0.0; -//// for (WrkDetl wrkDetl : detl) { -//// conut = conut + wrkDetl.getAnfme(); -//// } -//// -//// for (WrkDetl wrkDetl : detl) { -//// String suppCode = ""; -//// if (wrkDetl.getSuppCode() != null) { -//// suppCode = wrkDetl.getSuppCode(); -//// } -//// ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(), (locDetl.getAnfme() - conut), wrkDetl.getSpecs(), suppCode, wrkDetl.getOrderNo())); -//// } -//// } -//// -//// }); -// } else { -// locDetls.forEach(locDetl -> { -// Wrapper<WrkDetl> wrapper = new EntityWrapper<WrkDetl>().eq("matnr", locDetl.getMatnr()).eq("wrk_no", wrkNo); -// Utils.wapperSetCondition(wrapper, "batch", locDetl.getBatch()); -// Utils.wapperSetCondition(wrapper, "three_code", locDetl.getThreeCode()); -// Utils.wapperSetCondition(wrapper, "dead_time", locDetl.getDeadTime()); -// Utils.wapperSetCondition(wrapper, "supp_code", locDetl.getSuppCode());//鏂欑鐮� -// List<WrkDetl> detl = wrkDetlService.selectList(wrapper); -// if (Cools.isEmpty(detl)) { -// String suppCode = ""; -// if (locDetl.getSuppCode() != null) { -// suppCode = locDetl.getSuppCode(); -// } -// ledCommand.getMatDtos().add(new MatDto(locDetl.getMatnr(), locDetl.getMaktx(), 0D, locDetl.getAnfme(), locDetl.getSpecs(), suppCode)); -// } else { -// //鍑哄簱鏁伴噺绱 -// Double conut = 0.0; -// for (WrkDetl wrkDetl : detl) { -// conut = conut + wrkDetl.getAnfme(); -// } -// -// for (WrkDetl wrkDetl : detl) { -// String suppCode = ""; -// if (wrkDetl.getSuppCode() != null) { -// suppCode = wrkDetl.getSuppCode(); -// } -// ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(), (wrkDetl.getStock() - conut), wrkDetl.getSpecs(), suppCode, wrkDetl.getOrderNo())); -// } -// } -// -// }); +// try { +// for (LedSlave led : slaveProperties.getLed()) { +// // 鑾峰彇杈撻�佺嚎plc绾跨▼ +// DevpThread devpThread = (DevpThread) SlaveConnection.get(SlaveType.Devp, led.getDevpPlcId()); +// // 鍛戒护闆嗗悎 +// List<LedCommand> commands = new ArrayList<>(); +// // 宸ヤ綔妗i泦鍚� +// List<WrkMast> wrkMasts = new ArrayList<>(); +// List<WrkMastLog> wrkMastLogs = new ArrayList<>(); +// for (Integer staNo : led.getStaArr()) { +// // 鑾峰彇鍙夎溅绔欑偣 +// StaProtocol staProtocol = devpThread.getStation().get(staNo); +// if (null == staProtocol || null == staProtocol.getWorkNo() || 0 == staProtocol.getWorkNo() || !staProtocol.isLoading()) { +// continue; +// } else { +// staProtocol = staProtocol.clone(); +// } +// // 鑾峰彇宸ヤ綔妗f暟鎹� +// WrkMast wrkMast = wrkMastMapper.selectById(staProtocol.getWorkNo()); +// Integer wrkNo = staProtocol.getWorkNo().intValue(); +// Integer ioType = null; +// String sourceLocNo = null; +// String locNo = null; +// Integer wrkStaNo = null; +// String barcode = null; +// if (wrkMast == null) { +// //鏌ヨ鍘嗗彶妗� +// WrkMastLog wrkMastLog = wrkMastLogMapper.selectLatestByWorkNo(staProtocol.getWorkNo().intValue()); +// if (wrkMastLog == null) { +// continue; // } -// -// -// if (ioType == 107) { -// locDetls = new ArrayList<>(); -// ledCommand.setMatDtos(new ArrayList<>()); +// ioType = wrkMastLog.getIoType(); +// sourceLocNo = wrkMastLog.getSourceLocNo(); +// locNo = wrkMastLog.getLocNo(); +// wrkStaNo = wrkMastLog.getStaNo(); +// barcode = wrkMastLog.getBarcode(); +// wrkMastLogs.add(wrkMastLog); +// }else { +// if (wrkMast.getWrkSts() < 14 || wrkMast.getIoType() < 100) { +// continue; // } -// -// if (locDetls.isEmpty() && ioType != 101) { -// List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo)); +// ioType = wrkMast.getIoType(); +// sourceLocNo = wrkMast.getSourceLocNo(); +// locNo = wrkMast.getLocNo(); +// wrkStaNo = wrkMast.getStaNo(); +// barcode = wrkMast.getBarcode(); +// wrkMasts.add(wrkMast); +// } +// // 缁勮鍛戒护 +// LedCommand ledCommand = new LedCommand(); +// ledCommand.setWorkNo(wrkNo); +// ledCommand.setIoType(ioType); +// // 鍑哄簱妯″紡 +// switch (ioType) { +// case 101: +// ledCommand.setTitle("鍏ㄦ澘鍑哄簱"); +// break; +// case 103: +// ledCommand.setTitle("鎷f枡鍑哄簱"); +// break; +// case 104: +// ledCommand.setTitle("骞舵澘鍑哄簱"); +// break; +// case 107: +// ledCommand.setTitle("鐩樼偣鍑哄簱"); +// break; +// case 110: +// ledCommand.setTitle("绌烘澘鍑哄簱"); +// ledCommand.setEmptyMk(true); +// break; +// default: +// News.error("浠诲姟鍏ュ嚭搴撶被鍨嬮敊璇紒锛侊紒[宸ヤ綔鍙凤細{}] [鍏ュ嚭搴撶被鍨嬶細{}]", wrkNo, ioType); +// break; +// } +// ledCommand.setSourceLocNo(sourceLocNo); +// ledCommand.setLocNo(locNo); +// ledCommand.setStaNo(wrkStaNo); +// ledCommand.setBarcode(barcode); +// if (ioType != 110 && ioType != 10) { +// List<WrkDetl> wrkDetls = wrkDetlService.selectList(new EntityWrapper<WrkDetl>().eq("wrk_no", wrkNo)); +// if (!wrkDetls.isEmpty()) { // wrkDetls.forEach(wrkDetl -> { -// if (wrkDetl.getAnfme() > 0D) { -// ledCommand.getMatDtos().add(new MatDto(wrkDetl.getMatnr(), wrkDetl.getMaktx(), wrkDetl.getAnfme(), wrkDetl.getAnfme(), wrkDetl.getSpecs(), wrkDetl.getSuppCode())); +// double remainNum = wrkDetl.getStock() - wrkDetl.getAnfme();//鍓╀綑鏁伴噺 +// if (remainNum < 0) { +// remainNum = 0; // } -// }); -// -// if (wrkDetls.isEmpty()) {//浠庡巻鍙叉。鏌ヨ -// List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectLatestByWorkNo(wrkNo, barcode); -// for (WrkDetlLog wrkDetlLog : wrkDetlLogs) { -// if (wrkDetlLog.getAnfme() > 0D) { -// ledCommand.getMatDtos().add(new MatDto(wrkDetlLog.getMatnr(), wrkDetlLog.getMaktx(), wrkDetlLog.getAnfme(), wrkDetlLog.getAnfme(), wrkDetlLog.getSpecs(), wrkDetlLog.getSuppCode())); +// String matnr = wrkDetl.getMatnr(); +// Mat mat = matService.selectByMatnr(wrkDetl.getMatnr()); +// if (mat != null) { +// if (!mat.getMatnr().equals(mat.getMatnr2())) { +// matnr += " - " + mat.getMatnr2(); // } // } +// ledCommand.getMatDtos().add(new MatDto(matnr, wrkDetl.getMaktx(), wrkDetl.getAnfme(), remainNum, wrkDetl.getSpecs(), wrkDetl.getSuppCode(), wrkDetl.getOrderNo())); +// }); +// }else { +// List<WrkDetlLog> wrkDetlLogs = wrkDetlLogService.selectLatestByWorkNo(wrkNo, barcode); +// for (WrkDetlLog wrkDetlLog : wrkDetlLogs) { +// double remainNum = wrkDetlLog.getStock() - wrkDetlLog.getAnfme();//鍓╀綑鏁伴噺 +// if (remainNum < 0) { +// remainNum = 0; +// } +// String matnr = wrkDetlLog.getMatnr(); +// Mat mat = matService.selectByMatnr(wrkDetlLog.getMatnr()); +// if (mat != null) { +// if (!mat.getMatnr().equals(mat.getMatnr2())) { +// matnr += " - " + mat.getMatnr2(); +// } +// } +// ledCommand.getMatDtos().add(new MatDto(matnr, wrkDetlLog.getMaktx(), wrkDetlLog.getAnfme(), remainNum, wrkDetlLog.getSpecs(), wrkDetlLog.getSuppCode())); // } // } - } - - commands.add(ledCommand); - } - Set<Integer> workNos = null; - if (!wrkMasts.isEmpty()) { - workNos = wrkMasts.stream().map(WrkMast::getWrkNo).collect(Collectors.toSet()); - }else { - workNos = wrkMastLogs.stream().map(WrkMastLog::getWrkNo).collect(Collectors.toSet()); - } - // 鑾峰彇LED绾跨▼ - LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); - // 鐩稿悓宸ヤ綔鍙烽泦鍚堝垯杩囨护 - if (CollectionUtils.equals(ledThread.getWorkNos(), workNos)) { - continue; - } - // 鍛戒护涓嬪彂 ------------------------------------------------------------------------------- - if (!commands.isEmpty()) { - if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) { - log.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort()); - continue; - } else { - ledThread.setLedMk(false); - } - } - - try { - // 淇敼涓绘。led鏍囪 - for (WrkMast wrkMast : wrkMasts) { - wrkMast.setOveMk("Y"); - wrkMast.setModiTime(new Date()); - if (wrkMastMapper.updateById(wrkMast) == 0) { - throw new CoolException("鏇存柊宸ヤ綔妗eけ璐�"); - } - } - - // 鏇存柊绾跨▼褰撳墠宸ヤ綔鍙烽泦鍚� - ledThread.setWorkNos(workNos); - - } catch (Exception e) { - e.printStackTrace(); - TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); - } - - } - } catch (Exception e) { - e.printStackTrace(); - } +// commands.add(ledCommand); +// } +// Set<Integer> workNos = null; +// if (!wrkMasts.isEmpty()) { +// workNos = wrkMasts.stream().map(WrkMast::getWrkNo).collect(Collectors.toSet()); +// }else { +// workNos = wrkMastLogs.stream().map(WrkMastLog::getWrkNo).collect(Collectors.toSet()); +// } +// // 鑾峰彇LED绾跨▼ +// LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, led.getId()); +// // 鐩稿悓宸ヤ綔鍙烽泦鍚堝垯杩囨护 +// if (CollectionUtils.equals(ledThread.getWorkNos(), workNos)) { +// continue; +// } +// // 鍛戒护涓嬪彂 ------------------------------------------------------------------------------- +// if (!commands.isEmpty()) { +// if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) { +// log.error("{}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort()); +// continue; +// } else { +// ledThread.setLedMk(false); +// } +// } +// +// try { +// // 淇敼涓绘。led鏍囪 +// for (WrkMast wrkMast : wrkMasts) { +// wrkMast.setOveMk("Y"); +// wrkMast.setModiTime(new Date()); +// if (wrkMastMapper.updateById(wrkMast) == 0) { +// throw new CoolException("鏇存柊宸ヤ綔妗eけ璐�"); +// } +// } +// +// // 鏇存柊绾跨▼褰撳墠宸ヤ綔鍙烽泦鍚� +// ledThread.setWorkNos(workNos); +// +// } catch (Exception e) { +// e.printStackTrace(); +// TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); +// } +// +// } +// } catch (Exception e) { +// e.printStackTrace(); +// } } /** diff --git a/src/main/java/com/zy/asrs/service/impl/MatServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MatServiceImpl.java deleted file mode 100644 index f3ef3cc..0000000 --- a/src/main/java/com/zy/asrs/service/impl/MatServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.zy.asrs.service.impl; - -import com.baomidou.mybatisplus.service.impl.ServiceImpl; -import com.zy.asrs.entity.Mat; -import com.zy.asrs.mapper.MatMapper; -import com.zy.asrs.service.MatService; -import org.springframework.stereotype.Service; - -@Service("matService") -public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService { - - @Override - public Mat selectByMatnr(String matnr) { - return this.baseMapper.selectByMatnr(matnr); - } - - -} diff --git a/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java deleted file mode 100644 index 626e635..0000000 --- a/src/main/java/com/zy/asrs/service/impl/WrkDetlLogServiceImpl.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.zy.asrs.service.impl; - -import com.zy.asrs.mapper.WrkDetlLogMapper; -import com.zy.asrs.entity.WrkDetlLog; -import com.zy.asrs.service.WrkDetlLogService; -import com.baomidou.mybatisplus.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -import java.util.List; - -@Service("wrkDetlLogService") -public class WrkDetlLogServiceImpl extends ServiceImpl<WrkDetlLogMapper, WrkDetlLog> implements WrkDetlLogService { - - @Override - public List<WrkDetlLog> selectLatestByWorkNo(Integer workNo, String barcode) { - return this.baseMapper.selectLatestByWorkNo(workNo, barcode); - } -} diff --git a/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java deleted file mode 100644 index 78bf034..0000000 --- a/src/main/java/com/zy/asrs/service/impl/WrkDetlServiceImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.zy.asrs.service.impl; - -import com.baomidou.mybatisplus.service.impl.ServiceImpl; -import com.core.common.Cools; -import com.core.exception.CoolException; -import com.zy.asrs.entity.Mat; -import com.zy.asrs.entity.WaitPakin; -import com.zy.asrs.entity.WrkDetl; -import com.zy.asrs.mapper.WrkDetlMapper; -import com.zy.asrs.service.MatService; -import com.zy.asrs.service.WrkDetlService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.Date; -import java.util.List; - -@Service("wrkDetlService") -public class WrkDetlServiceImpl extends ServiceImpl<WrkDetlMapper, WrkDetl> implements WrkDetlService { - - @Autowired - private MatService matService; - - @Override - @Transactional - public void createWorkDetail(Integer workNo, List<WaitPakin> waitPakins, String barcode) { - if (waitPakins.isEmpty()){ - return; - } - for (WaitPakin waitPakin : waitPakins) { - Mat mat = matService.selectByMatnr(waitPakin.getMatnr()); - if (Cools.isEmpty(mat)){ - throw new CoolException("鐗╂枡鏉$爜鏁版嵁涓虹┖"); - } - // 淇濇寔宸ヤ綔妗f槑缁� - WrkDetl wrkDetl = new WrkDetl(); - wrkDetl.setWrkNo(workNo); - wrkDetl.setIoTime(new Date()); - wrkDetl.sync(mat); - wrkDetl.setZpallet(barcode); // 鎵樼洏鏉$爜 - wrkDetl.setAppeTime(new Date()); - wrkDetl.setModiTime(new Date()); - if (!this.insert(wrkDetl)) { - throw new CoolException("淇濆瓨宸ヤ綔鏄庣粏澶辫触"); - } - } - } - - @Override - public List<WrkDetl> findByWorkNo(Integer workNo) { - return this.baseMapper.findByWorkNo(workNo); - } - -} diff --git a/src/main/java/com/zy/asrs/utils/Utils.java b/src/main/java/com/zy/asrs/utils/Utils.java index a7d6ced..139e95a 100644 --- a/src/main/java/com/zy/asrs/utils/Utils.java +++ b/src/main/java/com/zy/asrs/utils/Utils.java @@ -116,121 +116,6 @@ } /** - * 鍒ゆ柇搴撲綅鏄惁涓虹┛姊簱浣� - * @param locNo - * @return - */ - public static Boolean isShuttle(String locNo) { - int row = Utils.getRow(locNo); - if (row >= 2 && row <= 12) { - return Boolean.TRUE; - } - return Boolean.FALSE; - } - - // ------------------------------------------------------------------------------------------------------------------- - - - - /** - * 鍒ゆ柇鏄惁涓烘繁搴撲綅 - */ - public static boolean isDeepLoc(SlaveProperties slaveProperties, String locNo){ - if (slaveProperties.isDoubleDeep()) { - int row = getRow(locNo); - return slaveProperties.getDoubleLocs().contains(row); - } else { - return false; - } - } - - /** - * 鍒ゆ柇鏄惁涓烘繁搴撲綅 - */ - public static boolean isDeepLoc(SlaveProperties slaveProperties, Integer row){ - if (slaveProperties.isDoubleDeep()) { - return slaveProperties.getDoubleLocs().contains(row); - } else { - return false; - } - } - - /** - * 鍒ゆ柇鏄惁涓烘祬搴撲綅 - */ - public static boolean isShallowLoc(SlaveProperties slaveProperties, String locNo){ - if (slaveProperties.isDoubleDeep()) { - int row = getRow(locNo); - return !slaveProperties.getDoubleLocs().contains(row); - } else { - return false; - } - } - - /** - * 鍒ゆ柇鏄惁涓烘祬搴撲綅 - */ - public static boolean isShallowLoc(SlaveProperties slaveProperties, Integer row){ - if (slaveProperties.isDoubleDeep()) { - return !slaveProperties.getDoubleLocs().contains(row); - } else { - return false; - } - } - - /** - * 鑾峰彇 娣卞簱浣嶅搴旂殑娴呭簱浣嶅彿 - */ - public static String getShallowLoc(SlaveProperties slaveProperties, String deepLoc) { - int row = getRow(deepLoc); - int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); - int shallowRow = remainder == 1 ? (row + 1) : (row - 1); - return zerofill(String.valueOf(shallowRow), 2) + deepLoc.substring(2); - } - - - /** - * 鑾峰彇 娣卞簱浣嶆帓瀵瑰簲鐨勬祬搴撲綅鎺� - */ - public static Integer getShallowRow(SlaveProperties slaveProperties, Integer deepRow) { - int remainder = (int) Arith.remainder(deepRow, slaveProperties.getGroupCount()); - return remainder == 1 ? (deepRow + 1) : (deepRow - 1); - } - - /** - * 鑾峰彇 娴呭簱浣嶅搴旂殑娣卞簱浣嶅彿 - */ - public static String getDeepLoc(SlaveProperties slaveProperties, String shallowLoc) { - int row = getRow(shallowLoc); - int remainder = (int) Arith.remainder(row, slaveProperties.getGroupCount()); - int targetRow; - if (remainder == 2) { - targetRow = row - 1; - } else if (remainder == 1) { - targetRow = row + 1; - } else { - throw new RuntimeException(shallowLoc + "涓嶆槸娴呭簱浣嶏紝绯荤粺绻佸繖"); - } - return zerofill(String.valueOf(targetRow), 2) + shallowLoc.substring(2); - } - - /** - * 鑾峰彇 娴呭簱浣嶆帓瀵瑰簲鐨勬繁搴撲綅鎺� - */ - public static Integer getDeepRow(SlaveProperties slaveProperties, Integer shallowRow) { - int remainder = (int) Arith.remainder(shallowRow, slaveProperties.getGroupCount()); - int targetRow; - if (remainder == 2) { - targetRow = shallowRow - 1; - } else if (remainder == 1) { - targetRow = shallowRow + 1; - } else { - throw new RuntimeException(shallowRow + "涓嶆槸娴呭簱浣嶆帓锛岀郴缁熺箒蹇�"); - } - return targetRow; - } - - /** * 閫氳繃搴撲綅鍙疯幏鍙� 鎺� */ public static int getRow(String locNo) { @@ -416,10 +301,10 @@ if (currentLocNo == null) { //灏忚溅娌℃湁搴撲綅鍙锋暟鎹紝浠庢暟鎹簱涓彇 BasShuttle basShuttle = basShuttleService.selectById(slave.getId()); - if (basShuttle == null || basShuttle.getPoint() == null) { + if (basShuttle == null) { continue; } - NyShuttleProtocol.NyShuttlePointClass shuttlePoint = JSON.parseObject(basShuttle.getPoint(), NyShuttleProtocol.NyShuttlePointClass.class); + NyShuttleProtocol.NyShuttlePointClass shuttlePoint = shuttleProtocol.getPoint(); currentLocNo = NavigatePositionConvert.nyXyzToLocNo(shuttlePoint.getX(), shuttlePoint.getY(), shuttlePoint.getZ()); } diff --git a/src/main/java/com/zy/common/model/MatDto.java b/src/main/java/com/zy/common/model/MatDto.java index 6c3a90b..27442c7 100644 --- a/src/main/java/com/zy/common/model/MatDto.java +++ b/src/main/java/com/zy/common/model/MatDto.java @@ -1,6 +1,5 @@ package com.zy.common.model; -import com.zy.asrs.entity.OrderDetl; import lombok.Data; /** @@ -39,14 +38,6 @@ public MatDto() { } - public MatDto(OrderDetl orderDetl) { - this.matNo = orderDetl.getMatnr(); - this.model = orderDetl.getModel(); - this.batch = orderDetl.getBatch(); - this.orderNo = orderDetl.getOrderNo(); - this.count = orderDetl.getQty(); - this.total = orderDetl.getAnfme(); - } public MatDto(String matNo, String maknx, Double count) { this.matNo = matNo; this.maknx = maknx; diff --git a/src/main/java/com/zy/common/service/CommonService.java b/src/main/java/com/zy/common/service/CommonService.java index 28fb4f1..eb14888 100644 --- a/src/main/java/com/zy/common/service/CommonService.java +++ b/src/main/java/com/zy/common/service/CommonService.java @@ -1,26 +1,12 @@ package com.zy.common.service; -import com.alibaba.fastjson.JSON; -import com.baomidou.mybatisplus.mapper.EntityWrapper; -import com.baomidou.mybatisplus.mapper.Wrapper; -import com.core.common.Arith; import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.entity.*; import com.zy.asrs.service.*; -import com.zy.asrs.utils.Utils; -import com.zy.asrs.utils.VersionUtils; -import com.zy.common.model.LocTypeDto; -import com.zy.common.model.Shelves; -import com.zy.common.model.StartupDto; -import com.zy.core.News; -import com.zy.core.properties.SlaveProperties; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - -import java.util.List; /** * 璐ф灦鏍稿績鍔熻兘 @@ -34,20 +20,6 @@ private WrkMastService wrkMastService; @Autowired private WrkLastnoService wrkLastnoService; - @Autowired - private RowLastnoService rowLastnoService; - @Autowired - private BasCrnpService basCrnpService; - @Autowired - private StaDescService staDescService; - @Autowired - private BasDevpService basDevpService; - @Autowired - private LocMastService locMastService; - @Autowired - private SlaveProperties slaveProperties; - @Autowired - private LocDetlService locDetlService; @Autowired private WrkChargeService wrkChargeService; @@ -122,255 +94,6 @@ } } return workNo; - } - - - /** - * 妫�绱㈠簱浣嶅彿 - * @param whsType 绫诲瀷 1:鍙屾繁寮忚揣鏋� - * @param staDescId 璺緞宸ヤ綔绫诲瀷 - * @param sourceStaNo 婧愮珯 - * @param matNos 鐗╂枡鍙烽泦鍚� - * @return locNo 妫�绱㈠埌鐨勫簱浣嶅彿 - */ - @Transactional - public StartupDto getLocNo(Integer whsType, Integer staDescId, Integer sourceStaNo, List<String> matNos, LocTypeDto locTypeDto, int times) { - StartupDto startupDto = new StartupDto(); - // 鐢熸垚宸ヤ綔鍙� - int workNo = getWorkNo(0); - - switch (sourceStaNo) { - case 202: - whsType = 2; - break; - case 205: - whsType = 1; - break; - case 126: - whsType = 3; - break; - case 110: - whsType = 4; - break; - case 301: - whsType = 5; - break; - default: - throw new CoolException("搴撲綅鎺掑彿鍒嗛厤閿欒, 婧愮珯鍙凤細" + sourceStaNo); - } - RowLastno rowLastno = rowLastnoService.selectById(whsType); - if (Cools.isEmpty(rowLastno)) { - throw new CoolException("鏁版嵁寮傚父锛岃鑱旂郴绠$悊鍛�"); - } - - // ===============>>>> 寮�濮嬫墽琛� - int curRow = rowLastno.getCurrentRow(); - int sRow = rowLastno.getsRow(); - int eRow = rowLastno.geteRow(); - int crn_qty = rowLastno.getCrnQty(); - int rowCount = eRow - sRow + 1; - // 鐩爣鍫嗗灈鏈哄彿 - int crnNo = 0; - // 鐩爣搴撲綅 - LocMast locMast = null; - - // 闈犺繎鎽嗘斁瑙勫垯 --- 鍚屽ぉ鍚岃鏍肩墿鏂� - if (!Cools.isEmpty(matNos)) { - List<String> locNos = locDetlService.getSameDetlToday(matNos.get(0), sRow, eRow); - for (String locNo : locNos) { - if (Utils.isShallowLoc(slaveProperties, locNo)) { - continue; - } - String shallowLocNo = Utils.getShallowLoc(slaveProperties, locNo); - // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣� - LocMast shallowLoc = locMastService.selectById(shallowLocNo); - if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { - if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { - if (VersionUtils.locMoveCheckLocType(shallowLoc, locTypeDto)) { - locMast = shallowLoc; - crnNo = locMast.getCrnNo(); - break; - } - } - } - } - } - - // 闈犺繎鎽嗘斁瑙勫垯 --- 绌烘墭 - if (staDescId == 10) { - List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>().eq("loc_sts", "D").ge("row1", sRow).le("row1", eRow)); - if (locMasts.size() > 0) { - for (LocMast loc : locMasts) { - if (Utils.isShallowLoc(slaveProperties, loc.getLocNo())) { - continue; - } - String shallowLocNo = Utils.getShallowLoc(slaveProperties, loc.getLocNo()); - // 妫�娴嬬洰鏍囧簱浣嶆槸鍚︿负绌哄簱浣� - LocMast shallowLoc = locMastService.selectById(shallowLocNo); - if (shallowLoc != null && shallowLoc.getLocSts().equals("O")) { - if (basCrnpService.checkSiteError(shallowLoc.getCrnNo(), true)) { - locMast = shallowLoc; - crnNo = locMast.getCrnNo(); - break; - } - - } - } - } - } - - // 濡傛灉娌℃湁鐩歌繎鐗╂枡锛屽垯鎸夎鍒欒疆璇㈣揣鏋� - if (null == locMast) { - Shelves shelves = new Shelves(rowCount, crn_qty); - // 1-4鎺� - if (whsType == 1) { - for (int i = 0; i < shelves.group; i ++) { - curRow = shelves.start(curRow); - if (curRow < 0) { - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); - } - Integer crnNo1 = shelves.get(curRow); - if (basCrnpService.checkSiteError(crnNo1, true)) { - crnNo = crnNo1; - break; - } - } - // 5-8鎺� - } else if (whsType == 2) { - curRow = curRow - 4; - for (int i = 0; i < shelves.group; i ++) { - curRow = shelves.start(curRow); - if (curRow < 0) { - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); - } - Integer crnNo1 = shelves.get(curRow); - if (basCrnpService.checkSiteError(crnNo1 + 1, true)) { - // 鍋忕Щ閲忚ˉ鍋� - curRow = curRow + 4; - crnNo = crnNo1 + 1; - break; - } - - } - // 126绌烘澘鍏� 1-8鎺� - } else { - for (int i = 0; i < shelves.group; i ++) { - curRow = shelves.start(curRow); - if (curRow < 0) { - throw new CoolException("妫�绱㈠簱浣嶅け璐ワ紝璇疯仈绯荤鐞嗗憳"); - } - Integer crnNo1 = shelves.get(curRow); - if (basCrnpService.checkSiteError(crnNo1, true)) { - crnNo = crnNo1; - break; - } - } - } - } - - if (crnNo == 0) { - throw new CoolException("娌℃湁鍙敤鐨勫爢鍨涙満"); - } - // 鑾峰彇鐩爣绔� - Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() - .eq("type_no", staDescId) - .eq("stn_no", sourceStaNo) - .eq("crn_no", crnNo); - StaDesc staDesc = staDescService.selectOne(wrapper); - if (Cools.isEmpty(staDesc)) { - News.error("type_no={},stn_no={},crn_no={}", staDescId, sourceStaNo, crnNo); - throw new CoolException("鍏ュ簱璺緞涓嶅瓨鍦�"); - } - BasDevp staNo = basDevpService.selectById(staDesc.getCrnStn()); - if (!staNo.getAutoing().equals("Y")) { - throw new CoolException("鐩爣绔�"+staDesc.getCrnStn()+"涓嶅彲鐢�"); - } - // 鏇存柊搴撲綅鎺掑彿 - rowLastno.setCurrentRow(curRow); - rowLastnoService.updateById(rowLastno); - - // 寮�濮嬫煡鎵惧簱浣� ==============================>> - - // 1.褰撴绱㈠簱鎺掍负娴呭簱浣嶆帓鏃讹紝浼樺厛瀵绘壘褰撳墠搴撴帓鐨勬繁搴撲綅鎺� - if (locMast == null) { - if (Utils.isShallowLoc(slaveProperties, curRow)) { - Integer deepRow = Utils.getDeepRow(slaveProperties, curRow); - locMast = locMastService.queryFreeLocMast(deepRow, locTypeDto.getLocType1()); - // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (!locMastService.checkEmptyCount(locMast)) { - locMast = null; - } - } - if (Cools.isEmpty(locMast)) { - locMast = locMastService.queryFreeLocMast(curRow, locTypeDto.getLocType1()); - // 鍥犲簱浣嶇Щ杞�侀渶棰勭暀绌哄簱浣� - if (!locMastService.checkEmptyCount(locMast)) { - locMast = null; - } - // 鐩爣搴撲綅 ===>> 娴呭簱浣嶏紝 鍒欐牎楠屽叾娣卞簱浣嶆槸鍚︿负 F D X - if (null != locMast && Utils.isShallowLoc(slaveProperties, locMast.getLocNo())) { - LocMast deepLoc = locMastService.selectById(Utils.getDeepLoc(slaveProperties, locMast.getLocNo())); - if (!deepLoc.getLocSts().equals("F") && !deepLoc.getLocSts().equals("D") && !deepLoc.getLocSts().equals("X")) { - locMast = null; - } - } - // 鐩爣搴撲綅 ===>> 娣卞簱浣嶏紝 鍒欐牎楠屽叾娴呭簱浣嶆槸鍚︿负 O - if (null != locMast && Utils.isDeepLoc(slaveProperties, locMast.getLocNo())) { - LocMast shallowLoc = locMastService.selectById(Utils.getShallowLoc(slaveProperties, locMast.getLocNo())); - if (!shallowLoc.getLocSts().equals("O")) { - locMast = null; - } - } - } - } - - // 2.搴撲綅褰撳墠鎵�灞炲昂瀵告棤绌哄簱浣嶆椂锛岃皟鏁村昂瀵稿弬鏁帮紝鍚戜笂鍏煎妫�绱㈠簱浣� - if (Cools.isEmpty(locMast)) { - // 褰撳墠宸烽亾鏃犵┖搴撲綅鏃讹紝閫掑綊璋冩暣鑷充笅涓�宸烽亾锛屾绱㈠叏閮ㄥ贩閬撴棤鏋滃悗锛岃烦鍑洪�掑綊 - if (times < rowCount) { - times = times + 1; - return getLocNo(1, staDescId, sourceStaNo, matNos, locTypeDto, times); - } else { - times = 0; - } - - // 杞昏揣鐗╂壘杞诲簱浣嶄负绌烘椂锛屽彲浠ュ幓鎵鹃噸搴撲綅浠� - if (locTypeDto.getLocType1() == 1) { - locTypeDto.setLocType1((short) 2); - return getLocNo(null, staDescId, sourceStaNo, matNos, locTypeDto, times); - } - News.error("绯荤粺娌℃湁绌哄簱浣嶏紒锛侊紒 灏哄瑙勬牸锛� {}锛� 杞娆℃暟锛歿}", JSON.toJSONString(locTypeDto), times); - throw new CoolException("娌℃湁绌哄簱浣�"); - } - String locNo = locMast.getLocNo(); - - // 杩斿洖dto - startupDto.setWorkNo(workNo); - startupDto.setCrnNo(crnNo); - startupDto.setSourceStaNo(sourceStaNo); - startupDto.setStaNo(staNo.getDevNo()); - startupDto.setLocNo(locNo); - return startupDto; - } - - public static void main(String[] args) { - System.out.println(Arith.remainder(1, 4)); - System.out.println("0200201".substring(0, 2)); - String locNo = "0800201"; - int row = Integer.parseInt(locNo.substring(0, 2)); - double remainder = Arith.remainder(row, 4); - int targetRow; - if (remainder == 1) { - // 寰楀埌褰撳墠搴撲綅鐨勫鍥村簱浣� - targetRow = row + 1; - } else if (remainder == 0) { - // 寰楀埌褰撳墠搴撲綅鐨勫唴鍥村簱浣� - targetRow = row - 1; - } else { - return; - } - String zerofill = zerofill(String.valueOf(targetRow), 2)+locNo.substring(2); - System.out.println(zerofill); } public static String zerofill(String msg, Integer count) { diff --git a/src/main/java/com/zy/common/service/WmsService.java b/src/main/java/com/zy/common/service/WmsService.java deleted file mode 100644 index d188461..0000000 --- a/src/main/java/com/zy/common/service/WmsService.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.zy.common.service; - -import com.alibaba.fastjson.JSON; -import com.zy.asrs.entity.WaitPakin; -import com.zy.common.utils.HttpHandler; -import com.zy.core.properties.SystemProperties; -import lombok.extern.slf4j.Slf4j; -import org.springframework.stereotype.Service; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Created by vincent on 2020/8/6 - */ -@Slf4j -@Service -public class WmsService { - - public boolean fullStorePutStart(String barcode, Integer sourceStaNo, List<WaitPakin> waitPakins) { - - try { - Map<String, Object> param = new HashMap<>(); - param.put("barcode", barcode); - param.put("devpNo", sourceStaNo); - List<Map<String, Object>> list = new ArrayList<>(); - for (WaitPakin waitPakin : waitPakins) { - Map<String, Object> mat = new HashMap<>(); - mat.put("matNo", waitPakin.getMatnr()); - mat.put("count", waitPakin.getAnfme()); - list.add(mat); - } - param.put("list", list); - - String response = new HttpHandler.Builder() - .setUri(SystemProperties.WMS_URL) - .setPath("/full/store/put/start") - .setJson(JSON.toJSONString(param)) - .build() - .doPost(); - } catch (IOException e) { - - } - return true; - } - -} diff --git a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java index b0113aa..3cb4367 100644 --- a/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java +++ b/src/main/java/com/zy/common/utils/ShuttleDispatchUtils.java @@ -321,11 +321,7 @@ NyShuttleProtocol.NyShuttlePointClass point = null; if (shuttleProtocol.getPoint() == null) { - BasShuttle basShuttle = basShuttleService.selectById(shuttle.getId());//灏忚溅濡傛灉娌℃湁鏁版嵁锛屼粠鏁版嵁搴撳彇鏁版嵁 - if (basShuttle == null || basShuttle.getPoint() == null) { - continue; - } - point = JSON.parseObject(basShuttle.getPoint(), NyShuttleProtocol.NyShuttlePointClass.class); + continue; }else { point = shuttleProtocol.getPoint(); } diff --git a/src/main/java/com/zy/core/thread/LiftThread.java b/src/main/java/com/zy/core/thread/LiftThread.java index 4195f76..bbbc3d3 100644 --- a/src/main/java/com/zy/core/thread/LiftThread.java +++ b/src/main/java/com/zy/core/thread/LiftThread.java @@ -207,20 +207,7 @@ basLift.setWrkNo(liftProtocol.getTaskNo().intValue()); basLift.setUpdateTime(new Date()); basLift.setPakMk(liftProtocol.getPakMk()); - basLift.setModel(liftProtocol.getModel()); - basLift.setBusy(liftProtocol.getBusy()); - basLift.setFrontOverrun(liftProtocol.getFrontOverrun()); - basLift.setBackOverrun(liftProtocol.getBackOverrun()); - basLift.setLeftOverrun(liftProtocol.getLeftOverrun()); - basLift.setRightOverrun(liftProtocol.getRightOverrun()); - basLift.setOverHeight(liftProtocol.getOverHeight()); - basLift.setOverWeight(liftProtocol.getOverWeight()); - basLift.setHasTray(liftProtocol.getHasTray()); - basLift.setHasCar(liftProtocol.getHasCar()); - basLift.setDeviceError(liftProtocol.getDeviceError()); - basLift.setDistAddress(liftProtocol.getDistAddress().intValue()); - basLift.setCompleteTaskNo(liftProtocol.getCompleteTaskNo().intValue()); - basLift.setLev(liftProtocol.getLev().intValue()); + basLift.setDeviceStatus(JSON.toJSONString(liftProtocol)); if (liftService.updateById(basLift)) { OutputQueue.LIFT.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId())); // log.info(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId())); diff --git a/src/main/java/com/zy/core/thread/NyShuttleThread.java b/src/main/java/com/zy/core/thread/NyShuttleThread.java index c382847..f7dc6fe 100644 --- a/src/main/java/com/zy/core/thread/NyShuttleThread.java +++ b/src/main/java/com/zy/core/thread/NyShuttleThread.java @@ -189,56 +189,13 @@ basShuttle.setShuttleNo(slave.getId()); shuttleService.insert(basShuttle); } - //宸ヤ綔妯″紡 - basShuttle.setWorkingMode(shuttleProtocol.getWorkingMode()); - //杩愯鐘舵�� - basShuttle.setFree(shuttleProtocol.getFree()); - //褰撳墠閫熷害 - basShuttle.setSpeed(shuttleProtocol.getSpeed()); - //璐熻浇鐘舵�� - basShuttle.setLoadState(shuttleProtocol.getLoadState()); - //绠″埗鐘舵�� - basShuttle.setSuspendState(shuttleProtocol.getSuspendState()); - //椤跺崌浣嶇疆 - basShuttle.setLiftPosition(shuttleProtocol.getLiftPosition()); - //杩愯鏂瑰悜 - basShuttle.setRunDir(shuttleProtocol.getRunDir()); - //杩愯鏂瑰悜 - basShuttle.setRunDir2(shuttleProtocol.getRunDir2()); - //鍏呯數鐘舵�� - basShuttle.setChargState(shuttleProtocol.getChargState()); - //鐢垫睜鐢甸噺 - basShuttle.setPowerPercent(shuttleProtocol.getPowerPercent()); - //鏈�楂樼數鑺數鍘� - basShuttle.setMaxCellVoltage(shuttleProtocol.getMaxCellVoltage()); - //鐢垫睜鐢靛帇 - basShuttle.setVoltage(shuttleProtocol.getVoltage()); - //鍏呮斁鐢靛惊鐜鏁� - basShuttle.setChargeCycleTimes(shuttleProtocol.getChargeCycleTimes()); - //鍓╀綑鐢甸噺 - basShuttle.setSurplusQuantity(shuttleProtocol.getSurplusQuantity()); - //鎬荤數閲� - basShuttle.setCountQuantity(shuttleProtocol.getCountQuantity()); - //瀹為檯搴撲綅 - basShuttle.setPoint(JSONObject.toJSONString(shuttleProtocol.getPoint())); - //瀹為檯鍧愭爣 - basShuttle.setCoord(JSONObject.toJSONString(shuttleProtocol.getCoord())); - //浠诲姟鐩殑搴撲綅 - basShuttle.setTask(JSONObject.toJSONString(shuttleProtocol.getTask())); - //浠诲姟鐘舵�� - basShuttle.setTaskState(shuttleProtocol.getTaskState()); - //鏁呴殰鐘舵�� - basShuttle.setErrState(shuttleProtocol.getErrState()); - //鎬婚噷绋嬫暟 - basShuttle.setStatusSum(JSONObject.toJSONString(shuttleProtocol.getStatusSum())); - //闈炶嚜鍔ㄧ姸鎬佹椂闂磋鏃� - basShuttle.setErrTime(shuttleProtocol.getErrTime()); //浠诲姟鍙� basShuttle.setWrkNo(shuttleProtocol.getTaskNo().intValue()); //淇敼鏃堕棿 basShuttle.setUpdateTime(new Date()); //浣滀笟鏍囪 basShuttle.setPakMk(shuttleProtocol.getPakMk()); + basShuttle.setDeviceStatus(JSON.toJSONString(basShuttle)); if (shuttleService.updateById(basShuttle)) { OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId())); // log.info(MessageFormat.format("銆恵0}銆慬id:{1}] <<<<< 瀹炴椂鏁版嵁鏇存柊鎴愬姛",DateUtils.convert(new Date()), slave.getId())); diff --git a/src/main/resources/mapper/LocDetlMapper.xml b/src/main/resources/mapper/LocDetlMapper.xml deleted file mode 100644 index 230ec77..0000000 --- a/src/main/resources/mapper/LocDetlMapper.xml +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.LocDetlMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.LocDetl"> - <result column="loc_no" property="locNo" /> - <result column="zpallet" property="zpallet" /> - <result column="anfme" property="anfme" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="batch" property="batch" /> - <result column="order_no" property="orderNo" /> - - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - - <result column="modi_user" property="modiUser" /> - <result column="modi_time" property="modiTime" /> - <result column="appe_user" property="appeUser" /> - <result column="appe_time" property="appeTime" /> - <result column="memo" property="memo" /> - </resultMap> - - <sql id="stockOutCondition"> - <if test="loc_no!=null and loc_no!='' "> - and a.loc_no like '%' + #{loc_no} + '%' - </if> - </sql> - - <select id="getStockOutPage" resultMap="BaseResultMap"> - select * from - ( - select - ROW_NUMBER() over (order by a.appe_time,a.matnr,a.loc_no) as row, - a.* - from asr_loc_detl a - left join asr_loc_mast b on a.loc_no = b.loc_no - where 1=1 - and b.loc_sts = 'F' - <include refid="stockOutCondition"></include> - ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) - </select> - - <select id="getStockOutPageCount" parameterType="java.util.Map" resultType="java.lang.Integer"> - select - count(1) - from asr_loc_detl a - left join asr_loc_mast b on a.loc_no = b.loc_no - where 1=1 - and b.loc_sts = 'F' - <include refid="stockOutCondition"></include> - </select> -</mapper> diff --git a/src/main/resources/mapper/MatMapper.xml b/src/main/resources/mapper/MatMapper.xml deleted file mode 100644 index 0db0e77..0000000 --- a/src/main/resources/mapper/MatMapper.xml +++ /dev/null @@ -1,54 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.MatMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Mat"> - <id column="id" property="id" /> - <result column="uuid" property="uuid" /> - <result column="tag_id" property="tagId" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="name" property="name" /> - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - <result column="status" property="status" /> - <result column="create_by" property="createBy" /> - <result column="create_time" property="createTime" /> - <result column="update_by" property="updateBy" /> - <result column="update_time" property="updateTime" /> - <result column="memo" property="memo" /> - - <result column="stock" property="stock" /> - <result column="matnr2" property="matnr2" /> - </resultMap> - - <select id="selectByMatnr" resultMap="BaseResultMap"> - select top 1 * from man_mat where 1=1 and matnr = #{matnr} - </select> - -</mapper> diff --git a/src/main/resources/mapper/OrderDetlMapper.xml b/src/main/resources/mapper/OrderDetlMapper.xml deleted file mode 100644 index 4152d97..0000000 --- a/src/main/resources/mapper/OrderDetlMapper.xml +++ /dev/null @@ -1,215 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.OrderDetlMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.OrderDetl"> - <id column="id" property="id" /> - <result column="order_id" property="orderId" /> - <result column="order_no" property="orderNo" /> - <result column="anfme" property="anfme" /> - <result column="qty" property="qty" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="batch" property="batch" /> - - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - - <result column="status" property="status" /> - <result column="create_by" property="createBy" /> - <result column="create_time" property="createTime" /> - <result column="update_by" property="updateBy" /> - <result column="update_time" property="updateTime" /> - <result column="memo" property="memo" /> - - </resultMap> - - <select id="selectItem" resultMap="BaseResultMap"> - select * from man_order_detl - where 1=1 - and order_id = #{orderId} - and matnr = #{matnr} - <choose> - <when test="batch != null and batch != ''"> - and batch = #{batch} - </when> - <otherwise> - and (batch IS NULL OR batch = '') - </otherwise> - </choose> - </select> - - <select id="selectItemByOrderNo" resultMap="BaseResultMap"> - select * from man_order_detl - where 1=1 - and order_no = #{orderNo} - and matnr = #{matnr} - <if test="batch!=null and batch!='' "> - and batch = #{batch} - </if> - </select> - - <select id="selectItemNoneOfBatch" resultMap="BaseResultMap"> - select top 1 * from man_order_detl - where 1=1 - and order_no = #{orderNo} - and matnr = #{matnr} - </select> - - <select id="selectItemOfBatch" resultMap="BaseResultMap"> - select top 1 * from man_order_detl - where 1=1 - and matnr = #{matnr} - and batch = #{batch} - </select> - - <select id="selectWorkingDetls" resultMap="BaseResultMap"> - select * from man_order_detl - where 1=1 - and order_id = #{orderId} - and qty < anfme - </select> - - <sql id="pakOutPageCondition"> - <if test="order_id!=null and order_id!='' "> - and mod.order_id = #{order_id} - </if> - <if test="matnr!=null and matnr!='' "> - and mod.matnr like '%' + #{matnr} + '%' - </if> - <if test="maktx!=null and maktx!='' "> - and mod.maktx like '%' + #{maktx} + '%' - </if> - <if test="batch!=null and batch!='' "> - and mod.batch like '%' + #{batch} + '%' - </if> - </sql> - - <select id="getPakoutPage" resultMap="BaseResultMap"> - select * from - ( - select - ROW_NUMBER() over (order by mo.create_time desc) as row, - mod.* - from man_order_detl mod - inner join man_order mo on mod.order_id = mo.id - inner join man_doc_type mdt on mo.doc_type = mdt.doc_id - where 1=1 - and mo.settle <= 2 - and mo.status = 1 - and mdt.pakout = 1 - <include refid="pakOutPageCondition"></include> - ) t where t.row between ((#{pageNumber}-1)*#{pageSize}+1) and (#{pageNumber}*#{pageSize}) - </select> - - <select id="getPakoutPageCount" parameterType="java.util.Map" resultType="java.lang.Integer"> - select - count(1) - from man_order_detl mod - inner join man_order mo on mod.order_id = mo.id - inner join man_doc_type mdt on mo.doc_type = mdt.doc_id - where 1=1 - and mo.settle <= 2 - and mo.status = 1 - and mdt.pakout = 1 - <include refid="pakOutPageCondition"></include> - </select> - - <update id="increaseAnfme"> - update man_order_detl - set anfme = anfme + #{qty} - where 1=1 - and order_id = #{orderId} - and matnr = #{matnr} - <choose> - <when test="batch != null and batch != ''"> - and batch = #{batch} - </when> - <otherwise> - and (batch IS NULL OR batch = '') - </otherwise> - </choose> - </update> - - <update id="increase"> - update man_order_detl - set qty = qty + #{qty} - where 1=1 - and order_id = #{orderId} - and matnr = #{matnr} - <choose> - <when test="batch != null and batch != ''"> - and batch = #{batch} - </when> - <otherwise> - and (batch IS NULL OR batch = '') - </otherwise> - </choose> - </update> - - <update id="decrease"> - update man_order_detl - set qty = qty - #{qty} - where 1=1 - and order_no = #{orderNo} - and matnr = #{matnr} - <choose> - <when test="batch != null and batch != ''"> - and batch = #{batch} - </when> - <otherwise> - and (batch IS NULL OR batch = '') - </otherwise> - </choose> - </update> - - <update id="modifyStatus"> - update man_order_detl - set status = #{status} - where 1=1 - and order_id = #{orderId} - </update> - - <select id="selectRemainder" resultMap="BaseResultMap"> - select - * - from man_order_detl - where 1=1 - and anfme > qty - and order_id = #{orderId} - </select> - - <select id="selectByMatnr" resultMap="BaseResultMap"> - select - * - from man_order_detl - where 1=1 - and matnr = #{matnr} - </select> - -</mapper> diff --git a/src/main/resources/mapper/OrderMapper.xml b/src/main/resources/mapper/OrderMapper.xml deleted file mode 100644 index 19f1d89..0000000 --- a/src/main/resources/mapper/OrderMapper.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.OrderMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.Order"> - <id column="id" property="id" /> - <result column="uuid" property="uuid" /> - <result column="order_no" property="orderNo" /> - <result column="order_time" property="orderTime" /> - <result column="doc_type" property="docType" /> - <result column="item_id" property="itemId" /> - <result column="item_name" property="itemName" /> - <result column="allot_item_id" property="allotItemId" /> - <result column="def_number" property="defNumber" /> - <result column="number" property="number" /> - <result column="cstmr" property="cstmr" /> - <result column="cstmr_name" property="cstmrName" /> - <result column="tel" property="tel" /> - <result column="oper_memb" property="operMemb" /> - <result column="total_fee" property="totalFee" /> - <result column="discount" property="discount" /> - <result column="discount_fee" property="discountFee" /> - <result column="other_fee" property="otherFee" /> - <result column="act_fee" property="actFee" /> - <result column="pay_type" property="payType" /> - <result column="salesman" property="salesman" /> - <result column="account_day" property="accountDay" /> - <result column="post_fee_type" property="postFeeType" /> - <result column="post_fee" property="postFee" /> - <result column="pay_time" property="payTime" /> - <result column="send_time" property="sendTime" /> - <result column="ship_name" property="shipName" /> - <result column="ship_code" property="shipCode" /> - <result column="settle" property="settle" /> - <result column="status" property="status" /> - <result column="create_by" property="createBy" /> - <result column="create_time" property="createTime" /> - <result column="update_by" property="updateBy" /> - <result column="update_time" property="updateTime" /> - <result column="memo" property="memo" /> - - </resultMap> - - <select id="selectByOrderNo" resultMap="BaseResultMap"> - select top 1 * - from man_order - where 1=1 - and order_no = #{orderNo} - </select> - - <update id="updateSettle"> - update man_order - set settle = #{settle} - ,update_time = getdate() - <if test="userId != null"> - ,update_by = #{userId} - </if> - where 1=1 - and id = #{orderId} - </update> - - <select id="selectComplete" resultMap="BaseResultMap"> - select top 5 * - from man_order - where 1=1 - and settle = 4 - and status = 1 - order by create_time asc - </select> - -</mapper> diff --git a/src/main/resources/mapper/WaitPakinMapper.xml b/src/main/resources/mapper/WaitPakinMapper.xml deleted file mode 100644 index e4227b7..0000000 --- a/src/main/resources/mapper/WaitPakinMapper.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.WaitPakinMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WaitPakin"> - <result column="zpallet" property="zpallet" /> - <result column="loc_no" property="locNo" /> - <result column="anfme" property="anfme" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="batch" property="batch" /> - <result column="order_no" property="orderNo" /> - - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - - <result column="status" property="status" /> - <result column="io_status" property="ioStatus" /> - - <result column="modi_time" property="modiTime" /> - <result column="modi_user" property="modiUser" /> - <result column="appe_time" property="appeTime" /> - <result column="appe_user" property="appeUser" /> - <result column="memo" property="memo" /> - </resultMap> - -</mapper> diff --git a/src/main/resources/mapper/WrkDetlLogMapper.xml b/src/main/resources/mapper/WrkDetlLogMapper.xml deleted file mode 100644 index ec5aa8d..0000000 --- a/src/main/resources/mapper/WrkDetlLogMapper.xml +++ /dev/null @@ -1,60 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.WrkDetlLogMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkDetlLog"> - <result column="wrk_no" property="wrkNo" /> - <result column="io_time" property="ioTime" /> - <result column="anfme" property="anfme" /> - <result column="stock" property="stock" /> - <result column="zpallet" property="zpallet" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="batch" property="batch" /> - <result column="order_no" property="orderNo" /> - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - <result column="modi_user" property="modiUser" /> - <result column="modi_time" property="modiTime" /> - <result column="appe_user" property="appeUser" /> - <result column="appe_time" property="appeTime" /> - <result column="memo" property="memo" /> - - </resultMap> - - <select id="selectLatestByWorkNo" resultMap="BaseResultMap"> - select * from asr_wrk_detl_log wdl,(select top 1 io_time,wrk_no from asr_wrk_detl_log - where wrk_no = #{workNo} - group by io_time,wrk_no - order by io_time desc) a - where wdl.wrk_no = a.wrk_no - and wdl.io_time = a.io_time - and zpallet = #{barcode} - </select> - -</mapper> diff --git a/src/main/resources/mapper/WrkDetlMapper.xml b/src/main/resources/mapper/WrkDetlMapper.xml deleted file mode 100644 index 644b20c..0000000 --- a/src/main/resources/mapper/WrkDetlMapper.xml +++ /dev/null @@ -1,55 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> -<mapper namespace="com.zy.asrs.mapper.WrkDetlMapper"> - - <!-- 閫氱敤鏌ヨ鏄犲皠缁撴灉 --> - <resultMap id="BaseResultMap" type="com.zy.asrs.entity.WrkDetl"> - <result column="wrk_no" property="wrkNo" /> - <result column="io_time" property="ioTime" /> - <result column="anfme" property="anfme" /> - <result column="stock" property="stock" /> - <result column="zpallet" property="zpallet" /> - <result column="matnr" property="matnr" /> - <result column="maktx" property="maktx" /> - <result column="batch" property="batch" /> - <result column="order_no" property="orderNo" /> - - <result column="specs" property="specs" /> - <result column="model" property="model" /> - <result column="color" property="color" /> - <result column="brand" property="brand" /> - <result column="unit" property="unit" /> - <result column="price" property="price" /> - <result column="sku" property="sku" /> - <result column="units" property="units" /> - <result column="barcode" property="barcode" /> - <result column="origin" property="origin" /> - <result column="manu" property="manu" /> - <result column="manu_date" property="manuDate" /> - <result column="item_num" property="itemNum" /> - <result column="safe_qty" property="safeQty" /> - <result column="weight" property="weight" /> - <result column="length" property="length" /> - <result column="volume" property="volume" /> - <result column="three_code" property="threeCode" /> - <result column="supp" property="supp" /> - <result column="supp_code" property="suppCode" /> - <result column="be_batch" property="beBatch" /> - <result column="dead_time" property="deadTime" /> - <result column="dead_warn" property="deadWarn" /> - <result column="source" property="source" /> - <result column="inspect" property="inspect" /> - <result column="danger" property="danger" /> - - <result column="modi_user" property="modiUser" /> - <result column="modi_time" property="modiTime" /> - <result column="appe_user" property="appeUser" /> - <result column="appe_time" property="appeTime" /> - <result column="memo" property="memo" /> - </resultMap> - - <select id="findByWorkNo" resultMap="BaseResultMap"> - select * from asr_wrk_detl where 1=1 and wrk_no = #{workNo} - </select> - -</mapper> -- Gitblit v1.9.1