自动化立体仓库 - WMS系统
chen.llin
2 天以前 0406c675e143bbb08284fd55381261afcc587afc
src/main/java/com/zy/asrs/entity/OrderPakinLog.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;
@@ -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 OrderPakinLog() {
    }
@@ -371,11 +379,40 @@
        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;
    }
    /**
     * 判断是否为越库单据
     * 通过备注字段判断(备注中包含"越库")或通过订单编号判断(关联的越库出库单)
     *
     * @return true: 越库单据, false: 普通单据
     */
    public boolean isCrossDock() {
        // 判断备注中是否包含"越库"
        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.getInboundDocTypeId())) {
                return true;
            }
        } catch (Exception e) {
            // 如果获取配置失败,忽略异常
        }
        return false;
    }
    public String getPayType$() {
        if (null == this.payType) {
            return null;