| | |
| | | )>Constants.ZERO){ |
| | | throw new BusinessException(ResponseStatus.NOT_ALLOWED.getCode(),"保险方案名称已存在"); |
| | | } |
| | | |
| | | solutions.setCanAdd(Constants.formatIntegerNum(solutions.getCanAdd())); |
| | | solutions.setCanReduce(Constants.formatIntegerNum(solutions.getCanReduce())); |
| | | solutions.setCanChangeUnit(Constants.formatIntegerNum(solutions.getCanChangeUnit())); |
| | | solutions.setAddValidDays(Constants.formatIntegerNum(solutions.getAddValidDays())); |
| | | solutions.setDelValidDays(Constants.formatIntegerNum(solutions.getDelValidDays())); |
| | | solutions.setIsdeleted(Constants.ZERO); |
| | | solutions.setCreator(user.getId()); |
| | | solutions.setCreateDate(new Date()); |
| | |
| | | if (pageWrap.getModel().getBaseId() != null) { |
| | | queryWrapper.eq(Solutions::getBaseId, pageWrap.getModel().getBaseId()); |
| | | } |
| | | for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | queryWrapper.orderByDesc(sortData.getProperty()); |
| | | } else { |
| | | queryWrapper.orderByAsc(sortData.getProperty()); |
| | | } |
| | | } |
| | | queryWrapper.orderByDesc(Solutions::getCreateDate); |
| | | // for(PageWrap.SortData sortData: pageWrap.getSorts()) { |
| | | // if (sortData.getDirection().equalsIgnoreCase(PageWrap.DESC)) { |
| | | // queryWrapper.orderByDesc(sortData.getProperty()); |
| | | // } else { |
| | | // queryWrapper.orderByAsc(sortData.getProperty()); |
| | | // } |
| | | // } |
| | | PageData<Solutions> pageData = PageData.from(solutionsJoinMapper.selectJoinPage(page,Solutions.class, queryWrapper)); |
| | | |
| | | return pageData; |
| | |
| | | .eq(Company::getStatus,Constants.ZERO) |
| | | .eq(Insurance::getIsdeleted,Constants.ZERO) |
| | | .eq(Insurance::getStatus,Constants.ZERO) |
| | | .orderByAsc(Solutions::getSortnum) |
| | | .orderByDesc(Solutions::getCreateDate) |
| | | ); |
| | | return solutionsList; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public BigDecimal testSolutionAddMoney(Integer id, BigDecimal fee, Date start,Date end,Date newDate,Date newEndTime){ |
| | | return Constants.addFee(solutionsMapper.selectById(id),fee,start,end,newDate,newEndTime); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal testSolutionReduceMoney(Integer id, BigDecimal fee, Date start,Date end,Date reduceStartTime,Date reduceEndTime){ |
| | | return Constants.reduceFee(solutionsMapper.selectById(id),fee,start,end,reduceStartTime,reduceEndTime); |
| | | } |
| | | |
| | | @Override |
| | | public BigDecimal testSolutionProduceMoney(Integer id, BigDecimal fee, Date start,Date end,Date produceStart){ |
| | | return Constants.produceFee(solutionsMapper.selectById(id),fee,start,end,produceStart); |
| | | } |
| | | } |