浏览代码

凌云集团更改公司

peiguo 5 年之前
父节点
当前提交
23ff8218ba

+ 299 - 0
admin-ui/app/whepi/lingyun/lingyunUserZJ.js

@@ -0,0 +1,299 @@
+define(function (require) {
+    return function (context) {
+
+      var $grid1, $form;
+
+      // 输入搜索文本后点击回车按钮查询列表
+      function enterQueryGrid1(e) {
+        if (e.keyCode === 13) {
+          var tmp = $(this).val();
+          $form.formSet({queryProperties: tmp});
+          queryGrid1();
+        }
+      }
+
+      // 弹框的方式
+      var widgets = {
+        // 搜索分类检索
+        selectTableUnit: {
+          url: 'app/whepi/home/selectLYbumen.js',
+          bind: {
+            unitId: 'unitId',
+            unit: 'unit',
+          },
+        },
+      };
+
+      // 检索条件查询
+      function queryGrid1() {
+        var queryForm = $form.formGet();
+        $grid1.reload({
+          mtype: 'POST',
+          url: api('/sweepCode/selectLingyunUserZJ'),
+          queryParams: queryForm
+        }, true);
+      }
+
+      var queryToolbar = {
+        xtype: 'toolbar',
+        title: '用户管理',
+        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: 200
+          },
+          {xtype: 'hidden', name: 'unitId'},
+          {
+            name: 'reportStatus',
+            xtype: 'combobox',
+            label: '是否上报',
+            data: [{id: '', text: '全部'}, {id: '0', text: '有数据未上报'}, {id: '1', text: '已上报'}, {id: '2', text: '无数据'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
+          // {
+          //   xtype: 'searchbox',
+          //   label: '部门',
+          //   labelWidth: 'auto',
+          //   name: 'unit',
+          //   prompt: "部门",
+          //   width: 250,
+          //   widget: widgets.selectTableUnit,// 弹出框方法
+          //   onChange: function (value) {
+          //     if (!isNotNullOrEmpty(value)) {
+          //       $form.formSet({
+          //         unitId : ''
+          //       })
+          //     }
+          //     queryGrid1();
+          //   },
+          // },
+          {
+            name: 'date',
+            label: '导出时间',
+            prompt: '导出时间',
+            xtype: 'datebox',
+            labelWidth: 'auto',
+            width: 200,
+          },],[
+          {
+            name: 'msStatus',
+            xtype: 'combobox',
+            label: '个人上报状态',
+            data: [{id: '', text: '全部'}, {id: '1', text: '未上报'}, {id: '2', text: '正常'}, {id: '3', text: '异常'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
+          {
+            name: 'isContact',
+            xtype: 'combobox',
+            label: '家人确诊或接触',
+            data: [{id: '', text: '全部'}, {id: '1', text: '否'}, {id: '2', text: '是'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
+          {
+            name: 'isSuspected',
+            xtype: 'combobox',
+            label: '家人健康异常',
+            data: [{id: '', text: '全部'}, {id: '1', text: '否'}, {id: '2', text: '是'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
+          {
+            name: 'isTrip',
+            xtype: 'combobox',
+            label: '是否出行',
+            data: [{id: '', text: '全部'}, {id: '1', text: '否'}, {id: '2', text: '是'}],
+            value: '',
+            onChange: function (value) {
+              queryGrid1();
+            },
+          },
+        ]]
+      };
+
+      return {
+        north: {
+          height: 132,
+          /* split: true,
+           border: false,*///底框是否可变动
+          items: [
+            queryToolbar,
+            queryForm
+          ]
+        },
+        center: {
+          height: '60%',
+          split: true,
+          items:
+            {
+              onRender: function () {
+                $grid1 = $(this);
+                queryGrid1()
+              },
+              xtype: 'grid',
+              toolbar: {
+                xtype: 'toolbar',
+                title: '用户列表',
+                items: [
+                  {
+                    text: '导出人员报表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                      var queryProperties = $form.formGet().queryProperties;
+                      var unitId = $form.formGet().unitId;
+                      var date = $form.formGet().date;
+                      if ( date == null || date == "") {
+                        $.yvan.msg('请选择导出时间');
+                        return
+                      }
+                      var msStatus = $form.formGet().msStatus;
+                      var isContact = $form.formGet().isContact;
+                      var isSuspected = $form.formGet().isSuspected;
+                      var isTrip = $form.formGet().isTrip;
+                      window.open(api('/sweepCode/exSelectLingyunUserZJ?queryProperties='+queryProperties+"&unitId="+unitId + "&date="+date+
+                      '&msStatus='+msStatus+'&isContact='+isContact+'&isSuspected='+isSuspected+'&isTrip='+isTrip));
+                    }
+                  },
+                  // {
+                  //   text: '导出正常复工人员', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var unitId = $form.formGet().unitId;
+                  //     window.open(api('/returnWork/exReturnWork?unitId='+unitId));
+                  //   }
+                  // },
+                  {
+                    text: '查看人员上报情况', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
+                      }
+                      $.yvan.showDialog(this,
+                        require('/app/whepi/lingyun/dialogDetail.js')({
+                          userId: row.userId,
+                          linkman: row.linkman,
+                          confirm: function () {
+                            // $grid2.reload();
+                          }
+                        })
+                      );
+                    }
+                  },
+                  {
+                    text: '查看人员可复工状况', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
+                      }
+                      $.yvan.showDialog(this,
+                        require('/app/whepi/lingyun/dialogFugong.js')({
+                          userId: row.userId,
+                          confirm: function () {
+                            // $grid2.reload();
+                          }
+                        })
+                      );
+                    }
+                  },
+                ]
+              },
+              multiselect: true, /// 表格多选
+              idField: 'userId',
+              editable: true,
+              editOnSelected: true,
+              autoSizeColumns: true,
+              columns:
+                [
+                  [
+                    {field: 'userId', title: '用户ID', hidden: true},
+                    {field: 'linkman', title: '姓名', maxWidth: 200, align: 'left',},
+                    {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
+                    // {
+                    //   field: 'returnWork', title: '今日复工', maxWidth: 100, align: 'center', formatter: function (value) {
+                    //     if (value == 1) {
+                    //       return "<span style='color: green;'>允许复工<span>";
+                    //     } else if (value == 0) {
+                    //       return "<span style='color: red;'>禁止复工<span>";
+                    //     }
+                    //   }
+                    // },
+                    {field: 'reportStatus', title: '上报', hidden: true},
+                    {
+                      field: 'msStatus', title: '个人上报状态', maxWidth: 100, align: 'center', formatter: function (value, row) {
+                        if (row.rowData.reportStatus == 0) {
+                          return "<span style='color: #ffb717;'>未上报<span>";
+                        } else if (value == 1) {
+                          return "<span style='color: green;'>正常<span>";
+                        } else {
+                          return "<span style='color: red;'>异常<span>";
+                        }
+                      }
+                    },
+                    {field: 'phone', title: '联系电话', maxWidth: 200, align: 'left',},
+                    {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},
+                    {field: 'bingqingDesc', title: '病情表述', align: 'left',},
+                    {field: 'isContactDesc', title: '家人确诊或接触', align: 'left',formatter: function (value) {
+                        if (value == "否") {
+                          return "<span style='color: green;'>否<span>";
+                        } else {
+                          return "<span style='color: red;'>是<span>";
+                        }
+                      }
+                    },
+                    {field: 'isSuspectedDesc', title: '家人健康异常', align: 'left',formatter: function (value) {
+                        if (value == "否") {
+                          return "<span style='color: green;'>否<span>";
+                        } else {
+                          return "<span style='color: red;'>是<span>";
+                        }
+                      }
+                    },
+                    {field: 'workLoalDesc', title: '工作驻地', maxWidth: 200, align: 'left',},
+                    {field: 'todayLoalDesc', title: '今晚住地', maxWidth: 200, align: 'left',},
+                    {field: 'autoLocal', title: '定位地区', maxWidth: 200, align: 'left',},
+                    {field: 'autoAddr', title: '定位地址', maxWidth: 200, align: 'left',},
+                    {field: 'isTripDesc', title: '是否出行', maxWidth: 200, align: 'left',},
+                    {field: 'tripDetDesc', title: '出行详细', align: 'left',},
+                  ]
+                ]
+            }
+        }
+      };
+    };
+  }
+);

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

@@ -48,6 +48,14 @@
           "iconCls": "icon-blank fa fa-align-justify",
           "state": "close",
           "children": []
+        },
+        {
+          "id": "ENT100026",
+          "text": "中建康城导出报表",
+          "href": "/app/whepi/lingyun/lingyunUserZJ.js",
+          "iconCls": "icon-blank fa fa-align-justify",
+          "state": "close",
+          "children": []
         }
       ]
     },

+ 4 - 4
whepi-web/src/main/java/com/bofeng/service/SweepCodeService.java

@@ -49,12 +49,12 @@ public class SweepCodeService {
 //        return sysUptownHouses;
 //    }
 
-    public List<ExcelRiBaoLYBM4> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) throws ParseException {
+    public List<ExcelRiBaoLYBM4> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam, Long uptownId) throws ParseException {
         Long userId = JwtHelper.getUserId();
         if (userId > 7000 && userId < 8000) {
             queryParam.put("unitId", userId);
         }
-        queryParam.put("uptownId", 1238790987234L);
+        queryParam.put("uptownId", uptownId);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserPage(pageDb,queryParam);
         if (sysUptownHouses != null && sysUptownHouses.size() > 0) {
             String tripDet;
@@ -154,8 +154,8 @@ public class SweepCodeService {
         return sysUptownHouses;
     }
 
-    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam) {
-        queryParam.put("uptownId", 1238790987234L);
+    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam, Long uptownId) {
+        queryParam.put("uptownId", uptownId);
         List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUser(queryParam);
 
         if (sysUptownHouses != null && sysUptownHouses.size() > 0) {

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

@@ -89,7 +89,15 @@ public class ScanAdminController {
     @PostMapping("/whepi/sweepCode/selectLingyunUser")
     public Model<List<ExcelRiBaoLYBM4>> selectLingyunUser(PageDb pageDb,HttpParameterParser parser) throws ParseException {
 //        HttpServletResponse response,HttpServletRequest request
-        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap());
+        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap(), 1238790987234L);
+        return Model.newSuccess(pageDb,sysUptownHouses);
+    }
+
+    @ApiOperation("中建康城用户管理")
+    @PostMapping("/whepi/sweepCode/selectLingyunUserZJ")
+    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUserZJ(PageDb pageDb,HttpParameterParser parser) throws ParseException {
+//        HttpServletResponse response,HttpServletRequest request
+        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap(), 5L);
         return Model.newSuccess(pageDb,sysUptownHouses);
     }
 
@@ -137,7 +145,40 @@ public class ScanAdminController {
         if (uptownUnits!=null && uptownUnits.size()>0) {
             unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
         }
-        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map);
+        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 1238790987234L);
+        ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
+    }
+
+    @ApiOperation("中建康城导出报表")
+    @GetMapping("/whepi/sweepCode/exSelectLingyunUserZJ")
+    @SneakyThrows
+    public void exSelectLingyunUserZJ(HttpParameterParser parser,HttpServletResponse resp,
+                                    @Pd(name = "queryProperties", required = false, defaultValue = "") String queryProperties,
+                                    @Pd(name = "unitId", required = false, defaultValue = "0") Long unitId,
+                                    @Pd(name = "msStatus", required = false, defaultValue = "0") Integer msStatus,
+                                    @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) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryProperties", queryProperties);
+        map.put("msStatus", msStatus);
+        map.put("isContact", isContact);
+        map.put("isSuspected", isSuspected);
+        map.put("isTrip", isTrip);
+        Long userId = JwtHelper.getUserId();
+        if (userId > 7000 && userId < 8000) {
+            unitId = userId;
+        }
+        map.put("unitId", unitId);
+        map.put("date", date);
+        String unitName = "";
+        List<UptownUnit> uptownUnits = sysUptownUnitMapper.selectByUnitId(unitId);
+        if (uptownUnits!=null && uptownUnits.size()>0) {
+            unitName = uptownUnits.get(0).getRidgepole()+uptownUnits.get(0).getUnit();
+        }
+        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map, 5L);
         ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, unitName + "上报信息-" + date);
     }