| | |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public boolean assignTeamUser(ProductionOperationTaskDto dto) { |
| | | // 指派班组成员 |
| | | if (dto == null || dto.getId() == null) { |
| | | throw new ServiceException("工单ID不能为空"); |
| | | } |
| | | if (dto.getTeamUserId() == null) { |
| | | throw new ServiceException("班组用户ID不能为空"); |
| | | } |
| | | |
| | | ProductionOperationTask update = new ProductionOperationTask(); |
| | | update.setId(dto.getId()); |
| | | update.setTeamUserId(dto.getTeamUserId()); |
| | | int rows = baseMapper.updateById(update); |
| | | if (rows <= 0) { |
| | | throw new ServiceException("工单不存在或已删除"); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | private LambdaQueryWrapper<ProductionOperationTask> buildQueryWrapper(ProductionOperationTaskDto dto) { |
| | | // 按条件动态构建数据库查询条件 |
| | | ProductionOperationTask query = dto == null ? new ProductionOperationTask() : dto; |