瀏覽代碼

Merge remote-tracking branch 'origin/master'

maoyunfeng 5 年之前
父節點
當前提交
c665590bd2

+ 21 - 0
admin-ui/app/whepi/index.js

@@ -113,6 +113,27 @@ $(function () {
         onLoadSuccess: function (node, data) {
         }
       });
+    } else if (userRole == "7") {//凌云集团管理员
+      $('#menutree').tree({
+        url: '/app/whepi/mock/menu7.json',
+        onDblClick: function (node) {
+          var $this = $(this);
+          if (!$this.tree('isLeaf', node.target)) {
+            $this.tree(node.state === 'closed' ? 'expand' : 'collapse', node.target);
+          }
+        },
+        onSelect: function () {
+          return false;
+        },
+        onClick: function (node) {
+          var href = node.href;
+          if ($.trim(href)) {
+            App.addTab({title: node.text, url: node.href, id: node.id, iconCls: node.iconCls});
+          }
+        },
+        onLoadSuccess: function (node, data) {
+        }
+      });
     }
 
 

+ 0 - 1
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -94,7 +94,6 @@ define(function (require) {
             xtype: 'datebox',
             labelWidth: 'auto',
             width: 250,
-            required: true
           },
         ]]
       };

+ 0 - 1
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -76,7 +76,6 @@ define(function (require) {
             xtype: 'datebox',
             labelWidth: 'auto',
             width: 250,
-            required: true
           },
         ]]
       };

+ 22 - 0
admin-ui/app/whepi/mock/menu7.json

@@ -0,0 +1,22 @@
+{
+  "success": true,
+  "msg": "",
+  "data": [
+    {
+      "id": "ENT10001",
+      "text": "凌云导出报表",
+      "href": "/app/whepi/lingyun/lingyunUser2.js",
+      "iconCls": "icon-blank fa fa-align-justify",
+      "state": "close",
+      "children": []
+    },
+    {
+      "id": "ENT10002",
+      "text": "特殊人员管理",
+      "href": "/app/whepi/scan/specialPersonnel.js",
+      "iconCls": "icon-blank fa fa-align-justify",
+      "state": "close",
+      "children": []
+    }
+  ]
+}

二進制
whepi-ui/static/outHelp.jpg


二進制
whepi-ui/static/outHelp_1.jpg


+ 1 - 0
whepi-ui/templates/home/adminHelp.ftl

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

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

@@ -36,7 +36,7 @@
         }
         .user-title-long {
             text-align: center;
-            font-size: 25px;
+            font-size: 20px;
             color: #000000;
             font-weight: 900;
             margin: 0 15%;
@@ -170,4 +170,4 @@
 </head>
 <span hidden="hidden" id="id"></span>
 
-<body style="height: 100%;overflow:hidden;" ontouchstart>
+<body style="height: 100%;" ontouchstart>

+ 5 - 0
whepi-ui/templates/home/home.ftl

@@ -46,6 +46,7 @@
     var xiaoquId = '1238790987234'; //1238790987234
     var ceshixiaoquId = '5';
     var canSahngbao = true;
+    var cantijiao = true;
     <#include "/home/ribao.js" />
     <#include "/home/qiuzhu.js" />
     (function ($) {
@@ -67,10 +68,14 @@
             $('#ribao_trip')[0].style.display = '';
             $('#ribao_djgl')[0].style.display = 'none';
             $('#ribao_jbqk')[0].style.display = '';
+            $('#qz_nav1_t')[0].style.display = 'none';
+            $('#qz_nav1')[0].style.display = 'none';
         } else {
             $('#ribao_trip')[0].style.display = 'none';
             $('#ribao_djgl')[0].style.display = '';
             $('#ribao_jbqk')[0].style.display = '';
+            $('#qz_nav1_t')[0].style.display = '';
+            $('#qz_nav1')[0].style.display = '';
         }
         ribao_init();
         qiuzhu_init();

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

@@ -1,12 +1,12 @@
 <#assign title="家庭手册"/>
 <#include "/home/frag.head.ftl" />
 
-<div class="page__bd" style="height: 300px">
-    <div class="container">
+<div class="container" style="width: 100%">
+    <div class="weui-panel weui-panel_access">
         <img src="/static/homeHelp_1.jpg" style="width: 100%"/>
+    </div>
 </div>
 
-
 <#include "/home/frag.foot.ftl" />
 
 <script>

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

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

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

@@ -1,7 +1,7 @@
 <div class="page__bd">
     <div class="weui-tab">
         <div class="weui-navbar">
-            <a class="weui-navbar__item weui-bar__item_on" target="#qz_nav1" module="qiu_zhu" onclick="familyClick()">
+            <a id="qz_nav1_t" class="weui-navbar__item weui-bar__item_on" target="#qz_nav1" module="qiu_zhu" onclick="familyClick()">
                 小区求助
             </a>
             <a class="weui-navbar__item" target="#qz_nav2" module="qiu_zhu" id="qzMy_help" onclick="qzMy_help('')">

+ 3 - 0
whepi-ui/templates/home/ribao.ftl

@@ -278,6 +278,9 @@
                                        style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;width: 145%"
                                        onchange="selectinput6(this)"/>
                             </div>
+                            <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+                                <div style="height: 5vh; line-height: 5vh; color: red">注:本地区出行无需填写行程</div>
+                            </div>
                             <br/>
                         <#--<div style="text-align: center;height: 1vh;">出行情况上报</div>-->
 

+ 26 - 6
whepi-ui/templates/home/ribao.js

@@ -1006,6 +1006,10 @@ function ribao_cancel() {
 }
 
 function ribaoCommit() {
+  if (cantijiao == false) {
+    return
+  }
+  cantijiao = false
   var sf = $("#js_input_sf").attr("data-values") == undefined ? 3 : $("#js_input_sf").attr("data-values");
   if (listcx.length == 0 && sf == 1) {
     $.alert("请添加出行");
@@ -1059,7 +1063,6 @@ function ribaoCommit() {
 
 
   var medical = $("input[name='radio']:checked").val();
-  console.log(medical)
   if (medical == undefined) {
     $.alert("请选择新冠肺炎");
     return;
@@ -1225,9 +1228,9 @@ function ribaoCommit() {
         $('#notOpenRibao')[0].style.display = '';
         $('#ribao')[0].style.display = 'none';
       }
+      cantijiao = true
       $('#ribao_jinrijujian').empty();
       $('#ribao_jinrijujian').append(data.safetyNum);
-
       ribao_refrash();
 
       clearShow();
@@ -1258,6 +1261,7 @@ function deleteSuspected(suspectedId) {
       document.getElementById("txt_shangbao").style['color'] = "red";
       $('#txt_shangbao').empty();
       $('#txt_shangbao').append("今日未上报");
+      $('#txt_shangbaotime').empty();
       ribao_refrash();
     },
   });
@@ -1324,9 +1328,18 @@ function updateSuspected(suspectedId) {
         // $("#js_input_user_status").attr("data-values", suspected.familyStatus);
 
         // $("#jibenmiaoshu").val(suspected.statusDesp);
-
-        $("#switchQuezhen").val(getMedical(suspected.medical));
-        $("#switchQuezhen").attr("data-values", suspected.medical);
+        if(suspected.medical==0)
+            $("input[id='s18']").prop("checked", "checked");
+        if(suspected.medical==1)
+          $("input[id='s19']").prop("checked", "checked");
+        if(suspected.medical==2)
+          $("input[id='s20']").prop("checked", "checked");
+        if(suspected.medical==3)
+          $("input[id='s21']").prop("checked", "checked");
+        if(suspected.medical==4)
+          $("input[id='s22']").prop("checked", "checked");
+        // $("#switchQuezhen").val(getMedical(suspected.medical));
+        // $("#switchQuezhen").attr("data-values", suspected.medical);
 
         $("#switchDanjiangeli").val(getSingleRoom(suspected.singleRoom));
         $("#switchDanjiangeli").attr("data-values", suspected.singleRoom);
@@ -1474,7 +1487,7 @@ function addReport() {
         document.getElementById("txt_shangbao").style['color'] = "#0bb20c";
         document.getElementById("txt_shangbaotime").style['color'] = "#0bb20c";
         $('#txt_shangbao').empty();
-        $('#txt_shangbao').append("今日已上报" );
+        $('#txt_shangbao').append("今日已上报");
         $('#txt_shangbaotime').empty();
         $('#txt_shangbaotime').append("上报时间:" + time);
       }
@@ -1822,6 +1835,13 @@ function clearShow() {
   $("#js_input_sf").val(getIsTrip(0));
   $("#js_input_sf").attr("data-values", 0);
   $('#none')[0].style.display = 'none';
+
+
+  $("input[id='s18']").removeAttr("checked");
+  $("input[id='s19']").removeAttr("checked");
+  $("input[id='s20']").removeAttr("checked");
+  $("input[id='s21']").removeAttr("checked");
+  $("input[id='s22']").removeAttr("checked");
 }
 
 //健康评估

+ 177 - 157
whepi-ui/templates/user/home.ftl

@@ -18,11 +18,11 @@
                     <br/>
                     <br/>
                     <div class="weui-form" id="fromMsg">
-<#--                        <div class="weui-cells_radio user-font">-->
-<#--                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我是&nbsp;&nbsp;-->
-<#--                            <input name="Fruit" type="radio" value="1"/>家庭用户-->
-<#--                            <input name="Fruit" type="radio" value="2"/>管理员人员-->
-<#--                        </div>-->
+                    <#--                        <div class="weui-cells_radio user-font">-->
+                    <#--                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;我是&nbsp;&nbsp;-->
+                    <#--                            <input name="Fruit" type="radio" value="1"/>家庭用户-->
+                    <#--                            <input name="Fruit" type="radio" value="2"/>管理员人员-->
+                    <#--                        </div>-->
                         <hr class="user-hr">
                         <div class="maindiv">
                             <div class="leftdiv">
@@ -166,6 +166,17 @@
                             </select>
                         </div>
                     </div>
+                    <div id="yaoqingmaSS" style="display: none">
+                        <div class="weui-cells__title">邀请码</div>
+                        <div class="weui-cells">
+                            <div class="weui-cell">
+                                <div class="weui-cell__bd">
+                                    <input class="weui-input" type="text" id="yaoqingma" placeholder="请输入LY邀请码"/>
+                                </div>
+                            </div>
+                        </div>
+                    </div>
+
                     <div class="weui-cell weui-cell_select weui-cell_select-after" id="unitMsg">
                         <div class="weui-cell__hd">
                             <label for="" class="weui-label" id="danweiTitle">栋/单元</label>
@@ -222,185 +233,185 @@
 
             var areaData = [];
             switch (parseInt(city)) {
-                case 420100 :{
+                case 420100 : {
 
-                    areaData=[
-                        {value: 420102,	text: "江岸区"},
-                        {value: 420103,	text: "江汉区"},
-                        {value: 420104,	text: "硚口区"},
-                        {value: 420105,	text: "汉阳区"},
-                        {value: 420106,	text: "武昌区"},
-                        {value: 420107,	text: "青山区"},
-                        {value: 420111,	text: "洪山区"},
-                        {value: 420112,	text: "东西湖区"},
-                        {value: 420113,	text: "汉南区"},
-                        {value: 420114,	text: "蔡甸区"},
-                        {value: 420115,	text: "江夏区"},
-                        {value: 420116,	text: "黄陂区"},
-                        {value: 420117,	text: "新洲区"}
+                    areaData = [
+                        {value: 420102, text: "江岸区"},
+                        {value: 420103, text: "江汉区"},
+                        {value: 420104, text: "硚口区"},
+                        {value: 420105, text: "汉阳区"},
+                        {value: 420106, text: "武昌区"},
+                        {value: 420107, text: "青山区"},
+                        {value: 420111, text: "洪山区"},
+                        {value: 420112, text: "东西湖区"},
+                        {value: 420113, text: "汉南区"},
+                        {value: 420114, text: "蔡甸区"},
+                        {value: 420115, text: "江夏区"},
+                        {value: 420116, text: "黄陂区"},
+                        {value: 420117, text: "新洲区"}
                     ];
-                  break;
+                    break;
                 }
-                case 420200 :{
-                    areaData=[
-                        {value: 420202,	text:"黄石港区"},
-                        {value: 420203,	text:"西塞山区"},
-                        {value: 420204,	text:"下陆区"},
-                        {value: 420205,	text:"铁山区"},
-                        {value: 420222,	text:"阳新县"},
-                        {value: 420281,	text:"大冶市"}
-                      ];
-                  break;
+                case 420200 : {
+                    areaData = [
+                        {value: 420202, text: "黄石港区"},
+                        {value: 420203, text: "西塞山区"},
+                        {value: 420204, text: "下陆区"},
+                        {value: 420205, text: "铁山区"},
+                        {value: 420222, text: "阳新县"},
+                        {value: 420281, text: "大冶市"}
+                    ];
+                    break;
                 }
-                case 420300 :{
-                    areaData=[
-                        {value: 420302,	text: "茅箭区"},
-                        {value: 420303,	text: "张湾区"},
-                        {value: 420321,	text: "郧县"},
-                        {value: 420322,	text: "郧西县"},
-                        {value: 420323,	text: "竹山县"},
-                        {value: 420324,	text: "竹溪县"},
-                        {value: 420325,	text: "房县"},
-                        {value: 420381,	text: "丹江口市"}
+                case 420300 : {
+                    areaData = [
+                        {value: 420302, text: "茅箭区"},
+                        {value: 420303, text: "张湾区"},
+                        {value: 420321, text: "郧县"},
+                        {value: 420322, text: "郧西县"},
+                        {value: 420323, text: "竹山县"},
+                        {value: 420324, text: "竹溪县"},
+                        {value: 420325, text: "房县"},
+                        {value: 420381, text: "丹江口市"}
                     ];
-                  break;
+                    break;
                 }
-                case 420500 :{
-                    areaData=[
-                        {value: 420502,	text: "西陵区"},
-                        {value: 420503,	text: "伍家岗区"},
-                        {value: 420504,	text: "点军区"},
-                        {value: 420505,	text: "猇亭区"},
-                        {value: 420506,	text: "夷陵区"},
-                        {value: 420525,	text: "远安县"},
-                        {value: 420526,	text: "兴山县"},
-                        {value: 420527,	text: "秭归县"},
-                        {value: 420528,	text: "长阳土家族自治县"},
-                        {value: 420529,	text: "五峰土家族自治县"},
-                        {value: 420581,	text: "宜都市"},
-                        {value: 420582,	text: "当阳市"},
-                        {value: 420583,	text: "枝江市"},
+                case 420500 : {
+                    areaData = [
+                        {value: 420502, text: "西陵区"},
+                        {value: 420503, text: "伍家岗区"},
+                        {value: 420504, text: "点军区"},
+                        {value: 420505, text: "猇亭区"},
+                        {value: 420506, text: "夷陵区"},
+                        {value: 420525, text: "远安县"},
+                        {value: 420526, text: "兴山县"},
+                        {value: 420527, text: "秭归县"},
+                        {value: 420528, text: "长阳土家族自治县"},
+                        {value: 420529, text: "五峰土家族自治县"},
+                        {value: 420581, text: "宜都市"},
+                        {value: 420582, text: "当阳市"},
+                        {value: 420583, text: "枝江市"},
                     ];
-                  break;
+                    break;
                 }
-                case 420600 :{
-                    areaData=[
-                        {value: 420602,	text: "襄城区"},
-                        {value: 420606,	text: "樊城区"},
-                        {value: 420607,	text: "襄州区"},
-                        {value: 420624,	text: "南漳县"},
-                        {value: 420625,	text: "谷城县"},
-                        {value: 420626,	text: "保康县"},
-                        {value: 420682,	text: "老河口市"},
-                        {value: 420683,	text: "枣阳市"},
-                        {value: 420684,	text: "宜城市"},
+                case 420600 : {
+                    areaData = [
+                        {value: 420602, text: "襄城区"},
+                        {value: 420606, text: "樊城区"},
+                        {value: 420607, text: "襄州区"},
+                        {value: 420624, text: "南漳县"},
+                        {value: 420625, text: "谷城县"},
+                        {value: 420626, text: "保康县"},
+                        {value: 420682, text: "老河口市"},
+                        {value: 420683, text: "枣阳市"},
+                        {value: 420684, text: "宜城市"},
                     ];
-                  break;
+                    break;
                 }
-                case 420700 :{
-                    areaData=[
-                        {value: 420702,	text: "梁子湖区"},
-                        {value: 420703,	text: "华容区"},
-                        {value: 420704,	text: "鄂城区"},
+                case 420700 : {
+                    areaData = [
+                        {value: 420702, text: "梁子湖区"},
+                        {value: 420703, text: "华容区"},
+                        {value: 420704, text: "鄂城区"},
                     ];
-                  break;
+                    break;
                 }
-                case 420800 :{
-                    areaData=[
-                        {value: 420802,	text: "东宝区"},
-                        {value: 420804,	text: "掇刀区"},
-                        {value: 420821,	text: "京山县"},
-                        {value: 420822,	text: "沙洋县"},
-                        {value: 420881,	text: "钟祥市"},
+                case 420800 : {
+                    areaData = [
+                        {value: 420802, text: "东宝区"},
+                        {value: 420804, text: "掇刀区"},
+                        {value: 420821, text: "京山县"},
+                        {value: 420822, text: "沙洋县"},
+                        {value: 420881, text: "钟祥市"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 420900 :{
-                    areaData=[
-                        {value: 420902,	text: "孝南区"},
-                        {value: 420921,	text: "孝昌县"},
-                        {value: 420922,	text: "大悟县"},
-                        {value: 420923,	text: "云梦县"},
-                        {value: 420981,	text: "应城市"},
-                        {value: 420982,	text: "安陆市"},
-                        {value: 420984,	text: "汉川市"},
+                case 420900 : {
+                    areaData = [
+                        {value: 420902, text: "孝南区"},
+                        {value: 420921, text: "孝昌县"},
+                        {value: 420922, text: "大悟县"},
+                        {value: 420923, text: "云梦县"},
+                        {value: 420981, text: "应城市"},
+                        {value: 420982, text: "安陆市"},
+                        {value: 420984, text: "汉川市"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 421000 :{
-                    areaData=[
-                        {value: 421002,	text: "沙市区"},
-                        {value: 421003,	text: "荆州区"},
-                        {value: 421022,	text: "公安县"},
-                        {value: 421023,	text: "监利县"},
-                        {value: 421024,	text: "江陵县"},
-                        {value: 421081,	text: "石首市"},
-                        {value: 421083,	text: "洪湖市"},
-                        {value: 421087,	text: "松滋市"},
+                case 421000 : {
+                    areaData = [
+                        {value: 421002, text: "沙市区"},
+                        {value: 421003, text: "荆州区"},
+                        {value: 421022, text: "公安县"},
+                        {value: 421023, text: "监利县"},
+                        {value: 421024, text: "江陵县"},
+                        {value: 421081, text: "石首市"},
+                        {value: 421083, text: "洪湖市"},
+                        {value: 421087, text: "松滋市"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 421100 :{
-                    areaData=[
-                        {value: 421102,	text: "黄州区"},
-                        {value: 421121,	text: "团风县"},
-                        {value: 421122,	text: "红安县"},
-                        {value: 421123,	text: "罗田县"},
-                        {value: 421124,	text: "英山县"},
-                        {value: 421125,	text: "浠水县"},
-                        {value: 421126,	text: "蕲春县"},
-                        {value: 421127,	text: "黄梅县"},
-                        {value: 421181,	text: "麻城市"},
-                        {value: 421182,	text: "武穴市"},
+                case 421100 : {
+                    areaData = [
+                        {value: 421102, text: "黄州区"},
+                        {value: 421121, text: "团风县"},
+                        {value: 421122, text: "红安县"},
+                        {value: 421123, text: "罗田县"},
+                        {value: 421124, text: "英山县"},
+                        {value: 421125, text: "浠水县"},
+                        {value: 421126, text: "蕲春县"},
+                        {value: 421127, text: "黄梅县"},
+                        {value: 421181, text: "麻城市"},
+                        {value: 421182, text: "武穴市"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 421200 :{
-                    areaData=[
-                        {value: 421202,	text: "咸安区"},
-                        {value: 421221,	text: "嘉鱼县"},
-                        {value: 421222,	text: "通城县"},
-                        {value: 421223,	text: "崇阳县"},
-                        {value: 421224,	text: "通山县"},
-                        {value: 421281,	text: "赤壁市"},
+                case 421200 : {
+                    areaData = [
+                        {value: 421202, text: "咸安区"},
+                        {value: 421221, text: "嘉鱼县"},
+                        {value: 421222, text: "通城县"},
+                        {value: 421223, text: "崇阳县"},
+                        {value: 421224, text: "通山县"},
+                        {value: 421281, text: "赤壁市"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 421300 :{
-                    areaData=[
-                        {value: 421303,	text: "曾都区"},
-                        {value: 421321,	text: "随县"},
-                        {value: 421381,	text: "广水市"},
+                case 421300 : {
+                    areaData = [
+                        {value: 421303, text: "曾都区"},
+                        {value: 421321, text: "随县"},
+                        {value: 421381, text: "广水市"},
                     ];
-                  break;
+                    break;
                 }
-                case 422800 :{
-                    areaData=[
-                        {value: 422801,	text: "恩施市"},
-                        {value: 422802,	text: "利川市"},
-                        {value: 422822,	text: "建始县"},
-                        {value: 422823,	text: "巴东县"},
-                        {value: 422825,	text: "宣恩县"},
-                        {value: 422826,	text: "咸丰县"},
-                        {value: 422827,	text: "来凤县"},
-                        {value: 422828,	text: "鹤峰县"},
+                case 422800 : {
+                    areaData = [
+                        {value: 422801, text: "恩施市"},
+                        {value: 422802, text: "利川市"},
+                        {value: 422822, text: "建始县"},
+                        {value: 422823, text: "巴东县"},
+                        {value: 422825, text: "宣恩县"},
+                        {value: 422826, text: "咸丰县"},
+                        {value: 422827, text: "来凤县"},
+                        {value: 422828, text: "鹤峰县"},
 
                     ];
-                  break;
+                    break;
                 }
-                case 429000 :{
-                    areaData=[
-                        {value: 429004,	text: "仙桃市"},
-                        {value: 429005,	text: "潜江市"},
-                        {value: 429006,	text: "天门市"},
-                        {value: 429021,	text: "神农架林区"},
+                case 429000 : {
+                    areaData = [
+                        {value: 429004, text: "仙桃市"},
+                        {value: 429005, text: "潜江市"},
+                        {value: 429006, text: "天门市"},
+                        {value: 429021, text: "神农架林区"},
                     ];
-                  break;
+                    break;
                 }
             }
             var html = "";
@@ -435,12 +446,14 @@
                     // console.log("uptownId:"+uptownId);
                     if (uptownId == '1238790987234') {
                         console.log("单位");
+                        $("#yaoqingmaSS")[0].style.display = '';
                         $("#danweiTitle").text("单位");
                         $("#menpaiTitle").text("工号");
                         $("#doorplate").attr("placeholder", "输入工号");
 
                     } else {
                         console.log("小区");
+                        $("#yaoqingmaSS")[0].style.display = '';
                         $("#danweiTitle").text("栋/单元");
                         $("#menpaiTitle").text("门牌号码");
                         $("#doorplate").attr("placeholder", "请输入门牌号码: 如 108");
@@ -465,12 +478,12 @@
                     for (var i = 0; i < data.length; i++) {
                         var uptownId = $("#uptownId").val();
                         if (uptownId == '1238790987234') {
-                            html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+data[i].unit + '</option>';
+                            html += '<option value="' + data[i].unitId + '">' + data[i].ridgepole + data[i].unit + '</option>';
                         } else {
                             if (data[i].ridgepole == "") {
-                                html += '<option value="' + data[i].unitId + '">'+data[i].unit+'单元' + '</option>';
+                                html += '<option value="' + data[i].unitId + '">' + data[i].unit + '单元' + '</option>';
                             } else {
-                                html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+'栋'+data[i].unit+'单元' + '</option>';
+                                html += '<option value="' + data[i].unitId + '">' + data[i].ridgepole + '栋' + data[i].unit + '单元' + '</option>';
                             }
                         }
                     }
@@ -484,7 +497,7 @@
         <#if user_id ??>var userId = ${user_id!''}</#if>;
 
     function save() {
-        console.log("userId:"+userId)
+        console.log("userId:" + userId)
         var userType = $('input:radio:checked').val();
         var city = $("#city").val();
         if (!city) {
@@ -501,6 +514,13 @@
             $.alert("请选择小区!")
             return false;
         }
+        if (uptownId == '1238790987234') {
+            var yaoqingma = $("#yaoqingma").val();
+            if (yaoqingma != '5714') {
+                $.alert("请填写正确的邀请码!")
+                return false;
+            }
+        }
         var unitId = $("#unitId").val();
         var doorplate = $("#doorplate").val().trim();
         if (!unitId) {
@@ -522,7 +542,7 @@
             data: {
                 "unitId": unitId,
                 "doorplate": doorplate,
-            },success: function (data) {
+            }, success: function (data) {
                 if (!data.success) {
                     if (uptownId == '1238790987234') {
                         $.alert("该工号已经被占用,请输入身份证号码");
@@ -545,7 +565,7 @@
                             "unitId": unitId,
                             "uptownId": uptownId,
                             "doorplate": doorplate,
-                        },success: function (date) {
+                        }, success: function (date) {
                             window.location.href = "/user/home.html?userId=" + userId + "&userType=1";
                         }
                     });

+ 2 - 2
whepi-ui/templates/user/scan.ftl

@@ -11,8 +11,8 @@
                     <#if (uptownId??) && (uptownId != 1238790987234 && uptownId != 5 )><br/>
                         <br/>
                         <br/></#if>
-                    <p class="user-title-long">${doorplate!''}
-                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${name!''}</p>
+                    <p class="user-title-long">${doorplate!''}</p>
+                    <p class="user-title-long">${name!''}</p>
                     <h1 class="user-title-long ${collor!''}">${door!''}</h1>
                     <br/>
                     <h1 class="user-title-big ${collor!''}">${into!""}</h1>

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

@@ -134,7 +134,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
             "union\n" +
             "select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}\n" +
             "union\n" +
-            "select * from ms_report where report_status=1 and report_date=curdate() and user_create=#{userId}")
+            "select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}")
     List<MsReport> selectMsReportLate(@Param("userId") Long userId);
 
     /**
@@ -148,7 +148,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
 
     @Select("select * from (select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 1 day) and user_create=#{userId}\n" +
             "union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 2 day) and user_create=#{userId}\n" +
-            "union select * from ms_report where report_status=1 and report_date=curdate() and user_create=#{userId}) aa where aa.ms_status = 2")
+            "union select * from ms_report where report_status=1 and report_date=date_sub(curdate(),interval 3 day) and user_create=#{userId}) aa where aa.ms_status = 2")
     List<MsReport> selectMsReportThereError(@Param("userId") Long userId);
 
     /**
@@ -193,4 +193,14 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
             "=c.today_local or c.work_local_other =c.today_local_other) and c.is_trip=0 and a.report_status=1 and a.user_create=#{userId} and a.report_date>#{reportDate} ORDER BY a.report_date desc LIMIT 15")
     List<MsReport> returnWorkTime(@Param("reportDate") String reportDate, @Param("userId") Long userId);
 
+    /**
+     * 当前人员今天的地址
+     * @param userId
+     * @return
+     */
+    @Select("SELECT a.*,CASE WHEN c.work_local = 4 THEN c.work_local_other ELSE c.work_local END as workMsg,CASE WHEN c.today_local = 4 THEN c.today_local_other ELSE c.today_local END as todayMsg " +
+            "FROM ms_report a LEFT JOIN ms_suspected b ON a.report_id = b.report_id LEFT JOIN ms_trip c ON b.suspected_id = c.trip_id WHERE a.report_status = 1 AND a.user_create = #{userId} ORDER BY a.report_date DESC LIMIT 1")
+    MsReport msAddr(@Param("userId") Long userId);
+
+
 }

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

@@ -45,10 +45,19 @@ public interface MsSuspectedMapper extends BaseMapper<MsSuspected> {
             "from ms_suspected a \n" +
             "INNER JOIN ms_report b on a.report_id=b.report_id \n" +
             "left JOIN ms_trip c on a.suspected_id=c.trip_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" +
+            "where b.user_create=#{userCreate} and b.report_status=1 and b.report_date=(select report_date from ms_report where user_create=#{userCreate} and b.report_status=1 and report_date<curdate() ORDER BY report_date desc LIMIT 1)\n" +
             "ORDER by a.time_create ")
     List<MsSuspected> selectNextSuspected(@Param("userCreate") Long userCreate);
 
+    //获取最近的一个人一个家人
+    @Select("select a.*,c.* \n" +
+            "from ms_suspected a \n" +
+            "INNER JOIN ms_report b on a.report_id=b.report_id \n" +
+            "left JOIN ms_trip c on a.suspected_id=c.trip_id \n" +
+            "where b.user_create=#{userCreate}  and b.report_status=1 and b.report_date=(select report_date from ms_report where user_create=#{userCreate} and report_date<curdate()  and report_date>date_sub(curdate(),interval 3 day)  and report_status=1 ORDER BY report_date desc LIMIT 1)\n" +
+            "ORDER by a.time_create ")
+    List<MsSuspected> selectNext3Suspected(@Param("userCreate") Long userCreate);
+
     //选择家人
     @Select("select a.*,b.* from ms_suspected a LEFT JOIN ms_trip b on a.suspected_id=b.trip_id where a.suspected_id =#{suspectedId}")
     MsSuspected selectBySuspectedId(@Param("suspectedId") Long suspectedId);

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

@@ -80,4 +80,9 @@ public class MsReport {
     private String userCreateName = "";
     @TableField(exist = false)
     private String userUpdateName = "";
+
+    @TableField(exist = false)
+    private String workMsg;
+    @TableField(exist = false)
+    private String todayMsg;
 }

+ 22 - 0
whepi-web/src/main/java/com/bofeng/service/MsReportService.java

@@ -189,10 +189,32 @@ public class MsReportService {
         List<MsSuspected> listSuspected = msSuspectedMapper.selectByReportId(Long.parseLong(listReport.get(0).getReportId().toString()));
         if (listSuspected == null || listSuspected.size() == 0)
             return 3;
+            // if (unit != null) {
+            //     if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
+            //         if (listSuspected != null && listSuspected.size() > 1)
+            //             return 5;
+            //     }
+            // }
         else {
             for (MsSuspected msSuspected : listSuspected) {
+                //体温是否填写
                 if (msSuspected.getTemperature().compareTo(new BigDecimal(0)) == 0)
                     return 2;
+
+                //如果是凌云,判断出行是否填写异常
+                UptownUnit unit = uptownUnitMapper.getUptownUnitByUser(userCreate);
+                if (unit != null) {
+                    if (unit.getUptownId() == 1238790987234L || unit.getUptownId() == 5) {
+                        //上一天的上报记录.3天内
+                        List<MsSuspected> listSuspected1 = msSuspectedMapper.selectNext3Suspected(userCreate);
+                        if (listSuspected1 != null && listSuspected1.size() > 0) {
+                            if (listSuspected1.get(0).getTodayLocalOther() != msSuspected.getTodayLocalOther() && listSuspected1.get(0).getTodayLocal() != msSuspected.getTodayLocal() && msSuspected.getIsTrip() == 0) {
+                                return 4;
+                            }
+                        }
+
+                    }
+                }
             }
 
         }

+ 28 - 26
whepi-web/src/main/java/com/bofeng/service/MsTripService.java

@@ -149,32 +149,34 @@ public class MsTripService {
             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);
+            if(todayLocal>0 && workLocal>0){
+                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);
+                    }
                 }
             }
 

+ 4 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/MsReportController.java

@@ -144,6 +144,10 @@ public class MsReportController {
             return ModelOps.newFail("请填报今日体温!");
         } else if (re == 3) { //没有选择家人
             return ModelOps.newFail("请选择家人!");
+        } else if (re == 4) {
+            return ModelOps.newFail("是否出行,请如实填写!");
+        } else if (re == 5) {
+            return ModelOps.newFail("ly集团,只能选择一个人员!");
         }
         return ModelOps.newFail("上报错误");
     }

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

@@ -187,11 +187,20 @@ public class ScanController {
                             return new ModelAndView("/user/scan.ftl", model);
                         }
                     }
+                    MsReport msReport1 = msReportMapper.msAddr(userOpen.getUserId());
+                    if (msReport1 != null && !msReport1.getWorkMsg().equals(msReport1.getTodayMsg())) {
+                        model.put("collor", "red");
+                        model.put("collor2", "red");
+                        model.put("into", "不许进入");
+                        model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
+                        scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
+                        return new ModelAndView("/user/scan.ftl", model);
+                    }
                     //您近期内离开过工作单位驻地,请遵守返回工作驻地15日隔离规定,您目前未满15日,禁止进入。
                     model.put("collor", "green");
                     model.put("collor2", "green");
                     model.put("into", "允许进入");
-                    model.put("errorMsg", "欢迎归来,请注意遵守疫情期间工作安全规则,做好防护,安全工作,健康第一。");
+                    model.put("errorMsg", "欢迎您归来,请注意遵守抗击疫情期间工作安全规定,做好健康防护,安全工作,健康第一。");
                     scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), 1, "");
                     return new ModelAndView("/user/scan.ftl", model);
                 }
@@ -476,6 +485,14 @@ public class ScanController {
                         return new ModelAndView("/user/returnWork.ftl", model);
                     }
                 }
+                MsReport msReport1 = msReportMapper.msAddr(userOpen.getUserId());
+                if (msReport1 != null && !msReport1.getWorkMsg().equals(msReport1.getTodayMsg())) {
+                    model.put("collor", "red");
+                    model.put("collor2", "red");
+                    model.put("into", "不可复工");
+                    model.put("errorMsg", "您本人不在工作驻地,不能入场复工。");
+                    return new ModelAndView("/user/returnWork.ftl", model);
+                }
                 model.put("collor", "green");
                 model.put("collor2", "green");
                 model.put("into", "允许复工");