自动化立体仓库 - 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;
@@ -20,7 +21,7 @@
import java.util.Date;
@Data
@TableName("man_order_pakin_log")
@TableName("man_order_log_pakin")
public class OrderPakinLog 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;
    /**
@@ -94,7 +95,7 @@
     * 客户编号
     */
    @ApiModelProperty(value = "客户编号")
    private Long cstmr;
    private String cstmr;
    /**
     * 客户
@@ -276,10 +277,31 @@
    @TableField("pakin_pakout_status")
    private Integer pakinPakoutStatus;
    /**
     * 月结ID
     */
    @ApiModelProperty(value = "月结ID")
    @TableField("monthly_settle_id")
    private Long monthlySettleId;
    /**
     * 月结编号
     */
    @ApiModelProperty(value = "月结编号")
    @TableField("monthly_settle_no")
    private String monthlySettleNo;
    /**
     * 是否有业务时间变更记录(临时字段,不映射到数据库)
     */
    @ApiModelProperty(value = "是否有业务时间变更记录")
    @TableField(exist = false)
    private Boolean hasChangeLog;
    public OrderPakinLog() {
    }
    public OrderPakinLog(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) {
    public OrderPakinLog(String uuid, String orderNo, String orderTime, Long docType, Long itemId, String itemName, Long allotItemId, String defNumber, String number, String 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;
@@ -357,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;