提交 2cdd1611 authored 作者: jiangwenye's avatar jiangwenye

结算单状态变更

上级 00c6cddf
......@@ -76,7 +76,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
LocalDateTime settlementPeriodTime = LocalDateTimeUtils.getBeginMonthDate();
settlementOwner = settlementOwnerDao.selectUnlockOfSettlementPeriodMonth(settlementOwnerDetail.getOrderNo(), settlementPeriodTime, settlementOwnerDetail.getInvoiceType()).orNull();
if (settlementOwner == null){ // 月结初始化
settlementNo = settlementPeriodMonthInit(settlementOwnerDetail, settlementPeriodTime);
settlementNo = settlementPeriodMonthInit(settlementOwnerDetail, settlementPeriodTime,ownerInfo);
}
else { // 月结更新
settlementPeriodMonthUpdate(settlementOwner, settlementOwnerDetail);
......@@ -86,7 +86,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
else {
settlementOwner = settlementOwnerDao.selectUnlockOfSettlementPeriodImmediate(settlementOwnerDetail.getOrderNo(), settlementOwnerDetail.getInvoiceType()).orNull();
if (settlementOwner == null){ // 拉运完成初始化
settlementNo = settlementPeriodImmediateInit(settlementOwnerDetail);
settlementNo = settlementPeriodImmediateInit(settlementOwnerDetail,ownerInfo);
}
else { // 拉运完成更新
settlementPeriodImmediateUpdate(settlementOwner, settlementOwnerDetail);
......@@ -143,7 +143,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
/**
* 月结初始化
*/
private String settlementPeriodMonthInit(SettlementOwnerDetail settlementOwnerDetail, LocalDateTime settlementPeriodTime){
private String settlementPeriodMonthInit(SettlementOwnerDetail settlementOwnerDetail, LocalDateTime settlementPeriodTime,OwnerInfoFeignVO ownerInfo){
//获取所有detail
......@@ -172,6 +172,17 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwner.setPrepayFreight(settlementOwnerDetail.getPrepayFreight());
settlementOwner.setStatus(SettlementOwnerEnum.Status.TO_BE_LOCKED.getCode());
settlementOwner.setCompanyName(ownerInfo.getCompanyName());
settlementOwner.setCompanyTaxCode(ownerInfo.getCompanyTaxCode());
settlementOwner.setCompanyAddress(ownerInfo.getCompanyAddress());
settlementOwner.setCompanyMobile(ownerInfo.getCompanyTelephone());
settlementOwner.setCompanyBankNo(ownerInfo.getCompanyBankAccount());
settlementOwner.setCompanyBankName(ownerInfo.getCompanyOpenBank());
settlementOwner.setCompanyContact(ownerInfo.getContactsName());
settlementOwner.setCompanyContactMobile(ownerInfo.getContactsTelephone());
settlementOwner.setCompanyContactAddress(ownerInfo.getContactsAddress());
settlementOwnerDao.saveEntity(settlementOwner);
//保存结算单日志----创建结算单
......@@ -213,7 +224,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
/**
* 拉运完成结 初始化
*/
private String settlementPeriodImmediateInit(SettlementOwnerDetail settlementOwnerDetail){
private String settlementPeriodImmediateInit(SettlementOwnerDetail settlementOwnerDetail,OwnerInfoFeignVO ownerInfo){
SettlementOwner settlementOwner = new SettlementOwner();
String settlementNo = settlementNoGenerate();
......@@ -237,6 +248,17 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementOwner.setPrepayFreight(settlementOwnerDetail.getPrepayFreight());
settlementOwner.setStatus(SettlementOwnerEnum.Status.TO_BE_LOCKED.getCode());
settlementOwner.setCompanyName(ownerInfo.getCompanyName());
settlementOwner.setCompanyTaxCode(ownerInfo.getCompanyTaxCode());
settlementOwner.setCompanyAddress(ownerInfo.getCompanyAddress());
settlementOwner.setCompanyMobile(ownerInfo.getCompanyTelephone());
settlementOwner.setCompanyBankNo(ownerInfo.getCompanyBankAccount());
settlementOwner.setCompanyBankName(ownerInfo.getCompanyOpenBank());
settlementOwner.setCompanyContact(ownerInfo.getContactsName());
settlementOwner.setCompanyContactMobile(ownerInfo.getContactsTelephone());
settlementOwner.setCompanyContactAddress(ownerInfo.getContactsAddress());
settlementOwnerDao.saveEntity(settlementOwner);
//保存结算单日志----创建结算单
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论