|
|
@@ -610,6 +610,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if( StringUtils.isNotEmpty(insPlyIncomeVo.getDeptId())){
|
|
|
params.put("deptId",insPlyIncomeVo.getDeptId());
|
|
|
}
|
|
|
+ if( StringUtils.isNotEmpty(insPlyIncomeVo.getAllPartnerCompaniesId())){
|
|
|
+ params.put("allPartnerCompaniesId",insPlyIncomeVo.getAllPartnerCompaniesId());
|
|
|
+ }
|
|
|
+ if( StringUtils.isNotEmpty(insPlyIncomeVo.getProvincePartnerCompaniesId())){
|
|
|
+ params.put("provincePartnerCompaniesId",insPlyIncomeVo.getProvincePartnerCompaniesId());
|
|
|
+ }
|
|
|
if(!CollectionUtils.isEmpty(insPlyIncomeVo.getSelectIds())){
|
|
|
params.put("selectIds",insPlyIncomeVo.getSelectIds());
|
|
|
}
|
|
|
@@ -1237,6 +1243,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params.put("partnerCompaniesId",insPlyIncomeVo.getPartnerCompaniesId());
|
|
|
|
|
|
PtlAgreement ptlAgreement = ptlAgreementService.selectAgreeId(params);
|
|
|
+ if(ObjectUtils.isEmpty(ptlAgreement)){
|
|
|
+ return HttpResult.error("协议匹配不上");
|
|
|
+ }
|
|
|
insPlyIncome.setAgreementId(ptlAgreement.getId());
|
|
|
baseMapper.insert(insPlyIncome);
|
|
|
insPlyIncomeVo.setId(insPlyIncome.getId());
|
|
|
@@ -1392,7 +1401,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount()); //进账金额
|
|
|
settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
|
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
|
|
|
- settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
|
|
|
settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
|
|
|
settlementDocumentaryFeesVo.setAgreementType("2"); //1平台 2 保险
|
|
|
settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
@@ -1451,7 +1460,16 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
ImportResult importResult = importAsyncService.getById(insPlyIncomeVo.getSelectIds().get(0)); // 查询 任务
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
if (StringUtils.isNotEmpty(importResult.getId())) {
|
|
|
- params.put("taskkId", importResult.getId());
|
|
|
+ params.put("companyId",importResult.getCompanyId());
|
|
|
+ params.put("partnerCompaniesId",importResult.getPartnerCompaniesId());
|
|
|
+ params.put("isOther","0");
|
|
|
+ if (StringUtils.isNotEmpty(importResult.getHandStatus())) {
|
|
|
+ if ("0".equals(importResult.getHandStatus())) {
|
|
|
+ params.put("isNotCar", "0");
|
|
|
+ } else if ("1".equals(importResult.getHandStatus())) {
|
|
|
+ params.put("isNotCar", "1");
|
|
|
+ }
|
|
|
+ }
|
|
|
List<InsPlyIncome> insPlyIncomes = baseMapper.queryNew(params);
|
|
|
if (!CollectionUtils.isEmpty(insPlyIncomes)) {
|
|
|
if (insPlyIncomeVo != null) { // 确保insPlyIncomeVo不是null
|
|
|
@@ -1460,7 +1478,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
item.setInvoicId(insPlyIncomeVo.getInvoicId());
|
|
|
item.setHandlingFeesStatus("2");
|
|
|
if (StringUtils.isNotEmpty(item.getTaskId())) {
|
|
|
- return HttpResult.ok("该单据已经开票 ");
|
|
|
+ return HttpResult.error("该单据已经开票 ");
|
|
|
} else {
|
|
|
item.setTaskId(importResult.getId());
|
|
|
baseMapper.updateById(item);
|
|
|
@@ -1478,6 +1496,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncomeVo.setSettlementAmount(importResult.getTotalAmount());
|
|
|
insPlyIncomeVo.setContractId(insPlyIncomeVo.getInvoicId());
|
|
|
insPlyIncomeVo.setCompanyId(importResult.getCompanyId());
|
|
|
+ insPlyIncomeVo.setTaskId(importResult.getId());
|
|
|
this.batchInvoic(insPlyIncomeVo);
|
|
|
return HttpResult.ok();
|
|
|
}
|
|
|
@@ -1516,7 +1535,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setHandlingFeesStatus("0");
|
|
|
settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
|
|
|
settlementDocumentaryFeesVo.setSettlementImageId(insPlyIncomeVo.getSettlementImageId());
|
|
|
- settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
|
|
|
settlementDocumentaryFeesVo.setAgreementType("2"); //1平台 2 保险
|
|
|
settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
return HttpResult.ok();
|
|
|
@@ -1592,12 +1611,15 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getOtherFeevalue()); //其他费用金额
|
|
|
settlementDocumentaryFeesVo.setUnsettledAmount(insPlyIncomeVo.getNoInvoicCommissionFeevalue().subtract(insPlyIncomeVo.getSettlementAmount())); //未结算
|
|
|
settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());//已经开票
|
|
|
- settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
|
|
|
settlementDocumentaryFeesVo.setSettlementStatus("1");
|
|
|
settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getContractId())){
|
|
|
settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getContractId()); //开票号
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getTaskId())){
|
|
|
+ settlementDocumentaryFeesVo.setTaskId(insPlyIncomeVo.getTaskId());
|
|
|
+ }
|
|
|
settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
|
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
@@ -1821,7 +1843,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getOtherFeevalue()); //其他费用金额
|
|
|
settlementDocumentaryFeesVo.setUnsettledAmount(insPlyIncomeVo.getNoInvoicCommissionFeevalue().subtract(insPlyIncomeVo.getSettlementAmount())); //未结算
|
|
|
settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());//已经开票
|
|
|
- settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDateTime.now());
|
|
|
settlementDocumentaryFeesVo.setIds(insPlyIncomeVo.getIncomeIds());
|
|
|
settlementDocumentaryFeesVo.setSettlementStatus("1");
|
|
|
settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());
|