|
@@ -555,6 +555,9 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getPartnerCompaniesName())){
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getPartnerCompaniesName())){
|
|
|
params.put("partnerCompaniesName",insPlyIncomeVo.getPartnerCompaniesName());
|
|
params.put("partnerCompaniesName",insPlyIncomeVo.getPartnerCompaniesName());
|
|
|
}
|
|
}
|
|
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getDockingPerson())){
|
|
|
|
|
+ params.put("dockingPerson",insPlyIncomeVo.getDockingPerson());
|
|
|
|
|
+ }
|
|
|
return params;
|
|
return params;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -687,12 +690,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
|
|
ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
|
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
- String ids="";
|
|
|
|
|
try {
|
|
try {
|
|
|
List<InsBxPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxPlyIncomeExcelDto.class, 0, 1, 1);
|
|
List<InsBxPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
|
|
+ Integer i=0;
|
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
|
for (InsBxPlyIncomeExcelDto excelItem : dtoList) {
|
|
for (InsBxPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
|
|
+ i=i+1;
|
|
|
params.clear();
|
|
params.clear();
|
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
@@ -711,8 +714,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params.put("isOther","0");
|
|
params.put("isOther","0");
|
|
|
params.put("isNotCar",isNotCar);
|
|
params.put("isNotCar",isNotCar);
|
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
|
|
|
+ if(i==dtoList.size()){
|
|
|
|
|
+ resultMap.put("companyId",insPlyIncome.getCompanyId()); // 保险公司id
|
|
|
|
|
+ resultMap.put("partnerCompaniesId",insPlyIncome.getPartnerCompaniesId()); //合作公司id
|
|
|
|
|
+ resultMap.put("agreementId",insPlyIncome.getAgreementId()); //协议id
|
|
|
|
|
+ }
|
|
|
if(ObjectUtils.isNotEmpty(insPlyIncome)){ // 比配上汇总金额 未匹配则返回到数据当中
|
|
if(ObjectUtils.isNotEmpty(insPlyIncome)){ // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
if( insPlyIncome.getCommissionFeevalue()!=null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO)!=0){
|
|
if( insPlyIncome.getCommissionFeevalue()!=null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO)!=0){
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
@@ -731,10 +738,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
- resultMap.put("ids",ids);
|
|
|
|
|
resultMap.put("totalAmount",totalAmount);
|
|
resultMap.put("totalAmount",totalAmount);
|
|
|
resultMap.put("resultList",resultList);
|
|
resultMap.put("resultList",resultList);
|
|
|
return resultMap;
|
|
return resultMap;
|
|
@@ -750,12 +753,13 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
|
ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
|
|
ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
|
|
|
- StringBuffer strBuilder = new StringBuffer();
|
|
|
|
|
String ids="";
|
|
String ids="";
|
|
|
try {
|
|
try {
|
|
|
|
|
+ Integer i=0;
|
|
|
List<InsBxNoPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxNoPlyIncomeExcelDto.class, 0, 1, 1);
|
|
List<InsBxNoPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxNoPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
|
for (InsBxNoPlyIncomeExcelDto excelItem : dtoList) {
|
|
for (InsBxNoPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
|
|
+ i=i+1;
|
|
|
params.clear();
|
|
params.clear();
|
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
@@ -769,8 +773,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params.put("isOther","0");
|
|
params.put("isOther","0");
|
|
|
params.put("isNotCar",isNotCar);
|
|
params.put("isNotCar",isNotCar);
|
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
|
|
|
+ if(i==dtoList.size()){
|
|
|
|
|
+ resultMap.put("companyId",insPlyIncome.getCompanyId()); // 保险公司id
|
|
|
|
|
+ resultMap.put("partnerCompaniesId",insPlyIncome.getPartnerCompaniesId()); //合作公司id
|
|
|
|
|
+ resultMap.put("agreementId",insPlyIncome.getAgreementId()); //协议id
|
|
|
|
|
+ }
|
|
|
if(ObjectUtils.isNotEmpty(insPlyIncome)){ // 比配上汇总金额 未匹配则返回到数据当中
|
|
if(ObjectUtils.isNotEmpty(insPlyIncome)){ // 比配上汇总金额 未匹配则返回到数据当中
|
|
|
- strBuilder.append(insPlyIncome.getId()).append(",");
|
|
|
|
|
if( insPlyIncome.getCommissionFeevalue()!=null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO)!=0){
|
|
if( insPlyIncome.getCommissionFeevalue()!=null && insPlyIncome.getCommissionFeevalue().compareTo(BigDecimal.ZERO)!=0){
|
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
totalAmount = totalAmount.add(insPlyIncome.getCommissionFeevalue()); //添加总手续费
|
|
|
}
|
|
}
|
|
@@ -785,10 +793,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
resultList.add(noMatching);
|
|
resultList.add(noMatching);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if(strBuilder.length() >0){
|
|
|
|
|
- ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
|
|
- }
|
|
|
|
|
- resultMap.put("ids",ids);
|
|
|
|
|
|
|
+
|
|
|
resultMap.put("totalAmount",totalAmount);
|
|
resultMap.put("totalAmount",totalAmount);
|
|
|
resultMap.put("resultList",resultList);
|
|
resultMap.put("resultList",resultList);
|
|
|
}
|
|
}
|
|
@@ -835,9 +840,12 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult<List<HashMap<String,Object>>> invicdetail(InsPlyIncomeVo insPlyIncomeVo) {
|
|
public HttpResult<List<HashMap<String,Object>>> invicdetail(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
HashMap<String, Object> params = new HashMap<>();
|
|
|
- params= this.saveParams(insPlyIncomeVo,params);
|
|
|
|
|
- List<HashMap<String,Object>> result= this.baseMapper.groupByInvoic(params);
|
|
|
|
|
- return HttpResult.ok(result);
|
|
|
|
|
|
|
+ params =this.saveParams(insPlyIncomeVo,params);
|
|
|
|
|
+ List<HashMap<String, Object>> resultList = settlementDocumentaryFeesService.getOtherSettldetail(params);
|
|
|
|
|
+ if (resultList.size() > 0) {
|
|
|
|
|
+ return HttpResult.ok(resultList);
|
|
|
|
|
+ }
|
|
|
|
|
+ return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/***
|
|
/***
|
|
@@ -887,7 +895,6 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if (resultList.size() > 0) {
|
|
if (resultList.size() > 0) {
|
|
|
return HttpResult.ok(resultList);
|
|
return HttpResult.ok(resultList);
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1210,8 +1217,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getExpendAmount()); //税点支出
|
|
settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getExpendAmount()); //税点支出
|
|
|
|
|
+ settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
|
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
|
|
|
settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
|
|
+ settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
|
|
|
settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
@@ -1257,21 +1266,21 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ *
|
|
|
|
|
+ * @param insPlyIncomeVo
|
|
|
|
|
+ * @return 保险手续费改成多次结算
|
|
|
|
|
+ */
|
|
|
@Override
|
|
@Override
|
|
|
@Transactional
|
|
@Transactional
|
|
|
public HttpResult<Object> batchInvoicing(InsPlyIncomeVo insPlyIncomeVo) {
|
|
public HttpResult<Object> batchInvoicing(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
-// 开票时生成 记录 用来合计已经开票数据
|
|
|
|
|
- String ids = insPlyIncomeVo.getIds();
|
|
|
|
|
- if(StringUtils.isNotEmpty(ids)){
|
|
|
|
|
- String[] split = ids.split(",");
|
|
|
|
|
- for (String id : split){
|
|
|
|
|
- InsPlyIncome insPlyIncome = baseMapper.selectById(id);
|
|
|
|
|
- insPlyIncome.setInvoicTime(LocalDate.now()); //开票时间
|
|
|
|
|
- insPlyIncome.setInvoicId(insPlyIncomeVo.getInvoicId()); //开票号
|
|
|
|
|
- insPlyIncome.setHandlingFeesStatus("2"); //2为开票
|
|
|
|
|
- baseMapper.updateById(insPlyIncome);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ insPlyIncomeVo.setNoInvoicCommissionFeevalue(insPlyIncomeVo.getTotalAmount());
|
|
|
|
|
+ insPlyIncomeVo.setOtherFeevalue(insPlyIncomeVo.getTotalAmount());
|
|
|
|
|
+ insPlyIncomeVo.setHandlingFeesStatus("0"); // 0手续费 1 跟单费
|
|
|
|
|
+ insPlyIncomeVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());
|
|
|
|
|
+ insPlyIncomeVo.setSettlementAmount(insPlyIncomeVo.getTotalAmount());
|
|
|
|
|
+ insPlyIncomeVo.setContractId(insPlyIncomeVo.getInvoicId());
|
|
|
|
|
+ this.batchInvoic(insPlyIncomeVo);
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1288,25 +1297,29 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
|
|
|
|
|
@Override
|
|
@Override
|
|
|
public HttpResult<Object> batchBxBalance(InsPlyIncomeVo insPlyIncomeVo) {
|
|
public HttpResult<Object> batchBxBalance(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
- InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
|
|
-
|
|
|
|
|
- if(StringUtils.isNotEmpty(insPlyIncomeVo.getIds())){
|
|
|
|
|
- String[] split = insPlyIncomeVo.getIds().split(",");
|
|
|
|
|
- for(String id : split){
|
|
|
|
|
- insPlyIncome.setId(id);
|
|
|
|
|
- insPlyIncome.setHandlingFeesStatus("1");
|
|
|
|
|
- insPlyIncome.setSettlementTime(LocalDate.now());
|
|
|
|
|
- baseMapper.updateById(insPlyIncome);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// 分批结算
|
|
|
|
|
+ SettlementDocumentaryFeesVo settlementDocumentaryFeesVo = new SettlementDocumentaryFeesVo();
|
|
|
|
|
|
|
|
|
|
+ if ("0".equals(insPlyIncomeVo.getInvoicingMethod())) {
|
|
|
|
|
+ settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getInvoicCommissionFeevalue().multiply(BigDecimal.ONE.subtract(insPlyIncomeVo.getTaxPoints().divide(new BigDecimal(100)))));
|
|
|
|
|
+ settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount()); //进账金额
|
|
|
|
|
+ } else {
|
|
|
|
|
+ settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount()); //进账金额
|
|
|
}
|
|
}
|
|
|
- SettlementDocumentaryLogEntity settlementDocumentaryLogEntity = new SettlementDocumentaryLogEntity();
|
|
|
|
|
-
|
|
|
|
|
- settlementDocumentaryLogEntity.setHandingAmount(insPlyIncomeVo.getReadyCommissionFeevalue());
|
|
|
|
|
- settlementDocumentaryLogEntity.setIds(insPlyIncomeVo.getIds());
|
|
|
|
|
- settlementDocumentaryLogEntity.setCreateTime(new Date());
|
|
|
|
|
- settlementDocumentaryLogEntity.setCompanyId(insPlyIncomeVo.getCompanyId());
|
|
|
|
|
- settlementDocumentaryLogService.save(settlementDocumentaryLogEntity);
|
|
|
|
|
|
|
+ settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getInvoicId()); //开票号
|
|
|
|
|
+ settlementDocumentaryFeesVo.setSettlementTime(insPlyIncomeVo.getSettlementTime()); //结算时间
|
|
|
|
|
+ settlementDocumentaryFeesVo.setSettlementStatus("2"); //2为结算状态
|
|
|
|
|
+ settlementDocumentaryFeesVo.setCompanyId(insPlyIncomeVo.getCompanyId()); // 保险公司id
|
|
|
|
|
+ settlementDocumentaryFeesVo.setPartnerCompaniesId(insPlyIncomeVo.getPartnerCompaniesId()); //合作公司id
|
|
|
|
|
+ settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar()); // 是否是非车
|
|
|
|
|
+ settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
|
|
+ settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
|
|
+ settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getExpendAmount()); //税点支出
|
|
|
|
|
+ settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
|
|
|
|
|
+ settlementDocumentaryFeesVo.setHandlingFeesStatus("0");
|
|
|
|
|
+ settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
|
|
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
|
|
+ settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
return HttpResult.ok();
|
|
return HttpResult.ok();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1330,7 +1343,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
List<InsPlyIncome> result = baseMapper.allOtherAmount(params);
|
|
List<InsPlyIncome> result = baseMapper.allOtherAmount(params);
|
|
|
List<HashMap<String, Object>> otherIds = baseMapper.getOtherIds(params);
|
|
List<HashMap<String, Object>> otherIds = baseMapper.getOtherIds(params);
|
|
|
List<HashMap<String, Object>> invoicIds = settlementDocumentaryFeesService.getInvoicIds(params);
|
|
List<HashMap<String, Object>> invoicIds = settlementDocumentaryFeesService.getInvoicIds(params);
|
|
|
- this.splicingOtherIds(result,otherIds,invoicIds);
|
|
|
|
|
|
|
+ this.splicingOtherIds(result,otherIds,invoicIds );
|
|
|
return HttpResult.ok(result);
|
|
return HttpResult.ok(result);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -1420,6 +1433,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getContractId())){
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getContractId())){
|
|
|
settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getContractId()); //开票号
|
|
settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getContractId()); //开票号
|
|
|
}
|
|
}
|
|
|
|
|
+ settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
|
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
// 税点支出
|
|
// 税点支出
|