| | |
| | | import com.doumee.core.constants.ResponseStatus; |
| | | import com.doumee.core.exception.BusinessException; |
| | | import com.doumee.dao.business.model.Solutions; |
| | | import com.doumee.dao.business.vo.CountCyclePriceVO; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.collections4.CollectionUtils; |
| | | import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; |
| | |
| | | LocalDate currentDate = LocalDate.now(); |
| | | long age = ChronoUnit.YEARS.between(birthDate, currentDate); |
| | | return age; |
| | | } |
| | | |
| | | |
| | | public static CountCyclePriceVO countPriceVO(Date startDate, Solutions solutions){ |
| | | CountCyclePriceVO countCyclePriceVO = new CountCyclePriceVO(); |
| | | if(solutions.getInsureCycleUnit().equals(Constants.ZERO)){ |
| | | countCyclePriceVO.setEndDate(DateUtil.afterDateByType(startDate,0,solutions.getInsureCycle())); |
| | | }else if(solutions.getInsureCycleUnit().equals(Constants.TWO)){ |
| | | Integer monthDays = DateUtil.monthDays(startDate); |
| | | Date afterDate = DateUtil.afterDateByType(startDate,0,monthDays); |
| | | countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1)); |
| | | }else if(solutions.getInsureCycleUnit().equals(Constants.THREE)){ |
| | | Date afterDate = DateUtil.afterDateByType(startDate,2,solutions.getInsureCycle()); |
| | | countCyclePriceVO.setEndDate(DateUtil.afterDateByType(afterDate,0,-1)); |
| | | } |
| | | countCyclePriceVO.setCyclePrice(Constants.countDetailFee(solutions,countCyclePriceVO.getEndDate(),startDate)); |
| | | return countCyclePriceVO; |
| | | } |
| | | |
| | | public static Integer getSexByIdCard(String idCard){ |
| | |
| | | } |
| | | } |
| | | zipOutputStream.closeArchiveEntry(); |
| | | file.delete(); |
| | | } |
| | | } |
| | | } |