瀏覽代碼

Merge remote-tracking branch 'origin/master'

yuliang 5 年之前
父節點
當前提交
572db33632

+ 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>

+ 3 - 0
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -41,6 +41,9 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "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);
+
     @Select(
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum," +
             "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum," +

+ 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;
+    }
 }

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

@@ -48,6 +48,12 @@ public class HomeController {
     @GetMapping("/home/home.html")
     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;
+        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

@@ -182,6 +182,17 @@ public class YeWeiHuiController {
         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);
+    }
+
     @ApiOperation("导出家庭上报明细")
     @GetMapping("/yeweihui/exportRiBao")
     @SneakyThrows