提交 848e0e86 authored 作者: liuhaiquan's avatar liuhaiquan

合并结算单增加开票公司和上报标识判断

上级 eb2e103b
...@@ -562,7 +562,11 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService { ...@@ -562,7 +562,11 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
Integer invoiceType = null; Integer invoiceType = null;
//结算方式 1装车净重 2卸车净重 //结算方式 1装车净重 2卸车净重
Integer settlementWay = null; Integer settlementWay = null;
String tip = "数据错误,结算单状态“待对账”且同一货主,同一开票标识,同一结算方式的结算单支持合并"; //开票公司ID
Integer invoicingCompanyId = null;
//开票公司上报标识
Integer reportFlag = null ;
String tip = "结算单状态“待对账”且同一货主,同一开票标识,同一结算方式,同一开票公司,同一上报标识 支持合并";
SettlementOwner merge = null; SettlementOwner merge = null;
String settlementNo = settlementMqHandlerService.settlementNoGenerate(); String settlementNo = settlementMqHandlerService.settlementNoGenerate();
...@@ -588,9 +592,19 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService { ...@@ -588,9 +592,19 @@ public class SettlementOwnerServiceImpl implements SettlementOwnerService {
log.warn("货主结算单号:{} 在本批次中不属于同一结算方式",item.getSettlementNo()); log.warn("货主结算单号:{} 在本批次中不属于同一结算方式",item.getSettlementNo());
throw new ServiceSystemException(PerformanceResultEnum.DATA_REPEAT,tip); throw new ServiceSystemException(PerformanceResultEnum.DATA_REPEAT,tip);
} }
if(Objects.nonNull(invoicingCompanyId) && !Objects.equals(invoicingCompanyId,item.getInvoicingCompanyId())){
log.warn("货主结算单号:{} 在本批次中不属于同一开票公司",item.getSettlementNo());
throw new ServiceSystemException(PerformanceResultEnum.DATA_REPEAT,tip);
}
if(Objects.nonNull(reportFlag) && !Objects.equals(reportFlag,item.getReportFlag())){
log.warn("货主结算单号:{} 在本批次中不属于同一上报标识",item.getSettlementNo());
throw new ServiceSystemException(PerformanceResultEnum.DATA_REPEAT,tip);
}
ownerUserNo = item.getOwnerUserNo(); ownerUserNo = item.getOwnerUserNo();
invoiceType = item.getInvoiceType(); invoiceType = item.getInvoiceType();
settlementWay = item.getSettlementWay(); settlementWay = item.getSettlementWay();
invoicingCompanyId = item.getInvoicingCompanyId();
reportFlag = item.getReportFlag();
settlementNos.add(item.getSettlementNo()); settlementNos.add(item.getSettlementNo());
//合并数据 //合并数据
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论