|
|
@ -595,6 +595,13 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
finCollectionConfirmationDetailsVo.setRemittanceConfirmationAppendixs(remittanceConfirmationAppendixs); |
|
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetailedVos = finSelectedReceivablesDetailedService.fetchByCillSid(sid); |
|
|
|
finCollectionConfirmationDetailsVo.setFinSelectedReceivablesDetaileds(finSelectedReceivablesDetailedVos); |
|
|
|
if(finCollectionConfirmation.getAuditState() ==2){ |
|
|
|
String confirmationDetails = finCollectionConfirmation.getConfirmName()+"于"+finCollectionConfirmation.getConfirmDate()+"已驳回,原因是:"+finCollectionConfirmation.getReason(); |
|
|
|
finCollectionConfirmationDetailsVo.setReason(confirmationDetails); |
|
|
|
}else if(finCollectionConfirmation.getAuditState() == 3){ |
|
|
|
String confirmationDetails = finCollectionConfirmation.getConfirmName()+"于"+finCollectionConfirmation.getConfirmDate()+"已确认"; |
|
|
|
finCollectionConfirmationDetailsVo.setReason(confirmationDetails); |
|
|
|
} |
|
|
|
return rb.success().setData(finCollectionConfirmationDetailsVo); |
|
|
|
} |
|
|
|
|
|
|
@ -703,6 +710,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getOrgPath())) { |
|
|
|
qw.eq("useOrgSid", pagerQuery.getOrgPath()); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(pagerQuery.getUserSid())){ |
|
|
|
qw.eq("createBySid",pagerQuery.getUserSid()); |
|
|
|
} |
|
|
|
} |
|
|
|
qw.eq("pushMessgae", 0); |
|
|
|
return qw; |
|
|
@ -883,6 +893,15 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
images.add(url); |
|
|
|
} |
|
|
|
vo.setImages(images); |
|
|
|
FinCollectionConfirmation finCollectionConfirmation = fetchBySid(query.getCollectionBillSid()); |
|
|
|
if(finCollectionConfirmation.getAuditState() ==2){ |
|
|
|
// String confirmationDetails = finCollectionConfirmation.getConfirmName()+"于"+finCollectionConfirmation.getConfirmDate()+"已驳回,原因是:"+finCollectionConfirmation.getReason();
|
|
|
|
// String confirmationDetails = finCollectionConfirmation.getConfirmName()+"于"+finCollectionConfirmation.getConfirmDate()+"已驳回,原因是:"+finCollectionConfirmation.getReason();
|
|
|
|
vo.setReason(finCollectionConfirmation.getReason()); |
|
|
|
}/*else if(finCollectionConfirmation.getAuditState() == 3){ |
|
|
|
String confirmationDetails = finCollectionConfirmation.getConfirmName()+"于"+finCollectionConfirmation.getConfirmDate()+"已确认"; |
|
|
|
vo.setReason(confirmationDetails); |
|
|
|
}*/ |
|
|
|
return rb.success().setData(vo); |
|
|
|
} |
|
|
|
|
|
|
@ -1155,6 +1174,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
if (StringUtils.isNotBlank(useOrgSid)) { |
|
|
|
qw.eq("useOrgSid", useOrgSid); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(userSid)){ |
|
|
|
qw.eq("createBySid",userSid); |
|
|
|
} |
|
|
|
if (params.getSidList().size() > 0) { |
|
|
|
qw.notIn("sid", params.getSidList()); |
|
|
|
} |
|
|
@ -1171,10 +1193,10 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
if (vinNoList.size() > 0) { |
|
|
|
qw.notIn("VIN", vinNoList); |
|
|
|
} |
|
|
|
if(StringUtils.isNotBlank(pagerQuery.getParams().getPurchaseSystemSid())){ |
|
|
|
qw.eq("purchaseSystemSid",pagerQuery.getParams().getPurchaseSystemSid()); |
|
|
|
}else{ |
|
|
|
qw.eq("purchaseSystemSid","0"); |
|
|
|
if (StringUtils.isNotBlank(pagerQuery.getParams().getPurchaseSystemSid())) { |
|
|
|
qw.eq("purchaseSystemSid", pagerQuery.getParams().getPurchaseSystemSid()); |
|
|
|
} else { |
|
|
|
qw.eq("purchaseSystemSid", "0"); |
|
|
|
} |
|
|
|
//筛选
|
|
|
|
ResultBean<List<BaseVehicleTempstate>> resultBeanNew = baseVehicleTempstateFeign.getList(VehicleStateTempOrLast.PaymentEnum.FIN_PAYMENT.getCode()); |
|
|
@ -1204,9 +1226,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
record.setVin(vinNo); |
|
|
|
if (StringUtils.isNotBlank(vinNo)) { |
|
|
|
record.setVin(vinNo.substring(vinNo.length() - 8)); |
|
|
|
}else{ |
|
|
|
if("2".equals(record.getPayTypeKey())){ |
|
|
|
record.setVin(temporaryNo.substring(temporaryNo.length()-2)); |
|
|
|
} else { |
|
|
|
if ("2".equals(record.getPayTypeKey())) { |
|
|
|
record.setVin(temporaryNo.substring(temporaryNo.length() - 2)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1303,9 +1325,9 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
//收款组织
|
|
|
|
ResultBean<SysOrganizationVo> resultBean = sysOrganizationFeign.fetchBySid(confirmation.getUseOrgSid()); |
|
|
|
BasePurchaseSystemDetailsVo data = basePurchaseSystemFeign.fetchDetailsByDeptSid(confirmation.getPurchaseSystemSid()).getData(); |
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
arReceivebill.setFPAYORGID(data.getOrgCode()); |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
if (resultBean.getSuccess()) { |
|
|
|
SysOrganizationVo vo = resultBean.getData(); |
|
|
|
if (vo != null) { |
|
|
@ -1323,7 +1345,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
arReceivebill.setFREMARK(confirmation.getPayerName()); |
|
|
|
arReceivebill.setFREMARK("付款人:" + confirmation.getPayerName()); |
|
|
|
//物料列表
|
|
|
|
List<ARReceivebill.FRECEIVEBILLENTRY> fEntityList = new ArrayList<>(); |
|
|
|
ARReceivebill.FRECEIVEBILLENTRY freceivebillentry = new ARReceivebill.FRECEIVEBILLENTRY(); |
|
|
@ -1347,7 +1369,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
String customerSid = customerList.get(i).getCustomerSid(); |
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), customerName, customerMobile, customerSid, sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1424,7 +1446,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
//先推送客户
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone(), finSelectedReceivablesDetailedVo.getCustomerSid(), sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1482,7 +1504,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
//先推送客户
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), customerName, customerMobile, customerSid, sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1553,7 +1575,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
//先推送客户
|
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), finSelectedReceivablesDetailedVo.getCustomerName(), finSelectedReceivablesDetailedVo.getCustomerPhone(), finSelectedReceivablesDetailedVo.getCustomerSid(), sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1597,10 +1619,15 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
if (finSelectedReceivablesDetailedVos1_1.size() > 0) { |
|
|
|
for (int i = 0; i < finSelectedReceivablesDetailedVos1_1.size(); i++) { |
|
|
|
FinSelectedReceivablesDetailedVo vvvv = finSelectedReceivablesDetailedVos1_1.get(i); |
|
|
|
String customerNum = vvvv.getContractNo()+vvvv.getVIN(); |
|
|
|
String customerNum = ""; |
|
|
|
if (vvvv.getVIN().length() < 8) { |
|
|
|
customerNum = vvvv.getContractNo() + vvvv.getVIN(); |
|
|
|
} else { |
|
|
|
customerNum = vvvv.getVIN(); |
|
|
|
} |
|
|
|
BdCustomer bdCustomer = createBdCustomer1(confirmation.getUseOrgSid(), vvvv.getCustomerName(), customerNum, sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1651,10 +1678,15 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
for (int i = 0; i < finSelectedReceivablesDetailedVos2_1.size(); i++) { |
|
|
|
FinSelectedReceivablesDetailedVo vvvv = finSelectedReceivablesDetailedVos2_1.get(i); |
|
|
|
//先推送客户
|
|
|
|
String customerNum = vvvv.getContractNo()+vvvv.getVIN(); |
|
|
|
String customerNum = ""; |
|
|
|
if (vvvv.getVIN().length() < 8) { |
|
|
|
customerNum = vvvv.getContractNo() + vvvv.getVIN(); |
|
|
|
} else { |
|
|
|
customerNum = vvvv.getVIN(); |
|
|
|
} |
|
|
|
BdCustomer bdCustomer = createBdCustomer1(confirmation.getUseOrgSid(), vvvv.getCustomerName(), customerNum, sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1680,7 +1712,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
arReceivebill.setF_PAEZ_AssistantKey("006"); |
|
|
|
arReceivebill.setFRECEIVEBILLENTRY(fEntityList); |
|
|
|
if (finSelectedReceivablesDetailedVos1.size() == 0 && finSelectedReceivablesDetailedVos2_1.size() == 1 && |
|
|
|
finSelectedReceivablesDetailedVos2.size() == 0 && finSelectedReceivablesDetailedVos2_1.size() == 0) { |
|
|
|
finSelectedReceivablesDetailedVos2.size() == 0 && finSelectedReceivablesDetailedVos1_1.size() == 0) { |
|
|
|
arReceivebill.setFBillNo(confirmation.getBillNo()); |
|
|
|
} else { |
|
|
|
//单据编号
|
|
|
@ -1698,7 +1730,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
AppBusDepositBuscenterDetailVo busDeposit = busDepositFeign.getDepositInfoDetails(confirmation.getBusSid()).getData(); |
|
|
|
BdCustomer bdCustomer = createBdCustomer(confirmation.getUseOrgSid(), busDeposit.getPayName(), busDeposit.getPhone(), "", sid); |
|
|
|
//推送金蝶客户,修改目标组织为采购系统对应的金蝶分公司code
|
|
|
|
if (data != null){ |
|
|
|
if (data != null) { |
|
|
|
bdCustomer.setTOrgIds(data.getOrgCode()); |
|
|
|
} |
|
|
|
ResultBean resultBeanMiddle = bdCustomerService.draftBdCustomer(bdCustomer); |
|
|
@ -1857,7 +1889,7 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
} |
|
|
|
String fname = name + vin; |
|
|
|
bdCustomer.setFName(fname); |
|
|
|
String code = name + vin; |
|
|
|
String code = HanZiConverterPinYin.getPinYinFirst(name) + vin; |
|
|
|
bdCustomer.setFNumber(code); |
|
|
|
return bdCustomer; |
|
|
|
} |
|
|
@ -1960,12 +1992,12 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
//获取车辆入库单车辆信息查询
|
|
|
|
List<FinSelectedReceivablesDetailedVo> finSelectedReceivablesDetaileds = finCollectionConfirmationDetailsVo.getFinSelectedReceivablesDetaileds(); |
|
|
|
Map<String, Object> dataMap = new HashMap(); |
|
|
|
dataMap.put("collDate",finCollectionConfirmationDetailsVo.getCollectionDate()); |
|
|
|
dataMap.put("collDate", finCollectionConfirmationDetailsVo.getCollectionDate()); |
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationFeign.fetchBySid(finCollectionConfirmationDetailsVo.getUseOrgSid()).getData(); |
|
|
|
dataMap.put("payee",sysOrganizationVo.getName()); |
|
|
|
dataMap.put("billNo",finCollectionConfirmationDetailsVo.getBillNo()); |
|
|
|
dataMap.put("settleType",finCollectionConfirmationDetailsVo.getCollectionTypeValue()); |
|
|
|
dataMap.put("remarks",finCollectionConfirmationDetailsVo.getRemarks()); |
|
|
|
dataMap.put("payee", sysOrganizationVo.getName()); |
|
|
|
dataMap.put("billNo", finCollectionConfirmationDetailsVo.getBillNo()); |
|
|
|
dataMap.put("settleType", finCollectionConfirmationDetailsVo.getCollectionTypeValue()); |
|
|
|
dataMap.put("remarks", finCollectionConfirmationDetailsVo.getRemarks()); |
|
|
|
List<FinCollectionConfirmationMaterial> finCollectionConfirmationMaterials = new ArrayList<>(); |
|
|
|
int id = 0; |
|
|
|
//循环获取车辆信息
|
|
|
@ -1984,11 +2016,11 @@ public class FinCollectionConfirmationService extends MybatisBaseService<FinColl |
|
|
|
finCollectionConfirmationMaterial.setCollNum(finCollectionConfirmationDetailsVo.getCollectionBankNum()); |
|
|
|
finCollectionConfirmationMaterials.add(finCollectionConfirmationMaterial); |
|
|
|
} |
|
|
|
dataMap.put("wlList",finCollectionConfirmationMaterials); |
|
|
|
dataMap.put("zcollMoney",finCollectionConfirmationDetailsVo.getCollectionMoney()); |
|
|
|
dataMap.put("wlList", finCollectionConfirmationMaterials); |
|
|
|
dataMap.put("zcollMoney", finCollectionConfirmationDetailsVo.getCollectionMoney()); |
|
|
|
String tPriceDX = TransformMoney.transform(finCollectionConfirmationDetailsVo.getCollectionMoney()); |
|
|
|
dataMap.put("tPriceDX",tPriceDX); |
|
|
|
dataMap.put("makeName",""); |
|
|
|
dataMap.put("tPriceDX", tPriceDX); |
|
|
|
dataMap.put("makeName", ""); |
|
|
|
//获取模板
|
|
|
|
//模板路径
|
|
|
|
String sourcePath = "D:\\anrui\\upload\\template\\"; |
|
|
|