feat(wms): 扩展钢卷绑定信息数据结构
- 在 WmsCoilBindInfoVo 中新增发货计划、发货单主表及明细相关字段 - 添加 Excel 导出注解支持并增加 BigDecimal 类型字段 - 更新 MyBatis 映射文件以包含新的关联查询字段 - 在 MaterialCoilService 实现中补充完整的绑定信息设置逻辑 - 扩展 WmsMaterialCoilVo 数据传输对象以支持更多业务字段 - 优化数据库查询 SQL 以获取完整的发货单关联信息
This commit is contained in:
@@ -1,9 +1,11 @@
|
|||||||
package com.klp.domain.vo;
|
package com.klp.domain.vo;
|
||||||
|
|
||||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||||
|
import com.alibaba.excel.annotation.ExcelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -16,16 +18,49 @@ public class WmsCoilBindInfoVo implements Serializable {
|
|||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 钢卷ID */
|
||||||
private Long coilId;
|
private Long coilId;
|
||||||
|
|
||||||
|
/** 发货单明细ID */
|
||||||
private Long detailId;
|
private Long detailId;
|
||||||
|
|
||||||
|
// -------------------- 发货计划(plan) --------------------
|
||||||
|
private Long planId;
|
||||||
|
|
||||||
|
private String planName;
|
||||||
|
|
||||||
|
private Date planDate;
|
||||||
|
|
||||||
|
// -------------------- 发货单主表(waybill) --------------------
|
||||||
private Long waybillId;
|
private Long waybillId;
|
||||||
|
|
||||||
private String waybillNo;
|
private String waybillNo;
|
||||||
|
|
||||||
private String waybillName;
|
private String waybillName;
|
||||||
|
|
||||||
private Long planId;
|
private String licensePlate;
|
||||||
private String planName;
|
|
||||||
private Date planDate;
|
private String consigneeUnit;
|
||||||
|
|
||||||
|
private String senderUnit;
|
||||||
|
|
||||||
|
private Date deliveryTime;
|
||||||
|
|
||||||
|
private String weighbridge;
|
||||||
|
|
||||||
|
private String salesPerson;
|
||||||
|
|
||||||
|
private String principal;
|
||||||
|
|
||||||
|
private String principalPhone;
|
||||||
|
|
||||||
|
private Long waybillStatus;
|
||||||
|
|
||||||
|
private String waybillRemark;
|
||||||
|
|
||||||
|
// -------------------- 发货单明细补充字段(detail) --------------------
|
||||||
|
private String detailSettlementType;
|
||||||
|
|
||||||
|
private BigDecimal detailUnitPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -353,8 +353,69 @@ public class WmsMaterialCoilVo extends BaseEntity {
|
|||||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
private Date bindPlanDate;
|
private Date bindPlanDate;
|
||||||
|
|
||||||
|
|
||||||
// 父钢卷id
|
// 父钢卷id
|
||||||
private String parentCoilId;
|
private String parentCoilId;
|
||||||
|
|
||||||
|
// ========== 补充的发货绑定信息字段 ==========
|
||||||
|
/**
|
||||||
|
* 车牌号
|
||||||
|
*/
|
||||||
|
private String bindLicensePlate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 收货单位
|
||||||
|
*/
|
||||||
|
private String bindConsigneeUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货单位
|
||||||
|
*/
|
||||||
|
private String bindSenderUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发货时间
|
||||||
|
*/
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date bindDeliveryTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地磅
|
||||||
|
*/
|
||||||
|
private String bindWeighbridge;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 销售人员
|
||||||
|
*/
|
||||||
|
private String bindSalesPerson;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人
|
||||||
|
*/
|
||||||
|
private String bindPrincipal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 负责人电话
|
||||||
|
*/
|
||||||
|
private String bindPrincipalPhone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运单状态
|
||||||
|
*/
|
||||||
|
private Long bindWaybillStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运单备注
|
||||||
|
*/
|
||||||
|
private String bindWaybillRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细结算类型
|
||||||
|
*/
|
||||||
|
private String bindDetailSettlementType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 明细单价
|
||||||
|
*/
|
||||||
|
private BigDecimal bindDetailUnitPrice;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -338,6 +338,20 @@ public class WmsMaterialCoilServiceImpl implements IWmsMaterialCoilService {
|
|||||||
vo.setBindPlanId(bind.getPlanId());
|
vo.setBindPlanId(bind.getPlanId());
|
||||||
vo.setBindPlanName(bind.getPlanName());
|
vo.setBindPlanName(bind.getPlanName());
|
||||||
vo.setBindPlanDate(bind.getPlanDate());
|
vo.setBindPlanDate(bind.getPlanDate());
|
||||||
|
|
||||||
|
// 补充设置更多的绑定信息字段
|
||||||
|
vo.setBindLicensePlate(bind.getLicensePlate());
|
||||||
|
vo.setBindConsigneeUnit(bind.getConsigneeUnit());
|
||||||
|
vo.setBindSenderUnit(bind.getSenderUnit());
|
||||||
|
vo.setBindDeliveryTime(bind.getDeliveryTime());
|
||||||
|
vo.setBindWeighbridge(bind.getWeighbridge());
|
||||||
|
vo.setBindSalesPerson(bind.getSalesPerson());
|
||||||
|
vo.setBindPrincipal(bind.getPrincipal());
|
||||||
|
vo.setBindPrincipalPhone(bind.getPrincipalPhone());
|
||||||
|
vo.setBindWaybillStatus(bind.getWaybillStatus());
|
||||||
|
vo.setBindWaybillRemark(bind.getWaybillRemark());
|
||||||
|
vo.setBindDetailSettlementType(bind.getDetailSettlementType());
|
||||||
|
vo.setBindDetailUnitPrice(bind.getDetailUnitPrice());
|
||||||
} else {
|
} else {
|
||||||
vo.setBound(Boolean.FALSE);
|
vo.setBound(Boolean.FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,24 +30,60 @@
|
|||||||
<resultMap type="com.klp.domain.vo.WmsCoilBindInfoVo" id="WmsCoilBindInfoResult">
|
<resultMap type="com.klp.domain.vo.WmsCoilBindInfoVo" id="WmsCoilBindInfoResult">
|
||||||
<result property="coilId" column="coil_id"/>
|
<result property="coilId" column="coil_id"/>
|
||||||
<result property="detailId" column="detail_id"/>
|
<result property="detailId" column="detail_id"/>
|
||||||
<result property="waybillId" column="waybill_id"/>
|
|
||||||
<result property="waybillNo" column="waybill_no"/>
|
<!-- 发货计划 -->
|
||||||
<result property="waybillName" column="waybill_name"/>
|
|
||||||
<result property="planId" column="plan_id"/>
|
<result property="planId" column="plan_id"/>
|
||||||
<result property="planName" column="plan_name"/>
|
<result property="planName" column="plan_name"/>
|
||||||
<result property="planDate" column="plan_date"/>
|
<result property="planDate" column="plan_date"/>
|
||||||
|
|
||||||
|
<!-- 发货单主表 -->
|
||||||
|
<result property="waybillId" column="waybill_id"/>
|
||||||
|
<result property="waybillNo" column="waybill_no"/>
|
||||||
|
<result property="waybillName" column="waybill_name"/>
|
||||||
|
<result property="licensePlate" column="license_plate"/>
|
||||||
|
<result property="consigneeUnit" column="consignee_unit"/>
|
||||||
|
<result property="senderUnit" column="sender_unit"/>
|
||||||
|
<result property="deliveryTime" column="delivery_time"/>
|
||||||
|
<result property="weighbridge" column="weighbridge"/>
|
||||||
|
<result property="salesPerson" column="sales_person"/>
|
||||||
|
<result property="principal" column="principal"/>
|
||||||
|
<result property="principalPhone" column="principal_phone"/>
|
||||||
|
<result property="waybillStatus" column="status"/>
|
||||||
|
<result property="waybillRemark" column="remark"/>
|
||||||
|
|
||||||
|
<!-- 发货单明细补充字段 -->
|
||||||
|
<result property="detailSettlementType" column="settlement_type"/>
|
||||||
|
<result property="detailUnitPrice" column="unit_price"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectBindInfoByCoilIds" resultMap="WmsCoilBindInfoResult">
|
<select id="selectBindInfoByCoilIds" resultMap="WmsCoilBindInfoResult">
|
||||||
SELECT
|
SELECT
|
||||||
d.coil_id,
|
d.coil_id,
|
||||||
d.detail_id,
|
d.detail_id,
|
||||||
|
|
||||||
|
-- 发货单主表
|
||||||
w.waybill_id,
|
w.waybill_id,
|
||||||
w.waybill_no,
|
w.waybill_no,
|
||||||
w.waybill_name,
|
w.waybill_name,
|
||||||
|
w.license_plate,
|
||||||
|
w.consignee_unit,
|
||||||
|
w.sender_unit,
|
||||||
|
w.delivery_time,
|
||||||
|
w.weighbridge,
|
||||||
|
w.sales_person,
|
||||||
|
w.principal,
|
||||||
|
w.principal_phone,
|
||||||
|
w.status,
|
||||||
|
w.remark,
|
||||||
|
|
||||||
|
-- 发货计划
|
||||||
p.plan_id,
|
p.plan_id,
|
||||||
p.plan_name,
|
p.plan_name,
|
||||||
p.plan_date
|
p.plan_date,
|
||||||
|
|
||||||
|
-- 发货单明细补充字段
|
||||||
|
d.settlement_type,
|
||||||
|
d.unit_price
|
||||||
FROM wms_delivery_waybill_detail d
|
FROM wms_delivery_waybill_detail d
|
||||||
INNER JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
INNER JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
||||||
INNER JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
INNER JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
||||||
@@ -62,12 +98,30 @@
|
|||||||
SELECT
|
SELECT
|
||||||
d.coil_id,
|
d.coil_id,
|
||||||
d.detail_id,
|
d.detail_id,
|
||||||
|
|
||||||
|
-- 发货单主表
|
||||||
w.waybill_id,
|
w.waybill_id,
|
||||||
w.waybill_no,
|
w.waybill_no,
|
||||||
w.waybill_name,
|
w.waybill_name,
|
||||||
|
w.license_plate,
|
||||||
|
w.consignee_unit,
|
||||||
|
w.sender_unit,
|
||||||
|
w.delivery_time,
|
||||||
|
w.weighbridge,
|
||||||
|
w.sales_person,
|
||||||
|
w.principal,
|
||||||
|
w.principal_phone,
|
||||||
|
w.status,
|
||||||
|
w.remark,
|
||||||
|
|
||||||
|
-- 发货计划
|
||||||
p.plan_id,
|
p.plan_id,
|
||||||
p.plan_name,
|
p.plan_name,
|
||||||
p.plan_date
|
p.plan_date,
|
||||||
|
|
||||||
|
-- 发货单明细补充字段
|
||||||
|
d.settlement_type,
|
||||||
|
d.unit_price
|
||||||
FROM wms_delivery_waybill_detail d
|
FROM wms_delivery_waybill_detail d
|
||||||
INNER JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
INNER JOIN wms_delivery_waybill w ON w.waybill_id = d.waybill_id AND w.del_flag = 0
|
||||||
INNER JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
INNER JOIN wms_delivery_plan p ON p.plan_id = w.plan_id AND p.del_flag = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user