Explorar el Código

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java
peiguo hace 5 años
padre
commit
3f9bb249b3
Se han modificado 35 ficheros con 1470 adiciones y 483 borrados
  1. 26 0
      whepi-doc/login.sql
  2. 12 11
      whepi-doc/mrsb.sql
  3. 2 1
      whepi-ui/templates/home/home.ftl
  4. 23 119
      whepi-ui/templates/home/ribao.ftl
  5. 300 110
      whepi-ui/templates/home/ribao.js
  6. 1 1
      whepi-ui/templates/user/changeRole.ftl
  7. 46 2
      whepi-ui/templates/wuye/qiuzhu.ftl
  8. 37 3
      whepi-ui/templates/wuye/qiuzhu.js
  9. 8 0
      whepi-ui/templates/yeweihui/qiuzhuDetail.ftl
  10. 1 1
      whepi-ui/templates/yeweihui/ribao.ftl
  11. 2 1
      whepi-ui/templates/yeweihui/ribao.js
  12. 5 2
      whepi-ui/templates/yeweihui/ribaoXq.ftl
  13. 76 0
      whepi-ui/templates/yeweihui/ribaohuiz.ftl
  14. 60 0
      whepi-web/src/main/java/com/bofeng/controller/AdminAreaController.java
  15. 60 60
      whepi-web/src/main/java/com/bofeng/controller/AdminPlaceController.java
  16. 16 3
      whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java
  17. 5 0
      whepi-web/src/main/java/com/bofeng/dao/MsSuspectedMapper.java
  18. 27 2
      whepi-web/src/main/java/com/bofeng/dao/RbMapper.java
  19. 23 0
      whepi-web/src/main/java/com/bofeng/dao/SysAreaMapper.java
  20. 170 0
      whepi-web/src/main/java/com/bofeng/entity/ExcelRiBao.java
  21. 6 0
      whepi-web/src/main/java/com/bofeng/entity/MsReport.java
  22. 14 8
      whepi-web/src/main/java/com/bofeng/entity/MsSuspected.java
  23. 37 0
      whepi-web/src/main/java/com/bofeng/entity/SysArea.java
  24. 37 0
      whepi-web/src/main/java/com/bofeng/entity/SysAreaCom.java
  25. 29 0
      whepi-web/src/main/java/com/bofeng/entity/SysAreaStreet.java
  26. 108 29
      whepi-web/src/main/java/com/bofeng/service/MsReportService.java
  27. 124 55
      whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java
  28. 57 46
      whepi-web/src/main/java/com/bofeng/service/RbService.java
  29. 42 0
      whepi-web/src/main/java/com/bofeng/service/SysAreaService.java
  30. 50 21
      whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java
  31. 10 4
      whepi-web/src/main/java/com/bofeng/wx/controller/WuYeController.java
  32. 36 0
      whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java
  33. 3 3
      whepi-web/src/main/resources/application-dev.yml
  34. 1 1
      whepi-web/src/main/resources/application.yml
  35. 16 0
      whepi-web/src/main/resources/mapper/SysArea.xml

+ 26 - 0
whepi-doc/login.sql

@@ -113,6 +113,32 @@ CREATE TABLE sys_area  (
 ) ENGINE = InnoDB default charset=utf8 comment = '省市区表';
 ) ENGINE = InnoDB default charset=utf8 comment = '省市区表';
 
 
 -- ----------------------------
 -- ----------------------------
+-- Table structure for sys_area_street
+-- ----------------------------
+DROP TABLE IF EXISTS sys_area_street;
+CREATE TABLE sys_area_street  (
+  street_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '街道ID',
+  area_id           bigint(20) NOT NULL DEFAULT 0 COMMENT '地区ID',
+  status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
+  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
+  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (street_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8 comment = '区街道表';
+
+-- ----------------------------
+-- Table structure for sys_area_com
+-- ----------------------------
+DROP TABLE IF EXISTS sys_area_com;
+CREATE TABLE sys_area_com  (
+  com_id            bigint(20) NOT NULL DEFAULT 0 COMMENT '社区ID',
+  street_id         bigint(20) NOT NULL DEFAULT 0 COMMENT '街道ID',
+  status            int(11) NOT NULL DEFAULT 0 COMMENT '状态:1正常,0草稿,-1删除',
+  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间',
+  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
+  PRIMARY KEY (com_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8 comment = '街道社区表';
+
+-- ----------------------------
 -- Table structure for sys_uptown
 -- Table structure for sys_uptown
 -- ----------------------------
 -- ----------------------------
 DROP TABLE IF EXISTS sys_uptown;
 DROP TABLE IF EXISTS sys_uptown;

+ 12 - 11
whepi-doc/mrsb.sql

@@ -9,6 +9,7 @@ CREATE TABLE ms_report  (
   sure_num          int(11) NOT NULL DEFAULT 0                              COMMENT '确诊人数',
   sure_num          int(11) NOT NULL DEFAULT 0                              COMMENT '确诊人数',
   suspected_num     int(11) NOT NULL DEFAULT 0                              COMMENT '异常疑似人数',
   suspected_num     int(11) NOT NULL DEFAULT 0                              COMMENT '异常疑似人数',
   normal_num        int(11) NOT NULL DEFAULT 0                              COMMENT '正常人数',
   normal_num        int(11) NOT NULL DEFAULT 0                              COMMENT '正常人数',
+  single_num        int(11) NOT NULL DEFAULT 0                              COMMENT '隔离人数',
   remarks           varchar(200)  NOT NULL DEFAULT ''                       COMMENT '异常备注',
   remarks           varchar(200)  NOT NULL DEFAULT ''                       COMMENT '异常备注',
   report_date       date                                                    COMMENT '上报日期',
   report_date       date                                                    COMMENT '上报日期',
   report_status     int(11) NOT NULL DEFAULT 0                              COMMENT '上报状态:0草稿,1正常',
   report_status     int(11) NOT NULL DEFAULT 0                              COMMENT '上报状态:0草稿,1正常',
@@ -29,19 +30,19 @@ CREATE TABLE ms_suspected  (
   suspected_id      bigint(20) NOT NULL DEFAULT 0                           COMMENT '疑似ID',
   suspected_id      bigint(20) NOT NULL DEFAULT 0                           COMMENT '疑似ID',
   report_id         bigint(20) NOT NULL DEFAULT 0                           COMMENT '上报ID',
   report_id         bigint(20) NOT NULL DEFAULT 0                           COMMENT '上报ID',
   user_name         varchar(50)  NOT NULL DEFAULT ''                        COMMENT '家人姓名',
   user_name         varchar(50)  NOT NULL DEFAULT ''                        COMMENT '家人姓名',
-  grender            int(11)    NOT NULL DEFAULT 1                           COMMENT '性别:0未设置,1男,2女',
-  age               int(11)    NOT NULL DEFAULT 1                           COMMENT '年龄',
-  family_status     int(11)    NOT NULL DEFAULT 1                           COMMENT '基本状态:1心血管疾病(服用ARB),2心血管疾病(未服用ARB),3呼吸系统病史,4肿瘤病史,5糖尿病史,6服用过激素药物,7妊娠期,8其他',
+  grender            int(11)    NOT NULL DEFAULT 0                          COMMENT '性别:0未设置,1男,2女',
+  age               int(11)    NOT NULL DEFAULT 0                           COMMENT '年龄',
+  family_status     int(11)    NOT NULL DEFAULT 0                           COMMENT '基本状态:0正常,1心血管疾病(服用ARB),2心血管疾病(未服用ARB),3呼吸系统病史,4肿瘤病史,5糖尿病史,6服用过激素药物,7妊娠期,8其他',
   status_desp       varchar(100)  NOT NULL DEFAULT ''                       COMMENT '状态描述',
   status_desp       varchar(100)  NOT NULL DEFAULT ''                       COMMENT '状态描述',
-  medical           int(11)    NOT NULL DEFAULT 1                           COMMENT '是否确诊:0否,1是',
+  medical           int(11)    NOT NULL DEFAULT 0                           COMMENT '是否确诊:0否,1是',
   temperature       decimal(14,2) NOT NULL DEFAULT 0                        COMMENT '体温',
   temperature       decimal(14,2) NOT NULL DEFAULT 0                        COMMENT '体温',
-  cough             int(11)    NOT NULL DEFAULT 0                           COMMENT '咳嗽:0无咳嗽,1偶尔短暂咳嗽,2频繁咳嗽轻重,3频繁咳嗽重度',
-  muscle            int(11)    NOT NULL DEFAULT 0                           COMMENT '肌肉酸痛:0无,1加重,2好转,3无变化',
-  dyspnea           int(11)    NOT NULL DEFAULT 0                           COMMENT '呼吸困难:0无,1加重,2好转,3无变化,4严重',
-  chest             int(11)    NOT NULL DEFAULT 0                           COMMENT '胸闷:0无,1端坐呼吸,2活动无,3无变化',
-  fatigue           int(11)    NOT NULL DEFAULT 0                           COMMENT '乏力:0无,1加重,2好转,3无变化',
-  diarrhea          int(11)    NOT NULL DEFAULT 0                           COMMENT '腹泻:0无,1有',
-  diarrhea_num      int(11)    NOT NULL DEFAULT 0                           COMMENT '每日腹泻次数',
+  cough             int(11)    NOT NULL DEFAULT 0                           COMMENT '咳嗽:0无咳嗽,1偶有短暂咳嗽,2咳嗽轻度影响生活,3咳嗽严重影响生活',
+  muscle            int(11)    NOT NULL DEFAULT 0                           COMMENT '肌肉酸痛:0无,1按压有,2偶尔,3持续有',
+  dyspnea           int(11)    NOT NULL DEFAULT 0                           COMMENT '呼吸困难:0无,1急走或上坡气短,2气短而走路变慢,3走路数分钟后气短,4气短无法离开房间',
+  fatigue           int(11)    NOT NULL DEFAULT 0                           COMMENT '乏力:0无,1可体力劳动但觉得累,2轻体力劳动后长时间不能恢复,3不能正常生活',
+  diarrhea          int(11)    NOT NULL DEFAULT 0                           COMMENT '腹泻:0无,1轻度腹泻少于于3次,2中度腹泻4-6次,3重度腹泻超过6次',
+  single_room       int(11)    NOT NULL DEFAULT 0                           COMMENT '单间隔离:0否,1是',
+  suspected_status  int(11)    NOT NULL DEFAULT 0                           COMMENT '是否疑似:0否,1是',
   others            varchar(600)  NOT NULL DEFAULT ''                       COMMENT '其他',
   others            varchar(600)  NOT NULL DEFAULT ''                       COMMENT '其他',
   user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
   user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',

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

@@ -62,8 +62,9 @@
         ribao_cancel();
         ribao_cancel();
 
 
         <#if msReport ??>var msReport = ${msReport}</#if>;
         <#if msReport ??>var msReport = ${msReport}</#if>;
-        $('#ribao_safety_num').val(msReport.safetyNum);
+        $('#ribao_jinrijujian').append(msReport.safetyNum);
         ribaoInitialization(msReport.reportId);
         ribaoInitialization(msReport.reportId);
+        $("#my-input-ribao").calendar();
         /*submit_back();*/
         /*submit_back();*/
         familyClick();
         familyClick();
 
 

+ 23 - 119
whepi-ui/templates/home/ribao.ftl

@@ -12,16 +12,16 @@
             <div id="rb_nav1" class="weui-tab__bd-item ri_bao_weui_tab_bd_item_active">
             <div id="rb_nav1" class="weui-tab__bd-item ri_bao_weui_tab_bd_item_active">
                 <div id="notOpenRibao">
                 <div id="notOpenRibao">
                     <div class="weui-cells weui-cells_form">
                     <div class="weui-cells weui-cells_form">
-                        <div class="weui-cell weui-cell_vcode">
+                        <div class="weui-cell weui-cell_vcode" style="height: 7vh">
                             <div class="weui-cell__hd">
                             <div class="weui-cell__hd">
                                 <label class="weui-label">今日居家</label>
                                 <label class="weui-label">今日居家</label>
                             </div>
                             </div>
-                            <div class="weui-cell__bd">
-                                <input id="ribao_safety_num" class="weui-input" type="number" pattern="[0-2]*" placeholder="请输入今日家庭成员数量">
+                            <div class="weui-cell__bd" id="ribao_jinrijujian">
+
                             </div>
                             </div>
                             <div class="weui-cell__ft">
                             <div class="weui-cell__ft">
-                                <a id="btnAdd" href="javascript:"
-                                   class="weui-btn weui-btn_mini weui-btn_primary">病情描述</a>
+                                <button id="btnAdd" href="javascript:" style="height:5vh; margin-right: 3vh;"
+                                   class="weui-btn weui-btn_mini weui-btn_primary">添加人员</button>
                             </div>
                             </div>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -35,7 +35,7 @@
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!
                         注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!
                     </span></div>
                     </span></div>
                     <div class="weui-btn-area">
                     <div class="weui-btn-area">
-                        <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" onclick="addReport()">全家报平安</a>
+                        <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" onclick="addReport()">上报</a>
                     </div>
                     </div>
                 </div>
                 </div>
                 <div id="ribao" class="weui-btn-area" style="display: none">
                 <div id="ribao" class="weui-btn-area" style="display: none">
@@ -43,54 +43,48 @@
                     <div style="display:flex; flex-direction: row; justify-content: space-between;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between;">
                         <input id="js_input_user_name" 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; width: 30%; text-align: center;" />
                         <input id="js_input_user_name" 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; width: 30%; text-align: center;" />
                         <input id="js_input_user_sex" 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; width: 25%; text-align: center;" />
                         <input id="js_input_user_sex" 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; width: 25%; text-align: center;" />
-                        <input id="js_input_user_age" 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; width: 25%; text-align: center;" />
+                        <input id="js_input_user_age" class="weui-input" autofocus="" type="text" placeholder="年龄" maxlength="3" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 25%; text-align: center;" />
                     </div>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                         <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">基本状况</div>
                         <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">基本状况</div>
                         <input id="js_input_user_status" 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; width: 75%;" />
                         <input id="js_input_user_status" 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; width: 75%;" />
                     </div>
                     </div>
                     <textarea id="jibenmiaoshu" class="weui-textarea" placeholder="身体基本状况描述" rows="5" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
                     <textarea id="jibenmiaoshu" class="weui-textarea" placeholder="身体基本状况描述" rows="5" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
+                    <input id="suspectedId" type="text" hidden="hidden" value=""/>
+                    <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="height: 5vh; line-height: 5vh;margin-left: 2vw;">病情描述</div>
-                        <div style="width: 70%;display:flex; flex-direction: row;">
-                            <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 5vw;">是否确诊</div>
-                            <input hidden="hidden" name="switchQuezhen" id="switchQuezhen" value="off" type="radio" checked="checked"/>
-                            <div class="weui-cell__ft">
-                                <input class="weui-switch" type="checkbox" id="rb_switch" name="rb_switch">
-                            </div>
-                        </div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 40%;">是否确诊</div>
+                        <input id="switchQuezhen" 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>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">体温</div>
-                        <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="20" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 40%;">单间隔离</div>
+                        <input id="switchDanjiangeli" 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>
+
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">咳嗽</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 40%;">体温</div>
+                        <input id="js_input_user_tiwen" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="4" 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>
                         <input id="js_input_user_kesou" 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;" />
                         <input id="js_input_user_kesou" 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>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">肌肉酸痛</div>
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 40%;">肌肉酸痛</div>
                         <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;" />
                         <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>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 30%;">呼吸困难</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;" />
                         <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>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">乏力</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 40%;">乏力</div>
                         <input id="js_input_user_fali" 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;" />
                         <input id="js_input_user_fali" 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>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 30%;">腹泻</div>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 40%;">腹泻</div>
                         <input id="js_input_user_fuxie" 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;" />
                         <input id="js_input_user_fuxie" 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>
-                    <div style="display:flex; flex-direction: row; margin-top: 1vh;">
-                        <div style="color: gray;height: 5vh; line-height: 5vh; margin-right: 2vw;">是否单间隔离</div>
-                        <input hidden="hidden" name="js_input_user_danjiangeli" id="switchQuezhen" value="off" type="radio" checked="checked"/>
-                        <div class="weui-cell__ft">
-                            <input class="weui-switch" type="checkbox" id="rb_switch_2" name="rb_switch">
-                        </div>
-                    </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
                         <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 13%;">其他</div>
                         <div style="color: gray;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 13%;">其他</div>
                         <textarea id="shuruqita" class="weui-textarea" placeholder="输入内容(300字内)" rows="5" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
                         <textarea id="shuruqita" class="weui-textarea" placeholder="输入内容(300字内)" rows="5" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
@@ -104,96 +98,6 @@
                         <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default" style="width: 30%;">取消</a>
                         <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default" style="width: 30%;">取消</a>
                         <a id="commit" href="javascript:;" onclick="ribaoCommit();" class="weui-btn weui-btn_primary" style="margin-top: 0;width: 30%;">提交</a>
                         <a id="commit" href="javascript:;" onclick="ribaoCommit();" class="weui-btn weui-btn_primary" style="margin-top: 0;width: 30%;">提交</a>
                     </div>
                     </div>
-                    <#--                    <div class="weui-form__control-area">-->
-<#--                        <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="js_input_user_name" class="weui-input" autofocus="" type="text"-->
-<#--                                               placeholder="请输入姓名" maxlength="20">-->
-<#--                                    </div>-->
-<#--                                </div>-->
-<#--                                <div class="weui-cells weui-cells_checkbox">-->
-<#--                                    <label class="weui-cell weui-cell_active weui-check__label" for="s11">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" class="weui-check" name="checkbox1" id="s11">-->
-<#--                                            <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="s12">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" name="checkbox2" class="weui-check" id="s12">-->
-<#--                                            <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="s13">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" name="checkbox3" class="weui-check" id="s13">-->
-<#--                                            <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="s14">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" name="checkbox4" class="weui-check" id="s14">-->
-<#--                                            <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="s15">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" name="checkbox5" class="weui-check" id="s15">-->
-<#--                                            <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="s16">-->
-<#--                                        <div class="weui-cell__hd">-->
-<#--                                            <input type="checkbox" name="checkbox6" class="weui-check" id="s16">-->
-<#--                                            <i class="weui-icon-checked"></i>-->
-<#--                                        </div>-->
-<#--                                        <div class="weui-cell__bd">-->
-<#--                                            <p>其他</p>-->
-<#--                                        </div>-->
-<#--                                    </label>-->
-<#--                                </div>-->
-<#--                                <div class="weui-cell ">-->
-<#--                                    <div class="weui-cell__bd">-->
-<#--                                        <textarea id="rb_remarks" class="weui-textarea" placeholder="请输入病情描述"-->
-<#--                                                  rows="3"></textarea>-->
-<#--                                        <div class="weui-textarea-counter"><span>0</span>/100</div>-->
-<#--                                    </div>-->
-<#--                                </div>-->
-<#--                                <div class="weui-cell weui-cell_switch">-->
-<#--                                    <div class="weui-cell__bd">是否确诊</div>-->
-<#--                                    <div class="weui-cell__ft">-->
-<#--                                        <input class="weui-switch" type="checkbox" name="medical"/>-->
-<#--                                    </div>-->
-<#--                                </div>-->
-<#--                            </div>-->
-<#--                        </div>-->
-<#--                    </div>-->
-<#--                    <div class="weui-cells__tips"> <span style="color: red">-->
-<#--                        注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!-->
-<#--                    </span></div>-->
-<#--                    <div class="button-sp-area">-->
-<#--                        <a id="cancel" href="javascript:;" class="weui-btn weui-btn_default">取消</a>-->
-<#--                        <a id="commit" href="javascript:;" onclick="ribaoCommit();"-->
-<#--                           class="weui-btn weui-btn_primary">提交</a>-->
-<#--                    </div>-->
                 </div>
                 </div>
                 </br>
                 </br>
                 </br>
                 </br>

+ 300 - 110
whepi-ui/templates/home/ribao.js

@@ -1,6 +1,6 @@
 function ribao_init() {
 function ribao_init() {
 
 
-  $("#js_input_user_sex").val("女");   //设置初始值
+  // $("#js_input_user_sex").val(getGreder(2));   //设置初始值
 
 
   $('#btnRB').on('click', function () {
   $('#btnRB').on('click', function () {
     window.location.href = "/yeweihui/home.html";
     window.location.href = "/yeweihui/home.html";
@@ -23,7 +23,7 @@ function ribao_init() {
     title: "选择基本状况",
     title: "选择基本状况",
     items: [
     items: [
       {
       {
-        title: "正常",
+        title: "无病史",
         value: "0",
         value: "0",
       }, {
       }, {
         title: "心脑血管疾病(服用ARB)",
         title: "心脑血管疾病(服用ARB)",
@@ -66,15 +66,15 @@ function ribao_init() {
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "偶短暂咳嗽",
+        title: "偶短暂咳嗽",
         value: "1",
         value: "1",
       },
       },
       {
       {
-        title: "频繁咳嗽轻度影响生活",
+        title: "咳嗽轻度影响生活",
         value: "2",
         value: "2",
       },
       },
       {
       {
-        title: "频繁咳嗽重影响生活",
+        title: "咳嗽重影响生活",
         value: "3",
         value: "3",
       }]
       }]
   });
   });
@@ -87,15 +87,15 @@ function ribao_init() {
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "加重",
+        title: "按压有",
         value: "1",
         value: "1",
       },
       },
       {
       {
-        title: "好转",
+        title: "偶尔",
         value: "2",
         value: "2",
       },
       },
       {
       {
-        title: "无变化",
+        title: "持续有",
         value: "3",
         value: "3",
       }]
       }]
   });
   });
@@ -108,85 +108,110 @@ function ribao_init() {
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "加重",
+        title: "急走或上坡气短",
         value: "1",
         value: "1",
       },
       },
       {
       {
-        title: "好转",
+        title: "气短而走路变慢",
         value: "2",
         value: "2",
       },
       },
       {
       {
-        title: "无变化",
+        title: "走路数分钟后气短",
         value: "3",
         value: "3",
       },
       },
       {
       {
-        title: "严重",
+        title: "气短无法离开房间",
         value: "4",
         value: "4",
       }]
       }]
   });
   });
 
 
-  $("#js_input_user_danjiangeli").select({
-    title: "选择胸闷情况",
+  $("#js_input_user_fali").select({
+    title: "选择乏力情况",
     items: [
     items: [
       {
       {
         title: "无",
         title: "无",
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "",
+        title: "可体力劳动但觉得累",
         value: "1",
         value: "1",
+      },
+      {
+        title: "轻体力劳动后长时间不能恢复",
+        value: "2",
+      },
+      {
+        title: "不能正常生活",
+        value: "3",
       }]
       }]
   });
   });
 
 
-  $("#js_input_user_fali").select({
-    title: "选择乏力情况",
+  $("#js_input_user_fuxie").select({
+    title: "选择腹泻情况",
     items: [
     items: [
       {
       {
         title: "无",
         title: "无",
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "加重",
+        title: "轻度腹泻(少于3次)",
         value: "1",
         value: "1",
       },
       },
       {
       {
-        title: "好转",
+        title: "中度腹泻(4-6次)",
         value: "2",
         value: "2",
       },
       },
       {
       {
-        title: "无变化",
+        title: "重度腹泻(超过6次)",
         value: "3",
         value: "3",
       }]
       }]
   });
   });
 
 
-  $("#js_input_user_fuxie").select({
-    title: "选择乏力情况",
+  $("#switchQuezhen").select({
+    title: "选择是否确诊",
     items: [
     items: [
       {
       {
-        title: "",
+        title: "",
         value: "0",
         value: "0",
       },
       },
       {
       {
-        title: "",
+        title: "",
         value: "1",
         value: "1",
       }]
       }]
   });
   });
 
 
-  $("#rb_switch").bind("click", function () {
-    if ($("#switchQuezhen").val() == "off") {
-      $("#switchQuezhen").val("on");
-    } else {
-      $("#switchQuezhen").val("off");
-    }
-  });
-
-  $("#rb_switch2").bind("click", function () {
-    if ($("#js_input_user_danjiangeli").val() == "off") {
-      $("#js_input_user_danjiangeli").val("on");
-    } else {
-      $("#js_input_user_danjiangeli").val("off");
-    }
+  $("#switchDanjiangeli").select({
+    title: "选择是否单间隔离",
+    items: [
+      {
+        title: "否",
+        value: "0",
+      },
+      {
+        title: "是",
+        value: "1",
+      }]
   });
   });
+  //
+  // updateSuspected({
+  //   userName : 'www',
+  //   grender : 2,
+  //   age : 34,
+  //   familyStatus : 1,
+  //   statusDesp : "",
+  //   medical:0,
+  //   singleRoom:1,
+  //   temperature:0,
+  //   cough:2,
+  //   muscle:1,
+  //   dyspnea:1,
+  //   fatigue:1,
+  //   diarrhea:2,
+  //   others:""
+  // })
+  //
+  // var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
+  // console.log("grender:" + grender)
 }
 }
 
 
 //近日报告
 //近日报告
@@ -208,7 +233,7 @@ function ribaoInitialization(reportId) {
           ribao_cell(v);
           ribao_cell(v);
         });
         });
       } else {
       } else {
-        $('#btn_shangbao').text('全家报平安');
+        $('#btn_shangbao').text('上报');
       }
       }
     },
     },
     error: function () {
     error: function () {
@@ -251,26 +276,45 @@ function ribao_cell(v) {
   var userName = v.userName + ":";
   var userName = v.userName + ":";
   var grender = getGreder(v.grender);
   var grender = getGreder(v.grender);
   var age = v.age;
   var age = v.age;
-  var familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
-  var medical = "是否确诊:" + getGreder(v.grender) + ";";
+  var familyStatus = "";
+  if (v.familyStatus != 0)
+    familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+  var medical = "";
+  if (v.medical != 0)
+    medical = "是否确诊:" + getMedical(v.medical) + ";";
+  var singleRoom = "";
+  if (v.singleRoom != 0)
+    singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
   var temperature = "体温:" + v.temperature + ";";
   var temperature = "体温:" + v.temperature + ";";
-  var cough = "咳嗽:" + getCough(v.cough) + ";";
-  var muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
-  var dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
-  var chest = "胸闷:" + getChest(v.chest) + ";";
-  var fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
-  var diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
-  var diarrheaNum = "腹泻次数:" + v.diarrheaNum + "次;";
-  var others = "其他:" + v.others;
-  $('#rb_family').append($('<div class="weui-media-box weui-media-box_text">\n' +
-    '                                      <h4 class="weui-media-box__title">' + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a></h4>\n' +
-    '                                      <p class="weui-media-box__desc">' + familyStatus + medical + temperature + cough + muscle + dyspnea + chest + fatigue + diarrhea + diarrheaNum + others + '</p>\n' +
+  var cough = "";
+  if (v.cough != 0)
+    cough = "咳嗽:" + getCough(v.cough) + ";";
+  var muscle = "";
+  if (v.muscle != 0)
+    muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
+  var dyspnea = "";
+  if (v.dyspnea != 0)
+    dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
+  var fatigue = "";
+  if (v.fatigue != 0)
+    fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
+  var diarrhea = "";
+  if (v.diarrhea != 0)
+    diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
+  var others = "";
+  if (v.others != "")
+    others = "其他:" + v.others;
+  $('#rb_family').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 + '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #bc4246" onclick=\'deleteSuspected(' + JSON.stringify(v.suspectedId) + ')\'>删除</a>\n' +
+    '                                      &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a style="color: #2a62bc" onclick=\'updateSuspected(' + JSON.stringify(v.suspectedId) + ')\'>修改</a></h4>\n' +
+    '                                      <p class="weui-media-box__desc" style="height: 80%">' + familyStatus + medical + singleRoom + temperature + cough + muscle + dyspnea + fatigue + diarrhea + others + '</p>\n' +
     '                                    </div>\n' +
     '                                    </div>\n' +
     '                              '));
     '                              '));
 }
 }
 
 
 function ribao_add() {
 function ribao_add() {
   $('#btnAdd').on('click', function () {
   $('#btnAdd').on('click', function () {
+    $("#suspectedId").val("");
     if ($('#ribao')[0].style.display == 'none') {
     if ($('#ribao')[0].style.display == 'none') {
       $('#notOpenRibao').toggle();
       $('#notOpenRibao').toggle();
       $('#ribao')[0].style.display = '';
       $('#ribao')[0].style.display = '';
@@ -283,6 +327,7 @@ function ribao_add() {
 
 
 function ribao_cancel() {
 function ribao_cancel() {
   $('#cancel').on('click', function () {
   $('#cancel').on('click', function () {
+
     if ($('#ribao')[0].style.display == 'none') {
     if ($('#ribao')[0].style.display == 'none') {
       $('#notOpenRibao').toggle();
       $('#notOpenRibao').toggle();
       $('#ribao')[0].style.display = '';
       $('#ribao')[0].style.display = '';
@@ -290,6 +335,7 @@ function ribao_cancel() {
       $('#notOpenRibao')[0].style.display = '';
       $('#notOpenRibao')[0].style.display = '';
       $('#ribao')[0].style.display = 'none';
       $('#ribao')[0].style.display = 'none';
     }
     }
+    clearShow();
   });
   });
 }
 }
 
 
@@ -311,29 +357,58 @@ function ribaoCommit() {
   //     "乏力", $("#js_input_user_fali").val(),
   //     "乏力", $("#js_input_user_fali").val(),
   //     "腹泻", $("#js_input_user_fuxie").val(),
   //     "腹泻", $("#js_input_user_fuxie").val(),
   //     "次数", $("#js_input_user_cishu").val(),
   //     "次数", $("#js_input_user_cishu").val(),
-  //     "其他", $("#shuruqita").val(),
+  //     "其他", $("#shuruqita").val()
   // );
   // );
   // return;
   // return;
+
+
+  var suspectedId = $("#suspectedId").val();
   var userId = $("#userId").val();
   var userId = $("#userId").val();
   var userName = $("#js_input_user_name").val();
   var userName = $("#js_input_user_name").val();
   var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
   var grender = $("#js_input_user_sex").attr("data-values") == undefined ? 0 : $("#js_input_user_sex").attr("data-values");
-  var age = $("#js_input_user_age").val()== "" ? 0 :  $("#js_input_user_age").val();
+  var age = $("#js_input_user_age").val();
   var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
   var familyStatus = $("#js_input_user_status").attr("data-values") == undefined ? 0 : $("#js_input_user_status").attr("data-values");
-  var statusDesp = $("#jibenmiaoshu").val()== undefined ? "" : $("#jibenmiaoshu").val();
-  var medical = $("#switchQuezhen").val() == "on" ? 1 : 0;
-  var temperature = $("#js_input_user_tiwen").val()== "" ? 0 : $("#js_input_user_tiwen").val();
+  var statusDesp = $("#jibenmiaoshu").val() == undefined ? "" : $("#jibenmiaoshu").val();
+  var medical = $("#switchQuezhen").attr("data-values") == undefined ? 0 : $("#switchQuezhen").attr("data-values");
+  var singleRoom = $("#switchDanjiangeli").attr("data-values") == undefined ? 0 : $("#switchDanjiangeli").attr("data-values");
+  var temperature = $("#js_input_user_tiwen").val() == "" ? 0 : $("#js_input_user_tiwen").val();
   var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
   var cough = $("#js_input_user_kesou").attr("data-values") == undefined ? 0 : $("#js_input_user_kesou").attr("data-values");
   var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
   var muscle = $("#js_input_user_jirou").attr("data-values") == undefined ? 0 : $("#js_input_user_jirou").attr("data-values");
   var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
   var dyspnea = $("#js_input_user_huxi").attr("data-values") == undefined ? 0 : $("#js_input_user_huxi").attr("data-values");
-  var chest = $("#js_input_user_xiongmen").attr("data-values") == undefined ? 0 : $("#js_input_user_xiongmen").attr("data-values");
   var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
   var fatigue = $("#js_input_user_fali").attr("data-values") == undefined ? 0 : $("#js_input_user_fali").attr("data-values");
   var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
   var diarrhea = $("#js_input_user_fuxie").attr("data-values") == undefined ? 0 : $("#js_input_user_fuxie").attr("data-values");
-  var diarrheaNum = $("#js_input_user_cishu").val()== "" ? 0 : $("#jibenmiaoshu").val();
-  var others = $("#shuruqita").val()== undefined ? "" : $("#jibenmiaoshu").val();
+  var others = $("#shuruqita").val() == undefined ? "" : $("#shuruqita").val();
+
+  if (userName == undefined || userName == '') {
+    alert("请填写姓名");
+    return;
+  }
+  if (age == undefined || age == '') {
+    alert("请填写年龄");
+    return;
+  }
+  if (age.length > 3) {
+    alert("请填写正确的年龄");
+    return;
+  }
+  if (grender == 0) {
+    alert("请填写性别");
+    return;
+  }
+  if (temperature <= 0) {
+    alert("请填写体温");
+    return;
+  }
+  if (temperature.length > 4) {
+    alert("请填写正确的体温");
+    return;
+  }
+
   $.ajax({
   $.ajax({
     url: '/home/addRibao',
     url: '/home/addRibao',
     type: "post",
     type: "post",
     data: {
     data: {
+      "suspectedId": suspectedId,
       "userCreate": userId,
       "userCreate": userId,
       "userName": userName,
       "userName": userName,
       "grender": grender,
       "grender": grender,
@@ -341,14 +416,13 @@ function ribaoCommit() {
       "familyStatus": familyStatus,
       "familyStatus": familyStatus,
       "statusDesp": statusDesp,
       "statusDesp": statusDesp,
       "medical": medical,
       "medical": medical,
+      "singleRoom": singleRoom,
       "temperature": temperature,
       "temperature": temperature,
       "cough": cough,
       "cough": cough,
       "muscle": muscle,
       "muscle": muscle,
       "dyspnea": dyspnea,
       "dyspnea": dyspnea,
-      "chest": chest,
       "fatigue": fatigue,
       "fatigue": fatigue,
       "diarrhea": diarrhea,
       "diarrhea": diarrhea,
-      "diarrheaNum": diarrheaNum,
       "others": others,
       "others": others,
     },
     },
     success: function (data) {
     success: function (data) {
@@ -359,7 +433,13 @@ function ribaoCommit() {
         $('#notOpenRibao')[0].style.display = '';
         $('#notOpenRibao')[0].style.display = '';
         $('#ribao')[0].style.display = 'none';
         $('#ribao')[0].style.display = 'none';
       }
       }
+      $('#ribao_jinrijujian').empty();
+      $('#ribao_jinrijujian').append(data.safetyNum);
+
       ribao_refrash();
       ribao_refrash();
+
+      clearShow();
+
     },
     },
   });
   });
 }
 }
@@ -372,28 +452,83 @@ function deleteSuspected(suspectedId) {
       "suspectedId": suspectedId
       "suspectedId": suspectedId
     },
     },
     success: function (data) {
     success: function (data) {
+      $('#ribao_jinrijujian').empty();
+      $('#ribao_jinrijujian').append(data.safetyNum);
       ribao_refrash();
       ribao_refrash();
     },
     },
   });
   });
 }
 }
 
 
+function updateSuspected(suspectedId) {
+  $("#suspectedId").val("");
+  if ($('#ribao')[0].style.display == 'none') {
+    $('#notOpenRibao').toggle();
+    $('#ribao')[0].style.display = '';
+  } else {
+    $('#notOpenRibao')[0].style.display = '';
+    $('#ribao')[0].style.display = 'none';
+  }
+  $.ajax({
+    url: '/home/selectSuspected',
+    get: "get",
+    data: {
+      "suspectedId": suspectedId
+    },
+    success: function (data) {
+      // console.log(data);
+      if (data) {
+        var suspected = data;
+        $("#suspectedId").val(suspected.suspectedId);
+        $("#js_input_user_sex").val(getGreder(suspected.grender));
+        $("#js_input_user_sex").attr("data-values", suspected.grender);
+        $("#js_input_user_name").val(suspected.userName);
+        $("#js_input_user_age").val(suspected.age);
+        $("#js_input_user_status").val(getFamilyStatus(suspected.familyStatus));
+        $("#js_input_user_status").attr("data-values", suspected.familyStatus);
+
+        $("#jibenmiaoshu").val(suspected.statusDesp);
+
+        $("#switchQuezhen").val(getMedical(suspected.medical));
+        $("#switchQuezhen").attr("data-values", suspected.familyStatus);
+
+        $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
+        $("#switchDanjiangeli").attr("data-values", suspected.familyStatus);
+
+        $("#js_input_user_tiwen").val(suspected.temperature);
+
+        $("#js_input_user_kesou").val(getCough(suspected.cough));
+        $("#js_input_user_kesou").attr("data-values", suspected.cough);
+
+        $("#js_input_user_jirou").val(getMuscle(suspected.muscle));
+        $("#js_input_user_jirou").attr("data-values", suspected.muscle);
+
+        $("#js_input_user_huxi").val(getDyspnea(suspected.dyspnea));
+        $("#js_input_user_huxi").attr("data-values", suspected.dyspnea);
+
+        $("#js_input_user_fali").val(getFatigue(suspected.fatigue));
+        $("#js_input_user_fali").attr("data-values", suspected.fatigue);
+
+        $("#js_input_user_fuxie").val(getDiarrhea(suspected.diarrhea));
+        $("#js_input_user_fuxie").attr("data-values", suspected.diarrhea);
+
+        $("#shuruqita").val(suspected.others);
+      }
+    },
+  });
+
+}
+
 
 
 function addReport() {
 function addReport() {
   var userId = $("#userId").val();
   var userId = $("#userId").val();
-  var safety_num = $("#ribao_safety_num").val();
-  if (safety_num == "") {
-    alert("请填写居家人数");
-    return;
-  }
   $.ajax({
   $.ajax({
     url: '/home/addReport',
     url: '/home/addReport',
     type: "post",
     type: "post",
     data: {
     data: {
       "userCreate": userId,
       "userCreate": userId,
-      "safetyNum": safety_num,
     },
     },
     success: function (data) {
     success: function (data) {
-      $.toast("操作成功");
+      $.toast(data.msg);
     },
     },
   });
   });
 }
 }
@@ -437,20 +572,37 @@ function helpValue1(v) {
   var userName = v.userName + ":";
   var userName = v.userName + ":";
   var grender = getGreder(v.grender);
   var grender = getGreder(v.grender);
   var age = v.age;
   var age = v.age;
-  var familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
-  var medical = "是否确诊:" + getGreder(v.grender) + ";";
+  var familyStatus = "";
+  if (v.familyStatus != 0)
+    familyStatus = "基本状况:" + getFamilyStatus(v.familyStatus) + ";";
+  var medical = "";
+  if (v.medical != 0)
+      medical = "是否确诊:" + getMedical(v.medical) + ";";
+  var singleRoom = "";
+  if (v.singleRoom != 0)
+      singleRoom = "单间隔离:" + getSingleRoom(v.singleRoom) + ";";
   var temperature = "体温:" + v.temperature + ";";
   var temperature = "体温:" + v.temperature + ";";
-  var cough = "咳嗽:" + getCough(v.cough) + ";";
-  var muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
-  var dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
-  var chest = "胸闷:" + getChest(v.chest) + ";";
-  var fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
-  var diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
-  var diarrheaNum = "腹泻次数:" + v.diarrheaNum + "次;";
-  var others = "其他:" + v.others;
-  $('#ribao_famliy').append($('<div class="weui-media-box weui-media-box_text">\n' +
-    '                                      <h4 class="weui-media-box__title">'  + userName + '&nbsp;&nbsp;&nbsp;' + grender + '&nbsp;&nbsp;&nbsp;' + age  + '</h4>\n' +
-    '                                      <p class="weui-media-box__desc">' +familyStatus + medical + temperature + cough + muscle + dyspnea + chest + fatigue + diarrhea + diarrheaNum + others  + '</p>\n' +
+  var cough = "";
+  if (v.cough != 0)
+      cough = "咳嗽:" + getCough(v.cough) + ";";
+  var muscle = "";
+  if (v.muscle != 0)
+      muscle = "肌肉酸痛:" + getMuscle(v.muscle) + ";";
+  var dyspnea = "";
+  if (v.dyspnea != 0)
+       dyspnea = "呼吸困难:" + getDyspnea(v.dyspnea) + ";";
+  var fatigue = "";
+  if (v.fatigue != 0)
+      fatigue = "乏力:" + getFatigue(v.fatigue) + ";";
+  var diarrhea = "";
+  if (v.diarrhea != 0)
+      diarrhea = "腹泻:" + getDiarrhea(v.diarrhea) + ";";
+  var others = "";
+  if (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' +
     '                                    </div>\n' +
     '                                    </div>\n' +
     '                              '));
     '                              '));
 }
 }
@@ -466,7 +618,7 @@ function getGreder(greder) {
 
 
 function getFamilyStatus(familyStatus) {
 function getFamilyStatus(familyStatus) {
   if (familyStatus == 0)
   if (familyStatus == 0)
-    return "正常";
+    return "无病史";
   if (familyStatus == 1)
   if (familyStatus == 1)
     return "心脑血管疾病(服用ARB)";
     return "心脑血管疾病(服用ARB)";
   else if (familyStatus == 2)
   else if (familyStatus == 2)
@@ -492,9 +644,9 @@ function getCough(cough) {
   else if (cough == 1)
   else if (cough == 1)
     return "偶尔短暂咳嗽";
     return "偶尔短暂咳嗽";
   else if (cough == 2)
   else if (cough == 2)
-    return "频繁咳嗽轻度影响生活";
+    return "咳嗽轻度影响生活";
   else if (cough == 3)
   else if (cough == 3)
-    return "频繁咳嗽重影响生活";
+    return "咳嗽重影响生活";
   return "";
   return "";
 }
 }
 
 
@@ -502,11 +654,11 @@ function getMuscle(muscle) {
   if (muscle == 0)
   if (muscle == 0)
     return "无";
     return "无";
   else if (muscle == 1)
   else if (muscle == 1)
-    return "加重";
+    return "按压有";
   else if (muscle == 2)
   else if (muscle == 2)
-    return "好转";
+    return "偶尔";
   else if (muscle == 3)
   else if (muscle == 3)
-    return "无变化";
+    return "持续有";
   return "";
   return "";
 }
 }
 
 
@@ -514,25 +666,13 @@ function getDyspnea(dyspnea) {
   if (dyspnea == 0)
   if (dyspnea == 0)
     return "无";
     return "无";
   else if (dyspnea == 1)
   else if (dyspnea == 1)
-    return "加重";
+    return "急走或上坡气短";
   else if (dyspnea == 2)
   else if (dyspnea == 2)
-    return "好转";
+    return "气短而走路变慢";
   else if (dyspnea == 3)
   else if (dyspnea == 3)
-    return "无变化";
+    return "走路数分钟后气短";
   else if (dyspnea == 4)
   else if (dyspnea == 4)
-    return "严重";
-  return "";
-}
-
-function getChest(chest) {
-  if (chest == 0)
-    return "无";
-  else if (chest == 1)
-    return "端坐呼吸";
-  else if (chest == 2)
-    return "活动无耐力";
-  else if (chest == 3)
-    return "无变化";
+    return "气短无法离开房间";
   return "";
   return "";
 }
 }
 
 
@@ -540,19 +680,27 @@ function getFatigue(fatigue) {
   if (fatigue == 0)
   if (fatigue == 0)
     return "无";
     return "无";
   else if (fatigue == 1)
   else if (fatigue == 1)
-    return "加重";
+    return "可体力劳动但觉得累";
   else if (fatigue == 2)
   else if (fatigue == 2)
-    return "好转";
+    return "轻体力劳动后长时间不能恢复";
   else if (fatigue == 3)
   else if (fatigue == 3)
-    return "无变化";
+    return "不能正常生活";
   return "";
   return "";
 }
 }
 
 
 function getMedical(medical) {
 function getMedical(medical) {
   if (medical == 0)
   if (medical == 0)
-    return "为确诊";
+    return "";
   else if (medical == 1)
   else if (medical == 1)
-    return "确诊";
+    return "是";
+  return "";
+}
+
+function getSingleRoom(singleRoom) {
+  if (singleRoom == 0)
+    return "否";
+  else if (singleRoom == 1)
+    return "是";
   return "";
   return "";
 }
 }
 
 
@@ -561,8 +709,50 @@ function getDiarrhea(diarrhea) {
   if (diarrhea == 0)
   if (diarrhea == 0)
     return "无";
     return "无";
   else if (diarrhea == 1)
   else if (diarrhea == 1)
-    return "有";
+    return "轻度腹泻(少于3次)";
+  else if (diarrhea == 2)
+    return "中度腹泻(4-6次)";
+  else if (diarrhea == 3)
+    return "重度腹泻(超过6次)";
   return "";
   return "";
 }
 }
 
 
+function clearShow() {
+  console.log("qingkong")
+  $("#suspectedId").val("");
+  $("#js_input_user_sex").val("");
+  $("#js_input_user_sex").attr("data-values", "");
+  $("#js_input_user_name").val("");
+  $("#js_input_user_age").val("");
+  $("#js_input_user_status").val("");
+  $("#js_input_user_status").attr("data-values", "");
+
+  $("#jibenmiaoshu").val("");
+
+  $("#switchQuezhen").val("");
+  $("#switchQuezhen").attr("data-values", "");
+
+  $("#switchDanjiangeli").val("");
+  $("#switchDanjiangeli").attr("data-values", "");
+
+  $("#js_input_user_tiwen").val("");
+
+  $("#js_input_user_kesou").val("");
+  $("#js_input_user_kesou").attr("data-values", "");
+
+  $("#js_input_user_jirou").val("");
+  $("#js_input_user_jirou").attr("data-values", "");
+
+  $("#js_input_user_huxi").val("");
+  $("#js_input_user_huxi").attr("data-values", "");
+
+  $("#js_input_user_fali").val("");
+  $("#js_input_user_fali").attr("data-values", "");
+
+  $("#js_input_user_fuxie").val("");
+  $("#js_input_user_fuxie").attr("data-values", "");
+
+  $("#shuruqita").val("");
+}
+
 
 

+ 1 - 1
whepi-ui/templates/user/changeRole.ftl

@@ -13,7 +13,7 @@
                         <br/>
                         <br/>
                         <h1 class="user-title">家园抗击疫情公共服务平台</h1>
                         <h1 class="user-title">家园抗击疫情公共服务平台</h1>
                         <br/>
                         <br/>
-                        <h1 class="user-title"><#if user ??>${user.nickName!''}</#if>登</h1>
+                        <h1 class="user-title"><#if user ??>${user.nickName!''}</#if>登</h1>
                         <br/>
                         <br/>
                         <br/>
                         <br/>
                         <br/>
                         <br/>

+ 46 - 2
whepi-ui/templates/wuye/qiuzhu.ftl

@@ -10,8 +10,6 @@
         </div>
         </div>
         <div class="weui-tab__panel">
         <div class="weui-tab__panel">
             <div id="qz_nav1" class="weui-tab__bd-item qiu_zhu_weui_tab_bd_item_active">
             <div id="qz_nav1" class="weui-tab__bd-item qiu_zhu_weui_tab_bd_item_active">
-                <div id="notitle">
-                </div>
                 <div class="weui-cells__title"></div>
                 <div class="weui-cells__title"></div>
                 <div class="weui-cells">
                 <div class="weui-cells">
                     <a class="weui-cell weui-cell_access" href="javascript:dateSelect();">
                     <a class="weui-cell weui-cell_access" href="javascript:dateSelect();">
@@ -26,15 +24,61 @@
             <#--<div class="weui-flex__item">-->
             <#--<div class="weui-flex__item">-->
             <#--<div class="placeholder">今日新增</div>-->
             <#--<div class="placeholder">今日新增</div>-->
             <#--<div class="">1</div>-->
             <#--<div class="">1</div>-->
+            <#--<div class="">1</div>-->
+            <#--<div class="">1</div>-->
             <#--</div>-->
             <#--</div>-->
             <#--<div class="weui-flex__item">-->
             <#--<div class="weui-flex__item">-->
             <#--<div class="placeholder">今日已处理</div>-->
             <#--<div class="placeholder">今日已处理</div>-->
             <#--<div class="">2</div>-->
             <#--<div class="">2</div>-->
+            <#--<div class="">2</div>-->
+            <#--<div class="">2</div>-->
             <#--</div>-->
             <#--</div>-->
             <#--<div class="weui-flex__item">-->
             <#--<div class="weui-flex__item">-->
             <#--<div class="placeholder">今日未处理</div>-->
             <#--<div class="placeholder">今日未处理</div>-->
             <#--<div class="">3</div>-->
             <#--<div class="">3</div>-->
+            <#--<div class="">3</div>-->
+            <#--<div class="">3</div>-->
+            <#--</div>-->
+            <#--</div>-->
+                <div class="weui-search-bar" id="search_bar">
+                    <form class="weui-search-bar__form">
+                        <div class="weui-search-bar__box">
+                            <i class="weui-icon-search"></i>
+                            <input type="search" class="weui-search-bar__input" id="search_input" placeholder="搜索"/>
+                            <a href="javascript:" class="weui-icon-clear" id="search_clear"></a>
+                        </div>
+                        <label for="search_input" class="weui-search-bar__label" id="search_text">
+                            <i class="weui-icon-search"></i>
+                            <span>搜索</span>
+                        </label>
+                    </form>
+                    <a href="javascript:" class="weui-search-bar__cancel-btn" id="search_cancel">取消</a>
+                </div>
+                <div id="userHelpList"></div>
+            <#--<div class="weui-cells__title">带说明、跳转的列表项</div>-->
+            <#--<div class="weui-cells">-->
+            <#--<a class="weui-cell weui-cell_access" href="javascript:;">-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell standard</p>-->
+            <#--</div>-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell standard</p>-->
+            <#--</div>-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell standard</p>-->
+            <#--</div>-->
+            <#--</a>-->
+            <#--<a class="weui-cell weui-cell_access" href="javascript:;">-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell</p>-->
+            <#--</div>-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell standard</p>-->
+            <#--</div>-->
+            <#--<div class="weui-cell__bd">-->
+            <#--<p>cell standard</p>-->
             <#--</div>-->
             <#--</div>-->
+            <#--</a>-->
             <#--</div>-->
             <#--</div>-->
             </div>
             </div>
         </div>
         </div>

+ 37 - 3
whepi-ui/templates/wuye/qiuzhu.js

@@ -1,7 +1,8 @@
 function qiuzhu_init() {
 function qiuzhu_init() {
   //统计求助及处理数据
   //统计求助及处理数据
   analyData();
   analyData();
-  //求组信息列表
+  //求助信息列表
+  getQZList();
 }
 }
 
 
 function analyData() {
 function analyData() {
@@ -14,7 +15,7 @@ function analyData() {
       console.log(data);
       console.log(data);
       if (data.data != null && data.data != undefined) {
       if (data.data != null && data.data != undefined) {
         hasData = true;
         hasData = true;
-        getHelpData(data.data);
+        makeAnalyUi(data.data);
       } else {
       } else {
 
 
       }
       }
@@ -24,7 +25,7 @@ function analyData() {
   });
   });
 }
 }
 
 
-function getHelpData(data) {
+function makeAnalyUi(data) {
   $('#userHelpAnaly').append($('<div class="weui-flex"> \n' +
   $('#userHelpAnaly').append($('<div class="weui-flex"> \n' +
     '                   <div class="weui-flex__item">\n' +
     '                   <div class="weui-flex__item">\n' +
     '                       <div class="placeholder">已解决总数</div>\n' +
     '                       <div class="placeholder">已解决总数</div>\n' +
@@ -41,6 +42,39 @@ function getHelpData(data) {
     '               </div>'));
     '               </div>'));
 }
 }
 
 
+function getQZList() {
+  $('#userHelpAnaly').empty();//清除节点
+  $.ajax({
+    url: '/wuye/userHelpAnaly1',
+    data: {queryDate: '2020-02-05', userId: 0},
+    type: 'GET',
+    success: function (data) {
+      console.log(data);
+      if (data.data != null && data.data != undefined) {
+        hasData = true;
+        makeListUi(data);
+      } else {
+
+      }
+    },
+    error: function () {
+    }
+  });
+}
+
+function makeListUi(data) {
+  $('#userHelpList').empty();
+  $('#userHelpList').append($('<div class="weui-cells">'));
+  data.data.forEach(function (v) {
+    $('#userHelpList').append($('<a class="weui-cell weui-cell_access" href="javascript:;">'));
+    $('#userHelpList').append($('<div class="weui-cell__bd"><p>' + v.totalDo + '</p></div>'));
+    $('#userHelpList').append($('<div class="weui-cell__bd"><p>' + v.totalDoing + '</p></div>'));
+    $('#userHelpList').append($('<div class="weui-cell__bd"><p>' + v.totalDonot + '</p></div>'));
+    $('#userHelpList').append($('</a>'));
+  });
+  $('#userHelpList').append($('</div>'));
+}
+
 //我的求助的页面展示
 //我的求助的页面展示
 function dateSelect() {
 function dateSelect() {
   weui.datePicker({
   weui.datePicker({

+ 8 - 0
whepi-ui/templates/yeweihui/qiuzhuDetail.ftl

@@ -2,6 +2,10 @@
 <#include "/home/frag.head.ftl" />
 <#include "/home/frag.head.ftl" />
 
 
 <div class="weui-tab">
 <div class="weui-tab">
+    <div class="weui-btn-area" style="display: flex; flex-direction: row;">
+        <a class="weui-btn weui-btn_primary" href="javascript:goback();" style="width: 25vw; height: 6vh; line-height: 6vh;">返回</a>
+        <div style="width: 65%;"></div>
+    </div>
 
 
     <div class="weui-btn-area">
     <div class="weui-btn-area">
 
 
@@ -97,6 +101,10 @@
         });
         });
     }
     }
 
 
+    function goback() {
+        history.back();
+    }
+
     function getdealdetail() {
     function getdealdetail() {
         $.ajax({
         $.ajax({
             url: '/yeweihui/qiuzhu/reply/querybytaskid.json',
             url: '/yeweihui/qiuzhu/reply/querybytaskid.json',

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

@@ -79,7 +79,7 @@
                     var td;
                     var td;
 
 
                     if(v.msStatus == 2 && v.reportStatus == 1){//异常
                     if(v.msStatus == 2 && v.reportStatus == 1){//异常
-                        td = '<td style="background-color: yellow" align="center" value="'+v.houseId+'"><a style="height: 100%;width: 100%;background-color: yellow" onclick=\'ribao_ycxq('+JSON.stringify(v.houseId) +');\'>'+v.doorplate+'</a></td>';
+                        td = '<td style="background-color: green" align="center" value="'+v.houseId+'"><p style="height: 100%;width: 100%;background-color: yellow" onclick=\'ribao_ycxq('+JSON.stringify(v.houseId) +');\'>'+v.doorplate+'</p></td>';
                     }else if(v.msStatus != 2 && v.reportStatus == 1 && v.msStatus != null && v.reportStatus !=null){//已报
                     }else if(v.msStatus != 2 && v.reportStatus == 1 && v.msStatus != null && v.reportStatus !=null){//已报
                         td = '<td style="background-color: #0bb20c" align="center">'+v.doorplate+'</td>';
                         td = '<td style="background-color: #0bb20c" align="center">'+v.doorplate+'</td>';
                     }else if(v.reportStatus == 1 || v.reportStatus == 0){//待报
                     }else if(v.reportStatus == 1 || v.reportStatus == 0){//待报

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

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

+ 5 - 2
whepi-ui/templates/yeweihui/ribaoXq.ftl

@@ -24,6 +24,7 @@
                             <tr>
                             <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>
                                 <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>
                                 <td style="background-color: lightgrey" align="center">身体正常</td>
                             </tr>
                             </tr>
@@ -86,12 +87,14 @@
                         $("#msh3").text(v.ridgepole+"栋"+v.unit+"单元"+v.doorplate+"室");
                         $("#msh3").text(v.ridgepole+"栋"+v.unit+"单元"+v.doorplate+"室");
                         var t1 = $('<td align="center">'+v.safetyNum+'</td>');
                         var t1 = $('<td align="center">'+v.safetyNum+'</td>');
                         var t2 = $('<td align="center">'+v.sureNum+'</td>');
                         var t2 = $('<td align="center">'+v.sureNum+'</td>');
-                        var t3 = $('<td align="center">'+v.suspectedNum+'</td>');
-                        var t4 = $('<td align="center">'+(v.safetyNum-v.sureNum-v.suspectedNum)+'</td>');
+                        var t3 = $('<td align="center">'+v.singleNum+'</td>');//隔离
+                        var t4 = $('<td align="center">'+v.suspectedNum+'</td>');
+                        var t5 = $('<td align="center">'+v.normalNum+'</td>');
                         $("#zc").append(t1);
                         $("#zc").append(t1);
                         $("#zc").append(t2);
                         $("#zc").append(t2);
                         $("#zc").append(t3);
                         $("#zc").append(t3);
                         $("#zc").append(t4);
                         $("#zc").append(t4);
+                        $("#zc").append(t5);
                     }
                     }
 
 
                     var tr = $("<tr></tr>");
                     var tr = $("<tr></tr>");

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

+ 60 - 0
whepi-web/src/main/java/com/bofeng/controller/AdminAreaController.java

@@ -0,0 +1,60 @@
+// package com.bofeng.controller;
+//
+// import com.bofeng.Consts;
+// import com.bofeng.entity.Place;
+// import com.bofeng.service.PlaceService;
+// import com.google.common.base.Strings;
+// import com.yvan.Model;
+// import com.yvan.ModelOps;
+// import com.yvan.mvc.Pd;
+// import lombok.val;
+// import org.apache.shiro.authz.annotation.RequiresPermissions;
+// 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.RequestBody;
+// import org.springframework.web.bind.annotation.RestController;
+// import org.springframework.web.servlet.ModelAndView;
+//
+// import java.util.List;
+//
+// @RestController
+// @RequiresPermissions(Consts.USER_TYPE_ADMIN)
+// public class AdminAreaController {
+//
+//     @Autowired
+//     private PlaceService placeService;
+//
+//     @GetMapping("/admin/place.html")
+//     public ModelAndView placeView() {
+//         return new ModelAndView("/admin/place.ftl");
+//     }
+//
+//     @GetMapping("/admin/sysArea")
+//     public Model<List<Place>> getArea() {
+//         return Model.newSuccess(placeService.selectAll());
+//     }
+//
+//     @PostMapping("/admin/place_addnew.json")
+//     public ModelOps placeAddNew(@RequestBody Place place) {
+//         val msg = placeService.insert(place);
+//         if (Strings.isNullOrEmpty(msg)) {
+//             return ModelOps.newSuccess();
+//         }
+//         return ModelOps.newFail(msg);
+//     }
+//
+//     @PostMapping("/admin/place_edit")
+//     public ModelOps placeEdit(@RequestBody Place place) {
+//         val msg = placeService.updateById(place);
+//         if (Strings.isNullOrEmpty(msg)) {
+//             return ModelOps.newSuccess();
+//         }
+//         return ModelOps.newFail(msg);
+//     }
+//
+//     @PostMapping("/admin/place_delete.json")
+//     public ModelOps placeDelete(@Pd(name = "placeId", desc = "") Long placeId) {
+//         return ModelOps.newSuccess(placeService.deleteById(placeId));
+//     }
+// }

+ 60 - 60
whepi-web/src/main/java/com/bofeng/controller/AdminPlaceController.java

@@ -1,60 +1,60 @@
-package com.bofeng.controller;
-
-import com.bofeng.Consts;
-import com.bofeng.entity.Place;
-import com.bofeng.service.PlaceService;
-import com.google.common.base.Strings;
-import com.yvan.Model;
-import com.yvan.ModelOps;
-import com.yvan.mvc.Pd;
-import lombok.val;
-import org.apache.shiro.authz.annotation.RequiresPermissions;
-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.RequestBody;
-import org.springframework.web.bind.annotation.RestController;
-import org.springframework.web.servlet.ModelAndView;
-
-import java.util.List;
-
-@RestController
-@RequiresPermissions(Consts.USER_TYPE_ADMIN)
-public class AdminPlaceController {
-
-    @Autowired
-    private PlaceService placeService;
-
-    @GetMapping("/admin/place.html")
-    public ModelAndView placeView() {
-        return new ModelAndView("/admin/place.ftl");
-    }
-
-    @GetMapping("/admin/place.json")
-    public Model<List<Place>> getPlace() {
-        return Model.newSuccess(placeService.selectAll());
-    }
-
-    @PostMapping("/admin/place_addnew.json")
-    public ModelOps placeAddNew(@RequestBody Place place) {
-        val msg = placeService.insert(place);
-        if (Strings.isNullOrEmpty(msg)) {
-            return ModelOps.newSuccess();
-        }
-        return ModelOps.newFail(msg);
-    }
-
-    @PostMapping("/admin/place_edit")
-    public ModelOps placeEdit(@RequestBody Place place) {
-        val msg = placeService.updateById(place);
-        if (Strings.isNullOrEmpty(msg)) {
-            return ModelOps.newSuccess();
-        }
-        return ModelOps.newFail(msg);
-    }
-
-    @PostMapping("/admin/place_delete.json")
-    public ModelOps placeDelete(@Pd(name = "placeId", desc = "") Long placeId) {
-        return ModelOps.newSuccess(placeService.deleteById(placeId));
-    }
-}
+// package com.bofeng.controller;
+//
+// import com.bofeng.Consts;
+// import com.bofeng.entity.Place;
+// import com.bofeng.service.PlaceService;
+// import com.google.common.base.Strings;
+// import com.yvan.Model;
+// import com.yvan.ModelOps;
+// import com.yvan.mvc.Pd;
+// import lombok.val;
+// import org.apache.shiro.authz.annotation.RequiresPermissions;
+// 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.RequestBody;
+// import org.springframework.web.bind.annotation.RestController;
+// import org.springframework.web.servlet.ModelAndView;
+//
+// import java.util.List;
+//
+// @RestController
+// @RequiresPermissions(Consts.USER_TYPE_ADMIN)
+// public class AdminPlaceController {
+//
+//     @Autowired
+//     private PlaceService placeService;
+//
+//     // @GetMapping("/admin/place.html")
+//     // public ModelAndView placeView() {
+//     //     return new ModelAndView("/admin/place.ftl");
+//     // }
+//
+//     @GetMapping("/admin/place.json")
+//     public Model<List<Place>> getPlace() {
+//         return Model.newSuccess(placeService.selectAll());
+//     }
+//
+//     @PostMapping("/admin/place_addnew.json")
+//     public ModelOps placeAddNew(@RequestBody Place place) {
+//         val msg = placeService.insert(place);
+//         if (Strings.isNullOrEmpty(msg)) {
+//             return ModelOps.newSuccess();
+//         }
+//         return ModelOps.newFail(msg);
+//     }
+//
+//     @PostMapping("/admin/place_edit")
+//     public ModelOps placeEdit(@RequestBody Place place) {
+//         val msg = placeService.updateById(place);
+//         if (Strings.isNullOrEmpty(msg)) {
+//             return ModelOps.newSuccess();
+//         }
+//         return ModelOps.newFail(msg);
+//     }
+//
+//     @PostMapping("/admin/place_delete.json")
+//     public ModelOps placeDelete(@Pd(name = "placeId", desc = "") Long placeId) {
+//         return ModelOps.newSuccess(placeService.deleteById(placeId));
+//     }
+// }

+ 16 - 3
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -7,6 +7,7 @@ import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 import org.apache.ibatis.annotations.Select;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
+import java.math.BigDecimal;
 import java.util.List;
 import java.util.List;
 
 
 /**
 /**
@@ -17,13 +18,25 @@ import java.util.List;
 @Repository
 @Repository
 public interface MsReportMapper extends BaseMapper<MsReport> {
 public interface MsReportMapper extends BaseMapper<MsReport> {
 
 
-    List<MsReport> selectByReportDate(@Param("reportDate") String reportDate,@Param("userCreate") Long userCreate);
+    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")
     @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}")
     @Select("select count(*) from ms_suspected where report_id=#{reportId} and  medical=#{medical}")
-    Integer selectSuspectedNum(@Param("reportId") Long reportId,@Param("medical") Integer medical);
+    Integer selectSuspectedNum(@Param("reportId") Long reportId, @Param("medical") Integer medical);
+
+    //隔离
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and  single_room=#{singleRoom}")
+    Integer selectSingleRoomNum(@Param("reportId") Long reportId, @Param("singleRoom") Integer singleRoom);
+
+    //正常
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and  suspected_status=0")
+    Integer selectisSuspectedNum(@Param("reportId") Long reportId);
+
+    //疑似
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and suspected_status=1")
+    Integer selectisNoSuspectedNum(@Param("reportId") Long reportId);
 
 
 }
 }

+ 5 - 0
whepi-web/src/main/java/com/bofeng/dao/MsSuspectedMapper.java

@@ -6,6 +6,7 @@ import com.bofeng.entity.MsReport;
 import com.bofeng.entity.MsSuspected;
 import com.bofeng.entity.MsSuspected;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
 import org.springframework.stereotype.Repository;
 import org.springframework.stereotype.Repository;
 
 
 import java.util.List;
 import java.util.List;
@@ -19,4 +20,8 @@ import java.util.List;
 public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
 public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
 
 
     List<MsSuspected> selectByReportId(@Param("reportId") Long reportId);
     List<MsSuspected> selectByReportId(@Param("reportId") Long reportId);
+
+    //判断家人姓名是否重复
+    @Select("select count(*) from ms_suspected where report_id=#{reportId} and user_name=#{userName}")
+    Integer selectUserNameNum(@Param("reportId") Long reportId,@Param("userName") String userName);
 }
 }

+ 27 - 2
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -31,13 +31,38 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     List<sysUptownUnit> selectDY(@Param("userId") Long userId);
     List<sysUptownUnit> selectDY(@Param("userId") Long userId);
 
 
 
 
-    @Select("select e.ridgepole as ridgepole,e.unit as unit,b.doorplate as doorplate,a.safety_num as safetyNum,a.sure_num as sureNum,a.suspected_num as suspectedNum," +
+    @Select("select a.normal_num as normalNum,e.ridgepole as ridgepole,e.unit as unit,b.doorplate as doorplate,a.safety_num as safetyNum,a.sure_num as sureNum,a.suspected_num as suspectedNum," +
             "c.user_name as userName,c.cough as cough,c.muscle as muscle,c.dyspnea as dyspnea," +
             "c.user_name as userName,c.cough as cough,c.muscle as muscle,c.dyspnea as dyspnea," +
-            "c.chest as chest,c.fatigue as fatigue,c.diarrhea as diarrhea,c.others as others " +
+            "c.fatigue as fatigue,c.diarrhea as diarrhea,c.others as others,c.single_room as singleRoom,a.single_num as singleNum " +
             "from ms_report a " +
             "from ms_report a " +
             "inner join sys_uptown_house b on b.house_id = a.house_id " +
             "inner join sys_uptown_house b on b.house_id = a.house_id " +
             "inner join sys_uptown_unit e on e.unit_id = b.unit_id " +
             "inner join sys_uptown_unit e on e.unit_id = b.unit_id " +
             "left join ms_suspected c on c.report_id = a.report_id " +
             "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}")
             "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);
     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," +
+                    "msr.single_num as singleNum,mss.user_name as userName,mss.grender," +
+            "mss.age,mss.family_status as familyStatus,mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea," +
+            "mss.fatigue,mss.diarrhea,mss.single_room as singleRoom from ms_suspected mss "+
+            "inner join ms_report msr on msr.report_id = mss.report_id and msr.report_date = #{date} "+
+            "inner join sys_uptown_house suh on suh.house_id = msr.house_id "+
+            "inner join sys_uptown_unit suu on suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId} "+
+            "left join sys_uptown_home suho on suho.house_id = suh.house_id"
+    )
+    List<ExcelRiBao> selectExcelRiBao(@Param("uptownId") Long uptownId, @Param("date") String date);
+
+    @Select(
+            "select u.* from sys_user_role ur " +
+                    "left join sys_uptown_house up on up.house_id = ur.property_id " +
+                    "left join sys_uptown_unit uu on uu.unit_id = up.unit_id " +
+                    "left join sys_uptown u on u.uptown_id = uu.uptown_id " +
+                    "where ur.role_id = 1 and ur.user_id = #{userId} "
+    )
+    List<Uptown> selectUptown(@Param("userId") Long userId);
 }
 }

+ 23 - 0
whepi-web/src/main/java/com/bofeng/dao/SysAreaMapper.java

@@ -0,0 +1,23 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.SysArea;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+import java.util.List;
+
+@Mapper
+@Repository
+public interface SysAreaMapper extends BaseMapper<SysArea> {
+
+    //暂时只显示湖北省
+    List<SysArea> selectProvince();
+
+    //暂时只显示湖北省下的城市
+    List<SysArea> selectCityByProvince();
+
+    //暂时只显示武汉市下的区
+    List<SysArea> selectAreaByCity();
+
+}

+ 170 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBao.java

@@ -0,0 +1,170 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.google.common.base.Strings;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+@Getter
+@Setter
+public class ExcelRiBao {
+
+    private String ridgepole;
+    private String unit;
+    private String doorplate;
+    private int grender;
+    private int familyStatus;
+    private int medical;
+    private BigDecimal temperature;
+    private int cough;
+    private int muscle;
+    private int dyspnea;
+    private int fatigue;
+    private int diarrhea;
+    private int singleRoom;
+    private String statusDesp = "";
+    private String others = "";
+
+
+    @ExcelProperty(value = "楼栋", index = 0)
+    private String loudong = "";
+
+    public String getLoudong() {
+        if (loudong.length() <= 0) {
+            loudong = ridgepole + "栋" + unit + "单元";
+        }
+        return loudong;
+    }
+
+    @ExcelProperty(value = "房号", index = 1)
+    private String fanghao = "";
+
+    public String getFanghao() {
+        if (fanghao.length() <= 0) {
+            fanghao = doorplate;
+        }
+        return fanghao;
+    }
+
+    @ExcelProperty(value = "联系人", index = 2)
+    private String linkman;
+
+    @ExcelProperty(value = "联系电话", index = 3)
+    private String phone;
+
+    @ExcelProperty(value = "今日居家人数", index = 4)
+    private int safetyNum;
+
+    @ExcelProperty(value = "确诊入院人数", index = 5)
+    private int sureNum;
+
+    @ExcelProperty(value = "隔离人数", index = 6)
+    private int singleNum;
+
+    @ExcelProperty(value = "异常观察人数", index = 7)
+    private int suspectedNum;
+
+    @ExcelProperty(value = "身体正常人数", index = 8)
+    private int normalNum;
+
+    @ExcelProperty(value = "居家人员姓名", index = 9)
+    private String userName;
+
+    @ExcelProperty(value = "性别", index = 10)
+    private String grenderStr;
+
+    public String getGrenderStr() {
+        if (grender == 1) {
+            grenderStr = "男";
+        } else if (grender == 2) {
+            grenderStr = "女";
+        } else {
+            grenderStr = "未知";
+        }
+        return grenderStr;
+    }
+
+    @ExcelProperty(value = "年龄", index = 11)
+    private String age;
+
+    @ExcelProperty(value = "身体基本情况", index = 12)
+    private String baseDesc;
+    public String getBaseDesc() {
+        if (familyStatus == 0) {
+            baseDesc = "无病史";
+        } else if (familyStatus == 1) {
+            baseDesc = "心血管疾病(服用ARB)";
+        } else if (familyStatus == 2) {
+            baseDesc = "心血管疾病(未服用ARB)";
+        } else if (familyStatus == 3) {
+            baseDesc = "呼吸系统病史";
+        } else if (familyStatus == 4) {
+            baseDesc = "肿瘤病史";
+        } else if (familyStatus == 5) {
+            baseDesc = "糖尿病史";
+        } else if (familyStatus == 6) {
+            baseDesc = "服用过激素药物";
+        } else if (familyStatus == 7) {
+            baseDesc = "妊娠期";
+        } else {
+            baseDesc = "其他";
+        }
+        return baseDesc;
+    }
+
+    @ExcelProperty(value = "病情描述", index = 13)
+    private String bingqingDesc = "";
+    public String getBingqingDesc() {
+
+        if (cough == 1) {
+            bingqingDesc += "偶尔短暂咳嗽、";
+        } else if (cough == 2) {
+            bingqingDesc += "咳嗽轻度影响生活、";
+        } else if (cough == 3) {
+            bingqingDesc += "咳嗽严重影响生活、";
+        }
+        if (muscle == 1) {
+            bingqingDesc += "肌肉按压有酸痛、";
+        } else if (muscle == 2) {
+            bingqingDesc += "偶尔肌肉按压酸痛、";
+        } else if (muscle == 3) {
+            bingqingDesc += "肌肉按压持续酸痛、";
+        }
+        if (dyspnea == 1) {
+            bingqingDesc += "呼吸急走或上坡气短、";
+        } else if (dyspnea == 2) {
+            bingqingDesc += "呼吸气短而走路变慢、";
+        } else if (dyspnea == 3) {
+            bingqingDesc += "呼吸走路数分钟后气短、";
+        } else if (dyspnea == 4) {
+            bingqingDesc += "呼吸气短无法离开房间、";
+        }
+        if (fatigue == 1) {
+            bingqingDesc += "可体力劳动但觉得累、";
+        } else if (fatigue == 2) {
+            bingqingDesc += "轻体力劳动后长时间不能恢复、";
+        } else if (fatigue == 3) {
+            bingqingDesc += "不能正常生活、";
+        }
+        if (diarrhea == 1) {
+            bingqingDesc += "轻度腹泻少于于3次、";
+        } else if (diarrhea == 2) {
+            bingqingDesc += "中度腹泻4-6次、";
+        } else if (diarrhea == 3) {
+            bingqingDesc += "重度腹泻超过6次、";
+        }
+        if (singleRoom == 1) {
+            bingqingDesc += "单间隔离、";
+        }
+        if (!Strings.isNullOrEmpty(statusDesp)) {
+            bingqingDesc += statusDesp;
+            bingqingDesc += "、";
+        }
+        if (!Strings.isNullOrEmpty(others)) {
+            bingqingDesc += others;
+        }
+        return bingqingDesc;
+    }
+}

+ 6 - 0
whepi-web/src/main/java/com/bofeng/entity/MsReport.java

@@ -35,6 +35,12 @@ public class MsReport {
     @TableField("suspected_num")
     @TableField("suspected_num")
     private Integer suspectedNum;
     private Integer suspectedNum;
 
 
+    @TableField("normal_num")
+    private Integer normalNum;
+
+    @TableField("single_num")
+    private Integer singleNum;
+
     @TableField("remarks")
     @TableField("remarks")
     private String remarks;
     private String remarks;
 
 

+ 14 - 8
whepi-web/src/main/java/com/bofeng/entity/MsSuspected.java

@@ -65,12 +65,6 @@ public class MsSuspected {
     @TableField(exist = false)
     @TableField(exist = false)
     private String dyspneaStr;
     private String dyspneaStr;
 
 
-    @TableField("chest")
-    private Integer chest;
-
-    @TableField(exist = false)
-    private String chestStr;
-
     @TableField("fatigue")
     @TableField("fatigue")
     private Integer fatigue;
     private Integer fatigue;
 
 
@@ -86,8 +80,11 @@ public class MsSuspected {
     @TableField(exist = false)
     @TableField(exist = false)
     private String zhengzhuang;
     private String zhengzhuang;
 
 
-    @TableField("diarrhea_num")
-    private Integer diarrheaNum;
+    @TableField("single_room")
+    private Integer singleRoom;
+
+    @TableField("suspected_status")
+    private Integer suspectedStatus;
 
 
     @TableField("others")
     @TableField("others")
     private String others;
     private String others;
@@ -117,6 +114,9 @@ public class MsSuspected {
     private Integer qz;
     private Integer qz;
 
 
     @TableField(exist = false)
     @TableField(exist = false)
+    private Integer normalNum;
+
+    @TableField(exist = false)
     private String ridgepole;
     private String ridgepole;
 
 
     @TableField(exist = false)
     @TableField(exist = false)
@@ -124,4 +124,10 @@ public class MsSuspected {
 
 
     @TableField(exist = false)
     @TableField(exist = false)
     private String doorplate;
     private String doorplate;
+
+    @TableField(exist = false)
+    private Integer singleNum;
+
+    @TableField(exist = false)
+    private String singleRoomStr;
 }
 }

+ 37 - 0
whepi-web/src/main/java/com/bofeng/entity/SysArea.java

@@ -0,0 +1,37 @@
+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.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@TableName("SYS_AREA")
+public class SysArea {
+
+    @ApiModelProperty("地区ID")
+    @TableId("AREA_ID")
+    private Long areaId;
+
+    @ApiModelProperty("省")
+    @TableField("PROVINCE")
+    private String province;
+
+    @ApiModelProperty("市")
+    @TableField("CITY")
+    private String city;
+
+    @ApiModelProperty("区")
+    @TableField("AREA")
+    private String area;
+
+    @ApiModelProperty("状态:1正常,0草稿,-1删除")
+    @TableField("STATUS")
+    private int status;
+
+}

+ 37 - 0
whepi-web/src/main/java/com/bofeng/entity/SysAreaCom.java

@@ -0,0 +1,37 @@
+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.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@TableName("SYS_AREA")
+public class SysAreaCom {
+
+    @ApiModelProperty("地区ID")
+    @TableId("AREA_ID")
+    private Long areaId;
+
+    @ApiModelProperty("省")
+    @TableField("PROVINCE")
+    private String province;
+
+    @ApiModelProperty("市")
+    @TableField("CITY")
+    private String city;
+
+    @ApiModelProperty("区")
+    @TableField("AREA")
+    private String area;
+
+    @ApiModelProperty("状态:1正常,0草稿,-1删除")
+    @TableField("STATUS")
+    private int status;
+
+}

+ 29 - 0
whepi-web/src/main/java/com/bofeng/entity/SysAreaStreet.java

@@ -0,0 +1,29 @@
+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.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+@Getter
+@Setter
+@ToString
+@TableName("SYS_AREA_STREET")
+public class SysAreaStreet {
+
+    @ApiModelProperty("街道ID")
+    @TableId("STREET_ID")
+    private Long streetId;
+
+    @ApiModelProperty("地区ID")
+    @TableField("AREA_ID")
+    private Long areaId;
+
+    @ApiModelProperty("状态:1正常,0草稿,-1删除")
+    @TableField("STATUS")
+    private int status;
+
+}

+ 108 - 29
whepi-web/src/main/java/com/bofeng/service/MsReportService.java

@@ -12,7 +12,9 @@ import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Propagation;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.transaction.annotation.Transactional;
 
 
+import java.math.BigDecimal;
 import java.text.SimpleDateFormat;
 import java.text.SimpleDateFormat;
+import java.util.Calendar;
 import java.util.Date;
 import java.util.Date;
 import java.util.List;
 import java.util.List;
 
 
@@ -21,18 +23,25 @@ import java.util.List;
  * @Date: 2020/2/4 15:44
  * @Date: 2020/2/4 15:44
  */
  */
 @Service
 @Service
-@Transactional(readOnly = true)
+@Transactional()
 public class MsReportService {
 public class MsReportService {
 
 
     @Autowired
     @Autowired
     private MsSuspectedMapper msSuspectedMapper;
     private MsSuspectedMapper msSuspectedMapper;
     @Autowired
     @Autowired
     private MsReportMapper msReportMapper;
     private MsReportMapper msReportMapper;
+    @Autowired
+    private MsReportService msReportService;
 
 
     public List<MsSuspected> getByReportId(Long reportId) {
     public List<MsSuspected> getByReportId(Long reportId) {
         return msSuspectedMapper.selectByReportId(reportId);
         return msSuspectedMapper.selectByReportId(reportId);
     }
     }
 
 
+    public MsReport getByReport(Long reportId) {
+        return msReportMapper.selectById(reportId);
+    }
+
+    //获取前一天数据
     public List<MsSuspected> getByReportReportDate(String reportDate, Long userCreate) {
     public List<MsSuspected> getByReportReportDate(String reportDate, Long userCreate) {
 
 
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
@@ -43,7 +52,10 @@ public class MsReportService {
         return listSuspected;
         return listSuspected;
     }
     }
 
 
+    //获取今天数据
     public MsReport getReportByDateNow(Long userCreate) {
     public MsReport getReportByDateNow(Long userCreate) {
+        //根据昨天的获取今天的
+        msReportService.getNowByYesterday(userCreate);
         Date t = new Date();
         Date t = new Date();
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
         String reportDate = df.format(t);
         String reportDate = df.format(t);
@@ -55,44 +67,111 @@ public class MsReportService {
         return msReport;
         return msReport;
     }
     }
 
 
+    //上报
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
-    public void addReport(String safetyNum, Long userCreate) {
-        //如果是当前日期 已经添加
+    public Integer addReport(Long userCreate) {
         Date t = new Date();
         Date t = new Date();
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
         SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
         String reportDate = df.format(t);
         String reportDate = df.format(t);
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
-        Long houseId = msReportMapper.selectHouseIdByUserId(userCreate);
-        if (listReport == null || listReport.size() == 0) {
-            MsReport msReport = new MsReport();
-            msReport.setReportId(IdWorker.getId());
-            msReport.setHouseId(houseId);
-            msReport.setSafetyNum(Integer.parseInt(safetyNum));
-            msReport.setSuspectedNum(0);
-            msReport.setRemarks("");
-            msReport.setReportDate(DateTime.now().toDate());
+        if (listReport == null || listReport.size() == 0)
+            return 0;
+
+        //判断体温是否填写
+        List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
+        if (listSuspected == null || listSuspected.size() == 0)
+            return 3;
+        else {
+            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.setReportStatus(1);
-            msReport.setMsStatus(1);
-            msReport.setUserCreate(userCreate);
-            msReport.setTimeCreate(DateTime.now());
             msReport.setUserUpdate(userCreate);
             msReport.setUserUpdate(userCreate);
             msReport.setTimeUpdate(DateTime.now());
             msReport.setTimeUpdate(DateTime.now());
-            msReportMapper.insert(msReport);
-        } else {
-            //更新居家成员
-            MsReport msReport = msReportMapper.selectById(listReport.get(0).getReportId());
+            msReportMapper.updateById(msReport);
+        }
+        return 1;
+    }
+
+    //通过昨天数据更新今天数据
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public void getNowByYesterday(Long userCreate) {
+
+        SimpleDateFormat sj = new SimpleDateFormat("yyyy-MM-dd");
+        Date d = new Date();
+
+        //判断今天是否有数据
+        String DateNow = sj.format(d);
+        List<MsReport> listReport = msReportMapper.selectByReportDate(DateNow, userCreate);
+        if (listReport != null && listReport.size() > 0)
+            return;
+
+        //判断昨天是否有数据
+        Calendar calendar = Calendar.getInstance();
+        calendar.setTime(d);
+        calendar.add(Calendar.DATE, -1);
+        String reportDate = sj.format(calendar.getTime());
+        List<MsReport> listReport1 = msReportMapper.selectByReportDate(reportDate, userCreate);
+        //有数据
+        if (listReport1 != null && listReport1.size() > 0) {
+            //添加到今天日报
+            MsReport msReport = msReportMapper.selectById(Long.parseLong(listReport1.get(0).getReportId().toString()));
+            Long reportId = 0L;
             if (msReport != null) {
             if (msReport != null) {
-                List<MsSuspected> list= msSuspectedMapper.selectByReportId(msReport.getReportId());
-                if(list==null || list.size()==0)
-                    msReport.setMsStatus(1);
-                else
-                    msReport.setMsStatus(2);
-                msReport.setReportStatus(1);
-                msReport.setSafetyNum(Integer.parseInt(safetyNum));
-                msReport.setUserUpdate(0L);
-                msReport.setTimeUpdate(DateTime.now());
-                msReportMapper.updateById(msReport);
+                MsReport msReport1 = new MsReport();
+                msReport1.setReportId(IdWorker.getId());
+                msReport1.setHouseId(msReport.getHouseId());
+                msReport1.setSafetyNum(msReport.getSafetyNum());
+                msReport1.setSureNum(msReport.getSureNum());
+                msReport1.setSuspectedNum(msReport.getSuspectedNum());
+                msReport1.setNormalNum(msReport.getNormalNum());
+                msReport1.setSingleNum(msReport.getSingleNum());
+                msReport1.setRemarks(msReport.getRemarks());
+                msReport1.setReportDate(DateTime.now().toDate());
+                msReport1.setReportStatus(0);//未上报
+                msReport1.setMsStatus(msReport.getMsStatus());
+                msReport1.setUserCreate(userCreate);
+                msReport1.setTimeCreate(DateTime.now());
+                msReport1.setUserUpdate(userCreate);
+                msReport1.setTimeUpdate(DateTime.now());
+                msReportMapper.insert(msReport1);
+                reportId = msReport1.getReportId();
+            }
+            //添加今日家庭
+            List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport1.get(0).getReportId().toString()));
+            if (listSuspected != null && listSuspected.size() > 0) {
+                for (MsSuspected msSuspected : listSuspected) {
+                    MsSuspected msSuspected1 = new MsSuspected();
+                    msSuspected1.setSuspectedId(IdWorker.getId());
+                    msSuspected1.setReportId(reportId);
+                    msSuspected1.setUserName(msSuspected.getUserName());
+                    msSuspected1.setGrender(msSuspected.getGrender());
+                    msSuspected1.setAge(msSuspected.getAge());
+                    msSuspected1.setFamilyStatus(msSuspected.getFamilyStatus());
+                    msSuspected1.setStatusDesp(msSuspected.getStatusDesp());
+                    msSuspected1.setMedical(msSuspected.getMedical());
+                    msSuspected1.setTemperature(new BigDecimal(0));
+                    msSuspected1.setCough(msSuspected.getCough());
+                    msSuspected1.setMuscle(msSuspected.getMuscle());
+                    msSuspected1.setDiarrhea(msSuspected.getDiarrhea());
+                    msSuspected1.setFatigue(msSuspected.getFatigue());
+                    msSuspected1.setDiarrhea(msSuspected.getDiarrhea());
+                    msSuspected1.setSingleRoom(msSuspected.getSingleRoom());
+                    msSuspected1.setOthers(msSuspected.getOthers());
+                    msSuspected1.setSuspectedStatus(0);
+                    msSuspected1.setUserCreate(userCreate);
+                    msSuspected1.setTimeCreate(DateTime.now());
+                    msSuspected1.setUserUpdate(userCreate);
+                    msSuspected1.setTimeUpdate(DateTime.now());
+                    msSuspectedMapper.insert(msSuspected1);
+                }
             }
             }
         }
         }
     }
     }
+
 }
 }

+ 124 - 55
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -31,11 +31,17 @@ public class MsSuspectedService {
     @Autowired
     @Autowired
     private MsReportMapper msReportMapper;
     private MsReportMapper msReportMapper;
 
 
+    //查询家人
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public MsSuspected selectSuspected(long suspectedId) {
+        return msSuspectedMapper.selectById(suspectedId);
+    }
 
 
+    //添加家人
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
-    public void addSuspected(String userName, Integer grender, Integer age, Integer familyStatus,
+    public Long addSuspected(Long suspectedId, String userName, Integer grender, Integer age, Integer familyStatus,
                              String statusDesp, Integer medical, BigDecimal temperature, Integer cough, Integer muscle,
                              String statusDesp, Integer medical, BigDecimal temperature, Integer cough, Integer muscle,
-                             Integer dyspnea, Integer chest, Integer fatigue, Integer diarrhea, Integer diarrheaNum, String others, Long userCreate) {
+                             Integer dyspnea, Integer fatigue, Integer diarrhea, Integer singleRoom, String others, Long userCreate) {
         Long reportId = 0L;
         Long reportId = 0L;
         //如果是当前日期 已经添加
         //如果是当前日期 已经添加
         Date t = new Date();
         Date t = new Date();
@@ -43,15 +49,19 @@ public class MsSuspectedService {
         String reportDate = df.format(t);
         String reportDate = df.format(t);
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
         List<MsReport> listReport = msReportMapper.selectByReportDate(reportDate, userCreate);
         Long houseId = msReportMapper.selectHouseIdByUserId(userCreate);
         Long houseId = msReportMapper.selectHouseIdByUserId(userCreate);
+        //首次进入。没有今日报告
         if (listReport == null || listReport.size() == 0) {
         if (listReport == null || listReport.size() == 0) {
             MsReport msReport = new MsReport();
             MsReport msReport = new MsReport();
             msReport.setReportId(IdWorker.getId());
             msReport.setReportId(IdWorker.getId());
             msReport.setHouseId(houseId);
             msReport.setHouseId(houseId);
             msReport.setSafetyNum(0);
             msReport.setSafetyNum(0);
+            msReport.setSureNum(0);
             msReport.setSuspectedNum(0);
             msReport.setSuspectedNum(0);
+            msReport.setNormalNum(0);
+            msReport.setSingleNum(0);
             msReport.setRemarks("");
             msReport.setRemarks("");
             msReport.setReportDate(DateTime.now().toDate());
             msReport.setReportDate(DateTime.now().toDate());
-            msReport.setMsStatus(2);
+            msReport.setMsStatus(0);
             msReport.setUserCreate(userCreate);
             msReport.setUserCreate(userCreate);
             msReport.setTimeCreate(DateTime.now());
             msReport.setTimeCreate(DateTime.now());
             msReport.setUserUpdate(userCreate);
             msReport.setUserUpdate(userCreate);
@@ -62,68 +72,127 @@ public class MsSuspectedService {
             reportId = listReport.get(0).getReportId();
             reportId = listReport.get(0).getReportId();
         }
         }
 
 
-        //添加家人
-        MsSuspected msSuspected = new MsSuspected();
-        msSuspected.setSuspectedId(IdWorker.getId());
-        msSuspected.setReportId(reportId);
-        msSuspected.setUserName(userName);
-        msSuspected.setGrender(grender);//默认为家人
-        msSuspected.setAge(age);
-        msSuspected.setFamilyStatus(familyStatus);
-        msSuspected.setStatusDesp(statusDesp);
-        msSuspected.setTemperature(temperature);
-        msSuspected.setCough(cough);
-        msSuspected.setMuscle(muscle);
-        msSuspected.setDiarrhea(dyspnea);
-        msSuspected.setChest(chest);
-        msSuspected.setFatigue(fatigue);
-        msSuspected.setDiarrhea(diarrhea);
-        msSuspected.setDiarrheaNum(diarrheaNum);
-        msSuspected.setOthers(others);
-        msSuspected.setUserCreate(userCreate);
-        msSuspected.setTimeCreate(DateTime.now());
-        msSuspected.setUserUpdate(userCreate);
-        msSuspected.setTimeUpdate(DateTime.now());
-        msSuspectedMapper.insert(msSuspected);
-
-        //确证人数
-        Integer isTrue = msReportMapper.selectSuspectedNum(reportId, medical);
-        MsReport msReport = msReportMapper.selectById(reportId);
-        if (msReport != null) {
-            if (medical == 0)
-                msReport.setSuspectedNum(isTrue);
-            if (medical == 1)
-                msReport.setSureNum(isTrue);
-            msReport.setMsStatus(2);
-            // msReport.setUserUpdate(userCreate);
-            // msReport.setTimeUpdate(DateTime.now());
-            msReportMapper.updateById(msReport);
+        //判断是否疑似
+        Integer suspectedStatus = 0;
+        //体温
+        if (temperature.compareTo(new BigDecimal(36)) == -1 && temperature.compareTo(new BigDecimal(37.3)) == 1)
+            suspectedStatus = 1;
+        //咳嗽
+        if (cough > 0)
+            suspectedStatus = 1;
+        //肌肉酸痛
+        if (muscle > 0)
+            suspectedStatus = 1;
+        //呼吸困难
+        if (dyspnea > 0)
+            suspectedStatus = 1;
+        //乏力
+        if (fatigue > 0)
+            suspectedStatus = 1;
+        //腹泻
+        if (diarrhea > 0)
+            suspectedStatus = 1;
+        if (suspectedId == 0L) {
+            //添加家人
+            MsSuspected msSuspected = new MsSuspected();
+            msSuspected.setSuspectedId(IdWorker.getId());
+            msSuspected.setReportId(reportId);
+            msSuspected.setUserName(userName);
+            msSuspected.setGrender(grender);//默认为家人
+            msSuspected.setAge(age);
+            msSuspected.setFamilyStatus(familyStatus);
+            msSuspected.setStatusDesp(statusDesp);
+            msSuspected.setMedical(medical);
+            msSuspected.setTemperature(temperature);
+            msSuspected.setCough(cough);
+            msSuspected.setMuscle(muscle);
+            msSuspected.setDiarrhea(dyspnea);
+            msSuspected.setFatigue(fatigue);
+            msSuspected.setDiarrhea(diarrhea);
+            msSuspected.setSingleRoom(singleRoom);
+            msSuspected.setOthers(others);
+            msSuspected.setSuspectedStatus(suspectedStatus);
+            msSuspected.setUserCreate(userCreate);
+            msSuspected.setTimeCreate(DateTime.now());
+            msSuspected.setUserUpdate(userCreate);
+            msSuspected.setTimeUpdate(DateTime.now());
+            msSuspectedMapper.insert(msSuspected);
+        } else {
+            MsSuspected msSuspected1 = msSuspectedMapper.selectById(suspectedId);
+            if (msSuspected1 != null) {
+                msSuspected1.setUserName(userName);
+                msSuspected1.setGrender(grender);//默认为家人
+                msSuspected1.setAge(age);
+                msSuspected1.setFamilyStatus(familyStatus);
+                msSuspected1.setStatusDesp(statusDesp);
+                msSuspected1.setMedical(medical);
+                msSuspected1.setTemperature(temperature);
+                msSuspected1.setCough(cough);
+                msSuspected1.setMuscle(muscle);
+                msSuspected1.setDiarrhea(dyspnea);
+                msSuspected1.setFatigue(fatigue);
+                msSuspected1.setDiarrhea(diarrhea);
+                msSuspected1.setSingleRoom(singleRoom);
+                msSuspected1.setOthers(others);
+                msSuspected1.setSuspectedStatus(suspectedStatus);
+                msSuspectedMapper.updateById(msSuspected1);
+            }
         }
         }
 
 
+        //更新今日日报
+        updateReport(reportId, medical, singleRoom, temperature);
+        return reportId;
+
     }
     }
 
 
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
-    public void deleteSuspected(Long suspectedId) {
+    public Integer deleteSuspected(Long suspectedId) {
 
 
         MsSuspected msSuspected = msSuspectedMapper.selectById(suspectedId);
         MsSuspected msSuspected = msSuspectedMapper.selectById(suspectedId);
         if (msSuspected != null) {
         if (msSuspected != null) {
             msSuspectedMapper.deleteById(suspectedId);
             msSuspectedMapper.deleteById(suspectedId);
-            //确证人数
-            Integer isTrue = msReportMapper.selectSuspectedNum(msSuspected.getReportId(), msSuspected.getMedical());
+            //更新今日日报
+            updateReport(msSuspected.getReportId(), msSuspected.getMedical(), msSuspected.getSingleRoom(), msSuspected.getTemperature());
             MsReport msReport = msReportMapper.selectById(msSuspected.getReportId());
             MsReport msReport = msReportMapper.selectById(msSuspected.getReportId());
-            if (msReport != null) {
-                if (msSuspected.getMedical() == 0)
-                    msReport.setSuspectedNum(isTrue);
-                if (msSuspected.getMedical() == 1)
-                    msReport.setSureNum(isTrue);
-                if(isTrue==0)
-                    msReport.setMsStatus(1);
-                else
-                    msReport.setMsStatus(2);
-                msReport.setUserUpdate(msReport.getUserCreate());
-                msReport.setTimeUpdate(DateTime.now());
-                msReportMapper.updateById(msReport);
-            }
+            if (msReport != null)
+                return msReport.getSafetyNum();
+        }
+        return 0;
+    }
+
+    //更新今日日报
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public void updateReport(Long reportId, Integer medical, Integer singleRoom, BigDecimal temperature) {
+        //更新今日日报
+        //确诊
+        Integer isTrue = 0, isSingle = 0, isSuspected = 0, isNoSuspected = 0, isFamliy = 0;
+        if (medical == 1)
+            isTrue = msReportMapper.selectSuspectedNum(reportId, medical);
+        //居家隔离
+        if (singleRoom == 1)
+            isSingle = msReportMapper.selectSingleRoomNum(reportId, singleRoom);
+        //正常
+        isSuspected = msReportMapper.selectisSuspectedNum(reportId);
+
+        //疑似
+        isNoSuspected = msReportMapper.selectisNoSuspectedNum(reportId);
+
+        //今日居家
+        List<MsSuspected> list = msSuspectedMapper.selectByReportId(reportId);
+        if (list != null && list.size() > 0)
+            isFamliy = list.size();
+        MsReport msReport = msReportMapper.selectById(reportId);
+        if (msReport != null) {
+            msReport.setSureNum(isTrue);
+            msReport.setSingleNum(isSingle);
+            msReport.setSuspectedNum(isNoSuspected);
+            msReport.setNormalNum(isSuspected);
+            msReport.setSafetyNum(isFamliy);
+            if (isNoSuspected > 0)
+                msReport.setMsStatus(2);
+            else
+                msReport.setMsStatus(1);
+            msReportMapper.updateById(msReport);
         }
         }
     }
     }
 }
 }

+ 57 - 46
whepi-web/src/main/java/com/bofeng/service/RbService.java

@@ -41,64 +41,75 @@ public class RbService {
         if(sysUptownHouses.size() !=0){
         if(sysUptownHouses.size() !=0){
             for (int i = 0; i < sysUptownHouses.size(); i++) {
             for (int i = 0; i < sysUptownHouses.size(); i++) {
 
 
-
-                if(sysUptownHouses.get(i).getCough()==0){
-                    sysUptownHouses.get(i).setChestStr("无咳嗽");
-                }else if(sysUptownHouses.get(i).getCough()==1){
-                    sysUptownHouses.get(i).setChestStr("偶尔短暂咳嗽");
-                }else if(sysUptownHouses.get(i).getCough()==2){
-                    sysUptownHouses.get(i).setChestStr("频繁咳嗽轻重");
-                }else if(sysUptownHouses.get(i).getCough()==3){
-                    sysUptownHouses.get(i).setChestStr("频繁咳嗽重度");
+                Integer cough = sysUptownHouses.get(i).getCough();
+                if(cough != null && cough == 0){
+                    sysUptownHouses.get(i).setCoughStr("无咳嗽");
+                }else if(cough != null && cough ==1){
+                    sysUptownHouses.get(i).setCoughStr("偶尔短暂咳嗽");
+                }else if(cough != null && cough ==2){
+                    sysUptownHouses.get(i).setCoughStr("咳嗽轻度影响生活");
+                }else if(cough != null && cough ==3){
+                    sysUptownHouses.get(i).setCoughStr("咳嗽严重影响生活");
                 }
                 }
-                if(sysUptownHouses.get(i).getMuscle()==0){
+                Integer muscle = sysUptownHouses.get(i).getMuscle();
+                if(muscle != null && muscle==0){
                     sysUptownHouses.get(i).setMuscleStr("无肌肉酸痛");
                     sysUptownHouses.get(i).setMuscleStr("无肌肉酸痛");
-                }else if(sysUptownHouses.get(i).getMuscle()==1){
-                    sysUptownHouses.get(i).setMuscleStr("肌肉酸痛加重");
-                }else if(sysUptownHouses.get(i).getMuscle()==2){
-                    sysUptownHouses.get(i).setMuscleStr("肌肉酸痛好转");
-                }else if(sysUptownHouses.get(i).getMuscle()==3){
-                    sysUptownHouses.get(i).setMuscleStr("肌肉酸痛无变化");
+                }else if(muscle != null && muscle ==1){
+                    sysUptownHouses.get(i).setMuscleStr("肌肉按压有酸痛");
+                }else if(muscle != null && muscle ==2){
+                    sysUptownHouses.get(i).setMuscleStr("偶尔肌肉按压酸痛");
+                }else if(muscle != null && muscle ==3){
+                    sysUptownHouses.get(i).setMuscleStr("肌肉按压持续酸痛");
                 }
                 }
-                if(sysUptownHouses.get(i).getDyspnea()==0){
+                Integer dyspnea = sysUptownHouses.get(i).getDyspnea();
+                if(dyspnea != null && dyspnea ==0){
                     sysUptownHouses.get(i).setDyspneaStr("无呼吸困难");
                     sysUptownHouses.get(i).setDyspneaStr("无呼吸困难");
-                }else if(sysUptownHouses.get(i).getDyspnea()==1){
-                    sysUptownHouses.get(i).setDyspneaStr("呼吸困难加重");
-                }else if(sysUptownHouses.get(i).getDyspnea()==2){
-                    sysUptownHouses.get(i).setDyspneaStr("呼吸困难好转");
-                }else if(sysUptownHouses.get(i).getDyspnea()==3){
-                    sysUptownHouses.get(i).setDyspneaStr("呼吸困难无变化");
-                }else if(sysUptownHouses.get(i).getDyspnea()==4){
-                    sysUptownHouses.get(i).setDyspneaStr("呼吸困难严重");
-                }
-                if(sysUptownHouses.get(i).getChest()==0){
-                    sysUptownHouses.get(i).setChestStr("无胸闷");
-                }else if(sysUptownHouses.get(i).getChest()==1){
-                    sysUptownHouses.get(i).setChestStr("端坐呼吸");
-                }else if(sysUptownHouses.get(i).getChest()==2){
-                    sysUptownHouses.get(i).setChestStr("活动无");
-                }else if(sysUptownHouses.get(i).getChest()==3){
-                    sysUptownHouses.get(i).setChestStr("无变化");
+                }else if(dyspnea != null && dyspnea ==1){
+                    sysUptownHouses.get(i).setDyspneaStr("呼吸急走或上坡气短");
+                }else if(dyspnea != null && dyspnea ==2){
+                    sysUptownHouses.get(i).setDyspneaStr("呼吸气短而走路变慢");
+                }else if(dyspnea != null && dyspnea ==3){
+                    sysUptownHouses.get(i).setDyspneaStr("呼吸走路数分钟后气短");
+                }else if(dyspnea != null && dyspnea ==4){
+                    sysUptownHouses.get(i).setDyspneaStr("呼吸气短无法离开房间");
                 }
                 }
-                if(sysUptownHouses.get(i).getFatigue() == 0){
+                Integer fatigue = sysUptownHouses.get(i).getFatigue();
+                if(fatigue !=null && fatigue == 0){
                     sysUptownHouses.get(i).setFatigueStr("无乏力");
                     sysUptownHouses.get(i).setFatigueStr("无乏力");
-                }else if(sysUptownHouses.get(i).getFatigue() == 1){
-                    sysUptownHouses.get(i).setFatigueStr("乏力加重");
-                }else if(sysUptownHouses.get(i).getFatigue() == 2){
-                    sysUptownHouses.get(i).setFatigueStr("乏力好转");
-                }else if(sysUptownHouses.get(i).getFatigue() == 3){
-                    sysUptownHouses.get(i).setFatigueStr("乏力无变化");
+                }else if(fatigue !=null && fatigue == 1){
+                    sysUptownHouses.get(i).setFatigueStr("可体力劳动但觉得累");
+                }else if(fatigue !=null && fatigue == 2){
+                    sysUptownHouses.get(i).setFatigueStr("轻体力劳动后长时间不能恢复");
+                }else if(fatigue !=null && fatigue == 3){
+                    sysUptownHouses.get(i).setFatigueStr("不能正常生活");
                 }
                 }
-                if(sysUptownHouses.get(i).getDiarrhea() == 0){
+                Integer diarrhea = sysUptownHouses.get(i).getDiarrhea();
+                if(diarrhea !=null && diarrhea == 0){
                     sysUptownHouses.get(i).setDiarrheaStr("无腹泻");
                     sysUptownHouses.get(i).setDiarrheaStr("无腹泻");
-                }else if(sysUptownHouses.get(i).getDiarrhea() == 1){
-                    sysUptownHouses.get(i).setDiarrheaStr("有腹泻");
+                }else if(diarrhea !=null && diarrhea == 1){
+                    sysUptownHouses.get(i).setDiarrheaStr("轻度腹泻少于于3次");
+                }else if(diarrhea !=null && diarrhea == 2){
+                    sysUptownHouses.get(i).setDiarrheaStr("中度腹泻4-6次");
+                }else if(diarrhea !=null && diarrhea == 3){
+                    sysUptownHouses.get(i).setDiarrheaStr("重度腹泻超过6次");
+                }
+                Integer singleRoom = sysUptownHouses.get(i).getSingleRoom();
+                if(singleRoom != null && singleRoom ==0 ){
+                    sysUptownHouses.get(i).setSingleRoomStr("没有单间隔离");
+                }else if(singleRoom != null && singleRoom == 1){
+                    sysUptownHouses.get(i).setSingleRoomStr("单间隔离");
                 }
                 }
-                sysUptownHouses.get(i).setZhengzhuang(sysUptownHouses.get(i).getChestStr()+","+sysUptownHouses.get(i).getMuscleStr()+","+sysUptownHouses.get(i).getDyspneaStr()
-                        +","+sysUptownHouses.get(i).getChestStr()+","+sysUptownHouses.get(i).getFatigueStr()+","+sysUptownHouses.get(i).getDiarrheaStr());
+
+                sysUptownHouses.get(i).setZhengzhuang(sysUptownHouses.get(i).getCoughStr()+","+sysUptownHouses.get(i).getMuscleStr()+","+sysUptownHouses.get(i).getDyspneaStr()
+                        +","+sysUptownHouses.get(i).getFatigueStr()+","+sysUptownHouses.get(i).getDiarrheaStr()+","+sysUptownHouses.get(i).getSingleRoomStr());
             }
             }
         }
         }
 
 
         return sysUptownHouses;
         return sysUptownHouses;
     }
     }
+
+    public List<MsSuspected> selecthuiz(Long userId) {
+        List<MsSuspected> huiz = rbMapper.selecthuiz(userId);
+        return huiz;
+    }
 }
 }

+ 42 - 0
whepi-web/src/main/java/com/bofeng/service/SysAreaService.java

@@ -0,0 +1,42 @@
+package com.bofeng.service;
+
+import com.bofeng.dao.SysAreaMapper;
+import com.bofeng.entity.SysArea;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+
+@Service
+@Transactional(readOnly = true)
+public class SysAreaService {
+
+    @Autowired
+    private SysAreaMapper sysAreaMapper;
+
+    public String selectProvince() {
+        List<SysArea> lst = sysAreaMapper.selectProvince();
+        if (lst != null && lst.size() > 0) {
+            return lst.get(0).getProvince();
+        }
+        return "无省份数据";
+    }
+
+    public List<SysArea> selectCityByProvince() {
+        List<SysArea> lst = sysAreaMapper.selectCityByProvince();
+        if (lst != null && lst.size() > 0) {
+            return lst;
+        }
+        return null;
+    }
+
+    public List<SysArea> selectAreaByCity() {
+        List<SysArea> lst = sysAreaMapper.selectAreaByCity();
+        if (lst != null && lst.size() > 0) {
+            return lst;
+        }
+        return null;
+    }
+
+}

+ 50 - 21
whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java

@@ -5,7 +5,9 @@ import com.bofeng.entity.*;
 import com.bofeng.service.MsReportService;
 import com.bofeng.service.MsReportService;
 import com.bofeng.service.MsSuspectedService;
 import com.bofeng.service.MsSuspectedService;
 import com.yvan.Model;
 import com.yvan.Model;
+import com.yvan.ModelOps;
 import com.yvan.mvc.Pd;
 import com.yvan.mvc.Pd;
+import com.yvan.platform.Conv;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -31,34 +33,47 @@ public class MsReportController {
 
 
     //添加家人
     //添加家人
     @PostMapping("/home/addRibao")
     @PostMapping("/home/addRibao")
-    public Integer saveUser(HttpServletRequest request) {
+    public MsReport saveUser(HttpServletRequest request) {
         //初始化今日日报
         //初始化今日日报
-        Long userCreate = Long.parseLong(request.getParameter("userCreate"));
+        Long suspectedId = Conv.NL(request.getParameter("suspectedId"));
+        Long userCreate = Conv.NL(request.getParameter("userCreate"));
         String userName = request.getParameter("userName");
         String userName = request.getParameter("userName");
-        Integer grender = Integer.parseInt(request.getParameter("grender"));
-        Integer age = Integer.parseInt(request.getParameter("age"));
-        Integer familyStatus = Integer.parseInt(request.getParameter("familyStatus"));
+        Integer grender = Conv.NI(request.getParameter("grender"));
+        Integer age = Conv.NI(request.getParameter("age"));
+        Integer familyStatus = Conv.NI(request.getParameter("familyStatus"));
         String statusDesp = request.getParameter("statusDesp");
         String statusDesp = request.getParameter("statusDesp");
-        Integer medical = Integer.parseInt(request.getParameter("medical"));
+        Integer medical = Conv.NI(request.getParameter("medical"));
         BigDecimal temperature = new BigDecimal(request.getParameter("temperature"));
         BigDecimal temperature = new BigDecimal(request.getParameter("temperature"));
-        Integer cough = Integer.parseInt(request.getParameter("cough"));
-        Integer muscle = Integer.parseInt(request.getParameter("muscle"));
-        Integer dyspnea = Integer.parseInt(request.getParameter("dyspnea"));
-        Integer chest = Integer.parseInt(request.getParameter("chest"));
-        Integer fatigue = Integer.parseInt(request.getParameter("fatigue"));
-        Integer diarrhea = Integer.parseInt(request.getParameter("diarrhea"));
-        Integer diarrheaNum = Integer.parseInt(request.getParameter("diarrheaNum"));
+        Integer cough = Conv.NI(request.getParameter("cough"));
+        Integer muscle = Conv.NI(request.getParameter("muscle"));
+        Integer dyspnea = Conv.NI(request.getParameter("dyspnea"));
+        Integer fatigue = Conv.NI(request.getParameter("fatigue"));
+        Integer diarrhea = Conv.NI(request.getParameter("diarrhea"));
+        Integer singleRoom = Conv.NI(request.getParameter("singleRoom"));
         String others = request.getParameter("others");
         String others = request.getParameter("others");
-        msSuspectedService.addSuspected(userName, grender, age, familyStatus,statusDesp,medical,temperature,cough,muscle,dyspnea,chest,fatigue,diarrhea,diarrheaNum, others, userCreate);
-        return 1;
+        Long reportId =msSuspectedService.addSuspected(suspectedId, userName, grender, age, familyStatus, statusDesp, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, singleRoom, others, userCreate);
+
+        return msReportService.getByReport(reportId);
+    }
+
+    //查询家人
+    @GetMapping("/home/selectSuspected")
+    public MsSuspected selectSuspected(HttpServletRequest request) {
+        //初始化今日日报
+        Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
+        return msSuspectedService.selectSuspected(suspectedId);
     }
     }
 
 
     //删除家人病例
     //删除家人病例
     @PostMapping("/home/deleteSuspected")
     @PostMapping("/home/deleteSuspected")
-    public Integer deleteSuspected(HttpServletRequest request) {
+    public MsReport deleteSuspected(HttpServletRequest request) {
         Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
         Long suspectedId = Long.parseLong(request.getParameter("suspectedId"));
+        MsSuspected msSuspected = msSuspectedService.selectSuspected(suspectedId);
         msSuspectedService.deleteSuspected(suspectedId);
         msSuspectedService.deleteSuspected(suspectedId);
-        return 1;
+        if (msSuspected != null)
+            return msReportService.getByReport(msSuspected.getReportId());
+        else
+            return null;
     }
     }
 
 
     //根据登录人获取家人
     //根据登录人获取家人
@@ -78,11 +93,17 @@ public class MsReportController {
 
 
     //全家报平安
     //全家报平安
     @PostMapping("/home/addReport")
     @PostMapping("/home/addReport")
-    public Integer addReport(HttpServletRequest request) {
+    public ModelOps addReport(HttpServletRequest request) {
         Long userCreate = Long.parseLong(request.getParameter("userCreate"));
         Long userCreate = Long.parseLong(request.getParameter("userCreate"));
-        String safetyNum = request.getParameter("safetyNum");
-        msReportService.addReport(safetyNum, userCreate);
-        return 1;
+        int re = msReportService.addReport(userCreate);
+        if (re == 1) {
+            return ModelOps.newSuccess();
+        } else if (re == 2) { //没有上报体温
+            return ModelOps.newFail("请填报今日体温!");
+        }else if (re == 3) { //没有选择家人
+            return ModelOps.newFail("请选择家人!");
+        }
+        return ModelOps.newFail("上报错误");
     }
     }
 
 
     //根据日期获取家人
     //根据日期获取家人
@@ -90,4 +111,12 @@ public class MsReportController {
     public Model<List<MsSuspected>> queryRibaoReportDate(@Pd(name = "reportDate") String reportDate, @Pd(name = "userCreate") Long userCreate) {
     public Model<List<MsSuspected>> queryRibaoReportDate(@Pd(name = "reportDate") String reportDate, @Pd(name = "userCreate") Long userCreate) {
         return Model.newSuccess(msReportService.getByReportReportDate(reportDate, userCreate));
         return Model.newSuccess(msReportService.getByReportReportDate(reportDate, userCreate));
     }
     }
+
+    //通过昨天数据更新今天数据
+    @PostMapping("/home/getNowByYesterday")
+    public Integer getNowByYesterday(HttpServletRequest request) {
+        Long userCreate = Long.parseLong(request.getParameter("userCreate"));
+        msReportService.getNowByYesterday(userCreate);
+        return 1;
+    }
 }
 }

+ 10 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/WuYeController.java

@@ -1,6 +1,5 @@
 package com.bofeng.wx.controller;
 package com.bofeng.wx.controller;
 
 
-import com.bofeng.entity.QzTask;
 import com.bofeng.entity.UserHelpAnaly;
 import com.bofeng.entity.UserHelpAnaly;
 import com.bofeng.service.QzTaskReplyService;
 import com.bofeng.service.QzTaskReplyService;
 import com.bofeng.service.QzTaskService;
 import com.bofeng.service.QzTaskService;
@@ -8,7 +7,6 @@ import com.bofeng.service.WuYeService;
 import com.google.common.collect.Maps;
 import com.google.common.collect.Maps;
 import com.yvan.Model;
 import com.yvan.Model;
 import com.yvan.mvc.Pd;
 import com.yvan.mvc.Pd;
-import com.yvan.platform.YvanUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -16,6 +14,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
 
 
+import java.util.ArrayList;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -37,9 +36,9 @@ public class WuYeController {
         queryParam.put("userId", "12345677");
         queryParam.put("userId", "12345677");
         queryParam.put("statistics", "M");
         queryParam.put("statistics", "M");
 
 
-        List<QzTask> taskList = qzTaskService.selectAll(userId);
+//        List<QzTask> taskList = qzTaskService.selectAll(userId);
 //        List<sysUptownUnit> rbList = rbService.selectAll();
 //        List<sysUptownUnit> rbList = rbService.selectAll();
-        model.put("taskList", YvanUtil.toJsonPretty(taskList));
+//        model.put("taskList", YvanUtil.toJsonPretty(taskList));
 //        model.put("rbList", YvanUtil.toJsonPretty(rbList));
 //        model.put("rbList", YvanUtil.toJsonPretty(rbList));
 
 
         return new ModelAndView("/wuye/home.ftl", model);
         return new ModelAndView("/wuye/home.ftl", model);
@@ -71,4 +70,11 @@ public class WuYeController {
         return Model.newSuccess(wuYeService.queryUserHelpAnaly(userId, queryDate));
         return Model.newSuccess(wuYeService.queryUserHelpAnaly(userId, queryDate));
     }
     }
 
 
+    @GetMapping("/wuye/userHelpAnaly1")
+    public Model<List<UserHelpAnaly>> taskQuery1(@Pd(name = "queryDate") String queryDate, @Pd(name = "userId") Long userId) {
+        List<UserHelpAnaly> lst = new ArrayList<>();
+        lst.add(wuYeService.queryUserHelpAnaly(userId, queryDate));
+        return Model.newSuccess(lst);
+    }
+
 }
 }

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

@@ -1,9 +1,11 @@
 package com.bofeng.wx.controller;
 package com.bofeng.wx.controller;
 
 
+import com.bofeng.dao.RbMapper;
 import com.bofeng.entity.QzTask;
 import com.bofeng.entity.QzTask;
 import com.bofeng.entity.QzTaskReply;
 import com.bofeng.entity.QzTaskReply;
 import com.bofeng.entity.SysUptownHouse;
 import com.bofeng.entity.SysUptownHouse;
 import com.bofeng.entity.sysUptownUnit;
 import com.bofeng.entity.sysUptownUnit;
+import com.bofeng.excel.ExcelUtils;
 import com.bofeng.service.HomeService;
 import com.bofeng.service.HomeService;
 import com.bofeng.entity.*;
 import com.bofeng.entity.*;
 import com.bofeng.service.QzTaskReplyService;
 import com.bofeng.service.QzTaskReplyService;
@@ -16,6 +18,8 @@ import com.yvan.ModelOps;
 import com.yvan.mvc.Pd;
 import com.yvan.mvc.Pd;
 import com.yvan.platform.JsonWapper;
 import com.yvan.platform.JsonWapper;
 import com.yvan.platform.YvanUtil;
 import com.yvan.platform.YvanUtil;
+import io.swagger.annotations.ApiOperation;
+import lombok.SneakyThrows;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Param;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.ui.ModelMap;
 import org.springframework.ui.ModelMap;
@@ -25,6 +29,8 @@ import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.servlet.ModelAndView;
 import org.springframework.web.servlet.ModelAndView;
 
 
+import javax.servlet.http.HttpServletResponse;
+import java.util.Date;
 import java.util.List;
 import java.util.List;
 import java.util.Map;
 import java.util.Map;
 
 
@@ -42,6 +48,9 @@ public class YeWeiHuiController {
     @Autowired
     @Autowired
     private HomeService homeService;
     private HomeService homeService;
 
 
+    @Autowired
+    private RbMapper rbMapper;
+
     @GetMapping("/yeweihui/home.html")
     @GetMapping("/yeweihui/home.html")
     public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId", required = false,defaultValue = "0") Long userId) {
     public ModelAndView yeweihui(ModelMap model,@RequestParam(value = "userId", required = false,defaultValue = "0") Long userId) {
 
 
@@ -172,4 +181,31 @@ public class YeWeiHuiController {
         List<MsSuspected> rbList = rbService.selectYcXq(houseId);
         List<MsSuspected> rbList = rbService.selectYcXq(houseId);
         return Model.newSuccess(rbList);
         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
+    public void exportRiBao(@Pd(name = "userId") Long userId,
+                            @Pd(name = "date") String date,
+                            HttpServletResponse resp) {
+
+        List<Uptown> uptowns = rbMapper.selectUptown(userId);
+
+        if (uptowns!=null && uptowns.size()>0) {
+            Long upId = uptowns.get(0).getUptownId();
+            List<ExcelRiBao> list = rbMapper.selectExcelRiBao(upId,date);
+            ExcelUtils.writeSheet(ExcelRiBao.class, list).export(resp);
+        }
+    }
 }
 }

+ 3 - 3
whepi-web/src/main/resources/application-dev.yml

@@ -63,9 +63,9 @@ spring:
     #driverClassName: com.mysql.jdbc.Driver
     #driverClassName: com.mysql.jdbc.Driver
     #url: jdbc:mysql://localhost:3306/bofeng_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
     #url: jdbc:mysql://localhost:3306/bofeng_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
     driverClassName: net.sf.log4jdbc.DriverSpy
     driverClassName: net.sf.log4jdbc.DriverSpy
-    url: jdbc:log4jdbc:mysql://39.99.148.1:3306/whepi_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
-    username: whepi_test
-    password: 123456
+    url: jdbc:log4jdbc:mysql://localhost:3306/whepi_test?autoReconnect=true&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false
+    username: root
+    password:
 
 
   redis:
   redis:
     database: 4
     database: 4

+ 1 - 1
whepi-web/src/main/resources/application.yml

@@ -43,7 +43,7 @@ endpoints:
 #  whitelabel.enabled: false
 #  whitelabel.enabled: false
 
 
 spring:
 spring:
-  profiles.active: maoyunfeng
+  profiles.active: dev
 
 
   application:
   application:
     name: whepi-web
     name: whepi-web

+ 16 - 0
whepi-web/src/main/resources/mapper/SysArea.xml

@@ -0,0 +1,16 @@
+<?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.SysAreaMapper">
+    <select id="selectProvince" resultType="com.bofeng.entity.SysArea">
+        select province from sys_area where province='湖北省' group by province
+    </select>
+
+    <select id="selectCityByProvince" resultType="com.bofeng.entity.SysArea">
+        SELECT * from sys_area where province='湖北省' and (area='市辖区' or city='省直辖县级行政区划' or area='恩施市')
+    </select>
+
+    <select id="selectAreaByCity" resultType="com.bofeng.entity.SysArea">
+        select * from sys_area where city='武汉市'
+    </select>
+
+</mapper>