From aad170db8e65a67d1ba34e72a21eb19d91a05373 Mon Sep 17 00:00:00 2001
From: manailin <261030956@qq.com>
Date: 星期二, 30 十一月 2021 17:26:22 +0800
Subject: [PATCH] Merge branch 'test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into test

---
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActPictureLibraryVO.java                               |   22 ++++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java |    8 
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActPictureLibrary.xml                                                    |   10 ++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActPictureLibraryApi.java                        |   37 +++++++
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java                                                  |   15 +++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActPictureLibraryServiceImpl.java       |   38 +++++++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml                                             |   32 +++---
 springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComSwPatrolRecordApi.java                                               |    4 
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActPictureLibraryDAO.java                        |   25 +++++
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java                                       |   13 ++
 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyPublicityApi.java                    |   10 +
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java                           |    8 
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActPictureLibraryService.java                |   21 ++++
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java                  |    8 
 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java                       |   44 ++++----
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java                           |    4 
 16 files changed, 242 insertions(+), 57 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComSwPatrolRecordApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComSwPatrolRecordApi.java
index 7976378..25368f7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComSwPatrolRecordApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ComSwPatrolRecordApi.java
@@ -174,7 +174,7 @@
     @ApiOperation(value = "根据日期查询值班人员")
     @GetMapping("/app/getRotaPersonByDate")
     public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return communityService.getRotaPersonByDate(rotaDate);
+        return communityService.getRotaPersonByDate(rotaDate,this.getCommunityId());
     }
 
     /**
@@ -185,7 +185,7 @@
     @ApiOperation(value = "根据日期查询值班领导")
     @GetMapping("/app/getRotaLeaderByDate")
     public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return communityService.getRotaLeaderByDate(rotaDate);
+        return communityService.getRotaLeaderByDate(rotaDate,this.getCommunityId());
     }
 
     /**
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java
new file mode 100644
index 0000000..2300053
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/enums/PresetPictureType.java
@@ -0,0 +1,15 @@
+package com.panzhihua.common.enums;
+
+/**
+ * @title: PresetPictureType
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 预设图片类型
+ * @author: hans
+ * @date: 2021/11/23 17:31
+ */
+public class PresetPictureType {
+    /**
+     * 物业宣传
+     */
+    public static Integer PROPERTY_PUBLICITY = 1;
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActPictureLibraryVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActPictureLibraryVO.java
new file mode 100644
index 0000000..c9a0d22
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActPictureLibraryVO.java
@@ -0,0 +1,22 @@
+package com.panzhihua.common.model.vos.community;
+
+import java.util.List;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * @title: ComActPictureLibraryVO
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 公共预设图库信息
+ * @author: hans
+ * @date: 2021/11/23 17:16
+ */
+@Data
+@ApiModel("公共预设图库信息")
+public class ComActPictureLibraryVO {
+
+    @ApiModelProperty("操作内容")
+    private List<String> presetPictures;
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
index 9e29c47..553e958 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -5351,7 +5351,7 @@
      * @return 查询结果
      */
     @GetMapping("/patrolRecord/rota/getRotaPersonByDate")
-    R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate);
+    R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId);
 
     /**
      * 根据日期查询值班领导
@@ -5359,7 +5359,7 @@
      * @return 查询结果
      */
     @GetMapping("/patrolRecord/rota/getRotaLeaderByDate")
-    R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate);
+    R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId);
 
     /**
      * 批量导入值班表
@@ -7272,4 +7272,13 @@
      */
     @PostMapping("/reserve/admin/homeQuarantine/export")
     R exportHomeQuarantine(@RequestBody PageReserveRegisterDetailedAdminDTO pageReserveRegisterDetailedAdminDTO);
+
+    /**
+     * 获取预设图片
+     * @param type
+     * @param subtype
+     * @return
+     */
+    @GetMapping("/picture/library/get")
+    R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype);
 }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyPublicityApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyPublicityApi.java
index 5e1f78d..afb7205 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyPublicityApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyPublicityApi.java
@@ -13,11 +13,12 @@
 import org.springframework.web.bind.annotation.RestController;
 
 import com.panzhihua.common.controller.BaseController;
+import com.panzhihua.common.enums.PresetPictureType;
 import com.panzhihua.common.model.dtos.community.ComPropertyPublicityDTO;
 import com.panzhihua.common.model.dtos.community.PageComPropertyPublicityDTO;
 import com.panzhihua.common.model.vos.LoginUserInfoVO;
 import com.panzhihua.common.model.vos.R;
-import com.panzhihua.common.model.vos.community.ComMngVillageVO;
+import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO;
 import com.panzhihua.common.model.vos.community.ComPropertyPublicityVO;
 import com.panzhihua.common.model.vos.community.ComPropertyVO;
 import com.panzhihua.common.service.community.CommunityService;
@@ -92,4 +93,11 @@
     public R listProperty(@RequestParam(value = "villageId", required = false) Long villageId) {
         return communityService.listProperty(villageId, getCommunityId());
     }
+
+    @ApiOperation(value = "获取预设图库",response = ComActPictureLibraryVO.class)
+    @GetMapping("/picture/library")
+    @ApiImplicitParam(name = "publicityType", value = "宣传类型(1.停水通知 2.停电通知 3.停气通知 4.物业公告 5.优秀业主)", required = true)
+    public R getPresetPictureLibrary(@RequestParam("publicityType") Integer publicityType) {
+        return communityService.getPresetPictureLibrary(PresetPictureType.PROPERTY_PUBLICITY, publicityType);
+    }
 }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java
index 0aedef0..2f7f4a3 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComSwPatrolRecordApi.java
@@ -431,7 +431,7 @@
     @ApiOperation(value = "根据日期查询值班人员")
     @GetMapping("/getRotaPersonByDate")
     public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return communityService.getRotaPersonByDate(rotaDate);
+        return communityService.getRotaPersonByDate(rotaDate,this.getCommunityId());
     }
 
     /**
@@ -442,7 +442,7 @@
     @ApiOperation(value = "根据日期查询值班领导")
     @GetMapping("/getRotaLeaderByDate")
     public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return communityService.getRotaLeaderByDate(rotaDate);
+        return communityService.getRotaLeaderByDate(rotaDate,this.getCommunityId());
     }
 
     /**
@@ -551,7 +551,7 @@
                     // 这里 需要指定写用哪个class去写
                     ExcelWriter excelWriter = null;
                     InputStream inputStream = null;
-                    File file0=new File("d:/safetyWork/file");
+                    File file0=new File("/mnt/data/web/file");
                     if(!file0.isDirectory()&&!file0.exists()){
                         file0.mkdirs();
                     }
@@ -559,8 +559,8 @@
                     if(!file0.isDirectory()&&!file0.exists()){
                         file0.mkdirs();
                     }
-                    sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "d:/safetyWork/file/安全工作记录.ftl");
-                    sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/safetyWork/file/blank.jpg");
+                    sftp.download("/mnt/data/web/excel/", "安全工作记录.ftl", "/mnt/data/web/file/安全工作记录.ftl");
+                    sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg");
                     try {
                         // 日期
                         if (comSwSafetyWorkRecordVO.getPatrolTime() != null) {
@@ -603,8 +603,8 @@
                         if (photo.size() != 0 && null != photo) {
                             List<Object> list=new ArrayList<>();
                             for (int i = 0; i < photo.size(); i++) {
-                                downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_find_" + i, "d:/dangerReport/file/");
-                                list.add(getImageStr("d:/dangerReport/file/" + comSwSafetyWorkRecordVO.getId() + "_find_" + i + ".jpg"));
+                                downloadPicture(photo.get(i), comSwSafetyWorkRecordVO.getId() + "_find_" + i, "/mnt/data/web/file/");
+                                list.add(getImageStr("/mnt/data/web/file/" + comSwSafetyWorkRecordVO.getId() + "_find_" + i + ".jpg"));
                             }
                             dataMap.put("imgList",list);
                         }
@@ -667,7 +667,7 @@
                         // configuration.setClassForTemplateLoading(this.getClass(), "");
 
                         // 指定路径的第二种方式,我的路径是C:/a.ftl
-                        configuration.setDirectoryForTemplateLoading(new File("d:/safetyWork/file/"));
+                        configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/"));
 
                         // 输出文档路径及名称
                         // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() +
@@ -741,7 +741,7 @@
                     // 这里 需要指定写用哪个class去写
                     ExcelWriter excelWriter = null;
                     InputStream inputStream = null;
-                    File file0=new File("d:/patrolRecord/file");
+                    File file0=new File("/mnt/data/web/file");
                     if(!file0.isDirectory()&&!file0.exists()){
                         file0.mkdirs();
                     }
@@ -749,8 +749,8 @@
                     if(!file0.isDirectory()&&!file0.exists()){
                         file0.mkdirs();
                     }
-                    sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "d:/patrolRecord/file/巡查记录.ftl");
-                    sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/patrolRecord/file/blank.jpg");
+                    sftp.download("/mnt/data/web/excel/", "巡查记录.ftl", "/mnt/data/web/file/巡查记录.ftl");
+                    sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg");
                     try {
                         // 日期
                         if (comSwPatrolRecordVO.getPatrolTime() != null) {
@@ -793,8 +793,8 @@
                         if (photo.size() != 0 && null != photo) {
                             List<Object> list=new ArrayList<>();
                             for (int i = 0; i < photo.size(); i++) {
-                                downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_find_" + i, "d:/dangerReport/file/");
-                                list.add(getImageStr("d:/dangerReport/file/" + comSwPatrolRecordVO.getId() + "_find_" + i + ".jpg"));
+                                downloadPicture(photo.get(i), comSwPatrolRecordVO.getId() + "_find_" + i, "/mnt/data/web/file/");
+                                list.add(getImageStr("/mnt/data/web/file/" + comSwPatrolRecordVO.getId() + "_find_" + i + ".jpg"));
                             }
                             dataMap.put("imgList",list);
                         }
@@ -868,7 +868,7 @@
                         // configuration.setClassForTemplateLoading(this.getClass(), "");
 
                         // 指定路径的第二种方式,我的路径是C:/a.ftl
-                        configuration.setDirectoryForTemplateLoading(new File("d:/patrolRecord/file/"));
+                        configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/"));
 
                         // 输出文档路径及名称
                         // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() +
@@ -942,7 +942,7 @@
                 // 这里 需要指定写用哪个class去写
                 ExcelWriter excelWriter = null;
                 InputStream inputStream = null;
-                File file0=new File("d:/dangerReport/file");
+                File file0=new File("/mnt/data/web/file");
                 if(!file0.isDirectory()&&!file0.exists()){
                     file0.mkdirs();
                 }
@@ -950,8 +950,8 @@
                 if(!file0.isDirectory()&&!file0.exists()){
                     file0.mkdirs();
                 }
-                sftp.download("/mnt/data/web/excel/", "隐患报告.ftl", "d:/dangerReport/file/隐患报告.ftl");
-                sftp.download("/mnt/data/web/excel/", "blank.jpg", "d:/dangerReport/file/blank.jpg");
+                sftp.download("/mnt/data/web/excel/", "隐患报告.ftl", "/mnt/data/web/file/隐患报告.ftl");
+                sftp.download("/mnt/data/web/excel/", "blank.jpg", "/mnt/data/web/file/blank.jpg");
                 try {
                     // 日期
                     if (StringUtils.isNotEmpty(comSwDangerReportVO.getCheckTime())) {
@@ -1027,8 +1027,8 @@
                     if (photo1.size() != 0 && null != photo1) {
                         List<Object> list=new ArrayList<>();
                         for (int i = 0; i < photo1.size(); i++) {
-                            downloadPicture(photo1.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/");
-                            list.add(getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg"));
+                            downloadPicture(photo1.get(i), comSwDangerReportVO.getId() + "_step_" + i, "/mnt/data/web/file/");
+                            list.add(getImageStr("/mnt/data/web/file/" + comSwDangerReportVO.getId() + "_step_" + i + ".jpg"));
                         }
                         dataMap.put("imgList",list);
                     }
@@ -1076,8 +1076,8 @@
                     if (photo2.size() != 0 && null != photo2) {
                         List<Object> list=new ArrayList<>();
                         for (int i = 0; i < photo2.size(); i++) {
-                                downloadPicture(photo2.get(i), comSwDangerReportVO.getId() + "_find_" + i, "d:/dangerReport/file/");
-                                list.add(getImageStr("d:/dangerReport/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg"));
+                                downloadPicture(photo2.get(i), comSwDangerReportVO.getId() + "_find_" + i, "/mnt/data/web/file/");
+                                list.add(getImageStr("/mnt/data/web/file/" + comSwDangerReportVO.getId() + "_find_" + i + ".jpg"));
                         }
                         dataMap.put("imgList2",list);
                     }
@@ -1131,7 +1131,7 @@
                     // configuration.setClassForTemplateLoading(this.getClass(), "");
 
                     // 指定路径的第二种方式,我的路径是C:/a.ftl
-                    configuration.setDirectoryForTemplateLoading(new File("d:/dangerReport/file/"));
+                    configuration.setDirectoryForTemplateLoading(new File("/mnt/data/web/file/"));
 
                     // 输出文档路径及名称
                     // File outFile = new File("mnt/data/web/excel/安全工作记录_" + comSwSafetyWorkRecordVO.getId() +
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActPictureLibraryApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActPictureLibraryApi.java
new file mode 100644
index 0000000..b3e782f
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActPictureLibraryApi.java
@@ -0,0 +1,37 @@
+package com.panzhihua.service_community.api;
+
+import javax.annotation.Resource;
+
+import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_community.service.ComActPictureLibraryService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.panzhihua.common.service.community.CommunityService;
+
+import lombok.extern.slf4j.Slf4j;
+
+/**
+ * @title: ComActPictureLibraryApi
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 公共图库
+ * @author: hans
+ * @date: 2021/11/23 16:54
+ */
+@Slf4j
+@RestController
+@RequestMapping("/picture/library")
+public class ComActPictureLibraryApi {
+
+    @Resource
+    private ComActPictureLibraryService comActPictureLibraryService;
+
+    @GetMapping("/get")
+    @ApiOperation("获取预设图库")
+    public R getPresetPictureLibrary(@RequestParam("type") Integer type, @RequestParam("subtype") Integer subtype) {
+        return comActPictureLibraryService.getPresetPictureLibrary(type, subtype);
+    }
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java
index f50f731..3e74c46 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSwPatrolRecordApi.java
@@ -288,8 +288,8 @@
      * @return 查询结果
      */
     @GetMapping("/rota/getRotaPersonByDate")
-    public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return comSwRotaService.getRotaPersonByDate(rotaDate);
+    public R getRotaPersonByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId) {
+        return comSwRotaService.getRotaPersonByDate(rotaDate,communityId);
     }
 
     /**
@@ -298,8 +298,8 @@
      * @return 查询结果
      */
     @GetMapping("/rota/getRotaLeaderByDate")
-    public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate) {
-        return comSwRotaService.getRotaLeaderByDate(rotaDate);
+    public R getRotaLeaderByDate(@RequestParam(value = "rotaDate") String rotaDate,@RequestParam("communityId")Long communityId) {
+        return comSwRotaService.getRotaLeaderByDate(rotaDate,communityId);
     }
 
     /**
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActPictureLibraryDAO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActPictureLibraryDAO.java
new file mode 100644
index 0000000..e04937d
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActPictureLibraryDAO.java
@@ -0,0 +1,25 @@
+package com.panzhihua.service_community.dao;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * @title: ComActPictureLibraryDAO
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 图库预设mapper
+ * @author: hans
+ * @date: 2021/11/23 17:05
+ */
+@Mapper
+public interface ComActPictureLibraryDAO {
+
+    /**
+     * 获取预设图库
+     * @param type
+     * @param subtype
+     * @return
+     */
+    List<String> getPresetPictureLibrary(@Param("type") Integer type, @Param("subtype") Integer subtype);
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActPictureLibraryService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActPictureLibraryService.java
new file mode 100644
index 0000000..fd17ac3
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActPictureLibraryService.java
@@ -0,0 +1,21 @@
+package com.panzhihua.service_community.service;
+
+import com.panzhihua.common.model.vos.R;
+
+/**
+ * @title: ComActPictureLibraryService
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 公共预设图库服务类
+ * @author: hans
+ * @date: 2021/11/23 17:01
+ */
+public interface ComActPictureLibraryService {
+
+    /**
+     * 获取预设图库
+     * @param type
+     * @param subtype
+     * @return
+     */
+    R getPresetPictureLibrary(Integer type, Integer subtype);
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java
index 56e9a3e..1c78bc7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSwRotaService.java
@@ -57,14 +57,14 @@
      * 
      * @return 查询结果
      */
-    R getRotaPersonByDate(String rotaDate);
+    R getRotaPersonByDate(String rotaDate,Long communityId);
 
     /**
      * 查询当天值班领导
      * 
      * @return 查询结果
      */
-    R getRotaLeaderByDate(String rotaDate);
+    R getRotaLeaderByDate(String rotaDate,Long communityId);
 
     /**
      * 选择人员
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActPictureLibraryServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActPictureLibraryServiceImpl.java
new file mode 100644
index 0000000..c1a5bfc
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActPictureLibraryServiceImpl.java
@@ -0,0 +1,38 @@
+package com.panzhihua.service_community.service.impl;
+
+import javax.annotation.Resource;
+
+import com.panzhihua.common.model.vos.community.ComActPictureLibraryVO;
+import org.springframework.stereotype.Service;
+
+import com.panzhihua.common.model.vos.R;
+import com.panzhihua.service_community.dao.ComActPictureLibraryDAO;
+import com.panzhihua.service_community.service.ComActPictureLibraryService;
+
+/**
+ * @title: ComActPictureLibraryServiceImpl
+ * @projectName: 成都呐喊信息技术有限公司-智慧社区项目
+ * @description: 公共预设图库服务实现类
+ * @author: hans
+ * @date: 2021/11/23 17:03
+ */
+@Service
+public class ComActPictureLibraryServiceImpl implements ComActPictureLibraryService {
+
+    @Resource
+    private ComActPictureLibraryDAO comActPictureLibraryDAO;
+
+
+    /**
+     * 获取预设图库
+     * @param type
+     * @param subtype
+     * @return
+     */
+    @Override
+    public R getPresetPictureLibrary(Integer type, Integer subtype) {
+        ComActPictureLibraryVO libraryVO = new ComActPictureLibraryVO();
+        libraryVO.setPresetPictures(comActPictureLibraryDAO.getPresetPictureLibrary(type, subtype));
+        return R.ok(libraryVO);
+    }
+}
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
index feeea55..15eb630 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActReserveAnswerContentServiceImpl.java
@@ -153,7 +153,7 @@
                 statisticsList.forEach(e -> {
                     String reserveSubContent = e.getReserveSubContent();
                     String dateString = dateFormat.format(e.getCreateAt());
-                    if (reserveSubContent.contains("上午体温")) {
+                    if (reserveSubContent.contains("今日上午体温(℃)")) {
                         int index = conditions.indexOf(dateString + " " + "上午体温");
                         if (index == -1) {
                             conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n");
@@ -161,7 +161,7 @@
                             conditions.replace(index, conditions.indexOf("℃", index),
                                     dateString + " " + "上午体温:" + e.getAnswerContent());
                         }
-                    } else if (reserveSubContent.contains("下午体温")) {
+                    } else if (reserveSubContent.contains("今日下午体温(℃)")) {
                         int index = conditions.indexOf(dateString + " " + "下午体温");
                         if (index == -1) {
                             conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n");
@@ -242,7 +242,7 @@
                 statisticsList.forEach(e -> {
                     String reserveSubContent = e.getReserveSubContent();
                     String dateString = dateFormat.format(e.getCreateAt());
-                    if (reserveSubContent.contains("上午体温")) {
+                    if (reserveSubContent.contains("今日上午体温(℃)")) {
                         int index = conditions.indexOf(dateString + " " + "上午体温");
                         if (index == -1) {
                             conditions.append(dateString + " " + "上午体温:" + e.getAnswerContent() + "℃" + "\n");
@@ -250,7 +250,7 @@
                             conditions.replace(index, conditions.indexOf("℃", index),
                                     dateString + " " + "上午体温:" + e.getAnswerContent());
                         }
-                    } else if (reserveSubContent.contains("下午体温")) {
+                    } else if (reserveSubContent.contains("今日下午体温(℃)")) {
                         int index = conditions.indexOf(dateString + " " + "下午体温");
                         if (index == -1) {
                             conditions.append(dateString + " " + "下午体温:" + e.getAnswerContent() + "℃" + "\n");
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
index d4e8c12..e043486 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSwRotaServiceImpl.java
@@ -215,11 +215,11 @@
     }
 
     @Override
-    public R getRotaPersonByDate(String rotaDate) {
+    public R getRotaPersonByDate(String rotaDate,Long communityId) {
         ComSwRotaDO comSwRotaDO = new ComSwRotaDO();
         try {
             comSwRotaDO = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda().eq(ComSwRotaDO::getRotaDate,
-                new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)));
+                new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)).eq(ComSwRotaDO::getCommunityId,communityId));
         } catch (ParseException e) {
             e.printStackTrace();
         }
@@ -246,11 +246,11 @@
     }
 
     @Override
-    public R getRotaLeaderByDate(String rotaDate) {
+    public R getRotaLeaderByDate(String rotaDate,Long communityId) {
         ComSwRotaDO comSwRotaDO = new ComSwRotaDO();
         try {
             comSwRotaDO = comSwRotaDAO.selectOne(new QueryWrapper<ComSwRotaDO>().lambda().eq(ComSwRotaDO::getRotaDate,
-                new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)));
+                new SimpleDateFormat("yyyy-MM-dd").parse(rotaDate)).eq(ComSwRotaDO::getCommunityId,communityId));
         } catch (ParseException e) {
             e.printStackTrace();
         }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActPictureLibrary.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActPictureLibrary.xml
new file mode 100644
index 0000000..4c1f814
--- /dev/null
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActPictureLibrary.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.panzhihua.service_community.dao.ComActPictureLibraryDAO">
+
+    <select id="getPresetPictureLibrary" resultType="java.lang.String">
+        SELECT upload_picture FROM com_act_picture_library t1
+        LEFT JOIN com_act_library_type t2 ON t1.library_type_id = t2.id
+        WHERE t2.type = #{type} AND t2.subtype = #{subtype}
+    </select>
+</mapper>
\ No newline at end of file
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml
index 3a4b4be..f831edf 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSwSafetyWorkRecordMapper.xml
@@ -62,22 +62,22 @@
 
     <select id="patrolRecordStatistics" resultType="com.panzhihua.common.model.vos.community.ComSwPatrolRecordStatisticsVO">
         select count(id) as patrolRecordTotal
-             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','1','%')) as huoTotal
-             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','2','%')) as xunTotal
-             ,(select count(id) from com_sw_patrol_record where community_id = #{communityId} and patrol_type LIKE concat('%','3','%')) as yiTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as safetyWorkTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId}) as dangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and status = '3') as handledDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%')) as huoDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%')) as xunDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%')) as yiDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal
-             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where t.community_id = #{communityId} and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal
-        from com_sw_patrol_record as cmp where community_id = #{communityId}
+             ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and  community_id = #{communityId} </if> and patrol_type LIKE concat('%','1','%')) as huoTotal
+             ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and  community_id = #{communityId} </if> and patrol_type LIKE concat('%','2','%')) as xunTotal
+             ,(select count(id) from com_sw_patrol_record where 1=1 <if test="communityId !=null and communityId !=0"> and  community_id = #{communityId} </if> and patrol_type LIKE concat('%','3','%')) as yiTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_safety_work_record t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if>) as safetyWorkTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if>) as dangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and status = '3') as handledDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%')) as huoDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%')) as xunDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%')) as yiDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%') and status = '3' ) as huoHandledDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','1','%') and status in ('1','2')) as huoHandlingDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%') and status = '3' ) as xunHandledDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','2','%') and status in ('1','2')) as xunHandlingDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%') and status = '3' ) as yiHandledDangerTotal
+             ,(select count(t2.id) from com_sw_patrol_record t INNER JOIN com_sw_patrol_record_report t1  on t.id = t1.patrol_record_id INNER JOIN com_sw_danger_report t2 on t1.report_id = t2.id where 1=1 <if test="communityId !=null and communityId !=0"> and  t.community_id = #{communityId} </if> and danger_type like CONCAT('%','3','%') and status in ('1','2')) as yiHandlingDangerTotal
+        from com_sw_patrol_record as cmp where 1=1 <if test="communityId !=null and communityId !=0"> and  community_id = #{communityId} </if>
     </select>
 
 </mapper>
\ No newline at end of file

--
Gitblit v1.7.1