From 5e2d78f61bf7d1513d5d5c8cd55442133a6e898e Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 14 七月 2025 18:23:36 +0800
Subject: [PATCH] 保洁巡检本周代码

---
 ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TUserController.java |   57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 57 insertions(+), 0 deletions(-)

diff --git a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TUserController.java b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TUserController.java
index fe0ccc4..aeda7ff 100644
--- a/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TUserController.java
+++ b/ruoyi-applet/src/main/java/com/ruoyi/web/controller/api/TUserController.java
@@ -27,6 +27,7 @@
 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;
@@ -121,6 +122,8 @@
     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) {
@@ -412,6 +415,36 @@
         }
         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")
@@ -503,6 +536,12 @@
                         .eq(TDictData::getDataType, 2)
         );
         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 = "上传督察任务")
@@ -772,6 +811,17 @@
                                        }
                                        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;
                                }
 
@@ -929,6 +979,13 @@
                     }
                     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;
             }
         }

--
Gitblit v1.7.1