| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TAppealAuditDTO; |
| | | import com.ruoyi.system.dto.TTaskAuditDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.AppealDetailVO; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import com.ruoyi.system.vo.system.TaskDetailVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-appeal") |
| | | public class TAppealController { |
| | | @Resource |
| | | private TTaskService taskService; |
| | | |
| | | @Resource |
| | | private TTaskDetailService taskDetailService; |
| | | |
| | | |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @Resource |
| | | private TLocationService locationService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | @Resource |
| | | private TCleanerService cleanerService; |
| | | @Resource |
| | | private TTaskService tTaskService; |
| | | @Resource |
| | | private TTaskDetailService tTaskDetailService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | @Resource |
| | | private TDictDataService dictDataService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private TInspectorService inspectorService; |
| | | @Resource |
| | | private TAppealService appealService; |
| | | @ApiOperation(value = "申诉记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<AppealListVO>> pageList(@RequestBody InsepectorListQuery query) { |
| | | List<SysUser> sysUsers = sysUserService.selectAllList(); |
| | | List<TLocation> locationList = locationService.list(); |
| | | if (StringUtils.hasLength(query.getDeptName())){ |
| | | List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list() |
| | | .stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list() |
| | | .stream().map(TDept::getId).collect(Collectors.toList()); |
| | | projectIds.addAll(deptIds); |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | && projectIds.contains(sysUser.getDeptId()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | } |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (!query.getPatrolInspectorIds().isEmpty()){ |
| | | // 取交集 |
| | | patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getClearStatus()!=null){ |
| | | List<String> collect = tTaskDetailService.lambdaQuery().eq(TTaskDetail::getClearStatus, query.getClearStatus()) |
| | | .list().stream().distinct().map(TTaskDetail::getTaskId).collect(Collectors.toList()); |
| | | query.setTaskIds(collect); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getLocationType()!=null){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationType().equals(query.getLocationType())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | if (StringUtils.hasLength(query.getLocationName())){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationName().contains(query.getLocationName())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | query.setLocationIds(collect); |
| | | return R.ok(new PageInfo<>()); |
| | | }else{ |
| | | collect = collect.stream().filter(query.getLocationIds()::contains).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | } |
| | | return R.ok(appealService.pageList(query)); |
| | | } |
| | | @Log(title = "批量删除申诉记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除申诉记录") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | appealService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "删除申诉记录", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除申诉记录") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | appealService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情申诉记录") |
| | | @GetMapping(value = "/detail") |
| | | public R<AppealDetailVO> detail(@RequestParam String id) { |
| | | AppealDetailVO appealDetailVO = new AppealDetailVO(); |
| | | TAppeal appeal = appealService.getById(id); |
| | | BeanUtils.copyProperties(appeal,appealDetailVO); |
| | | TTask byId = taskService.getById(appeal.getTaskId()); |
| | | TLocation byId1 = locationService.getById(byId.getLocationId()); |
| | | TLocationType byId2 = locationTypeService.getById(byId1.getLocationType()); |
| | | appealDetailVO.setLocationAddress(byId1.getLocationAddress()); |
| | | appealDetailVO.setLocationIcon(byId2.getLocationIcon()); |
| | | appealDetailVO.setLocationName(byId2.getLocationName()); |
| | | appealDetailVO.setTaskId(byId.getId()); |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(appeal.getAuditPerson())); |
| | | if (sysUser!=null){ |
| | | appealDetailVO.setAuditPersonName(sysUser.getUserName()); |
| | | } |
| | | appealDetailVO.setTaskName(byId.getTaskName()); |
| | | appealDetailVO.setTaskCode(byId.getTaskCode()); |
| | | return R.ok(appealDetailVO); |
| | | } |
| | | @Log(title = "审核申诉记录", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "审核申诉记录") |
| | | @PostMapping(value = "/audit") |
| | | public R<Boolean> audit(@RequestBody @Valid TAppealAuditDTO dto) { |
| | | dto.setAuditTime(LocalDateTime.now()); |
| | | if (dto.getStatus()==2){ |
| | | // 通过 |
| | | TTask byId = taskService.getById(dto.getTaskId()); |
| | | byId.setStatus(6); |
| | | taskService.updateById(byId); |
| | | } |
| | | dto.setAuditPerson(tokenService.getLoginUser().getUserId()+""); |
| | | appealService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情保洁员") |
| | | @PostMapping(value = "/detail") |
| | | @GetMapping(value = "/detail") |
| | | public R<TCleaner> detail(@RequestParam String id) { |
| | | return R.ok(cleanerService.getById(id)); |
| | | } |
| | |
| | | deptService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "详情部门", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑部门") |
| | | @GetMapping(value = "/detail") |
| | | public R<TDept> detail(@RequestParam String id) { |
| | | return R.ok(deptService.getById(id)); |
| | | } |
| | | @Log(title = "批量删除部门", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除部门") |
| | | @DeleteMapping(value = "/delete") |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TDept; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TProjectDept; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-inspector") |
| | | public class TInspectorController { |
| | | @Resource |
| | | private TTaskService taskService; |
| | | |
| | | @Resource |
| | | private TTaskDetailService taskDetailService; |
| | | |
| | | |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @Resource |
| | | private TLocationService locationService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | @Resource |
| | | private TCleanerService cleanerService; |
| | | @Resource |
| | | private TTaskService tTaskService; |
| | | @Resource |
| | | private TTaskDetailService tTaskDetailService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | @Resource |
| | | private TDictDataService dictDataService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private TInspectorService inspectorService; |
| | | @ApiOperation(value = "督察记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<InspectorListVO>> pageList(@RequestBody InsepectorListQuery query) { |
| | | List<SysUser> sysUsers = sysUserService.selectAllList(); |
| | | List<TLocation> locationList = locationService.list(); |
| | | if (StringUtils.hasLength(query.getDeptName())){ |
| | | List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list() |
| | | .stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list() |
| | | .stream().map(TDept::getId).collect(Collectors.toList()); |
| | | projectIds.addAll(deptIds); |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | && projectIds.contains(sysUser.getDeptId()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | } |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (!query.getPatrolInspectorIds().isEmpty()){ |
| | | // 取交集 |
| | | patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getClearStatus()!=null){ |
| | | List<String> collect = tTaskDetailService.lambdaQuery().eq(TTaskDetail::getClearStatus, query.getClearStatus()) |
| | | .list().stream().distinct().map(TTaskDetail::getTaskId).collect(Collectors.toList()); |
| | | query.setTaskIds(collect); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getLocationType()!=null){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationType().equals(query.getLocationType())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | if (StringUtils.hasLength(query.getLocationName())){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationName().contains(query.getLocationName())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | query.setLocationIds(collect); |
| | | return R.ok(new PageInfo<>()); |
| | | }else{ |
| | | collect = collect.stream().filter(query.getLocationIds()::contains).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | } |
| | | return R.ok(inspectorService.pageList(query)); |
| | | } |
| | | @Log(title = "批量删除督察任务", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除督察任务") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | inspectorService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "删除督察任务", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "删除督察任务") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public R<Boolean> deleteById(@RequestParam String id) { |
| | | inspectorService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情环卫知识") |
| | | @PostMapping(value = "/detail") |
| | | @GetMapping(value = "/detail") |
| | | public R<TKnowledge> detail(@RequestParam String id) { |
| | | |
| | | return R.ok(knowledgeService.getById(id)); |
| | | } |
| | | @Log(title = "批量删除环卫知识", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量环卫知识") |
| | | @ApiOperation(value = "批量删除环卫知识") |
| | | @DeleteMapping(value = "/delete") |
| | | public R<Boolean> edit(@RequestParam String ids) { |
| | | public R<Boolean> delete(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | knowledgeService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | |
| | | * @author xiaochen |
| | | * @since 2025-05-28 |
| | | */ |
| | | @Api(tags = "请假审批记录") |
| | | |
| | | @RestController |
| | | @RequestMapping("/t-leave-audit") |
| | | public class TLeaveAuditController { |
| | | @Resource |
| | | private TLeaveService leaveService; |
| | | @ApiOperation(value = "请假记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<LeaveListVO>> pageList(@RequestBody LeaveListQuery query) { |
| | | return R.ok(leaveService.pageList(query)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.LeaveListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.LeaveAuditDetailVO; |
| | | import com.ruoyi.system.vo.system.LeaveDetailVO; |
| | | import com.ruoyi.system.vo.system.LeaveListVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-leave") |
| | | public class TLeaveController { |
| | | |
| | | @Resource |
| | | private TLeaveService leaveService; |
| | | @Resource |
| | | private TLeaveAuditService leaveAuditService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | @ApiOperation(value = "请假记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<LeaveListVO>> pageList(@RequestBody LeaveListQuery query) { |
| | | return R.ok(leaveService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "详情") |
| | | @GetMapping(value = "/detail") |
| | | public R<LeaveDetailVO> detail(@RequestParam String id) { |
| | | LeaveDetailVO leaveDetailVO = new LeaveDetailVO(); |
| | | TLeave byId = leaveService.getById(id); |
| | | BeanUtils.copyProperties(byId,leaveDetailVO); |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(byId.getLeavePerson())); |
| | | if (sysUser!=null){ |
| | | leaveDetailVO.setNickName(sysUser.getNickName()); |
| | | leaveDetailVO.setPhone(sysUser.getPhonenumber()); |
| | | if (sysUser.getDeptType() == 1){ |
| | | TProjectDept tProjectDept = projectDeptService.getById(sysUser.getDeptId()); |
| | | if (!tProjectDept.getParentId().equals("0")){ |
| | | TProjectDept tProjectDept1 = projectDeptService.getById(tProjectDept.getParentId()); |
| | | leaveDetailVO.setDeptName(tProjectDept1.getProjectName()+">"+tProjectDept.getProjectName()); |
| | | }else{ |
| | | leaveDetailVO.setDeptName(tProjectDept.getProjectName()); |
| | | } |
| | | }else{ |
| | | TDept tDept = deptService.getById(sysUser.getDeptId()); |
| | | leaveDetailVO.setDeptName(tDept.getDeptName()); |
| | | } |
| | | } |
| | | List<TLeaveAudit> list = leaveAuditService.lambdaQuery().eq(TLeaveAudit::getLeaveId, id) |
| | | .list(); |
| | | List<LeaveAuditDetailVO> leaveAuditDetailVOS = new ArrayList<>(); |
| | | for (TLeaveAudit tLeaveAudit : list) { |
| | | LeaveAuditDetailVO leaveAuditDetailVO = new LeaveAuditDetailVO(); |
| | | BeanUtils.copyProperties(tLeaveAudit,leaveAuditDetailVO); |
| | | if (tLeaveAudit.getAuditType()==2){ |
| | | if (sysUser!=null){ |
| | | leaveAuditDetailVO.setNickName(sysUser.getNickName()); |
| | | leaveAuditDetailVO.setAvatar(sysUser.getPhonenumber()); |
| | | } |
| | | }else{ |
| | | // todo 最终审核人还未确定 |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.dto.LocationDTO; |
| | | import com.ruoyi.system.dto.LocationTypeDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.LocationListQuery; |
| | | import com.ruoyi.system.query.LocationListTaskQuery; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.LocationListTaskVO; |
| | | import com.ruoyi.system.vo.system.LocationListVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-location") |
| | | public class TLocationController { |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @Resource |
| | | private TLocationService locationService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | @Resource |
| | | private TCleanerService cleanerService; |
| | | @Resource |
| | | private TTaskService tTaskService; |
| | | @Resource |
| | | private TTaskDetailService tTaskDetailService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | |
| | | @ApiOperation(value = "点位管理分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<LocationListVO>> pageList(@RequestBody LocationListQuery query) { |
| | | return R.ok(locationService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "点位管理-巡检记录分页列表") |
| | | @PostMapping(value = "/pageListTask") |
| | | public R<PageInfo<LocationListTaskVO>> pageListTask(@RequestBody LocationListTaskQuery query) { |
| | | List<SysUser> sysUsers = sysUserService.selectAllList(); |
| | | List<TLocationType> locationTypeList = locationTypeService.list(); |
| | | List<TDept> deptList = deptService.list(); |
| | | List<TProjectDept> projectDeptList = projectDeptService.list(); |
| | | List<TLocation> locationList = locationService.list(); |
| | | |
| | | if (StringUtils.hasLength(query.getDeptName())){ |
| | | List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list() |
| | | .stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list() |
| | | .stream().map(TDept::getId).collect(Collectors.toList()); |
| | | projectIds.addAll(deptIds); |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | && projectIds.contains(sysUser.getDeptId()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | } |
| | | }else if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getClearStatus()!=null){ |
| | | List<String> collect = tTaskDetailService.lambdaQuery().eq(TTaskDetail::getClearStatus, query.getClearStatus()) |
| | | .list().stream().distinct().map(TTaskDetail::getTaskId).collect(Collectors.toList()); |
| | | query.setTaskIds(collect); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | PageInfo<LocationListTaskVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TTask> list = tTaskService.lambdaQuery() |
| | | .eq(TTask::getLocationId, query.getId()) |
| | | .between(StringUtils.hasLength(query.getStartTime()), TTask::getImplementTime, query.getStartTime(), query.getEndTime()) |
| | | .eq(query.getStatus() != null, TTask::getStatus, query.getStatus()) |
| | | .in(query.getPatrolInspectorIds() != null && query.getPatrolInspectorIds().isEmpty(), TTask::getPatrolInspector, query.getPatrolInspectorIds()) |
| | | .in(query.getTaskIds() != null && query.getTaskIds().isEmpty(), TTask::getId, query.getTaskIds()).list(); |
| | | |
| | | list = list.stream().skip((long) (query.getPageNum() - 1) * query.getPageSize()).limit(query.getPageSize()).collect(Collectors.toList()); |
| | | pageInfo.setTotal(list.size()); |
| | | List<LocationListTaskVO> res = new ArrayList<>(); |
| | | for (TTask tTask : list) { |
| | | LocationListTaskVO temp = new LocationListTaskVO(); |
| | | TLocation tLocation = locationList.stream().filter(e -> e.getId().equals(tTask.getLocationId())).findFirst().orElse(null); |
| | | if (tLocation!=null){ |
| | | BeanUtils.copyProperties(tLocation, temp); |
| | | sysUsers.stream().filter(sysUser -> Objects.equals(sysUser.getUserId(), Long.valueOf(tTask.getPatrolInspector()))).findFirst().ifPresent(sysUser -> { |
| | | temp.setPatrolInspectorName(sysUser.getUserName()); |
| | | temp.setPhonenumber(sysUser.getPhonenumber()); |
| | | if (1==sysUser.getDeptType()){ |
| | | TProjectDept tProjectDept = projectDeptList.stream().filter(e -> e.getId().equals(sysUser.getDeptId())).findFirst().orElse(null); |
| | | if (tProjectDept!=null&&!tProjectDept.getParentId().equals("0")){ |
| | | TProjectDept tProjectDept1 = projectDeptList.stream().filter(e -> e.getId().equals(tProjectDept.getParentId())).findFirst().orElse(null); |
| | | if (tProjectDept1!=null){ |
| | | temp.setDeptName(tProjectDept1.getProjectName()+">"+tProjectDept.getProjectName()); |
| | | } |
| | | }else{ |
| | | if (tProjectDept!=null){ |
| | | temp.setDeptName(tProjectDept.getProjectName()); |
| | | } |
| | | } |
| | | }else{ |
| | | TDept tDept = deptList.stream().filter(e -> e.getId().equals(sysUser.getDeptId())).findFirst().orElse(null); |
| | | if (tDept!=null){ |
| | | temp.setDeptName(tDept.getDeptName()); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | TTaskDetail one = tTaskDetailService.lambdaQuery().eq(TTaskDetail::getTaskId, tTask.getId()) |
| | | .orderByDesc(TTaskDetail::getCreateTime).last("limit 1").one(); |
| | | if (one!=null){ |
| | | temp.setClearStatus(one.getClearStatus()); |
| | | temp.setPicture(one.getPicture()); |
| | | } |
| | | temp.setTaskType(tTask.getTaskType()); |
| | | temp.setStatus(tTask.getStatus()); |
| | | temp.setTaskId(tTask.getId()); |
| | | temp.setImplementTime(tTask.getImplementTime()); |
| | | res.add(temp); |
| | | } |
| | | pageInfo.setRecords(res); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "根据片区id查询保洁员列表 不分页") |
| | | @GetMapping(value = "/listCleaner") |
| | | public R<List<TCleaner>> listCleaner(@RequestParam String id) { |
| | | return R.ok(cleanerService.lambdaQuery().eq(TCleaner::getProjectId,id).list()); |
| | | } |
| | | @Log(title = "新增点位", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增点位") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@RequestBody LocationDTO dto) { |
| | | locationService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "编辑点位", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑点位") |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody LocationDTO dto) { |
| | | locationService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情点位") |
| | | @GetMapping(value = "/detail") |
| | | public R<TLocation> detail(@RequestParam String id) { |
| | | return R.ok(locationService.getById(id)); |
| | | } |
| | | @Log(title = "批量删除点位", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除点位") |
| | | @DeleteMapping(value = "/delete") |
| | | public R<Boolean> edit(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | locationService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.system.dto.LocationTypeDTO; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.service.TLocationTypeService; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Arrays; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-location-type") |
| | | public class TLocationTypeController { |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @ApiOperation(value = "点位类型分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<LocationTypeListVO>> pageList(@RequestBody LocationTypeListQuery query) { |
| | | return R.ok(locationTypeService.pageList(query)); |
| | | } |
| | | @Log(title = "新增点位类型", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增点位类型") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@RequestBody LocationTypeDTO dto) { |
| | | locationTypeService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "编辑点位类型", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑点位类型") |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody LocationTypeDTO dto) { |
| | | locationTypeService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情点位类型") |
| | | @GetMapping(value = "/detail") |
| | | public R<TLocationType> detail(@RequestParam String id) { |
| | | |
| | | return R.ok(locationTypeService.getById(id)); |
| | | } |
| | | @Log(title = "批量删除点位类型", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除点位类型") |
| | | @DeleteMapping(value = "/delete") |
| | | public R<Boolean> edit(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | locationTypeService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.dto.NoticeSetDTO; |
| | | import com.ruoyi.system.dto.SystemBulletinDTO; |
| | | import com.ruoyi.system.model.TDictData; |
| | | import com.ruoyi.system.model.TNoticeSet; |
| | | import com.ruoyi.system.model.TProblemEscalation; |
| | |
| | | import com.ruoyi.system.vo.system.ProblemEscalationDetailVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | |
| | | private TNoticeSetService tNoticeSetService; |
| | | |
| | | @ApiOperation(value = "详情") |
| | | @PostMapping(value = "/detail") |
| | | @GetMapping(value = "/detail") |
| | | public R<List<TNoticeSet>> detail() { |
| | | List<TNoticeSet> list = tNoticeSetService.list(); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | @Log(title = "编辑通知设置", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑通知设置") |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody NoticeSetDTO dto) { |
| | | tNoticeSetService.updateBatchById(dto.getList()); |
| | | return R.ok(); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情") |
| | | @PostMapping(value = "/detail") |
| | | @GetMapping(value = "/detail") |
| | | public R<ProblemEscalationDetailVO> detail(@RequestParam String id) { |
| | | ProblemEscalationDetailVO problemEscalationDetailVO = new ProblemEscalationDetailVO(); |
| | | TProblemEscalation byId = problemEscalationService.getById(id); |
| | |
| | | import com.ruoyi.system.dto.DeptDTO; |
| | | import com.ruoyi.system.dto.ProjectDeptDTO; |
| | | import com.ruoyi.system.model.TDept; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.model.TProjectDept; |
| | | import com.ruoyi.system.query.DeptListQuery; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | |
| | | deptService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情项目部") |
| | | @GetMapping(value = "/detail") |
| | | public R<TProjectDept> detail(@RequestParam String id) { |
| | | |
| | | return R.ok(deptService.getById(id)); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情系统公告") |
| | | @PostMapping(value = "/detail") |
| | | @GetMapping(value = "/detail") |
| | | public R<TSystemBulletin> detail(@RequestParam String id) { |
| | | |
| | | return R.ok(systemBulletinService.getById(id)); |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | import com.google.common.collect.Lists; |
| | | import java.time.LocalDateTime; |
| | | |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.TTaskAuditBatchDTO; |
| | | import com.ruoyi.system.dto.TTaskAuditDTO; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | |
| | | |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.dto.TTaskDTO; |
| | | import com.ruoyi.system.dto.TTemplateDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.*; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-task") |
| | | public class TTaskController { |
| | | @Resource |
| | | private TTaskService taskService; |
| | | |
| | | @Resource |
| | | private TTaskDetailService taskDetailService; |
| | | |
| | | |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @Resource |
| | | private TLocationService locationService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | @Resource |
| | | private TCleanerService cleanerService; |
| | | @Resource |
| | | private TTaskService tTaskService; |
| | | @Resource |
| | | private TTaskDetailService tTaskDetailService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | @Resource |
| | | private TDictDataService dictDataService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "任务记录分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TaskListVO>> pageList(@RequestBody TaskListQuery query) { |
| | | List<SysUser> sysUsers = sysUserService.selectAllList(); |
| | | List<TLocation> locationList = locationService.list(); |
| | | if (StringUtils.hasLength(query.getDeptName())){ |
| | | List<String> projectIds = projectDeptService.lambdaQuery().like(TProjectDept::getProjectName, query.getDeptName()).list() |
| | | .stream().map(TProjectDept::getId).collect(Collectors.toList()); |
| | | List<String> deptIds = deptService.lambdaQuery().like(TDept::getDeptName, query.getDeptName()).list() |
| | | .stream().map(TDept::getId).collect(Collectors.toList()); |
| | | projectIds.addAll(deptIds); |
| | | if (projectIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | && projectIds.contains(sysUser.getDeptId()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | } |
| | | } |
| | | if (StringUtils.hasLength(query.getPhonenumber())){ |
| | | List<Long> patrolInspectorIds = sysUsers.stream().filter(sysUser -> |
| | | sysUser.getPhonenumber().equals(query.getPhonenumber()) |
| | | ).map(SysUser::getUserId).collect(Collectors.toList()); |
| | | if (!query.getPatrolInspectorIds().isEmpty()){ |
| | | // 取交集 |
| | | patrolInspectorIds = patrolInspectorIds.stream().filter(query.getPatrolInspectorIds()::contains).collect(Collectors.toList()); |
| | | } |
| | | query.setPatrolInspectorIds(patrolInspectorIds); |
| | | if (patrolInspectorIds.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getClearStatus()!=null){ |
| | | List<String> collect = tTaskDetailService.lambdaQuery().eq(TTaskDetail::getClearStatus, query.getClearStatus()) |
| | | .list().stream().distinct().map(TTaskDetail::getTaskId).collect(Collectors.toList()); |
| | | query.setTaskIds(collect); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | } |
| | | if (query.getLocationType()!=null){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationType().equals(query.getLocationType())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | if (StringUtils.hasLength(query.getLocationName())){ |
| | | List<String> collect = locationList.stream().filter(e -> e.getLocationName().contains(query.getLocationName())).map(TLocation::getId) |
| | | .collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | query.setLocationIds(collect); |
| | | return R.ok(new PageInfo<>()); |
| | | }else{ |
| | | collect = collect.stream().filter(query.getLocationIds()::contains).collect(Collectors.toList()); |
| | | if (collect.isEmpty()){ |
| | | return R.ok(new PageInfo<>()); |
| | | } |
| | | query.setLocationIds(collect); |
| | | } |
| | | } |
| | | return R.ok(taskService.pageList(query)); |
| | | } |
| | | |
| | | @Log(title = "新增任务", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增任务") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@RequestBody TTaskDTO dto) { |
| | | taskService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "审核任务", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "审核任务") |
| | | @PostMapping(value = "/audit") |
| | | public R<Boolean> audit(@RequestBody @Valid TTaskAuditDTO dto) { |
| | | dto.setAuditTime(LocalDateTime.now()); |
| | | if (dto.getAuditStatus()==2){ |
| | | dto.setHandleType(3); |
| | | // 将任务修改为待整改 |
| | | TTask byId = taskService.getById(dto.getTaskId()); |
| | | byId.setStatus(4); |
| | | taskService.updateById(byId); |
| | | }else{ |
| | | dto.setHandleType(2); |
| | | } |
| | | dto.setAuditPerson(tokenService.getLoginUser().getUserId()+""); |
| | | taskDetailService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "批量审核任务", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "批量审核任务") |
| | | @PostMapping(value = "/auditBatch") |
| | | public R<Boolean> auditBatch(@RequestBody @Valid TTaskAuditBatchDTO dto) { |
| | | List<TTaskDetail> tTaskDetails = new ArrayList<>(); |
| | | for (String s : dto.getTaskIds().split(",")) { |
| | | TTaskDetail tTaskDetail = new TTaskDetail(); |
| | | tTaskDetail.setTaskId(s); |
| | | tTaskDetail.setAuditTime(LocalDateTime.now()); |
| | | tTaskDetail.setAuditPerson(tokenService.getLoginUser().getUserId()+""); |
| | | if (dto.getAuditStatus()==2){ |
| | | tTaskDetail.setHandleType(3); |
| | | // 将任务修改为待整改 |
| | | TTask byId = taskService.getById(tTaskDetail.getTaskId()); |
| | | byId.setStatus(4); |
| | | taskService.updateById(byId); |
| | | }else{ |
| | | tTaskDetail.setHandleType(2); |
| | | } |
| | | tTaskDetails.add(tTaskDetail); |
| | | } |
| | | taskDetailService.saveBatch(tTaskDetails); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情任务") |
| | | @GetMapping(value = "/detail") |
| | | public R<TaskDetailVO> detail(@RequestParam String id) { |
| | | List<TTaskDetail> list = taskDetailService.lambdaQuery().eq(TTaskDetail::getTaskId, id) |
| | | .orderByDesc(BaseModel::getCreateTime).list(); |
| | | TaskDetailVO taskDetailVO = new TaskDetailVO(); |
| | | TTask byId = taskService.getById(id); |
| | | BeanUtils.copyProperties(byId, taskDetailVO); |
| | | TLocation byId1 = locationService.getById(byId.getLocationId()); |
| | | TLocationType byId2 = locationTypeService.getById(byId1.getLocationType()); |
| | | taskDetailVO.setLocationAddress(byId1.getLocationAddress()); |
| | | taskDetailVO.setLocationIcon(byId2.getLocationIcon()); |
| | | taskDetailVO.setLocationName(byId2.getLocationName()); |
| | | TTaskDetail tTaskDetail = list.stream().filter(e -> e.getHandleType() == 1).findFirst().orElse(null); |
| | | if (tTaskDetail!=null && tTaskDetail.getUnqualified()!=null){ |
| | | TDictData byId3 = dictDataService.getById(tTaskDetail.getUnqualified()); |
| | | if (byId3!=null){ |
| | | tTaskDetail.setUnqualifiedName(byId3.getDataContent()); |
| | | } |
| | | } |
| | | taskDetailVO.setTaskDetail(tTaskDetail); |
| | | taskDetailVO.setRecords(list); |
| | | return R.ok(taskDetailVO); |
| | | } |
| | | @ApiOperation(value = "详情任务-操作记录-详情") |
| | | @GetMapping(value = "/detailRecord") |
| | | public R<TaskRecordDetailVO> detailRecord(@RequestParam String id) { |
| | | |
| | | TaskRecordDetailVO taskDetailVO = new TaskRecordDetailVO(); |
| | | TTaskDetail byId4 = taskDetailService.getById(id); |
| | | TTask byId = taskService.getById(byId4.getTaskId()); |
| | | BeanUtils.copyProperties(byId, taskDetailVO); |
| | | TLocation byId1 = locationService.getById(byId.getLocationId()); |
| | | TLocationType byId2 = locationTypeService.getById(byId1.getLocationType()); |
| | | taskDetailVO.setLocationAddress(byId1.getLocationAddress()); |
| | | taskDetailVO.setLocationIcon(byId2.getLocationIcon()); |
| | | taskDetailVO.setLocationName(byId2.getLocationName()); |
| | | if ( byId4.getUnqualified()!=null){ |
| | | TDictData byId3 = dictDataService.getById(byId4.getUnqualified()); |
| | | if (byId3!=null){ |
| | | byId4.setUnqualifiedName(byId3.getDataContent()); |
| | | } |
| | | } |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(byId4.getAuditPerson())); |
| | | if (sysUser!=null){ |
| | | byId4.setAuditPersonName(sysUser.getUserName()); |
| | | } |
| | | taskDetailVO.setTaskDetail(byId4); |
| | | return R.ok(taskDetailVO); |
| | | } |
| | | @Log(title = "批量删除任务", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除任务") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | taskService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.web.controller.api; |
| | | |
| | | |
| | | import com.alibaba.fastjson2.JSONArray; |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.google.gson.JsonArray; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.dto.LocationDTO; |
| | | import com.ruoyi.system.dto.TTemplateDTO; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.model.TTemplateDetail; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import com.ruoyi.system.vo.system.ProjectDeptListVO; |
| | | import com.ruoyi.system.vo.system.TemplateDetailVO; |
| | | import com.ruoyi.system.vo.system.TemplateListVO; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-template") |
| | | public class TTemplateController { |
| | | @Resource |
| | | private TTemplateService templateService; |
| | | @Resource |
| | | private TTemplateDetailService templateDetailService; |
| | | @Resource |
| | | private TLocationTypeService tLocationTypeService; |
| | | @Resource |
| | | private ISysRoleService sysRoleService; |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "任务模板分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<TemplateListVO>> pageList(@RequestBody ProjectDeptListQuery query) { |
| | | return R.ok(templateService.pageList(query)); |
| | | } |
| | | @ApiOperation(value = "点位类型不分页列表") |
| | | @PostMapping(value = "/listAll") |
| | | public R<List<TLocationType>> pageList() { |
| | | return R.ok(tLocationTypeService.list()); |
| | | } |
| | | @Log(title = "新增任务模板", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "新增任务模板") |
| | | @PostMapping(value = "/add") |
| | | public R<Boolean> add(@RequestBody TTemplateDTO dto) { |
| | | templateService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "编辑任务模板", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "编辑任务模板") |
| | | @PostMapping(value = "/edit") |
| | | public R<Boolean> edit(@RequestBody TTemplateDTO dto) { |
| | | templateService.updateById(dto); |
| | | return R.ok(); |
| | | } |
| | | @Log(title = "批量删除任务模板", businessType = BusinessType.DELETE) |
| | | @ApiOperation(value = "批量删除任务模板") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public R<Boolean> deleteByIds(@RequestParam String ids) { |
| | | String[] split = ids.split(","); |
| | | templateService.removeBatchByIds(Arrays.asList(split)); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "详情任务模板") |
| | | @GetMapping(value = "/detail") |
| | | public R<TemplateDetailVO> detail(@RequestParam String id) { |
| | | TemplateDetailVO templateDetailVO = new TemplateDetailVO(); |
| | | TTemplate byId = templateService.getById(id); |
| | | List<TTemplateDetail> list = templateDetailService.lambdaQuery().eq(TTemplateDetail::getTemplateId, id) |
| | | .list(); |
| | | BeanUtils.copyProperties(byId,templateDetailVO); |
| | | List<String> collect = tLocationTypeService.list().stream().map(TLocationType::getId).collect(Collectors.toList()); |
| | | |
| | | for (TTemplateDetail tTemplateDetail : list) { |
| | | JSONArray res = new JSONArray(); |
| | | for (String s : collect) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("id",s); |
| | | jsonObject.put("value",""); |
| | | res.add(jsonObject); |
| | | } |
| | | String num4 = tTemplateDetail.getNum4(); |
| | | JSONObject jsonObject = JSONObject.parseObject(num4); |
| | | JSONArray num5Array = jsonObject.getJSONArray("num5"); |
| | | for (Object o : num5Array) { |
| | | JSONObject jsonObject1 = (JSONObject) o; |
| | | String string = jsonObject1.getString("id"); |
| | | // 如果res中有这个id,则设置num |
| | | for (Object re : res) { |
| | | JSONObject jsonObject2 = (JSONObject) re; |
| | | if (jsonObject2.getString("id").equals(string)) { |
| | | jsonObject2.put("num", jsonObject1.getString("num")); |
| | | } |
| | | } |
| | | } |
| | | tTemplateDetail.setNum4(res.toJSONString()); |
| | | } |
| | | if (byId.getRoleId()!=null){ |
| | | SysRole sysRole = sysRoleService.selectRoleById(byId.getRoleId()); |
| | | templateDetailVO.setRoleName(sysRole.getRoleName()); |
| | | } |
| | | templateDetailVO.setList(list); |
| | | return R.ok(templateDetailVO); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | List<String> collect = new ArrayList<>(); |
| | | collect.add("987"); |
| | | collect.add("1234"); |
| | | collect.add("4321"); |
| | | collect.add("9654"); |
| | | collect.add("4567"); |
| | | collect.add("288"); |
| | | List<TTemplateDetail> list = new ArrayList<>(); |
| | | TTemplateDetail tTemplateDetail = new TTemplateDetail(); |
| | | tTemplateDetail.setId("6666"); |
| | | tTemplateDetail.setNum4("{\"num5\":[{\"id\":\"1234\",\"value\":\"18\"},{\"id\":\"4321\",\"value\":\"18\"}]}"); |
| | | TTemplateDetail tTemplateDetail1 = new TTemplateDetail(); |
| | | tTemplateDetail1.setNum4("{\"num5\":[{\"id\":\"4567\",\"value\":\"18\"},{\"id\":\"7654\",\"value\":\"18\"}]}"); |
| | | tTemplateDetail1.setId("1111"); |
| | | list.add(tTemplateDetail); |
| | | list.add(tTemplateDetail1); |
| | | for (TTemplateDetail templateDetail : list) { |
| | | JSONArray res = new JSONArray(); |
| | | for (String s : collect) { |
| | | JSONObject jsonObject = new JSONObject(); |
| | | jsonObject.put("id",s); |
| | | jsonObject.put("value",""); |
| | | res.add(jsonObject); |
| | | } |
| | | String num4 = templateDetail.getNum4(); |
| | | JSONObject jsonObject = JSONObject.parseObject(num4); |
| | | JSONArray num5Array = jsonObject.getJSONArray("num5"); |
| | | for (Object o : num5Array) { |
| | | JSONObject jsonObject1 = (JSONObject) o; |
| | | String string = jsonObject1.getString("id"); |
| | | // 如果res中有这个id,则设置num |
| | | for (int i = 0; i < res.size(); i++) { |
| | | JSONObject jsonObject2 = (JSONObject) res.get(i); |
| | | if (jsonObject2.getString("id").equals(string)) { |
| | | jsonObject2.put("value",jsonObject1.getString("value")); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | templateDetail.setNum4(res.toJSONString()); |
| | | } |
| | | System.err.println(list); |
| | | // String num4 = "{\"num5\":[{\"id\":\"18678093453\",\"num\":\"18\"},{\"id\":\"18678093453\",\"num\":\"18\"}]}"; |
| | | // JSONObject jsonObject = JSONObject.parseObject(num4); |
| | | // JSONArray num5Array = jsonObject.getJSONArray("num5"); |
| | | // System.err.println(num5Array); |
| | | // JSONArray res = new JSONArray(); |
| | | // for (Object o : num5Array) { |
| | | // JSONObject jsonObject1 = (JSONObject) o; |
| | | // String string = jsonObject1.getString("id"); |
| | | // System.err.println(string); |
| | | // } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | /** 部门ID */ |
| | | //@Excel(name = "部门编号", type = Type.IMPORT) |
| | | @ApiModelProperty(value = "部门id") |
| | | private String deptId; |
| | | private Long deptId; |
| | | |
| | | /** 用户账号 */ |
| | | //@Excel(name = "登录名称") |
| | |
| | | private String userName; |
| | | @TableField("dept_type") |
| | | @ApiModelProperty(value = "部门类型 1项目部 2部门") |
| | | private String deptType; |
| | | private Integer deptType; |
| | | @TableField("templateId") |
| | | @ApiModelProperty(value = "部门类型 1项目部 2部门") |
| | | @ApiModelProperty(value = "所属任务模板id") |
| | | private String templateId; |
| | | |
| | | /** 用户昵称 */ |
| | |
| | | return userId != null && 1L == userId; |
| | | } |
| | | |
| | | public String getDeptId() |
| | | public Long getDeptId() |
| | | { |
| | | return deptId; |
| | | } |
| | | |
| | | public void setDeptId(String deptId) |
| | | public void setDeptId(Long deptId) |
| | | { |
| | | this.deptId = deptId; |
| | | } |
| | |
| | | throw new ServiceException("短信验证码错误"); |
| | | } |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); |
| | | LoginUser loginUser = new LoginUser(user.getUserId(), user.getDeptId(), user, permissionService.getMenuPermission(user)); |
| | | LoginUser loginUser = new LoginUser(user.getUserId(), Long.valueOf(user.getDeptId()), user, permissionService.getMenuPermission(user)); |
| | | recordLoginInfo(loginUser.getUserId()); |
| | | // 生成token |
| | | return loginUser; |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "环卫只是新增编辑DTO") |
| | | @ApiModel(value = "环卫知识新增编辑DTO") |
| | | public class KnowledgeDTO extends TKnowledge { |
| | | |
| | | |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位新增编辑DTO") |
| | | public class LocationDTO extends TLocation { |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位类型新增编辑DTO") |
| | | public class LocationTypeDTO extends TLocationType { |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TNoticeSet; |
| | | import com.ruoyi.system.model.TSystemBulletin; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "通知设置编辑DTO") |
| | | public class NoticeSetDTO extends TNoticeSet { |
| | | @ApiModelProperty("通知设置列表") |
| | | private List<TNoticeSet> list; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "申诉记录审核DTO") |
| | | public class TAppealAuditDTO extends TAppeal { |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | @Data |
| | | @ApiModel(value = "批量任务审核DTO") |
| | | public class TTaskAuditBatchDTO{ |
| | | |
| | | @ApiModelProperty(value = "审核状态1通过2驳回") |
| | | @NotBlank(message = "审核状态不能为空") |
| | | private Integer auditStatus; |
| | | @ApiModelProperty(value = "审核备注") |
| | | private String auditRemark; |
| | | @ApiModelProperty(value = "任务ids 逗号拼接") |
| | | private String taskIds; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务审核DTO") |
| | | public class TTaskAuditDTO extends TTaskDetail { |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务新增编辑DTO") |
| | | public class TTaskDTO extends TTask { |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务模板新增编辑DTO") |
| | | public class TTemplateDTO extends TTemplate { |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAppealMapper extends BaseMapper<TAppeal> { |
| | | |
| | | List<AppealListVO> pageList(@Param("query")InsepectorListQuery query,@Param("pageInfo") PageInfo<AppealListVO> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TInspector; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TInspectorMapper extends BaseMapper<TInspector> { |
| | | |
| | | List<InspectorListVO> pageList(@Param("query")InsepectorListQuery query, @Param("pageInfo")PageInfo<InspectorListVO> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.query.LocationListQuery; |
| | | import com.ruoyi.system.vo.system.LocationListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLocationMapper extends BaseMapper<TLocation> { |
| | | |
| | | List<LocationListVO> pageList(@Param("query")LocationListQuery query, @Param("pageInfo")PageInfo<LocationListVO> pageInfo); |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLocationTypeMapper extends BaseMapper<TLocationType> { |
| | | |
| | | List<LocationTypeListVO> pageList(@Param("query")LocationTypeListQuery query, @Param("pageInfo")PageInfo<LocationTypeListVO> pageInfo); |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.query.LocationListTaskQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.vo.system.LocationListTaskVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTaskMapper extends BaseMapper<TTask> { |
| | | |
| | | List<TaskListVO> pageList(@Param("query")TaskListQuery query, @Param("pageInfo")PageInfo<TaskListVO> pageInfo); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | | import com.ruoyi.system.vo.system.TemplateListVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTemplateMapper extends BaseMapper<TTemplate> { |
| | | |
| | | List<TemplateListVO> pageList(@Param("query")ProjectDeptListQuery query, @Param("pageInfo") PageInfo<TemplateListVO> pageInfo); |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "审核人") |
| | | @TableField("audit_person") |
| | | private String auditPerson; |
| | | @ApiModelProperty(value = "审核人名称") |
| | | @TableField(exist = false) |
| | | private String auditPersonName; |
| | | |
| | | @ApiModelProperty(value = "审核备注") |
| | | @TableField("audit_remark") |
| | |
| | | private Integer auditType; |
| | | |
| | | @ApiModelProperty(value = "审批时间/抄送时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @TableField("audit_time") |
| | | private LocalDateTime auditTime; |
| | | |
| | |
| | | private String patrolInspector; |
| | | |
| | | @ApiModelProperty(value = "执行日期") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @TableField("implement_time") |
| | | private LocalDateTime implementTime; |
| | | |
| | |
| | | @ApiModelProperty(value = "巡检员所属部门id") |
| | | @TableField("patrol_inspector_dept") |
| | | private String patrolInspectorDept; |
| | | @ApiModelProperty(value = "任务名称") |
| | | @TableField("task_name") |
| | | private String taskName; |
| | | @ApiModelProperty(value = "任务编号") |
| | | @TableField("task_code") |
| | | private String taskCode; |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "任务id") |
| | | @TableField("task_id") |
| | | @NotBlank(message = "任务id不能为空") |
| | | private String taskId; |
| | | |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | |
| | | @ApiModelProperty(value = "不合格原因id") |
| | | @TableField("unqualified") |
| | | private String unqualified; |
| | | @ApiModelProperty(value = "不合格原因名称") |
| | | @TableField(exist = false) |
| | | private String unqualifiedName; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | |
| | | @ApiModelProperty(value = "审核人id") |
| | | @TableField("audit_person") |
| | | private String auditPerson; |
| | | @ApiModelProperty(value = "审核人名称") |
| | | @TableField(exist = false) |
| | | private String auditPersonName; |
| | | |
| | | @ApiModelProperty(value = "审核时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | |
| | | |
| | | @ApiModelProperty(value = "审核状态1通过2驳回") |
| | | @TableField("audit_status") |
| | | @NotBlank(message = "审核状态不能为空") |
| | | private Integer auditStatus; |
| | | |
| | | @ApiModelProperty(value = "审核备注") |
| | |
| | | @TableField("num3") |
| | | private Integer num3; |
| | | |
| | | @ApiModelProperty(value = "点位类型覆盖率json") |
| | | @ApiModelProperty(value = "点位类型覆盖率json {\n" + |
| | | "\t\"num5\": [{\n" + |
| | | "\t\t\"id\": \"18678093453\",\n" + |
| | | "\t\t\"value\": \"18\"\n" + |
| | | "\n" + |
| | | "\t}, {\n" + |
| | | "\t\t\"id\": \"18678093453\",\n" + |
| | | "\t\t\"value\": \"18\"\n" + |
| | | "\t}]\n" + |
| | | "\n" + |
| | | "}") |
| | | @TableField("num4") |
| | | private String num4; |
| | | |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "申诉记录分页列表query") |
| | | public class AppealListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型id") |
| | | private String locationType; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "用户ids 前端忽略") |
| | | private List<Long> patrolInspectorIds; |
| | | @ApiModelProperty(value = "任务ids 前端忽略") |
| | | private List<String> taskIds; |
| | | @ApiModelProperty(value = "点位ids 前端忽略") |
| | | private List<String> locationIds; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "状态 1待审核2通过3驳回") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "督察任务记录分页列表query") |
| | | public class InsepectorListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型id") |
| | | private String locationType; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "用户ids 前端忽略") |
| | | private List<Long> patrolInspectorIds; |
| | | @ApiModelProperty(value = "任务ids 前端忽略") |
| | | private List<String> taskIds; |
| | | @ApiModelProperty(value = "点位ids 前端忽略") |
| | | private List<String> locationIds; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "状态1待确认 2待整改 3整改完成 4已完成 全部不传") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位分页列表query") |
| | | public class LocationListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位编号") |
| | | private String locationCode; |
| | | @ApiModelProperty(value = "点位类型id") |
| | | private String locationType; |
| | | @ApiModelProperty(value = "所属片区id") |
| | | private String projectId; |
| | | @ApiModelProperty(value = "保洁员id") |
| | | private String locationCleaner; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位-巡检记录分页列表query") |
| | | public class LocationListTaskQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "所属项目部/部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "巡查员电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty(value = "巡查员ids 前端忽略") |
| | | private List<Long> patrolInspectorIds; |
| | | @ApiModelProperty(value = "部门ids 前端忽略") |
| | | private List<String> deptIds; |
| | | @ApiModelProperty(value = "任务状态:1未执行、2超时、3待确认、4待整改、5整改完成、6已完成") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | @ApiModelProperty(value = "点位id") |
| | | private String id; |
| | | @ApiModelProperty(value = "任务ids 前端忽略") |
| | | private List<String> taskIds; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位类型分页列表query") |
| | | public class LocationTypeListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationName; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModel(value = "项目部门分页列表query") |
| | | public class ProjectDeptListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "项目部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "模板名称") |
| | | private String templateName; |
| | | @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务记录分页列表query") |
| | | public class TaskListQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "开始时间 yyyy-MM-dd HH:mm:ss") |
| | | private String startTime; |
| | | @ApiModelProperty(value = "结束时间 yyyy-MM-dd HH:mm:ss") |
| | | private String endTime; |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型id") |
| | | private String locationType; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "用户ids 前端忽略") |
| | | private List<Long> patrolInspectorIds; |
| | | @ApiModelProperty(value = "任务ids 前端忽略") |
| | | private List<String> taskIds; |
| | | @ApiModelProperty(value = "点位ids 前端忽略") |
| | | private List<String> locationIds; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "任务状态:1未执行、2超时、3待确认、4待整改、5整改完成、6已完成, 3待确认就是待审核") |
| | | private Integer status; |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TAppealService extends IService<TAppeal> { |
| | | |
| | | PageInfo<AppealListVO> pageList(InsepectorListQuery query); |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TInspector; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TInspectorService extends IService<TInspector> { |
| | | |
| | | PageInfo<InspectorListVO> pageList(InsepectorListQuery query); |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.query.LocationListQuery; |
| | | import com.ruoyi.system.vo.system.LocationListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLocationService extends IService<TLocation> { |
| | | |
| | | PageInfo<LocationListVO> pageList(LocationListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TLocationTypeService extends IService<TLocationType> { |
| | | |
| | | PageInfo<LocationTypeListVO> pageList(LocationTypeListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.query.LocationListTaskQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.vo.system.LocationListTaskVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTaskService extends IService<TTask> { |
| | | |
| | | |
| | | PageInfo<TaskListVO> pageList(TaskListQuery query); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | | import com.ruoyi.system.vo.system.TemplateListVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TTemplateService extends IService<TTemplate> { |
| | | |
| | | PageInfo<TemplateListVO> pageList(ProjectDeptListQuery query); |
| | | |
| | | |
| | | } |
| | |
| | | sysUserVO.setRoleName(sysRole.getRoleName()); |
| | | } |
| | | } |
| | | String deptType = sysUserVO.getDeptType(); |
| | | if (org.springframework.util.StringUtils.hasLength(deptType)){ |
| | | if ("1".equals(deptType)){ |
| | | Integer deptType = sysUserVO.getDeptType(); |
| | | if (1==deptType){ |
| | | TProjectDept tProjectDept = projectDeptMapper.selectById(sysUserVO.getDeptId()); |
| | | if (!tProjectDept.getParentId().equals("0")){ |
| | | TProjectDept tProjectDept1 = projectDeptMapper.selectById(tProjectDept.getParentId()); |
| | |
| | | sysUserVO.setDeptName(tDept.getDeptName()); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setTotal(list.size()); |
| | | if (org.springframework.util.StringUtils.hasLength(query.getDeptName())){ |
| | | List<SysUserVO> collect = list.stream().filter(sysUserVO -> sysUserVO.getDeptName().contains(query.getDeptName())).collect(Collectors.toList()); |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.system.mapper.TAppealMapper; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.mapper.TTaskDetailMapper; |
| | | import com.ruoyi.system.mapper.TTaskMapper; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.model.TDept; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.service.TAppealService; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TAppealServiceImpl extends ServiceImpl<TAppealMapper, TAppeal> implements TAppealService { |
| | | |
| | | @Autowired |
| | | private TDeptMapper deptMapper; |
| | | @Autowired |
| | | private TTaskDetailMapper taskDetailMapper; |
| | | @Autowired |
| | | private TTaskMapper taskMapper; |
| | | @Override |
| | | public PageInfo<AppealListVO> pageList(InsepectorListQuery query) { |
| | | PageInfo<AppealListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<AppealListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<TTask> tTasks = taskMapper.selectList(null); |
| | | for (AppealListVO taskListVO : list) { |
| | | TTask tTask = tTasks.stream().filter(e -> e.getId().equals(taskListVO.getTaskId())).findFirst().orElse(null); |
| | | if (tTask!=null){ |
| | | TDept tDept = deptMapper.selectById(tTask.getPatrolInspectorDept()); |
| | | taskListVO.setDeptName(tDept.getDeptName()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.mapper.TInspectorMapper; |
| | | import com.ruoyi.system.mapper.TTaskDetailMapper; |
| | | import com.ruoyi.system.mapper.TTaskMapper; |
| | | import com.ruoyi.system.model.TDept; |
| | | import com.ruoyi.system.model.TInspector; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.service.TInspectorService; |
| | | import com.ruoyi.system.vo.system.InspectorListVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TInspectorServiceImpl extends ServiceImpl<TInspectorMapper, TInspector> implements TInspectorService { |
| | | |
| | | @Autowired |
| | | private TDeptMapper deptMapper; |
| | | @Autowired |
| | | private TTaskDetailMapper taskDetailMapper; |
| | | @Autowired |
| | | private TTaskMapper taskMapper; |
| | | @Override |
| | | public PageInfo<InspectorListVO> pageList(InsepectorListQuery query) { |
| | | PageInfo<InspectorListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<InspectorListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | |
| | | List<TTaskDetail> tTaskDetails = taskDetailMapper.selectList(new LambdaQueryWrapper<TTaskDetail>() |
| | | .orderByDesc(BaseModel::getCreateTime) |
| | | .in(TTaskDetail::getHandleType, Arrays.asList(1,4))); |
| | | List<TTask> tTasks = taskMapper.selectList(null); |
| | | for (InspectorListVO taskListVO : list) { |
| | | TTask tTask = tTasks.stream().filter(e -> e.getId().equals(taskListVO.getTaskId())).findFirst().orElse(null); |
| | | if (tTask!=null){ |
| | | TDept tDept = deptMapper.selectById(tTask.getPatrolInspectorDept()); |
| | | taskListVO.setDeptName(tDept.getDeptName()); |
| | | TTaskDetail tTaskDetail = tTaskDetails.stream().filter(e -> e.getTaskId().equals(taskListVO.getId())).findFirst().orElse(null); |
| | | if (tTaskDetail!=null){ |
| | | taskListVO.setPicture(tTaskDetail.getPicture()); |
| | | taskListVO.setClearStatus(tTaskDetail.getClearStatus()); |
| | | } |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TCleanerMapper; |
| | | import com.ruoyi.system.mapper.TLocationMapper; |
| | | import com.ruoyi.system.mapper.TProjectDeptMapper; |
| | | import com.ruoyi.system.model.TCleaner; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TProjectDept; |
| | | import com.ruoyi.system.query.LocationListQuery; |
| | | import com.ruoyi.system.service.TLocationService; |
| | | import com.ruoyi.system.vo.system.LocationListVO; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Service |
| | | public class TLocationServiceImpl extends ServiceImpl<TLocationMapper, TLocation> implements TLocationService { |
| | | |
| | | @Autowired |
| | | private TProjectDeptMapper projectDeptMapper; |
| | | @Autowired |
| | | private TCleanerMapper cleanerMapper; |
| | | @Override |
| | | public PageInfo<LocationListVO> pageList(LocationListQuery query) { |
| | | PageInfo<LocationListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<LocationListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (LocationListVO locationListVO : list) { |
| | | TCleaner tCleaner = cleanerMapper.selectById(locationListVO.getLocationCleaner()); |
| | | TProjectDept tProjectDept = projectDeptMapper.selectById(tCleaner.getProjectId()); |
| | | if (!tProjectDept.getParentId().equals("0")){ |
| | | TProjectDept tProjectDept1 = projectDeptMapper.selectById(tProjectDept.getParentId()); |
| | | locationListVO.setProjectName(tProjectDept1.getProjectName()+">"+tProjectDept.getProjectName()); |
| | | }else{ |
| | | locationListVO.setProjectName(tProjectDept.getProjectName()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TLocationTypeMapper; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import com.ruoyi.system.query.LocationTypeListQuery; |
| | | import com.ruoyi.system.service.TLocationTypeService; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import com.ruoyi.system.vo.system.ProjectDeptListVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TLocationTypeServiceImpl extends ServiceImpl<TLocationTypeMapper, TLocationType> implements TLocationTypeService { |
| | | |
| | | @Override |
| | | public PageInfo<LocationTypeListVO> pageList(LocationTypeListQuery query) { |
| | | PageInfo<LocationTypeListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<LocationTypeListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.mapper.TTaskDetailMapper; |
| | | import com.ruoyi.system.mapper.TTaskMapper; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.LocationListTaskQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.service.TTaskService; |
| | | import com.ruoyi.system.vo.system.LocationListTaskVO; |
| | | import com.ruoyi.system.vo.system.LocationListVO; |
| | | import com.ruoyi.system.vo.system.LocationTypeListVO; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Array; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TTaskServiceImpl extends ServiceImpl<TTaskMapper, TTask> implements TTaskService { |
| | | |
| | | |
| | | @Autowired |
| | | private TDeptMapper deptMapper; |
| | | @Autowired |
| | | private TTaskDetailMapper taskDetailMapper; |
| | | @Override |
| | | public PageInfo<TaskListVO> pageList(TaskListQuery query) { |
| | | PageInfo<TaskListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TaskListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | |
| | | List<TTaskDetail> tTaskDetails = taskDetailMapper.selectList(new LambdaQueryWrapper<TTaskDetail>() |
| | | .orderByDesc(BaseModel::getCreateTime) |
| | | .in(TTaskDetail::getHandleType,Arrays.asList(1,4))); |
| | | |
| | | for (TaskListVO taskListVO : list) { |
| | | TDept tDept = deptMapper.selectById(taskListVO.getPatrolInspectorDept()); |
| | | taskListVO.setDeptName(tDept.getDeptName()); |
| | | TTaskDetail tTaskDetail = tTaskDetails.stream().filter(e -> e.getTaskId().equals(taskListVO.getId())).findFirst().orElse(null); |
| | | if (tTaskDetail!=null){ |
| | | taskListVO.setPicture(tTaskDetail.getPicture()); |
| | | taskListVO.setClearStatus(tTaskDetail.getClearStatus()); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.mapper.TTemplateMapper; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.query.ProjectDeptListQuery; |
| | | import com.ruoyi.system.service.TTemplateService; |
| | | import com.ruoyi.system.vo.system.LocationListTaskVO; |
| | | import com.ruoyi.system.vo.system.TemplateListVO; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TTemplateServiceImpl extends ServiceImpl<TTemplateMapper, TTemplate> implements TTemplateService { |
| | | |
| | | @Override |
| | | public PageInfo<TemplateListVO> pageList(ProjectDeptListQuery query) { |
| | | PageInfo<TemplateListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TemplateListVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "申诉记录详情VO") |
| | | public class AppealDetailVO extends TAppeal { |
| | | |
| | | @ApiModelProperty("位置") |
| | | private String locationAddress; |
| | | @ApiModelProperty("点位类型图标") |
| | | private String locationIcon; |
| | | @ApiModelProperty("点位类型名称") |
| | | private String locationName; |
| | | @ApiModelProperty("任务id") |
| | | private String taskId; |
| | | @ApiModelProperty(value = "任务名称") |
| | | @TableField("task_name") |
| | | private String taskName; |
| | | @ApiModelProperty(value = "任务编号") |
| | | @TableField("task_code") |
| | | private String taskCode; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.model.TInspector; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "申诉记录列表分页VO") |
| | | public class AppealListVO extends TAppeal { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty("巡查员名称") |
| | | private String patrolInspectorName; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty("图片 多个逗号拼接") |
| | | private String picture; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TInspector; |
| | | import com.ruoyi.system.model.TTask; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "督察任务记录列表分页VO") |
| | | public class InspectorListVO extends TInspector { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty("巡查员名称") |
| | | private String patrolInspectorName; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty("图片 多个逗号拼接") |
| | | private String picture; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TLeave; |
| | | import com.ruoyi.system.model.TLeaveAudit; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "请假记录审批流程VO") |
| | | public class LeaveAuditDetailVO extends TLeaveAudit { |
| | | @ApiModelProperty("头像") |
| | | private String avatar; |
| | | @ApiModelProperty("名称") |
| | | private String nickName; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TLeave; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "请假记录详情VO") |
| | | public class LeaveDetailVO extends TLeave { |
| | | @ApiModelProperty("部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty("请假人名称") |
| | | private String nickName; |
| | | @ApiModelProperty("电话") |
| | | private String phone; |
| | | @ApiModelProperty("请假日期") |
| | | private String leaveTime; |
| | | @ApiModelProperty("审核人名称") |
| | | private String auditName; |
| | | @ApiModelProperty("审批流程") |
| | | private List<LeaveAuditDetailVO> list; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.system.model.TLocation; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位-巡检记录列表分页VO") |
| | | public class LocationListTaskVO extends TLocation { |
| | | |
| | | @ApiModelProperty("所属项目部/部门") |
| | | private String deptName; |
| | | @ApiModelProperty("巡查员名称") |
| | | private String patrolInspectorName; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "任务状态:1未执行、2超时、3待确认、4待整改、5整改完成、6已完成") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "图片 多张逗号拼接") |
| | | private String picture; |
| | | @ApiModelProperty("点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty("任务id") |
| | | private String taskId; |
| | | @ApiModelProperty("任务类型 1日常任务 2自建任务") |
| | | private Integer taskType; |
| | | @ApiModelProperty("任务时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private LocalDateTime implementTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TLocation; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位列表分页VO") |
| | | public class LocationListVO extends TLocation { |
| | | |
| | | @ApiModelProperty("所属片区") |
| | | private String projectName; |
| | | @ApiModelProperty("保洁员名称") |
| | | private String cleanerName; |
| | | @ApiModelProperty("点位类型名称") |
| | | private String locationTypeName; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TLeave; |
| | | import com.ruoyi.system.model.TLocationType; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "点位类型列表分页VO") |
| | | public class LocationTypeListVO extends TLocationType { |
| | | |
| | | @ApiModelProperty("关联点位数") |
| | | private String locationCount; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.model.TTemplateDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务详情VO") |
| | | public class TaskDetailVO extends TTask { |
| | | |
| | | @ApiModelProperty("位置") |
| | | private String locationAddress; |
| | | @ApiModelProperty("点位类型图标") |
| | | private String locationIcon; |
| | | @ApiModelProperty("点位类型名称") |
| | | private String locationName; |
| | | @ApiModelProperty("完成情况") |
| | | private TTaskDetail taskDetail; |
| | | @ApiModelProperty("操作记录") |
| | | private List<TTaskDetail> records; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务记录列表分页VO") |
| | | public class TaskListVO extends TTask { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty("巡查员名称") |
| | | private String patrolInspectorName; |
| | | @ApiModelProperty("电话") |
| | | private String phonenumber; |
| | | @ApiModelProperty("图片 多个逗号拼接") |
| | | private String picture; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务详情-操作记录-详情VO") |
| | | public class TaskRecordDetailVO extends TTask { |
| | | |
| | | @ApiModelProperty("位置") |
| | | private String locationAddress; |
| | | @ApiModelProperty("点位类型图标") |
| | | private String locationIcon; |
| | | @ApiModelProperty("点位类型名称") |
| | | private String locationName; |
| | | @ApiModelProperty("完成情况/审核情况") |
| | | private TTaskDetail taskDetail; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TTaskDetail; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import com.ruoyi.system.model.TTemplateDetail; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务模板详情VO") |
| | | public class TemplateDetailVO extends TTemplate { |
| | | |
| | | @ApiModelProperty("周期循环计划") |
| | | private List<TTemplateDetail> list; |
| | | @ApiModelProperty("适用角色名称") |
| | | private String roleName; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo.system; |
| | | |
| | | import com.ruoyi.system.model.TProjectDept; |
| | | import com.ruoyi.system.model.TTemplate; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务模板列表分页VO") |
| | | public class TemplateListVO extends TTemplate { |
| | | |
| | | |
| | | } |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, task_id, status, appeal_content, pictures, audit_person, audit_remark, audit_time |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.AppealListVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber |
| | | from t_appeal t1 |
| | | left join t_task t5 on t5.id = t1.task_id |
| | | left join sys_user t4 on t5.patrol_inspector = t4.user_id |
| | | left join t_location t2 on t5.location_id = t2.id |
| | | left join t_location_type t3 on t2.location_type = t3.id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.patrolInspectorIds != null and query.patrolInspectorIds.size()>0"> |
| | | AND t4.user_id IN |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.taskIds != null and query.taskIds.size()>0"> |
| | | AND t1.task_id IN |
| | | <foreach collection="query.taskIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.locationIds != null and query.locationIds.size()>0"> |
| | | AND t5.location_id IN |
| | | <foreach collection="query.locationIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t5.implement_time between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, task_id, clear_status, unqualified, remark, picture, audio_url, status, audit_person, audit_time, audit_status, audit_remark |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.InspectorListVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber |
| | | from t_inspector t1 |
| | | |
| | | left join t_task t5 on t5.id = t1.task_id |
| | | left join t_location t2 on t5.location_id = t2.id |
| | | left join t_location_type t3 on t2.location_type = t3.id |
| | | left join sys_user t4 on t5.patrol_inspector = t4.user_id |
| | | |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.patrolInspectorIds != null and query.patrolInspectorIds.size()>0"> |
| | | AND t4.user_id IN |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.taskIds != null and query.taskIds.size()>0"> |
| | | AND t1.task_id IN |
| | | <foreach collection="query.taskIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.locationIds != null and query.locationIds.size()>0"> |
| | | AND t5.location_id IN |
| | | <foreach collection="query.locationIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t5.implement_time between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <if test="query.auditStatus != null"> |
| | | and t1.audit_status = #{query.auditStatus} |
| | | </if> |
| | | <if test="query.auditStatus != null"> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t1.start_time between #{startTime} and #{endTime}) |
| | | and (t1.end_time between #{startTime} and #{endTime}) |
| | | </if> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, location_code, location_name, project_id, location_leader, location_cleaner, location_type, location_address, location_lon, location_lat |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.LocationListVO"> |
| | | select t1.*,t2.name as locationTypeName,t3.cleaner_name as cleanerName from t_location t1 |
| | | left join t_location_type t2 on t1.location_type = t2.id |
| | | left join t_cleaner t3 on t1.location_cleaner = t3.id |
| | | where 1=1 |
| | | <if test="query.locationName != null and query.locationName != ''"> |
| | | and t1.location_name like concat('%', #{query.locationName}, '%') |
| | | </if> |
| | | <if test="query.locationCode != null and query.locationCode != ''"> |
| | | and t1.location_code like concat('%', #{query.locationCode}, '%') |
| | | </if> |
| | | <if test="query.locationType != null and query.locationType != ''"> |
| | | and t1.location_type = #{query.locationType} |
| | | </if> |
| | | <if test="query.projectId != null and query.projectId != ''"> |
| | | and t1.project_id = #{query.projectId} |
| | | </if> |
| | | <if test="query.locationCleaner != null and query.locationCleaner != ''"> |
| | | and t1.location_cleaner = #{query.locationCleaner} |
| | | </if> |
| | | and t1.disabled = = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, location_icon, location_name |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.LocationTypeListVO"> |
| | | select t1.*,count(t2.id) as locationCount from t_location_type t1 |
| | | left join t_location t2 on t2.location_type=t1.id |
| | | where 1=1 |
| | | <if test="query.locationName != null and query.locationName != ''"> |
| | | and t1.location_name like concat('%',#{query.locationName},'%') |
| | | </if> |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, project_id, status, cleaner_id, location_id, patrol_inspector, implement_time, task_type, patrol_inspector_dept |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.LocationListTaskVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber |
| | | from t_task t1 |
| | | left join t_location t2 on t1.location_id = t2.id |
| | | left join t_location_type t3 on t2.location_type = t3.id |
| | | left join sys_user t4 on t1.patrol_inspector = t4.user_id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.patrolInspectorIds != null and query.patrolInspectorIds.size()>0"> |
| | | AND t4.user_id IN |
| | | <foreach collection="query.patrolInspectorIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.taskIds != null and query.taskIds.size()>0"> |
| | | AND t1.id IN |
| | | <foreach collection="query.taskIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.locationIds != null and query.locationIds.size()>0"> |
| | | AND t1.location_id IN |
| | | <foreach collection="query.locationIds" separator="," item="id" open="(" close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="query.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t1.implement_time between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, create_time, update_time, create_by, update_by, disabled, template_name, remark, role_id |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.system.TemplateListVO"> |
| | | select * from |
| | | t_template |
| | | where 1=1 |
| | | <if test="query.templateName != null and query.templateName != ''"> |
| | | and template_name like concat('%',#{query.templateName},'%') |
| | | </if> |
| | | and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | |
| | | </select> |
| | | |
| | | </mapper> |