|
|
@@ -77,6 +77,17 @@ public class RuleAttrMappingVo {
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("RegistrationDate", carInfo.getRegisterDate()));
|
|
|
//是否过户
|
|
|
ruleAttrMappingVoList.add(new RuleAttrMappingVo("TransferVehicle", carInfo.isTransferFlag() ? "1" : "0"));
|
|
|
+ //中煤需要判断 初登日期是否等于发证日期 并且 发证日期距离现在不满365天
|
|
|
+ String issueDateStr = carInfo.getIssueDate();
|
|
|
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
|
|
|
+ LocalDate issueDate = LocalDate.parse(issueDateStr,formatter);
|
|
|
+ LocalDate today = LocalDate.now();
|
|
|
+ //过滤单交
|
|
|
+ if(!carInfo.getRegisterDate().equals(carInfo.getIssueDate()) && ChronoUnit.DAYS.between(issueDate, today) <= 365 && !insAreaCompany.getProductid().equals("0330")){
|
|
|
+ ruleAttrMappingVoList.removeIf(item -> "TransferVehicle".equals(item.getAttrCode()));
|
|
|
+ //如果满足条件的话 直接设置成 过户车
|
|
|
+ ruleAttrMappingVoList.add(new RuleAttrMappingVo("TransferVehicle", "1"));
|
|
|
+ }
|
|
|
//是否新车
|
|
|
//使用注册日期算出自然月 然后判断是否是新旧车
|
|
|
LocalDate registrationDate = LocalDate.parse(carInfo.getRegisterDate());
|