demand: TMS系统 - 运单录入/运单修改/网点费用申请 - 线路为海运的产品 界面功能调整;

This commit is contained in:
aike 2026-04-17 17:21:59 +08:00
parent f3e4607c68
commit b9f8fe83f3
5 changed files with 55 additions and 1 deletions

View File

@ -55,6 +55,10 @@ public class EmisWaybillOther extends BaseEntity {
/* 现金客户公司名称 */
private String moneyCompany;
/* 柜数 */
@DataAuditField(fieldComment = "柜数")
private Long cabinetNumber;
// /* 回款回款人 */
// private String payee;
// /* 销售联系人 */

View File

@ -966,6 +966,7 @@ public class WaybillOrder implements Serializable {
EmisWaybillOther waybillOther = new EmisWaybillOther();
waybillOther.setMoneyUserId(this.getWaybillOther().getMoneyUserId());
waybillOther.setSalesSupport(this.getWaybillOther().getSalesSupport());
waybillOther.setCabinetNumber(this.getWaybillOther().getCabinetNumber());
dbWaybill.setWaybillOther(waybillOther);
}

View File

@ -164,10 +164,11 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
* 保存或更新运单其他信息副表
* @param emisWaybillSave
*/
private void saveOrUpdateWaybillOther(EmisWaybill emisWaybillSave) {
private void saveOrUpdateWaybillOther(EmisWaybill emisWaybillSave) throws EmisBizError {
if (emisWaybillSave == null || emisWaybillSave.getId() == null) {
return;
}
validateCabinetNumberRule(emisWaybillSave, null);
String billCode = emisWaybillSave.getBillCode();
Long waybillId = emisWaybillSave.getId();
@ -175,15 +176,20 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
// 从waybillOther中获取moneyUserId
Long moneyUserId = null;
String salesSupport = null;
Long cabinetNumber = 0L;
if (emisWaybillSave.getWaybillOther() != null) {
moneyUserId = emisWaybillSave.getWaybillOther().getMoneyUserId();
salesSupport = emisWaybillSave.getWaybillOther().getSalesSupport();
cabinetNumber = emisWaybillSave.getWaybillOther().getCabinetNumber();
if (moneyUserId == null) {
moneyUserId = 0L;
}
if (salesSupport == null) {
salesSupport ="";
}
if (cabinetNumber == null) {
cabinetNumber = 0L;
}
}
// 查询是否已存在
@ -194,6 +200,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
existing.setSalesSupport(salesSupport);
existing.setBillCode(billCode);
existing.setMoneyUserId(moneyUserId);
existing.setCabinetNumber(cabinetNumber);
existing.preUpdate();
emisWaybillOtherMapper.updateEmisWaybillOther(existing);
} else {
@ -203,11 +210,44 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
waybillOtherEntity.setBillCode(billCode);
waybillOtherEntity.setSalesSupport(salesSupport);
waybillOtherEntity.setMoneyUserId(moneyUserId);
waybillOtherEntity.setCabinetNumber(cabinetNumber);
waybillOtherEntity.preInsert();
emisWaybillOtherMapper.insertEmisWaybillOther(waybillOtherEntity);
}
}
private void validateCabinetNumberRule(EmisWaybill emisWaybillSave, String productName) throws EmisBizError {
if (emisWaybillSave == null) {
return;
}
if (emisWaybillSave.getWaybillOther() == null) {
emisWaybillSave.setWaybillOther(new EmisWaybillOther());
}
Long cabinetNumber = emisWaybillSave.getWaybillOther().getCabinetNumber();
if (cabinetNumber == null) {
cabinetNumber = 0L;
emisWaybillSave.getWaybillOther().setCabinetNumber(0L);
}
String currentProductName = productName;
if (StringUtils.isBlank(currentProductName) && StringUtils.isNotBlank(emisWaybillSave.getProductType())) {
EmisTransProduct transProduct = getTransProductByCode(emisWaybillSave.getProductType());
if (transProduct != null) {
currentProductName = transProduct.getProdName();
}
}
if (StringUtils.isBlank(currentProductName)) {
return;
}
if (currentProductName.contains("拼箱") && cabinetNumber.longValue() != 0L) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "海运拼箱,柜数必须为0");
}
if (currentProductName.contains("整柜") && cabinetNumber.longValue() < 1L) {
throw new EmisBizError(EmisBizErrorType.PARAM_ERROR1, "海运整柜,柜数必须为大于等于1的整数");
}
}
/**
* 获取稽核数据
* @param id
@ -974,6 +1014,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
if(transProduct==null){
throw new EmisBizError(EmisBizErrorType.NOT_EXISTS, "产品不正确");
}
// validateCabinetNumberRule(emisWaybillSave, transProduct.getProdName());
emisWaybillSave.setProductType(transProduct.getProdCode());
// 收件国家省市区转换

View File

@ -265,6 +265,7 @@
<result property="salesSupport" column="waybill_other_sales_support"/>
<result property="moneyUserId" column="waybill_other_money_user_id"/>
<result property="moneyCompany" column="waybill_other_money_company"/>
<result property="cabinetNumber" column="waybill_other_cabinet_number"/>
<!-- <result property="payee" column="waybill_other_payee"/>-->
<!-- <result property="salesmen" column="waybill_other_salesmen"/>-->
</association>
@ -370,6 +371,7 @@
wss.sales_support as waybill_other_sales_support,
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
IFNULL(wss.cabinet_number, 0) as waybill_other_cabinet_number,
p.emp_name as dispatch_man_name,q.site_name as print_site_name,
r.emp_name as print_man_name,
@ -484,6 +486,7 @@
wss.sales_support as waybill_other_sales_support,
COALESCE(wss.money_user_id, a3.money_user_id) as waybill_other_money_user_id,
COALESCE(mu.company, mu2.company) as waybill_other_money_company,
IFNULL(wss.cabinet_number, 0) as waybill_other_cabinet_number,
a3.sales_executive ,
a3.customer_type as customer_type,
a3.main_user_id ,

View File

@ -11,6 +11,7 @@
<result property="salesSupport" column="sales_support" />
<result property="moneyUserId" column="money_user_id" />
<result property="moneyCompany" column="money_company" />
<result property="cabinetNumber" column="cabinet_number" />
</resultMap>
<sql id="selectEmisWaybillOtherVo">
@ -21,6 +22,7 @@
a.sales_support,
a.money_user_id,
mu.company as money_company,
a.cabinet_number,
a.del_flag,
a.create_by,
a.create_time,
@ -57,6 +59,7 @@
<if test="billCode != null and billCode != ''">bill_code,</if>
<if test="salesSupport != null and salesSupport != ''">sales_support,</if>
<if test="moneyUserId != null">money_user_id,</if>
<if test="cabinetNumber != null">cabinet_number,</if>
<if test="delFlag != null and delFlag != ''">del_flag,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
@ -71,6 +74,7 @@
<if test="billCode != null and billCode != ''">#{billCode},</if>
<if test="salesSupport != null and salesSupport != ''">#{salesSupport},</if>
<if test="moneyUserId != null">#{moneyUserId},</if>
<if test="cabinetNumber != null">#{cabinetNumber},</if>
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
@ -89,6 +93,7 @@
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
<if test="salesSupport != null">sales_support = #{salesSupport},</if>
<if test="moneyUserId != null">money_user_id = #{moneyUserId},</if>
<if test="cabinetNumber != null">cabinet_number = #{cabinetNumber},</if>
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>