feat(wms): 添加钢卷关联订单信息查询功能
- 在WmsCoilContractRelMapper中新增selectOrdersByCoilId和selectOrdersByCoilIds方法 - 在WmsCoilContractRelMapper.xml中实现钢卷与订单关联查询的SQL映射 - 扩展WmsCoilContractRelVo类添加订单相关字段和@JsonFormat注解 - 在WmsMaterialCoilServiceImpl中注入coilContractRelMapper并实现填充订单信息逻辑 - 在WmsMaterialCoilVo中添加orderList字段存储关联订单列表 - 实现根据钢卷ID查询完整订单信息的JOIN查询功能
This commit is contained in:
@@ -2,13 +2,15 @@ package com.klp.domain.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import com.klp.common.annotation.ExcelDictFormat;
|
||||
import com.klp.common.convert.ExcelDictConvert;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
|
||||
/**
|
||||
* 钢卷与合同关联关系视图对象 wms_coil_contract_rel
|
||||
* 钢卷与合同(订单)关联关系视图对象 wms_coil_contract_rel + crm_order JOIN
|
||||
*
|
||||
* @author klp
|
||||
* @date 2026-04-18
|
||||
@@ -19,29 +21,118 @@ public class WmsCoilContractRelVo {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键ID
|
||||
*/
|
||||
@ExcelProperty(value = "主键ID")
|
||||
private Long relId;
|
||||
// ========== 中间表自身字段 ==========
|
||||
|
||||
/**
|
||||
* 钢卷ID
|
||||
*/
|
||||
/** 主键ID */
|
||||
private Long relId;
|
||||
/** 钢卷ID */
|
||||
@ExcelProperty(value = "钢卷ID")
|
||||
private Long coilId;
|
||||
|
||||
/**
|
||||
* 合同ID
|
||||
*/
|
||||
@ExcelProperty(value = "合同ID")
|
||||
/** 合同/订单ID */
|
||||
@ExcelProperty(value = "合同/订单ID")
|
||||
private Long contractId;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
/** 备注 */
|
||||
@ExcelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
// ========== 关联订单信息(JOIN crm_order)==========
|
||||
|
||||
/** 订单ID(主键) */
|
||||
private Long orderId;
|
||||
/** 订单编号 */
|
||||
private String orderCode;
|
||||
/** 订单类型:pre-预订单,formal-正式订单 */
|
||||
private Long orderType;
|
||||
/** 关联客户ID */
|
||||
private String customerId;
|
||||
/** 订单总金额 */
|
||||
private BigDecimal orderAmount;
|
||||
/** 销售员 */
|
||||
private String salesman;
|
||||
/** 交货日期 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date deliveryDate;
|
||||
/** 预订单状态 */
|
||||
private Long preOrderStatus;
|
||||
/** 审核人 */
|
||||
private String auditUser;
|
||||
/** 审核时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
/** 订单状态 */
|
||||
private Long orderStatus;
|
||||
/** 财务状态 */
|
||||
private Long financeStatus;
|
||||
/** 未结款数额 */
|
||||
private BigDecimal unpaidAmount;
|
||||
/** 备注 */
|
||||
private String orderRemark;
|
||||
/** 合同号 */
|
||||
private String contractCode;
|
||||
/** 合同名称 */
|
||||
private String contractName;
|
||||
/** 供方 */
|
||||
private String supplier;
|
||||
/** 需方 */
|
||||
private String customer;
|
||||
/** 签订时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date signTime;
|
||||
/** 签订地点 */
|
||||
private String signLocation;
|
||||
/** 产品内容 */
|
||||
private String productContent;
|
||||
/** 合同内容 */
|
||||
private String contractContent;
|
||||
/** 供方地址 */
|
||||
private String supplierAddress;
|
||||
/** 供方电话 */
|
||||
private String supplierPhone;
|
||||
/** 供方开户行 */
|
||||
private String supplierBank;
|
||||
/** 供方账号 */
|
||||
private String supplierAccount;
|
||||
/** 供方税号 */
|
||||
private String supplierTaxNo;
|
||||
/** 需方地址 */
|
||||
private String customerAddress;
|
||||
/** 需方电话 */
|
||||
private String customerPhone;
|
||||
/** 需方开户行 */
|
||||
private String customerBank;
|
||||
/** 需方账号 */
|
||||
private String customerAccount;
|
||||
/** 需方税号 */
|
||||
private String customerTaxNo;
|
||||
/** 技术附件 */
|
||||
private String techAnnex;
|
||||
/** 商务附件 */
|
||||
private String businessAnnex;
|
||||
/** 排产函 */
|
||||
private String productionSchedule;
|
||||
/** 算单价备注 */
|
||||
private String unitPriceRemark;
|
||||
/** 应付定金(万元) */
|
||||
private BigDecimal depositPayable;
|
||||
/** 已付定金(万元) */
|
||||
private BigDecimal depositPaid;
|
||||
/** 定金比例(%) */
|
||||
private BigDecimal depositRatio;
|
||||
/** 合同状态 0=草稿 1=生效 2=作废 3=已完成 */
|
||||
private Long status;
|
||||
/** 关联合同ID */
|
||||
private Long orderIdInOrder; // crm_order.contract_id,与contractId可能不同
|
||||
/** 附件 */
|
||||
private String annexFiles;
|
||||
/** 创建人 */
|
||||
private String createBy;
|
||||
/** 创建时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
/** 更新人 */
|
||||
private String updateBy;
|
||||
/** 更新时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
|
||||
@@ -329,5 +329,10 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
||||
* 调拨类型
|
||||
*/
|
||||
private String transferType;
|
||||
|
||||
/**
|
||||
* 关联的订单列表(通过wms_coil_contract_rel中间表JOIN crm_order)
|
||||
*/
|
||||
private List<com.klp.domain.vo.WmsCoilContractRelVo> orderList;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user