自动化立体仓库 - WMS系统
chen.llin
14 小时以前 12067f657bc3dc169a7a466e433374368e8daf73
src/main/java/com/zy/asrs/entity/OrderPakoutLog.java
@@ -8,6 +8,7 @@
import com.core.common.SpringUtils;
import com.zy.asrs.service.DocTypeService;
import com.zy.asrs.service.OrderSettleService;
import com.zy.common.properties.CrossDockProperties;
import com.zy.system.entity.User;
import com.zy.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
@@ -20,7 +21,7 @@
import java.util.Date;
@Data
@TableName("man_order_pakout_log")
@TableName("man_order_log_pakout")
public class OrderPakoutLog implements Serializable {
    private static final long serialVersionUID = 1L;
@@ -29,7 +30,7 @@
     * ID
     */
    @ApiModelProperty(value = "ID")
    @TableId(value = "id", type = IdType.AUTO)
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;
    /**
@@ -290,6 +291,13 @@
    @TableField("monthly_settle_no")
    private String monthlySettleNo;
    /**
     * 是否有业务时间变更记录(临时字段,不映射到数据库)
     */
    @ApiModelProperty(value = "是否有业务时间变更记录")
    @TableField(exist = false)
    private Boolean hasChangeLog;
    public OrderPakoutLog() {
    }
@@ -371,11 +379,44 @@
        DocTypeService service = SpringUtils.getBean(DocTypeService.class);
        DocType docType = service.selectById(this.docType);
        if (!Cools.isEmpty(docType)) {
            return String.valueOf(docType.getDocName());
            String docName = String.valueOf(docType.getDocName());
            // 如果是越库单据,添加"越库"标识
            if (isCrossDock()) {
                return docName + "(越库)";
            }
            return docName;
        }
        return null;
    }
    /**
     * 判断是否为越库单据
     * 通过订单编号判断(越库出库单以"CK"开头)或通过备注字段判断(备注中包含"越库")
     *
     * @return true: 越库单据, false: 普通单据
     */
    public boolean isCrossDock() {
        // 判断订单编号是否以"CK"开头(越库出库单编号格式)
        if (!Cools.isEmpty(this.orderNo) && this.orderNo.startsWith("CK")) {
            return true;
        }
        // 判断备注中是否包含"越库"
        if (!Cools.isEmpty(this.memo) && this.memo.contains("越库")) {
            return true;
        }
        // 判断是否为越库出库单类型
        try {
            CrossDockProperties crossDockProperties = SpringUtils.getBean(CrossDockProperties.class);
            if (crossDockProperties != null && this.docType != null
                    && this.docType.equals(crossDockProperties.getOutboundDocTypeId())) {
                return true;
            }
        } catch (Exception e) {
            // 如果获取配置失败,忽略异常
        }
        return false;
    }
    public String getPayType$() {
        if (null == this.payType) {
            return null;