|
|
@@ -14,6 +14,7 @@ import com.github.pagehelper.PageInfo;
|
|
|
import com.ydtech.constants.enums.dict.agreement.ProductsType;
|
|
|
import com.ydtech.core.page.HttpResult;
|
|
|
import com.ydtech.exception.SystemException;
|
|
|
+import com.ydtech.modules.base.controller.BaseController;
|
|
|
import com.ydtech.modules.esm.model.EsmInsCompany;
|
|
|
import com.ydtech.modules.esm.service.EsmInsCompanyService;
|
|
|
import com.ydtech.modules.fnc.entity.InsAreaCompany;
|
|
|
@@ -73,6 +74,7 @@ import java.nio.file.Path;
|
|
|
import java.nio.file.Paths;
|
|
|
import java.time.LocalDate;
|
|
|
import java.time.LocalDateTime;
|
|
|
+import java.time.YearMonth;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
@@ -184,6 +186,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setNoPremium(insPlyIncome.getNoPremium());
|
|
|
insPlyIncome.setIsNotCar("1");
|
|
|
insPlyIncome.setIsNotDocumentary("1");
|
|
|
+ insPlyIncome.setJqStartDate(insAreaCompany.getJqStartDate());
|
|
|
+ insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
+ insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
+ insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
insPlyIncome.setAllFeeValue(insFeeOrderNew.getNoOtherCostsPremiums());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
baseMapper.insert(insPlyIncome);
|
|
|
@@ -217,6 +223,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
insPlyIncome.setNoPremium(insFeeOrderNew.getNoPremium()); //非车保费
|
|
|
insPlyIncome.setNoNoTaxPremium(insFeeOrderNew.getNoNoTaxPremium()); //非车不含税保费
|
|
|
+ insPlyIncome.setJqStartDate(insAreaCompany.getJqStartDate());
|
|
|
+ insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
+ insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
+ insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
|
|
|
baseMapper.insert(insPlyIncome);
|
|
|
@@ -261,6 +271,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setSyOtherCostsProportion(insFeeOrderNew.getSyOtherCostsProportion()); //商业跟单费比例
|
|
|
insPlyIncome.setSyOtherCostsPremium(insFeeOrderNew.getSyOtherCostsPremiums());
|
|
|
insPlyIncome.setJqOtherCostsPremium(insFeeOrderNew.getJqOtherCostsPremiums());
|
|
|
+ insPlyIncome.setJqStartDate(insAreaCompany.getJqStartDate());
|
|
|
+ insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
+ insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
+ insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
insPlyIncome.setUserId(insFeeOrderNew.getUserId());
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
@@ -288,6 +302,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setTaxPremium(allTaxPremium);
|
|
|
insPlyIncome.setUserId(insFeeOrderNew.getUserId());
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
+ insPlyIncome.setJqStartDate(insAreaCompany.getJqStartDate());
|
|
|
+ insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
+ insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
+ insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
baseMapper.insert(insPlyIncome);
|
|
|
}
|
|
|
@@ -357,6 +375,10 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
insPlyIncome.setSyNoTaxPremium(insFeeOrderNew.getSyNoTaxPremium());
|
|
|
insPlyIncome.setNoNoTaxPremium(insFeeOrderNew.getNoNoTaxPremium());
|
|
|
insPlyIncome.setUserId(insFeeOrderNew.getUserId());
|
|
|
+ insPlyIncome.setJqStartDate(insAreaCompany.getJqStartDate());
|
|
|
+ insPlyIncome.setJqEndDate(insAreaCompany.getJqEndDate());
|
|
|
+ insPlyIncome.setSyStartDate(insAreaCompany.getSyStartDate());
|
|
|
+ insPlyIncome.setSyEndDate(insAreaCompany.getSyEndDate());
|
|
|
this.saveRiskCode(order.getProductid(),insPlyIncome);
|
|
|
insPlyIncome.setInsuredName(order.getInsuredname());
|
|
|
this.saveByCompanyId(insFeeOrderNew ,insAreaCompany.getCompanyId(),insPlyIncome);
|
|
|
@@ -426,7 +448,11 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
params.put("pageNum",insPlyIncomeVo.getPageNum());
|
|
|
params.put("pageSize",insPlyIncomeVo.getPageSize());
|
|
|
params =this.saveParams(insPlyIncomeVo,params);
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getIds())){
|
|
|
+ params.put("ids",insPlyIncomeVo.getIds().split(","));
|
|
|
+ }
|
|
|
List<InsPlyIncome> list= this.baseMapper.queryNew(params);
|
|
|
+
|
|
|
pageHelper=new PageInfo(list);
|
|
|
BasePageResult<InsPlyIncome> pageResult=new BasePageResult<InsPlyIncome>(insPlyIncomeVo.getPageNum(), insPlyIncomeVo.getPageSize(), pageHelper.getTotal(), pageHelper.getPages(), list);
|
|
|
return HttpResult.ok(pageResult);
|
|
|
@@ -556,6 +582,32 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getDockingPerson())){
|
|
|
params.put("dockingPerson",insPlyIncomeVo.getDockingPerson());
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(insPlyIncomeVo.getYeartsStart()) && StringUtils.isNotEmpty(insPlyIncomeVo.getYeartsEnd())){
|
|
|
+ params.put("yeartsStart",insPlyIncomeVo.getYeartsStart());
|
|
|
+ params.put("yeartsEnd",insPlyIncomeVo.getYeartsEnd());
|
|
|
+ }
|
|
|
+ if(insPlyIncomeVo.getJqStartDate() !=null){
|
|
|
+ params.put("jqStartDate",insPlyIncomeVo.getJqStartDate());
|
|
|
+ }
|
|
|
+ if(insPlyIncomeVo.getJqStartDate() !=null){
|
|
|
+ params.put("jqEndDate",insPlyIncomeVo.getJqEndDate());
|
|
|
+ }
|
|
|
+ if(insPlyIncomeVo.getJqStartDate() !=null){
|
|
|
+ params.put("syStartDate",insPlyIncomeVo.getSyStartDate());
|
|
|
+ }
|
|
|
+ if(insPlyIncomeVo.getJqStartDate() !=null){
|
|
|
+ params.put("syEndDate",insPlyIncomeVo.getSyEndDate());
|
|
|
+ }
|
|
|
+ if( StringUtils.isNotEmpty(insPlyIncomeVo.getDeptId())){
|
|
|
+ params.put("deptId",insPlyIncomeVo.getDeptId());
|
|
|
+ }
|
|
|
+ if(!CollectionUtils.isEmpty(insPlyIncomeVo.getSelectIds())){
|
|
|
+ params.put("selectIds",insPlyIncomeVo.getSelectIds());
|
|
|
+ }
|
|
|
+ if(!CollectionUtils.isEmpty(insPlyIncomeVo.getPartnerCompaniesIdList())){
|
|
|
+ params.put("partnerCompaniesIdList",insPlyIncomeVo.getPartnerCompaniesIdList());
|
|
|
+ }
|
|
|
+
|
|
|
return params;
|
|
|
}
|
|
|
|
|
|
@@ -689,32 +741,92 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
ArrayList<HashMap<String, Object>> resultList = new ArrayList<>();
|
|
|
HashMap<String, Object> resultMap = new HashMap<>();
|
|
|
StringBuffer strBuilder = new StringBuffer();
|
|
|
+ boolean open=true;
|
|
|
String ids="";
|
|
|
try {
|
|
|
List<InsBxPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
Integer i=0;
|
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
|
for (InsBxPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
+ String reason ="";
|
|
|
i=i+1;
|
|
|
params.clear();
|
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
params.put("licenseno",licenseno);
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据车牌号有问题";
|
|
|
+ }
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(excelItem.getPolicyno())){
|
|
|
String policyno = excelItem.getPolicyno(); //交强保单号
|
|
|
params.put("policyno",policyno);
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据交强保单号有问题";
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotEmpty(excelItem.getSyPolicyno())){
|
|
|
String syPolicyno = excelItem.getSyPolicyno(); //商业保单号
|
|
|
params.put("syPolicyno",syPolicyno);
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据商业保单号有问题";
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
+ if(excelItem.getJqSuperviseCostsPremiums() !=null && excelItem.getJqSuperviseCostsPremiums().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("jqSuperviseCostsPremiums",excelItem.getJqSuperviseCostsPremiums());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据交强手续费金额有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getJqSuperviseCostsProportion() !=null && excelItem.getJqSuperviseCostsProportion().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("jqSuperviseCostsProportion",excelItem.getJqSuperviseCostsProportion());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据交强手续费比例有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getSySuperviseCostsProportion() !=null && excelItem.getSySuperviseCostsProportion().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("sySuperviseCostsProportion",excelItem.getSySuperviseCostsProportion());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据商业手续费比例有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(excelItem.getSySuperviseCostsPremiums() !=null && excelItem.getSySuperviseCostsPremiums().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("sySuperviseCostsPremiums",excelItem.getSySuperviseCostsPremiums());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据商业手续费金额有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getJqPremium() !=null && excelItem.getJqPremium().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("jqPremium",excelItem.getJqPremium());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据交强保费有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getSyPremium() !=null && excelItem.getSyPremium().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("syPremium",excelItem.getSyPremium());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据商业保费有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
// 只查手续费
|
|
|
params.put("isOther","0");
|
|
|
params.put("isNotCar",isNotCar);
|
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
|
- if(i==dtoList.size()){
|
|
|
+ if(ObjectUtils.isNotEmpty(insPlyIncome) && open){
|
|
|
+ open=false;
|
|
|
resultMap.put("companyId",insPlyIncome.getCompanyId()); // 保险公司id
|
|
|
resultMap.put("partnerCompaniesId",insPlyIncome.getPartnerCompaniesId()); //合作公司id
|
|
|
resultMap.put("agreementId",insPlyIncome.getAgreementId()); //协议id
|
|
|
@@ -737,6 +849,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
|
resultList.add(noMatching);
|
|
|
}
|
|
|
+ resultMap.put("reason",reason);
|
|
|
}
|
|
|
}
|
|
|
if(strBuilder.length() >0){
|
|
|
@@ -765,21 +878,53 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
List<InsBxNoPlyIncomeExcelDto> dtoList = ExcelEasypoiUtils.importExcel(multipartFile, InsBxNoPlyIncomeExcelDto.class, 0, 1, 1);
|
|
|
if(!CollectionUtils.isEmpty(dtoList)){
|
|
|
for (InsBxNoPlyIncomeExcelDto excelItem : dtoList) {
|
|
|
+ String reason ="";
|
|
|
i=i+1;
|
|
|
params.clear();
|
|
|
if(StringUtils.isNotEmpty(excelItem.getLicenseno())){
|
|
|
String licenseno = excelItem.getLicenseno();//车牌号
|
|
|
params.put("licenseno",licenseno);
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据车牌号有问题";
|
|
|
+ }
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(excelItem.getNoPolicyno())){
|
|
|
String policyno = excelItem.getNoPolicyno(); //非车保单号
|
|
|
params.put("NoPolicyno",policyno);
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据非车保单号有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if(excelItem.getNoPremium() !=null && excelItem.getNoPremium().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("noPolicyno",excelItem.getNoPremium());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据非车保费有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ if( excelItem.getNoSuperviseCostsPremiums() !=null && excelItem.getNoSuperviseCostsPremiums().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("noSuperviseCostsPremiums",excelItem.getNoSuperviseCostsPremiums());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据非车手续费有问题";
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(excelItem.getNoSuperviseCostsProportion() != null && excelItem.getNoSuperviseCostsProportion().compareTo(BigDecimal.ZERO)!=0){
|
|
|
+ params.put("noSuperviseCostsProportion",excelItem.getNoSuperviseCostsProportion());
|
|
|
+ InsPlyIncome byBxLicenseno = baseMapper.findByBxLicenseno(params);
|
|
|
+ if(ObjectUtils.isEmpty(byBxLicenseno)){
|
|
|
+ reason="该数据非车手续费比例有问题";
|
|
|
+ }
|
|
|
}
|
|
|
// 只查手续费
|
|
|
params.put("isOther","0");
|
|
|
params.put("isNotCar",isNotCar);
|
|
|
InsPlyIncome insPlyIncome = baseMapper.findByBxLicenseno(params);
|
|
|
- if(i==dtoList.size()){
|
|
|
+ if(i==dtoList.size() && ObjectUtils.isNotEmpty(insPlyIncome)){
|
|
|
resultMap.put("companyId",insPlyIncome.getCompanyId()); // 保险公司id
|
|
|
resultMap.put("partnerCompaniesId",insPlyIncome.getPartnerCompaniesId()); //合作公司id
|
|
|
resultMap.put("agreementId",insPlyIncome.getAgreementId()); //协议id
|
|
|
@@ -799,6 +944,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
}
|
|
|
resultList.add(noMatching);
|
|
|
}
|
|
|
+ resultMap.put("reason",reason);
|
|
|
}
|
|
|
if(strBuilder.length() >0){
|
|
|
ids = strBuilder.deleteCharAt(strBuilder.length() - 1).toString();
|
|
|
@@ -919,6 +1065,8 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
return baseMapper.getEntityById(id);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public void updateByEntity(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
@@ -1074,35 +1222,37 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
InsPlyIncome insPlyIncome = new InsPlyIncome();
|
|
|
insPlyIncomeVo.setOrderno(id.toString());
|
|
|
BeanUtils.copyProperties(insPlyIncomeVo, insPlyIncome);
|
|
|
+ insPlyIncome.setUserId(BaseController.getUser().getId());
|
|
|
insPlyIncome.setDocumentaryFeesStatus("0");
|
|
|
insPlyIncome.setHandlingFeesStatus("0");
|
|
|
- insPlyIncome.setIsNotCar("0");
|
|
|
- insPlyIncome.setIsNotDocumentary("1");
|
|
|
- baseMapper.insert(insPlyIncome);
|
|
|
- insPlyIncomeVo.setId(insPlyIncome.getId());
|
|
|
- insPlyIncomeVo.setCrudStatus("1");
|
|
|
- this.saveLog(insPlyIncomeVo); //添加日志
|
|
|
-
|
|
|
- HashMap<String, Object> params = new HashMap<>();
|
|
|
+ insPlyIncome.setIsNotCar(insPlyIncomeVo.getIsNotCar()); // 是否是非车
|
|
|
+ insPlyIncome.setIsNotDocumentary(insPlyIncomeVo.getIsNotDocumentary()); //是否是跟单
|
|
|
|
|
|
- if(StringUtils.isNotEmpty(insPlyIncomeVo.getIsNotCar())){
|
|
|
- params.put("isNotCar",insPlyIncomeVo.getIsNotCar());
|
|
|
- }
|
|
|
- params.put("isOther","1");
|
|
|
- if(StringUtils.isNotEmpty(insPlyIncomeVo.getYear())){
|
|
|
- params.put("year",insPlyIncomeVo.getYear());
|
|
|
- }
|
|
|
- if(StringUtils.isNotEmpty(insPlyIncomeVo.getCompanyId())){
|
|
|
- params.put("companyId",insPlyIncomeVo.getCompanyId());
|
|
|
- }
|
|
|
-
|
|
|
- List<InsPlyIncome> list= this.baseMapper.NonSettlementQuery(params);
|
|
|
- if(!CollectionUtils.isEmpty(list)){
|
|
|
- for (InsPlyIncome item :list){
|
|
|
- return HttpResult.ok(item.getIds());
|
|
|
- }
|
|
|
- }
|
|
|
- return null;
|
|
|
+ baseMapper.insert(insPlyIncome);
|
|
|
+// insPlyIncomeVo.setId(insPlyIncome.getId());
|
|
|
+// insPlyIncomeVo.setCrudStatus("1");
|
|
|
+// this.saveLog(insPlyIncomeVo); //添加日志
|
|
|
+//
|
|
|
+// HashMap<String, Object> params = new HashMap<>();
|
|
|
+//
|
|
|
+// if(StringUtils.isNotEmpty(insPlyIncomeVo.getIsNotCar())){
|
|
|
+// params.put("isNotCar",insPlyIncomeVo.getIsNotCar());
|
|
|
+// }
|
|
|
+// params.put("isOther","1");
|
|
|
+// if(StringUtils.isNotEmpty(insPlyIncomeVo.getYear())){
|
|
|
+// params.put("year",insPlyIncomeVo.getYear());
|
|
|
+// }
|
|
|
+// if(StringUtils.isNotEmpty(insPlyIncomeVo.getCompanyId())){
|
|
|
+// params.put("companyId",insPlyIncomeVo.getCompanyId());
|
|
|
+// }
|
|
|
+//
|
|
|
+// List<InsPlyIncome> list= this.baseMapper.NonSettlementQuery(params);
|
|
|
+// if(!CollectionUtils.isEmpty(list)){
|
|
|
+// for (InsPlyIncome item :list){
|
|
|
+// return HttpResult.ok(item.getIds());
|
|
|
+// }
|
|
|
+// }
|
|
|
+ return HttpResult.ok();
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
@@ -1347,10 +1497,11 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar()); // 是否是非车
|
|
|
settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
- settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getExpendAmount()); //税点支出
|
|
|
+// settlementDocumentaryFeesVo.setExpendAmount(insPlyIncomeVo.getExpendAmount()); //税点支出
|
|
|
settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getInvoicCommissionFeevalue());
|
|
|
settlementDocumentaryFeesVo.setHandlingFeesStatus("0");
|
|
|
settlementDocumentaryFeesVo.setParentId(insPlyIncomeVo.getId());
|
|
|
+ settlementDocumentaryFeesVo.setSettlementImageId(insPlyIncomeVo.getSettlementImageId());
|
|
|
settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
settlementDocumentaryFeesVo.setAgreementType("2"); //1平台 2 保险
|
|
|
settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
@@ -1444,8 +1595,8 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
@Override
|
|
|
@Transactional
|
|
|
public HttpResult<Object> batchInvoic(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
- // 通过ids 查出跟单非结算单
|
|
|
- String ids = insPlyIncomeVo.getIds();
|
|
|
+ // 通过ids 查出跟单非结算单
|
|
|
+ String ids = insPlyIncomeVo.getIds();
|
|
|
// if(StringUtils.isNotEmpty(ids)){
|
|
|
// String[] split = ids.split(",");
|
|
|
// for (int i =0; i <split.length ; i++) {
|
|
|
@@ -1462,6 +1613,15 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getYear())){
|
|
|
settlementDocumentaryFeesVo.setTimeFrame(insPlyIncomeVo.getYear());//年度
|
|
|
}
|
|
|
+ if(!CollectionUtils.isEmpty(insPlyIncomeVo.getMultipleSelection())){
|
|
|
+ InsPlyIncomeVo insPlyIncomeVo1 = insPlyIncomeVo.getMultipleSelection().get(0);
|
|
|
+ insPlyIncomeVo.setSettlementAmount(insPlyIncomeVo1.getSettlementAmount());
|
|
|
+ insPlyIncomeVo.setOtherFeevalue(insPlyIncomeVo1.getAllTotalOtherFeevalue());
|
|
|
+ YearMonth yearMonth = YearMonth.parse(insPlyIncomeVo1.getMonthYear());
|
|
|
+ LocalDate signingTime = yearMonth.atDay(1);
|
|
|
+ settlementDocumentaryFeesVo.setSigningTime(signingTime);
|
|
|
+
|
|
|
+ }
|
|
|
if(StringUtils.isNotEmpty(insPlyIncomeVo.getYear())){
|
|
|
settlementDocumentaryFeesVo.setYear(insPlyIncomeVo.getYear());
|
|
|
}
|
|
|
@@ -1488,7 +1648,7 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
settlementDocumentaryFeesVo.setIds(insPlyIncomeVo.getIds());
|
|
|
// 税点支出
|
|
|
- if(BigDecimalUtils.nullToZero(insPlyIncomeVo.getTaxPoints()) !=null && BigDecimalUtils.nullToZero(insPlyIncomeVo.getSettlementAmount()) !=null){
|
|
|
+ if(BigDecimalUtils.nullToZero(insPlyIncomeVo.getTaxPoints()) !=null && insPlyIncomeVo.getTaxPoints().compareTo(BigDecimal.ZERO) != 0 && BigDecimalUtils.nullToZero(insPlyIncomeVo.getSettlementAmount()) !=null){
|
|
|
BigDecimal settlementAmount = insPlyIncomeVo.getSettlementAmount();
|
|
|
settlementDocumentaryFeesVo.setExpendAmount(settlementAmount.multiply(BigDecimal.ONE.subtract(insPlyIncomeVo.getTaxPoints().divide(new BigDecimal(100)))));
|
|
|
}
|
|
|
@@ -1592,7 +1752,78 @@ public class InsPlyIncomeServiceImpl extends ServiceImpl<InsPlyIncomeMapper, Ins
|
|
|
InsPlyIncome totalledAmount =baseMapper.bxTotalAmount(params); //总金额
|
|
|
return totalledAmount;
|
|
|
}
|
|
|
+ @Override
|
|
|
+ public HttpResult<List<HashMap<String,Object>>> otherTimeDetail(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ this.saveParams(insPlyIncomeVo,params);
|
|
|
+ List<HashMap<String,Object>> resultMap=baseMapper.otherTimeDetail(params);
|
|
|
+ return HttpResult.ok(resultMap);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public HttpResult<Object> singleInvoic(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
|
|
|
+ // 通过ids 查出跟单非结算单
|
|
|
+ SettlementDocumentaryFeesVo settlementDocumentaryFeesVo = new SettlementDocumentaryFeesVo(); // 生成跟单费结算表
|
|
|
+ if (!CollectionUtils.isEmpty(insPlyIncomeVo.getMultipleSelection())) {
|
|
|
+ for (InsPlyIncomeVo insPlyIncomeVo1 : insPlyIncomeVo.getMultipleSelection()) {
|
|
|
+ insPlyIncomeVo.setSettlementAmount(insPlyIncomeVo1.getSettlementAmount());
|
|
|
+ insPlyIncomeVo.setOtherFeevalue(insPlyIncomeVo1.getAllTotalOtherFeevalue());
|
|
|
+ YearMonth yearMonth = YearMonth.parse(insPlyIncomeVo1.getMonthYear());
|
|
|
+ LocalDate signingTime = yearMonth.atDay(1);
|
|
|
+ settlementDocumentaryFeesVo.setSigningTime(signingTime);
|
|
|
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(insPlyIncomeVo.getYear())) {
|
|
|
+ settlementDocumentaryFeesVo.setTimeFrame(insPlyIncomeVo.getYear());//年度
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(insPlyIncomeVo.getYear())) {
|
|
|
+ settlementDocumentaryFeesVo.setYear(insPlyIncomeVo.getYear());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(insPlyIncomeVo.getMonth())) {
|
|
|
+ settlementDocumentaryFeesVo.setMonth(insPlyIncomeVo.getMonth());
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(insPlyIncomeVo.getDay())) {
|
|
|
+ settlementDocumentaryFeesVo.setDay(insPlyIncomeVo.getDay());
|
|
|
+ }
|
|
|
+ settlementDocumentaryFeesVo.setCompanyId(insPlyIncomeVo.getCompanyId());// 保险公司id
|
|
|
+ settlementDocumentaryFeesVo.setPartnerCompaniesId(insPlyIncomeVo.getPartnerCompaniesId()); //合作公司id
|
|
|
+ settlementDocumentaryFeesVo.setTotalAmount(insPlyIncomeVo.getOtherFeevalue()); //其他费用金额
|
|
|
+ settlementDocumentaryFeesVo.setUnsettledAmount(insPlyIncomeVo.getNoInvoicCommissionFeevalue().subtract(insPlyIncomeVo.getSettlementAmount())); //未结算
|
|
|
+ settlementDocumentaryFeesVo.setSettlementAmount(insPlyIncomeVo.getSettlementAmount());//已经开票
|
|
|
+ settlementDocumentaryFeesVo.setCreateTime(LocalDate.now());
|
|
|
+ settlementDocumentaryFeesVo.setIds(insPlyIncomeVo.getIncomeIds());
|
|
|
+ settlementDocumentaryFeesVo.setSettlementStatus("1");
|
|
|
+ settlementDocumentaryFeesVo.setIsNotCar(insPlyIncomeVo.getIsNotCar());
|
|
|
+ if (StringUtils.isNotEmpty(insPlyIncomeVo.getContractId())) {
|
|
|
+ settlementDocumentaryFeesVo.setInvoiceId(insPlyIncomeVo.getContractId()); //开票号
|
|
|
+ }
|
|
|
+ settlementDocumentaryFeesVo.setHandlingFeesStatus(insPlyIncomeVo.getHandlingFeesStatus());
|
|
|
+ settlementDocumentaryFeesVo.setInvoicingMethod(insPlyIncomeVo.getInvoicingMethod()); //开票方式
|
|
|
+ settlementDocumentaryFeesVo.setTaxPoints(insPlyIncomeVo.getTaxPoints()); //税点
|
|
|
+ settlementDocumentaryFeesVo.setIds(insPlyIncomeVo.getIds());
|
|
|
+ settlementDocumentaryFeesVo.setSigningTime(insPlyIncomeVo.getSettlementTime()); //签单日期
|
|
|
+ // 税点支出
|
|
|
+ if (BigDecimalUtils.nullToZero(insPlyIncomeVo.getTaxPoints()) != null && BigDecimalUtils.nullToZero(insPlyIncomeVo.getSettlementAmount()) != null) {
|
|
|
+ BigDecimal settlementAmount = insPlyIncomeVo.getSettlementAmount();
|
|
|
+ settlementDocumentaryFeesVo.setExpendAmount(settlementAmount.multiply(BigDecimal.ONE.subtract(insPlyIncomeVo.getTaxPoints().divide(new BigDecimal(100)))));
|
|
|
+ }
|
|
|
+ settlementDocumentaryFeesService.inertSettle(settlementDocumentaryFeesVo);
|
|
|
+
|
|
|
+ return HttpResult.ok();
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void batchUpdate(InsPlyIncomeVo insPlyIncomeVo) {
|
|
|
+ HashMap<String, Object> params = new HashMap<>();
|
|
|
+ params= this.saveParams(insPlyIncomeVo,params);
|
|
|
+ List<InsPlyIncome> list= this.baseMapper.queryNew(params);
|
|
|
+ for ( InsPlyIncome item : list){
|
|
|
+ item.setContractFileId( insPlyIncomeVo.getContractFileId());
|
|
|
+ item.setSettleOtherStatus("1");
|
|
|
+ baseMapper.updateById(item);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
}
|