|
@ -53,10 +53,7 @@ import com.yxt.anrui.fin.api.fincollectionconfirmation.*; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.AppBusArrearsCarryMoneyVo; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.AppBusArrearsCarryMoneyVo; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.FinConfirmDto; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.FinConfirmDto; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.FinSelectDto; |
|
|
import com.yxt.anrui.fin.api.fincollectionconfirmation.app.FinSelectDto; |
|
|
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.AppFinSelectedReceivablesDetailedDto; |
|
|
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.*; |
|
|
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailed; |
|
|
|
|
|
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedDto; |
|
|
|
|
|
import com.yxt.anrui.fin.api.finselectedreceivablesdetailed.FinSelectedReceivablesDetailedVo; |
|
|
|
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.AppFinUncollectedReceivablesDetailedVo; |
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.AppFinUncollectedReceivablesDetailedVo; |
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailed; |
|
|
import com.yxt.anrui.fin.api.finuncollectedreceivablesdetailed.FinUncollectedReceivablesDetailed; |
|
|
import com.yxt.anrui.fin.api.kingdee.arreceivebill.ARReceivebill; |
|
|
import com.yxt.anrui.fin.api.kingdee.arreceivebill.ARReceivebill; |
|
@ -913,7 +910,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
BigDecimal subscriptionMoneyAll = finSelectedReceivablesDetailedDtos.stream().map(AppFinSelectedReceivablesDetailedDto::getConfirmMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
BigDecimal subscriptionMoneyAll = finSelectedReceivablesDetailedDtos.stream().map(AppFinSelectedReceivablesDetailedDto::getConfirmMoney).reduce(BigDecimal.ZERO, BigDecimal::add); |
|
|
//判断收款金额与所选的总认款金额是否相等
|
|
|
//判断收款金额与所选的总认款金额是否相等
|
|
|
if (finCollectionConfirmation.getFirst() == 0) { |
|
|
if (finCollectionConfirmation.getFirst() == 0) { |
|
|
if(subscriptionMoneyAll.compareTo(finCollectionConfirmation.getCollectionMoney())>0){ |
|
|
if (subscriptionMoneyAll.compareTo(finCollectionConfirmation.getCollectionMoney()) > 0) { |
|
|
return rb.setMsg("认款金额不允许超过收款金额"); |
|
|
return rb.setMsg("认款金额不允许超过收款金额"); |
|
|
} |
|
|
} |
|
|
if (subscriptionMoneyAll.compareTo(finCollectionConfirmation.getCollectionMoney()) != 0) { |
|
|
if (subscriptionMoneyAll.compareTo(finCollectionConfirmation.getCollectionMoney()) != 0) { |
|
@ -1290,20 +1287,80 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
List<ARReceivebill.FRECEIVEBILLENTRY> fEntityList = new ArrayList<>(); |
|
|
List<ARReceivebill.FRECEIVEBILLENTRY> fEntityList = new ArrayList<>(); |
|
|
ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
//推送车款
|
|
|
//推送车款
|
|
|
|
|
|
|
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款"); |
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款"); |
|
|
|
|
|
List<FinSelectedReceivablesDetailedVo> voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "车款"); |
|
|
|
|
|
//查询是否含有车架号
|
|
|
|
|
|
List<String> stringsVin = voListv.stream().filter(v->StringUtils.isNotBlank(v.getVIN())).map(v->v.getVIN()).collect(Collectors.toList()); |
|
|
|
|
|
stringsVin.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if(finSelectedReceivablesDetailedVos1.size()>0){ |
|
|
|
|
|
if (!stringsVin.isEmpty()) { |
|
|
|
|
|
//查询根据客户名称和手机号有哪些客户
|
|
|
|
|
|
List<SelectCustomerVo> customerList = finSelectedReceivablesDetailedService.selectCustomerList(sid, 1, "车款"); |
|
|
|
|
|
for (SelectCustomerVo vo : customerList) { |
|
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
|
|
|
//往来单位
|
|
|
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
|
|
|
fEntityList = new ArrayList<>(); |
|
|
|
|
|
//查询该客户的车架号不为空的情况
|
|
|
|
|
|
List<FinSelectedReceivablesDetailedVo> vinListVo = finSelectedReceivablesDetailedService.selectVinListVo(sid, 1, "车款", vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
for (FinSelectedReceivablesDetailedVo vvvv : vinListVo) { |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(vvvv.getSubscriptionMoney()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
freceivebillentry.setF_PAEZ_Base1(vvvv.getVIN().substring(vvvv.getVIN().length()-8)); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("001"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
} |
|
|
|
|
|
//查询该客户的车架号为空的情况
|
|
|
|
|
|
FinSelectedReceivablesDetailedVo vvVo = finSelectedReceivablesDetailedService.fetchByAuditStateV(sid, 1, "车款", vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(vvVo.getSumAll()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("001"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
//项目类别key、value
|
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
|
|
|
FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(vvVo.getReceivablesSid()); |
|
|
|
|
|
if ("1".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("001"); |
|
|
|
|
|
} else if ("2".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("002"); |
|
|
|
|
|
} |
|
|
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
|
|
|
ResultBean resultBean1 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
fEntityList = new ArrayList<>(); |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); |
|
|
finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); |
|
|
if (!finSelectedReceivablesDetailedVos1.isEmpty()) { |
|
|
if (!finSelectedReceivablesDetailedVos1.isEmpty()) { |
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos1){ |
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos1) { |
|
|
//先推送客户
|
|
|
//先推送客户
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(),finSelectedReceivablesDetailedVo.getCustomerName(),finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
//往来单位
|
|
|
//往来单位
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
//结算方式
|
|
|
//结算方式
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
// BigDecimal bigAll = finSelectedReceivablesDetailedVos1.stream().map(FinSelectedReceivablesDetailedVo::getSubscriptionMoney).map(BigDecimal::new).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
|
|
|
//收款金额
|
|
|
//收款金额
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(finSelectedReceivablesDetailedVo.getSumAll()); |
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(finSelectedReceivablesDetailedVo.getSumAll()); |
|
|
//登记日期
|
|
|
//登记日期
|
|
@ -1316,28 +1373,120 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
//项目类别key、value
|
|
|
//项目类别key、value
|
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(finSelectedReceivablesDetailedVos1.get(0).getReceivablesSid()); |
|
|
FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(finSelectedReceivablesDetailedVos1.get(0).getReceivablesSid()); |
|
|
if("1".equals(finUncollectedReceivablesDetailed.getPayTypeKey())){ |
|
|
if ("1".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
arReceivebill.setF_PAEZ_AssistantKey("001"); |
|
|
arReceivebill.setF_PAEZ_AssistantKey("001"); |
|
|
}else if("2".equals(finUncollectedReceivablesDetailed.getPayTypeKey())){ |
|
|
} else if ("2".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
arReceivebill.setF_PAEZ_AssistantKey("002"); |
|
|
arReceivebill.setF_PAEZ_AssistantKey("002"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
ResultBean resultBean1 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
ResultBean resultBean1 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos1 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "车款"); |
|
|
|
|
|
finSelectedReceivablesDetailedVos1.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if (!finSelectedReceivablesDetailedVos1.isEmpty()) { |
|
|
|
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos1) { |
|
|
|
|
|
//先推送客户
|
|
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
|
|
|
//往来单位
|
|
|
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(finSelectedReceivablesDetailedVo.getSumAll()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("001"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
//项目类别key、value
|
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
|
|
|
FinUncollectedReceivablesDetailed finUncollectedReceivablesDetailed = finUncollectedReceivablesDetailedService.fetchBySid(finSelectedReceivablesDetailedVos1.get(0).getReceivablesSid()); |
|
|
|
|
|
if ("1".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("001"); |
|
|
|
|
|
} else if ("2".equals(finUncollectedReceivablesDetailed.getPayTypeKey())) { |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("002"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
|
|
|
ResultBean resultBean1 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
}*/ |
|
|
//推送订金
|
|
|
//推送订金
|
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "订金"); |
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "订金"); |
|
|
|
|
|
if(finSelectedReceivablesDetailedVos2.size()>0){ |
|
|
|
|
|
voListv = finSelectedReceivablesDetailedService.selectDetailsList(sid, 1, "订金"); |
|
|
|
|
|
//查询是否含有车架号
|
|
|
|
|
|
stringsVin = voListv.stream().filter(v->StringUtils.isNotBlank(v.getVIN())).map(v->v.getVIN()).collect(Collectors.toList()); |
|
|
|
|
|
stringsVin.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if (!stringsVin.isEmpty()) { |
|
|
|
|
|
//查询根据客户名称和手机号有哪些客户
|
|
|
|
|
|
List<SelectCustomerVo> customerList = finSelectedReceivablesDetailedService.selectCustomerList(sid, 1, "订金"); |
|
|
|
|
|
for (SelectCustomerVo vo : customerList) { |
|
|
|
|
|
//先推送客户
|
|
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
|
|
|
//往来单位
|
|
|
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
|
|
|
fEntityList = new ArrayList<>(); |
|
|
|
|
|
//查询该客户的车架号不为空的情况
|
|
|
|
|
|
List<FinSelectedReceivablesDetailedVo> vinListVo = finSelectedReceivablesDetailedService.selectVinListVo(sid, 1, "订金", vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
for (FinSelectedReceivablesDetailedVo vvvv : vinListVo) { |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(vvvv.getSubscriptionMoney()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
freceivebillentry.setF_PAEZ_Base1(vvvv.getVIN().substring(vvvv.getVIN().length()-8)); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("002"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
} |
|
|
|
|
|
//查询该客户的车架号为空的情况
|
|
|
|
|
|
FinSelectedReceivablesDetailedVo vvVo = finSelectedReceivablesDetailedService.fetchByAuditStateV(sid, 1, "订金", vo.getCustomerName(), vo.getCustomerPhone()); |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(vvVo.getSumAll()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("002"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
//项目类别key、value
|
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
|
|
|
ResultBean resultBean1 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
fEntityList = new ArrayList<>(); |
|
|
fEntityList = new ArrayList<>(); |
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); |
|
|
finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); |
|
|
if (!finSelectedReceivablesDetailedVos2.isEmpty()) { |
|
|
if (!finSelectedReceivablesDetailedVos2.isEmpty()) { |
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos2){ |
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos2) { |
|
|
//先推送客户
|
|
|
//先推送客户
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(),finSelectedReceivablesDetailedVo.getCustomerName(),finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
//往来单位
|
|
|
//往来单位
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
@ -1360,15 +1509,50 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
ResultBean resultBean2 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
ResultBean resultBean2 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//推送订金
|
|
|
|
|
|
/*List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos2 = finSelectedReceivablesDetailedService.fetchByAuditState1(sid, 1, "订金"); |
|
|
|
|
|
fEntityList = new ArrayList<>(); |
|
|
|
|
|
freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
|
|
|
finSelectedReceivablesDetailedVos2.removeAll(Collections.singleton(null)); |
|
|
|
|
|
if (!finSelectedReceivablesDetailedVos2.isEmpty()) { |
|
|
|
|
|
for (FinSelectedReceivablesDetailedVo finSelectedReceivablesDetailedVo : finSelectedReceivablesDetailedVos2) { |
|
|
|
|
|
//先推送客户
|
|
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone()); |
|
|
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
|
|
|
//往来单位
|
|
|
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
|
|
|
//结算方式
|
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDKey(confirmation.getCollectionTypeKey()); |
|
|
|
|
|
freceivebillentry.setFSETTLETYPEIDType("customerPayType"); |
|
|
|
|
|
//收款金额
|
|
|
|
|
|
freceivebillentry.setFRECTOTALAMOUNTFOR(finSelectedReceivablesDetailedVo.getSumAll()); |
|
|
|
|
|
//登记日期
|
|
|
|
|
|
freceivebillentry.setFPOSTDATE(confirmation.getCollectionDate()); |
|
|
|
|
|
//收款用途
|
|
|
|
|
|
freceivebillentry.setFPURPOSEIDKey("002"); |
|
|
|
|
|
freceivebillentry.setFPURPOSEIDType("cw_skyt"); |
|
|
|
|
|
freceivebillentry.setFACCOUNTID(confirmation.getCollectionBankNum()); |
|
|
|
|
|
fEntityList.add(freceivebillentry); |
|
|
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
|
|
|
//项目类别key、value
|
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
|
|
|
ResultBean resultBean2 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}*/ |
|
|
//简易订单-订金收取
|
|
|
//简易订单-订金收取
|
|
|
if (finSelectedReceivablesDetailedVos1.isEmpty() && finSelectedReceivablesDetailedVos2.isEmpty()) { |
|
|
if (finSelectedReceivablesDetailedVos1.isEmpty() && finSelectedReceivablesDetailedVos2.isEmpty()) { |
|
|
//先推送客户
|
|
|
//先推送客户
|
|
|
AppBusDepositBuscenterDetailVo busDeposit = busDepositFeign.getDepositInfoDetails(confirmation.getBusSid()).getData(); |
|
|
AppBusDepositBuscenterDetailVo busDeposit = busDepositFeign.getDepositInfoDetails(confirmation.getBusSid()).getData(); |
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(),busDeposit.getPayName(),busDeposit.getPhone()); |
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), busDeposit.getPayName(), busDeposit.getPhone()); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
log.info("客户推送:"+resultBeanMiddle.getMsg()); |
|
|
log.info("客户推送:" + resultBeanMiddle.getMsg()); |
|
|
//往来单位
|
|
|
//往来单位
|
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
arReceivebill.setFCONTACTUNIT(bdCustomer.getFNumber()); |
|
|
fEntityList = new ArrayList<>(); |
|
|
fEntityList = new ArrayList<>(); |
|
@ -1391,7 +1575,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
arReceivebill.setF_PAEZ_AssistantType("cw_sklb"); |
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
ResultBean resultBean2 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
ResultBean resultBean2 = arReceivebillService.draftArReceivebill(arReceivebill); |
|
|
log.info("收款单推送:"+resultBean2.getMsg()); |
|
|
log.info("收款单推送:" + resultBean2.getMsg()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//===========================================
|
|
|
//===========================================
|
|
@ -1526,8 +1710,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
ResultBean deleteResult = baseVehicleTempstateFeign.delByBusSid(sid);*/ |
|
|
ResultBean deleteResult = baseVehicleTempstateFeign.delByBusSid(sid);*/ |
|
|
return rb.success().setMsg("款项确认成功"); |
|
|
return rb.success().setMsg("款项确认成功"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//组装客户推送
|
|
|
//组装客户推送
|
|
|
private BdCustomer createBdCustomer(String useOrgSid,String name,String mobile) { |
|
|
private BdCustomer createBdCustomer(String useOrgSid, String name, String mobile) { |
|
|
BdCustomer bdCustomer = new BdCustomer(); |
|
|
BdCustomer bdCustomer = new BdCustomer(); |
|
|
ResultBean<SysOrganizationVo> resultBean = sysOrganizationFeign.fetchBySid(useOrgSid); |
|
|
ResultBean<SysOrganizationVo> resultBean = sysOrganizationFeign.fetchBySid(useOrgSid); |
|
|
if (resultBean.getSuccess()) { |
|
|
if (resultBean.getSuccess()) { |
|
|