Эх сурвалжийг харах

Merge remote-tracking branch 'origin/dev' into dev

wangjiang988 5 жил өмнө
parent
commit
17a729b823

+ 2 - 1
src/main/java/platform/config/shiro/ShiroConfig.java

@@ -75,7 +75,8 @@ public class ShiroConfig {
         //自定义退出跳转页面
         LogoutFilter logoutFilter = new SystemLogoutFilter(logService);
         //logoutFilter.setRedirectUrl("/admin/login");
-        logoutFilter.setRedirectUrl("/home/login");
+        //logoutFilter.setRedirectUrl("/home/login");
+        logoutFilter.setRedirectUrl("/index");
         filters.put("myLogout", logoutFilter);
         filters.put("authc", new DefaultFormAuthenticationFilter(logService));
         //手机端退出登录跳转页面

+ 12 - 6
src/main/java/platform/modules/government/service/IndustrialLandSupplyDetailService.java

@@ -424,18 +424,18 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             }
             entity.setFileList(fileList);
         }
-        //汇总附件
-        attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_SUMMARY, entity.getId(), null);
-        if (null != attachments && attachments.size() > 0) {
-            FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
-            entity.setConsultation_summary_file(fileDown);
-        }
         //补充附件
         attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUPPLEMENT, entity.getId(), null);
         if (null != attachments && attachments.size() > 0) {
             FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
             entity.setSupplement_file(fileDown);
         }
+        //汇总附件
+        attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_SUMMARY, entity.getId(), null);
+        if (null != attachments && attachments.size() > 0) {
+            FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
+            entity.setConsultation_summary_file(fileDown);
+        }
         //商务局分管领导附件
         attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_LEADER, entity.getId(), null);
         if (null != attachments && attachments.size() > 0) {
@@ -759,6 +759,12 @@ public class IndustrialLandSupplyDetailService extends BaseService<IndustrialLan
             FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
             entity.setFileDown(fileDown);
         }
+        //补充附件
+        attachments = attachmentService.selectByIdAndBusinessId(Constant.Attachment.INDUSTRIAL_LAND_SUPPLY_COMMERCE_SUPPLEMENT, entity.getId(), null);
+        if (null != attachments && attachments.size() > 0) {
+            FileDown fileDown = new FileDown(attachments.get(0).getId(), attachments.get(0).getFile_name(), attachments.get(0).getFile_url(), attachments.get(0).getDownload_uri());
+            entity.setSupplement_file(fileDown);
+        }
         if (null != entity.getApprove_status()) {
             String status_name = dictionaryItemService.findNameByTypeAndValue(Constant.DictionaryType.INDUSTRIAL_LAND_SUPPLY_APPROVE_STATUS, entity.getApprove_status());
             entity.setApprove_status_desc(status_name);

+ 1 - 1
src/main/java/platform/modules/government/web/ContentController.java

@@ -326,7 +326,7 @@ public class ContentController extends BaseController {
         Content content = new Content();
         content.setId(Integer.parseInt(id));
         content.setIs_top(true);
-        contentService.updateContent(content);
+        contentService.updateSelective(content);
         return ResponseMessage.success("置顶成功");
     }
 

+ 6 - 2
src/main/java/platform/modules/home/web/HomeRefactorController.java

@@ -229,7 +229,11 @@ public class HomeRefactorController extends BaseController {
      * @return
      */
     @GetMapping("/activityDetail/{id}")
-    public Object activityDetail(@PathVariable Integer id, Integer user_id) {
+    public Object activityDetail(@PathVariable("id") Integer id, Integer user_id) {
+        if (user_id == null) {
+            User user = ShiroUtils.getUserEntity();
+            user_id = user.getId();
+        }
         ActivityDetail activityDetail = homeRefactorService.findByActivityId(id, user_id);
         activityDetail.setFile_url(setFileUrl());
         return ResponseMessage.success("查询成功", activityDetail);
@@ -719,7 +723,7 @@ public class HomeRefactorController extends BaseController {
         ModelMap modelMap = new ModelMap();
         List<Map> list = contentService.randomPic(num);
         String fileUrl = setFileUrl();
-        fileUrl.replace("/uploads","");
+        fileUrl = fileUrl.replace("/uploads", "");
         modelMap.put("fileUrl", fileUrl);
         modelMap.put("contentList", list);
         return ResponseMessage.success("success", modelMap);

+ 6 - 6
src/main/java/platform/modules/sys/web/FileUploadController.java

@@ -139,7 +139,7 @@ public class FileUploadController extends BaseController {
     }
 
     @PostMapping(value = "/docs")
-    public ResponseEntity<String> uploadDoc(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws UnsupportedEncodingException {
+    public ResponseEntity<String> uploadDoc(HttpServletRequest request, @RequestParam("file") MultipartFile file) throws IOException {
 
         if (file.isEmpty()) {
             return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("文件不能为空");
@@ -173,7 +173,7 @@ public class FileUploadController extends BaseController {
     	}else {
     		return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("上传文件错误");
     	}*/
-        try {
+//        try {
             // 写文件到磁盘
             file.transferTo(newFile);
             Attachment attachment = new Attachment();
@@ -182,10 +182,10 @@ public class FileUploadController extends BaseController {
             attachment.setDownload_uri(getFileDownloadUri());
             attachmentService.insertAndGetId(attachment);
             return ResponseEntity.status(HttpStatus.OK).body(attachment.getId().toString());
-        } catch (IOException e) {
-            log.error("上传文件错误!{}", e);
-            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("上传文件错误");
-        }
+//        } catch (IOException e) {
+//            log.error("上传文件错误!{}", e);
+//            return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR).body("上传文件错误");
+//        }
     }
 
     @PostMapping(value = "/uploadFile")

+ 2 - 2
src/main/resources/mapper/sys/ActivityFeedbackDao.xml

@@ -34,7 +34,7 @@
          from ac_activity_feedback af
          left join ac_activity_detail ad on ad .id = af.activity_id
          where
-         af.del_flag = false AND af.feedback_type != 0
+         af.del_flag = 0 <!-- AND af.feedback_type != 0 -->
          <if test="query.is_front!= null and query.is_front != ''">
              and af.approval_status = 1
          </if>
@@ -48,7 +48,7 @@
              and af.approval_status = #{query.approval_status}
          </if>
          <if test="query.activity_title != null and query.activity_title != ''">
-             and ad.activity_title = #{query.activity_title}
+             and ad.activity_title LIKE CONCAT('%',#{query.activity_title},'%')
          </if>
          ORDER BY af.create_time DESC
      </select>

+ 1 - 0
src/main/resources/mapper/sys/ActivityRegistrationDao.xml

@@ -157,6 +157,7 @@
             reg.del_flag = 0
             AND reg.activity_id = #{activityId}
             AND reg.review_state != 3
+            AND reg.review_state != 2
     </select>
 
     <select id="findMyActivityPage" parameterType="platform.modules.sys.entity.ActivityRegistration"

+ 3 - 2
src/main/resources/templates/admin/government/activity_feedback/list.html

@@ -279,8 +279,9 @@
         for(var i=0; i<list.length; i++){
             html += '<li class="clearfix" >' +
                     '<div class="comments-info">'+list[i].content+'</div>' +
-                    '<div class="activity-info">'+
-                        '<p>活动名称:'+list[i].activity_title+'</p>';
+                    '<div class="activity-info" style="float: right;">'+
+                       /* '<p>活动名称:'+list[i].activity_title+'</p>';*/
+                    '<p>'+list[i].activity_title+'</p>';
 
             if(list[i].feedback_type === 0){
             }

+ 2 - 2
src/main/resources/templates/admin/government/content_check.html

@@ -44,8 +44,8 @@
         <div class="row cl">
             <label class="form-label col-xs-4 col-sm-2"><span >置顶:</span></label>
             <div class="formControls col-xs-8 col-sm-9">
-                <span  th:if="${content.is_top }" >否</span>
-                <span  th:unless="${content.is_top}"  >是</span>
+                <span  th:unless="${content.is_top }" >否</span>
+                <span  th:if="${content.is_top}"  >是</span>
             </div>
         </div>
         <div class="row cl">