Преглед на файлове

凌云集团增加二级部门

peiguo преди 5 години
родител
ревизия
587de23068

+ 275 - 0
admin-ui/app/whepi/daka/dakaLY.js

@@ -0,0 +1,275 @@
+define(function (require) {
+    return function (context) {
+
+      var $grid1, $form;
+
+      // 弹框的方式
+      var widgets = {
+        // 搜索分类检索
+        selectTableUnit: {
+          url: 'app/whepi/home/selectLYbumen.js',
+          bind: {
+            unitId: 'unitId',
+            unit: 'unit',
+          },
+        },
+      }
+
+
+      // 导出
+      function exportExcel() {
+        var queryForm = $form.formGet();
+        $.yvan.download({
+          method: 'post',
+          url: api('/sweepCode/exportLY?queryProperties=' + queryForm.queryProperties + '&errorInfo=' + queryForm.errorInfo  + '&phone=' + queryForm.phone + '&unitId=' + queryForm.unitId + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
+          fileName: '签到管理-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
+
+        });
+      }
+
+      // 输入搜索文本后点击回车按钮查询列表
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+        }
+      }
+      function enterQueryGrid2(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({phone: tmp});
+          queryGrid1();
+        }
+      }
+      function enterQueryGrid3(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({errorInfo: tmp});
+          queryGrid1();
+        }
+      }
+
+      // 检索条件查询
+      function queryGrid1() {
+        var queryUrl = '/sweepCode/selectCodeLY';// 自行替换此参数
+        var queryForm = $form.formGet();
+        if (!queryForm.dateSta) {
+          $form.formSet({dateSta: getFormatDate() + " 00:00:00"});
+          queryForm.dateSta = getFormatDate() + " 00:00:00";
+        }
+        if (!queryForm.dateEnd) {
+          $form.formSet({dateEnd: getFormatDate() + " 23:59:59"});
+          queryForm.dateEnd = getFormatDate() + " 23:59:59";
+        }
+        queryForm.roleCode = App.currentRoleCode;
+        $grid1.reload({
+          mtype: 'POST',
+          url: api(queryUrl),
+          queryParams: queryForm
+        }, true);
+      }
+
+      // 搜索按钮
+      var queryToolbarTitle = '签到管理';// 自行替换此参数
+      var queryToolbar = {
+        xtype: 'toolbar', title: queryToolbarTitle, items: [
+          {
+            text: '查询', iconCls: 'fa fa-search', onClick: function () {
+              queryGrid1();
+            }
+          }, {
+            text: '重置', iconCls: 'fa fa-refresh', onClick: function () {
+              $form.formClear();
+              queryGrid1();
+            }
+          }, {
+            text: '关闭', iconCls: 'fa fa-times-circle', onClick: function () {
+              App.closeMe(this);
+            }
+          }
+        ]
+      };
+
+      // 搜索条件
+      var queryForm = {
+        onRender: function () {
+          $form = $(this);
+        },
+        xtype: 'form',
+        items: [[
+          {
+            xtype: 'textbox',
+            label: '大门名称',
+            name: 'queryProperties',
+            prompt: "大门名称",
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid1}, width: 250
+          },
+          {
+            xtype: 'textbox',
+            label: '姓名/电话',
+            name: 'phone',
+            prompt: "姓名/电话",
+            labelWidth: 'auto',
+            events: {keydown: enterQueryGrid2}, width: 250
+          },
+          {xtype: 'hidden', name: 'unitId'},
+          {
+            xtype: 'searchbox',
+            label: '部门',
+            name: 'unit',
+            prompt: "部门",
+            width: '300px',
+            widget: widgets.selectTableUnit,// 弹出框方法
+            labelWidth: '70px',
+            onChange: function (value) {
+              if (!isNotNullOrEmpty(value)) {
+                $form.formSet({
+                  unitId: ''
+                })
+              }
+              queryGrid1();
+            },
+          },],[
+          // {
+          //   xtype: 'datetimebox',
+          //   name: 'dateSta',
+          //   label: '进出时间',
+          //   labelWidth: 'auto',
+          //   width: 230,
+          //   onChange: function (data) {
+          //     /*  var expDateStart = $form.formGet().nextRepairDate;
+          //       var expDateEnd = $form.formGet().expDateEnd;
+          //       var expDateStart = new Date(expDateStart.replace("-", "/"));
+          //       var expDateEnd = new Date(expDateEnd.replace("-", "/"));
+          //       if (expDateStart > expDateEnd) {
+          //           $.yvan.msg('起止日期必须大于起始日期');
+          //           return;
+          //       }*/
+          //   }
+          // },
+          // {
+          //   xtype: 'datetimebox', label: '--', name: 'dateEnd', labelWidth: 'auto', width: 220,
+          //   onChange: function (data) {
+          //     /* var expDateStart = $form.formGet().nextRepairDate;
+          //      var expDateEnd = $form.formGet().expDateEnd;
+          //      var expDateStart = new Date(expDateStart.replace("-", "/"));
+          //      var expDateEnd = new Date(expDateEnd.replace("-", "/"));
+          //      if (expDateStart > expDateEnd) {
+          //          $.yvan.msg('起止日期必须大于起始日期');
+          //          return;
+          //      }*/
+          //   }
+          // }
+        ]]
+      };
+
+      var gridToolbarTitle = '签到列表';// 自行替换此参数
+      var gridToolbar = {
+        xtype: 'toolbar',
+        title: gridToolbarTitle,
+        items: [
+          {
+            text: '导出', iconCls: 'fa fa-cloud-upload', onClick: function () {
+              exportExcel();
+            }
+          },
+        ]
+      };
+
+      return {
+        north: {
+          height: 88,
+          /* split: true,
+           border: false,*///底框是否可变动
+          items: [
+            queryToolbar,
+            queryForm
+          ]
+        },
+        center: {
+          height: '60%',
+          split: true,
+          items:
+            {
+              onRender: function () {
+                $grid1 = $(this);
+                queryGrid1()
+              },
+              xtype: 'grid',
+              toolbar:
+              gridToolbar,
+              idField: 'joId',
+              autoSizeColumns: true,//序号多  正确显示
+              columns:
+                [
+                  [
+                    {field: 'uptownId', title: '小区id', maxWidth: 200, align: 'left', hidden: true},
+                    // {field: 'uptownName', title: '小区名称', maxWidth: 200, align: 'left',},
+                    // {field: 'ridgepole', title: '楼栋', maxWidth: 200, align: 'left',},
+                    {field: 'unit', title: '部门', maxWidth: 200,},
+                    {
+                      field: 'doorplate',
+                      title: '工号', maxWidth: 200,
+                    },
+                    {
+                      field: 'linkman',
+                      title: '用户名',
+                    },
+                    {
+                      field: 'phone',
+                      title: '电话',
+                    },
+                    {
+                      field: 'doorName',
+                      title: '出入大门',
+                      align: 'left',
+                    },
+                    {
+                      field: 'date',
+                      title: '进出时间',
+                      align: 'left',
+                    },
+                    {
+                      field: 'inType',
+                      title: '记录状态',
+                      align: 'center',
+                      formatter:function (value) {
+                        if(value==1){
+                          return "进入"
+                        }else if(value ==2){
+                          return "外出"
+                        }
+
+                      }
+                    },
+                    {
+                      field: 'goStatus',
+                      title: '通行状态',
+                      align: 'center',
+                      formatter:function (value) {
+                        if(value==1){
+                          return "允许"
+                        }else if(value ==-1){
+                          return "禁止"
+                        }
+
+                      }
+                    },
+                    {
+                      field: 'errorInfo',
+                      title: '禁止提示',
+                      align: 'left',
+                    },
+                    {field: 'longitude', title: '经度', maxWidth: 200, align: 'left',},
+                    {field: 'latitude', title: '纬度', maxWidth: 200, align: 'left',},
+                    {field: 'address', title: '详细地址', maxWidth: 200, align: 'left',},
+                  ]
+                ]
+            }
+        }
+      };
+    };
+  }
+);

+ 59 - 3
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -1,7 +1,7 @@
 define(function (require) {
     return function (context) {
 
-      var $grid1, $form;
+      var $grid1, $form, $coma;
 
       // 输入搜索文本后点击回车按钮查询列表
       function enterQueryGrid1(e) {
@@ -24,6 +24,42 @@ define(function (require) {
         },
       };
 
+      // 下拉选清空并重新赋值
+      function reloadValuea(_datas) {
+        if ($coma) {
+          $coma.combobox('clear');// 清除当前的选项
+          $coma.combobox('loadData', _datas);// 重新加载数据
+        }
+      }
+
+      // 获取联机下拉选二级信息
+      function getList(id) {
+        id = id == undefined ? 0 : id
+        var _datas = [];
+        _datas.push({
+          "id": "",
+          "text": "全部",
+          "selected": true
+        });
+        $.yvan.ajax({
+          url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+          method: 'GET',
+          async: true,
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i].departmentId,
+                  "text": data.data[i].departmentName
+                })
+              }
+              reloadValuea(_datas);
+            }
+          }
+        });
+        return _datas;
+      }
+
       // 检索条件查询
       function queryGrid1() {
         var queryForm = $form.formGet();
@@ -91,13 +127,31 @@ define(function (require) {
             onChange: function (value) {
               if (!isNotNullOrEmpty(value)) {
                 $form.formSet({
-                  unitId : ''
+                  unitId : 0
                 })
               }
+              getList($form.formGet().unitId);
               queryGrid1();
             },
           },
           {
+            xtype: 'combobox',
+            label: '二级部门',
+            name: 'departmentId',
+            labelWidth: 'auto',
+            width: 280,
+            value: '',
+            data: getList(),
+            onRender: function () {
+              $coma = $(this);
+            },
+            onValue: function (data) {
+            },
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
             name: 'date',
             label: '导出时间',
             prompt: '导出时间',
@@ -215,8 +269,9 @@ define(function (require) {
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
+                      var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date+
-                      '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip));
+                      '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
                     }
                   },
                   {
@@ -273,6 +328,7 @@ define(function (require) {
                     {field: 'userId', title: '用户ID', hidden: true},
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
+                    {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
                       field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {

+ 56 - 2
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -1,7 +1,7 @@
 define(function (require) {
     return function (context) {
 
-      var $grid1, $form;
+      var $grid1, $form, $coma;
 
       // 输入搜索文本后点击回车按钮查询列表
       function enterQueryGrid1(e) {
@@ -12,6 +12,41 @@ define(function (require) {
         }
       }
 
+      // 下拉选清空并重新赋值
+      function reloadValuea(_datas) {
+        if ($coma) {
+          $coma.combobox('clear');// 清除当前的选项
+          $coma.combobox('loadData', _datas);// 重新加载数据
+        }
+      }
+
+      // 获取联机下拉选二级信息
+      function getList() {
+        var _datas = [];
+        _datas.push({
+          "id": "",
+          "text": "全部",
+          "selected": true
+        });
+        $.yvan.ajax({
+          url: api('/home/getDepartmentIdLYepi.json?unitId=0'),
+          method: 'GET',
+          async: true,
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i].departmentId,
+                  "text": data.data[i].departmentName
+                })
+              }
+              reloadValuea(_datas);
+            }
+          }
+        });
+        return _datas;
+      }
+
       // 弹框的方式
       var widgets = {
         // 搜索分类检索
@@ -80,6 +115,23 @@ define(function (require) {
             },
           },
           {
+            xtype: 'combobox',
+            label: '二级部门',
+            name: 'departmentId',
+            labelWidth: 'auto',
+            width: 280,
+            value: '',
+            data: getList(),
+            onRender: function () {
+              $coma = $(this);
+            },
+            onValue: function (data) {
+            },
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
             name: 'date',
             label: '导出时间',
             prompt: '导出时间',
@@ -196,8 +248,9 @@ define(function (require) {
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
+                      var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId=0&date="+date+
-                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip));
+                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
                     }
                   },
                   {
@@ -254,6 +307,7 @@ define(function (require) {
                     {field: 'userId', title: '用户ID', hidden: true},
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
+                    {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
                       field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {

+ 59 - 3
admin-ui/app/whepi/lingyun/lingyunUser7.js

@@ -1,7 +1,7 @@
 define(function (require) {
     return function (context) {
 
-      var $grid1, $form;
+      var $grid1, $form, $coma;
 
       // 输入搜索文本后点击回车按钮查询列表
       function enterQueryGrid1(e) {
@@ -12,6 +12,42 @@ define(function (require) {
         }
       }
 
+      // 获取联机下拉选二级信息
+      function getList(id) {
+        id = id == undefined ? 0 : id
+        var _datas = [];
+        _datas.push({
+          "id": "",
+          "text": "全部",
+          "selected": true
+        });
+        $.yvan.ajax({
+          url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+          method: 'GET',
+          async: true,
+          success: function (data) {
+            if (data.data != null && data.data != undefined) {
+              for (var i = 0; i < data.data.length; i++) {
+                _datas.push({
+                  "id": data.data[i].departmentId,
+                  "text": data.data[i].departmentName
+                })
+              }
+              reloadValuea(_datas);
+            }
+          }
+        });
+        return _datas;
+      }
+
+      // 下拉选清空并重新赋值
+      function reloadValuea(_datas) {
+        if ($coma) {
+          $coma.combobox('clear');// 清除当前的选项
+          $coma.combobox('loadData', _datas);// 重新加载数据
+        }
+      }
+
       // 弹框的方式
       var widgets = {
         // 搜索分类检索
@@ -91,13 +127,31 @@ define(function (require) {
             onChange: function (value) {
               if (!isNotNullOrEmpty(value)) {
                 $form.formSet({
-                  unitId : ''
+                  unitId : 0
                 })
               }
+              getList($form.formGet().unitId);
               queryGrid1();
             },
           },
           {
+            xtype: 'combobox',
+            label: '二级部门',
+            name: 'departmentId',
+            labelWidth: 'auto',
+            width: 280,
+            value: '',
+            data: getList(),
+            onRender: function () {
+              $coma = $(this);
+            },
+            onValue: function (data) {
+            },
+            onChange: function () {
+              queryGrid1();
+            }
+          },
+          {
             name: 'date',
             label: '导出时间',
             prompt: '导出时间',
@@ -215,8 +269,9 @@ define(function (require) {
                       var isContact = $form.formGet().isContact;
                       var isSuspected = $form.formGet().isSuspected;
                       var isTrip = $form.formGet().isTrip;
+                      var departmentId = $form.formGet().departmentId;
                       window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date+
-                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip));
+                        '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip + '&departmentId=' + departmentId));
                     }
                   },
                   {
@@ -273,6 +328,7 @@ define(function (require) {
                     {field: 'userId', title: '用户ID', hidden: true},
                     {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
+                    {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
                       field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {

+ 8 - 0
admin-ui/app/whepi/mock/menu.json

@@ -75,6 +75,14 @@
           "children": []
         },
         {
+          "id": "ENT101002",
+          "text": "凌云签到信息",
+          "href": "/app/whepi/daka/dakaLY.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
+        },
+        {
           "id": "ENT101003",
           "text": "凌云二类特殊人员管理",
           "href": "/app/whepi/scan/specialPersonnelLYS2.js",

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

@@ -19,6 +19,14 @@
       "children": []
     },
     {
+      "id": "ENT10003",
+      "text": "凌云签到信息",
+      "href": "/app/whepi/daka/dakaLY2.js",
+      "iconCls": "icon-blank fa fa-align-justify",
+      "state": "close",
+      "children": []
+    },
+    {
       "id": "ENT10004",
       "text": "二类特殊人员管理",
       "href": "/app/whepi/scan/specialPersonnelLY2.js",

+ 58 - 3
admin-ui/app/whepi/scan/xqmanageLY.js

@@ -1,7 +1,7 @@
 define(function (require) {
         return function (context) {
 
-            var $grid1, $form;
+            var $grid1, $form, $coma;
 
             // 弹框的方式
             var widgets = {
@@ -15,13 +15,49 @@ define(function (require) {
                 },
             }
 
+            // 下拉选清空并重新赋值
+            function reloadValuea(_datas) {
+                if ($coma) {
+                    $coma.combobox('clear');// 清除当前的选项
+                    $coma.combobox('loadData', _datas);// 重新加载数据
+                }
+            }
+
+            // 获取联机下拉选二级信息
+            function getList(id) {
+                id = id == undefined ? 0 : id
+                var _datas = [];
+                _datas.push({
+                    "id": "",
+                    "text": "全部",
+                    "selected": true
+                });
+                $.yvan.ajax({
+                    url: api('/home/getDepartmentIdLYepi.json?unitId=' + id),
+                    method: 'GET',
+                    async: true,
+                    success: function (data) {
+                        if (data.data != null && data.data != undefined) {
+                            for (var i = 0; i < data.data.length; i++) {
+                                _datas.push({
+                                    "id": data.data[i].departmentId,
+                                    "text": data.data[i].departmentName
+                                })
+                            }
+                            reloadValuea(_datas);
+                        }
+                    }
+                });
+                return _datas;
+            }
+
 
             // 导出
             function exportExcel() {
                 var queryForm = $form.formGet();
                 $.yvan.download({
                     method: 'post',
-                    url: api('/sweepCode/exportLY?queryProperties=' + queryForm.queryProperties + '&errorInfo=' + queryForm.errorInfo  + '&phone=' + queryForm.phone + '&unitId=' + queryForm.unitId + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
+                    url: api('/sweepCode/exportLY?queryProperties=' + queryForm.queryProperties + '&errorInfo=' + queryForm.errorInfo  + '&phone=' + queryForm.phone + '&unitId=' + queryForm.unitId + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd + '&departmentId=' + queryForm.departmentId),
                     fileName: '进出管理-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
 
                 });
@@ -134,9 +170,10 @@ define(function (require) {
                         onChange: function (value) {
                             if (!isNotNullOrEmpty(value)) {
                                 $form.formSet({
-                                    unitId: ''
+                                    unitId: 0
                                 })
                             }
+                            getList($form.formGet().unitId);
                             queryGrid1();
                         },
                     },],[
@@ -151,6 +188,23 @@ define(function (require) {
                         }
                     },
                     {
+                        xtype: 'combobox',
+                        label: '二级部门',
+                        name: 'departmentId',
+                        labelWidth: 'auto',
+                        width: 280,
+                        value: '',
+                        data: getList(),
+                        onRender: function () {
+                            $coma = $(this);
+                        },
+                        onValue: function (data) {
+                        },
+                        onChange: function () {
+                            queryGrid1();
+                        }
+                    },
+                    {
                         xtype: 'datetimebox',
                         name: 'dateSta',
                         label: '进出时间',
@@ -227,6 +281,7 @@ define(function (require) {
                                         // {field: 'uptownName', title: '小区名称', maxWidth: 200, align: 'left',},
                                         // {field: 'ridgepole', title: '楼栋', maxWidth: 200, align: 'left',},
                                         {field: 'unit', title: '部门', maxWidth: 200,},
+                                        {field: 'departmentName', title: '二级部门', maxWidth: 200,},
                                         {
                                             field: 'doorplate',
                                             title: '工号', maxWidth: 200,

+ 14 - 10
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLYBM4.java

@@ -57,6 +57,10 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "部门名称", index = 1)
     private String loudong = "";
 
+    @TableField(exist = false)
+    @ExcelProperty(value = {"二级部门"}, index = 2)
+    private String departmentName;
+
     public String getLoudong() {
         if (loudong.length() <= 0) {
             loudong = ridgepole + unit;
@@ -64,7 +68,7 @@ public class ExcelRiBaoLYBM4 {
         return loudong;
     }
 
-    @ExcelProperty(value = "工号", index = 4)
+    @ExcelProperty(value = "工号", index = 5)
     private String fanghao = "";
 
     public String getFanghao() {
@@ -77,7 +81,7 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = "姓名", index = 0)
     private String linkman;
 
-    @ExcelProperty(value = "联系电话", index = 3)
+    @ExcelProperty(value = "联系电话", index = 4)
     private String phone;
 
     private String safetyNumStr = "";
@@ -228,7 +232,7 @@ public class ExcelRiBaoLYBM4 {
         return baseDesc;
     }
 
-    @ExcelProperty(value = "病情描述", index = 5)
+    @ExcelProperty(value = "病情描述", index = 6)
     private String bingqingDesc = "";
 
     public String getBingqingDesc() {
@@ -319,7 +323,7 @@ public class ExcelRiBaoLYBM4 {
         return bingqingDesc;
     }
 
-    @ExcelProperty(value = "工作驻地", index = 6)
+    @ExcelProperty(value = "工作驻地", index = 7)
     private String workLoalDesc = "";
 
     public String getWorkLoalDesc() {
@@ -338,7 +342,7 @@ public class ExcelRiBaoLYBM4 {
         return workLoalDesc;
     }
 
-    @ExcelProperty(value = "今晚住地", index = 7)
+    @ExcelProperty(value = "今晚住地", index = 8)
     private String todayLoalDesc = "";
 
     public String getTodayLoalDesc() {
@@ -357,7 +361,7 @@ public class ExcelRiBaoLYBM4 {
         return todayLoalDesc;
     }
 
-    @ExcelProperty(value = "是否出行", index = 8)
+    @ExcelProperty(value = "是否出行", index = 9)
     private String isTripDesc = "";
 
     public String getIsTripDesc() {
@@ -372,16 +376,16 @@ public class ExcelRiBaoLYBM4 {
         return isTripDesc;
     }
 
-    @ExcelProperty(value = "出行详细", index = 11)
+    @ExcelProperty(value = "出行详细", index = 12)
     private String tripDetDesc = "";
 
-    @ExcelProperty(value = "家人确诊或接触", index = 9)
+    @ExcelProperty(value = "家人确诊或接触", index = 10)
     private String isContactDesc = "";
 
-    @ExcelProperty(value = "家人健康异常", index = 10)
+    @ExcelProperty(value = "家人健康异常", index = 11)
     private String isSuspectedDesc = "";
 
-    @ExcelProperty(value = "个人上报状态", index = 2)
+    @ExcelProperty(value = "个人上报状态", index = 3)
     private String reportStatusDesc = "";
 
 }

+ 12 - 8
whepi-web/src/main/java/com/bofeng/entity/SysUptownHouseLY.java

@@ -29,6 +29,10 @@ public class SysUptownHouseLY implements Serializable {
     private String unit;
 
     @TableField(exist = false)
+    @ExcelProperty(value = {"二级部门"}, index = 1)
+    private String departmentName;
+
+    @TableField(exist = false)
     private String reportId;
 
     @TableField(exist = false)
@@ -38,7 +42,7 @@ public class SysUptownHouseLY implements Serializable {
     private String time;
 
     @TableField("doorplate")
-    @ExcelProperty(value = {"工号"}, index = 1)
+    @ExcelProperty(value = {"工号"}, index = 2)
     private String doorplate;
 
     @TableField("status")
@@ -57,26 +61,26 @@ public class SysUptownHouseLY implements Serializable {
     private String uptownName;
 
     @TableField(exist = false)
-    @ExcelProperty(value = {"出入大门"}, index = 4)
+    @ExcelProperty(value = {"出入大门"}, index = 5)
     private String doorName;
 
     @TableField(exist = false)
-    @ExcelProperty(value = {"进出时间"}, index = 5)
+    @ExcelProperty(value = {"进出时间"}, index = 6)
     private String date;
 
     @TableField(exist = false)
     private Integer inType;
 
     @TableField(exist = false)
-    @ExcelProperty(value = {"记录状态"}, index = 6)
+    @ExcelProperty(value = {"记录状态"}, index = 7)
     private String inTypeStr;
 
     @TableField(exist = false)
-    @ExcelProperty(value = {"用户名"}, index = 2)
+    @ExcelProperty(value = {"用户名"}, index = 3)
     private String linkman;
 
     @TableField(exist = false)
-    @ExcelProperty(value = {"电话"}, index = 3)
+    @ExcelProperty(value = {"电话"}, index = 4)
     private String phone;
 
     @TableField(exist = false)
@@ -94,12 +98,12 @@ public class SysUptownHouseLY implements Serializable {
     @TableField(exist = false)
     private String address;
 
-    @ExcelProperty(value = {"通行状态"}, index = 7)
+    @ExcelProperty(value = {"通行状态"}, index = 8)
     @ApiModelProperty("通行状态:1允许,-1禁止")
     @TableField(exist = false)
     private String goStatusStr;
 
-    @ExcelProperty(value = {"禁止提示"}, index = 8)
+    @ExcelProperty(value = {"禁止提示"}, index = 9)
     @ApiModelProperty("禁止提示")
     @TableField(exist = false)
     private String errorInfo;

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

@@ -126,7 +126,8 @@ public class ScanAdminController {
                                     @Pd(name = "isContact", required = false, defaultValue = "0") Integer isContact,
                                     @Pd(name = "isSuspected", required = false, defaultValue = "0") Integer isSuspected,
                                     @Pd(name = "isTrip", required = false, defaultValue = "0") Integer isTrip,
-                                    @Pd(name = "date") String date) {
+                                    @Pd(name = "date") String date,
+                                    @Pd(name = "departmentId", required = false, defaultValue = "0") Long departmentId) {
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
         Map<String, Object> map = new HashMap<>();
         map.put("queryProperties", queryProperties);
@@ -134,6 +135,7 @@ public class ScanAdminController {
         map.put("isContact", isContact);
         map.put("isSuspected", isSuspected);
         map.put("isTrip", isTrip);
+        map.put("departmentId", departmentId);
         Long userId = JwtHelper.getUserId();
         if (userId > 7000 && userId < 8000) {
             unitId = userId;

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

@@ -1,10 +1,12 @@
 package com.bofeng.wx.controller;
 
+import com.bofeng.JwtHelper;
 import com.bofeng.dao.*;
 import com.bofeng.entity.*;
 import com.bofeng.excel.ExcelUtils;
 import com.bofeng.service.*;
 import com.fasterxml.jackson.core.JsonProcessingException;
+import com.yvan.Model;
 import com.yvan.ModelOps;
 import com.yvan.mvc.Pd;
 import com.yvan.platform.JsonWapper;
@@ -270,6 +272,17 @@ public class UserOpenController {
         return uptownUnitMapper.getDepartmentByUnit(unitId);
     }
 
+    @GetMapping("/whepi/home/getDepartmentIdLYepi.json")
+    public Model<List<Department>> getDepartmentIdLYepi(HttpServletRequest request,
+                                                        @Pd(name = "unitId", required = false, defaultValue = "0") Long unitId) {
+        Long userId = JwtHelper.getUserId();
+        if (userId > 7000 && userId < 8000) {
+            unitId = userId;
+        }
+        return Model.newSuccess(uptownUnitMapper.getDepartmentByUnit(unitId));
+    }
+
+
     /**
      * 凌云集团更改部门
      * @return

+ 24 - 12
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -28,6 +28,8 @@ import org.springframework.web.servlet.ModelAndView;
 
 import javax.servlet.http.HttpServletResponse;
 import java.lang.reflect.InvocationTargetException;
+import java.text.SimpleDateFormat;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -59,6 +61,8 @@ public class YeWeiHuiController {
 
   @Autowired
   private SysUptownUnitMapper sysUptownUnitMapper;
+  @Autowired
+  private SweepCodeService sweepCodeService;
 
   @GetMapping("/yeweihui/home.html")
   public ModelAndView yeweihui(ModelMap model, @RequestParam(value = "userId") Long userId, @RequestParam(value = "show", required = false, defaultValue = "-") String show) {
@@ -262,21 +266,29 @@ public class YeWeiHuiController {
   public void lunExportRiBao(@Pd(name = "date") String date,@Pd(name = "unitId", required = false, defaultValue = "0") Long unitId,
                              HttpServletResponse resp) {
 
-    Uptown uptown = uptownMapper.selectById("1238790987234");
-    Long upId = uptown.getUptownId();
-    String fileName;
+//    Uptown uptown = uptownMapper.selectById("1238790987234");
+//    Long upId = uptown.getUptownId();
+//    String fileName;
+//    List<UptownUnit> uptownUnits = sysUptownUnitMapper.selectByUnitId(unitId);
+//    if (uptownUnits!=null && uptownUnits.size()>0) {
+//      fileName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
+//    } else {
+//      fileName = uptown.getUptownName();
+//    }
+//    fileName += "上报信息-";
+//    fileName += date;
+//    List<ExcelRiBaoLY> list = rbService.selectExcelRiBaoLY(upId, date, unitId);
+//    ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
+    Map<String, Object> map = new HashMap<>();
+    map.put("unitId", unitId);
+    map.put("date", date);
+    String unitName = "";
     List<UptownUnit> uptownUnits = sysUptownUnitMapper.selectByUnitId(unitId);
     if (uptownUnits!=null && uptownUnits.size()>0) {
-      fileName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
-    } else {
-      fileName = uptown.getUptownName();
+      unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
     }
-    fileName += "上报信息-";
-    fileName += date;
-
-    List<ExcelRiBaoLY> list = rbService.selectExcelRiBaoLY(upId, date, unitId);
-    ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
-
+    List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L);
+    ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
   }
 
   @ApiOperation("导出小区家庭上报明细")

+ 10 - 2
whepi-web/src/main/resources/mapper/RbMapper.xml

@@ -33,7 +33,7 @@
     <select id="exSelectLingyunUser" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
         select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
         msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,
-        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,de.department_name as departmentName,
         mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.is_contact,mss.is_suspected,
         tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
         from sys_uptown_house suh
@@ -49,6 +49,7 @@
         left join ms_suspected mss on mss.report_id=msr.report_id
         left join ms_trip tr on mss.suspected_id=trip_id
         INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
+        left join sys_department de on de.department_id = suh.department_id
         <where>
             <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
                 and suu.unit_id=#{unitId}
@@ -57,6 +58,9 @@
                 and (suho.linkman like concat('%',#{queryProperties},'%')
                 or suho.phone like concat('%',#{queryProperties},'%'))
             </if>
+            <if test="departmentId != null and departmentId != ''">
+                and suh.department_id = #{departmentId}
+            </if>
             <if test="reportStatus == 0">
                 and msr.report_status=0 and mss.temperature > 0
             </if>
@@ -146,7 +150,7 @@
     <select id="exSelectLingyunUserPage" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
         select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
         msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,
-        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,de.department_name as departmentName,
         mss.medical,mss.temperature,mss.cough,mss.is_contact, mss.is_suspected,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult,mss.temperature_score,mss.is_contact as isContact,mss.is_suspected as isSuspected,
         tr.trip_id,tr.is_trip,tr.today_local,tr.today_local_other,tr.work_local,tr.work_local_other, tr.auto_local, tr.auto_addr,ur.user_id as userId
         from sys_uptown_house suh
@@ -162,6 +166,7 @@
         left join ms_suspected mss on mss.report_id=msr.report_id
         left join ms_trip tr on mss.suspected_id=trip_id
         INNER JOIN sys_user_role ur on ur.property_id = suho.house_id and ur.role_id = 1
+        left join sys_department de on de.department_id = suh.department_id
         <where>
             <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
                 and suu.unit_id=#{unitId}
@@ -170,6 +175,9 @@
                 and (suho.linkman like concat('%',#{queryProperties},'%')
                 or suho.phone like concat('%',#{queryProperties},'%'))
             </if>
+            <if test="departmentId != null and departmentId != ''">
+                and suh.department_id = #{departmentId}
+            </if>
             <if test="reportStatus == 0">
                 and msr.report_status=0 and mss.temperature > 0
             </if>

+ 10 - 2
whepi-web/src/main/resources/mapper/SweepCodeMapper.xml

@@ -143,7 +143,7 @@
         c.latitude,
         c.address,
         g.linkman,
-        g.phone,
+        g.phone,de.department_name as departmentName,
         c.time_update
         from out_scan c
         inner join sys_user_role t on c.user_id = t.user_id and role_id =1
@@ -152,6 +152,7 @@
         inner join sys_uptown_door b on c.door_id = b.door_id
         inner join sys_uptown_house e on e.house_id = t.property_id
         inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        left join sys_department de on de.department_id = e.department_id
         <where>
             a.uptown_id = 1238790987234
             <if test="queryProperties != null and queryProperties != ''">
@@ -167,6 +168,9 @@
             <if test="unitId != null and unitId != ''">
                 and d.unit_id = #{unitId}
             </if>
+            <if test="departmentId != null and departmentId != ''">
+                and e.department_id = #{departmentId}
+            </if>
             <if test="goStatus != null and goStatus !=''">
                 and c.go_status = #{goStatus}
             </if>
@@ -193,7 +197,7 @@
         c.latitude,
         c.address,
         g.linkman,
-        g.phone,
+        g.phone,de.department_name as departmentName,
         c.time_update
         from out_scan c
         inner join sys_user_role t on c.user_id = t.user_id and role_id =1
@@ -202,6 +206,7 @@
         inner join sys_uptown_door b on c.door_id = b.door_id
         inner join sys_uptown_house e on e.house_id = t.property_id
         inner join sys_uptown_unit d on d.unit_id = e.unit_id
+        left join sys_department de on de.department_id = e.department_id
         <where>
             a.uptown_id = 1238790987234
             <if test="queryProperties != null and queryProperties != ''">
@@ -217,6 +222,9 @@
             <if test="unitId != null and unitId != ''">
                 and d.unit_id = #{unitId}
             </if>
+            <if test="departmentId != null and departmentId != ''">
+                and e.department_id = #{departmentId}
+            </if>
             <if test="goStatus != null and goStatus !=''">
                 and c.go_status = #{goStatus}
             </if>