Ver código fonte

Merge remote-tracking branch 'origin/master'

Longlin 5 anos atrás
pai
commit
86744396e8
29 arquivos alterados com 922 adições e 1105 exclusões
  1. 5 5
      whepi-ui/templates/home/frag.head.ftl
  2. 7 4
      whepi-ui/templates/home/home.ftl
  3. 7 4
      whepi-ui/templates/home/qiuzhu.ftl
  4. 1 1
      whepi-ui/templates/home/ribao.ftl
  5. 16 17
      whepi-ui/templates/home/ribao.js
  6. 7 110
      whepi-ui/templates/shop/home.ftl
  7. 6 299
      whepi-ui/templates/shop/qiuzhu.ftl
  8. 0 54
      whepi-ui/templates/shop/qiuzhu.js
  9. 11 507
      whepi-ui/templates/shop/shangpin.ftl
  10. 10 64
      whepi-ui/templates/shop/shangpin.js
  11. 228 10
      whepi-ui/templates/user/home.ftl
  12. 9 1
      whepi-ui/templates/yeweihui/home.ftl
  13. 8 1
      whepi-ui/templates/yeweihui/ribaohuiz.ftl
  14. 1 2
      whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java
  15. 31 0
      whepi-web/src/main/java/com/bofeng/dao/RbMapper.java
  16. 1 2
      whepi-web/src/main/java/com/bofeng/dao/UptownHouseMapper.java
  17. 27 6
      whepi-web/src/main/java/com/bofeng/entity/ExcelRiBao.java
  18. 5 1
      whepi-web/src/main/java/com/bofeng/entity/MsReport.java
  19. 22 7
      whepi-web/src/main/java/com/bofeng/entity/MsSuspected.java
  20. 1 0
      whepi-web/src/main/java/com/bofeng/entity/QzTaskReply.java
  21. 2 3
      whepi-web/src/main/java/com/bofeng/entity/UptownHouse.java
  22. 6 5
      whepi-web/src/main/java/com/bofeng/entity/UptownUnit.java
  23. 1 0
      whepi-web/src/main/java/com/bofeng/service/RbService.java
  24. 341 0
      whepi-web/src/main/java/com/bofeng/service/RiBaoService.java
  25. 160 0
      whepi-web/src/main/java/com/bofeng/wx/controller/RiBaoController.java
  26. 1 1
      whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java
  27. 1 0
      whepi-web/src/main/resources/mapper/MsReport.xml
  28. 1 1
      whepi-web/src/main/resources/mapper/QzTaskReplyDao.xml
  29. 6 0
      whepi-web/src/main/resources/mapper/UptownHouseMapper.xml

+ 5 - 5
whepi-ui/templates/home/frag.head.ftl

@@ -30,19 +30,19 @@
         .user-title {
             text-align: center;
             font-size: 18px;
-            color: #999999;
+            color: #000000;
             font-weight: 900;
             margin: 0 15%;
         }
         .user-hr {
             align: center;
             width: 100%;
-            color: #999999;
+            color: #000000;
             size: 5px;
         }
 
         .user-font {
-            color: #999999;
+            color: #000000;
         }
         .user-div-msg {
             display: inline-block;
@@ -57,11 +57,11 @@
         }
         .leftdiv{
             float: left;
-            width: 45%;
+            width: 40%;
         }
         .rightdiv{
             float: right;
-            width: 45%;
+            width: 50%;
         }
         .centerdiv{
             float: left;

+ 7 - 4
whepi-ui/templates/home/home.ftl

@@ -137,10 +137,13 @@
                     console.log(data);
                     if (data.data.length > 0) {
                         hasData = true;
-                        $('#qzHS').append($('<div>' + data.data[0].taskTitle + '</div>'))
-                        data.data.forEach(function (v) {
-                            shValue(v);
-                        });
+                        $('#qzHS').append($('<div>' + data.data[0].taskTitle + '</div>\n' + '<div class="weui-cell ">\n' + '<div class="weui-cell__bd">\n'
+                                + '<textarea class="weui-textarea" rows="1" readonly />' + data.data[0].remark + '</div>'));
+                        if (data.data[0].nickName!=null) {
+                            data.data.forEach(function (v) {
+                                shValue(v);
+                            });
+                        }
                     } else {
 
                     }

+ 7 - 4
whepi-ui/templates/home/qiuzhu.ftl

@@ -337,10 +337,13 @@
                     }
 
                     if (data.data.length > 0) {
-                        $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>'))
-                        data.data.forEach(function (v) {
-                            shValuenat2(v);
-                        });
+                        $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>\n'+'<div class="weui-cell ">\n'+'<div class="weui-cell__bd">\n'
+                                +data.data[0].remark+'</div>'));
+                        if(data.data[0].nickName!=null){
+                            data.data.forEach(function (v) {
+                                shValuenat2(v);
+                            });
+                        }
                     } else {
 
                     }

+ 1 - 1
whepi-ui/templates/home/ribao.ftl

@@ -74,7 +74,7 @@
                         <input id="js_input_user_jirou" class="weui-input" autofocus="" type="text" placeholder="请选择" maxlength="20" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 40%;">呼吸困难</div>
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 40%;">呼吸</div>
                         <input id="js_input_user_huxi" class="weui-input" autofocus="" type="text" placeholder="请选择" maxlength="20" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">

+ 16 - 17
whepi-ui/templates/home/ribao.js

@@ -52,9 +52,6 @@ function ribao_init() {
       {
         title: "妊娠期",
         value: "7",
-      }, {
-        title: "其他",
-        value: "8",
       }]
   });
 
@@ -285,6 +282,8 @@ function ribao_cell(v) {
   var singleRoom = "";
   if (v.singleRoom != 0)
     singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+  if (v.singleRoom == 0 && v.medical != 0)
+    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
   var temperature = "体温:" + v.temperature + ";";
   var cough = "";
   if (v.cough != 0)
@@ -383,14 +382,14 @@ function ribaoCommit() {
     alert("请填写姓名");
     return;
   }
-  if (age == undefined || age == '') {
-    alert("请填写年龄");
-    return;
-  }
   if (grender == 0) {
     alert("请填写性别");
     return;
   }
+  if (age == undefined || age == '') {
+    alert("请填写年龄");
+    return;
+  }
   if (age > 150 || age < 0) {
     alert("请填写正确的年龄");
     return;
@@ -578,29 +577,31 @@ function helpValue1(v) {
     familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
   var medical = "";
   if (v.medical != 0)
-      medical = "是否确诊:" + getMedical(v.medical) + ";";
+    medical = "是否确诊:" + getMedical(v.medical) + ";";
   var singleRoom = "";
   if (v.singleRoom != 0)
-      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
+  if (v.singleRoom == 0 && v.medical != 0)
+    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
   var temperature = "体温:" + v.temperature + ";";
   var cough = "";
   if (v.cough != 0)
-      cough = "咳嗽:" + getCough(v.cough) + ";";
+    cough = "咳嗽:" + getCough(v.cough) + ";";
   var muscle = "";
   if (v.muscle != 0)
-      muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
+    muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
   var dyspnea = "";
   if (v.dyspnea != 0)
-       dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
+    dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
   var fatigue = "";
   if (v.fatigue != 0)
-      fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
+    fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
   var diarrhea = "";
   if (v.diarrhea != 0)
-      diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
+    diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
   var others = "";
   if (v.others != "")
-      others = "其他:" + v.others;
+    others = "其他:" + v.others;
   $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text" style="height: 12vh">\n' +
     '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '</h4>\n' +
     '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + '</p>\n' +
@@ -634,8 +635,6 @@ function getFamilyStatus(familyStatus) {
     return "服用过激素药物";
   else if (familyStatus == 7)
     return "妊娠期";
-  else if (familyStatus == 8)
-    return "其他";
   return "";
 }
 

+ 7 - 110
whepi-ui/templates/shop/home.ftl

@@ -5,13 +5,12 @@
     <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
     <div class="weui-tab__bd">
         <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
-            <#include "/shop/qiuzhu.ftl" /></div>
+            <#include "/shop/qiuzhu.ftl" />
+        </div>
         <div id="tab2" class="weui-tab__bd-item">
-            <#include "/shop/shangpin.ftl" /></div>
-    <#--<div id="tab3" class="weui-tab__bd-item">-->
-    <#--<h1>页面三</h1> </div>-->
-    <#--<div id="tab4" class="weui-tab__bd-item">-->
-    <#--<h1>页面四</h1> </div>-->
+            <#include "/shop/shangpin.ftl" />
+        </div>
+
     </div>
     <div class="weui-tabbar">
         <a href="#tab1" class="weui-tabbar__item weui-bar__item--on">
@@ -20,16 +19,8 @@
         </a>
         <a href="#tab2" class="weui-tabbar__item">
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
-            <p class="weui-tabbar__label" onclick="familyClick()">我的商品</p>
+            <p class="weui-tabbar__label" onclick="shangpin_init()">我的商品</p>
         </a>
-    <#--<a href="#tab3" class="weui-tabbar__item">-->
-    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_article.png" alt=""> </div>-->
-    <#--<p class="weui-tabbar__label">发现</p>-->
-    <#--</a>-->
-    <#--<a href="#tab4" class="weui-tabbar__item">-->
-    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_cell.png" alt=""> </div>-->
-    <#--<p class="weui-tabbar__label">我</p>-->
-    <#--</a>-->
     </div>
 </div>
 
@@ -54,102 +45,8 @@
             });
         });
 
-
-        ribao_init();
-        qiuzhu_init();
-        family_init();
-        ribao_add();
-        ribao_cancel();
-        ribao_commit();
-        submit_back();
-        familyClick();
-
-        $(function () {
-            $("#ground").bind("click", function () {
-                if ($("#Gj").val() == "off") {
-                    $("#Gj").val("on");
-                    console.log("关闭查看所有");
-                    qzMy_help(1);
-                } else {
-                    $("#Gj").val("off");
-                    console.log("查看已解决的");
-                    qzMy_help(2);
-                }
-            });
-        });
+        shangpin_init();
     })(jQuery);
 
 
-    //小区求助信息的展示
-    function familyClick() {
-        $('#notitle').empty();//清除节点
-        $.ajax({
-            url: '/home/home/queryQzTask',
-            // data: {},
-            data: {taskStatus: 1,userId: $('#userId').val()},
-            type: 'GET',
-            success: function (data) {
-                console.log(data);
-                if (data.data.length > 0) {
-                    hasData = true;
-                    data.data.forEach(function (v) {
-                        familyValue(v);
-                    });
-                } else {
-
-                }
-            },
-            error: function () {
-            }
-        });
-    }
-
-    function familyValue(v) {
-        $('#notitle').append($('<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" ' +
-                '                               onclick=\'xiaoQuItemClick(' + JSON.stringify(v) + ')\'>\n' +
-                '                        <div class="weui-cell__bd" taskId="1212>\n' +
-                '                            <div class="weui-media-box weui-media-box_text" id="title">\n' +
-                '                                <p class="weui-media-box__desc" >' + v.taskTitle + '</p>\n' +
-                '                            </div>\n' +
-                '                        </div>\n' +
-                '                        <div class="weui-cell__ft"></div>\n' +
-                '                    </a>\n<br />'));
-
-    }
-
-    function xiaoQuItemClick(v) {
-        /*alert(v.taskId)*/
-        if ($('#titlteZs')[0].style.display == 'none') {
-            $('#notitle').toggle();
-            $('#titlteZs')[0].style.display = '';
-            $('#qzHS').empty();//清除节点
-            //详情页面的展示
-            $.ajax({
-                url: '/home/home/taskQuery',
-                data: {taskId: v.taskId},
-                type: 'GET',
-                success: function (data) {
-                    console.log(data);
-                    if (data.data.length > 0) {
-                        hasData = true;
-                        $('#qzHS').append($('<div>' + data.data[0].taskTitle + '</div>'))
-                        data.data.forEach(function (v) {
-                            shValue(v);
-                        });
-                    } else {
-
-                    }
-                },
-                error: function () {
-                }
-            });
-            /*$('#qzHS').*/
-
-        } else {
-            $('#notitle')[0].style.display = '';
-            $('#titlteZs')[0].style.display = 'none';
-        }
-    }
-
-
 </script>

+ 6 - 299
whepi-ui/templates/shop/qiuzhu.ftl

@@ -1,69 +1,27 @@
 <div class="page__bd">
     <div class="weui-tab">
         <div class="weui-navbar">
-            <a class="weui-navbar__item weui-bar__item_on" target="#qz_nav1" module="qiu_zhu" onclick="familyClick()">
+            <a class="weui-navbar__item weui-bar__item_on" target="#qz_nav1" module="qiu_zhu">
                 未响应
             </a>
-            <a class="weui-navbar__item" target="#qz_nav2" module="qiu_zhu" id="qzMy_help" onclick="qzMy_help('')">
+            <a class="weui-navbar__item" target="#qz_nav2" module="qiu_zhu">
                 已响应
             </a>
         </div>
         <div class="weui-tab__panel">
             <div id="qz_nav1" class="weui-tab__bd-item qiu_zhu_weui_tab_bd_item_active">
                 <div id="notitle">
-                <#--<a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form" href="javascript:;">
-                        <div class="weui-cell__bd">
-                            <div class="weui-media-box weui-media-box_text" id="title">
-                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                            </div>
-                        </div>
-                        <div class="weui-cell__ft"></div>
-                    </a>
-                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="list" href="javascript:;">
-                        <div class="weui-cell__bd">
-                            <div class="weui-media-box weui-media-box_text" id="title">
-                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                            </div>
-                        </div>
-                        <div class="weui-cell__ft"></div>
-                    </a>
-                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="name" href="javascript:;">
-                        <div class="weui-cell__bd">
-                            <div class="weui-media-box weui-media-box_text" id="title2">
-                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                            </div>
-                        </div>
-                        <div class="weui-cell__ft"></div>
-                    </a>
-                    <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="age" href="javascript:;">
-                        <div class="weui-cell__bd">
-                            <div class="weui-media-box weui-media-box_text" id="title3">
-                                <p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>
-                            </div>
-                        </div>
-                        <div class="weui-cell__ft"></div>
-                    </a>-->
-                </div>
-                <div id="titlteZs" style="display: none">
-                    <div class="page__bd">
-                        <div class="weui-panel weui-panel_access" id="qzHS">
-                        </div>
-                        <div class="button-sp-area">
-                            <div class="weui-btn-area">
-                                <a class="weui-btn weui-btn_primary" onclick="qzBackXiaoQu();">返回</a>
-                            </div>
-                        </div>
-                    </div>
+                    aaaaaaaaaaaaaaaaa
                 </div>
-            </div>
-
 
+            </div>
 
         <#--我的求助2-->
             <div id="qz_nav2" class="weui-tab__bd-item">
                 <div id="notPlay">
+                    bbbbbbbbbbbbbbbbbbb
                     <div class="weui-btn-area">
-                        <a id="btnQZ" class="weui-btn weui-btn_primary" onclick="qzDetail();">发起求助</a>
+                        <a id="btnQZ" class="weui-btn weui-btn_primary">发起求助</a>
                     </div>
                     <div class="weui-cell weui-cell_active weui-cell_switch">
                         <div class="weui-cell">
@@ -82,260 +40,9 @@
                         </div>
                     </div>
                 </div>
-                <div id="play" style="display: none" class="weui-panel__bd"><#--发起求助的展示界面-->
-                    <div class="weui-cells__group weui-cells__group_form">
-                        <div class="weui-cells weui-cells_form">
-                            <div class="weui-cell weui-cell_active" id="js_cell">
-                                <div class="weui-cell__hd"><label class="weui-label">标题</label></div>
-                                <div class="weui-cell__bd weui-flex">
-                                    <input id="Qzinput" class="weui-input" type="text"
-                                           placeholder="输入求助标题" maxlength="20" bindinput='formName' name="name"
-                                    >
-                                <#--<button id="js_input_clear" onclick="inputClick()"
-                                        class="weui-btn_reset weui-btn_icon weui-btn_input-clear">
-                                    <i class="weui-icon-clear"></i>
-                                </button>-->
-                                </div>
-                            </div>
-                        </div>
-                    </div>
-                    <div class="weui-form__control-area">
-                        <div class="weui-cells__group weui-cells__group_form">
-                            <div class="weui-cells weui-cells_checkbox">
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf1">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" class="weui-check" name="checkbox1" id="qzf1"
-                                               value="居委会">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>居委会</p>
-                                    </div>
-                                </label>
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf2">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" name="checkbox2" class="weui-check" id="qzf2"
-                                               value="业委会">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>业委会</p>
-                                    </div>
-                                </label>
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf3">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" name="checkbox3" class="weui-check" id="qzf3" value="物业">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>物业</p>
-                                    </div>
-                                </label>
-                                <label class="weui-cell weui-cell_active weui-check__label" for="qzf4">
-                                    <div class="weui-cell__hd">
-                                        <input type="checkbox" name="checkbox4" class="weui-check" id="qzf4"
-                                               value="志愿者">
-                                        <i class="weui-icon-checked"></i>
-                                    </div>
-                                    <div class="weui-cell__bd">
-                                        <p>志愿者</p>
-                                    </div>
-                                </label>
-                            <#--<a href="javascript:void(0);" class="weui-cell weui-cell_active weui-cell_link">
-                                <div class="weui-cell__bd">添加更多</div>
-                            </a>-->
-                            </div>
-                        </div>
-                        <div class="weui-cells weui-cells_form">
-                            <div class="weui-cell ">
-                                <div class="weui-cell__bd">
-                                    <textarea class="weui-textarea" placeholder="请输入求助内容" rows="3"
-                                              id="remarks"></textarea>
-                                    <div class="weui-textarea-counter"><span>0</span>/200</div>
-                                </div>
-                            </div>
-                            <div class="weui-cell">
-                                <a class="weui-btn weui-btn_primary" href="javascript:" id="back"
-                                   onclick="qzCommit()">发起求助</a>
-                            </div>
-                            <div class="weui-cell ">
-                                <br>
-                            </div>
-                        </div>
-                    </div>
-                </div>
-
-                <div id="familyDisplay" style="display: none">
-                    <div class="page__bd">
-                        <div class="weui-panel weui-panel_access" id="qzHS2">
-                        </div>
-                        <div class="button-sp-area">
-                            <div class="weui-btn-area">
-                                <a class="weui-btn weui-btn_primary" onclick="qzBackHome();">返回</a>
-                            </div>
-                        </div>
-                    </div>
-                </div>
             </div>
         </div>
     </div>
 </div>
 
-<script>
-
-    function qzCommit() {
-        /*     $("#qzf1").val()
-             $("#qzf2").val()
-             $("#qzf3").val()
-             $("#qzf4").val()*/
-        var taskTitle = $("#Qzinput").val();
-        if (!taskTitle) {
-            alert("请输入求助标题!")
-            return false;
-        }
-        var taskTarget = $("#qzf2").val();
-        if (!taskTarget) {
-            alert("请输入求助目标!")
-            return false;
-        }
-        var remark = $("#remarks").val();
-        if (!remark) {
-            alert("请输入求助内容!")
-            return false;
-        }
-
-        var data = {}
-        var tep = JSON.stringify(data);
-        console.log(tep)
-        $.ajax({
-            url: '/home/home/addFimaly',
-            data: {
-                taskTitle: $("#Qzinput").val(),
-                taskTarget: $("#qzf2").val(),
-                remark: $("#remarks").val()
-            },
-            type: 'GET',
-            success: function (data) {
-                /*if ($('#notPlay')[0].style.display == 'none') {
-                    $('#play').toggle();
-                    $('#notPlay')[0].style.display = '';
-                } else {
-                    $('#play')[0].style.display = '';
-                    $('#notPlay')[0].style.display = 'none';
-                }*/
-            },
-            error: function () {
-
-            }
-        });
-    }
-
-    //我的求助的页面展示
-    function qzMy_help(status) {
-        $('#valueQz').empty();//清除节点
-        $.ajax({
-            url: '/home/home/queryQzTask',
-            data: {userId: $('#userId').val(),taskStatus: status},
-            type: 'GET',
-            success: function (data) {
-                console.log(data);
-                if (data.data.length > 0) {
-                    hasData = true;
-                    data.data.forEach(function (v) {
-                        helpValue(v);
-                    });
-                } else {
-
-                }
-            },
-            error: function () {
-            }
-        });
-    }
-
-    function helpValue(v) {
-        $('#valueQz').append($(' <a class="weui-cell weui-cell_active weui-cell_access js_item" data-id="form"\n' +
-                '                               onclick=\'myItemClick(' + JSON.stringify(v) + ')\'>\n' +
-                '                                <div class="weui-cell__bd">\n' +
-                '                                    <div class="weui-media-box weui-media-box_text" id="title">\n' +
-                '                                        <p class="weui-media-box__desc">' + v.taskTitle + '</p>\n' +
-                '                                    </div>\n' +
-                '                                </div>\n' +
-                '                                <div class="weui-cell__ft"></div>\n' +
-                '                            </a><br />'));
-    }
-
-    function myItemClick(v) {
-        if ($('#familyDisplay')[0].style.display == 'none') {
-            $('#familyDisplay')[0].style.display = '';
-            $("#notPlay").toggle();
-            $('#qzHS2').empty();
-            $.ajax({
-                url: '/home/home/taskQuery',
-                data: {taskId: v.taskId},
-                type: 'GET',
-                success: function (data) {
-                    console.log(data);
-                    if (data.data.length > 0) {
-                        hasData = true;
-                        $('#qzHS2').append($('<div>' + data.data[0].taskTitle + '</div>'))
-                        data.data.forEach(function (v) {
-                            shValuenat2(v);
-                        });
-                    } else {
-
-                    }
-                },
-                error: function () {
-                }
-            });
-        }
-    }
-
-    function shValuenat2(v) {
-        $('#qzHS2').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
-                '                <div class="weui-media-box__bd">\n' +
-                '                    <div style="display: flex; flex-direction: row; justify-content: space-between;">\n' +
-                '                        <p class="weui-media-box__desc">业主1号</p>\n' +
-                '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
-                '                    </div>\n' +
-                '                    <div class="weui-cell ">\n' +
-                '                        <div class="weui-cell__bd">\n' +
-                '                            <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
-                '                            <div class="weui-textarea-counter"></div>\n' +
-                '                        </div>\n' +
-                '                    </div>\n' +
-                '                </div>\n' +
-                '            </a>\n<br />'));
-    }
-
-    function qzBackXiaoQu() {
-        if ($('#titlteZs')[0].style.display == 'none') {
-            $('#notitle').toggle();
-            $('#titlteZs')[0].style.display = '';
-        } else {
-            $('#notitle')[0].style.display = '';
-            $('#titlteZs')[0].style.display = 'none';
-        }
-
-    }
-
-    function qzBackHome() {
-        if ($('#notPlay')[0].style.display == 'none') {
-            $('#familyDisplay').toggle();
-            $('#notPlay')[0].style.display = '';
-        } else {
-            $('#familyDisplay')[0].style.display = '';
-            $('#notPlay')[0].style.display = 'none';
-        }
-
-    }
-
-    function qzDetail() {
-        $("#notPlay").toggle();
-        /*点击隐藏*/
-        /*展示*/
-        $('#play')[0].style.display = '';
-    }
-</script>
 

+ 0 - 54
whepi-ui/templates/shop/qiuzhu.js

@@ -2,57 +2,3 @@ function qiuzhu_init() {
 
 }
 
-function shValue(v) {
-  $('#qzHS').append($('<a href="javascript:void(0);" class="weui-media-box weui-media-box_appmsg">\n' +
-    '                <div class="weui-media-box__bd">\n' +
-    '                    <div style="display: flex; flex-direction: row; justify-content: space-between;">\n' +
-    '                        <p class="weui-media-box__desc">业主1号</p>\n' +
-    '                        <p class="weui-media-box__desc">' + timestampToTime(v.timeUpdate) + '</p>\n' +
-    '                    </div>\n' +
-    '                    <div class="weui-cell ">\n' +
-    '                        <div class="weui-cell__bd">\n' +
-    '                            <textarea class="weui-textarea" rows="1" readonly >' + v.replyContent + '</textarea>\n' +
-    '                            <div class="weui-textarea-counter"></div>\n' +
-    '                        </div>\n' +
-    '                    </div>\n' +
-    '                </div>\n' +
-    '            </a>\n<br />'));
-}
-
-function timestampToTime(timestamp) {
-  var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
-  var Y = date.getFullYear() + '/';
-  var M = ((date.getMonth() + 1) < 10) ? ('0' + (date.getMonth() + 1) + '/') : ((date.getMonth() + 1) + '/');
-  var D = (date.getDate() < 10) ? ('0' + date.getDate() + ' ') : (date.getDate() + ' ');
-  var h = (date.getHours() < 10) ? ('0' + date.getHours() + ':') : (date.getHours() + ':');
-  var m = (date.getMinutes() < 10) ? ('0' + date.getMinutes() + ':') : (date.getMinutes() + ':');
-  var s = (date.getSeconds() < 10) ? ('0' + date.getSeconds()) : (date.getSeconds());
-  return Y + M + D + h + m + s;
-}
-
-function family_init() {
-  /*$('#family').on('click',function () {
-    $('#familyDisplay')[0].style.display == '';
-    alert($('#familyDisplay')[0].style.display == 'none')
-    if($('#familyDisplay')[0].style.display == 'none'){
-      $('#notPlay').toggle();
-
-    }else{
-      $('#familyDisplay')[0].style.display == '';
-      $('#notPlay')[0].style.display == 'none';
-    }
-
-
-  })*/
-}
-
-function submit_back() {
-  $('#back').on('click', function () {
-    if ($('#notPlay')[0].style.display = 'none') {
-      $('#notPlay')[0].style.display = '';
-      $('#play').toggle();
-
-    }
-
-  })
-}

Diferenças do arquivo suprimidas por serem muito extensas
+ 11 - 507
whepi-ui/templates/shop/shangpin.ftl


+ 10 - 64
whepi-ui/templates/shop/shangpin.js

@@ -1,69 +1,15 @@
-function ribao_init() {
-  $('#btnRB').on('click', function () {
-    window.location.href = "/yeweihui/home.html";
-  });
-
-}
-
-
-function ribao_add() {
-  $('#btnAdd').on('click', function () {
-    if ($('#ribao')[0].style.display == 'none') {
-      $('#notOpenRibao').toggle();
-      $('#ribao')[0].style.display = '';
-    } else {
-      $('#notOpenRibao')[0].style.display = '';
-      $('#ribao')[0].style.display = 'none';
-    }
-  });
-}
-
-function ribao_cancel() {
-  $('#cancel').on('click', function () {
-    if ($('#ribao')[0].style.display == 'none') {
-      $('#notOpenRibao').toggle();
-      $('#ribao')[0].style.display = '';
-    } else {
-      $('#notOpenRibao')[0].style.display = '';
-      $('#ribao')[0].style.display = 'none';
-    }
-  });
+function shangpin_init() {
+  // $('#btnRB').on('click', function () {
+  //   window.location.href = "/yeweihui/home.html";
+  // });
+  alert($('#ssdd').html())
+  $('#ssdd').empty();//清除节点
+  $('#ssdd').append('<div class="weui-loadmore weui-loadmore_line">\n' +
+    '    <span class="weui-loadmore__tips">暂无数据</span>\n' +
+    '</div><br/>');
+  alert($('#ssdd').html())
 }
 
-function ribao_commit() {
-  $('#commit').on('click', function () {
-
-    if ($('#ribao')[0].style.display == 'none') {
-      $('#notOpenRibao').toggle();
-      $('#ribao')[0].style.display = '';
-    } else {
-      $('#notOpenRibao')[0].style.display = '';
-      $('#ribao')[0].style.display = 'none';
-    }
-  });
-}
-
-
-function ribaoCommit() {
-  var user_name = $("#js_input_user_name").val();
-  var remarks = $("#rb_remarks").val();
-  var medical = $('input:radio:checked').val();
-  console.log(user_name)
-  console.log(remarks)
-  console.log(medical)
-
-  $.ajax({
-    url: '/home/addRibao.json',
-    type: "post",
-    data: {
-      "userName": user_name,
-      "conditionStatus": "",
-      "medical": medical,
-      "remarks": remarks,
-    },
-  });
-  qz_searchNum1
-}
 
 
 

+ 228 - 10
whepi-ui/templates/user/home.ftl

@@ -27,25 +27,25 @@
                         <div class="maindiv">
                             <div class="leftdiv">
                                 <br/>
-                                <div class="weui-cells__title" style="font-weight: 300;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<#if user ??>${user.nickName!''}</#if></div>
-                                <div class="weui-cells__title">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用户登录</div>
+                                <div class="weui-cells__title user-font" style="font-weight: 300;">&nbsp;&nbsp;&nbsp;&nbsp;<#if user ??>${user.nickName!''}</#if></div>
+                                <div class="weui-cells__title user-font">&nbsp;&nbsp;&nbsp;&nbsp;用户登录</div>
                                 <br/>
                             </div>
                             <div class="centerdiv"></div>
                             <div class="rightdiv">
-                                <div class="weui-cells__title">联系人输入</div>
+                                <div class="weui-cells__title">联系人</div>
                                 <div class="weui-cells">
                                     <div class="weui-cell">
                                         <div class="weui-cell__bd">
-                                            <input class="weui-input" type="text" id="linkman" placeholder="请输入文本"/>
+                                            <input class="weui-input" type="text" id="linkman" placeholder="请填写真实姓名"/>
                                         </div>
                                     </div>
                                 </div>
-                                <div class="weui-cells__title">手机号输入</div>
+                                <div class="weui-cells__title">手机号</div>
                                 <div class="weui-cells">
                                     <div class="weui-cell">
                                         <div class="weui-cell__bd">
-                                            <input class="weui-input" type="text" id="phone" placeholder="请输入文本"/>
+                                            <input class="weui-input" type="text" id="phone" placeholder="请填写您的手机号码"/>
                                         </div>
                                     </div>
                                 </div>
@@ -118,7 +118,20 @@
                         </div>
                         <div class="weui-cell__bd">
                             <select class="weui-select" id="city" name="select1">
-                                <option value="1">武汉</option>
+                                <option value="420100">武汉市</option>
+                                <option value="420200">黄石市</option>
+                                <option value="420300">十堰市</option>
+                                <option value="420500">宜昌市</option>
+                                <option value="420600">襄阳市</option>
+                                <option value="420700">鄂州市</option>
+                                <option value="420800">荆门市</option>
+                                <option value="420900">孝感市</option>
+                                <option value="421000">荆州市</option>
+                                <option value="421100">黄冈市</option>
+                                <option value="421200">咸宁市</option>
+                                <option value="421300">随州市</option>
+                                <option value="422800">恩施土家族苗族自治州</option>
+                                <option value="429000">省直辖县级行政区划</option>
                             </select>
                         </div>
                     </div>
@@ -163,11 +176,11 @@
                         </div>
                     </div>
                     <div id="doorplateMsg">
-                        <div class="weui-cells__title">门牌号输入</div>
+                        <div class="weui-cells__title">门牌号</div>
                         <div class="weui-cells">
                             <div class="weui-cell">
                                 <div class="weui-cell__bd">
-                                    <input class="weui-input" type="text" id="doorplate" placeholder="请输入文本"/>
+                                    <input class="weui-input" type="text" id="doorplate" placeholder="请输入文本门牌号码: 如 108"/>
                                 </div>
                             </div>
                         </div>
@@ -198,6 +211,205 @@
             $("#houseId").empty();
             getUptownData(area);
         });
+
+        $("#city").on("change", function () {
+            var city = $("#city").val();
+
+            $("#area").empty();
+            $("#uptownId").empty();
+            $("#houseId").empty();
+
+            var areaData = [];
+            switch (parseInt(city)) {
+                case 420100 :{
+
+                    areaData=[
+                        {value: 420102,	text: "江岸区"},
+                        {value: 420103,	text: "江汉区"},
+                        {value: 420104,	text: "硚口区"},
+                        {value: 420105,	text: "汉阳区"},
+                        {value: 420106,	text: "武昌区"},
+                        {value: 420107,	text: "青山区"},
+                        {value: 420111,	text: "洪山区"},
+                        {value: 420112,	text: "东西湖区"},
+                        {value: 420113,	text: "汉南区"},
+                        {value: 420114,	text: "蔡甸区"},
+                        {value: 420115,	text: "江夏区"},
+                        {value: 420116,	text: "黄陂区"},
+                        {value: 420117,	text: "新洲区"}
+                    ];
+                  break;
+                }
+                case 420200 :{
+                    areaData=[
+                        {value: 420202,	text:"黄石港区"},
+                        {value: 420203,	text:"西塞山区"},
+                        {value: 420204,	text:"下陆区"},
+                        {value: 420205,	text:"铁山区"},
+                        {value: 420222,	text:"阳新县"},
+                        {value: 420281,	text:"大冶市"}
+                      ];
+                  break;
+                }
+                case 420300 :{
+                    areaData=[
+                        {value: 420302,	text: "茅箭区"},
+                        {value: 420303,	text: "张湾区"},
+                        {value: 420321,	text: "郧县"},
+                        {value: 420322,	text: "郧西县"},
+                        {value: 420323,	text: "竹山县"},
+                        {value: 420324,	text: "竹溪县"},
+                        {value: 420325,	text: "房县"},
+                        {value: 420381,	text: "丹江口市"}
+                    ];
+                  break;
+                }
+                case 420500 :{
+                    areaData=[
+                        {value: 420502,	text: "西陵区"},
+                        {value: 420503,	text: "伍家岗区"},
+                        {value: 420504,	text: "点军区"},
+                        {value: 420505,	text: "猇亭区"},
+                        {value: 420506,	text: "夷陵区"},
+                        {value: 420525,	text: "远安县"},
+                        {value: 420526,	text: "兴山县"},
+                        {value: 420527,	text: "秭归县"},
+                        {value: 420528,	text: "长阳土家族自治县"},
+                        {value: 420529,	text: "五峰土家族自治县"},
+                        {value: 420581,	text: "宜都市"},
+                        {value: 420582,	text: "当阳市"},
+                        {value: 420583,	text: "枝江市"},
+                    ];
+                  break;
+                }
+                case 420600 :{
+                    areaData=[
+                        {value: 420602,	text: "襄城区"},
+                        {value: 420606,	text: "樊城区"},
+                        {value: 420607,	text: "襄州区"},
+                        {value: 420624,	text: "南漳县"},
+                        {value: 420625,	text: "谷城县"},
+                        {value: 420626,	text: "保康县"},
+                        {value: 420682,	text: "老河口市"},
+                        {value: 420683,	text: "枣阳市"},
+                        {value: 420684,	text: "宜城市"},
+                    ];
+                  break;
+                }
+                case 420700 :{
+                    areaData=[
+                        {value: 420702,	text: "梁子湖区"},
+                        {value: 420703,	text: "华容区"},
+                        {value: 420704,	text: "鄂城区"},
+                    ];
+                  break;
+                }
+                case 420800 :{
+                    areaData=[
+                        {value: 420802,	text: "东宝区"},
+                        {value: 420804,	text: "掇刀区"},
+                        {value: 420821,	text: "京山县"},
+                        {value: 420822,	text: "沙洋县"},
+                        {value: 420881,	text: "钟祥市"},
+
+                    ];
+                  break;
+                }
+                case 420900 :{
+                    areaData=[
+                        {value: 420902,	text: "孝南区"},
+                        {value: 420921,	text: "孝昌县"},
+                        {value: 420922,	text: "大悟县"},
+                        {value: 420923,	text: "云梦县"},
+                        {value: 420981,	text: "应城市"},
+                        {value: 420982,	text: "安陆市"},
+                        {value: 420984,	text: "汉川市"},
+
+                    ];
+                  break;
+                }
+                case 421000 :{
+                    areaData=[
+                        {value: 421002,	text: "沙市区"},
+                        {value: 421003,	text: "荆州区"},
+                        {value: 421022,	text: "公安县"},
+                        {value: 421023,	text: "监利县"},
+                        {value: 421024,	text: "江陵县"},
+                        {value: 421081,	text: "石首市"},
+                        {value: 421083,	text: "洪湖市"},
+                        {value: 421087,	text: "松滋市"},
+
+                    ];
+                  break;
+                }
+                case 421100 :{
+                    areaData=[
+                        {value: 421102,	text: "黄州区"},
+                        {value: 421121,	text: "团风县"},
+                        {value: 421122,	text: "红安县"},
+                        {value: 421123,	text: "罗田县"},
+                        {value: 421124,	text: "英山县"},
+                        {value: 421125,	text: "浠水县"},
+                        {value: 421126,	text: "蕲春县"},
+                        {value: 421127,	text: "黄梅县"},
+                        {value: 421181,	text: "麻城市"},
+                        {value: 421182,	text: "武穴市"},
+
+                    ];
+                  break;
+                }
+                case 421200 :{
+                    areaData=[
+                        {value: 421202,	text: "咸安区"},
+                        {value: 421221,	text: "嘉鱼县"},
+                        {value: 421222,	text: "通城县"},
+                        {value: 421223,	text: "崇阳县"},
+                        {value: 421224,	text: "通山县"},
+                        {value: 421281,	text: "赤壁市"},
+
+                    ];
+                  break;
+                }
+                case 421300 :{
+                    areaData=[
+                        {value: 421303,	text: "曾都区"},
+                        {value: 421321,	text: "随县"},
+                        {value: 421381,	text: "广水市"},
+                    ];
+                  break;
+                }
+                case 422800 :{
+                    areaData=[
+                        {value: 422801,	text: "恩施市"},
+                        {value: 422802,	text: "利川市"},
+                        {value: 422822,	text: "建始县"},
+                        {value: 422823,	text: "巴东县"},
+                        {value: 422825,	text: "宣恩县"},
+                        {value: 422826,	text: "咸丰县"},
+                        {value: 422827,	text: "来凤县"},
+                        {value: 422828,	text: "鹤峰县"},
+
+                    ];
+                  break;
+                }
+                case 429000 :{
+                    areaData=[
+                        {value: 429004,	text: "仙桃市"},
+                        {value: 429005,	text: "潜江市"},
+                        {value: 429006,	text: "天门市"},
+                        {value: 429021,	text: "神农架林区"},
+                    ];
+                  break;
+                }
+            }
+            var html = "";
+            for (var i = 0; i < areaData.length; i++) {
+                html += '<option value="' + areaData[i].value + '">' + areaData[i].text + '</option>';
+            }
+            $('#area').append(html);
+            $("#area").val(areaData[0].value);
+        });
+
         $("#uptownId").on("change", function () {
             getUptownUnitData();
             $("#houseId").empty();
@@ -354,4 +566,10 @@
         $("#fromMsg").show();
     }
 
-</script>
+</script>
+
+
+
+
+
+

+ 9 - 1
whepi-ui/templates/yeweihui/home.ftl

@@ -96,9 +96,17 @@
                             if(i == 0){
                                 $("#xiaoqu").text(v.uptownName);
                             }
+                            var t1;
+                                t1 = $('<td align="center">' + v.num + '</td>');
 
-                            var t1 = $('<td align="center">' + v.num + '</td>');
                             $("#huiz").append(t1);
+
+                        }
+                        if(data.data.length == 3){
+                            var t2 = $('<td align="center">' + 0 + '</td>');
+                            var t3 = $('<td align="center">' + 0 + '</td>');
+                            $("#huiz").append(t2);
+                            $("#huiz").append(t3);
                         }
                     },
                     error: function () {

+ 8 - 1
whepi-ui/templates/yeweihui/ribaohuiz.ftl

@@ -1,5 +1,7 @@
 <#assign title="业委会"/>
+
 <div class="page__bd" style="height: 300px">
+    <div class="container">
     <header class="demos-header">
         <h1 class="demos-title" id="xiaoqu"></h1>
     </header>
@@ -12,6 +14,8 @@
                 <td style="background-color: lightgrey" align="center">注册户数</td>
                 <td style="background-color: lightgrey" align="center">上报户数</td>
                 <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>-->
@@ -30,9 +34,12 @@
         <div class="weui-cells">
             <div class="weui-cell">
                 <div class="weui-cell__bd">
-                    <input class="weui-input" type="text" id="exportRiBaoLink"/>
+                    <input class="weui-input" type="text" id="exportRiBaoLink" readonly="readonly"/>
                 </div>
             </div>
         </div>
     </div>
+        <div style="height: 30vh">
+        </div>
+    </div>
 </div>

+ 1 - 2
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -7,7 +7,6 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.springframework.stereotype.Repository;
 
-import java.math.BigDecimal;
 import java.util.List;
 
 /**
@@ -21,7 +20,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
     List<MsReport> selectByReportDate(@Param("reportDate") String reportDate, @Param("userCreate") Long userCreate);
 
     @Select("select property_id from sys_user_role where user_id=#{userId} and role_id=1")
-    long selectHouseIdByUserId(@Param("userId") Long userId);
+    Long selectHouseIdByUserId(@Param("userId") Long userId);
 
     //确诊
     @Select("select count(*) from ms_suspected where report_id=#{reportId} and  medical=#{medical}")

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

@@ -64,6 +64,37 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
             "inner join sys_owner d on d.uptown_id = c.uptown_id " +
             "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
             "where a.report_status = 1 and a.ms_status = 2 and a.report_date = #{reportDate} and e.user_id = #{userId} " +
+            "union all " +
+            "SELECT DISTINCT " +
+            "sum(a.safety_num) AS yc," +
+            "'' as uptownName " +
+            "FROM " +
+            "ms_report a " +
+            "INNER JOIN sys_uptown_house b ON a.house_id = b.house_id " +
+            "INNER JOIN sys_uptown_unit c ON c.unit_id = b.unit_id " +
+            "INNER JOIN sys_owner d ON d.uptown_id = c.uptown_id " +
+            "INNER JOIN sys_user_role e ON e.property_id = d.owner_id " +
+            "AND e.role_id = 2 " +
+            "WHERE a.report_status = 1 " +
+            "AND a.report_date = #{reportDate} " +
+            "and e.user_id = #{userId} " +
+            "GROUP BY a.house_id " +
+            "union all " +
+            "SELECT DISTINCT " +
+            "sum(a.suspected_num+a.sure_num+a.single_num) AS ycnum," +
+            "'' as uptownName " +
+            "FROM " +
+            "ms_report a " +
+            "INNER JOIN sys_uptown_house b ON a.house_id = b.house_id " +
+            "INNER JOIN sys_uptown_unit c ON c.unit_id = b.unit_id " +
+            "INNER JOIN sys_owner d ON d.uptown_id = c.uptown_id " +
+            "INNER JOIN sys_user_role e ON e.property_id = d.owner_id " +
+            "AND e.role_id = 2 " +
+            "WHERE a.report_status = 1 " +
+            "and a.ms_status = 2 " +
+            "AND a.report_date = #{reportDate} " +
+            "and e.user_id = #{userId} " +
+            "GROUP BY a.house_id" +
             ") tt ")
     List<MsSuspected> selecthuiz(@Param("userId") Long userId,@Param("reportDate") String reportDate);
 

+ 1 - 2
whepi-web/src/main/java/com/bofeng/dao/UptownHouseMapper.java

@@ -1,7 +1,6 @@
 package com.bofeng.dao;
 
 import com.baomidou.mybatisplus.mapper.BaseMapper;
-import com.bofeng.entity.UptownHome;
 import com.bofeng.entity.UptownHouse;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -18,5 +17,5 @@ public interface UptownHouseMapper extends BaseMapper<UptownHouse> {
     List<UptownHouse> getAllUptownHouse(@Param("uptownId") Long uptownId);
 
     @Select("select * from sys_uptown_house where status = 1 and unit_id = #{unitId} and doorplate = #{doorplate}")
-    List<UptownHome> getUptownHouseBy(@Param("unitId") Long unitId, @Param("doorplate") String doorplate);
+    List<UptownHouse> getUptownHouseBy(@Param("unitId") Long unitId, @Param("doorplate") String doorplate);
 }

+ 27 - 6
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBao.java

@@ -17,7 +17,6 @@ public class ExcelRiBao {
     private int grender;
     private int familyStatus;
     private int medical;
-    private BigDecimal temperature;
     private int cough;
     private int muscle;
     private int dyspnea;
@@ -89,7 +88,21 @@ public class ExcelRiBao {
     @ExcelProperty(value = "年龄", index = 11)
     private String age;
 
-    @ExcelProperty(value = "身体基本情况", index = 12)
+    @ExcelProperty(value = "体温", index = 12)
+    private BigDecimal temperature;
+
+    @ExcelProperty(value = "确诊", index = 13)
+    private String medicalStr;
+    public String getMedicalStr() {
+        if (medical == 0) {
+            medicalStr = "否";
+        } else {
+            medicalStr = "是";
+        }
+        return medicalStr;
+    }
+
+    @ExcelProperty(value = "身体基本情况", index = 14)
     private String baseDesc;
     public String getBaseDesc() {
         if (familyStatus == 0) {
@@ -114,10 +127,20 @@ public class ExcelRiBao {
         return baseDesc;
     }
 
-    @ExcelProperty(value = "病情描述", index = 13)
+    @ExcelProperty(value = "病情描述", index = 15)
     private String bingqingDesc = "";
     public String getBingqingDesc() {
 
+        if (medical == 1) {
+            bingqingDesc += "已确诊、";
+        }
+
+        if (singleRoom == 1) {
+            bingqingDesc += "单间隔离、";
+        }
+
+        bingqingDesc = bingqingDesc + "体温:" + temperature + "、";
+
         if (cough == 1) {
             bingqingDesc += "偶尔短暂咳嗽、";
         } else if (cough == 2) {
@@ -155,9 +178,7 @@ public class ExcelRiBao {
         } else if (diarrhea == 3) {
             bingqingDesc += "重度腹泻超过6次、";
         }
-        if (singleRoom == 1) {
-            bingqingDesc += "单间隔离、";
-        }
+
         if (!Strings.isNullOrEmpty(statusDesp)) {
             bingqingDesc += statusDesp;
             bingqingDesc += "、";

+ 5 - 1
whepi-web/src/main/java/com/bofeng/entity/MsReport.java

@@ -4,7 +4,7 @@ package com.bofeng.entity;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
-import io.swagger.models.auth.In;
+import com.fasterxml.jackson.annotation.JsonFormat;
 import lombok.Getter;
 import lombok.Setter;
 import org.joda.time.DateTime;
@@ -26,6 +26,9 @@ public class MsReport {
     @TableField("house_id")
     private Long houseId;
 
+    @TableField(exist = false)
+    private String houseIdStr = "";
+
     @TableField("safety_num")
     private Integer safetyNum;
 
@@ -45,6 +48,7 @@ public class MsReport {
     private String remarks;
 
     @TableField("report_date")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
     private Date reportDate;
 
     @TableField("report_status")

+ 22 - 7
whepi-web/src/main/java/com/bofeng/entity/MsSuspected.java

@@ -32,18 +32,27 @@ public class MsSuspected {
     @TableField("grender")
     private Integer grender;
 
+    @TableField(exist = false)
+    private String grenderStr = "";
+
     @TableField("age")
     private Integer age;
 
     @TableField("family_status")
     private Integer familyStatus;
 
+    @TableField(exist = false)
+    private String familyStatusStr = "";
+
     @TableField("status_desp")
     private String statusDesp;
 
     @TableField("medical")
     private Integer medical;
 
+    @TableField(exist = false)
+    private String medicalStr = "";
+
     @TableField("temperature")
     private BigDecimal temperature;
 
@@ -51,19 +60,19 @@ public class MsSuspected {
     private Integer cough;
 
     @TableField(exist = false)
-    private String coughStr;
+    private String coughStr = "";
 
     @TableField("muscle")
     private Integer muscle;
 
     @TableField(exist = false)
-    private String muscleStr;
+    private String muscleStr = "";
 
     @TableField("dyspnea")
     private Integer dyspnea;
 
     @TableField(exist = false)
-    private String dyspneaStr;
+    private String dyspneaStr = "";
 
     @TableField("fatigue")
     private Integer fatigue;
@@ -75,17 +84,24 @@ public class MsSuspected {
     private Integer diarrhea;
 
     @TableField(exist = false)
-    private String diarrheaStr;
+    private String diarrheaStr = "";
 
     @TableField(exist = false)
-    private String zhengzhuang;
+    private String zhengzhuang = "";
 
     @TableField("single_room")
     private Integer singleRoom;
 
+    @TableField(exist = false)
+    private String singleRoomStr = "";
+
     @TableField("suspected_status")
     private Integer suspectedStatus;
 
+
+    @TableField(exist = false)
+    private String suspectedStatusStr = "";
+
     @TableField("others")
     private String others;
 
@@ -128,12 +144,11 @@ public class MsSuspected {
     @TableField(exist = false)
     private Integer singleNum;
 
-    @TableField(exist = false)
-    private String singleRoomStr;
 
     @TableField(exist = false)
     private Integer num;
 
+
     @TableField(exist = false)
     private Long userId;
 

+ 1 - 0
whepi-web/src/main/java/com/bofeng/entity/QzTaskReply.java

@@ -52,6 +52,7 @@ public class QzTaskReply implements Serializable {
   private String taskTitle;
   private Integer taskStatus;
   private String nickName;
+  private String remark;
 
   private static final long serialVersionUID = 1L;
 }

+ 2 - 3
whepi-web/src/main/java/com/bofeng/entity/UptownHouse.java

@@ -1,13 +1,12 @@
 package com.bofeng.entity;
 
 import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import lombok.Getter;
 import lombok.Setter;
 import org.joda.time.DateTime;
 
-import java.util.Date;
-
 /**
  * 门牌信息表
  */
@@ -16,7 +15,7 @@ import java.util.Date;
 @TableName("sys_uptown_house")
 public class UptownHouse {
 
-    @TableField("house_id")
+    @TableId("house_id")
     private Long houseId;
 
     @TableField("unit_id")

+ 6 - 5
whepi-web/src/main/java/com/bofeng/entity/UptownUnit.java

@@ -1,6 +1,7 @@
 package com.bofeng.entity;
 
 import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import lombok.Getter;
 import lombok.Setter;
@@ -14,7 +15,7 @@ import org.joda.time.DateTime;
 @TableName("sys_uptown_unit")
 public class UptownUnit {
 
-    @TableField("unit_id")
+    @TableId("unit_id")
     private Long unitId;
 
     @TableField("uptown_id")
@@ -32,14 +33,14 @@ public class UptownUnit {
     @TableField("status")
     private Integer status;
 
-    @TableField("user_create")
-    private Long userCreate;
+//    @TableField("user_create")
+//    private Long userCreate;
 
     @TableField(exist = false)
     private DateTime timeCreate;
 
-    @TableField("user_update")
-    private Long userUpdate;
+//    @TableField("user_update")
+//    private Long userUpdate;
 
     @TableField(exist = false)
     private DateTime timeUpdate;

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

@@ -98,6 +98,7 @@ public class RbService {
 
     public List<MsSuspected> selecthuiz(Long userId,String reportDate) {
         List<MsSuspected> huiz = rbMapper.selecthuiz(userId,reportDate);
+
         return huiz;
     }
 }

+ 341 - 0
whepi-web/src/main/java/com/bofeng/service/RiBaoService.java

@@ -0,0 +1,341 @@
+package com.bofeng.service;
+
+
+import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.MsReportMapper;
+import com.bofeng.dao.MsSuspectedMapper;
+import com.bofeng.dao.UptownHouseMapper;
+import com.bofeng.dao.UptownUnitMapper;
+import com.bofeng.entity.MsReport;
+import com.bofeng.entity.MsSuspected;
+import com.bofeng.entity.UptownHouse;
+import com.bofeng.entity.UptownUnit;
+import org.apache.commons.collections.CollectionUtils;
+import org.joda.time.DateTime;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/4 15:44
+ */
+@Service
+@Transactional()
+public class RiBaoService {
+
+    @Autowired
+    private MsSuspectedMapper msSuspectedMapper;
+    @Autowired
+    private MsReportMapper msReportMapper;
+    @Autowired
+    private RiBaoService msReportService;
+
+    @Autowired
+    private UptownHouseMapper uptownHouseMapper;
+
+    @Autowired
+    private UptownUnitMapper uptownUnitMapper;
+
+    public List<MsSuspected> getByReportId(Long reportId) {
+        return msSuspectedMapper.selectByReportId(reportId);
+    }
+
+    public MsReport selectById(Long reportId) {
+        return msReportMapper.selectById(reportId);
+    }
+
+    //获取前一天数据
+//    public List<MsSuspected> getByReportReportDate(String reportDate, Long userCreate) {
+//
+//        List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
+//        List<MsSuspected> listSuspected = null;
+//        if (listReport != null && listReport.size() > 0) {
+//            listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
+//        }
+//        return listSuspected;
+//    }
+
+    //获取今天数据
+    public MsReport getReportByDateNow(Long userCreate) {
+        //根据昨天的获取今天的
+        msReportService.getNowByYesterday(userCreate);
+        Date t = new Date();
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+        String reportDate = df.format(t);
+        List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
+        MsReport msReport = new MsReport();
+        if (listReport != null && listReport.size() > 0) {
+            msReport = msReportMapper.selectById(Long.parseLong(listReport.get(0).getReportId().toString()));
+        }
+        return msReport;
+    }
+
+
+    //获取今天数据
+    public String getHouseStr(Long houseId) {
+        UptownHouse house = uptownHouseMapper.selectById(houseId);
+        UptownUnit unit = uptownUnitMapper.selectById(house.getUnitId());
+        StringBuffer sb = new StringBuffer();
+        sb.append(unit.getRidgepole()).append("栋").append(unit.getUnit()).append("单元").append(house.getDoorplate()).append("室");
+        String houseStr = sb.toString();
+        return houseStr;
+    }
+
+    //上报
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public Integer addReport(Long userCreate) {
+        Date t = new Date();
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+        String reportDate = df.format(t);
+        List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
+        if (listReport == null || listReport.size() == 0)
+            return 0;
+
+        //判断体温是否填写
+        List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
+        for (MsSuspected msSuspected : listSuspected) {
+            if (msSuspected.getTemperature().compareTo(new BigDecimal(0)) == 0)
+                return 2;
+        }
+        MsReport msReport = msReportMapper.selectById(Long.parseLong(listReport.get(0).getReportId().toString()));
+        if (msReport != null) {
+            msReport.setReportStatus(1);
+            msReport.setUserUpdate(userCreate);
+            msReport.setTimeUpdate(DateTime.now());
+            msReportMapper.updateById(msReport);
+        }
+        return 1;
+    }
+
+    //    @Pd(name = "userName") String userName,// 家人姓名
+//    @Pd(name = "grender") Integer grender,// 性别:0未设置,1男,2女
+//    @Pd(name = "age") Integer age,// 年龄
+//    @Pd(name = "familyStatus") Integer familyStatus,// 基本状态:0正常,1心血管疾病(服用ARB),2心血管疾病(未服用ARB),3呼吸系统病史,4肿瘤病史,5糖尿病史,6服用过激素药物,7妊娠期,8其他
+//    @Pd(name = "statusDesp") String statusDesp,// 状态描述
+//    @Pd(name = "medical") Integer medical,// 是否确诊:0否,1是
+//    @Pd(name = "temperature") BigDecimal temperature,// 体温
+//    @Pd(name = "cough") Integer cough,// 咳嗽:0无咳嗽,1偶有短暂咳嗽,2咳嗽轻度影响生活,3咳嗽严重影响生活
+//    @Pd(name = "muscle") Integer muscle,// 肌肉酸痛:0无,1按压有,2偶尔,3持续有
+//    @Pd(name = "dyspnea") Integer dyspnea,// 呼吸困难:0无,1急走或上坡气短,2气短而走路变慢,3走路数分钟后气短,4气短无法离开房间
+//    @Pd(name = "fatigue") Integer fatigue,// 乏力:0无,1可体力劳动但觉得累,2轻体力劳动后长时间不能恢复,3不能正常生活
+//    @Pd(name = "diarrhea") Integer diarrhea,// 腹泻:0无,1轻度腹泻少于于3次,2中度腹泻4-6次,3重度腹泻超过6次
+//    @Pd(name = "singleRoom") Integer singleRoom,// 单间隔离:0否,1是
+//    //            @Pd(name = "suspectedStatus") String suspectedStatus,// 是否疑似:0否,1是
+//    @Pd(name = "others") String others,// 其他
+    //获取前一天数据
+    public List<MsSuspected> queryRibaoDetailList(Long reportId) {
+        List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(reportId);
+        if (CollectionUtils.isEmpty(listSuspected)) {
+            listSuspected = new ArrayList<MsSuspected>();
+        } else {
+            for (MsSuspected obj : listSuspected) {
+                if (obj.getGrender().intValue() == 1) {
+                    obj.setGrenderStr("男");
+                } else if (obj.getGrender().intValue() == 2) {
+                    obj.setGrenderStr("女");
+                }
+
+                if (obj.getFamilyStatus().intValue() == 0) {
+                    obj.setFamilyStatusStr("正常");
+                } else if (obj.getFamilyStatus().intValue() == 1) {
+                    obj.setFamilyStatusStr("心血管疾病(服用ARB)");
+                } else if (obj.getFamilyStatus().intValue() == 2) {
+                    obj.setFamilyStatusStr("心血管疾病(未服用ARB)");
+                } else if (obj.getFamilyStatus().intValue() == 3) {
+                    obj.setFamilyStatusStr("呼吸系统病史");
+                } else if (obj.getFamilyStatus().intValue() == 4) {
+                    obj.setFamilyStatusStr("肿瘤病史");
+                } else if (obj.getFamilyStatus().intValue() == 5) {
+                    obj.setFamilyStatusStr("糖尿病史");
+                } else if (obj.getFamilyStatus().intValue() == 6) {
+                    obj.setFamilyStatusStr("服用过激素药物");
+                } else if (obj.getFamilyStatus().intValue() == 7) {
+                    obj.setFamilyStatusStr("妊娠期");
+                } else if (obj.getFamilyStatus().intValue() == 8) {
+                    obj.setFamilyStatusStr("其他");
+                }
+
+                if (obj.getMedical().intValue() == 0) {
+                    obj.setMedicalStr("否");
+                } else if (obj.getMedical().intValue() == 1) {
+                    obj.setMedicalStr("是");
+                }
+
+                if (obj.getCough().intValue() == 0) {
+                    obj.setCoughStr("无咳嗽");
+                } else if (obj.getCough().intValue() == 1) {
+                    obj.setCoughStr("偶有短暂咳嗽");
+                } else if (obj.getCough().intValue() == 2) {
+                    obj.setCoughStr("咳嗽轻度影响生活");
+                } else if (obj.getCough().intValue() == 3) {
+                    obj.setCoughStr("咳嗽严重影响生活");
+                }
+
+                if (obj.getMuscle().intValue() == 0) {
+                    obj.setMuscleStr("无");
+                } else if (obj.getMuscle().intValue() == 1) {
+                    obj.setMuscleStr("按压有");
+                } else if (obj.getMuscle().intValue() == 2) {
+                    obj.setMuscleStr("偶尔");
+                } else if (obj.getMuscle().intValue() == 3) {
+                    obj.setMuscleStr("持续有");
+                }
+
+                if (obj.getDyspnea().intValue() == 0) {
+                    obj.setDyspneaStr("无");
+                } else if (obj.getDyspnea().intValue() == 1) {
+                    obj.setDyspneaStr("急走或上坡气短");
+                } else if (obj.getDyspnea().intValue() == 2) {
+                    obj.setDyspneaStr("气短而走路变慢");
+                } else if (obj.getDyspnea().intValue() == 3) {
+                    obj.setDyspneaStr("走路数分钟后气短");
+                } else if (obj.getDyspnea().intValue() == 4) {
+                    obj.setDyspneaStr("气短无法离开房间");
+                }
+
+                if (obj.getFatigue().intValue() == 0) {
+                    obj.setFatigueStr("无");
+                } else if (obj.getFatigue().intValue() == 1) {
+                    obj.setFatigueStr("可体力劳动但觉得累");
+                } else if (obj.getFatigue().intValue() == 2) {
+                    obj.setFatigueStr("轻体力劳动后长时间不能恢复");
+                } else if (obj.getFatigue().intValue() == 3) {
+                    obj.setFatigueStr("不能正常生活");
+                }
+
+                if (obj.getDiarrhea().intValue() == 0) {
+                    obj.setDiarrheaStr("无");
+                } else if (obj.getDiarrhea().intValue() == 1) {
+                    obj.setDiarrheaStr("轻度腹泻少于于3次");
+                } else if (obj.getDiarrhea().intValue() == 2) {
+                    obj.setDiarrheaStr("中度腹泻4-6次");
+                } else if (obj.getDiarrhea().intValue() == 3) {
+                    obj.setDiarrheaStr("重度腹泻超过6次");
+                }
+
+                if (obj.getSingleRoom().intValue() == 0) {
+                    obj.setSingleRoomStr("否");
+                } else if (obj.getSingleRoom().intValue() == 1) {
+                    obj.setSingleRoomStr("是");
+                }
+
+                if (obj.getSuspectedStatus().intValue() == 0) {
+                    obj.setSuspectedStatusStr("否");
+                } else if (obj.getSuspectedStatus().intValue() == 1) {
+                    obj.setSuspectedStatusStr("是");
+                }
+            }
+        }
+        return listSuspected;
+    }
+
+    //通过昨天数据更新今天数据
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public Long getNowByYesterday(Long userCreate) {
+        // 判断今天是否有数据
+        Date today = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        String todayStr = sdf.format(today);
+        List<MsReport> listReportDb = msReportMapper.selectByReportDate(todayStr, userCreate);
+        if (CollectionUtils.isNotEmpty(listReportDb)) {
+            Long reportId = listReportDb.get(0).getReportId();
+            return reportId;
+        }
+
+        // 判断昨天是否有数据
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(today);
+        calendar.add(Calendar.DATE, -1);
+        String yestodayStr = sdf.format(calendar.getTime());
+        listReportDb = msReportMapper.selectByReportDate(yestodayStr, userCreate);
+        //有数据
+        Long reportId = 0L;
+        DateTime dateTime = new DateTime();
+        if (CollectionUtils.isNotEmpty(listReportDb)) {
+            Long reportIdDb = listReportDb.get(0).getReportId();
+            //添加到今天日报
+            MsReport msReportDb = msReportMapper.selectById(reportIdDb);
+            if (msReportDb != null) {
+                MsReport msReport = new MsReport();
+                BeanUtils.copyProperties(msReportDb, msReport);
+                reportId = IdWorker.getId();
+                msReport.setReportId(reportId);
+                msReport.setReportDate(dateTime.toDate());
+                msReport.setReportStatus(0);//未上报
+                msReport.setUserCreate(userCreate);
+                msReport.setTimeCreate(dateTime);
+                msReport.setUserUpdate(userCreate);
+                msReport.setTimeUpdate(dateTime);
+                msReportMapper.insert(msReport);
+
+                //添加今日家庭
+                List<MsSuspected> suspectedListDb = msSuspectedMapper.selectByReportId(reportIdDb);
+                if (CollectionUtils.isNotEmpty(suspectedListDb)) {
+                    for (MsSuspected msSuspectedDb : suspectedListDb) {
+                        MsSuspected msSuspected = new MsSuspected();
+                        BeanUtils.copyProperties(msSuspectedDb, msSuspected);
+                        msSuspected.setSuspectedId(IdWorker.getId());
+                        msSuspected.setReportId(reportId);
+                        msSuspected.setSuspectedStatus(0);
+                        msSuspected.setUserCreate(userCreate);
+                        msSuspected.setTimeCreate(dateTime);
+                        msSuspected.setUserUpdate(userCreate);
+                        msSuspected.setTimeUpdate(dateTime);
+                        msSuspectedMapper.insert(msSuspected);
+                    }
+                }
+            } else {
+                Long houseId = msReportMapper.selectHouseIdByUserId(userCreate);
+                reportId = IdWorker.getId();
+                MsReport msReport = new MsReport();
+                msReport.setReportId(reportId);
+                msReport.setHouseId(houseId);
+                msReport.setSafetyNum(0);
+                msReport.setSureNum(0);
+                msReport.setSuspectedNum(0);
+                msReport.setNormalNum(0);
+                msReport.setSingleNum(0);
+                msReport.setRemarks("");
+                msReport.setReportDate(dateTime.toDate());
+                msReport.setMsStatus(0);
+                msReport.setUserCreate(userCreate);
+                msReport.setTimeCreate(dateTime);
+                msReport.setUserUpdate(userCreate);
+                msReport.setTimeUpdate(dateTime);
+                msReportMapper.insert(msReport);
+            }
+        } else {
+            Long houseId = msReportMapper.selectHouseIdByUserId(userCreate);
+            reportId = IdWorker.getId();
+            MsReport msReport = new MsReport();
+            msReport.setReportId(reportId);
+            msReport.setHouseId(houseId);
+            msReport.setSafetyNum(0);
+            msReport.setSureNum(0);
+            msReport.setSuspectedNum(0);
+            msReport.setNormalNum(0);
+            msReport.setSingleNum(0);
+            msReport.setRemarks("");
+            msReport.setReportDate(dateTime.toDate());
+            msReport.setMsStatus(0);
+            msReport.setUserCreate(userCreate);
+            msReport.setTimeCreate(dateTime);
+            msReport.setUserUpdate(userCreate);
+            msReport.setTimeUpdate(dateTime);
+            msReportMapper.insert(msReport);
+        }
+
+        return reportId;
+    }
+
+}

+ 160 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/RiBaoController.java

@@ -0,0 +1,160 @@
+package com.bofeng.wx.controller;
+
+
+import com.bofeng.entity.MsReport;
+import com.bofeng.entity.MsSuspected;
+import com.bofeng.service.MsSuspectedService;
+import com.bofeng.service.RiBaoService;
+import com.yvan.Model;
+import com.yvan.ModelOps;
+import com.yvan.mvc.Pd;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @Author: songjiaqing
+ * @Date: 2020/2/4 15:38
+ */
+@RestController
+public class RiBaoController {
+
+    @Autowired
+    private MsSuspectedService msSuspectedService;
+    @Autowired
+    private RiBaoService riBaoService;
+
+
+    private String suspected_id;
+    private String report_id;
+    private String user_name;
+    private String grender;
+    private String age;
+    private String family_status;
+    private String status_desp;
+    private String medical;
+    private String temperature;
+    private String cough;
+    private String muscle;
+    private String dyspnea;
+    private String fatigue;
+    private String diarrhea;
+    private String single_room;
+    private String suspected_status;
+    private String others;
+    private String user_create;
+    private String time_create;
+    private String user_update;
+    private String time_update;
+
+
+    //查询家人
+    @GetMapping("/riBao/getRibao")
+    public MsReport queryRibao(@Pd(name = "userCreate") Long userCreate) {
+        Long reportId = riBaoService.getNowByYesterday(userCreate);
+        MsReport msReport = riBaoService.selectById(reportId);
+        String houseStr = riBaoService.getHouseStr(msReport.getHouseId());
+        msReport.setHouseIdStr(houseStr);
+        return msReport;
+    }
+
+    // 进入日报首页
+    @GetMapping("/riBao/queryRibaoDetailList")
+    public Model<List<MsSuspected>> queryRibaoDetailList(@Pd(name = "userCreate") Long userCreate) {
+        Long reportId = riBaoService.getNowByYesterday(userCreate);
+        List<MsSuspected> listSuspected = riBaoService.queryRibaoDetailList(reportId);
+        return Model.newSuccess(listSuspected);
+    }
+
+    // 添加日报
+    @GetMapping("/riBao/addOrEditRibao")
+    public ModelOps addOrEditRibao(
+            @Pd(name = "suspectedId") Long suspectedId,
+            @Pd(name = "userName") String userName,// 家人姓名
+            @Pd(name = "grender") Integer grender,// 性别:0未设置,1男,2女
+            @Pd(name = "age") Integer age,// 年龄
+            @Pd(name = "familyStatus") Integer familyStatus,// 基本状态:0正常,1心血管疾病(服用ARB),2心血管疾病(未服用ARB),3呼吸系统病史,4肿瘤病史,5糖尿病史,6服用过激素药物,7妊娠期,8其他
+            @Pd(name = "statusDesp") String statusDesp,// 状态描述
+            @Pd(name = "medical") Integer medical,// 是否确诊:0否,1是
+            @Pd(name = "temperature") BigDecimal temperature,// 体温
+            @Pd(name = "cough") Integer cough,// 咳嗽:0无咳嗽,1偶有短暂咳嗽,2咳嗽轻度影响生活,3咳嗽严重影响生活
+            @Pd(name = "muscle") Integer muscle,// 肌肉酸痛:0无,1按压有,2偶尔,3持续有
+            @Pd(name = "dyspnea") Integer dyspnea,// 呼吸困难:0无,1急走或上坡气短,2气短而走路变慢,3走路数分钟后气短,4气短无法离开房间
+            @Pd(name = "fatigue") Integer fatigue,// 乏力:0无,1可体力劳动但觉得累,2轻体力劳动后长时间不能恢复,3不能正常生活
+            @Pd(name = "diarrhea") Integer diarrhea,// 腹泻:0无,1轻度腹泻少于于3次,2中度腹泻4-6次,3重度腹泻超过6次
+            @Pd(name = "singleRoom") Integer singleRoom,// 单间隔离:0否,1是
+//            @Pd(name = "suspectedStatus") String suspectedStatus,// 是否疑似:0否,1是
+            @Pd(name = "others") String others,// 其他
+            @Pd(name = "userCreate") Long userCreate) {
+        msSuspectedService.addSuspected(suspectedId, userName, grender, age, familyStatus, statusDesp, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, singleRoom, others, userCreate);
+        return ModelOps.newSuccess();
+    }
+
+
+    //查询家人
+    @GetMapping("/riBao/selectSuspected")
+    public MsSuspected selectSuspected(HttpServletRequest request) {
+        //初始化今日日报
+        Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
+        return msSuspectedService.selectSuspected(suspectedId);
+    }
+
+    //删除家人病例
+    @PostMapping("/riBao/deleteSuspected")
+    public Integer deleteSuspected(HttpServletRequest request) {
+        Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
+        msSuspectedService.deleteSuspected(suspectedId);
+        return 1;
+    }
+
+//    //根据登录人获取家人
+//    @GetMapping("/riBao/queryRibao")
+//    public Model<List<MsSuspected>> queryRibao(@Pd(name = "userCreate") Long userCreate) {
+//        Date t = new Date();
+//        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+//        String reportDate = df.format(t);
+//        return Model.newSuccess(msReportService.getByReportReportDate(reportDate, userCreate));
+//    }
+
+    //根据日报获取家人
+    @GetMapping("/riBao/queryRibaoRefresh")
+    public Model<List<MsSuspected>> queryRibaoRefresh(@Pd(name = "reportId") Long reportId) {
+        return Model.newSuccess(riBaoService.getByReportId(reportId));
+    }
+
+    //全家报平安
+    @PostMapping("/riBao/addReport")
+    public ModelOps addReport(HttpServletRequest request) {
+        Long userCreate = Long.parseLong(request.getParameter("userCreate"));
+        int re = riBaoService.addReport(userCreate);
+        if (re == 1) {
+            return ModelOps.newSuccess();
+        } else if (re == 2) { //没有上报体温
+            return ModelOps.newFail("请填报今日体温!");
+        }
+        return ModelOps.newFail("上报错误");
+    }
+
+    //根据日期获取家人
+    @GetMapping("/riBao/queryRibaoReportDate")
+    public Model<List<MsSuspected>> queryRibaoReportDate(
+            @Pd(name = "reportDate") String reportDate,
+            @Pd(name = "userCreate") Long userCreate) {
+//        return Model.newSuccess(riBaoService.getByReportReportDate(reportDate, userCreate));
+        return Model.newSuccess(new ArrayList<>());
+    }
+
+    //通过昨天数据更新今天数据
+    @PostMapping("/riBao/getNowByYesterday")
+    public Integer getNowByYesterday(HttpServletRequest request) {
+        Long userCreate = Long.parseLong(request.getParameter("userCreate"));
+        riBaoService.getNowByYesterday(userCreate);
+        return 1;
+    }
+}

+ 1 - 1
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -129,7 +129,7 @@ public class UserOpenController {
         ResultModel resultModel = new ResultModel();
         Long unitId = Long.parseLong(request.getParameter("unitId"));
         String doorplate = request.getParameter("doorplate");
-        List<UptownHome> list = uptownHouseMapper.getUptownHouseBy(unitId, doorplate);
+        List<UptownHouse> list = uptownHouseMapper.getUptownHouseBy(unitId, doorplate);
         if (list.size() > 0) {
             resultModel.put("success", false);
             resultModel.put("msg", "该门牌已有人入住!");

+ 1 - 0
whepi-web/src/main/resources/mapper/MsReport.xml

@@ -3,5 +3,6 @@
 <mapper namespace="com.bofeng.dao.MsReportMapper">
     <select id="selectByReportDate" resultType="com.bofeng.entity.MsReport">
         select * from ms_report where report_date = #{reportDate} and  user_create = #{userCreate}
+        order by report_date desc
     </select>
 </mapper>

+ 1 - 1
whepi-web/src/main/resources/mapper/QzTaskReplyDao.xml

@@ -7,7 +7,7 @@
      select a.task_title,a.remark,b.time_update,c.nick_name,b.reply_content,
      a.task_id,a.task_status
      from qz_task a
-     INNER JOIN qz_task_reply b on a.task_id=b.task_id
+     left JOIN qz_task_reply b on a.task_id=b.task_id
      left JOIN sys_user_open c on c.user_id=b.user_id
      where a.task_id=#{taskId}
     </select>

+ 6 - 0
whepi-web/src/main/resources/mapper/UptownHouseMapper.xml

@@ -0,0 +1,6 @@
+<?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.bofeng.dao.UptownHouseMapper">
+
+
+</mapper>