소스 검색

Merge remote-tracking branch 'origin/master'

peiguo 5 년 전
부모
커밋
a57043c8c2

+ 1 - 4
whepi-doc/mrsb.sql

@@ -67,10 +67,6 @@ CREATE TABLE ms_trip  (
   today_local       int(11)    NOT NULL DEFAULT 0                           COMMENT '今日驻地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
   today_local_other varchar(50)  NOT NULL DEFAULT ''                        COMMENT '今日驻地其他地点',
   is_trip           int(11)    NOT NULL DEFAULT 0                           COMMENT '是否出行:0否,1是',
-  user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
-  time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',
-  user_update       bigint(20) NOT NULL DEFAULT 0                           COMMENT '修改人',
-  time_update       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPDATE CURRENT_TIMESTAMP(0) COMMENT '修改时间',
   PRIMARY KEY (trip_id) USING BTREE
 ) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭出行表';
 
@@ -88,6 +84,7 @@ CREATE TABLE ms_trip_det  (
   end_local         int(11)    NOT NULL DEFAULT 0                           COMMENT '目的地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
   end_local_other   varchar(50)  NOT NULL DEFAULT ''                        COMMENT '目的地其他地点',
   trip_type         int(11)    NOT NULL DEFAULT 0                           COMMENT '出行方式:0未填写,1长途汽车,2火车,3飞机',
+  trip_type_desp    varchar(50)  NOT NULL DEFAULT ''                        COMMENT '车次/航班/车牌',
   user_create       bigint(20) NOT NULL DEFAULT 0                           COMMENT '新增人',
   time_create       datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0)       COMMENT '新增时间',
   user_update       bigint(20) NOT NULL DEFAULT 0                           COMMENT '修改人',

BIN
whepi-ui/static/homeHelp.jpg


BIN
whepi-ui/static/homeHelp_1.jpg


BIN
whepi-ui/static/outHelp.jpg


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

@@ -3,7 +3,7 @@
 
 <div class="page__bd" style="height: 300px">
     <div class="container">
-        <img src="/static/homeHelp_1.jpg" style="width: 100%"/>
+        <img src="/static/homeHelp.jpg" style="width: 100%"/>
 </div>
 
 

+ 19 - 0
whepi-ui/templates/home/outHelp.ftl

@@ -0,0 +1,19 @@
+<#assign title="出入管理"/>
+<#include "/home/frag.head.ftl" />
+
+<div class="page__bd" style="height: 300px">
+    <div class="container">
+        <img src="/static/outHelp.jpg" style="width: 100%"/>
+</div>
+
+
+<#include "/home/frag.foot.ftl" />
+
+<script>
+
+    (function ($) {
+
+    })(jQuery);
+
+
+</script>

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

@@ -124,8 +124,8 @@
                             </div>
                         </label>
                     </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;">

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 840 - 845
whepi-ui/templates/home/ribao.js


+ 3 - 3
whepi-ui/templates/lingyun/home.ftl

@@ -1,4 +1,4 @@
-<#assign title="凌云是我家"/>
+<#assign title="我家"/>
 <#include "/home/frag.head.ftl" />
 
 <div class="weui-tab">
@@ -18,11 +18,11 @@
             <div class="weui-tabbar__icon"><img src="/static/images/wx/order.png" alt=""></div>
             <p class="weui-tabbar__label">健康日报</p>
         </a>
-        <a id="jt2" href="#tab2" class="weui-tabbar__item" ">
+        <a id="jt2" href="#tab2" class="weui-tabbar__item" onclick="familyClick()">
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <p class="weui-tabbar__label">家庭求助</p>
         </a>
-        <a id="jt3" href="#tab3" class="weui-tabbar__item" ">
+        <a id="jt3" href="#tab3" class="weui-tabbar__item" onclick="buyGroup()">
             <div class="weui-tabbar__icon"><img src="/static/images/wx/upload.png" alt=""></div>
             <p class="weui-tabbar__label">团购</p>
         </a>

+ 260 - 55
whepi-ui/templates/lingyun/ribao.ftl

@@ -1,4 +1,3 @@
-
 <div class="page__bd">
     <div class="weui-tab">
         <div class="weui-navbar">
@@ -11,84 +10,290 @@
         </div>
         <div class="weui-tab__panel">
             <div id="rb_nav1" class="weui-tab__bd-item ri_bao_weui_tab_bd_item_active">
+                <div id="notOpenRibao">
+                    <div class="weui-cells weui-cells_form">
+                        <div class="weui-cell weui-cell_vcode" style="height: 7vh">
+                            <div class="weui-cell__hd">
+                                <label class="weui-label">今日居家</label>
+                            </div>
+                            <div class="weui-cell__bd" id="ribao_jinrijujian">
 
-                <div id="ribao" class="weui-btn-area"><#--style="display: none"-->
-                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
-                        <div style="height: 5vh; line-height: 5vh; width: 55%;">工作驻地</div>
-                        <input id="js_input_gzzd" class="weui-input" type="text" placeholder="请选择"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput(this)"/>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <input placeholder="其它地点" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                            </div>
+                            <div class="weui-cell__ft">
+                                <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 id="rb_family">
+                    <#--<div class="weui-media-box weui-media-box_text">-->
+                    <#--<h4 class="weui-media-box__title">家人1:咳嗽、乏力、未确诊 <a href="javascript:" >删除</a></h4>-->
+                    <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
+                    <#--</div>-->
+                    </div>
+                    <div class="weui-cells__tips"> <span style="color: red">
+                        注:请如实上报情况,便以相互帮助,小区是我家,团结就是力量!后期会有医生跟踪分析,给予大家医疗建议,请认真填报!
+                    </span></div>
+                    <div class="weui-btn-area">
+                        <a id="btn_shangbao" class="weui-btn weui-btn_primary" href="javascript:" id="showTooltips" style=""
+                           onclick="addReport()">上报</a>
                     </div>
+                </div>
+                <div id="ribao" class="weui-btn-area" style="display: none">
+                    <div style="text-align: center;">基本信息</div>
+                    <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_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="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 style="height: 5vh; line-height: 5vh;margin-left: 2vw;">基本情况</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>心脑血管疾病(服用ARB)</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>心脑血管疾病(未服ARB)</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>
+                        <label class="weui-cell weui-cell_active weui-check__label" for="s17">
+                            <div class="weui-cell__hd">
+                                <input type="checkbox" name="checkbox7" class="weui-check" id="s17">
+                                <i class="weui-icon-checked"></i>
+                            </div>
+                            <div class="weui-cell__bd">
+                                <p>妊娠期</p>
+                            </div>
+                        </label>
+                    </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>-->
+                    <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="height: 5vh; line-height: 5vh; width: 55%;">今日所在地</div>
-                        <input id="js_input_jrszd" class="weui-input" type="text" placeholder="请选择"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%"/>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <input placeholder="其它地点" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">确诊新冠肺炎</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 style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="height: 5vh; line-height: 5vh; width: 55%;">是否出行</div>
-                        <input id="js_input_sf" class="weui-input" type="text" placeholder="请选择"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 145%"/>
-                      </div>
-                    <br/>
-                    <#--<div style="text-align: center;height: 1vh;">出行情况上报</div>-->
-                    <div class="weui-loadmore weui-loadmore_line" style="width: 100%;height: 1vh;">
-                        <span class="weui-loadmore__tips">出行情况上报</span>
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">单间隔离</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 style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
-                        <div style="height: 5vh; line-height: 5vh; width: 55%;">出发地</div>
-                        <input id="js_input_cfd" class="weui-input" type="text" placeholder="请选择"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%"/>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <input placeholder="其它地点" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">体温</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="height: 5vh; line-height: 5vh; width: 55%;">目的地</div>
-                        <input id="js_input_mdd" class="weui-input" type="text" placeholder="请选择"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%"/>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <input placeholder="其它地点" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">咳嗽现象</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;"/>
                     </div>
                     <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
-                        <div style="height: 5vh; line-height: 5vh; width: 55%;">出行方式</div>
-                        <input id="js_input_cxfs" class="weui-input" type="text" placeholder="请选择出行方式"
-                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%"/>
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-                        <input placeholder="车次/航班/车牌" type="text" disabled="disabled" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
-
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 55%;">肌肉酸痛</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;"/>
                     </div>
-                    <div class="weui-cell__ft" style="margin-top: 1vh;">
-                        <button id="btnAdd" href="javascript:" style="height:5vh; margin-right: 0vh;width: 70px;"
-                                class="weui-btn weui-btn_mini weui-btn_primary">添加
-                        </button>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh;line-height: 5vh; width: 55%;">呼吸困难</div>
+                        <input id="js_input_user_huxi" class="weui-input" autofocus="" type="text" placeholder="请选择"
+                               maxlength="20"
+                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
                     </div>
-                    <div class="weui-loadmore tt" style="width: 100%;height: 1vh;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: 55%;">乏力现象</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;"/>
                     </div>
-                    <div>
-                        <table cellspacing="0" cellpadding="0" style="width: 100%">
-                            <tbody id="tabtr"><#--border="1" cellspacing="0" cellpadding="0"-->
-                            <tr style="background-color: #f8f8f8;">
-                               <#-- <td style="text-align: center;">序号</td>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                        <div style="color: gray;height: 5vh; line-height: 5vh; width: 55%;">腹泻现象</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;"/>
+                    </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: 55%;">其他描述</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>
+                    </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: 55%;">
+                            <button id="ribao_score" style="height:5vh;"
+                                    class="weui-btn weui-btn_mini weui-btn_primary">健康评估
+                            </button>
+                        </div>
+                        <input id="js_input_score_rezult" class="weui-input" autofocus="" readonly="readonly"
+                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
+                        <input id="js_input_score_rezult_value" type="text" hidden="hidden"/>
+                        <input id="js_input_temperature_score" type="text" hidden="hidden"/>
+                        <input id="js_input_score_histroy" type="text" hidden="hidden"/>
+                        <input id="js_input_score" type="text" hidden="hidden"/>
+                    </div>
+                    <div id="ribao" class="weui-btn-area"><#--style="display: none"-->
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">工作驻地</div>
+                            <input id="js_input_gzzd" class="weui-input" type="text" placeholder="请选择"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput1(this)"/>
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <input id="js_input_qtdd" placeholder="其它地点" disabled="disabled" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        </div>
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">今日所在地</div>
+                            <input id="js_input_jrszd" class="weui-input" type="text" placeholder="请选择"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput2(this)"/>
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <input id="js_input_jrszq" placeholder="其它地点" disabled="disabled" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        </div>
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">是否出行</div>
+                            <input id="js_input_sf" class="weui-input" type="text" placeholder="请选择"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 145%"/>
+                        </div>
+                        <br/>
+                    <#--<div style="text-align: center;height: 1vh;">出行情况上报</div>-->
+                        <div class="weui-loadmore weui-loadmore_line" style="width: 100%;height: 1vh;">
+                            <span class="weui-loadmore__tips">出行情况上报</span>
+                        </div>
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 6vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">出发地</div>
+                            <input id="js_input_cfd" class="weui-input" type="text" placeholder="请选择"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput3(this)"/>
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <input id="js_input_cfdq" placeholder="其它地点" disabled="disabled" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        </div>
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">目的地</div>
+                            <input id="js_input_mdd" class="weui-input" type="text" placeholder="请选择"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput4(this)"/>
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <input id="js_input_mddq" placeholder="其它地点" disabled="disabled" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+                        </div>
+                        <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                            <div style="height: 5vh; line-height: 5vh; width: 55%;">出行方式</div>
+                            <input id="js_input_cxfs" class="weui-input" type="text" placeholder="请选择出行方式"
+                                   style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 50%" onchange="selectinput5(this)"/>
+                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+                            <input id="js_input_cxfsq" placeholder="车次/航班/车牌" type="text" style="width: 80%;text-align: center;border-top-width: 0px;border-right-width: 0px;border-bottom-width: 1px;border-left-width: 0px;border-color: #75859f;height: 5vh;font-size:inherit;color:inherit;" />
+
+                        </div>
+                        <div class="weui-cell__ft" style="margin-top: 1vh;">
+                            <button id="btnAdd" href="javascript:" style="height:5vh; margin-right: 0vh;width: 70px;"
+                                    class="weui-btn weui-btn_mini weui-btn_primary" onclick="insertlingyun()">添加
+                            </button>
+                        </div>
+                        <div class="weui-loadmore tt" style="width: 100%;height: 1vh;margin-top: 1vh;">
+                        </div>
+                        <div>
+                            <table cellspacing="0" cellpadding="0" style="width: 100%">
+                                <tbody id="tabtr"><#--border="1" cellspacing="0" cellpadding="0"-->
+                                <tr style="background-color: #f8f8f8;">
+                                <#-- <td style="text-align: center;">序号</td>
                                 <td style="text-align: center;">出发地</td>
                                 <td style="text-align: center;">目的地</td>
                                 <td style="text-align: center;">出行方式</td>
                                 <td style="text-align: center;">车次/航班/车牌</td>-->
-                            </tr>
-                            </tbody>
-                        </table>
-                        <table id="tab5" class="new_tab" align="left" cellpadding="0" cellspacing="0"
-                               style="width: 100%;">
-                        </table>
+                                </tr>
+                                </tbody>
+                            </table>
+                            <table id="tab5" class="new_tab" align="left" cellpadding="0" cellspacing="0"
+                                   style="width: 100%;">
+                            </table>
+                        </div>
+                    </div>
+                    <div style="display: flex; justify-content: center;">
+                        <div style="width: 70%;color: red; text-align: center;">
+                            自愿填写病情描述(温度为必填项),提交后会根据每天病情描述变化趋势给出更加科学的健康评估建议
+                        </div>
                     </div>
+                    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
+                        <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>
                     </div>
+                </div>
                 </br>
                 </br>
             </div>
+            <div id="rb_nav2" class="weui-tab__bd-item ">
+                <div id="my-input-ribao"></div>
+                <div class="weui-panel weui-panel_access">
+                    <div class="weui-panel__hd" style="color: #0bb20c; font-size: large">我的家人</div>
+                    <div class="weui-panel__bd" id="ribao_famliy">
+                    <#--<div class="weui-media-box weui-media-box_text">-->
+                    <#--<h4 class="weui-media-box__title">家人1:咳嗽、乏力、未确诊</h4>-->
+                    <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
+                    <#--</div>-->
+                    <#--<div class="weui-media-box weui-media-box_text">-->
+                    <#--<h4 class="weui-media-box__title">家人1:咳嗽、乏力、确诊</h4>-->
+                    <#--<p class="weui-media-box__desc">由各种物质组成的巨型球状天体,叫做星球。星球有一定的形状,有自己的运行轨道。</p>-->
+                    <#--</div>-->
+                    </div>
+                    <br/><br/>
+                </div>
+            </div>
         </div>
     </div>
 </div>
 
 
-

+ 620 - 44
whepi-ui/templates/lingyun/ribao.js

@@ -1,41 +1,8 @@
+
 function ribao_init() {
-    var xxIds = [];
-    var xxName = [
-        "序号",
-        "出发地",
-        "目的地",
-        "出行方式",
-        "车次/航班/车牌"
-    ];
-    for (var i = 0; i < xxName.length; i++) {
-        xxIds.push({
-            name: xxName[i]
-        });
-    }
-    var html = "<tr style='background-color: #f8f8f8;'>";
-    for (var i = 0; i < xxIds.length; i++) {
-        // alert(xxIds[i].name);
-        html += "<th>" + xxIds[i].name + "</th>";
-    }
-    html +="</tr>"
-    for (var i = 0; i < 10; i++) {//后端传过来的集合遍历
-        if (i % 2 != 0) {
-            html += "<tr style='background-color: #f8f8f8;'>";
-        }
-        else {
-            html += "<tr>";
-        }
+    //lingyun
 
-        html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
-        // var isValue = false; //记录是否赋值
-        html += "<td style='text-align: center;' >" + "mao" + " </td>";
-        html += "<td style='text-align: center;' >" + "mao" + " </td>";
-        html += "<td style='text-align: center;' >" + "mao" + " </td>";
-        html += "<td style='text-align: center;' >" + "mao" + " </td>";
 
-        html += "</tr>";
-        $("#tabtr").html(html);
-    }
 
     $('#btnRB').on('click', function () {
         window.location.href = "/yeweihui/home.html";
@@ -55,6 +22,10 @@ function ribao_init() {
             {
                 title: "当阳市",
                 value: "3",
+            },
+            {
+                title: "其它地点",
+                value: "4",
             }]
     });
 
@@ -82,12 +53,12 @@ function ribao_init() {
         title: "",
         items: [
             {
-                title: "",
-                value: "1",
+                title: "",
+                value: "0",
             },
             {
-                title: "",
-                value: "2",
+                title: "",
+                value: "1",
             }]
     });
 
@@ -135,25 +106,421 @@ function ribao_init() {
         title: "选择出行方式",
         items: [
             {
-                title: "自驾",
+                title: "长途汽车",
                 value: "1",
             },
             {
+                title: "火车",
+                value: "2",
+            },
+            {
                 title: "飞机",
+                value: "3",
+            },
+            {
+                title: "自驾",
+                value: "4",
+            }]
+    });
+
+    // $("#js_input_user_sex").val(getGreder(2));   //设置初始值
+
+    $('#btnRB').on('click', function () {
+        window.location.href = "/yeweihui/home.html";
+    });
+
+    $("#js_input_user_sex").select({
+        title: "选择性别",
+        items: [
+            {
+                title: "男",
+                value: "1",
+            },
+            {
+                title: "女",
                 value: "2",
+            }]
+    });
+
+    $("#js_input_user_status").select({
+        title: "选择基本状况",
+        items: [
+            {
+                title: "无病史",
+                value: "0",
+            }, {
+                title: "心脑血管疾病(服用ARB)",
+                value: "1",
             },
             {
-                title: "火车",
+                title: "心脑血管疾病(未服ARB)",
+                value: "2",
+            },
+            {
+                title: "呼吸系统病史",
                 value: "3",
             },
             {
-                title: "长途汽车",
+                title: "肿瘤病史",
                 value: "4",
+            },
+            {
+                title: "糖尿病史",
+                value: "5",
+            },
+            {
+                title: "服用过激素药物",
+                value: "6",
+            },
+            {
+                title: "妊娠期",
+                value: "7",
+            }]
+    });
+
+    $("#js_input_user_kesou").select({
+        title: "选择咳嗽情况",
+        items: [
+            {
+                title: "无咳嗽",
+                value: "0",
+            },
+            {
+                title: "偶有短暂咳嗽",
+                value: "1",
+            },
+            {
+                title: "咳嗽轻度影响生活",
+                value: "2",
+            },
+            {
+                title: "咳嗽严重影响生活",
+                value: "3",
             }]
     });
 
+    $("#js_input_user_jirou").select({
+        title: "选择肌肉情况",
+        items: [
+            {
+                title: "无",
+                value: "0",
+            },
+            {
+                title: "按压有",
+                value: "1",
+            },
+            {
+                title: "偶尔",
+                value: "2",
+            },
+            {
+                title: "持续有",
+                value: "3",
+            }]
+    });
+
+    $("#js_input_user_huxi").select({
+        title: "选择呼吸情况",
+        items: [
+            {
+                title: "无",
+                value: "0",
+            },
+            {
+                title: "急走或上坡气短",
+                value: "1",
+            },
+            {
+                title: "气短而走路变慢",
+                value: "2",
+            },
+            {
+                title: "走路数分钟后气短",
+                value: "3",
+            },
+            {
+                title: "气短无法离开房间",
+                value: "4",
+            }]
+    });
 
+    $("#js_input_user_fali").select({
+        title: "选择乏力情况",
+        items: [
+            {
+                title: "无",
+                value: "0",
+            },
+            {
+                title: "体力劳动后不能恢复",
+                value: "1",
+            },
+            {
+                title: "轻体力活非常累",
+                value: "2",
+            },
+            {
+                title: "不能正常生活",
+                value: "3",
+            }]
+    });
 
+    $("#js_input_user_fuxie").select({
+        title: "选择腹泻情况",
+        items: [
+            {
+                title: "无",
+                value: "0",
+            },
+            {
+                title: "轻度腹泻(少于3次)",
+                value: "1",
+            },
+            {
+                title: "中度腹泻(4-6次)",
+                value: "2",
+            },
+            {
+                title: "重度腹泻(超过6次)",
+                value: "3",
+            }]
+    });
+
+    $("#switchQuezhen").select({
+        title: "选择是否确诊",
+        items: [
+            {
+                title: "否",
+                value: "0",
+            },
+            {
+                title: "是",
+                value: "1",
+            }]
+    });
+
+    $("#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)
+}
+function selectinput1(obj){
+    var grender = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
+    if(grender != 4){//js_input_qtdd
+        // $('#js_input_qtdd')[0].disabled == 'disabled'
+        $('#js_input_qtdd').attr("disabled","disabled")
+    }else{
+        $('#js_input_qtdd').removeAttr("disabled")
+    }
+
+}
+function selectinput2(obj){
+    var grender = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
+    if(grender != 4){//js_input_qtdd
+        // $('#js_input_qtdd')[0].disabled == 'disabled'
+        $('#js_input_jrszq').attr("disabled","disabled")
+    }else{
+        $('#js_input_jrszq').removeAttr("disabled")
+    }
+
+}
+function selectinput3(obj){
+    var grender = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
+    if(grender != 4 ){
+        $('#js_input_cfdq').attr("disabled","disabled")
+    }else{
+        $('#js_input_cfdq').removeAttr("disabled")
+    }
+
+}
+function selectinput4(obj){
+    var grender = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
+    if(grender != 4){
+        $('#js_input_mddq').attr("disabled","disabled")
+    }else{
+        $('#js_input_mddq').removeAttr("disabled")
+    }
+
+}
+function selectinput5(obj){
+    var grender = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
+    if(grender == 4){
+        // $('#js_input_cxfsq').attr("disabled","disabled")
+    }else{
+        $('#js_input_cxfsq').removeAttr("disabled")
+    }
+
+}
+//添加出行详情
+var listcx = [];
+var person=new Object();
+function insertlingyun(){
+    var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
+    if(sf == 0 || sf == 3){
+        $.alert("请选择是否出行");
+        return;
+    }
+
+    var cxfs = $("#js_input_cxfs").attr("data-values") == undefined ? 0 : $("#js_input_cxfs").attr("data-values");
+    var cfd = $("#js_input_cfd").attr("data-values") == undefined ? 0 : $("#js_input_cfd").attr("data-values");
+    var mdd = $("#js_input_mdd").attr("data-values") == undefined ? 0 : $("#js_input_mdd").attr("data-values");
+    if(cxfs != 4 && cxfs !=0){
+        var val = $('#js_input_cxfsq').val();
+        if( val == ""){
+            $.alert("请填写车次/航班/车牌");
+            return;
+        }
+
+        person.tripTypeDesp = $('#js_input_cxfsq').val();
+        if(cxfs == 1){
+            person.tripType = 1;
+            person.tripTypeStr = "长途汽车"
+        }else if(cxfs == 2){
+            person.tripType = 2;
+            person.tripTypeStr = "火车";
+        }else if(cxfs == 3){
+            person.tripType = 3;
+            person.tripTypeStr = "飞机";
+        }
+    }else if(cxfs == 0){
+        $.alert("请选择出行方式");
+        return;
+    }else if(cxfs == 4){
+        var val6 = $('#js_input_cxfsq').val();
+        if( val6 == ""){
+            $.alert("请填写车次/航班/车牌");
+            return;
+        }
+        person.tripTypeStr = "自驾";
+        person.tripType = 4;
+        person.tripTypeDesp =$('#js_input_cxfsq').val();
+    }
+    if(cfd == 4 && cfd !=0){
+        var val2 = $('#js_input_cfdq').val();
+        if(val2 ==""){
+            $.alert("请填写出发地");
+            return;
+        }
+        person.startLocalOther = $('#js_input_cfdq').val();
+        person.startLocalStr = $('#js_input_cfdq').val();
+    }else if(cfd != 4 && cfd !=0){
+        if(cfd ==1){
+            person.startLocal = 1;
+            person.startLocalStr = "武汉市";
+        }else if(cfd == 2){
+            person.startLocal = 2;
+            person.startLocalStr = "宜昌市";
+        }else if(cfd == 3){
+            person.startLocal = 3;
+            person.startLocalStr = "当阳市";
+        }
+
+    }else if(cfd ==0){
+        $.alert("请选择出发地");
+        return;
+    }
+    if(mdd ==4 && mdd!=0){
+        var val3 = $('#js_input_mddq').val();
+        if(val3 == ""){
+            $.alert("请填写目的地");
+            return;
+        }
+        person.endLocalOther = $('#js_input_mddq').val();
+        person.endlocalStr = $('#js_input_mddq').val();
+    }else if(mdd != 4 && mdd !=0){
+        if(mdd ==1){
+            person.endLocal = 1;
+            person.endlocalStr = "武汉市";
+        }else if(mdd == 2){
+            person.endLocal = 2;
+            person.endlocalStr = "宜昌市";
+        }else if(mdd == 3){
+            person.endLocal = 3;
+            person.endlocalStr = "当阳市";
+        }
+    }else if(mdd == 0){
+        $.alert("请选择目的地");
+        return;
+    }
+    listcx.push(person);
+    $.alert("添加成功");
+    tab()
+
+}
+function tab(){
+    var xxIds = [];
+    var xxName = [
+        "序号",
+        "出发地",
+        "目的地",
+        "出行方式",
+        "车次/航班/车牌",
+        "操作"
+    ];
+    for (var i = 0; i < xxName.length; i++) {
+        xxIds.push({
+            name: xxName[i]
+        });
+    }
+    $('#tabtr').empty();
+    var html = "<tr style='background-color: #f8f8f8;'>";
+    for (var i = 0; i < xxIds.length; i++) {
+        // alert(xxIds[i].name);
+        html += "<th>" + xxIds[i].name + "</th>";
+    }
+    html +="</tr>"
+    for (var i = 0; i < listcx.length; i++) {//后端传过来的集合遍历
+        if (i % 2 != 0) {
+            html += "<tr style='background-color: #f8f8f8;'>";
+        }
+        else {
+            html += "<tr>";
+        }
+
+        html += "<td style='text-align: center;'>" + (i + 1) + "</td>";
+        // var isValue = false; //记录是否赋值
+        html += "<td style='text-align: center;' >" + listcx[i].startLocalStr + " </td>";
+        html += "<td style='text-align: center;' >" + listcx[i].endlocalStr + " </td>";
+        html += "<td style='text-align: center;' >" + listcx[i].tripTypeStr + " </td>";
+        html += "<td style='text-align: center;' >" + listcx[i].tripTypeDesp + " </td>";
+        html += "<td style='text-align: center;' ><button value=" + i + " style='height:3vh;background-color: red;text-align: center;' class='weui-btn weui-btn_mini weui-btn_primary' onclick='splice(this.value)'>" + "删除" + " </button></td>";
+
+        html += "</tr>";
+        $("#tabtr").html(html);
+    }
+}
+function splice(obj){
+    listcx.splice(obj,1);
+    tab()
 }
 
 //近日报告
@@ -255,6 +622,136 @@ function ribao_cell(v) {
         '                              '));
 }
 
+function ribao_add() {
+    $('#btnAdd').on('click', function () {
+        $("#suspectedId").val("");
+        if ($('#ribao')[0].style.display == 'none') {
+            $('#notOpenRibao').toggle();
+            $('#ribao')[0].style.display = '';
+        } else {
+            $('#notOpenRibao')[0].style.display = '';
+            $('#ribao')[0].style.display = 'none';
+        }
+
+        var userId = $("#userId").val();
+        //获取用户家人
+        $.ajax({
+            url: '/home/selectAddSuspected',
+            get: "get",
+            data: {
+                "userCreate": userId
+            },
+            success: function (data) {
+                if (data != null || data!='') {
+                    //存在
+                    var suspected = data;
+                    $("#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);
+                    //基本情况
+                    if (suspected.familyStatus != "") {
+                        var familyStatusList = suspected.familyStatus.split(",");
+                        if (familyStatusList[0] == 1)
+                            $("input[name='checkbox1']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox1']").removeAttr("checked");
+                        if (familyStatusList[1] == 1)
+                            $("input[name='checkbox2']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox2']").removeAttr("checked");
+                        if (familyStatusList[2] == 1)
+                            $("input[name='checkbox3']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox3']").removeAttr("checked");
+                        if (familyStatusList[3] == 1)
+                            $("input[name='checkbox4']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox4']").removeAttr("checked");
+                        if (familyStatusList[4] == 1)
+                            $("input[name='checkbox5']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox5']").removeAttr("checked");
+                        if (familyStatusList[5] == 1)
+                            $("input[name='checkbox6']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox6']").removeAttr("checked");
+                        if (familyStatusList[6] == 1)
+                            $("input[name='checkbox7']").prop("checked", "checked");
+                        else
+                            $("input[name='checkbox7']").removeAttr("checked");
+
+                    }
+
+                    $("#switchQuezhen").val(getMedical(suspected.medical));
+                    $("#switchQuezhen").attr("data-values", suspected.medical);
+
+                    $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
+                    $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
+
+                    $("#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);
+                    $("#js_input_score_rezult").val(getScoreRezult(suspected.scoreRezult, suspected.temperatureScore));
+                    $("#js_input_score_rezult_value").val(suspected.scoreRezult);
+                    $("#js_input_temperature_score").val(suspected.temperatureScore);
+                    $("#js_input_score_histroy").val(suspected.scoreHistroy);
+                    $("#js_input_score").val(suspected.score);
+                }
+                else {
+                    //基本情况
+                    $("input[name='checkbox1']").removeAttr("checked");
+                    $("input[name='checkbox2']").removeAttr("checked");
+                    $("input[name='checkbox3']").removeAttr("checked");
+                    $("input[name='checkbox4']").removeAttr("checked");
+                    $("input[name='checkbox5']").removeAttr("checked");
+                    $("input[name='checkbox6']").removeAttr("checked");
+                    $("input[name='checkbox7']").removeAttr("checked");
+
+                    $("#switchQuezhen").val(getMedical(0));
+                    $("#switchQuezhen").attr("data-values", 0);
+
+                    $("#switchDanjiangeli").val(getSingleRoom(0));
+                    $("#switchDanjiangeli").attr("data-values", 0);
+
+                    $("#js_input_user_tiwen").val(0);
+
+                    $("#js_input_user_kesou").val(getCough(0));
+                    $("#js_input_user_kesou").attr("data-values", 0);
+
+                    $("#js_input_user_jirou").val(getMuscle(0));
+                    $("#js_input_user_jirou").attr("data-values", 0);
+
+                    $("#js_input_user_huxi").val(getDyspnea(0));
+                    $("#js_input_user_huxi").attr("data-values", 0);
+
+                    $("#js_input_user_fali").val(getFatigue(0));
+                    $("#js_input_user_fali").attr("data-values", 0);
+
+                    $("#js_input_user_fuxie").val(getDiarrhea(0));
+                    $("#js_input_user_fuxie").attr("data-values", 0);
+
+                }
+            },
+        });
+
+    });
+}
 
 function ribao_cancel() {
     $('#cancel').on('click', function () {
@@ -359,8 +856,67 @@ function ribaoCommit() {
         return;
     }
 
+
+    //lingyun
+    var gzzd = $("#js_input_gzzd").attr("data-values") == undefined ? 0 : $("#js_input_gzzd").attr("data-values");
+    var qtdd = $("#js_input_qtdd").val();
+    var workLocal="";
+    var workLocalOther = "";
+    if(gzzd == 0){
+        $.alert("请选择工作驻地");
+        return;
+    }else if(gzzd == 4 && qtdd == ""){
+        $.alert("请填写工作驻地");
+        return;
+    }else if(gzzd != 0 && gzzd !=4){
+        if(gzzd ==1){
+            workLocal = 1;
+        }else if(gzzd == 2){
+            workLocal = 2;
+        }else if(gzzd == 3){
+            workLocal = 3;
+        }
+    }else if(gzzd == 4 && qtdd != ""){
+        workLocal = 4;
+        workLocalOther = qtdd;
+    }
+    //var listcx = [];
+    //var person=new Object();
+
+    var jrszd = $("#js_input_jrszd").attr("data-values") == undefined ? 0 : $("#js_input_jrszd").attr("data-values");
+    var jrszq = $("#js_input_jrszq").val();
+    var todyLocal ="";
+    var todyLocalOther = "";
+    if(jrszd == 0){
+        $.alert("请选择今日所在地");
+        return;
+    }else if(jrszd == 4 && jrszq == ""){
+        $.alert("请填写今日所在地");
+        return;
+    }else if(jrszd != 0 && jrszd !=4){
+        if(jrszd ==1){
+            todyLocal = 1;
+        }else if(jrszd == 2){
+            todyLocal = 2;
+        }else if(jrszd == 3){
+            todyLocal = 3;
+        }
+    }else if(jrszd == 4 && jrszq != ""){
+        todyLocal = 4;
+        todyLocalOther = jrszq;
+    }
+    var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
+    var isTrip= "";
+    if(sf == 3){
+        $.alert("请选择是否出行");
+        return;
+    }else{
+        isTrip = sf;
+    }
+console.log(JSON.stringify(listcx))
+
     $.ajax({
-        url: '/home/addRibao',
+        url: '/home/addRibaoTrip',
         type: "post",
         data: {
             "suspectedId": suspectedId,
@@ -383,6 +939,12 @@ function ribaoCommit() {
             "temperatureScore": temperatureScore,
             "scoreHistroy": scoreHistroy,
             "score": score,
+            "workLocal": JSON.stringify(workLocal),
+            "workLocalOther": JSON.stringify(workLocalOther),
+            "todyLocal": JSON.stringify(todyLocal),
+            "todyLocalOther": JSON.stringify(todyLocalOther),
+            "isTrip": JSON.stringify(isTrip),
+            "listcx": JSON.stringify(listcx),
         },
         success: function (data) {
             if (data.msgReport == "2") {
@@ -520,7 +1082,21 @@ function updateSuspected(suspectedId) {
 }
 
 
-
+function addReport() {
+    var userId = $("#userId").val();
+    $.ajax({
+        url: '/home/addReport',
+        type: "post",
+        data: {
+            "userCreate": userId,
+        },
+        success: function (data) {
+            $.toast(data.msg);
+            if (data.msg == "操作成功")
+                document.getElementById("btn_shangbao").style['background-color'] = "#D9D9D9";
+        },
+    });
+}
 
 $("#my-input-ribao").calendar({
     dateFormat: 'yyyy-mm-dd',

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

@@ -28,4 +28,14 @@ public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
     //判断家人是否有历史评分
     @Select("select score from ms_suspected where user_create=#{userCreate} and user_name=#{userName} and suspected_id !=#{suspectedId}  order by time_update desc limit 1")
     Integer selectUserNameScore(@Param("userCreate") Long userCreate, @Param("userName") String userName, @Param("suspectedId") Long suspectedId);
+
+
+    //判断家人是否有历史评分
+    @Select("select a.* \n" +
+            "from ms_suspected a \n" +
+            "INNER JOIN ms_report b on a.report_id=b.report_id \n" +
+            "where b.user_create=#{userCreate} and b.report_date=(select report_date from ms_report where user_create=#{userCreate} and report_date<curdate() ORDER BY report_date desc LIMIT 1)\n" +
+            "and a.user_name not in (select a.user_name from ms_suspected a INNER JOIN ms_report b on a.report_id=b.report_id where b.user_create=#{userCreate} and b.report_date=curdate())\n" +
+            " ORDER by a.time_create  LIMIT 1")
+    MsSuspected selectAddSuspected(@Param("userCreate") Long userCreate);
 }

+ 18 - 0
whepi-web/src/main/java/com/bofeng/dao/MsTripDetMapper.java

@@ -0,0 +1,18 @@
+package com.bofeng.dao;
+
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.MsTripDet;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/22 14:56
+ */
+@Mapper
+@Repository
+public interface MsTripDetMapper extends BaseMapper<MsTripDet> {
+    int deleteByTripId(@Param("tripId") Long tripId);
+}

+ 16 - 0
whepi-web/src/main/java/com/bofeng/dao/MsTripMapper.java

@@ -0,0 +1,16 @@
+package com.bofeng.dao;
+
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.MsTrip;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/22 12:43
+ */
+@Mapper
+@Repository
+public interface MsTripMapper extends BaseMapper<MsTrip> {
+}

+ 36 - 0
whepi-web/src/main/java/com/bofeng/entity/MsTrip.java

@@ -0,0 +1,36 @@
+package com.bofeng.entity;
+
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/21 22:00
+ */
+@Getter
+@Setter
+@TableName("ms_trip")
+public class MsTrip {
+
+    @TableId("trip_id")
+    private Long tripId;
+
+    @TableField("work_local")
+    private Integer workLocal;
+
+    @TableField("work_local_other")
+    private String workLocalOther;
+
+    @TableField("today_local")
+    private Integer todayLocal;
+
+    @TableField("today_local_other")
+    private String todayLocalOther;
+
+    @TableField("is_trip")
+    private Integer isTrip;
+}

+ 61 - 0
whepi-web/src/main/java/com/bofeng/entity/MsTripDet.java

@@ -0,0 +1,61 @@
+package com.bofeng.entity;
+
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Getter;
+import lombok.Setter;
+import org.joda.time.DateTime;
+
+import java.util.Date;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/21 22:00
+ */
+@Getter
+@Setter
+@TableName("ms_trip_det")
+public class MsTripDet {
+
+    @TableId("trip_det_id")
+    private Long tripDetId;
+
+    @TableField("trip_id")
+    private Long tripId;
+
+    @TableField("sort")
+    private Integer sort;
+
+    @TableField("start_local")
+    private Integer startLocal;
+
+    @TableField("start_local_other")
+    private String startLocalOther;
+
+    @TableField("end_local")
+    private Integer endLocal;
+
+    @TableField("end_local_other")
+    private String endLocalOther;
+
+    @TableField("trip_type")
+    private Integer tripType;
+
+    @TableField("trip_type_desp")
+    private String tripTypeDesp;
+
+    @TableField("user_create")
+    private Long userCreate;
+
+    @TableField("time_create")
+    private DateTime timeCreate;
+
+    @TableField("user_update")
+    private Long userUpdate;
+
+    @TableField("time_update")
+    private DateTime timeUpdate;
+}

+ 14 - 3
whepi-web/src/main/java/com/bofeng/service/MsSuspectedService.java

@@ -4,8 +4,10 @@ package com.bofeng.service;
 import com.baomidou.mybatisplus.toolkit.IdWorker;
 import com.bofeng.dao.MsReportMapper;
 import com.bofeng.dao.MsSuspectedMapper;
+import com.bofeng.dao.MsTripMapper;
 import com.bofeng.entity.MsReport;
 import com.bofeng.entity.MsSuspected;
+import com.bofeng.entity.MsTrip;
 import com.yvan.platform.Conv;
 import io.swagger.models.auth.In;
 import org.joda.time.DateTime;
@@ -32,6 +34,8 @@ public class MsSuspectedService {
     private MsSuspectedMapper msSuspectedMapper;
     @Autowired
     private MsReportMapper msReportMapper;
+    @Autowired
+    private MsTripMapper msTripMapper;
 
     //查询家人
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
@@ -39,6 +43,12 @@ public class MsSuspectedService {
         return msSuspectedMapper.selectById(suspectedId);
     }
 
+    //查询用户最近一天的一个家人
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public MsSuspected selectAddSuspected(Long userCreate) {
+        return msSuspectedMapper.selectAddSuspected(userCreate);
+    }
+
     //添加家人
     @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
     public Long addSuspected(Long suspectedId, String userName, Integer grender, Integer age, String familyStatus,
@@ -107,7 +117,7 @@ public class MsSuspectedService {
                 return 2L;
             //判断是否评估
             if (scoreRezult == 0) {
-                MsSuspected msSuspected1 = getScore(0L, userName, medical,temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
+                MsSuspected msSuspected1 = getScore(0L, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
                 if (msSuspected1 != null) {
                     scoreRezult = msSuspected1.getScoreRezult();
                     score = msSuspected1.getScore();
@@ -143,6 +153,7 @@ public class MsSuspectedService {
             msSuspected.setUserUpdate(userCreate);
             msSuspected.setTimeUpdate(DateTime.now());
             msSuspectedMapper.insert(msSuspected);
+
         } else {
             //判断家人是否同名
             List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
@@ -154,7 +165,7 @@ public class MsSuspectedService {
                         return 2L;
                 }
             }
-            MsSuspected msSuspected2 = getScore(suspectedId, userName, medical,temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
+            MsSuspected msSuspected2 = getScore(suspectedId, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
             if (msSuspected2 != null) {
                 scoreRezult = msSuspected2.getScoreRezult();
                 score = msSuspected2.getScore();
@@ -253,7 +264,7 @@ public class MsSuspectedService {
         msSuspected.setScore(addScore(medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea));
         Integer scoreHistroy = msSuspectedMapper.selectUserNameScore(userCreate, userName, susprectedId);
         msSuspected.setScoreHistroy(scoreHistroy);
-        msSuspected.setScoreRezult(scoreRezulte(medical,msSuspected.getScoreHistroy(), msSuspected.getScore()));
+        msSuspected.setScoreRezult(scoreRezulte(medical, msSuspected.getScoreHistroy(), msSuspected.getScore()));
         return msSuspected;
     }
 

+ 261 - 0
whepi-web/src/main/java/com/bofeng/service/MsTripService.java

@@ -0,0 +1,261 @@
+package com.bofeng.service;
+
+
+import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.MsReportMapper;
+import com.bofeng.dao.MsSuspectedMapper;
+import com.bofeng.dao.MsTripDetMapper;
+import com.bofeng.dao.MsTripMapper;
+import com.bofeng.entity.MsReport;
+import com.bofeng.entity.MsSuspected;
+import com.bofeng.entity.MsTrip;
+import com.bofeng.entity.MsTripDet;
+import com.yvan.platform.Conv;
+import org.joda.time.DateTime;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.math.BigDecimal;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/22 13:33
+ */
+@Service
+@Transactional(readOnly = true)
+public class MsTripService {
+
+    @Autowired
+    private MsSuspectedMapper msSuspectedMapper;
+    @Autowired
+    private MsReportMapper msReportMapper;
+    @Autowired
+    private MsTripMapper msTripMapper;
+    @Autowired
+    private MsTripDetMapper msTripDetMapper;
+    @Autowired
+    private MsSuspectedService msSuspectedService;
+
+
+    //添加家人
+    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
+    public Long addSuspectedTrip(Long suspectedId, String userName, Integer grender, Integer age, String familyStatus,
+                                 String statusDesp, Integer medical, BigDecimal temperature, Integer cough, Integer muscle,
+                                 Integer dyspnea, Integer fatigue, Integer diarrhea, Integer singleRoom, String others, Long userCreate, Integer scoreRezult, Integer temperatureScore, Integer scoreHistroy, Integer score
+            , Integer workLocal, String workLocalOther, Integer todayLocal, String todayLocalOther, Integer isTrip, List<MsTripDet> listTripDet) {
+        Long reportId = 0L;
+        //如果是当前日期 已经添加
+        Date t = new Date();
+        SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
+        String reportDate = df.format(t);
+        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(0);
+            msReport.setSureNum(0);
+            msReport.setSuspectedNum(0);
+            msReport.setNormalNum(0);
+            msReport.setSingleNum(0);
+            msReport.setRemarks("");
+            msReport.setReportDate(DateTime.now().toDate());
+            msReport.setMsStatus(0);
+            msReport.setUserCreate(userCreate);
+            msReport.setTimeCreate(DateTime.now());
+            msReport.setUserUpdate(userCreate);
+            msReport.setTimeUpdate(DateTime.now());
+            msReportMapper.insert(msReport);
+            reportId = msReport.getReportId();
+        } else {
+            reportId = listReport.get(0).getReportId();
+        }
+
+        //判断是否疑似
+        Integer suspectedStatus = 0;
+        //确诊
+        if (medical == 1)
+            suspectedStatus = 1;
+        //隔离
+        if (singleRoom == 1)
+            suspectedStatus = 1;
+        //体温
+        if (Conv.NFloat(temperature) < Conv.NFloat(35) || Conv.NFloat(temperature) > Conv.NFloat(37.3))
+            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) {
+            //判断家人是否同名
+            List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
+            if (list != null && list.size() > 0)
+                return 2L;
+            //判断是否评估
+            if (scoreRezult == 0) {
+                MsSuspected msSuspected1 = msSuspectedService.getScore(0L, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
+                if (msSuspected1 != null) {
+                    scoreRezult = msSuspected1.getScoreRezult();
+                    score = msSuspected1.getScore();
+                    temperatureScore = msSuspected1.getTemperatureScore();
+                    scoreHistroy = msSuspected1.getScoreHistroy();
+                }
+            }
+
+            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.setScoreRezult(scoreRezult);
+            msSuspected.setScore(score);
+            msSuspected.setScoreHistroy(scoreHistroy);
+            msSuspected.setTemperatureScore(temperatureScore);
+            msSuspected.setUserCreate(userCreate);
+            msSuspected.setTimeCreate(DateTime.now());
+            msSuspected.setUserUpdate(userCreate);
+            msSuspected.setTimeUpdate(DateTime.now());
+            msSuspectedMapper.insert(msSuspected);
+
+            //添加出行
+            MsTrip msTrip = new MsTrip();
+            msTrip.setTripId(msSuspected.getSuspectedId());
+            msTrip.setIsTrip(isTrip);
+            msTrip.setTodayLocal(todayLocal);
+            msTrip.setTodayLocalOther(todayLocalOther);
+            msTrip.setWorkLocal(workLocal);
+            msTrip.setWorkLocalOther(workLocalOther);
+            msTripMapper.insert(msTrip);
+            //添加出行详细
+            if (listTripDet != null && listTripDet.size() > 0) {
+                for (MsTripDet msTripDet : listTripDet) {
+                    MsTripDet msTripDet1 = new MsTripDet();
+                    msTripDet1.setTripDetId(IdWorker.getId());
+                    msTripDet1.setTripId(msSuspected.getSuspectedId());
+                    msTripDet1.setSort(msTripDet.getSort());
+                    msTripDet1.setStartLocal(msTripDet.getStartLocal());
+                    msTripDet1.setStartLocalOther(msTripDet.getStartLocalOther());
+                    msTripDet1.setEndLocal(msTripDet.getEndLocal());
+                    msTripDet1.setEndLocalOther(msTripDet.getEndLocalOther());
+                    msTripDet1.setTripType(msTripDet.getTripType());
+                    msTripDet1.setTripTypeDesp(msTripDet.getTripTypeDesp());
+                    msTripDet1.setTimeCreate(DateTime.now());
+                    msTripDet1.setUserCreate(userCreate);
+                    msTripDet1.setTimeUpdate(DateTime.now());
+                    msTripDet1.setUserUpdate(userCreate);
+                    msTripDetMapper.insert(msTripDet1);
+                }
+            }
+
+        } else {
+            //判断家人是否同名
+            List<MsSuspected> list = msSuspectedMapper.selectUserNameNum(reportId, userName, reportDate);
+            if (list != null && list.size() > 0) {
+                if (list.size() > 1)
+                    return 2L;
+                else {
+                    if (list.get(0).getSuspectedId().longValue() != suspectedId.longValue())
+                        return 2L;
+                }
+            }
+            MsSuspected msSuspected2 = msSuspectedService.getScore(suspectedId, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
+            if (msSuspected2 != null) {
+                scoreRezult = msSuspected2.getScoreRezult();
+                score = msSuspected2.getScore();
+                temperatureScore = msSuspected2.getTemperatureScore();
+                scoreHistroy = msSuspected2.getScoreHistroy();
+            }
+
+            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.setScoreRezult(scoreRezult);
+                msSuspected1.setScore(score);
+                msSuspected1.setScoreHistroy(scoreHistroy);
+                msSuspected1.setTemperatureScore(temperatureScore);
+                msSuspected1.setSuspectedStatus(suspectedStatus);
+                msSuspectedMapper.updateById(msSuspected1);
+            }
+            //编辑行程
+            MsTrip msTrip = msTripMapper.selectById(suspectedId);
+            if (msTrip != null) {
+                msTrip.setWorkLocalOther(workLocalOther);
+                msTrip.setWorkLocal(workLocal);
+                msTrip.setTodayLocalOther(todayLocalOther);
+                msTrip.setTodayLocal(todayLocal);
+                msTrip.setIsTrip(isTrip);
+                msTripMapper.updateById(msTrip);
+            }
+            //删除行程详细
+            msTripDetMapper.deleteByTripId(suspectedId);
+            //添加行程详细
+            //添加出行详细
+            if (listTripDet != null && listTripDet.size() > 0) {
+                for (MsTripDet msTripDet : listTripDet) {
+                    MsTripDet msTripDet1 = new MsTripDet();
+                    msTripDet1.setTripDetId(IdWorker.getId());
+                    msTripDet1.setTripId(suspectedId);
+                    msTripDet1.setSort(msTripDet.getSort());
+                    msTripDet1.setStartLocal(msTripDet.getStartLocal());
+                    msTripDet1.setStartLocalOther(msTripDet.getStartLocalOther());
+                    msTripDet1.setEndLocal(msTripDet.getEndLocal());
+                    msTripDet1.setEndLocalOther(msTripDet.getEndLocalOther());
+                    msTripDet1.setTripType(msTripDet.getTripType());
+                    msTripDet1.setTripTypeDesp(msTripDet.getTripTypeDesp());
+                    msTripDet1.setTimeCreate(DateTime.now());
+                    msTripDet1.setUserCreate(userCreate);
+                    msTripDet1.setTimeUpdate(DateTime.now());
+                    msTripDet1.setUserUpdate(userCreate);
+                    msTripDetMapper.insert(msTripDet1);
+                }
+            }
+        }
+        //更新今日日报
+        msSuspectedService.updateReport(reportId, medical, singleRoom, temperature);
+        return reportId;
+    }
+}

+ 12 - 1
whepi-web/src/main/java/com/bofeng/wx/WxController.java

@@ -167,17 +167,28 @@ public class WxController {
                                 "/home/adminHelp.html",
                         WxConsts.OAuth2Scope.SNSAPI_USERINFO, null)
         );
+
         val btn33 = new WxMenuButton();
-        btn33.setName("简介");
+        btn33.setName("出入管理");
         btn33.setType(WxConsts.MenuButtonType.VIEW);
         btn33.setUrl(
                 wxService.oauth2buildAuthorizationUrl(weChatProperties.getDomain() +
+                                "/home/outHelp.html",
+                        WxConsts.OAuth2Scope.SNSAPI_USERINFO, null)
+        );
+
+        val btn34 = new WxMenuButton();
+        btn34.setName("简介");
+        btn34.setType(WxConsts.MenuButtonType.VIEW);
+        btn34.setUrl(
+                wxService.oauth2buildAuthorizationUrl(weChatProperties.getDomain() +
                                 "/home/desc.html",
                         WxConsts.OAuth2Scope.SNSAPI_USERINFO, null)
         );
         btnDesc.getSubButtons().add(btn31);
         btnDesc.getSubButtons().add(btn32);
         btnDesc.getSubButtons().add(btn33);
+        btnDesc.getSubButtons().add(btn34);
 //        btn3.getSubButtons().add(btnDesc);
 //        btn3.getSubButtons().add(btnHelp);
 

+ 13 - 6
whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java

@@ -61,15 +61,22 @@ public class MsReportController {
         Integer scoreHistroy = Conv.NI(request.getParameter("scoreHistroy"));
         Integer score = Conv.NI(request.getParameter("score"));
 
-        MsReport msReport=new MsReport();
-        Long reportId =msSuspectedService.addSuspected(suspectedId, userName, grender, age, familyStatus, statusDesp, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, singleRoom, others, userCreate,scoreRezult,temperatureScore,scoreHistroy,score);
-        if(reportId==2L)
+        MsReport msReport = new MsReport();
+        Long reportId = msSuspectedService.addSuspected(suspectedId, userName, grender, age, familyStatus, statusDesp, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, singleRoom, others, userCreate, scoreRezult, temperatureScore, scoreHistroy, score);
+        if (reportId == 2L)
             msReport.setMsgReport("2");
         else
-            msReport= msReportService.getByReport(reportId);
+            msReport = msReportService.getByReport(reportId);
         return msReport;
     }
 
+    //查询用户最近一天的一个家人
+    @GetMapping("/home/selectAddSuspected")
+    public MsSuspected selectAddSuspected(HttpServletRequest request) {
+        Long userCreate = Long.parseLong(request.getParameter("userCreate"));
+        return msSuspectedService.selectAddSuspected(userCreate);
+    }
+
     //查询家人
     @GetMapping("/home/selectSuspected")
     public MsSuspected selectSuspected(HttpServletRequest request) {
@@ -114,7 +121,7 @@ public class MsReportController {
             return ModelOps.newSuccess();
         } else if (re == 2) { //没有上报体温
             return ModelOps.newFail("请填报今日体温!");
-        }else if (re == 3) { //没有选择家人
+        } else if (re == 3) { //没有选择家人
             return ModelOps.newFail("请选择家人!");
         }
         return ModelOps.newFail("上报错误");
@@ -147,7 +154,7 @@ public class MsReportController {
         Integer dyspnea = Conv.NI(request.getParameter("dyspnea"));
         Integer fatigue = Conv.NI(request.getParameter("fatigue"));
         Integer diarrhea = Conv.NI(request.getParameter("diarrhea"));
-        return msSuspectedService.getScore(suspectedId,userName,medical,temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
+        return msSuspectedService.getScore(suspectedId, userName, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, userCreate);
     }
 
 }

+ 89 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/MsTripController.java

@@ -0,0 +1,89 @@
+package com.bofeng.wx.controller;
+
+
+import com.bofeng.entity.MsReport;
+import com.bofeng.entity.MsSuspected;
+import com.bofeng.entity.MsTripDet;
+import com.bofeng.entity.Owner;
+import com.bofeng.service.MsReportService;
+import com.bofeng.service.MsTripService;
+import com.yvan.platform.Conv;
+import com.yvan.platform.JsonWapper;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @Author: xielianghe
+ * @Date: 2020/2/22 13:31
+ */
+@RestController
+public class MsTripController {
+    @Autowired
+    private MsReportService msReportService;
+    @Autowired
+    private MsTripService msTripService;
+
+    //添加家人出行
+    @PostMapping("/home/addRibaoTrip")
+    public MsReport saveUser(JsonWapper jsonWapper) throws UnsupportedEncodingException {
+
+        //初始化今日日报
+        Long suspectedId = jsonWapper.asObject(Long.class, "suspectedId");
+        Long userCreate = jsonWapper.asObject(Long.class, "userCreate");
+        String userName = jsonWapper.asObject(String.class, "userName");
+        byte[] utf8Bytes = userName.getBytes("UTF-8");
+        userName = new String(utf8Bytes, "UTF-8");
+        Integer grender = jsonWapper.asObject(Integer.class, "grender");
+        Integer age = jsonWapper.asObject(Integer.class, "age");
+        String familyStatus = jsonWapper.asObject(String.class, "familyStatus");
+        String statusDesp = jsonWapper.asObject(String.class, "statusDesp");
+        Integer medical = jsonWapper.asObject(Integer.class, "medical");
+        BigDecimal temperature = jsonWapper.asObject(BigDecimal.class, "temperature");
+        Integer cough = jsonWapper.asObject(Integer.class, "cough");
+        Integer muscle = jsonWapper.asObject(Integer.class, "muscle");
+        Integer dyspnea = jsonWapper.asObject(Integer.class, "dyspnea");
+        Integer fatigue = jsonWapper.asObject(Integer.class, "fatigue");
+        Integer diarrhea = jsonWapper.asObject(Integer.class, "diarrhea");
+        Integer singleRoom = jsonWapper.asObject(Integer.class, "singleRoom");
+        String others = jsonWapper.asObject(String.class, "others");
+        Integer scoreRezult = jsonWapper.asObject(Integer.class, "scoreRezult");
+        Integer temperatureScore = jsonWapper.asObject(Integer.class, "temperatureScore");
+        Integer scoreHistroy = jsonWapper.asObject(Integer.class, "scoreHistroy");
+        Integer score = jsonWapper.asObject(Integer.class, "score");
+        //添加出行
+        Integer workLocal = jsonWapper.asObject(Integer.class, "workLocal");
+        String workLocalOther = jsonWapper.asObject(String.class, "workLocalOther");
+        Integer todayLocal = jsonWapper.asObject(Integer.class, "todayLocal");
+        String todayLocalOther = jsonWapper.asObject(String.class, "todayLocalOther");
+        Integer isTrip = jsonWapper.asObject(Integer.class, "isTrip");
+        List<MsTripDet> listTripDet = new ArrayList<>();
+        MsTripDet msTripDet;
+        for (int i = 0; i < jsonWapper.asList("tripDet").size(); i++) {
+            Map<String, Object> mm = (Map) jsonWapper.asList("listTripDet").get(i);
+            msTripDet = new MsTripDet();
+            msTripDet.setSort(Integer.parseInt(mm.get("sort").toString()));
+            msTripDet.setStartLocal(Integer.parseInt(mm.get("startLocal").toString()));
+            msTripDet.setStartLocalOther(mm.get("startLocalOther").toString());
+            msTripDet.setEndLocal(Integer.parseInt(mm.get("endLocal").toString()));
+            msTripDet.setEndLocalOther(mm.get("endLocalOther").toString());
+            msTripDet.setTripType(Integer.parseInt(mm.get("tripType").toString()));
+            msTripDet.setTripTypeDesp(mm.get("tripTypeOther").toString());
+            listTripDet.add(msTripDet);
+        }
+        MsReport msReport = new MsReport();
+        Long reportId = msTripService.addSuspectedTrip(suspectedId, userName, grender, age, familyStatus, statusDesp, medical, temperature, cough, muscle, dyspnea, fatigue, diarrhea, singleRoom, others, userCreate, scoreRezult, temperatureScore, scoreHistroy, score, workLocal, workLocalOther, todayLocal, todayLocalOther, isTrip, listTripDet);
+        if (reportId == 2L)
+            msReport.setMsgReport("2");
+        else
+            msReport = msReportService.getByReport(reportId);
+        return msReport;
+    }
+}

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

@@ -289,6 +289,12 @@ public class UserOpenController {
         return new ModelAndView("/home/adminHelp.ftl", model);
     }
 
+    @GetMapping("/home/outHelp.html")
+    public ModelAndView outHelp(ModelMap model) {
+        return new ModelAndView("/home/outHelp.ftl", model);
+    }
+
+
     @GetMapping("/home/testOk.html")
     public ModelAndView testOk(ModelMap model, HttpServletResponse response) {
         response.setHeader("Access-Control-Allow-Credentials", "true");

+ 7 - 0
whepi-web/src/main/resources/mapper/MsTripDet.xml

@@ -0,0 +1,7 @@
+<?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.MsTripDetMapper">
+    <delete id="deleteByTripId">
+        delete from ms_trip_det where trip_id = #{tripId}
+    </delete>
+</mapper>