Merge pull request 'develop' (#198) from develop into master

Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/198
This commit is contained in:
heyu 2025-10-11 16:30:05 +08:00
commit e13fc672a1
2 changed files with 30 additions and 8 deletions

View File

@ -526,12 +526,34 @@ public class EmisSettleInvoiceChRecordServiceImpl extends EmisBaseService implem
} }
} } else {
else{ // 安全获取failDetails数组 - 根据实际JSON结构调整路径
EmisSettleInvoiceChRecord newRecord=new EmisSettleInvoiceChRecord(); JSONArray jArrFailList = null;
String errorMessage = jRst != null ? jRst.getString("message") : "未知错误";
if (jRst != null) {
JSONObject data = jRst.getJSONObject("data");
if (data != null) {
jArrFailList = data.getJSONArray("failDetails");
}
}
// 构建错误描述
String statusDesc = errorMessage;
if (jArrFailList != null && jArrFailList.size() > 0) {
JSONObject item0 = jArrFailList.getJSONObject(0);
if (item0 != null) {
String failReason = item0.getString("failReason");
if (failReason != null) {
statusDesc = errorMessage + " -- " + failReason;
}
}
}
EmisSettleInvoiceChRecord newRecord = new EmisSettleInvoiceChRecord();
newRecord.setId(old.getId()); newRecord.setId(old.getId());
newRecord.setOpenChStatus("-1"); newRecord.setOpenChStatus("-1");
newRecord.setOpenChStatusDesc(jRst.getString("message")); newRecord.setOpenChStatusDesc(statusDesc);
emisSettleInvoiceChRecordMapper.updateEmisSettleInvoiceChRecord(newRecord); emisSettleInvoiceChRecordMapper.updateEmisSettleInvoiceChRecord(newRecord);
} }
return 1; return 1;

View File

@ -493,8 +493,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
w.create_time as w_create_time, w.update_by as w_update_by, w.update_time as w_update_time, w.remark as w_remark, w.create_time as w_create_time, w.update_by as w_update_by, w.update_time as w_update_time, w.remark as w_remark,
-- 新增运单字段:寄件日期、产品类型、件数、结算重量 -- 新增运单字段:寄件日期、产品类型、件数、结算重量
w.send_date as w_send_date, w.product_type as w_product_type, w.parcel_qty as w_parcel_qty, w.settlement_weight as w_settlement_weight, w.send_date as w_send_date, w.product_type as w_product_type, w.parcel_qty as w_parcel_qty, w.settlement_weight as w_settlement_weight,
-- 快件类型(寄件网点-目的网点) -- 快件类型(寄件网点名称-目的网点名称)
CONCAT(COALESCE(send_site.size_code2, ''), '-', COALESCE(dest_site.size_code2, '')) as express_type,tp.prod_name as w_product_type_name, CONCAT(COALESCE(send_site.site_name, ''), '--', COALESCE(dest_site.site_name, '')) as express_type,tp.prod_name as w_product_type_name,
-- 结算账单信息 -- 结算账单信息
sb.id as sb_id, sb.settle_bill_no as sb_settle_bill_no, sb.settle_bill_name as sb_settle_bill_name, sb.id as sb_id, sb.settle_bill_no as sb_settle_bill_no, sb.settle_bill_name as sb_settle_bill_name,
@ -522,9 +522,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ssb.customer_name as ssb_customer_name, ssb.invoiced_money as ssb_invoiced_money, ssb.reced_money as ssb_reced_money, ssb.customer_name as ssb_customer_name, ssb.invoiced_money as ssb_invoiced_money, ssb.reced_money as ssb_reced_money,
ssb.satisfy_money as ssb_satisfy_money, ssb.allowance_money as ssb_allowance_money, ssb.deduction_money as ssb_deduction_money, ssb.satisfy_money as ssb_satisfy_money, ssb.allowance_money as ssb_allowance_money, ssb.deduction_money as ssb_deduction_money,
ssb.other_money as ssb_other_money, ssb.satisfy_reason as ssb_satisfy_reason, ssb.allowance_reason as ssb_allowance_reason, ssb.other_money as ssb_other_money, ssb.satisfy_reason as ssb_satisfy_reason, ssb.allowance_reason as ssb_allowance_reason,
ssb.deduction_reason as ssb_deduction_reason, ssb.other_reason as ssb_other_reason, ssb.deduction_reason as ssb_deduction_reason, ssb.other_reason as ssb_other_reason,
ssb.bl_confirm_center as ssb_bl_confirm_center, ssb.bl_confirm_site as ssb_bl_confirm_site, ssb.bl_confirm_center as ssb_bl_confirm_center, ssb.bl_confirm_site as ssb_bl_confirm_site,
ssb.create_by as ssb_create_by, ssb.create_time as ssb_create_time, ssb.update_by as ssb_update_by, ssb.create_by as ssb_create_by, ssb.create_time as ssb_create_time, ssb.update_by as ssb_update_by,
ssb.update_time as ssb_update_time ssb.update_time as ssb_update_time
from emis_waybill w from emis_waybill w
left join emis_settle_sub_bill ssb on w.bill_code = ssb.bill_code and ssb.del_flag = '0' left join emis_settle_sub_bill ssb on w.bill_code = ssb.bill_code and ssb.del_flag = '0'