| | |
| | | solutions.setVersion(UUID.randomUUID().toString());//版本号 |
| | | solutions.setDataType(Constants.ZERO); |
| | | solutions.setStatus(Constants.ZERO); |
| | | //2024年6月17日15:56:18 仅支持替换模式下,批增日期 等于 批减日期 |
| | | if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){ |
| | | solutions.setAddValidDays(solutions.getDelValidDays()); |
| | | } |
| | | solutionsMapper.insert(solutions);//基础版本 |
| | | |
| | | //如果有工种,则产生一个新的有效历史版本 ~ |
| | |
| | | ){ |
| | | throw new BusinessException(ResponseStatus.BAD_REQUEST); |
| | | } |
| | | |
| | | if(!(Constants.equalsInteger(solutions.getInsureCycleUnit(),Constants.ZERO) |
| | | ||Constants.equalsInteger(solutions.getInsureCycleUnit(),solutions.getInsureCycleUnit()))){ |
| | | solutions.setDelOnlyReplace(Constants.ZERO); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | solutions.setEditor(user.getId()); |
| | | solutions.setVersion(UUID.randomUUID().toString()); |
| | | solutions.setEditDate(new Date()); |
| | | |
| | | //2024年6月17日15:56:18 仅支持替换模式下,批增日期 等于 批减日期 |
| | | if(Constants.equalsInteger(solutions.getDelOnlyReplace(),Constants.ONE)){ |
| | | solutions.setAddValidDays(solutions.getDelValidDays()); |
| | | } |
| | | solutionsMapper.updateById(solutions); |
| | | |
| | | Solutions oldVersion = solutionsMapper.selectOne(new QueryWrapper<Solutions>() |
| | |
| | | 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); |
| | | } |
| | | } |