ソースを参照

业委会每日上报日历2/8

maoyunfeng 5 年 前
コミット
8109d9d259

+ 2 - 1
whepi-ui/templates/yeweihui/ribao.js

@@ -4,5 +4,6 @@ function ribao_init(tt) {
       // alert(tt.toString());
       window.location.href = "/yeweihui/ribao.html?"+tt
   });
-}
+};
+
 

+ 76 - 0
whepi-ui/templates/yeweihui/ribaohuiz.ftl

@@ -0,0 +1,76 @@
+<#assign title="业委会"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="page__bd">
+        <header class="demos-header">
+            <h1 class="demos-title">抗疫小区</h1>
+        </header>
+        <div id="rbs" class="weui-tab__bd-item ">
+                <div id="ribaohuiz"></div>
+            <div class="weui-panel weui-panel_access">
+                <table cellspacing="0" cellpadding="0" style="width: 100%">
+                    <tbody><#--border="1" cellspacing="0" cellpadding="0"-->
+                    <tr>
+                        <td style="background-color: lightgrey" align="center">注册户数</td>
+                        <td style="background-color: lightgrey" align="center">上报户数</td>
+                        <td style="background-color: lightgrey" align="center">异常户数</td>
+                    </tr>
+                    <tr id="huiz">
+                    <td align="center">8</td>
+                    <td align="center">0</td>
+                    <td align="center">0</td>
+                    </tr>
+                    </tbody>
+                </table>
+            </div>
+            <div class="weui-btn-area"  style="display: grid;">
+            <#--<p id="btnRB" class="weui-btn weui-btn_primary" href="javascript:" type="hidden">一键通知</p>-->
+                <a id="returnc" class="weui-btn weui-btn_primary" href="javascript:">生成报表</a>
+            </div>
+        </div>
+
+</div>
+<#include "/home/frag.foot.ftl" />
+<script>
+    (function ($) {
+        $(function(){
+
+            $("#ribaohuiz").calendar({
+                dateFormat: 'yyyy-mm-dd',
+                inputReadOnly: false,
+                onChange: function (p, values, displayValues) {
+                    var reportDate = values.toString();
+                    console.log(reportDate);
+                    var userId = $("#userId").val();
+                    $.ajax({
+                        url: '/home/home/queryRibaoReportDate',
+                        data: {
+                            "userCreate": userId,
+                            "reportDate": reportDate,
+                        },
+                        type: 'GET',
+                        success: function (data) {
+                            if (data.data == undefined) {
+                                $('#ribao_famliy').empty();
+                            }
+                            else {
+                                if (data.data.length > 0) {
+                                    $('#ribao_famliy').empty();
+                                    data.data.forEach(function (v) {
+                                        helpValue1(v);
+                                    });
+                                } else {
+
+                                }
+                            }
+                        },
+                        error: function () {
+                        }
+                    });
+                }
+            });
+        });
+    })(jQuery);
+
+
+</script>

+ 4 - 1
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -27,7 +27,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     @Select("select c.ridgepole as ridgepole,c.unit as unit,c.unit_id as unitId from sys_user_role a " +
             "inner join sys_owner b on b.owner_id = a.property_id and a.role_id = 2 " +
             "inner join sys_uptown_unit c on c.uptown_id = b.uptown_id " +
-            "where a.user_id = #{userId}")
+            "where a.user_id = #{userId} ORDER BY c.ridgepole asc")
     List<sysUptownUnit> selectDY(@Param("userId") Long userId);
 
 
@@ -40,4 +40,7 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "left join ms_suspected c on c.report_id = a.report_id " +
             "where b.house_id = #{houseId} and DATE_FORMAT(a.time_update,'%Y-%m-%d') = #{dateStr}")
     List<MsSuspected> selectYcXq(@Param("houseId") Long houseId, @Param("dateStr") String dateStr);
+
+    @Select("")
+    List<MsSuspected> selecthuiz(@Param("userId") Long userId);
 }

+ 5 - 0
whepi-web/src/main/java/com/bofeng/service/RbService.java

@@ -107,4 +107,9 @@ public class RbService {
 
         return sysUptownHouses;
     }
+
+    public List<MsSuspected> selecthuiz(Long userId) {
+        List<MsSuspected> huiz = rbMapper.selecthuiz(userId);
+        return huiz;
+    }
 }

+ 3 - 3
whepi-web/src/main/java/com/bofeng/wx/controller/HomeController.java

@@ -49,9 +49,9 @@ public class HomeController {
     public ModelAndView home(ModelMap model) throws JsonProcessingException {
         model.put("user", new JsonWapper("{\"www\": \"er\"}"));
         //初始化今日日报
-        UserOpen userOpen = homeService.getUserOpen();
-        Long userId = userOpen.getUserId();
-       // Long userId = 1224706869998772226L;
+//        UserOpen userOpen = homeService.getUserOpen();
+//        Long userId = userOpen.getUserId();
+        Long userId = 1224706869998772226L;
         MsReport msReport = msReportService.getReportByDateNow(userId);
         model.put("msReport", new JsonWapper(msReport));
         return new ModelAndView("/home/home.ftl", model);

+ 11 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -172,4 +172,15 @@ public class YeWeiHuiController {
         List<MsSuspected> rbList = rbService.selectYcXq(houseId);
         return Model.newSuccess(rbList);
     }
+
+    @GetMapping("/yeweihui/ribaohuiz.html")
+    public ModelAndView yeweihuiRibaohuiz(ModelMap model) {
+        return new ModelAndView("/yeweihui/ribaohuiz.ftl", model);
+    }
+
+    @GetMapping("/yeweihui/ribaohuiz")
+    public Model<List<MsSuspected>> yeweihuiRibaohuiz(Long userId) {
+        List<MsSuspected> rbList = rbService.selecthuiz(userId);
+        return Model.newSuccess(rbList);
+    }
 }