| | |
| | | private InsuranceApplyMapper insuranceApplyMapper; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public Integer create(SolutionsBase solutionsBase) { |
| | | LoginUserInfo user= (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | initCreateParam(solutionsBase); |
| | |
| | | newType.setSolutionId(newModel.getId()); |
| | | solutionWorktypeJoinMapper.insert(newType); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = {BusinessException.class,Exception.class}) |
| | | public void updateById(SolutionsBase solutionsBase) { |
| | | LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal(); |
| | | SolutionsBase model = findById(solutionsBase.getId()); |
| | |
| | | solutionsBase.setAddValidDays(solutionsBase.getDelValidDays()); |
| | | } |
| | | solutionsBaseMapper.updateById(solutionsBase); |
| | | |
| | | SolutionsBase oldVersion = solutionsBaseMapper.selectOne(new QueryWrapper<SolutionsBase>() |
| | | .lambda() |
| | | .eq(SolutionsBase::getBaseId,solutionsBase.getId()) |
| | |
| | | .eq(SolutionWorktype::getType,Constants.ONE) |
| | | ); |
| | | //删除父方案下所有子方案的工种数据 |
| | | |
| | | solutionWorktypeJoinMapper.delete(new UpdateWrapper<SolutionWorktype>() |
| | | .lambda() |
| | | .eq(SolutionWorktype::getType,Constants.ZERO) |
| | |
| | | ); |
| | | |
| | | dealWorkTypeInsurance(solutionsBase,newModel,solutionsBase.getWorktypeIdList()); |
| | | |
| | | |
| | | solutionsBaseMapper.update(null,new UpdateWrapper<SolutionsBase>() |
| | | .lambda() |