|
|
@@ -26,6 +26,7 @@ import com.ydtech.modules.fee.service.InsFeeOrderNewHistoryService;
|
|
|
import com.ydtech.modules.order.entity.InsAreaCompany;
|
|
|
import com.ydtech.modules.order.entity.InsOrders;
|
|
|
import com.ydtech.modules.order.entity.api.dajia.constants.TypeVehicleMapping;
|
|
|
+import com.ydtech.modules.order.entity.vo.ExternalOrderFeeVo;
|
|
|
import com.ydtech.modules.order.entity.vo.FeeOrderNewVo;
|
|
|
import com.ydtech.modules.order.entity.vo.QueryOrderFeeResultVo;
|
|
|
import com.ydtech.modules.order.entity.vo.QueryOrderFeeVo;
|
|
|
@@ -46,6 +47,9 @@ import org.springframework.stereotype.Service;
|
|
|
import javax.annotation.Resource;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.LocalDateTime;
|
|
|
+import java.time.format.DateTimeFormatter;
|
|
|
import java.util.*;
|
|
|
import java.util.concurrent.atomic.AtomicBoolean;
|
|
|
import java.util.stream.Collectors;
|
|
|
@@ -1572,6 +1576,283 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
}
|
|
|
|
|
|
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public ExternalOrderFeeVo calcCostsExternalExportData(PtlAgreement ptlAgreement, PtlAgreementProductCostsNew ptlAgreementProductCostsNew, ExternalOrderFeeVo externalOrderFeeVo) {
|
|
|
+ //获取协议信息
|
|
|
+ // 外部订单比例
|
|
|
+ ptlAgreementProductCostsNew.blank();
|
|
|
+ SysUser sysUser = sysUserService.findByUserId(externalOrderFeeVo.getUserId());
|
|
|
+ BigDecimal enterProportion = sysSwitchConfigService.getEnterProportion(sysUser.getDeptId(), 3);
|
|
|
+
|
|
|
+ BigDecimal taxRadio = new BigDecimal("1.00");
|
|
|
+ //如果是外部订单则 不含税
|
|
|
+ if (ptlAgreement.getWithTax().equals("否")) {
|
|
|
+ taxRadio = new BigDecimal("1.06");
|
|
|
+ }
|
|
|
+ //税比例 固定1.06
|
|
|
+ //查找入口与出口费用比例
|
|
|
+
|
|
|
+ //出口配置
|
|
|
+ PtlAgreementProductCostsExport ptlAgreementProductCostsExport =
|
|
|
+ ptlAgreementProductCostsExportService.getOne(new LambdaQueryWrapper<PtlAgreementProductCostsExport>().eq(PtlAgreementProductCostsExport::getCostsId, ptlAgreementProductCostsNew.getId()));
|
|
|
+
|
|
|
+ //不含税
|
|
|
+ BigDecimal bigDecimal = new BigDecimal("1.06");
|
|
|
+ externalOrderFeeVo.setJqNoTaxPremium(externalOrderFeeVo.getJqPremium().divide(bigDecimal, 2));
|
|
|
+ externalOrderFeeVo.setSyNoTaxPremium(externalOrderFeeVo.getSyPremium().divide(bigDecimal, 2));
|
|
|
+ externalOrderFeeVo.setNoNoTaxPremium(externalOrderFeeVo.getNoPremium().divide(bigDecimal, 2));
|
|
|
+
|
|
|
+ //region 计算入口费用
|
|
|
+
|
|
|
+ //交强入口信息
|
|
|
+ FeeOrderNewVo.EntranceFee jqEntranceFee = feeRuleSchemeService.calcEntranceFee(externalOrderFeeVo.getJqPremium(),
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getJqCarCostsProportion()),
|
|
|
+ externalOrderFeeVo.getJqRadio(), taxRadio);
|
|
|
+
|
|
|
+ //endregion
|
|
|
+
|
|
|
+
|
|
|
+ //region 重新计算管理费比例和分销比例
|
|
|
+
|
|
|
+ List<EsmRetail> esmRetailList = esmRetailService.selectList(" where t.deptid=? and t.status = '1' ",
|
|
|
+ new Object[]{sysUser.getDeptId()});
|
|
|
+
|
|
|
+ Integer retailLevel = 0;
|
|
|
+
|
|
|
+ //默认分销比例设置
|
|
|
+ RetailProportion retailProportion = new RetailProportion();
|
|
|
+ if (!Objects.isNull(esmRetailList) && !esmRetailList.isEmpty()) {
|
|
|
+ retailLevel = Integer.parseInt(esmRetailList.get(0).getRetailtype());
|
|
|
+ //赋值默认的分销比例
|
|
|
+ retailProportion.setProportion(esmRetailList.get(0).getDisrate1(), esmRetailList.get(0).getDisrate2(), esmRetailList.get(0).getDisrate3());
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ //获取交强机构管理费总比例
|
|
|
+ BigDecimal jqDeptProportion = ptlAgreementProductCostsExport.getJqExportRadioLevel1()
|
|
|
+ .add(ptlAgreementProductCostsExport.getJqExportRadioLevel2())
|
|
|
+ .add(ptlAgreementProductCostsExport.getJqExportRadioLevel3())
|
|
|
+ .add(ptlAgreementProductCostsExport.getJqExportRadioLevel4())
|
|
|
+ .add(ptlAgreementProductCostsExport.getJqExportRadioLevel5());
|
|
|
+ //获取商业机构管理费总比例
|
|
|
+ BigDecimal syDeptProportion = ptlAgreementProductCostsExport.getSyExportRadioLevel1()
|
|
|
+ .add(ptlAgreementProductCostsExport.getSyExportRadioLevel2())
|
|
|
+ .add(ptlAgreementProductCostsExport.getSyExportRadioLevel3())
|
|
|
+ .add(ptlAgreementProductCostsExport.getSyExportRadioLevel4())
|
|
|
+ .add(ptlAgreementProductCostsExport.getSyExportRadioLevel5());
|
|
|
+ //获取非车机构管理费总比例
|
|
|
+ BigDecimal noDeptProportion = ptlAgreementProductCostsExport.getNoCarExportRadioLevel1()
|
|
|
+ .add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel2())
|
|
|
+ .add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel3())
|
|
|
+ .add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel4())
|
|
|
+ .add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel5());
|
|
|
+
|
|
|
+ //获取交强分销总比例
|
|
|
+ BigDecimal jqRetailProportion = retailProportion.getJqRetailLevel1Proportion()
|
|
|
+ .add(retailProportion.getJqRetailLevel2Proportion())
|
|
|
+ .add(retailProportion.getJqRetailLevel3Proportion());
|
|
|
+
|
|
|
+ //获取商业分销总比例
|
|
|
+ BigDecimal syRetailProportion = retailProportion.getSyRetailLevel1Proportion()
|
|
|
+ .add(retailProportion.getSyRetailLevel2Proportion())
|
|
|
+ .add(retailProportion.getSyRetailLevel3Proportion());
|
|
|
+
|
|
|
+ //获取非车分销总比例
|
|
|
+ BigDecimal noRetailProportion = retailProportion.getNoRetailLevel1Proportion()
|
|
|
+ .add(retailProportion.getNoRetailLevel2Proportion())
|
|
|
+ .add(retailProportion.getNoRetailLevel3Proportion());
|
|
|
+
|
|
|
+ //重新计算比例 入口是否超出支付的比例
|
|
|
+ ReCalcuLateProportion jqReCalcuLateProportion = recalculateProportion(
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getJqCostsProportion()),
|
|
|
+ jqDeptProportion,
|
|
|
+ jqRetailProportion,
|
|
|
+ taxRadio,
|
|
|
+ retailLevel,
|
|
|
+ ptlAgreementProductCostsExport,
|
|
|
+ retailProportion,
|
|
|
+ "jq",
|
|
|
+ enterProportion
|
|
|
+ );
|
|
|
+
|
|
|
+ ReCalcuLateProportion syReCalcuLateProportion = recalculateProportion(
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getSyCostsProportion()),
|
|
|
+ syDeptProportion,
|
|
|
+ syRetailProportion,
|
|
|
+ taxRadio,
|
|
|
+ retailLevel,
|
|
|
+ ptlAgreementProductCostsExport,
|
|
|
+ retailProportion,
|
|
|
+ "sy",
|
|
|
+ enterProportion
|
|
|
+ );
|
|
|
+
|
|
|
+ ReCalcuLateProportion noReCalcuLateProportion = recalculateProportion(
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getNoCostsProportion()),
|
|
|
+ noDeptProportion,
|
|
|
+ noRetailProportion,
|
|
|
+ taxRadio,
|
|
|
+ retailLevel,
|
|
|
+ ptlAgreementProductCostsExport,
|
|
|
+ retailProportion,
|
|
|
+ "no",
|
|
|
+ enterProportion
|
|
|
+ );
|
|
|
+
|
|
|
+ retailProportion.setProportion(jqReCalcuLateProportion, syReCalcuLateProportion, noReCalcuLateProportion);
|
|
|
+// ptlAgreementProductCostsExportService.updateById(ptlAgreementProductCostsExport);
|
|
|
+
|
|
|
+
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 计算分销费用
|
|
|
+
|
|
|
+ //分销总比例
|
|
|
+ BigDecimal jqRetailRadio = new BigDecimal("0");
|
|
|
+ BigDecimal syRetailRadio = new BigDecimal("0");
|
|
|
+ BigDecimal noRetailRadio = new BigDecimal("0");
|
|
|
+
|
|
|
+ FeeOrderNewVo.RetailFee retailFeeLevel3 = new FeeOrderNewVo.RetailFee();
|
|
|
+ FeeOrderNewVo.RetailFee retailFeeLevel2 = new FeeOrderNewVo.RetailFee();
|
|
|
+ FeeOrderNewVo.RetailFee retailFeeLevel1 = new FeeOrderNewVo.RetailFee();
|
|
|
+
|
|
|
+ //分销总比例
|
|
|
+ BigDecimal retailRadio = new BigDecimal("0");
|
|
|
+ if (esmRetailList != null && !esmRetailList.isEmpty()) {
|
|
|
+ EsmRetail esmRetail = esmRetailList.get(0);
|
|
|
+
|
|
|
+ if (esmRetail != null) {
|
|
|
+ BigDecimal sumPremium = externalOrderFeeVo.getJqPremium().add(externalOrderFeeVo.getSyPremium()).add(externalOrderFeeVo.getNoPremium());
|
|
|
+ if (Integer.parseInt(esmRetail.getRetailtype()) >= 3) {
|
|
|
+ retailRadio = retailRadio.add(new BigDecimal(String.valueOf(esmRetail.getDisrate3()))).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
+ retailFeeLevel3 = feeRuleSchemeService.calcRetail(
|
|
|
+ externalOrderFeeVo.getJqPremium(),
|
|
|
+ externalOrderFeeVo.getJqRadio(),
|
|
|
+ externalOrderFeeVo.getSyPremium(),
|
|
|
+ externalOrderFeeVo.getSyRadio(),
|
|
|
+ externalOrderFeeVo.getNoPremium(),
|
|
|
+ externalOrderFeeVo.getNoRadio(),
|
|
|
+ retailProportion.getJqRetailLevel3Proportion(),
|
|
|
+ retailProportion.getSyRetailLevel3Proportion(),
|
|
|
+ retailProportion.getNoRetailLevel3Proportion());
|
|
|
+ //三级分销费用 retailFeeLevel3.getTotalRetailPremiums()
|
|
|
+
|
|
|
+ } else {
|
|
|
+ //三级分销费用为 空值0
|
|
|
+ }
|
|
|
+ if (Integer.parseInt(esmRetail.getRetailtype()) >= 2) {
|
|
|
+ retailRadio = retailRadio.add(new BigDecimal(String.valueOf(esmRetail.getDisrate2()))).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
+ retailFeeLevel2 = feeRuleSchemeService.calcRetail(
|
|
|
+ externalOrderFeeVo.getJqPremium(),
|
|
|
+ externalOrderFeeVo.getJqRadio(),
|
|
|
+ externalOrderFeeVo.getSyPremium(),
|
|
|
+ externalOrderFeeVo.getSyRadio(),
|
|
|
+ externalOrderFeeVo.getNoPremium(),
|
|
|
+ externalOrderFeeVo.getNoRadio(),
|
|
|
+ retailProportion.getJqRetailLevel2Proportion(),
|
|
|
+ retailProportion.getSyRetailLevel2Proportion(),
|
|
|
+ retailProportion.getNoRetailLevel2Proportion());
|
|
|
+ //二级分销费用 retailFeeLevel2.getTotalRetailPremiums()
|
|
|
+ } else {
|
|
|
+ // 空的
|
|
|
+ }
|
|
|
+ if (Integer.parseInt(esmRetail.getRetailtype()) >= 1) {
|
|
|
+ retailRadio = retailRadio.add(new BigDecimal(String.valueOf(esmRetail.getDisrate1()))).setScale(2, BigDecimal.ROUND_DOWN);
|
|
|
+ retailFeeLevel1 = feeRuleSchemeService.calcRetail(
|
|
|
+ externalOrderFeeVo.getJqPremium(),
|
|
|
+ externalOrderFeeVo.getJqRadio(),
|
|
|
+ externalOrderFeeVo.getSyPremium(),
|
|
|
+ externalOrderFeeVo.getSyRadio(),
|
|
|
+ externalOrderFeeVo.getNoPremium(),
|
|
|
+ externalOrderFeeVo.getNoRadio(),
|
|
|
+ retailProportion.getJqRetailLevel1Proportion(),
|
|
|
+ retailProportion.getSyRetailLevel1Proportion(),
|
|
|
+ retailProportion.getNoRetailLevel1Proportion());
|
|
|
+
|
|
|
+ //一级 retailFeeLevel1.getTotalRetailPremiums()
|
|
|
+ } else {
|
|
|
+ // 空的
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ //null
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ // null
|
|
|
+ }
|
|
|
+
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 设置机构管理费
|
|
|
+
|
|
|
+ //交强机构管理费
|
|
|
+ BigDecimal jqDeptRadio =
|
|
|
+ ptlAgreementProductCostsExport.getJqExportRadioLevel1().add(ptlAgreementProductCostsExport.getJqExportRadioLevel2()).add(ptlAgreementProductCostsExport.getJqExportRadioLevel3()).add(ptlAgreementProductCostsExport.getJqExportRadioLevel4()).add(ptlAgreementProductCostsExport.getJqExportRadioLevel5());
|
|
|
+ FeeOrderNewVo.DeptManagerFee jqDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(externalOrderFeeVo.getJqPremium(),
|
|
|
+ ptlAgreementProductCostsExport.getJqExportRadioLevel1(), ptlAgreementProductCostsExport.getJqExportRadioLevel2(),
|
|
|
+ ptlAgreementProductCostsExport.getJqExportRadioLevel3(), ptlAgreementProductCostsExport.getJqExportRadioLevel4(),
|
|
|
+ ptlAgreementProductCostsExport.getJqExportRadioLevel5());
|
|
|
+
|
|
|
+
|
|
|
+ BigDecimal syDeptRadio =
|
|
|
+ ptlAgreementProductCostsExport.getSyExportRadioLevel1().add(ptlAgreementProductCostsExport.getSyExportRadioLevel2()).add(ptlAgreementProductCostsExport.getSyExportRadioLevel3()).add(ptlAgreementProductCostsExport.getSyExportRadioLevel4()).add(ptlAgreementProductCostsExport.getSyExportRadioLevel5());
|
|
|
+ FeeOrderNewVo.DeptManagerFee syDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(externalOrderFeeVo.getSyPremium(),
|
|
|
+ ptlAgreementProductCostsExport.getSyExportRadioLevel1(), ptlAgreementProductCostsExport.getSyExportRadioLevel2(),
|
|
|
+ ptlAgreementProductCostsExport.getSyExportRadioLevel3(), ptlAgreementProductCostsExport.getSyExportRadioLevel4(),
|
|
|
+ ptlAgreementProductCostsExport.getSyExportRadioLevel5());
|
|
|
+
|
|
|
+
|
|
|
+ BigDecimal noDeptRadio =
|
|
|
+ ptlAgreementProductCostsExport.getNoCarExportRadioLevel1().add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel2()).add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel3()).add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel4()).add(ptlAgreementProductCostsExport.getNoCarExportRadioLevel5());
|
|
|
+ FeeOrderNewVo.DeptManagerFee noDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(externalOrderFeeVo.getNoPremium(),
|
|
|
+ ptlAgreementProductCostsExport.getNoCarExportRadioLevel1(), ptlAgreementProductCostsExport.getNoCarExportRadioLevel2(),
|
|
|
+ ptlAgreementProductCostsExport.getNoCarExportRadioLevel3(), ptlAgreementProductCostsExport.getNoCarExportRadioLevel4(),
|
|
|
+ ptlAgreementProductCostsExport.getNoCarExportRadioLevel5());
|
|
|
+
|
|
|
+
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ //region 出口费用
|
|
|
+
|
|
|
+ //交强出口手续费比例
|
|
|
+ FeeOrderNewVo.ExportFee jqExportFee = feeRuleSchemeService.calcExportFee(
|
|
|
+ externalOrderFeeVo.getJqPremium(),
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getJqCostsExportProportion()),
|
|
|
+ externalOrderFeeVo.getJqRadio(),
|
|
|
+ jqDeptRadio,
|
|
|
+ retailRadio,
|
|
|
+ taxRadio,
|
|
|
+ jqReCalcuLateProportion.getProxyProportion());
|
|
|
+
|
|
|
+ //商业出口手续费比例
|
|
|
+ FeeOrderNewVo.ExportFee syExportFee = feeRuleSchemeService.calcExportFee(
|
|
|
+ externalOrderFeeVo.getSyPremium(),
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getSyCostsExportProportion()),
|
|
|
+ externalOrderFeeVo.getSyRadio(),
|
|
|
+ syDeptRadio,
|
|
|
+ retailRadio,
|
|
|
+ taxRadio,
|
|
|
+ syReCalcuLateProportion.getProxyProportion());
|
|
|
+
|
|
|
+ //非车出口手续费比例
|
|
|
+ FeeOrderNewVo.ExportFee noExportFee = feeRuleSchemeService.calcExportFee(
|
|
|
+ externalOrderFeeVo.getNoPremium(),
|
|
|
+ new BigDecimal(ptlAgreementProductCostsNew.getNoCostsExportProportion()),
|
|
|
+ externalOrderFeeVo.getNoRadio(),
|
|
|
+ noDeptRadio,
|
|
|
+ retailRadio,
|
|
|
+ taxRadio,
|
|
|
+ noReCalcuLateProportion.getProxyProportion());
|
|
|
+
|
|
|
+ externalOrderFeeVo.setJqExportPremium(jqExportFee.getTotalAmount());
|
|
|
+ externalOrderFeeVo.setSyExportPremium(syExportFee.getTotalAmount());
|
|
|
+ externalOrderFeeVo.setNoExportPremium(noExportFee.getTotalAmount());
|
|
|
+ //endregion
|
|
|
+
|
|
|
+ return externalOrderFeeVo;
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public void calcCostsExternalTest(PtlAgreementProductCostsNew ptlAgreementProductCostsNew, InsAreaCompany insAreaCompany) {
|
|
|
//获取协议信息
|
|
|
@@ -2769,6 +3050,8 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
return selectEqual(ptlAgreementProductCostsAttrLink, value);
|
|
|
} else if (ptlAgreementUndwrtRulesAttr.getAttrType().equals("radio")) {
|
|
|
return radioEqual(ptlAgreementProductCostsAttrLink, value);
|
|
|
+ } else if (ptlAgreementUndwrtRulesAttr.getAttrType().equals("datetime")){ // 时间
|
|
|
+ return dateTimeEqual(ptlAgreementProductCostsAttrLink, value);
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
@@ -2790,6 +3073,8 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
return selectEqual(ptlAgreementUndwrtRulesAttrLink, value);
|
|
|
} else if (ptlAgreementUndwrtRulesAttr.getAttrType().equals("radio")) {
|
|
|
return radioEqual(ptlAgreementUndwrtRulesAttrLink, value);
|
|
|
+ } else if(ptlAgreementUndwrtRulesAttr.getAttrType().equals("datetime")){
|
|
|
+ return dateTimeEqual(ptlAgreementUndwrtRulesAttrLink, value);
|
|
|
}
|
|
|
return false;
|
|
|
}
|
|
|
@@ -3011,6 +3296,82 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
|
|
|
return true;
|
|
|
}
|
|
|
|
|
|
+ public boolean dateTimeEqual(PtlAgreementProductCostsAttrLink ptlAgreementProductCostsAttrLink, String value){
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ if(Objects.isNull(value) || value.equals("")){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ LocalDateTime v = LocalDateTime.parse(value,formatter);
|
|
|
+ LocalDateTime min = null,max = null;
|
|
|
+ if(!Objects.isNull(ptlAgreementProductCostsAttrLink.getMin())){
|
|
|
+ min = LocalDateTime.parse(ptlAgreementProductCostsAttrLink.getMin(),formatter);
|
|
|
+ }
|
|
|
+ if(!Objects.isNull(ptlAgreementProductCostsAttrLink.getMax())){
|
|
|
+ max = LocalDateTime.parse(ptlAgreementProductCostsAttrLink.getMax(),formatter);
|
|
|
+ }
|
|
|
+
|
|
|
+ //统一处理数值
|
|
|
+ if ("1".equals(ptlAgreementProductCostsAttrLink.getOperator())) {
|
|
|
+ if (v.isAfter(min) && v.isBefore(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("2".equals(ptlAgreementProductCostsAttrLink.getOperator())) {
|
|
|
+ if (v.isBefore(min)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("3".equals(ptlAgreementProductCostsAttrLink.getOperator())) {
|
|
|
+ if (v.isBefore(min)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("4".equals(ptlAgreementProductCostsAttrLink.getOperator())) {
|
|
|
+ if (v.isAfter(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("5".equals(ptlAgreementProductCostsAttrLink.getOperator())) {
|
|
|
+ if (v.isAfter(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ public boolean dateTimeEqual(PtlAgreementUndwrtRulesAttrLink ptlAgreementUndwrtRulesAttrLink, String value){
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
+ LocalDateTime v = LocalDateTime.parse(value,formatter);
|
|
|
+ LocalDateTime min = null,max = null;
|
|
|
+ if(!Objects.isNull(ptlAgreementUndwrtRulesAttrLink.getMin())){
|
|
|
+ min = LocalDateTime.parse(ptlAgreementUndwrtRulesAttrLink.getMin(),formatter);
|
|
|
+ }
|
|
|
+ if(!Objects.isNull(ptlAgreementUndwrtRulesAttrLink.getMax())){
|
|
|
+ max = LocalDateTime.parse(ptlAgreementUndwrtRulesAttrLink.getMax(),formatter);
|
|
|
+ }
|
|
|
+
|
|
|
+ //统一处理数值
|
|
|
+ if ("1".equals(ptlAgreementUndwrtRulesAttrLink.getOperator())) {
|
|
|
+ if (!v.isAfter(min) && v.isBefore(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("2".equals(ptlAgreementUndwrtRulesAttrLink.getOperator())) {
|
|
|
+ if (!v.isBefore(min)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("3".equals(ptlAgreementUndwrtRulesAttrLink.getOperator())) {
|
|
|
+ if (!v.isBefore(min)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("4".equals(ptlAgreementUndwrtRulesAttrLink.getOperator())) {
|
|
|
+ if (!v.isAfter(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ } else if ("5".equals(ptlAgreementUndwrtRulesAttrLink.getOperator())) {
|
|
|
+ if (!v.isAfter(max)) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 获取车辆新旧车信息
|
|
|
*
|