| | |
| | | import com.ruoyi.system.query.KnowledgeListQuery; |
| | | import com.ruoyi.system.query.TaskListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.utils.TemplateMessageSendUtil; |
| | | import com.ruoyi.system.utils.wx.body.resp.Code2SessionRespBody; |
| | | import com.ruoyi.system.utils.wx.body.resq.Code2SessionResqBody; |
| | | import com.ruoyi.system.utils.wx.model.WeixinProperties; |
| | |
| | | private RedisService redisService; |
| | | @Resource |
| | | private MsgUtils msgUtils; |
| | | @Resource |
| | | private TemplateMessageSendUtil templateMessageSendUtil; |
| | | @ApiOperation(value = "通过code获得openid,获取用户信息",tags = {"微信小程序登录"}) |
| | | @GetMapping("/openIdByJsCode") |
| | | public R<String> openIdByJsCode(@RequestParam String code) { |
| | |
| | | } |
| | | return R.ok(taskDetailVO); |
| | | } |
| | | @ApiOperation(value = "督察任务-详情任务") |
| | | @GetMapping(value = "/detaiInspectorl") |
| | | public R<InspectorDetailVO> detaiInspectorl(@RequestParam String id) { |
| | | InspectorDetailVO taskDetailVO = new InspectorDetailVO(); |
| | | TInspector inspector = inspectorService.getById(id); |
| | | TLocation location = locationService.getById(inspector.getLocationId()); |
| | | TLocationType locationType = locationTypeService.getById(location.getLocationType()); |
| | | taskDetailVO.setLocationAddress(location.getLocationAddress()); |
| | | taskDetailVO.setLocationAddressEnd(location.getLocationAddressEnd()); |
| | | taskDetailVO.setLocationIcon(locationType.getLocationIcon()); |
| | | taskDetailVO.setLocationName(locationType.getLocationName()); |
| | | taskDetailVO.setLocationTypeName(locationType.getLocationName()); |
| | | taskDetailVO.setLocationLonEnd(location.getLocationLonEnd()); |
| | | taskDetailVO.setLocationLatEnd(location.getLocationLatEnd()); |
| | | taskDetailVO.setLocationLon(location.getLocationLon()); |
| | | taskDetailVO.setLocationLat(location.getLocationLat()); |
| | | taskDetailVO.setLocationName(location.getLocationName()); |
| | | taskDetailVO.setId(inspector.getId()); |
| | | taskDetailVO.setClearStatus(inspector.getClearStatus()); |
| | | taskDetailVO.setUnqualified(inspector.getUnqualified()); |
| | | taskDetailVO.setRemark(inspector.getAuditRemark()); |
| | | taskDetailVO.setPicture(inspector.getPicture()); |
| | | taskDetailVO.setAudioUrl(inspector.getAudioUrl()); |
| | | taskDetailVO.setStatus(inspector.getStatus()); |
| | | taskDetailVO.setAuditPerson(inspector.getAuditPerson()); |
| | | taskDetailVO.setAuditTime(inspector.getAuditTime()); |
| | | taskDetailVO.setAuditStatus(inspector.getAuditStatus()); |
| | | taskDetailVO.setAuditRemark(inspector.getAuditRemark()); |
| | | return R.ok(taskDetailVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "详情任务-操作记录-详情") |
| | | @GetMapping(value = "/detailRecord") |
| | |
| | | ); |
| | | return R.ok(list); |
| | | } |
| | | @ApiOperation(value = "点位列表") |
| | | @PostMapping(value = "/locationList") |
| | | public R<List<TLocation>> locationList() { |
| | | List<TLocation> locations = locationService.list(); |
| | | return R.ok(locations); |
| | | } |
| | | |
| | | @ApiOperation(value = "上传督察任务") |
| | | @PostMapping(value = "/addInspector") |
| | |
| | | } |
| | | inspectorService.save(dto); |
| | | return R.ok(); |
| | | |
| | | // TLocation location = locationService.getById(dto.getLocationId()); |
| | | // SysUser sysUser = sysUserService.selectUserById(Long.valueOf(location.getLocationLeader())); |
| | | // dto.setCommitPerson(tokenService.getLoginUserApplet().getUserId() + ""); |
| | | // |
| | | // if (dto.getClearStatus() == 1) { |
| | | // dto.setStatus(4); |
| | | // } else { |
| | | // dto.setStatus(1); |
| | | // |
| | | // } |
| | | // inspectorService.save(dto); |
| | | // return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "上传意见反馈") |
| | |
| | | } |
| | | break; |
| | | case 3: |
| | | if (StringUtils.hasLength(sysUser.getOpenId())){ |
| | | Date date1 = new Date(); |
| | | SimpleDateFormat simpleDateFormat1 = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| | | SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String format1 = simpleDateFormat1.format(date1); |
| | | String startTime = simpleDateFormat2.format(leaveDTO.getStartTime()); |
| | | String endTime = simpleDateFormat2.format(leaveDTO.getStartTime()); |
| | | templateMessageSendUtil.wxTemplatePendApprovalRequest(sysUser.getOpenId(), |
| | | user.getNickName(),format1,"员工请假", |
| | | startTime,endTime); |
| | | } |
| | | break; |
| | | } |
| | | |
| | |
| | | } |
| | | break; |
| | | case 3: |
| | | if (StringUtils.hasLength(sysUser.getOpenId())){ |
| | | Date date = new Date(); |
| | | SimpleDateFormat simpleDateFormat2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | String startTime1 = simpleDateFormat2.format(date); |
| | | templateMessageSendUtil.wxTemplateMakeCopyRequest(sysUser1.getOpenId(), |
| | | sysUser1.getNickName(),startTime1,"请假审批"); |
| | | } |
| | | break; |
| | | } |
| | | } |