From ada9d2e3f734582a0d9ae8c00a936d8c8ed669d7 Mon Sep 17 00:00:00 2001
From: huanghongfa <18228131219@163.com>
Date: 星期五, 15 一月 2021 13:51:44 +0800
Subject: [PATCH] 微心愿详情bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java |   14 ++-
 springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java  |    3 
 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java       |  137 ++++++++++++++++++----------------
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java             |    4 +
 springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml                                                                                          |   64 ++++++++--------
 5 files changed, 121 insertions(+), 101 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml b/springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
index f9a146c..0bd600c 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
+++ b/springcloud_k8s_panzhihuazhihuishequ/.idea/workspace.xml
@@ -24,10 +24,10 @@
   <component name="ChangeListManager">
     <list default="true" id="8ba27629-3e5d-4f42-993e-d0c055bc9371" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/utlis/SFTPUtil.java" beforeDir="false" afterPath="$PROJECT_DIR$/common/src/main/java/com/panzhihua/common/utlis/SFTPUtil.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/utlis/SFTPUtil.class" beforeDir="false" afterPath="$PROJECT_DIR$/common/target/classes/com/panzhihua/common/utlis/SFTPUtil.class" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java" beforeDir="false" afterPath="$PROJECT_DIR$/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java" beforeDir="false" afterPath="$PROJECT_DIR$/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java" beforeDir="false" afterPath="$PROJECT_DIR$/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -401,7 +401,7 @@
       <workItem from="1610326930387" duration="5497000" />
       <workItem from="1610368400707" duration="771000" />
       <workItem from="1610415637750" duration="6485000" />
-      <workItem from="1610499071420" duration="47467000" />
+      <workItem from="1610499071420" duration="53444000" />
     </task>
     <servers />
   </component>
@@ -453,54 +453,54 @@
       <screen x="0" y="0" width="1536" height="824" />
     </state>
     <state x="549" y="167" key="FileChooserDialogImpl/0.0.1536.824@0.0.1536.824" timestamp="1610606590056" />
-    <state width="1031" height="544" key="GridCell.Tab.0.bottom" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.0.bottom" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.0.center" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.0.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.0.center" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.0.left" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.0.center/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.0.left" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.0.right" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.0.left/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.0.right" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.1.bottom" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.0.right/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.1.bottom" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.1.center" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.1.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.1.center" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.1.left" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.1.center/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.1.left" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.1.right" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.1.left/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.1.right" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.2.bottom" timestamp="1610676501912">
+    <state width="1031" height="544" key="GridCell.Tab.1.right/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.2.bottom" timestamp="1610686481146">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610676501912" />
-    <state width="1031" height="544" key="GridCell.Tab.2.center" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.2.bottom/0.0.1536.824@0.0.1536.824" timestamp="1610686481146" />
+    <state width="1031" height="544" key="GridCell.Tab.2.center" timestamp="1610686481146">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.2.left" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.2.center/0.0.1536.824@0.0.1536.824" timestamp="1610686481146" />
+    <state width="1031" height="544" key="GridCell.Tab.2.left" timestamp="1610686481145">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
-    <state width="1031" height="544" key="GridCell.Tab.2.right" timestamp="1610676501911">
+    <state width="1031" height="544" key="GridCell.Tab.2.left/0.0.1536.824@0.0.1536.824" timestamp="1610686481145" />
+    <state width="1031" height="544" key="GridCell.Tab.2.right" timestamp="1610686481146">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state width="1031" height="544" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1610676501911" />
+    <state width="1031" height="544" key="GridCell.Tab.2.right/0.0.1536.824@0.0.1536.824" timestamp="1610686481146" />
     <state x="299" y="67" key="Maven.ArtifactSearchDialog" timestamp="1610611848124">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
@@ -517,14 +517,14 @@
       <screen x="0" y="0" width="1536" height="824" />
     </state>
     <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.DirectoryHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1609398421992" />
-    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1609226181026">
+    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1610685985967">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1609226181026" />
-    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1610676198940">
+    <state x="93" y="93" width="1350" height="638" key="com.intellij.history.integration.ui.views.FileHistoryDialog/0.0.1536.824@0.0.1536.824" timestamp="1610685985967" />
+    <state x="468" y="42" width="766" height="782" key="find.popup" timestamp="1610689720475">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
-    <state x="468" y="42" width="766" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1610676198940" />
+    <state x="468" y="42" width="766" height="782" key="find.popup/0.0.1536.824@0.0.1536.824" timestamp="1610689720475" />
     <state width="600" height="428" key="javadoc.popup" timestamp="1610005781618">
       <screen x="0" y="0" width="1536" height="824" />
     </state>
diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
index 90b0dcf..6627f02 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityPartyBuildingApi.java
@@ -61,14 +61,15 @@
      */
     private final String UPLOAD_EXCEL = "社区党员数据导入模板.xlsx";
 
-    @ApiOperation(value = "社区所有党组织",response = PartyOrganizationVO.class)
+    @ApiOperation(value = "社区所有党组织", response = PartyOrganizationVO.class)
     @GetMapping("listpartyorganization")
     public R listPartyOrganization() {
         Long communityId = this.getCommunityId();
-        log.info("社区所有党组织社区id【{}】",communityId);
+        log.info("社区所有党组织社区id【{}】", communityId);
         return partyBuildingService.listPartyOrganization(communityId);
     }
-    @OperLog(operModul = "党员管理",operType = 1)
+
+    @OperLog(operModul = "党员管理", operType = 1)
     @ApiOperation(value = "新增党员")
     @PostMapping("addpartybuildingmember")
     public R addPartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
@@ -76,45 +77,60 @@
         partyBuildingMemberVO.setCommunityId(communityId);
         R r = partyBuildingService.addPartyBuildingMember(partyBuildingMemberVO);
         if (R.isOk(r)) {
-            R r1=userService.updateUserIsPartymember(partyBuildingMemberVO.getIdCard());
+            R r1 = userService.updateUserIsPartymember(partyBuildingMemberVO.getIdCard());
         }
         return r;
     }
 
-    @OperLog(operModul = "党员管理",operType = 2)
+    @OperLog(operModul = "党员管理", operType = 2)
     @ApiOperation(value = "编辑党员")
     @PutMapping("updatepartybuildingmember")
     public R updatePartyBuildingMember(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
         Long id = partyBuildingMemberVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("党员id不能为空");
         }
         return partyBuildingService.updatePartyBuildingMember(partyBuildingMemberVO);
     }
 
     @ApiOperation(value = "下载模板-导入党员")
-    @GetMapping(value = "downloadtemplate",headers="Accept=application/octet-stream")
-    public ResponseEntity<InputStreamResource> downloadTemplate(HttpServletResponse response, HttpServletRequest request) throws IOException, SftpException {
+    @GetMapping(value = "downloadtemplate", headers = "Accept=application/octet-stream")
+    public R downloadTemplate(HttpServletResponse response) throws IOException, SftpException {
         SFTPUtil sftp = new SFTPUtil();
         sftp.login();
         InputStream inputStream = sftp.downloadInputStream(FtpConstants.FTPFILEPATH_MUBAN, UPLOAD_EXCEL);
-        HttpHeaders headers = new HttpHeaders();
-        headers.add("Cache-Control", "no-cache, no-store, must-revalidate");
-        headers.add("Content-Disposition", String.format("attachment; filename=\"%s\"", UPLOAD_EXCEL));
-        headers.add("Pragma", "no-cache");
-        headers.add("Expires", "0");
+        // 配置文件下载
+        response.setHeader("content-type", "application/octet-stream");
+        response.setContentType("application/octet-stream");
+        // 下载文件能正常显示中文
+        response.setHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode(UPLOAD_EXCEL, "UTF-8"));
+        response.setCharacterEncoding("UTF-8");
 
-        return ResponseEntity
-                .ok()
-                .headers(headers)
-//                .contentLength(file.contentLength())
-                .contentType(MediaType.parseMediaType("application/msexcel"))
-                .body(new InputStreamResource(inputStream));
 
+        // 实现文件下载
+        byte[] buffer = new byte[1024];
+        BufferedInputStream bis = null;
+        try {
+            bis = new BufferedInputStream(inputStream);
+            OutputStream os = response.getOutputStream();
+            int i = bis.read(buffer);
+            while (i != -1) {
+                os.write(buffer, 0, i);
+                i = bis.read(buffer);
+            }
+        } catch (Exception exception) {
+            log.error("下载出错");
+            return R.fail();
+        } finally {
+            if (null != bis) {
+                bis.close();
+            }
+        }
+        return R.ok();
     }
 
     @ApiOperation(value = "上传照片")
-    @PostMapping(value = "uploadimage",consumes = "multipart/*",headers = "content-type=multipart/form-date")
+    @PostMapping(value = "uploadimage", consumes = "multipart/*", headers = "content-type=multipart/form-date")
     public R uploadImage(@RequestParam MultipartFile file, HttpServletRequest request) {
         String name = file.getOriginalFilename();
         try {
@@ -123,7 +139,7 @@
             InputStream is = file.getInputStream();
             sftp.uploadMore(FtpConstants.FTPFILEPATH_IDCARD, name, is);
             sftp.logout();
-            return R.ok(FtpConstants.HTTP_URL+"/idcard/" + name);
+            return R.ok(FtpConstants.HTTP_URL + "/idcard/" + name);
         } catch (Exception e) {
             log.error("上传照片失败【{}】", e.getMessage());
             return R.fail();
@@ -132,47 +148,45 @@
     }
 
     @ApiOperation(value = "批量新增党员导入excel")
-    @PostMapping(value = "downloadtemplate", consumes = "multipart/*",headers = "content-type=multipart/form-date")
+    @PostMapping(value = "downloadtemplate", consumes = "multipart/*", headers = "content-type=multipart/form-date")
     public R downloadTemplate(@RequestParam MultipartFile file, HttpServletRequest request) {
         String fileName = file.getOriginalFilename();  //获取文件名
-        if (!fileName.equals(UPLOAD_EXCEL)) {
-            return R.fail(400, "文件名字错误");
-        }
+        log.info("传入文件名字【{}】",fileName);
         InputStream inputStream = null;
         try {
             inputStream = file.getInputStream();//todo 导入要看数据库有无重复数据 加入社区字段 身份证字段导入重复判断
             EasyExcel.read(inputStream, PartyBuildingMemberExcelVO.class, new PartyBuildingMemberExcelListen(partyBuildingService)).sheet().doRead();
         } catch (IOException e) {
             e.printStackTrace();
-            log.error("导入模板失败【{}】",e.getMessage());
+            log.error("导入模板失败【{}】", e.getMessage());
         }
         return R.ok();
     }
 
-    @ApiOperation(value = "党员管理分页查询",response = PartyBuildingMemberVO.class)
+    @ApiOperation(value = "党员管理分页查询", response = PartyBuildingMemberVO.class)
     @PostMapping("pagepartyorganization")
     public R pagePartyOrganization(@RequestBody PagePartyOrganizationVO pagePartyOrganizationVO) {
         pagePartyOrganizationVO.setCommunityId(this.getCommunityId());
         return partyBuildingService.pagePartyOrganization(pagePartyOrganizationVO);
     }
 
-    @ApiOperation(value = "党员档案--党员活动",response = PartyBuildingActivityVO.class)
+    @ApiOperation(value = "党员档案--党员活动", response = PartyBuildingActivityVO.class)
     @PostMapping("listpartymemberactivities")
     public R listPartyMemberActivities(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) {
         return partyBuildingService.listPartyMemberActivities(partyBuildingActivityVO);
     }
 
-    @ApiOperation(value = "活动报名名单分页查询",response = PageActivityMembersVO.class)
+    @ApiOperation(value = "活动报名名单分页查询", response = PageActivityMembersVO.class)
     @PostMapping("pageactivitymembers")
     public R pageActivityMembers(@RequestBody PageActivityMembersVO pageActivityMembersVO) {
         return partyBuildingService.pageActivityMembers(pageActivityMembersVO);
     }
 
-    @ApiOperation(value = "活动详情",response = PartyBuildingActivityVO.class)
+    @ApiOperation(value = "活动详情", response = PartyBuildingActivityVO.class)
     @GetMapping("activityinfo")
     public R activityinfo(@RequestParam("id") Long id) {
         Long userId = this.getUserId();
-        return partyBuildingService.activityinfo(id,userId);
+        return partyBuildingService.activityinfo(id, userId);
     }
 
     @ApiOperation(value = "新增党员活动")
@@ -186,7 +200,7 @@
     @PutMapping("updateactivity")
     public R updateActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) {
         Long id = partyBuildingActivityVO.getId();
-        if (null==id||0==id) {//todo 修改报名人数 最低人数 0 的判断
+        if (null == id || 0 == id) {//todo 修改报名人数 最低人数 0 的判断
             return R.fail("主键不能为空");
         }
         return partyBuildingService.updateActivity(partyBuildingActivityVO);
@@ -196,7 +210,7 @@
     @PutMapping("releaseactivity")
     public R releaseActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) {
         Long id = partyBuildingActivityVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("主键不能为空");
         }
         return partyBuildingService.releaseActivity(id);
@@ -206,7 +220,7 @@
     @DeleteMapping("deleteactivity")
     public R deleteActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) {
         Long id = partyBuildingActivityVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("主键不能为空");
         }
         return partyBuildingService.deleteActivity(id);
@@ -219,22 +233,22 @@
         String cancelReason = partyBuildingActivityVO.getCancelReason();
         boolean emptycancelReason = ObjectUtils.isEmpty(cancelReason);
         boolean emptyid = ObjectUtils.isEmpty(id);
-        if (emptycancelReason||emptyid) {
+        if (emptycancelReason || emptyid) {
             return R.fail("参数不全");
         }
         R r = partyBuildingService.cancelActivity(partyBuildingActivityVO);
         if (R.isOk(r)) {
-            R r1=partyBuildingService.selectAllPartyBuildingActivityMembers(id);
+            R r1 = partyBuildingService.selectAllPartyBuildingActivityMembers(id);
             if (R.isOk(r1)) {
-                List<Long> userIds=(List<Long>)r1.getData();
+                List<Long> userIds = (List<Long>) r1.getData();
                 userIds.forEach(aLong -> {
-                    SysUserNoticeVO sysUserNoticeVO=new SysUserNoticeVO();
+                    SysUserNoticeVO sysUserNoticeVO = new SysUserNoticeVO();
                     sysUserNoticeVO.setUserId(aLong);
                     sysUserNoticeVO.setType(1);
                     sysUserNoticeVO.setTitle("活动因故取消");
                     sysUserNoticeVO.setBusinessType(2);
                     sysUserNoticeVO.setBusinessTitle(partyBuildingActivityVO.getName());
-                    sysUserNoticeVO.setBusinessContent(String.format("取消原因%s",partyBuildingActivityVO.getCancelReason()));
+                    sysUserNoticeVO.setBusinessContent(String.format("取消原因%s", partyBuildingActivityVO.getCancelReason()));
                     sysUserNoticeVO.setBusinessId(id);
                     sysUserNoticeVO.setStatus(0);
                     sysUserNoticeVO.setBusinessStatus(1);
@@ -248,38 +262,38 @@
         return r;
     }
 
-    @ApiOperation(value = "分页查询党员活动",response = PageActivityMembersVO.class)
+    @ApiOperation(value = "分页查询党员活动", response = PageActivityMembersVO.class)
     @PostMapping("pageactivity")
     public R pageActivity(@RequestBody PartyBuildingActivityVO partyBuildingActivityVO) {
-        Long CommunityId=this.getCommunityId();
+        Long CommunityId = this.getCommunityId();
         partyBuildingActivityVO.setCommunityId(CommunityId);
         return partyBuildingService.pageActivity(partyBuildingActivityVO);
     }
 
-    @ApiOperation(value = "社区下拉选择党员",response = PartyBuildingMemberVO.class)
+    @ApiOperation(value = "社区下拉选择党员", response = PartyBuildingMemberVO.class)
     @GetMapping("listpartymember")
     public R listPartyMember() {
-        Long communityId =this.getCommunityId();
+        Long communityId = this.getCommunityId();
         return partyBuildingService.listPartyMember(communityId);
     }
 
-    @ApiOperation(value = "社区下拉选择身份",response = RoleVO.class)
+    @ApiOperation(value = "社区下拉选择身份", response = RoleVO.class)
     @GetMapping("listidentity")
     public R listIdentity() {
-        Long communityId =this.getCommunityId();
+        Long communityId = this.getCommunityId();
         return userService.listIdentity(communityId);
     }
 
-    @OperLog(operModul = "党委管理",operType = 1)
+    @OperLog(operModul = "党委管理", operType = 1)
     @ApiOperation(value = "新增党委")
     @PostMapping("addpartycommittee")
     public R addPartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) {
-        Long communityId =this.getCommunityId();
+        Long communityId = this.getCommunityId();
         partyCommitteeVO.setCommunityId(communityId);
         return partyBuildingService.addPartyCommittee(partyCommitteeVO);
     }
 
-    @OperLog(operModul = "党委管理",operType = 2)
+    @OperLog(operModul = "党委管理", operType = 2)
     @ApiOperation(value = "编辑党委")
     @PutMapping("updatepartycommittee")
     public R updatePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) {
@@ -288,7 +302,7 @@
         return partyBuildingService.updatePartyCommittee(partyCommitteeVO);
     }
 
-    @OperLog(operModul = "党委管理",operType = 3)
+    @OperLog(operModul = "党委管理", operType = 3)
     @ApiOperation(value = "删除党委")
     @DeleteMapping("deletepartycommittee")
     public R deletePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) {
@@ -297,7 +311,7 @@
         return partyBuildingService.deletePartyCommittee(partyCommitteeVO);
     }
 
-    @ApiOperation(value = "分页党委查询",response = PartyCommitteeVO.class)
+    @ApiOperation(value = "分页党委查询", response = PartyCommitteeVO.class)
     @PostMapping("pagepartycommittee")
     public R pagePartyCommittee(@RequestBody PartyCommitteeVO partyCommitteeVO) {
         Long communityId = this.getCommunityId();
@@ -318,26 +332,26 @@
     @PutMapping("updatedynamic")
     public R updateYnamic(@RequestBody PartyBuildingComPbDynVO partyCommitteeVO) {
         Long id = partyCommitteeVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("动态主键不能为空");
         }
         return partyBuildingService.updateYnamic(partyCommitteeVO);
     }
 
-    @ApiOperation(value = "动态/政策文件详情",response = PartyBuildingComPbDynVO.class)
+    @ApiOperation(value = "动态/政策文件详情", response = PartyBuildingComPbDynVO.class)
     @GetMapping("infodynamic")
     public R infoYnamic(@RequestParam("id") Long id) {
         return partyBuildingService.infoYnamic(id);
     }
 
-    @ApiOperation(value = "分页查询党员动态/政策文件",response = PartyCommitteeVO.class)
+    @ApiOperation(value = "分页查询党员动态/政策文件", response = PartyCommitteeVO.class)
     @PostMapping("pagedynamic")
     public R pageYnamic(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) {
         Integer type = partyBuildingComPbDynVO.getType();
-        if (null==type||0==type) {
+        if (null == type || 0 == type) {
             return R.fail("类型不能为空");
         }
-        Long communityId=this.getCommunityId();
+        Long communityId = this.getCommunityId();
         partyBuildingComPbDynVO.setCommunityId(communityId);
         return partyBuildingService.pageYnamic(partyBuildingComPbDynVO);
     }
@@ -346,28 +360,23 @@
     @DeleteMapping("deletedynamic")
     public R deleteYnamic(@RequestBody PartyBuildingComPbDynVO partyBuildingComPbDynVO) {
         Long id = partyBuildingComPbDynVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("动态主键不能为空");
         }
         return partyBuildingService.deleteYnamic(id);
     }
 
 
-
-    @OperLog(operModul = "党员管理",operType = 3)
+    @OperLog(operModul = "党员管理", operType = 3)
     @ApiOperation(value = "删除党员")
     @DeleteMapping("deletepartybuildingmember")
-    public R deleteDynUser(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO){
+    public R deleteDynUser(@RequestBody PartyBuildingMemberVO partyBuildingMemberVO) {
         Long id = partyBuildingMemberVO.getId();
-        if (null==id||0==id) {
+        if (null == id || 0 == id) {
             return R.fail("党员主键不能为空");
         }
         return partyBuildingService.deleteDynUser(id);
     }
-
-
-
-
 
 
 }
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java
index 8858c0c..dfa2597 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActMicroWishDO.java
@@ -113,6 +113,10 @@
      */
     private String finish;
     /**
+     * 完成时间=反馈时间
+     */
+    private Date finishAt;
+    /**
      * 驳回理由
      */
     private String rejectReason;
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
index b09df46..43cba98 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActMicroWishServiceImpl.java
@@ -111,33 +111,37 @@
         String feedbackPhotoPathList = comActMicroWishVO.getFeedbackPhotoPathList();
         ComActMicroWishDO comActMicroWishDO=new ComActMicroWishDO();
         comActMicroWishDO.setId(id);
+        Date date = new Date();
 //        1 审核通过 2驳回 3分配人员 4发起活动 5反馈
         switch (type){
             case 1:
-                comActMicroWishDO.setExamineAt(new Date());
+                comActMicroWishDO.setExamineAt(date);
                 comActMicroWishDO.setStatus(2);//待分配
                 break;
             case 2:
-                comActMicroWishDO.setExamineAt(new Date());
+                comActMicroWishDO.setExamineAt(date);
                 comActMicroWishDO.setRejectReason(rejectReason);
                 comActMicroWishDO.setStatus(4);//驳回
                 break;
             case 3:
-                comActMicroWishDO.setDistributionAt(new Date());
+                comActMicroWishDO.setDistributionAt(date);
                 comActMicroWishDO.setResponsibleId(responsibleId);
                 comActMicroWishDO.setStatus(3);//进行中
                 comActMicroWishDO.setForm(1);
                 break;
             case 4:
-                comActMicroWishDO.setDistributionAt(new Date());
+                comActMicroWishDO.setDistributionAt(date);
                 comActMicroWishDO.setResponsibleId(null);
                 comActMicroWishDO.setStatus(5);//待确认
                 comActMicroWishDO.setForm(2);
                 break;
             case 5:
-                comActMicroWishDO.setFeedbackAt(new Date());
+                comActMicroWishDO.setFeedbackAt(date);
                 comActMicroWishDO.setStatus(5);//待确认
                 comActMicroWishDO.setFeedback(feedback);
+                comActMicroWishDO.setFinish(feedback);
+                comActMicroWishDO.setFinishPhotoPathList(feedbackPhotoPathList);
+                comActMicroWishDO.setFinishAt(date);
                 comActMicroWishDO.setFeedbackPhotoPathList(feedbackPhotoPathList);
                 break;
             default:
diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
index 356288d..b3216e7 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_partybuilding/src/main/java/com/panzhihua/service_dangjian/service/impl/ComPbMemberServiceImpl.java
@@ -132,6 +132,9 @@
         try {
             this.saveBatch(comPbMemberDOS);
         } catch (Exception e) {
+            if (e.getMessage().contains("unique_id_card_community_id")) {
+                throw new PartyBuildingMemberException("导入失败,身份证已经存在");
+            }
             throw new PartyBuildingMemberException("导入失败,存入数据库错误");
         }
         return R.ok();

--
Gitblit v1.7.1