| | |
| | | // todo 最终审核人还未确定 |
| | | } |
| | | } |
| | | leaveDetailVO.setList(leaveAuditDetailVOS); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | @PostMapping(value = "/audit") |
| | | public R<Boolean> audit(@RequestBody @Valid TTaskAuditDTO dto) { |
| | | dto.setAuditTime(LocalDateTime.now()); |
| | | TTask byId = taskCleanerService.getById(dto.getTaskId()); |
| | | if (dto.getAuditStatus()==2){ |
| | | dto.setHandleType(3); |
| | | // 将任务修改为待整改 |
| | | TTask byId = taskCleanerService.getById(dto.getTaskId()); |
| | | byId.setStatus(4); |
| | | taskCleanerService.updateById(byId); |
| | | }else{ |
| | | dto.setHandleType(2); |
| | | // 如果是初次审核就通过 将状态设置为已完成 |
| | | List<TTaskDetail> list = taskDetailService.lambdaQuery().eq(TTaskDetail::getTaskId, dto.getTaskId()).list(); |
| | | if (list.isEmpty()){ |
| | | byId.setStatus(6); |
| | | taskCleanerService.updateById(byId); |
| | | }else{ |
| | | byId.setStatus(5); |
| | | taskCleanerService.updateById(byId); |
| | | } |
| | | } |
| | | dto.setAuditPerson(tokenService.getLoginUser().getUserId()+""); |
| | | taskDetailService.save(dto); |
| | |
| | | public R<Boolean> auditBatch(@RequestBody @Valid TTaskAuditBatchDTO dto) { |
| | | List<TTaskDetail> tTaskDetails = new ArrayList<>(); |
| | | for (String s : dto.getTaskIds().split(",")) { |
| | | TTask byId = taskCleanerService.getById(s); |
| | | TTaskDetail tTaskDetail = new TTaskDetail(); |
| | | tTaskDetail.setTaskId(s); |
| | | tTaskDetail.setAuditTime(LocalDateTime.now()); |
| | |
| | | if (dto.getAuditStatus()==2){ |
| | | tTaskDetail.setHandleType(3); |
| | | // 将任务修改为待整改 |
| | | TTask byId = taskCleanerService.getById(tTaskDetail.getTaskId()); |
| | | byId.setStatus(4); |
| | | taskCleanerService.updateById(byId); |
| | | }else{ |
| | | tTaskDetail.setHandleType(2); |
| | | // 如果是初次审核就通过 将状态设置为已完成 |
| | | List<TTaskDetail> list = taskDetailService.lambdaQuery().eq(TTaskDetail::getTaskId, s).list(); |
| | | if (list.isEmpty()){ |
| | | byId.setStatus(6); |
| | | taskCleanerService.updateById(byId); |
| | | }else{ |
| | | byId.setStatus(5); |
| | | taskCleanerService.updateById(byId); |
| | | } |
| | | } |
| | | tTaskDetails.add(tTaskDetail); |
| | | } |
| | |
| | | LoginUserApplet loginUser = loginService.loginApplet(loginBody.getUsername(), loginBody.getPassword()); |
| | | ajax.put(Constants.TOKEN, tokenService.createTokenApplet(loginUser)); |
| | | ajax.put("userInfo",loginUser); |
| | | ajax.put("roleName",loginUser.getRoleName()); |
| | | ajax.put("deptType",loginUser.getRoleName()); |
| | | return ajax; |
| | | } |
| | | |
New file |
| | |
| | | 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.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.applet.dto.*; |
| | | import com.ruoyi.system.applet.query.AppealListQuery; |
| | | import com.ruoyi.system.applet.query.KnowledgeListUserQuery; |
| | | import com.ruoyi.system.applet.query.TaskUserListQuery; |
| | | import com.ruoyi.system.applet.vo.KnowledgeVO; |
| | | import com.ruoyi.system.applet.vo.TaskListAllVO; |
| | | import com.ruoyi.system.applet.vo.TaskUserListVO; |
| | | import com.ruoyi.system.dto.KnowledgeDTO; |
| | | import com.ruoyi.system.dto.TTaskAuditBatchDTO; |
| | | import com.ruoyi.system.dto.TTaskAuditDTO; |
| | | import com.ruoyi.system.dto.TTaskDTO; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.query.KnowledgeListQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.system.*; |
| | | import com.sun.jna.platform.win32.LMAccess; |
| | | import io.swagger.annotations.Api; |
| | | 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.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | | * 任务记录 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2025-05-28 |
| | | */ |
| | | @Api(tags = "个人中心") |
| | | @RestController |
| | | @RequestMapping("/t-user") |
| | | public class TUserController { |
| | | @Resource |
| | | private TTaskCleanService taskCleanerService; |
| | | |
| | | @Resource |
| | | private TTaskDetailService taskDetailService; |
| | | |
| | | |
| | | @Resource |
| | | private TLocationTypeService locationTypeService; |
| | | @Resource |
| | | private TLocationService locationService; |
| | | @Resource |
| | | private TProjectDeptService projectDeptService; |
| | | |
| | | @Resource |
| | | private TTaskDetailService tTaskDetailService; |
| | | @Resource |
| | | private TDeptService deptService; |
| | | @Resource |
| | | private ISysUserService sysUserService; |
| | | @Resource |
| | | private TDictDataService dictDataService; |
| | | @Resource |
| | | private TLeaveService leaveService; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private TAppealService appealService; |
| | | @Resource |
| | | private TInspectorService inspectorService; |
| | | @Resource |
| | | private TFeedbackService feedbackService; |
| | | @Resource |
| | | private TProblemEscalationService problemEscalationService; |
| | | |
| | | |
| | | @ApiOperation(value = "任务记录分页列表") |
| | | @PostMapping(value = "/taskList") |
| | | public R<PageInfo<TaskUserListVO>> pageList(@RequestBody TaskUserListQuery query) { |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | query.setUserId(userId+""); |
| | | return R.ok(taskCleanerService.pageListUser(query)); |
| | | } |
| | | |
| | | @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 = taskCleanerService.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 = taskCleanerService.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); |
| | | } |
| | | @ApiOperation(value = "申诉记录分页列表") |
| | | @PostMapping(value = "/appealList") |
| | | public R<PageInfo<AppealListVO>> pageListUser(@RequestBody AppealListQuery query) { |
| | | return R.ok(appealService.pageListUser(query)); |
| | | } |
| | | @ApiOperation(value = "详情申诉记录") |
| | | @GetMapping(value = "/appealDetail") |
| | | public R<AppealDetailVO> appealDetail(@RequestParam String id) { |
| | | AppealDetailVO appealDetailVO = new AppealDetailVO(); |
| | | TAppeal appeal = appealService.getById(id); |
| | | BeanUtils.copyProperties(appeal,appealDetailVO); |
| | | TTask byId = taskCleanerService.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.OTHER) |
| | | @ApiOperation(value = "取消申诉记录") |
| | | @GetMapping(value = "/cancelAppeal") |
| | | public R<Boolean> cancelAppeal(@RequestParam String id) { |
| | | TAppeal byId = appealService.getById(id); |
| | | byId.setStatus(4); |
| | | appealService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "获取距离最近的任务列表") |
| | | @PostMapping(value = "/listAllTask") |
| | | public R<List<TaskListAllVO>> listAllTask(@RequestBody AppealListDTO appealListDTO) { |
| | | List<TaskListAllVO> res = appealService.listAllTask(appealListDTO); |
| | | return R.ok(res); |
| | | } |
| | | @ApiOperation(value = "不合格原因列表") |
| | | @PostMapping(value = "/unqualifiedList") |
| | | public R<List<TDictData>> unqualifiedList() { |
| | | List<TDictData> list = dictDataService.list( |
| | | new LambdaQueryWrapper<TDictData>() |
| | | .eq(TDictData::getDataType,2) |
| | | ); |
| | | return R.ok(list); |
| | | } |
| | | @ApiOperation(value = "上传督察任务") |
| | | @PostMapping(value = "/addInspector") |
| | | public R<Boolean> addInspector(@RequestBody InspectorAddDTO dto) { |
| | | dto.setCommit_person(tokenService.getLoginUser().getUserId()+""); |
| | | if (dto.getClearStatus()==1){ |
| | | dto.setStatus(4); |
| | | }else{ |
| | | dto.setStatus(1); |
| | | } |
| | | inspectorService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "上传意见反馈") |
| | | @PostMapping(value = "/addFeedback") |
| | | public R<Boolean> addFeedback(@RequestBody FeedbackDTO dto) { |
| | | dto.setFeedbackPerson(tokenService.getLoginUser().getUserId()+""); |
| | | feedbackService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "上传问题上报") |
| | | @PostMapping(value = "/addProblem") |
| | | public R<Boolean> addProblem(@RequestBody ProblemDTO dto) { |
| | | dto.setEscalationId(tokenService.getLoginUser().getUserId()+""); |
| | | problemEscalationService.save(dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation(value = "问题类型列表") |
| | | @PostMapping(value = "/problemList") |
| | | public R<List<TDictData>> problemList() { |
| | | List<TDictData> list = dictDataService.list( |
| | | new LambdaQueryWrapper<TDictData>() |
| | | .eq(TDictData::getDataType,3) |
| | | ); |
| | | return R.ok(list); |
| | | } |
| | | @ApiOperation(value = "发起请假") |
| | | @PostMapping(value = "/addLeave") |
| | | public R<Boolean> addLeave(@RequestBody LeaveDTO leaveDTO) { |
| | | leaveService.save(leaveDTO); |
| | | // todo 生成审批记录 |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Resource |
| | | private TKnowledgeService knowledgeService; |
| | | |
| | | |
| | | @ApiOperation(value = "环卫知识分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public R<PageInfo<KnowledgeVO>> pageList(@RequestBody KnowledgeListUserQuery query) { |
| | | |
| | | |
| | | return R.ok( knowledgeService.pageListUser(query)); |
| | | } |
| | | |
| | | @ApiOperation(value = "详情环卫知识") |
| | | @GetMapping(value = "/detailKnowledge") |
| | | public R<TKnowledge> detailKnowledge(@RequestParam String id) { |
| | | TKnowledge byId = knowledgeService.getById(id); |
| | | int i = byId.getViews() + 1; |
| | | byId.setViews(i); |
| | | knowledgeService.updateById(byId); |
| | | return R.ok(byId); |
| | | } |
| | | } |
| | | |
| | |
| | | @TableField("dept_type") |
| | | @ApiModelProperty(value = "部门类型 1项目部 2部门") |
| | | private Integer deptType; |
| | | @TableField("code") |
| | | @ApiModelProperty(value = "编号") |
| | | private Integer code; |
| | | @TableField("templateId") |
| | | @ApiModelProperty(value = "所属任务模板id") |
| | | private String templateId; |
| | |
| | | * 登录地点 |
| | | */ |
| | | private String loginLocation; |
| | | /** |
| | | * 角色名称 |
| | | */ |
| | | private String roleName; |
| | | |
| | | /** |
| | | * 浏览器类型 |
| | |
| | | * 用户信息 |
| | | */ |
| | | private TTenantResp user; |
| | | private Integer deptType; |
| | | |
| | | |
| | | public LoginUserApplet() |
| | |
| | | import com.ruoyi.framework.manager.factory.AsyncFactory; |
| | | import com.ruoyi.framework.security.context.AuthenticationContextHolder; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import com.ruoyi.system.service.ISysRoleService; |
| | | import com.ruoyi.system.service.ISysUserService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.BeanUtils; |
| | |
| | | AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success"))); |
| | | LoginUserApplet loginUser = (LoginUserApplet) authentication.getPrincipal(); |
| | | recordLoginInfo(loginUser.getUserId()); |
| | | loginUser.setDeptType(user.getDeptType()); |
| | | // 生成token |
| | | return loginUser; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.dto; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "任务列表DTO") |
| | | public class AppealListDTO extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.dto; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.system.model.TFeedback; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "上传意见反馈DTO") |
| | | public class FeedbackDTO extends TFeedback { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.dto; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.system.model.TInspector; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "上传督察任务DTO") |
| | | public class InspectorAddDTO extends TInspector { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.dto; |
| | | |
| | | import com.ruoyi.system.model.TLeave; |
| | | import com.ruoyi.system.model.TProblemEscalation; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "发起请假DTO") |
| | | public class LeaveDTO extends TLeave { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.dto; |
| | | |
| | | import com.ruoyi.system.model.TFeedback; |
| | | import com.ruoyi.system.model.TProblemEscalation; |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "上传问题上报DTO") |
| | | public class ProblemDTO extends TProblemEscalation { |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.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 = "状态1待确认 2待整改 3整改完成 4已完成 全部不传") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private String userId; |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.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 KnowledgeListUserQuery extends BasePage { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "个人中心-任务记录分页列表query") |
| | | public class TaskUserListQuery 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 = "清洁情况 1合格2不合格 全部不传") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "当前登陆人id 前端忽略") |
| | | private String userId; |
| | | @ApiModelProperty(value = "经度") |
| | | private String lon; |
| | | @ApiModelProperty(value = "纬度") |
| | | private String lat; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.ruoyi.system.model.TTask; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | @ApiModel(value = "环卫知识列表VO") |
| | | public class KnowledgeVO { |
| | | |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "封面图") |
| | | @TableField("cover") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty(value = "标题") |
| | | @TableField("title") |
| | | private String title; |
| | | |
| | | @ApiModelProperty(value = "浏览量") |
| | | @TableField("views") |
| | | private Integer views; |
| | | |
| | | @ApiModelProperty(value = "状态 1启用 2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | private static final long serialVersionUID = 2553749188490103197L; |
| | | /** |
| | | * 新增执行 |
| | | */ |
| | | @ApiModelProperty(value = "记录创建人,前端忽略") |
| | | private String createBy; |
| | | |
| | | /** |
| | | * 新增和更新执行 |
| | | */ |
| | | @ApiModelProperty(value = "记录修改人,前端忽略") |
| | | private String updateBy; |
| | | |
| | | |
| | | @ApiModelProperty(value = "记录创建时间,前端忽略") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | /** |
| | | * 最后修改时间 |
| | | */ |
| | | @ApiModelProperty(value = "记录修改时间,前端忽略") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | private LocalDateTime updateTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TTask; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "获取任务列表VO") |
| | | public class TaskListAllVO extends TTask { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位起点地址") |
| | | private String locationAddress; |
| | | @ApiModelProperty(value = "点位经度 起点") |
| | | private String locationLon; |
| | | @ApiModelProperty(value = "点位纬度 起点") |
| | | private String locationLat; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "点位类型图标") |
| | | private String locationTypeIcon; |
| | | @ApiModelProperty(value = "状态 1未完成 2审核驳回") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "距离 单位km") |
| | | private BigDecimal distance; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.applet.vo; |
| | | |
| | | import com.ruoyi.system.model.TTask; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "个人中心-任务记录列表分页VO") |
| | | public class TaskUserListVO extends TTask { |
| | | |
| | | @ApiModelProperty(value = "点位名称") |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "点位类型图标") |
| | | private String locationTypeIcon; |
| | | @ApiModelProperty(value = "清洁情况 1合格2不合格") |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "距离 单位km") |
| | | private BigDecimal distance; |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.dto.AppealListDTO; |
| | | import com.ruoyi.system.applet.query.AppealListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskListAllVO; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | |
| | | |
| | | List<AppealListVO> pageList(@Param("query")InsepectorListQuery query,@Param("pageInfo") PageInfo<AppealListVO> pageInfo); |
| | | |
| | | List<AppealListVO> pageListUser(@Param("query")AppealListQuery query, @Param("pageInfo")PageInfo<AppealListVO> pageInfo); |
| | | |
| | | List<TaskListAllVO> listAllTask(@Param("query")AppealListDTO query, @Param("pageInfo")PageInfo<AppealListVO> pageInfo); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.query.KnowledgeListUserQuery; |
| | | import com.ruoyi.system.applet.vo.KnowledgeVO; |
| | | import com.ruoyi.system.model.TKnowledge; |
| | | import com.ruoyi.system.query.KnowledgeListQuery; |
| | | import com.ruoyi.system.vo.system.KnowledgeListVO; |
| | |
| | | public interface TKnowledgeMapper extends BaseMapper<TKnowledge> { |
| | | |
| | | List<KnowledgeListVO> pageList(@Param("query")KnowledgeListQuery query, @Param("pageInfo")PageInfo<KnowledgeListVO> pageInfo); |
| | | |
| | | List<KnowledgeVO> pageListUser(@Param("query")KnowledgeListUserQuery query, @Param("pageInfo")PageInfo<KnowledgeVO> pageInfo); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.query.TaskUserListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskUserListVO; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.query.LocationListTaskQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | |
| | | |
| | | List<TaskListVO> pageList(@Param("query")TaskListQuery query, @Param("pageInfo")PageInfo<TaskListVO> pageInfo); |
| | | |
| | | List<TaskUserListVO> pageListUser(@Param("query")TaskUserListQuery query, @Param("pageInfo")PageInfo<TaskUserListVO> pageInfo); |
| | | } |
| | |
| | | @TableField("task_id") |
| | | private String taskId; |
| | | |
| | | @ApiModelProperty(value = "状态 1待审核2通过3驳回") |
| | | @ApiModelProperty(value = "申诉人id") |
| | | @TableField("appeal_person") |
| | | private String appealPerson; |
| | | |
| | | @ApiModelProperty(value = "状态 1待审核2通过3驳回4已取消") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.domain.BaseModel; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | |
| | | @ApiModelProperty(value = "项目部名称") |
| | | @ApiModelProperty(value = "部门名称") |
| | | @TableField("dept_name") |
| | | private String deptName; |
| | | @ApiModelProperty(value = "编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "状态 1启用2禁用") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "审核备注") |
| | | @TableField("audit_remark") |
| | | private String auditRemark; |
| | | @ApiModelProperty(value = "提交人id") |
| | | @TableField("commitPerson") |
| | | private String commit_person; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("location_type") |
| | | private String locationType; |
| | | |
| | | @ApiModelProperty(value = "点位位置") |
| | | @ApiModelProperty(value = "点位位置 起点") |
| | | @TableField("location_address") |
| | | private String locationAddress; |
| | | |
| | | @ApiModelProperty(value = "点位经度") |
| | | @ApiModelProperty(value = "点位经度 起点") |
| | | @TableField("location_lon") |
| | | private String locationLon; |
| | | |
| | | @ApiModelProperty(value = "点位纬度") |
| | | @ApiModelProperty(value = "点位纬度 起点") |
| | | @TableField("location_lat") |
| | | private String locationLat; |
| | | |
| | | @ApiModelProperty(value = "点位位置 终点") |
| | | @TableField("location_address_end") |
| | | private String locationAddressEnd; |
| | | |
| | | @ApiModelProperty(value = "点位经度 终点") |
| | | @TableField("location_lon_end") |
| | | private String locationLonEnd; |
| | | |
| | | @ApiModelProperty(value = "点位纬度 终点") |
| | | @TableField("location_lat_end") |
| | | private String locationLatEnd; |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "上级id 为0表示项目部") |
| | | @TableField("parent_id") |
| | | private String parentId; |
| | | @ApiModelProperty(value = "编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "状态 1启用2禁用") |
| | | @TableField("status") |
| | |
| | | private Integer clearStatus; |
| | | @ApiModelProperty(value = "状态1待确认 2待整改 3整改完成 4已完成 全部不传") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "用户id 前端忽略") |
| | | private String userId; |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.dto.AppealListDTO; |
| | | import com.ruoyi.system.applet.query.AppealListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskListAllVO; |
| | | import com.ruoyi.system.model.TAppeal; |
| | | import com.ruoyi.system.query.InsepectorListQuery; |
| | | import com.ruoyi.system.vo.system.AppealListVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | PageInfo<AppealListVO> pageList(InsepectorListQuery query); |
| | | |
| | | |
| | | PageInfo<AppealListVO> pageListUser(AppealListQuery query); |
| | | |
| | | List<TaskListAllVO> listAllTask(AppealListDTO appealListDTO); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.query.KnowledgeListUserQuery; |
| | | import com.ruoyi.system.applet.vo.KnowledgeVO; |
| | | import com.ruoyi.system.model.TKnowledge; |
| | | import com.ruoyi.system.query.KnowledgeListQuery; |
| | | import com.ruoyi.system.vo.system.KnowledgeListVO; |
| | |
| | | public interface TKnowledgeService extends IService<TKnowledge> { |
| | | |
| | | PageInfo<KnowledgeListVO> pageList(KnowledgeListQuery query); |
| | | PageInfo<KnowledgeVO> pageListUser(KnowledgeListUserQuery query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.query.TaskUserListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskUserListVO; |
| | | import com.ruoyi.system.model.TTask; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.vo.system.TaskListVO; |
| | |
| | | |
| | | PageInfo<TaskListVO> pageList(TaskListQuery query); |
| | | |
| | | PageInfo<TaskUserListVO> pageListUser(TaskUserListQuery query); |
| | | |
| | | } |
| | |
| | | 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.applet.dto.AppealListDTO; |
| | | import com.ruoyi.system.applet.query.AppealListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskListAllVO; |
| | | import com.ruoyi.system.mapper.TAppealMapper; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.mapper.TTaskDetailMapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<AppealListVO> pageListUser(AppealListQuery query) { |
| | | PageInfo<AppealListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<AppealListVO> list = this.baseMapper.pageListUser(query,pageInfo); |
| | | for (AppealListVO taskListVO : list) { |
| | | taskListVO.setDistance(taskListVO.getDistance().divide(new BigDecimal(1000),2, RoundingMode.HALF_UP)); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public List<TaskListAllVO> listAllTask(AppealListDTO query) { |
| | | PageInfo<AppealListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TaskListAllVO> list = this.baseMapper.listAllTask(query,pageInfo); |
| | | for (TaskListAllVO taskListAllVO : list) { |
| | | taskListAllVO.setDistance(taskListAllVO.getDistance().divide(new BigDecimal(1000),2, RoundingMode.HALF_UP)); |
| | | if (taskListAllVO.getStatus()==1 || taskListAllVO.getStatus()==2 || taskListAllVO.getStatus()==3){ |
| | | taskListAllVO.setStatus(1); |
| | | }else{ |
| | | taskListAllVO.setStatus(2); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.basic.PageInfo; |
| | | import com.ruoyi.system.applet.query.KnowledgeListUserQuery; |
| | | import com.ruoyi.system.applet.vo.KnowledgeVO; |
| | | import com.ruoyi.system.mapper.TKnowledgeMapper; |
| | | import com.ruoyi.system.model.TKnowledge; |
| | | import com.ruoyi.system.query.KnowledgeListQuery; |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | @Override |
| | | public PageInfo<KnowledgeVO> pageListUser(KnowledgeListUserQuery query) { |
| | | PageInfo<KnowledgeVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<KnowledgeVO> list = this.baseMapper.pageListUser(query,pageInfo); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | 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.applet.query.TaskUserListQuery; |
| | | import com.ruoyi.system.applet.vo.TaskUserListVO; |
| | | import com.ruoyi.system.mapper.TDeptMapper; |
| | | import com.ruoyi.system.mapper.TTaskDetailMapper; |
| | | import com.ruoyi.system.mapper.TTaskMapper; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public PageInfo<TaskUserListVO> pageListUser(TaskUserListQuery query) { |
| | | PageInfo<TaskUserListVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); |
| | | List<TaskUserListVO> list = this.baseMapper.pageListUser(query,pageInfo); |
| | | for (TaskUserListVO taskUserListVO : list) { |
| | | taskUserListVO.setDistance(taskUserListVO.getDistance().divide(new BigDecimal("1000"),2, RoundingMode.HALF_UP)); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "申诉记录列表分页VO") |
| | | public class AppealListVO extends TAppeal { |
| | |
| | | private String locationName; |
| | | @ApiModelProperty(value = "点位类型名称") |
| | | private String locationTypeName; |
| | | @ApiModelProperty(value = "点位类型图标") |
| | | private String locationTypeIcon; |
| | | @ApiModelProperty(value = "部门名称") |
| | | private String deptName; |
| | | @ApiModelProperty("巡查员名称") |
| | |
| | | private String phonenumber; |
| | | @ApiModelProperty("图片 多个逗号拼接") |
| | | private String picture; |
| | | @ApiModelProperty("距离 单位km") |
| | | private BigDecimal distance; |
| | | |
| | | |
| | | } |
| | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "环卫只是列表VO") |
| | | @ApiModel(value = "环卫知识列表VO") |
| | | public class KnowledgeListVO extends TKnowledge { |
| | | |
| | | } |
| | |
| | | <result property="ifBlack" column="ifBlack" /> |
| | | <result property="districtId" column="districtId" /> |
| | | <result property="businessDeptId" column="business_dept_id" /> |
| | | <result property="roleName" column="role_name" /> |
| | | <result property="code" column="code" /> |
| | | <association property="dept" javaType="SysDept" resultMap="deptResult" /> |
| | | <collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> |
| | | </resultMap> |
| | |
| | | <sql id="selectUserVo"> |
| | | select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, u.business_dept_id, |
| | | d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status, |
| | | r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status |
| | | r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,u.code |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | |
| | | |
| | | <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, |
| | | u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u |
| | | u.create_by, u.create_time, u.remark, d.dept_name, d.leader,u.code from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | where u.del_flag = '0' |
| | | <if test="userId != null and userId != 0"> |
| | |
| | | </select> |
| | | |
| | | <select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,u.code |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | |
| | | </select> |
| | | |
| | | <select id="selectUnallocatedList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time |
| | | select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time,u.code |
| | | from sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId,u.business_dept_id AS businessDeptId, |
| | | ur.role_id AS roleId,sr.role_name AS roleName,u.deptName as deptName |
| | | ur.role_id AS roleId,sr.role_name AS roleName,u.deptName as deptName,u.code |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role sr on ur.role_id = sr.role_id |
| | |
| | | </select> |
| | | <select id="selectList" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.code, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId |
| | | from sys_user u |
| | | WHERE u.del_flag = 0 |
| | |
| | | </select> |
| | | <select id="selectListByNamePhone" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.code, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId |
| | | from sys_user u |
| | | WHERE u.del_flag = 0 |
| | |
| | | </select> |
| | | <select id="selectUserByUserNameList" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber |
| | | u.phonenumber AS phonenumber,u.code |
| | | from sys_user u |
| | | WHERE u.del_flag = 0 |
| | | <if test="names != null and names.size()>0"> |
| | |
| | | <select id="selectByPhone" resultType="com.ruoyi.common.core.domain.entity.SysUser"> |
| | | select u.user_id AS userId, u.dept_id AS deptId, u.user_name AS userName, u.nick_name AS nickName, u.email AS email, u.avatar AS avatar, |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.code |
| | | from sys_user u where u.phonenumber = #{phonenumber} and u.status = 0 and u.del_flag = 0 |
| | | </select> |
| | | <select id="getUserInfoBy" resultType="com.ruoyi.system.vo.system.UserInfoVo"> |
| | |
| | | u.phonenumber AS phonenumber, u.sex AS sex, u.status AS status, u.del_flag AS delFlag, u.login_ip AS loginIp,u.operating_time AS operatingTime,u.operating_person AS operatingPerson, |
| | | u.login_date AS loginDate, u.create_by AS createBy, u.create_time AS createTime, u.remark AS remark,u.ifBlack AS ifBlack, u.districtId AS districtId, |
| | | r.role_id AS roleId, r.role_name AS roleName, r.role_key AS roleKey, r.role_sort AS roleSort, r.data_scope AS dataScope, r.status as role_status,u.deptName as deptName, |
| | | u.business_dept_id AS businessDeptId,u.deptType,t1.template_name as templateName |
| | | u.business_dept_id AS businessDeptId,u.deptType,t1.template_name as templateName,u.code |
| | | from sys_user u |
| | | left join sys_user_role ur on u.user_id = ur.user_id |
| | | left join sys_role r on r.role_id = ur.role_id |
| | |
| | | <if test="deptId != null">deptId,</if> |
| | | <if test="deptType != null">deptType,</if> |
| | | <if test="templateId != null">templateId,</if> |
| | | create_time |
| | | )values( |
| | | <if test="code != null and code != ''">code,</if> |
| | | |
| | | create_time |
| | | |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | | <if test="deptId != null and deptId != ''">#{deptId},</if> |
| | | <if test="userName != null and userName != ''">#{userName},</if> |
| | |
| | | <if test="deptId != null">#{deptId},</if> |
| | | <if test="deptType != null">#{deptType},</if> |
| | | <if test="templateId != null">#{templateId},</if> |
| | | sysdate() |
| | | <if test="code != null and code != ''">#{code},</if> |
| | | |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | <if test="deptId != null">deptId=#{deptId},</if> |
| | | <if test="deptType != null">deptType=#{deptType},</if> |
| | | <if test="templateId != null">templateId=#{templateId},</if> |
| | | update_time = sysdate() |
| | | <if test="code != null and code != ''">code = #{code},</if> |
| | | |
| | | update_time = sysdate() |
| | | </set> |
| | | where user_id = #{userId} |
| | | </update> |
| | |
| | | <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 |
| | | t4.phonenumber as phonenumber, |
| | | t3.location_type_icon as locationTypeIcon |
| | | 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 |
| | |
| | | and (t5.implement_time between #{startTime} and #{endTime}) |
| | | </if> |
| | | </select> |
| | | <select id="pageListUser" 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, |
| | | t3.location_type_icon as locationTypeIcon, |
| | | ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | | POW( |
| | | SIN( |
| | | ( |
| | | #{query.lat} * PI() / 180 - t2.location_lat * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) + COS(#{query.lat} * PI() / 180) * COS(t2.location_lat * PI() / 180) * POW( |
| | | SIN( |
| | | ( |
| | | #{query.lon} * PI() / 180 - t2.location_lon * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) |
| | | ) |
| | | ) * 1000 |
| | | ) AS distance |
| | | |
| | | 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.status != null"> |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.userId != null and query.userId !=''"> |
| | | and t1.appeal_person = #{query.userId} |
| | | </if> |
| | | </select> |
| | | <select id="listAllTask" resultType="com.ruoyi.system.applet.vo.TaskListAllVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t2.location_address as locationAddress, |
| | | t2.location_lon as locationLon, |
| | | t2.location_lat as locationLat, |
| | | t3.location_icon as locatioTypeIcon, |
| | | t5.clear_status as clearStatus, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber, |
| | | ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | | POW( |
| | | SIN( |
| | | ( |
| | | #{query.lat} * PI() / 180 - t2.location_lat * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) + COS(#{query.lat} * PI() / 180) * COS(t2.location_lat * PI() / 180) * POW( |
| | | SIN( |
| | | ( |
| | | #{query.lon} * PI() / 180 - t2.location_lon * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) |
| | | ) |
| | | ) * 1000 |
| | | ) AS distance |
| | | 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 |
| | | LEFT JOIN (SELECT t1.* |
| | | FROM t_task_detail t1 |
| | | JOIN ( |
| | | SELECT task_id, MAX(create_time) AS max_time |
| | | FROM t_task_detail |
| | | GROUP BY task_id |
| | | ) AS t2 ON t1.task_id = t2.task_id AND t1.create_time = t2.max_time |
| | | ) t5 on t1.id = t5.task_id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | and t1.status !=5 and t1.status !=6 |
| | | order by distance asc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | order by create_time desc |
| | | </select> |
| | | <select id="pageListUser" resultType="com.ruoyi.system.applet.vo.KnowledgeVO"> |
| | | select * from t_knowledge |
| | | where 1=1 |
| | | and status = 1 |
| | | and disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | order by create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | and t1.status = #{query.status} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t1.implement_time between #{startTime} and #{endTime}) |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | | <select id="pageListUser" resultType="com.ruoyi.system.applet.vo.TaskUserListVO"> |
| | | select t1.*,t2.location_name as locationName,t3.location_name as locationTypeName, |
| | | t3.location_icon as locatioTypeIcon, |
| | | t5.clear_status as clearStatus, |
| | | t4.nick_name as patrolInspectorName, |
| | | t4.phonenumber as phonenumber, |
| | | ROUND( |
| | | 6378.138 * 2 * ASIN( |
| | | SQRT( |
| | | POW( |
| | | SIN( |
| | | ( |
| | | #{query.lat} * PI() / 180 - t2.location_lat * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) + COS(#{query.lat} * PI() / 180) * COS(t2.location_lat * PI() / 180) * POW( |
| | | SIN( |
| | | ( |
| | | #{query.lon} * PI() / 180 - t2.location_lon * PI() / 180 |
| | | ) / 2 |
| | | ), |
| | | 2 |
| | | ) |
| | | ) |
| | | ) * 1000 |
| | | ) AS distance |
| | | 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 |
| | | LEFT JOIN (SELECT t1.* |
| | | FROM t_task_detail t1 |
| | | JOIN ( |
| | | SELECT task_id, MAX(create_time) AS max_time |
| | | FROM t_task_detail |
| | | GROUP BY task_id |
| | | ) AS t2 ON t1.task_id = t2.task_id AND t1.create_time = t2.max_time |
| | | ) t5 on t1.id = t5.task_id |
| | | where 1=1 |
| | | and t1.`disabled` = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | <if test="query.clearStatus != null"> |
| | | and t2.status = #{query.clearStatus} |
| | | </if> |
| | | <if test="query.userId != null and query.userId != ''"> |
| | | and t1.patrol_inspector = #{query.userId} |
| | | </if> |
| | | <if test="query.startTime != null and startTime != ''"> |
| | | and (t1.implement_time between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | </select> |
| | | |