| | |
| | | import com.core.common.SpringUtils; |
| | | import com.zy.asrs.service.DocTypeService; |
| | | import com.zy.asrs.service.OrderSettleService; |
| | | import com.zy.common.utils.Synchro; |
| | | import com.zy.common.properties.CrossDockProperties; |
| | | import com.zy.system.entity.User; |
| | | import com.zy.system.service.UserService; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | |
| | | 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; |
| | |
| | | * ID |
| | | */ |
| | | @ApiModelProperty(value = "ID") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableId(value = "id", type = IdType.INPUT) |
| | | private Long id; |
| | | |
| | | /** |
| | |
| | | * 客户编号 |
| | | */ |
| | | @ApiModelProperty(value = "客户编号") |
| | | private Long cstmr; |
| | | private String cstmr; |
| | | |
| | | /** |
| | | * 客户 |
| | |
| | | @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 OrderPakoutLog() { |
| | | } |
| | | |
| | | public OrderPakoutLog(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 OrderPakoutLog(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; |
| | |
| | | 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$() { |
| | |
| | | } |
| | | |
| | | public void sync(Object source) { |
| | | Synchro.Copy(source, this); |
| | | BeanUtils.copyProperties(source, this); |
| | | } |
| | | |
| | | } |