MrShi
2025-01-12 426718fb2310abff70f54962f118f4300ead2408
server/service/src/main/java/com/doumee/service/business/impl/SolutionsBaseServiceImpl.java
@@ -66,6 +66,7 @@
    private InsuranceApplyMapper insuranceApplyMapper;
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public Integer create(SolutionsBase solutionsBase) {
        LoginUserInfo user= (LoginUserInfo) SecurityUtils.getSubject().getPrincipal();
        initCreateParam(solutionsBase);
@@ -146,6 +147,7 @@
            newType.setSolutionId(newModel.getId());
            solutionWorktypeJoinMapper.insert(newType);
        }
    }
@@ -209,6 +211,7 @@
    }
    @Override
    @Transactional(rollbackFor = {BusinessException.class,Exception.class})
    public void updateById(SolutionsBase solutionsBase) {
        LoginUserInfo user= (LoginUserInfo)SecurityUtils.getSubject().getPrincipal();
        SolutionsBase model = findById(solutionsBase.getId());
@@ -248,6 +251,7 @@
            solutionsBase.setAddValidDays(solutionsBase.getDelValidDays());
        }
        solutionsBaseMapper.updateById(solutionsBase);
        SolutionsBase oldVersion = solutionsBaseMapper.selectOne(new QueryWrapper<SolutionsBase>()
                .lambda()
                .eq(SolutionsBase::getBaseId,solutionsBase.getId())
@@ -276,7 +280,6 @@
                .eq(SolutionWorktype::getType,Constants.ONE)
        );
        //删除父方案下所有子方案的工种数据
        solutionWorktypeJoinMapper.delete(new UpdateWrapper<SolutionWorktype>()
                .lambda()
                .eq(SolutionWorktype::getType,Constants.ZERO)
@@ -284,7 +287,6 @@
        );
        dealWorkTypeInsurance(solutionsBase,newModel,solutionsBase.getWorktypeIdList());
        solutionsBaseMapper.update(null,new UpdateWrapper<SolutionsBase>()
                .lambda()