| | |
| | | import com.doumee.dao.business.join.SolutionWorktypeJoinMapper; |
| | | import com.doumee.dao.business.join.SolutionsJoinMapper; |
| | | import com.doumee.dao.business.model.*; |
| | | import com.doumee.service.business.CompanyService; |
| | | import com.doumee.service.business.SolutionsService; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; |
| | |
| | | .eq(Solutions::getBaseId,solutions.getId()) |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .set(Solutions::getDataType,Constants.ONE) |
| | | .set(StringUtils.isNotBlank(solutions.getSignKeyword()),Solutions::getSignKeyword,solutions.getSignKeyword()) |
| | | ); |
| | | //处理工作信息,新增最新的,同时产生历史版本 |
| | | //处理工种信息,新增最新的,同时产生历史版本 |
| | | dealWorkType(solutions,newModel,solutions.getWorktypeIdList(),false); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public List<Solutions> findList(Solutions solutions) { |
| | | solutions.setIsdeleted(Constants.ZERO); |
| | | solutions.setDataType(Constants.TWO); |
| | | solutions.setStatus(Constants.ZERO); |
| | | if(solutions.getDataType() == null){ |
| | | solutions.setDataType(Constants.TWO); |
| | | } |
| | | QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); |
| | | return solutionsMapper.selectList(wrapper); |
| | | } |
| | |
| | | return PageData.from(solutionsMapper.selectPage(page, queryWrapper)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<Solutions> findListForCompany() { |
| | | LoginUserInfo user = (LoginUserInfo) SecurityUtils.getSubject().getPrincipal(); |
| | | List<Solutions> solutionsList = solutionsJoinMapper.selectJoinList(Solutions.class,new MPJLambdaWrapper<Solutions>() |
| | | .selectAll(Solutions.class) |
| | | .leftJoin(CompanySolution.class,CompanySolution::getSolutionBaseId,Solutions::getId) |
| | | .eq(Solutions::getIsdeleted,Constants.ZERO) |
| | | .eq(Solutions::getDataType,Constants.TWO) |
| | | .eq(CompanySolution::getIsdeleted,Constants.ZERO) |
| | | .eq(CompanySolution::getCompanyId,user.getCompanyId()) |
| | | .orderByAsc(Solutions::getSortnum) |
| | | ); |
| | | return solutionsList; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Override |
| | | public long count(Solutions solutions) { |
| | | QueryWrapper<Solutions> wrapper = new QueryWrapper<>(solutions); |