demand: 运单录入界面-缅甸虚拟单调整
committer: heyu
This commit is contained in:
parent
97ff62ca74
commit
424cc100d1
@ -316,6 +316,8 @@ public class EmisWaybill extends BaseEntity
|
|||||||
private String blVirtual;
|
private String blVirtual;
|
||||||
/* 主单号 */
|
/* 主单号 */
|
||||||
private String masterBillCode;
|
private String masterBillCode;
|
||||||
|
/* 虚拟单备注 */
|
||||||
|
private String virtualRemark;
|
||||||
|
|
||||||
/* 是否付款 */
|
/* 是否付款 */
|
||||||
private String blBill;
|
private String blBill;
|
||||||
|
|||||||
@ -393,6 +393,8 @@ public class WaybillOrder implements Serializable {
|
|||||||
private String blVirtual;
|
private String blVirtual;
|
||||||
/* 主单号 */
|
/* 主单号 */
|
||||||
private String masterBillCode;
|
private String masterBillCode;
|
||||||
|
/* 虚拟单备注 */
|
||||||
|
private String virtualRemark;
|
||||||
|
|
||||||
// 销售,回款
|
// 销售,回款
|
||||||
// private String salesmenName;
|
// private String salesmenName;
|
||||||
@ -739,6 +741,7 @@ public class WaybillOrder implements Serializable {
|
|||||||
// 虚拟单
|
// 虚拟单
|
||||||
dbWaybill.setBlVirtual(this.getBlVirtual());
|
dbWaybill.setBlVirtual(this.getBlVirtual());
|
||||||
dbWaybill.setMasterBillCode(this.getMasterBillCode());
|
dbWaybill.setMasterBillCode(this.getMasterBillCode());
|
||||||
|
dbWaybill.setVirtualRemark(this.getVirtualRemark());
|
||||||
|
|
||||||
// dbWaybill.setCustomerName(this.getCustomerName());
|
// dbWaybill.setCustomerName(this.getCustomerName());
|
||||||
// dbWaybill.setReceiveCustomerCode(this.getReceiveCustomerCode());
|
// dbWaybill.setReceiveCustomerCode(this.getReceiveCustomerCode());
|
||||||
|
|||||||
@ -3270,40 +3270,21 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
|||||||
if (CollectionUtil.isNotEmpty(batchList)) {
|
if (CollectionUtil.isNotEmpty(batchList)) {
|
||||||
throw new EmisBizError(EmisBizErrorType.FAIL, "该单号已经录入批次,请先在组批次中剔除该运单");
|
throw new EmisBizError(EmisBizErrorType.FAIL, "该单号已经录入批次,请先在组批次中剔除该运单");
|
||||||
}
|
}
|
||||||
String remark = masterWaybill.getRemark();
|
String virtualRemark = masterWaybill.getVirtualRemark();
|
||||||
String virtualBillCode = emisWaybillSave.getBillCode();
|
String virtualBillCode = emisWaybillSave.getBillCode();
|
||||||
String virtualBillCodeLastSix = virtualBillCode.substring(virtualBillCode.length() - 6);
|
String virtualBillCodeLastSix = emisWaybillSave.getBillCode().substring(virtualBillCode.length() - 6);
|
||||||
if (remark != null && remark.contains("该运单为主单,对应虚拟单为")) {
|
if (StringUtil.isNotBlank(virtualRemark)) {
|
||||||
// 如果包含关键字,在最后一个虚拟单号后添加新的虚拟单号
|
|
||||||
int lastIndex = remark.lastIndexOf("该运单为主单,对应虚拟单为");
|
|
||||||
String prefix = remark.substring(0, lastIndex + "该运单为主单,对应虚拟单为".length());
|
|
||||||
String suffix = remark.substring(lastIndex + "该运单为主单,对应虚拟单为".length());
|
|
||||||
|
|
||||||
// 处理虚拟单号去重
|
|
||||||
Set<String> virtualBillSet = new LinkedHashSet<>();
|
Set<String> virtualBillSet = new LinkedHashSet<>();
|
||||||
if (!suffix.trim().isEmpty()) {
|
String[] codes = virtualRemark.split(",");
|
||||||
// 将现有虚拟单号添加到Set中,并去除空格
|
virtualBillSet.addAll(Arrays.asList(codes));
|
||||||
String[] codes = suffix.split(",");
|
|
||||||
for (String code : codes) {
|
|
||||||
String trimmedCode = code.trim();
|
|
||||||
if (!trimmedCode.isEmpty()) {
|
|
||||||
virtualBillSet.add(trimmedCode);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// 添加新的虚拟单号
|
|
||||||
virtualBillSet.add(virtualBillCodeLastSix);
|
virtualBillSet.add(virtualBillCodeLastSix);
|
||||||
|
virtualRemark = String.join(",", virtualBillSet);
|
||||||
// 重新拼接去重后的虚拟单号,保持原有顺序
|
|
||||||
remark = prefix + String.join(",", virtualBillSet);
|
|
||||||
} else {
|
} else {
|
||||||
// 如果不包含关键字,在备注末尾添加新的信息
|
virtualRemark = virtualBillCodeLastSix;
|
||||||
remark = (remark != null ? remark + " " : "") + "该运单为主单,对应虚拟单为" + virtualBillCodeLastSix;
|
|
||||||
}
|
}
|
||||||
EmisWaybill emisWaybill = new EmisWaybill();
|
EmisWaybill emisWaybill = new EmisWaybill();
|
||||||
emisWaybill.setRemark(remark);
|
emisWaybill.setVirtualRemark(virtualRemark);
|
||||||
emisWaybill.setId(masterWaybill.getId());
|
emisWaybill.setId(masterWaybill.getId());
|
||||||
emisWaybillSave.setRemark("该单为虚拟单:对应主单为" + emisWaybillSave.getMasterBillCode());
|
|
||||||
emisWaybillMapper.updateEmisWaybill(emisWaybill);
|
emisWaybillMapper.updateEmisWaybill(emisWaybill);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -227,6 +227,7 @@
|
|||||||
|
|
||||||
<result property="blVirtual" column="bl_virtual" />
|
<result property="blVirtual" column="bl_virtual" />
|
||||||
<result property="masterBillCode" column="master_bill_code" />
|
<result property="masterBillCode" column="master_bill_code" />
|
||||||
|
<result property="virtualRemark" column="virtual_remark" />
|
||||||
|
|
||||||
<result property="transType" column="trans_type" />
|
<result property="transType" column="trans_type" />
|
||||||
|
|
||||||
@ -301,7 +302,7 @@
|
|||||||
a.goods_type, a.goods_info, a.goods_pics, a.bl_prepare_in_freight, a.prepare_in_est_fee,
|
a.goods_type, a.goods_info, a.goods_pics, a.bl_prepare_in_freight, a.prepare_in_est_fee,
|
||||||
a.prepare_in_real_fee, a.prepare_in_express, a.prepare_in_bill_code, a.prepare_in_remark,
|
a.prepare_in_real_fee, a.prepare_in_express, a.prepare_in_bill_code, a.prepare_in_remark,
|
||||||
a.prepare_in_supplier, a.total_weight, a.total_volume, a.parcel_qty, a.bill_weight, a.volume_weight, a.currency,
|
a.prepare_in_supplier, a.total_weight, a.total_volume, a.parcel_qty, a.bill_weight, a.volume_weight, a.currency,
|
||||||
a.settlement_weight, a.scan_weight, a.fee_weight, a.freight, a.real_payment_type, a.real_fee, a.bl_special_quote,a.bl_virtual,a.master_bill_code
|
a.settlement_weight, a.scan_weight, a.fee_weight, a.freight, a.real_payment_type, a.real_fee, a.bl_special_quote,a.bl_virtual,a.master_bill_code,a.virtual_remark,
|
||||||
a.bl_over_long, a.bl_bill, a.bl_bill_text, a.bl_over_weight, a.over_weight_number, a.fee_remark, a.third_code,
|
a.bl_over_long, a.bl_bill, a.bl_bill_text, a.bl_over_weight, a.over_weight_number, a.fee_remark, a.third_code,
|
||||||
a.real_value, a.bl_insure, a.insure_value, a.insure_value_currency, a.insure_fee_currency, a.insure_fee, a.insure_remark,
|
a.real_value, a.bl_insure, a.insure_value, a.insure_value_currency, a.insure_fee_currency, a.insure_fee, a.insure_remark,
|
||||||
a.insure_site_code, a.insure_date, a.bl_print, a.print_man_code, a.print_site, a.print_date, a.print_count, a.bl_disp_fd,
|
a.insure_site_code, a.insure_date, a.bl_print, a.print_man_code, a.print_site, a.print_date, a.print_count, a.bl_disp_fd,
|
||||||
@ -387,7 +388,7 @@
|
|||||||
<!-- 单个对象可以返回子单数据 -->
|
<!-- 单个对象可以返回子单数据 -->
|
||||||
<sql id="selectEmisWaybillDetailVo">
|
<sql id="selectEmisWaybillDetailVo">
|
||||||
select
|
select
|
||||||
a.id,a.order_sn, a.cust_order_id, a.bill_code,a.bill_code_sub, a.order_status, a.waybill_status,
|
a.id,a.order_sn, a.cust_order_id, a.bill_code,a.bill_code_sub, a.order_status, a.waybill_status,a.master_bill_code,a.virtual_remark,
|
||||||
a.order_type, a.order_date, a.user_id, a.customer_code, a.customer_name, a.open_id, a.receive_name,
|
a.order_type, a.order_date, a.user_id, a.customer_code, a.customer_name, a.open_id, a.receive_name,
|
||||||
a.receive_company, a.receive_mobile, a.receive_tel, a.receive_country, a.receive_province, a.receive_city,
|
a.receive_company, a.receive_mobile, a.receive_tel, a.receive_country, a.receive_province, a.receive_city,
|
||||||
a.receive_county, a.receive_town, a.receive_address, a.receive_postcode, a.receive_pcd, a.send_name, a.send_company,
|
a.receive_county, a.receive_town, a.receive_address, a.receive_postcode, a.receive_pcd, a.send_name, a.send_company,
|
||||||
@ -3147,6 +3148,7 @@
|
|||||||
<if test="blOverLong != null and blOverLong != ''">bl_over_long = #{blOverLong},</if>
|
<if test="blOverLong != null and blOverLong != ''">bl_over_long = #{blOverLong},</if>
|
||||||
<if test="blVirtual != null and blVirtual != ''">bl_virtual = #{blVirtual},</if>
|
<if test="blVirtual != null and blVirtual != ''">bl_virtual = #{blVirtual},</if>
|
||||||
<if test="masterBillCode != null and masterBillCode != ''">master_bill_code= #{masterBillCode},</if>
|
<if test="masterBillCode != null and masterBillCode != ''">master_bill_code= #{masterBillCode},</if>
|
||||||
|
<if test="virtualRemark != null and virtualRemark != ''">virtual_remark= #{virtualRemark},</if>
|
||||||
<if test="blBill != null and blBill != ''">bl_bill = #{blBill},</if>
|
<if test="blBill != null and blBill != ''">bl_bill = #{blBill},</if>
|
||||||
<if test="blBillText != null and blBillText != ''">bl_bill_text = #{blBillText},</if>
|
<if test="blBillText != null and blBillText != ''">bl_bill_text = #{blBillText},</if>
|
||||||
<if test="blProfit != null and blProfit != ''">bl_profit = #{blProfit},</if>
|
<if test="blProfit != null and blProfit != ''">bl_profit = #{blProfit},</if>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user