Procházet zdrojové kódy

Merge remote-tracking branch 'origin/master'

maoyunfeng před 5 roky
rodič
revize
6ac8a9469d
32 změnil soubory, kde provedl 551 přidání a 139 odebrání
  1. 12 12
      admin-ui/app/whepi/scan/qrImg.js
  2. 31 23
      admin-ui/app/whepi/tugou/dialogTugou.js
  3. 1 1
      admin-ui/app/whepi/tugou/tugou.js
  4. 1 1
      whepi-doc/group.sql
  5. 42 1
      whepi-doc/mrsb.sql
  6. binární
      whepi-ui/static/adminHelp_1.jpg
  7. binární
      whepi-ui/static/homeHelp.jpg
  8. binární
      whepi-ui/static/homeHelp_1.jpg
  9. 11 3
      whepi-ui/templates/groupBuying/groupBuyingCx.ftl
  10. 11 3
      whepi-ui/templates/groupBuying/groupBuyingXx.ftl
  11. 19 0
      whepi-ui/templates/home/adminHelp.ftl
  12. 3 3
      whepi-ui/templates/home/buyClient.ftl
  13. 1 1
      whepi-ui/templates/home/home.ftl
  14. 2 2
      whepi-ui/templates/home/homeHelp.ftl
  15. 5 1
      whepi-ui/templates/user/home.ftl
  16. 1 1
      whepi-ui/templates/yeweihui/home.ftl
  17. 22 20
      whepi-ui/templates/yeweihui/tgPublish.ftl
  18. 1 1
      whepi-ui/templates/yeweihui/tuangouMemberList.ftl
  19. 192 0
      whepi-web/src/main/java/com/bofeng/controller/EpiLYExportController.java
  20. 4 0
      whepi-web/src/main/java/com/bofeng/dao/JmTuangouDao.java
  21. 1 1
      whepi-web/src/main/java/com/bofeng/entity/JmTuangou.java
  22. 39 57
      whepi-web/src/main/java/com/bofeng/service/BuyService.java
  23. 1 1
      whepi-web/src/main/java/com/bofeng/service/JmTuangouService.java
  24. 124 0
      whepi-web/src/main/java/com/bofeng/word/WordUtils.java
  25. 11 2
      whepi-web/src/main/java/com/bofeng/wx/WxController.java
  26. 2 2
      whepi-web/src/main/java/com/bofeng/wx/controller/ScanController.java
  27. 5 0
      whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java
  28. 5 2
      whepi-web/src/main/resources/application-xielianghe.yml
  29. 1 1
      whepi-web/src/main/resources/mapper/BuyMapper.xml
  30. 3 0
      whepi-web/src/main/resources/mapper/JmTuangouMapper.xml
  31. binární
      whepi-web/src/main/resources/word/健康及旅居申报表_20200221.docx
  32. binární
      whepi-web/src/main/resources/word/隔离人员解除隔离审批表_20200221.docx

+ 12 - 12
admin-ui/app/whepi/scan/qrImg.js

@@ -84,18 +84,18 @@ define(function (require) {
                                 xtype: 'toolbar',
                                 title: '小区大门详情',
                                 items: [
-                                    // {
-                                    //     text: '添加大门', iconCls: 'fa fa-plus-circle fa-lg', onClick: function () {
-                                    //         $.yvan.showDialog(this,
-                                    //             require('/app/whepi/scan/addDoor.js')({
-                                    //                 isEdit: false,
-                                    //                 confirm: function () {
-                                    //                     queryGrid1();
-                                    //                 }
-                                    //             })
-                                    //         );
-                                    //     }
-                                    // },
+                                    {
+                                        text: '添加大门', iconCls: 'fa fa-plus-circle fa-lg', onClick: function () {
+                                            $.yvan.showDialog(this,
+                                                require('/app/whepi/scan/addDoor.js')({
+                                                    isEdit: false,
+                                                    confirm: function () {
+                                                        queryGrid1();
+                                                    }
+                                                })
+                                            );
+                                        }
+                                    },
                                     // {
                                     //     text: '编辑大门', iconCls: 'fa fa fa-pencil-square-o fa-lg', onClick: function () {
                                     //         var row = $grid1.rowData();

+ 31 - 23
admin-ui/app/whepi/tugou/dialogTugou.js

@@ -36,7 +36,7 @@ define(function (require) {
     return {
       xtype: 'dialog',
       dialogId: 'dialogTugou',
-      title: context.isEdit == 2 ? '增补修订需求' : '新增需求发布',
+      title: context.isEdit == 2 ? '增补修订需求' : (context.isEdit == 3 ? '取消需求' : '新增需求发布'),
       width: '100%',
       height: '100%',
       onOpen: function () {
@@ -78,7 +78,7 @@ define(function (require) {
                 width: 900,
                 height: 35,
                 validType: 'isBlank',
-                readonly: context.isEdit != 1 ? true : false,
+                disabled: context.isEdit != 1 ? true : false,
                 onChange: function (data) {
                   queryGrid1(data);
                 },
@@ -93,7 +93,7 @@ define(function (require) {
               }, {id: '5', text: '其他服务'}],
               width: 450,
               height: 35,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               required: true,
               onChange: function (data) {
 
@@ -101,14 +101,14 @@ define(function (require) {
             }, {
               name: 'tgPrice',
               label: '单价',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 6, validType: 'number',
               width: 450, height: 35,
             }],
             [{
               name: 'tgItemNum',
-              label: '人限额',
-              readonly: context.isEdit != 1 ? true : false,
+              label: '人限额',
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 6, validType: 'integer',
               width: 450, height: 35,
             },],
@@ -116,31 +116,31 @@ define(function (require) {
               name: 'tgGoods', label: '套餐描述',
               required: true, width: 900, height: 35,
               maxlength: 500,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               height: '100px', multiline: true,
             }],
             [{
               name: 'tgMinNum',
               label: '最低配送',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               maxlength: 4, validType: 'integer',
               width: 450, height: 35,
             }, {
               name: 'tgMaxNum',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit != 1 ? true : false,
               label: '配送上限', validType: 'integer',
               maxlength: 4, width: 450, height: 35,
             }],
             [{
               name: 'tgEndTime',
               label: '需求截止时间',
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit == 3 ? true : false,
               xtype: 'datetimebox',
               required: true, width: 450, height: 35,
             }, {
               name: 'tgDeliverTime',
               multiline: true,
-              readonly: context.isEdit != 1 ? true : false,
+              disabled: context.isEdit == 3 ? true : false,
               xtype: 'datetimebox',
               label: '预计配货时间',
               required: true, width: 450, height: 35,
@@ -148,19 +148,19 @@ define(function (require) {
               {
                 name: 'tgPhoneNumber', validType: 'telNum',
                 label: '联系电话', width: 450, height: 35,
-                readonly: context.isEdit != 1 ? true : false,
+                disabled: context.isEdit != 1 ? true : false,
                 required: true, maxlength: 11,
               },
               {
                 name: 'tgSupplier', width: 450, height: 35,
-                label: '供应商', maxlength: 20,
-                readonly: context.isEdit != 1 ? true : false,
+                label: '供应商', maxlength: 20, required: true,
+                disabled: context.isEdit != 1 ? true : false,
               }],
             [
               {
                 name: 'remark', width: 900, height: 120,
                 label: '备注', maxlength: 500, multiline: true,
-                required: true, xtype: context.isEdit==1 ? 'hidden' : '',
+                required: true, xtype: context.isEdit == 1 ? 'hidden' : '',
               }
             ]
           ],
@@ -173,21 +173,29 @@ define(function (require) {
               $.yvan.msg('请先选择小区');
               return;
             }
-            if ($form.formGet().tgMinNum > $form.formGet().tgMaxNum) {
-              $.yvan.msg('最大上限必须大于等于最小起订量');
-              return;
+            if ($form.formGet().tgMinNum != '') {
+              if ($form.formGet().tgMaxNum != '') {
+                if ($form.formGet().tgMinNum > $form.formGet().tgMaxNum) {
+                  $.yvan.msg('最大上限必须大于等于最小起订量');
+                  return;
+                }
+              }
             }
+
             if ($form.formGet().tgEndTime > $form.formGet().tgDeliverTime) {
               $.yvan.msg('团购截止时间必须小于预计送货时间');
               return;
             }
             console.log($form.formGet());
-            if (isLoading === true) {
-              return;
-            }
-            else {
-              isLoading = true;
+            if (context.isEdit == 1) {
+              if (isLoading === true) {
+                return;
+              }
+              else {
+                isLoading = true;
+              }
             }
+
             $.yvan.postForm($form, {
               url: (context.isEdit == 1 ? api('/yeweihui/tgPublish') : (context.isEdit == 3 ? api('/yeweihui/updateStatus') : api('/yeweihui/tgStatus'))),
               success: function (data) {

+ 1 - 1
admin-ui/app/whepi/tugou/tugou.js

@@ -279,7 +279,7 @@ define(function (require) {
                     },
                     {
                       field: 'tgItemNum',
-                      title: '人限额',
+                      title: '人限额',
                       align: 'left',
                     },
                     {

+ 1 - 1
whepi-doc/group.sql

@@ -57,4 +57,4 @@ ADD  time_update    datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) ON UPD
 ADD  role_type      int(11)         NOT NULL DEFAULT 0          COMMENT '角色类型  0 业委会角色 1 指挥部' AFTER tg_min_num;
 
 ALTER TABLE jm_tuangou
-    ADD  tg_item_num      int(11)         NOT NULL DEFAULT 0          COMMENT '人限额' after tg_max_num;
+    ADD  tg_item_num      int(11)         NOT NULL DEFAULT 0          COMMENT '人限额' after tg_max_num;

+ 42 - 1
whepi-doc/mrsb.sql

@@ -53,4 +53,45 @@ CREATE TABLE ms_suspected  (
   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 (suspected_id) USING BTREE
-) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭疑似表';
+) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭疑似表';
+
+
+-- ----------------------------
+-- Table structure for ms_trip
+-- ----------------------------
+DROP TABLE IF EXISTS ms_trip;
+CREATE TABLE ms_trip  (
+  trip_id           bigint(20) NOT NULL DEFAULT 0                           COMMENT '出行ID:和疑似ID一对一关系',
+  work_local        int(11)    NOT NULL DEFAULT 0                           COMMENT '工作驻地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
+  work_local_other  varchar(50)  NOT NULL DEFAULT ''                        COMMENT '工作驻地其他地点',
+  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 = '家庭出行表';
+
+
+-- ----------------------------
+-- Table structure for ms_trip_det
+-- ----------------------------
+DROP TABLE IF EXISTS ms_trip_det;
+CREATE TABLE ms_trip_det  (
+  trip_det_id       bigint(20) NOT NULL DEFAULT 0                           COMMENT '出行详细ID',
+  trip_id           bigint(20) NOT NULL DEFAULT 0                           COMMENT '出行ID:和疑似ID一对一关系',
+  sort              int(11)    NOT NULL DEFAULT 0                           COMMENT '序号',
+  start_local       int(11)    NOT NULL DEFAULT 0                           COMMENT '出发地:0未填写,1武汉市,2宜昌市,3当阳市,其他地点',
+  start_local_other varchar(50)  NOT NULL DEFAULT ''                        COMMENT '出发地其他地点',
+  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飞机',
+  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_det_id) USING BTREE
+) ENGINE = InnoDB default charset=utf8mb4 comment = '家庭出行详细表';
+

binární
whepi-ui/static/adminHelp_1.jpg


binární
whepi-ui/static/homeHelp.jpg


binární
whepi-ui/static/homeHelp_1.jpg


+ 11 - 3
whepi-ui/templates/groupBuying/groupBuyingCx.ftl

@@ -23,11 +23,11 @@
             <div style="height: 1vh;"></div>
             <p style="text-indent: -0em;margin-left: 2em;">单&nbsp;&nbsp;&nbsp;&nbsp;价:&nbsp;&nbsp;${ tgItem.tgPrice }</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;${ tgItem.tgMinNum }</p>
+            <p id="cx_p_tgMinNum" style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;${ tgItem.tgMaxNum }</p>
+            <p id="cx_p_tgMaxNum" style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p id="cx_p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">人限额(份):&nbsp;&nbsp;</p>
+            <p id="cx_p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">人限额(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
             <p id="cx_p_endTime" style="text-indent: -0em;margin-left: 2em;">截止时间:&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
@@ -57,6 +57,14 @@
     $('#cx_p_endTime').append(tgItem.tgEndTime);
     $('#cx_p_deliverTime').append(tgItem.tgDeliverTime);
 
+    if (tgItem.tgMinNum != 0) {
+        $('#cx_p_tgMinNum').append(tgItem.tgMinNum);
+    }
+
+    if (tgItem.tgMaxNum != 0) {
+        $('#cx_p_tgMaxNum').append(tgItem.tgMaxNum);
+    }
+
     if (tgItem.tgItemNum != 0) {
         $('#cx_p_tgItemNum').append(tgItem.tgItemNum);
     }

+ 11 - 3
whepi-ui/templates/groupBuying/groupBuyingXx.ftl

@@ -24,11 +24,11 @@
             <div style="height: 1vh;"></div>
             <p style="text-indent: -0em;margin-left: 2em;">单&nbsp;&nbsp;&nbsp;&nbsp;价:&nbsp;&nbsp;${ tgItem.tgPrice }</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;${ tgItem.tgMinNum }</p>
+            <p id="p_tgMinNum" style="text-indent: -0em;margin-left: 2em;">最低起送(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;${ tgItem.tgMaxNum }</p>
+            <p id="p_tgMaxNum" style="text-indent: -0em;margin-left: 2em;">最大订量(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
-            <p id="p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">人限额(份):&nbsp;&nbsp;</p>
+            <p id="p_tgItemNum" style="text-indent: -0em;margin-left: 2em;">人限额(份):&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
             <p id="p_endTime" style="text-indent: -0em;margin-left: 2em;">截止时间:&nbsp;&nbsp;</p>
             <div style="height: 1vh;"></div>
@@ -136,6 +136,14 @@
     $('#p_endTime').append(tgItem.tgEndTime);
     $('#p_deliverTime').append(tgItem.tgDeliverTime);
 
+    if (tgItem.tgMinNum != 0) {
+        $('#p_tgMinNum').append(tgItem.tgMinNum);
+    }
+
+    if (tgItem.tgMaxNum != 0) {
+        $('#p_tgMaxNum').append(tgItem.tgMaxNum);
+    }
+
     if (tgItem.tgItemNum != 0) {
         $('#p_tgItemNum').append(tgItem.tgItemNum);
     }

+ 19 - 0
whepi-ui/templates/home/adminHelp.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/adminHelp_1.jpg" style="width: 100%"/>
+</div>
+
+
+<#include "/home/frag.foot.ftl" />
+
+<script>
+
+    (function ($) {
+
+    })(jQuery);
+
+
+</script>

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

@@ -12,7 +12,7 @@
     </div>
 
     <div class="weui-flex__item" id="xe1">
-        <div style="display: inline;align-items: flex-end">人限额:</div>
+        <div style="display: inline;align-items: flex-end">人限额:</div>
         <div style="display: inline;margin-top: 1vh;" id="xe"></div>
     </div>
     <div class="weui-flex__item" id="tc1">
@@ -85,7 +85,7 @@
                 $("#Buycount").html(data.data.count);
                 $("#myStatus").html(getStatus(data.data.tgStatus));
                 $("#myPhone").val(data.data.phone);
-                if (data.data.roleType == 1) {
+                if (data.data.tgMaxNum - data.data.count <= 0) {
                     $("#tc1").toggle();
                 } else {
                     $("#tc").html(data.data.tgMaxNum - data.data.count);
@@ -188,7 +188,7 @@
                     $.alert("团购套餐只剩" + $('#tc').html() + "份");
                     return false;
                 } else if (data.data == 4) {
-                    $.alert("团购数量已经超过人限额");
+                    $.alert("团购数量已经超过人限额");
                     return false;
                 }
                 buyBack();

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

@@ -24,7 +24,7 @@
         </a>
         <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>
+            <p class="weui-tabbar__label">团购</p>
         </a>
     <#--<a href="#tab4" class="weui-tabbar__item">-->
     <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_cell.png" alt=""> </div>-->

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

@@ -1,9 +1,9 @@
-<#assign title="操作帮助"/>
+<#assign title="家庭手册"/>
 <#include "/home/frag.head.ftl" />
 
 <div class="page__bd" style="height: 300px">
     <div class="container">
-        <img src="/static/homeHelp.jpg" style="width: 100%"/>
+        <img src="/static/homeHelp_1.jpg" style="width: 100%"/>
 </div>
 
 

+ 5 - 1
whepi-ui/templates/user/home.ftl

@@ -467,7 +467,11 @@
                         if (uptownId == '1238790987234') {
                             html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+data[i].unit + '</option>';
                         } else {
-                            html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+'栋'+data[i].unit+'单元' + '</option>';
+                            if (data[i].ridgepole == "") {
+                                html += '<option value="' + data[i].unitId + '">'+data[i].unit+'单元' + '</option>';
+                            } else {
+                                html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+'栋'+data[i].unit+'单元' + '</option>';
+                            }
                         }
                     }
                     $('#unitId').append(html);

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

@@ -32,7 +32,7 @@
             <p class="weui-tabbar__label">求助</p>
         </a>
         <a id="tab3a" href="#tab3" class="weui-tabbar__item">
-            <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/upload.png" alt=""></div>
             <p class="weui-tabbar__label">团购</p>
         </a>
     <#--<a href="#tab3" class="weui-tabbar__item">-->

+ 22 - 20
whepi-ui/templates/yeweihui/tgPublish.ftl

@@ -17,11 +17,11 @@
         <p class="weui-media-box__desc" style="margin-top: 1vh;">单价(元):</p>
         <input id="tg_input_price" onkeyup="clearNoNum(this)" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最低起送(份):</p>
-        <input id="tg_input_minnum" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
+        <input id="tg_input_minnum" class="weui-input" autofocus="" type="number" placeholder="不填为没有起送量" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">最大订量(份):</p>
-        <input id="tg_input_maxnum" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
-        <p class="weui-media-box__desc" style="margin-top: 1vh;">单人限购(份):</p>
-        <input id="tg_input_itemNum" class="weui-input" autofocus="" type="number" placeholder="请输入" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
+        <input id="tg_input_maxnum" class="weui-input" autofocus="" type="number" placeholder="不填为没有上限" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
+        <p class="weui-media-box__desc" style="margin-top: 1vh;">个人限额(份):</p>
+        <input id="tg_input_itemNum" class="weui-input" autofocus="" type="number" placeholder="不填为没有限额" maxlength="50" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;" />
         <p class="weui-media-box__desc" style="margin-top: 1vh;">截止时间:</p>
         <input id="tg_input_end_time" type="text" placeholder="请选择时间" style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh;"/>
         <p class="weui-media-box__desc" style="margin-top: 1vh;">预计送货时间:</p>
@@ -89,13 +89,11 @@
 
         let minnum = $("#tg_input_minnum").val();
         if (minnum.length <= 0) {
-            $.alert("请输入最低起送");
-            return;
+            minnum = "0";
         }
         let maxnum = $("#tg_input_maxnum").val();
         if (maxnum.length <= 0) {
-            $.alert("请输入最大订量");
-            return;
+            maxnum = "0";
         }
 
         let itemNum = $("#tg_input_itemNum").val();
@@ -149,28 +147,32 @@
         }
 
         if (itemNum.length > 4) {
-            $.alert("单人限购最大为9999");
+            $.alert("个人限额最大为9999");
             return;
         }
 
-        if (parseInt(minnum) <= 0) {
-            $.alert("最低起送量应大于0");
-            return;
-        }
+        // if (parseInt(minnum) <= 0) {
+        //     $.alert("最低起送量应大于0");
+        //     return;
+        // }
 
-        if (parseInt(maxnum) < parseInt(minnum)) {
-            $.alert("最大订量应大于或等于最低起送量");
-            return;
+        if (maxnum != "0" && minnum != "0") {
+            if (parseInt(maxnum) < parseInt(minnum)) {
+                $.alert("最大订量应大于或等于最低起送量");
+                return;
+            }
         }
 
         // if (parseInt(itemNum) <= 0) {
-        //     $.alert("单人限购应大于0");
+        //     $.alert("个人限额应大于0");
         //     return;
         // }
 
-        if (parseInt(maxnum) < parseInt(itemNum)) {
-            $.alert("最大订量应大于或等于单人限购");
-            return;
+        if (maxnum != "0" && itemNum != "0") {
+            if (parseInt(maxnum) < parseInt(itemNum)) {
+                $.alert("最大订量应大于或等于个人限额");
+                return;
+            }
         }
 
         let curTimestamp =(new Date()).valueOf();

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

@@ -84,7 +84,7 @@
     $('#tg_member_xiaoqu').html(members[0].uptownName);
     $('#tg_member_num').append(totalNum);
     $('#tg_member_count').append(members.length);
-    $('#tg_member_totoalPrice').append(totalPrice);
+    $('#tg_member_totoalPrice').append(totalPrice.toFixed(2));
 
     $("#tg_member_export").attr('href', '/yeweihui/tuangou/member/list/export?jmId=' + tgItem.jmId);
     $('#tg_member_export_url_detail').val(window.location.hostname + '/yeweihui/tuangou/member/list/export?jmId=' + tgItem.jmId);

+ 192 - 0
whepi-web/src/main/java/com/bofeng/controller/EpiLYExportController.java

@@ -0,0 +1,192 @@
+package com.bofeng.controller;
+
+import com.bofeng.word.WordUtils;
+import com.google.common.collect.Lists;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+public class EpiLYExportController {
+
+    @ApiOperation("导出单个健康及旅居申报表")
+    @GetMapping("/whepi/export/lyReport")
+    public @ResponseBody
+    void exportSellPlan(HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("userName", "张山");
+        map.put("workPlace", "武汉");
+        map.put("telPhone", "13245452345");
+        map.put("isLeave", "是");
+        map.put("trip", "北京、上海、武汉");
+        map.put("backTime", "2020-03-10");
+        map.put("vehicle", "火箭");
+
+        Map<String, Object> rt = new HashMap<String, Object>();
+        map.put("rt", rt);
+        rt.put("d1", "02-20");
+        rt.put("d2", "02-21");
+        rt.put("d3", "02-22");
+        rt.put("d4", "02-23");
+        rt.put("d5", "02-24");
+        rt.put("t1", "-");
+        rt.put("t2", "37.0");
+        rt.put("t3", "36.6");
+        rt.put("t4", "36.6");
+        rt.put("t5", "36.8");
+
+        map.put("otherSymptom", "ee");
+        map.put("isTrue", "否");
+
+        WordUtils.exportWord("word/健康及旅居申报表_20200221.docx", "temp", "健康及旅居申报表.docx", map, request, response);
+    }
+
+    @ApiOperation("导出多个健康及旅居申报表")
+    @GetMapping("/whepi/export/lyReports")
+    public @ResponseBody
+    void exportSellPlan2(HttpServletRequest request, HttpServletResponse response) {
+
+        List<Map<String, Object>> list = Lists.newArrayList();
+        for (int i = 0; i < 5; i++) {
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("userName", "张山");
+            map.put("workPlace", "武汉");
+            map.put("telPhone", "13245452345");
+            map.put("isLeave", "是");
+            map.put("trip", "北京、上海、武汉");
+            map.put("backTime", "2020-03-10");
+            map.put("vehicle", "火箭");
+
+            Map<String, Object> rt = new HashMap<String, Object>();
+            map.put("rt", rt);
+            rt.put("d1", "02-20");
+            rt.put("d2", "02-21");
+            rt.put("d3", "02-22");
+            rt.put("d4", "02-23");
+            rt.put("d5", "02-24");
+            rt.put("t1", "-");
+            rt.put("t2", "37.0");
+            rt.put("t3", "36.6");
+            rt.put("t4", "36.6");
+            rt.put("t5", "36.8");
+
+            map.put("otherSymptom", "ee");
+            map.put("isTrue", "否");
+            list.add(map);
+        }
+
+
+        WordUtils.exportWord("word/健康及旅居申报表_20200221.docx", "temp", "健康及旅居申报表.docx", list, request, response);
+    }
+
+    @ApiOperation("导出单个隔离人员解除隔离审批表")
+    @GetMapping("/whepi/export/lyApprove")
+    public @ResponseBody
+    void lyApprove(HttpServletRequest request, HttpServletResponse response) {
+        Map<String, Object> map = new HashMap<String, Object>();
+        map.put("userName", "张山");
+        map.put("gander", "男");
+        map.put("org", "研发部");
+        map.put("bAddr", "北京");
+        map.put("backDate", "2020-03-10");
+
+        Map<String, Object> rt = new HashMap<String, Object>();
+        map.put("rt", rt);
+        rt.put("d1", "02-20");
+        rt.put("d2", "02-21");
+        rt.put("d3", "02-22");
+        rt.put("d4", "02-23");
+        rt.put("d5", "02-24");
+        rt.put("d6", "02-25");
+        rt.put("d7", "02-26");
+        rt.put("d8", "02-27");
+        rt.put("d9", "02-28");
+        rt.put("d10", "02-29");
+        rt.put("d11", "03-01");
+        rt.put("d12", "03-02");
+        rt.put("d13", "03-03");
+        rt.put("d14", "03-04");
+        rt.put("d15", "03-05");
+        rt.put("t1", "-");
+        rt.put("t2", "37.0");
+        rt.put("t3", "36.6");
+        rt.put("t4", "36.6");
+        rt.put("t5", "36.8");
+        rt.put("t6", "-");
+        rt.put("t7", "37.0");
+        rt.put("t8", "36.6");
+        rt.put("t9", "36.6");
+        rt.put("t10", "36.8");
+        rt.put("t11", "-");
+        rt.put("t12", "37.0");
+        rt.put("t13", "36.6");
+        rt.put("t14", "36.6");
+        rt.put("t15", "36.8");
+
+        map.put("otherSymptom", "无");
+
+        WordUtils.exportWord("word/隔离人员解除隔离审批表_20200221.docx", "temp", "隔离人员解除隔离审批表.docx", map, request, response);
+    }
+
+    @ApiOperation("导出多个隔离人员解除隔离审批表")
+    @GetMapping("/whepi/export/lyApproves")
+    public @ResponseBody
+    void lyApproves(HttpServletRequest request, HttpServletResponse response) {
+
+        List<Map<String, Object>> list = Lists.newArrayList();
+        for (int i = 0; i < 5; i++) {
+            Map<String, Object> map = new HashMap<String, Object>();
+            map.put("userName", "张山");
+            map.put("gander", "男");
+            map.put("org", "研发部");
+            map.put("bAddr", "北京");
+            map.put("backDate", "2020-03-10");
+
+            Map<String, Object> rt = new HashMap<String, Object>();
+            map.put("rt", rt);
+            rt.put("d1", "02-20");
+            rt.put("d2", "02-21");
+            rt.put("d3", "02-22");
+            rt.put("d4", "02-23");
+            rt.put("d5", "02-24");
+            rt.put("d6", "02-25");
+            rt.put("d7", "02-26");
+            rt.put("d8", "02-27");
+            rt.put("d9", "02-28");
+            rt.put("d10", "02-29");
+            rt.put("d11", "03-01");
+            rt.put("d12", "03-02");
+            rt.put("d13", "03-03");
+            rt.put("d14", "03-04");
+            rt.put("d15", "03-05");
+            rt.put("t1", "-");
+            rt.put("t2", "37.0");
+            rt.put("t3", "36.6");
+            rt.put("t4", "36.6");
+            rt.put("t5", "36.8");
+            rt.put("t6", "-");
+            rt.put("t7", "37.0");
+            rt.put("t8", "36.6");
+            rt.put("t9", "36.6");
+            rt.put("t10", "36.8");
+            rt.put("t11", "-");
+            rt.put("t12", "37.0");
+            rt.put("t13", "36.6");
+            rt.put("t14", "36.6");
+            rt.put("t15", "36.8");
+
+            map.put("otherSymptom", "无");
+            list.add(map);
+        }
+
+        WordUtils.exportWord("word/隔离人员解除隔离审批表_20200221.docx", "temp", "隔离人员解除隔离审批表.docx", list, request, response);
+    }
+}

+ 4 - 0
whepi-web/src/main/java/com/bofeng/dao/JmTuangouDao.java

@@ -5,8 +5,10 @@ import com.bofeng.entity.JmTuangou;
 import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
+import org.joda.time.DateTime;
 import org.springframework.stereotype.Repository;
 
+import java.util.Date;
 import java.util.List;
 
 @Mapper
@@ -43,4 +45,6 @@ public interface JmTuangouDao extends BaseMapper<JmTuangou> {
 
   JmTuangou getSelectOneRoleId(@Param("jmId") Long jmId);
 
+  int updateRemarkByJmIdzbxd(@Param("jmId") Long jmId, @Param("remark") String remark, @Param("tgEndTime")Date tgEndTime, @Param("tgDeliverTime")Date tgDeliverTime);
+
 }

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

@@ -62,7 +62,7 @@ public class JmTuangou implements Serializable {
      */
     private Integer tgMaxNum = 0;
     /**
-     * 人限额
+     * 人限额
      */
     private Integer tgItemNum = 0;
 

+ 39 - 57
whepi-web/src/main/java/com/bofeng/service/BuyService.java

@@ -27,44 +27,29 @@ public class BuyService {
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
   public int buyGroup(Buy buy) {
     Buy buy1 = buyMapper.selectBuyOne(buy.getUserId(), buy.getJmId());
-    JmTuangou roleType = jmTuangouDao.getSelectOneRoleId(buy.getJmId());
-    if (buy1 != null) {
-      JmTuangou jmTuangou = jmTuangouDao.selectJmTuangouByJmId(buy1.getJmId());
-      Buy buy2 = buyMapper.selectById(buy1.getBuyId());
-      if (roleType.getRoleType() != 1) {
-        if (jmTuangou.getTgMaxNum().intValue() >= jmTuangou.getCurrentNum().intValue() - buy2.getBuyCount().intValue() + buy.getBuyCount().intValue()) {
-          //个人限额(指挥部的限额 和 管理员的限额)
-          if (roleType.getTgItemNum().intValue() != 0 && roleType.getTgItemNum().intValue() < buy.getBuyCount().intValue()) {
-            return 4;
-          }
-          buy.setBuyId(buy1.getBuyId());
-          return buyMapper.updateById(buy);
-        } else {
-          return 3;//不允许更改团购数量
-        }
-      } else {
-        //指挥部的更改
-        //个人限额(指挥部的限额 和 管理员的限额)
-        if (roleType.getTgItemNum().intValue() != 0 && roleType.getTgItemNum().intValue() < buy.getBuyCount().intValue()) {
-          return 4;
-        }
-        buy.setBuyId(buy1.getBuyId());
-        return buyMapper.updateById(buy);
-      }
-    }
-    //1 是指挥部
-    if (roleType.getRoleType() != 1) {
-      //第一次购买团购数量大于最大上限数量不允许
-      JmTuangou jmTuangou = jmTuangouDao.selectJmTuangouByJmId(buy.getJmId());
-      if (jmTuangou.getTgMaxNum().intValue() < jmTuangou.getCurrentNum().intValue() + buy.getBuyCount().intValue()) {
+    JmTuangou jmTuangou = jmTuangouDao.selectJmTuangouByJmId(buy.getJmId());//团购主表
+    if (buy1 != null) {//判断是否是第一次添加
+      //JmTuangou jmTuangou = jmTuangouDao.selectJmTuangouByJmId(buy.getJmId());
+
+      //最大上限有的话就遵循
+      if (jmTuangou.getTgMaxNum().intValue() != 0 && jmTuangou.getTgMaxNum().intValue() < jmTuangou.getCurrentNum().intValue() + buy.getBuyCount().intValue()) {
         return 3;
       }
+      //单人限额有的话的遵循
+      if (jmTuangou.getTgItemNum().intValue() != 0 && jmTuangou.getTgItemNum().intValue() < buy.getBuyCount().intValue()) {
+        return 4;
+      }
+      buy.setBuyId(buy1.getBuyId());
+      return buyMapper.updateById(buy);
     }
-    //个人限额(指挥部的限额 和 管理员的限额)
-    if (roleType.getTgItemNum().intValue() != 0 && roleType.getTgItemNum().intValue() < buy.getBuyCount().intValue()) {
+    //最大上限有的话就遵循
+    if (jmTuangou.getTgMaxNum() != 0 && jmTuangou.getTgMaxNum().intValue() < jmTuangou.getCurrentNum().intValue() + buy.getBuyCount().intValue()) {
+      return 3;
+    }
+    //单人限额有的话的遵循
+    if (jmTuangou.getTgItemNum().intValue() != 0 && jmTuangou.getTgItemNum().intValue() < buy.getBuyCount().intValue()) {
       return 4;
     }
-
     buy.setBuyId(IdWorker.getId());
     buy.setUserCreate(buy.getUserId());
     buy.setTimeCreate(new DateTime());
@@ -114,38 +99,35 @@ public class BuyService {
   //截止日期状态的更改
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
   public int updateStatus() {
+    //团购的在团状态
     List<JmTuangou> jmTuangous = jmTuangouDao.selectAll();
     if (jmTuangous != null && jmTuangous.size() > 0) {
       for (JmTuangou list : jmTuangous) {
-        //判断是指挥部还是管理员
-        if (list.getRoleType() == 1) {
-          if (list.getTgEndTime().getTime() < new DateTime().getMillis()) {
-            jmTuangouDao.updateStatusByJmId(list.getJmId(), 2L);//发货
-          }
-        } else {
-          // 团购数量  最小起订量
+        //到了截止日期
+        if (list.getTgEndTime().getTime() < new DateTime().getMillis()) {
+          //已经到了截止日期  判断有没有人购买
           Buy buy = buyMapper.selectCountNum(list.getJmId());
-          //已经到截止时间
-          if (list.getTgEndTime().getTime() < new DateTime().getMillis()) {
-
-            if (buy != null) { //最小起订量
-              if (list.getTgMinNum().longValue() > buy.getCount().longValue()) {
-                jmTuangouDao.updateStatusByJmId(list.getJmId(), 4L);//取消
+          if (buy.getCount().intValue() > 0) {
+            //判断是否有最小起订量 只有达到最小量的并且是到截止时间的
+            if (list.getTgMinNum().intValue() != 0) {
+              if (buy.getCount().intValue() >= list.getTgMinNum().intValue()) {
+                if (buy.getCount().intValue() == 0 && list.getTgMinNum().intValue() == 0) {
+                  jmTuangouDao.updateStatusByJmId(list.getJmId(), 4L);//取消
+                } else if (buy.getCount().intValue() != 0) {
+                  jmTuangouDao.updateStatusByJmId(list.getJmId(), 2L);//发货
+                }
               } else {
-                jmTuangouDao.updateStatusByJmId(list.getJmId(), 2L);//发货
+                jmTuangouDao.updateStatusByJmId(list.getJmId(), 4L);//取消
               }
             } else {
-              jmTuangouDao.updateStatusByJmId(list.getJmId(), 4L);//取消
+              jmTuangouDao.updateStatusByJmId(list.getJmId(), 2L);//发货
             }
-          } /*else {
-            //团购数量已经过了最大起订量的 就直接发货
-            if (buy != null) {
-              if (list.getTgMaxNum().intValue() == buy.getCount().intValue()) {
-                jmTuangouDao.updateStatusByJmId(list.getJmId(), 2L);//发货
-              }
-            }
-          }*/
-        }
+          } else {
+            //已经到截止日期但是没人购买就取消
+            jmTuangouDao.updateStatusByJmId(list.getJmId(), 4L);//取消
+          }
+
+        }//已经到截止日期
       }
     }
     return 1;

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

@@ -226,6 +226,6 @@ public class JmTuangouService {
 
   @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
   public int updateRemarkByJmIdzbxd(JmTuangou jmTuangou) {
-    return jmTuangouDao.updateRemarkByJmId(jmTuangou.getJmId(), jmTuangou.getRemark());
+    return jmTuangouDao.updateRemarkByJmIdzbxd(jmTuangou.getJmId(), jmTuangou.getRemark(),jmTuangou.getTgEndTime(),jmTuangou.getTgDeliverTime());
   }
 }

+ 124 - 0
whepi-web/src/main/java/com/bofeng/word/WordUtils.java

@@ -0,0 +1,124 @@
+package com.bofeng.word;
+
+
+import java.io.*;
+import java.net.URLEncoder;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import cn.afterturn.easypoi.word.WordExportUtil;
+import com.yvan.DateUtils;
+import freemarker.template.Configuration;
+import freemarker.template.Template;
+import freemarker.template.utility.DateUtil;
+import org.apache.poi.xwpf.usermodel.XWPFDocument;
+import org.springframework.beans.factory.annotation.Value;
+
+public class WordUtils {
+
+    /**
+     * 导出word
+     * <p>第一步生成替换后的word文件,只支持docx</p>
+     * <p>第二步下载生成的文件</p>
+     * <p>第三步删除生成的临时文件</p>
+     * 模版变量中变量格式:{{foo}}
+     * @param templatePath word模板地址
+     * @param temDir 生成临时文件存放地址
+     * @param fileName 文件名
+     * @param params 替换的参数
+     * @param request HttpServletRequest
+     * @param response HttpServletResponse
+     */
+    public static void exportWord(String templatePath, String temDir, String fileName, Map<String, Object> params, HttpServletRequest request, HttpServletResponse response) {
+//        Assert.notNull(templatePath,"模板路径不能为空");
+//        Assert.notNull(temDir,"临时文件路径不能为空");
+//        Assert.notNull(fileName,"导出文件名不能为空");
+//        Assert.isTrue(fileName.endsWith(".docx"),"word导出请使用docx格式");
+        if (!temDir.endsWith("/")){
+            temDir = temDir + File.separator;
+        }
+        File dir = new File(temDir);
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+        try {
+            String userAgent = request.getHeader("user-agent").toLowerCase();
+            if (userAgent.contains("msie") || userAgent.contains("like gecko")) {
+                fileName = URLEncoder.encode(fileName, "UTF-8");
+            } else {
+                fileName = new String(fileName.getBytes("utf-8"), "ISO-8859-1");
+            }
+            XWPFDocument doc = WordExportUtil.exportWord07(templatePath, params);
+            String tmpPath = temDir + fileName;
+            FileOutputStream fos = new FileOutputStream(tmpPath);
+            doc.write(fos);
+            // 设置强制下载不打开
+            response.setContentType("application/force-download");
+            // 设置文件名
+            response.addHeader("Content-Disposition", "attachment;fileName=" + fileName);
+            OutputStream out = response.getOutputStream();
+            doc.write(out);
+            out.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+//            delAllFile(temDir);//这一步看具体需求,要不要删
+        }
+
+    }
+
+    /**
+     * 导出word
+     * <p>第一步生成替换后的word文件,只支持docx</p>
+     * <p>第二步下载生成的文件</p>
+     * <p>第三步删除生成的临时文件</p>
+     * 模版变量中变量格式:{{foo}}
+     * @param templatePath word模板地址
+     * @param temDir 生成临时文件存放地址
+     * @param fileName 文件名
+     * @param paramList 替换的参数
+     * @param request HttpServletRequest
+     * @param response HttpServletResponse
+     */
+    public static void exportWord(String templatePath, String temDir, String fileName, List<Map<String, Object>> paramList, HttpServletRequest request, HttpServletResponse response) {
+//        Assert.notNull(templatePath,"模板路径不能为空");
+//        Assert.notNull(temDir,"临时文件路径不能为空");
+//        Assert.notNull(fileName,"导出文件名不能为空");
+//        Assert.isTrue(fileName.endsWith(".docx"),"word导出请使用docx格式");
+        if (!temDir.endsWith("/")){
+            temDir = temDir + File.separator;
+        }
+        File dir = new File(temDir);
+        if (!dir.exists()) {
+            dir.mkdirs();
+        }
+        try {
+            String userAgent = request.getHeader("user-agent").toLowerCase();
+            if (userAgent.contains("msie") || userAgent.contains("like gecko")) {
+                fileName = URLEncoder.encode(fileName, "UTF-8");
+            } else {
+                fileName = new String(fileName.getBytes("utf-8"), "ISO-8859-1");
+            }
+            XWPFDocument doc = WordExportUtil.exportWord07(templatePath, paramList);
+            String tmpPath = temDir + fileName;
+            FileOutputStream fos = new FileOutputStream(tmpPath);
+            doc.write(fos);
+            // 设置强制下载不打开
+            response.setContentType("application/force-download");
+            // 设置文件名
+            response.addHeader("Content-Disposition", "attachment;fileName=" + fileName);
+            OutputStream out = response.getOutputStream();
+            doc.write(out);
+            out.close();
+        } catch (Exception e) {
+            e.printStackTrace();
+        } finally {
+//            delAllFile(temDir);//这一步看具体需求,要不要删
+        }
+
+    }
+}

+ 11 - 2
whepi-web/src/main/java/com/bofeng/wx/WxController.java

@@ -152,7 +152,7 @@ public class WxController {
         val btnDesc = new WxMenuButton();
         btnDesc.setName("平台简介");
         val btn31 = new WxMenuButton();
-        btn31.setName("帮助");
+        btn31.setName("家庭手册");
         btn31.setType(WxConsts.MenuButtonType.VIEW);
         btn31.setUrl(
                 wxService.oauth2buildAuthorizationUrl(weChatProperties.getDomain() +
@@ -160,15 +160,24 @@ public class WxController {
                         WxConsts.OAuth2Scope.SNSAPI_USERINFO, null)
         );
         val btn32 = new WxMenuButton();
-        btn32.setName("简介");
+        btn32.setName("管理员手册");
         btn32.setType(WxConsts.MenuButtonType.VIEW);
         btn32.setUrl(
                 wxService.oauth2buildAuthorizationUrl(weChatProperties.getDomain() +
+                                "/home/adminHelp.html",
+                        WxConsts.OAuth2Scope.SNSAPI_USERINFO, null)
+        );
+        val btn33 = new WxMenuButton();
+        btn33.setName("简介");
+        btn33.setType(WxConsts.MenuButtonType.VIEW);
+        btn33.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);
 //        btn3.getSubButtons().add(btnDesc);
 //        btn3.getSubButtons().add(btnHelp);
 

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

@@ -139,7 +139,7 @@ public class ScanController {
                     model.put("into", "禁止外出");
                     model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
                     scanService.saveOutScan(userOpen.getUserId(), inType, uptownDoor.getUptownId(), uptownDoor.getDoorId(), -1, model.get("errorMsg").toString());
-                    return new ModelAndView("/user/goOut.ftl", model);
+                    return new ModelAndView("/user/scan.ftl", model);
                 }
                 OutScan outScan = outScanMapper.getOutScanThreeday(userOpen.getUserId(), 2, outScanConf.getGoOutFre());
                 if (outScan != null) {
@@ -223,7 +223,7 @@ public class ScanController {
                 model.put("into", "禁止外出");
                 model.put("errorMsg", "根据武汉市小区封闭管理规定,非特殊人员禁止出行!");
                 scanService.saveOutScanEstate(userOpen.getUserId(), -1, model.get("errorMsg").toString());
-                return new ModelAndView("/user/goOut.ftl", model);
+                return new ModelAndView("/user/scanEstate.ftl", model);
             }
             List<MsReport> msReports = msReportMapper.selectMsReportLate(userOpen.getUserId());
             if (msReports.size() != 3) {

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

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

+ 5 - 2
whepi-web/src/main/resources/application-xielianghe.yml

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

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

@@ -45,7 +45,7 @@
     </select>
 
     <select id="selectCountNum" resultType="com.bofeng.entity.Buy">
-        select sum(buy_count) as count,jm_id from jm_buy where jm_id=#{jmId} and buy_status=1 GROUP BY jm_id
+        select IFNULL(sum(buy_count),0) as count from jm_buy where jm_id=#{jmId} and buy_status=1
     </select>
 
 </mapper>

+ 3 - 0
whepi-web/src/main/resources/mapper/JmTuangouMapper.xml

@@ -98,5 +98,8 @@
         select * from jm_tuangou where jm_id=#{jmId}
     </select>
 
+    <update id="updateRemarkByJmIdzbxd">
+        update jm_tuangou set remark=#{remark},tg_end_time=#{tgEndTime},tg_deliver_time=#{tgDeliverTime}, time_update=now() where jm_id=#{jmId}
+    </update>
 
 </mapper>

binární
whepi-web/src/main/resources/word/健康及旅居申报表_20200221.docx


binární
whepi-web/src/main/resources/word/隔离人员解除隔离审批表_20200221.docx