Browse Source

日报后台测试23:23

maoyunfeng 5 năm trước cách đây
mục cha
commit
fec4937aa0

+ 468 - 105
admin-ui/app/whepi/lingyun/dialogLiaodan.js

@@ -1,109 +1,472 @@
 define(function (require) {
-  return function (context) {
-
-    var $dlg, $form;
-
-    return {
-      xtype: 'dialog',
-      dialogId: 'dialogLiaodan',
-      title: '用户名信息',
-      width: 650,
-      height: 350,
-      onOpen: function () {
-        loadingMask: false,
-          $dlg = $(this);
-        if (context.isEdit) {
-          $.yvan.ajax({
-            type: 'GET',
-            url: api('/home/getRibaoDetail'),
-            data: {
-              reportId: context.reportId
-            },
-            success: function (data) {
-              // $dlg.find('form');
-              // $form.formSet(data.data);
+        return function (context) {
+
+            var $dlg, $form, $s1, $s2;
+
+            //
+            function queryGrid1() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "男"
+                        },{
+                            "id": 2,
+                            "text": "女"
+                        });
+
+                return _datas2;
             }
-          });
-        }
-      },
-      center: {
-        items: {
-          onRender: function () {
-            $grid = $(this);
-            queryGrid1();
-          },
-          xtype: 'grid',
-          idField: "reportId",
-          pagination: false,
-          toolbar: {
-            xtype: 'div',
-            items: [
-              // queryToolbar,
-              // queryForm,
-              // gridToolbar
-            ]
-          },
-          columns: [[
-            {title: '账号ID', field: 'reportId', hidden: true},
-            {title: '上报日期', field: 'reportDate'},
-            {
-              title: '上报状态', field: 'reportStatus', formatter: function (value) {
-                if (value == 0)
-                  return "未上报";
-                else
-                  return "<span style='color:green'>已上报</span>";
-              }
-            },
-            {
-              title: '异常状态', field: 'msStatus', formatter: function (value) {
-                if (value == 1)
-                  return "<span style='color:green'>正常</span>";
-                if (value == 2)
-                  return "<span style='color:red'>异常</span>";
-              }
-            },
-            {title: '居家人数', field: 'safetyNum'},
-            {title: '确诊人数', field: 'sureNum'},
-            {title: '疑似人数', field: 'suspectedNum'},
-            {title: '正常人数', field: 'normalNum'},
-            {title: '隔离人数', field: 'singleNum'},
-            {title: '新增人', field: 'userCreateName'},
-            {title: '新增时间', field: 'timeCreate', formatter: 'ts'},
-            {title: '更新人', field: 'userUpdateName'},
-            {title: '更新时间', field: 'timeUpdate', formatter: 'ts'}
-          ]]
-        }
-      },
-      buttons: [
-        {
-          text: "提交", iconCls: "fa fa-save", onClick: function () {
-            var userId = $form.formGet().userId;
-            var deptId = $form.formGet().deptId;
-            if (('' == userId || null == userId || undefined == userId) && ('' == deptId || null == deptId || undefined == deptId)) {
-              $.yvan.msg('帐号必须关联一个人员或者部门');
-              return;
+            function queryGrid3() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无"
+                        },{
+                            "id": 1,
+                            "text": "确诊"
+                        },{
+                            "id": 2,
+                            "text": "疑似"
+                        },{
+                            "id": 3,
+                            "text": "有接触史"
+                        },{
+                            "id": 4,
+                            "text": "解除隔离"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid4() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无咳嗽"
+                        },{
+                            "id": 1,
+                            "text": "偶有短暂咳嗽"
+                        },{
+                            "id": 2,
+                            "text": "咳嗽轻度影响生活"
+                        },{
+                            "id": 3,
+                            "text": "咳嗽严重影响生活"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid5() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无"
+                        },{
+                            "id": 1,
+                            "text": "按压有"
+                        },{
+                            "id": 2,
+                            "text": "偶尔"
+                        },{
+                            "id": 3,
+                            "text": "持续有"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid6() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无"
+                        },{
+                            "id": 1,
+                            "text": "急走或上坡气短"
+                        },{
+                            "id": 2,
+                            "text": "气短而走路变慢"
+                        },{
+                            "id": 3,
+                            "text": "走路数分钟后气短"
+                        },{
+                            "id": 4,
+                            "text": "气短无法离开房间"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid7() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无"
+                        },{
+                            "id": 1,
+                            "text": "体力劳动后不能恢复"
+                        },{
+                            "id": 2,
+                            "text": "轻体力活非常累"
+                        },{
+                            "id": 3,
+                            "text": "不能正常生活"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid8() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "无"
+                        },{
+                            "id": 1,
+                            "text": "轻度腹泻少于于3次"
+                        },{
+                            "id": 2,
+                            "text": "中度腹泻4-6次"
+                        },{
+                            "id": 3,
+                            "text": "重度腹泻超过6次"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid9() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "武汉市"
+                        },{
+                            "id": 2,
+                            "text": "宜昌市"
+                        },{
+                            "id": 3,
+                            "text": "当阳市"
+                        },{
+                            "id": 4,
+                            "text": "其它地点"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid10() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "武汉市"
+                        },{
+                            "id": 2,
+                            "text": "宜昌市"
+                        },{
+                            "id": 3,
+                            "text": "当阳市"
+                        },{
+                            "id": 4,
+                            "text": "其它地点"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid11() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "武汉市"
+                        },{
+                            "id": 2,
+                            "text": "宜昌市"
+                        },{
+                            "id": 3,
+                            "text": "当阳市"
+                        },{
+                            "id": 4,
+                            "text": "其它地点"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid12() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "武汉市"
+                        },{
+                            "id": 2,
+                            "text": "宜昌市"
+                        },{
+                            "id": 3,
+                            "text": "当阳市"
+                        },{
+                            "id": 4,
+                            "text": "其它地点"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid13() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 0,
+                            "text": "否"
+                        },{
+                            "id": 1,
+                            "text": "是"
+                        })
+
+                return _datas2;
+            }
+            function queryGrid14() {
+                var _datas2 = [];
+                        _datas2.push({
+                            "id": 1,
+                            "text": "长途汽车"
+                        },{
+                            "id": 2,
+                            "text": "火车"
+                        },{
+                            "id": 3,
+                            "text": "飞机"
+                        })
+
+                return _datas2;
+            }
+
+
+            return {
+                xtype: 'dialog',
+                dialogId: 'dialogOutsideXzId',
+                title:'修改',
+                width: 420,
+                height: 460,
+                onOpen: function () {
+                    $dlg = $(this);
+                },
+                center: {
+                    items: {
+                        xtype: 'formgroup',
+                        //字数过多加上后可让字显示出来
+                        subLabelWidth: '100',
+                        subControlWidth: '200',
+                        onRender: function () {
+                            $form = $(this);
+
+                        },
+                        items: [
+                            [
+                                [{
+                                    name: 'suspectedId',
+                                    label: '疑似id',
+                                    labelWidth: 150, required: true,
+                                    width: 350,
+                                    xtype: "hidden",
+                                    value: context.row.suspectedId,
+                                },
+                                {
+                                    name: 'userName',
+                                    label: '姓名',
+                                    labelWidth: 150,
+                                    width: 350,
+                                    required: true,
+                                    value: context.row.userName
+                                },
+                                {
+                                    name: 'grender',
+                                    label: '性别',
+                                    labelWidth: 150,
+                                    width: 350,
+                                    required: true,
+                                    data: queryGrid1(),
+                                    xtype: 'yvselect',
+                                    value:context.row.grender
+                                },
+                                {
+                                    name: 'age',
+                                    label: '岁数',
+                                    labelWidth: 150,
+                                    required: true,
+                                    width: 350,
+                                    value: context.row.age
+                                }],
+                                [{
+                                    name: 'familyStatus',
+                                    label: '基本情况',
+                                    labelWidth: 150,
+                                    width: 350, required: true,
+                                    value: context.row.familyStatus,
+
+                                }],
+                                [{
+                                label: '新冠肺炎',
+                                name: 'medical',
+                                labelWidth: 150,
+                                 width: 350,
+                                xtype: 'yvselect',
+                                required: true,
+                                data: queryGrid3(),
+                                value:context.row.medical
+                                },
+                                {
+                                    name: 'temperature',
+                                    label: "体温",
+                                    labelWidth: 150,
+                                    width: 350,required: true,
+                                    data: queryGrid3(),
+                                    value:context.row.temperature
+                                }],
+                                [{
+                                    name: 'cough',
+                                    label: "咳嗽现象",
+                                    xtype: 'yvselect',
+                                    labelWidth: 150, required: true,
+                                    data: queryGrid4(),
+                                    width: 350,
+                                    value:context.row.cough
+                                }],
+                                [{
+                                    name: 'muscle',
+                                    label: '肌肉酸疼',
+                                    labelWidth: 150,
+                                    width: 350,
+                                    maxlength: 10,
+                                    xtype: 'yvselect', required: true,
+                                    data: queryGrid5(),
+                                    value:context.row.muscle
+                                }],
+                                [{
+                                    name: 'dyspnea',
+                                    label: '呼吸困难', labelWidth: 150,width: 350,
+                                    xtype: 'yvselect',
+                                    data: queryGrid6(),
+                                    required: true, value:context.row.dyspnea,
+
+                                }],
+                                [{
+                                    name: 'fatigue',
+                                    label: '乏力现象',
+                                    xtype: 'yvselect',
+                                    data: queryGrid7(),
+                                    labelWidth: 150, width: 350, required: true,
+                                    value:context.row.fatigue
+                                }],
+                                [{
+                                    name: 'diarrhea',
+                                    label: '腹泻现象',
+                                    xtype: 'yvselect',
+                                    data: queryGrid8(),
+                                    labelWidth: 150, width: 350, required: true,
+                                    value:context.row.diarrhea
+                                }],
+                                [{
+                                    name: 'others',
+                                    label: '其它描述', labelWidth: 150, width: 350, height: '70px',
+                                    required: true, value:context.row.others,
+                                    maxlength: 200, validType: 'isBlank'
+                                }],
+                                [{
+                                    name: 'workLocal',
+                                    label: '工作驻地', labelWidth: 150, width: 350,  xtype: 'yvselect',
+                                    data: queryGrid9(),
+                                    required: true, value:context.row.workLocal,
+                                }],
+                                [{
+                                    name: 'workLocalOther',
+                                    label: '工作驻地', labelWidth: 150, width: 350,
+                                    value:context.row.workLocalOther,
+                                }],
+                                [{
+                                    name: 'todayLocal',
+                                    label: '今晚驻地', labelWidth: 150, width: 350,
+                                    required: true, value:context.row.todayLocal,xtype: 'yvselect',
+                                    data: queryGrid10(),
+                                }],
+                                [{
+                                    name: 'todayLocalOther',
+                                    label: '今晚驻地', labelWidth: 150, width: 350,
+                                    value:context.row.todayLocalOther,
+                                }],
+                                [{
+                                    name: 'isTrip',
+                                    label: '是否出行', labelWidth: 150, width: 350,
+                                    required: true, value:context.row.isTrip,xtype: 'yvselect',
+                                    data: queryGrid13(),
+                                }],
+                                [{
+                                    name: 'startLocal',
+                                    label: '出发地', labelWidth: 150, width: 350,
+                                    value:context.row.startLocal,xtype: 'yvselect',
+                                    data: queryGrid11(),
+                                }],
+                                [{
+                                    name: 'startLocalOther',
+                                    label: '出发地', labelWidth: 150, width: 350,
+                                    value:context.row.startLocalOther,
+                                }],
+                                [{
+                                    name: 'endLocal',
+                                    label: '目的地', labelWidth: 150, width: 350,
+                                    value:context.row.endLocal,xtype: 'yvselect',
+                                    data: queryGrid12(),
+                                }],
+                                [{
+                                    name: 'endLocalOther',
+                                    label: '目的地', labelWidth: 150, width: 350,
+                                    value:context.row.endLocalOther
+                                }],
+                                [{
+                                    name: 'tripType',
+                                    label: '出行方式', labelWidth: 150, width: 350,
+                                    value:context.row.tripType,xtype: 'yvselect',
+                                    data: queryGrid14(),
+                                }],
+                                [{
+                                    name: 'tripTypeDesp',
+                                    label: '车次/车牌号/航班', labelWidth: 150, width: 350,
+                                    value:context.row.tripTypeDesp,
+                                }],
+                            ]
+                        ]
+                    }
+                },
+                buttons:
+                    [
+                        {
+                            text: "保存", iconCls: "fa fa-save", onClick: function () {
+                                var formFirst = $form.formGet();
+
+                                $.yvan.postForm($form, {
+                                    url: api('/home/addRibaoTripxq'),
+                                    success: function () {
+                                        $.yvan.msg('操作成功');
+                                        $dlg.window('close');
+                                        if ($.type(context.confirm) === 'function') {
+                                            context.confirm();
+                                        }
+                                    }
+                                });
+                               /* $.ajax({
+                                    url: "/home/addRibaoTrip",
+                                    type: "post",
+                                    contentType: "application/json; charset=utf-8",
+                                    data: JSON.stringify(formFirst),
+                                    success: function (data) {
+                                        $.yvan.msg('操作成功');
+                                        $dlg.window('close');
+                                        if ($.type(context.confirm) === 'function') {
+                                            context.confirm();
+                                        }
+                                    },
+                                });*/
+                            }
+                        }, {
+                        text: "关闭", iconCls: "fa fa-times", onClick: function () {
+                            $dlg.dialog('close');
+                            if ($.type(context.confirm) === 'function') {
+                                context.confirm();
+                            }
+                        }
+                    }]
             }
-            $.yvan.postForm($form, {
-              url: (context.isEdit ? api('/sys/account/update') : api('/sys/account/insert')),
-              success: function () {
-                $.yvan.msg('操作成功');
-                if (context.isEdit) {
-                  $dlg.window('close');
-                }
-                if ($.type(context.confirm) === 'function') {
-                  context.confirm();
-                }
-              },
-              error: function (data) {
-              }
-            });
-          }
-        }, {
-          text: "关闭", iconCls: "fa fa-times", onClick: function () {
-            $dlg.dialog('close');
-          }
+                ;
         }
-      ]
-    };
-  };
-});
+            ;
+    }
+);

+ 204 - 22
admin-ui/app/whepi/lingyun/liaodan.js

@@ -1,7 +1,7 @@
 define(function (require) {
   return function (context) {
 
-    var $grid, $form;
+    var $grid,$grid2, $form;
 
     // 输入搜索文本后点击回车按钮查询列表
     function enterQueryGrid1(e) {
@@ -23,6 +23,22 @@ define(function (require) {
         queryParams: queryForm
       });
     }
+      function queryGrid2(rowid) {
+          var row = $grid.rowData(rowid);
+          if (!row) {
+              $.yvan.msg('请先选择一行数据');
+              return;
+          }
+          var queryUrl = '/home/queryRibaoTestxq';// 自行替换此参数
+          var queryForm = $form.formGet();
+          queryForm.reportId = row.reportId;
+          queryForm.reportDate = row.reportDate;
+          $grid2.reload({
+              mtype: 'get',
+              url: api(queryUrl),
+              queryParams: queryForm
+          }, true);
+      }
 
     // 搜索按钮
     var queryToolbarTitle = '个人管理';
@@ -77,25 +93,7 @@ define(function (require) {
     var gridToolbarTitle = '上报列表';
     var gridToolbar = {
       xtype: 'toolbar', title: gridToolbarTitle,
-      items: [
-        {
-          text: '编辑上报信息', iconCls: 'fa fa-pencil-square-o', onClick: function () {
-            var row = $grid.rowData();
-            if (!row) {
-              $.yvan.msg('请先选择一行数据');
-              return;
-            }
-            var dlg = require('/app/whepi/lingyun/dialogLiaodan.js')({// 自行替换此参数
-              isEdit: true,
-              reportId: row.reportId,// 自行替换此参数
-              confirm: function () {
-                queryGrid1();
-              }
-            });
-            $.yvan.showDialog(this, dlg);
-          }
-        }
-      ]
+
     }
 
     return {
@@ -145,9 +143,193 @@ define(function (require) {
             {title: '新增时间', field: 'timeCreate', formatter: 'ts'},
             {title: '更新人', field: 'userUpdateName'},
             {title: '更新时间', field: 'timeUpdate', formatter: 'ts'}
-          ]]
+          ]],
+            onSelectRow: function (rowid) {
+                var row = $grid.rowData(rowid);
+                if (!row) {
+                    $.yvan.msg('请先选择一行数据');
+                    return;
+                }
+                clearGrid($grid2);
+                queryGrid2(rowid);
+            }
         }
-      }
+      },
+
+        south:
+            {
+                height: '40%',
+                border: false,
+                items:
+                    {
+                        onRender: function () {
+                            $grid2 = $(this);
+                        },
+                        xtype: 'grid',
+                        toolbar:
+                            {
+                                xtype: 'div',
+                                items: [{
+                                    xtype: 'toolbar', title: '详情列表',
+                                    items: [{
+                                        text: '编辑上报信息', iconCls: 'fa fa-pencil-square-o', onClick: function () {
+                                            var row = $grid2.rowData();
+                                            if (!row) {
+                                                $.yvan.msg('请先选择一行数据');
+                                                return;
+                                            }
+                                            $.yvan.showDialog(this,
+                                                require('/app/whepi/lingyun/dialogLiaodan.js')({
+                                                    isEdit: true,
+                                                    row: row,
+                                                    confirm: function () {
+                                                        $grid2.reload();
+                                                    }
+                                                })
+                                            );
+                                        }
+                                    }]
+                                }],
+                            },
+                        autoSizeColumns: true,
+                        sortable: true,
+                        pagination: false,
+                        columns:
+                            [
+                                [{title: '疑似ID', field: 'suspectedId', hidden: true},
+                                {title: '性别', field: 'grender', hidden: true},
+                                {title: '新冠肺炎', field: 'medical', hidden: true},
+                                {title: '咳嗽现象', field: 'cough', hidden: true},
+                                {title: '肌肉酸疼', field: 'muscle', hidden: true},
+                                {title: '呼吸困难', field: 'dyspnea', hidden: true},
+                                {title: '乏力现象', field: 'fatigue', hidden: true},
+                                {title: '腹泻现象', field: 'diarrhea', hidden: true},
+                                    {title: '姓名', field: 'userName'},
+                                    {
+                                        title: '性别', field: 'grenderStr', formatter: function (value) {
+                                            if (value == 1)
+                                                return "男";
+                                            else
+                                                return "女";
+                                        }
+                                    },
+                                    {
+                                        title: '岁数', field: 'age'
+                                    },
+                                    {title: '基本情况', field: 'familyStatus'},
+                                    {title: '新冠肺炎', field: 'medicalStr',formatter:function(value){
+                                      if(value == 0){
+                                        return "无"
+                                      }else if(value == 1){
+                                        return "确诊"
+                                      }else if(value == 2){
+                                        return "疑似"
+                                      }else if(value == 3){
+                                        return "有接触史"
+                                      }else if(value == 4){
+                                        return "解除隔离"
+                                      }
+                                        }},
+                                    {title: '体温', field: 'temperature'},
+                                    {title: '咳嗽现象', field: 'coughStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "无咳嗽"
+                                            }else if(value == 1){
+                                                return "偶有短暂咳嗽"
+                                            }else if(value == 2){
+                                                return "咳嗽轻度影响生活"
+                                            }else if(value == 3){
+                                                return "咳嗽严重影响生活"
+                                            }
+                                        }},
+                                    {title: '肌肉酸疼', field: 'muscleStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "无"
+                                            }else if(value == 1){
+                                                return "按压有"
+                                            }else if(value == 2){
+                                                return "偶尔"
+                                            }else if(value == 3){
+                                                return "持续有"
+                                            }
+                                        }},
+                                    {title: '呼吸困难', field: 'dyspneaStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "无"
+                                            }else if(value == 1){
+                                                return "急走或上坡气短"
+                                            }else if(value == 2){
+                                                return "气短而走路变慢"
+                                            }else if(value == 3){
+                                                return "走路数分钟后气短"
+                                            }else if(value == 4){
+                                                return "气短无法离开房间"
+                                            }
+                                        }},
+                                    {title: '乏力现象', field: 'fatigueStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "无"
+                                            }else if(value == 1){
+                                                return "体力劳动后不能恢复"
+                                            }else if(value == 2){
+                                                return "轻体力活非常累"
+                                            }else if(value == 3) {
+                                                return "不能正常生活"
+                                            }
+                                        }},
+                                    {title: '腹泻现象', field: 'diarrheaStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "无"
+                                            }else if(value == 1){
+                                                return "轻度腹泻少于于3次"
+                                            }else if(value == 2){
+                                                return "中度腹泻4-6次"
+                                            }else if(value == 3) {
+                                                return "3重度腹泻超过6次"
+                                            }
+                                        }},
+                                    {title: '其它描述', field: 'others'},
+                                    {title: '工作驻地', field: 'workLocalOther',hidden: true},
+                                    {title: '工作驻地', field: 'workLocal',hidden: true},
+                                    {title: '工作驻地', field: 'workLocalOtherStr'},
+                                    {title: '今晚驻地', field: 'todayLocalOther',hidden: true},
+                                    {title: '今晚驻地', field: 'todayLocal',hidden: true},
+                                    {title: '今晚驻地', field: 'todayLocalOtherStr'},
+                                    {title: '是否出行', field: 'isTrip',hidden: true},
+                                    {title: '是否出行', field: 'isTripStr',formatter:function(value){
+                                            if(value == 0){
+                                                return "否"
+                                            }else if(value == 1){
+                                                return "是"
+                                            }
+                                        }},
+                                    {title: '出发地', field: 'startLocalOther',hidden: true},
+                                    {title: '出发地', field: 'startLocal',hidden: true},
+                                    {title: '出发地', field: 'startLocalOtherStr'},
+                                    {title: '目的地', field: 'endLocalOther',hidden: true},
+                                    {title: '目的地', field: 'endLocal',hidden: true},
+                                    {title: '目的地', field: 'endLocalOtherStr'},
+                                    {title: '车次/车牌号/航班', field: 'tripTypeDesp'},
+                                    {title: '出行方式', field: 'tripTypeStr',formatter:function(value){
+                                            if(value == 1){
+                                                return "长途汽车"
+                                            }else if(value == 2){
+                                                return "火车"
+                                            }else if(value == 3){
+                                                return "飞机"
+                                            }else if(value ==undefined){
+                                                return ""
+                                            }else if(value ==null){
+                                                return ""
+                                            }else if(value ==""){
+                                                return ""
+                                            }
+                                        }},
+                                    {title: '出行方式', field: 'tripType',hidden: true},
+                                ]
+                            ]
+                    }
+            }
     };
   };
 });

+ 1 - 0
whepi-web/src/main/java/com/bofeng/dao/MsReportMapper.java

@@ -24,6 +24,7 @@ public interface MsReportMapper extends BaseMapper<MsReport> {
     List<MsReport> selectByReportDate(@Param("reportDate") String reportDate, @Param("userCreate") Long userCreate);
     List<MsReport> selectByReportDateStatus(@Param("reportDate") String reportDate, @Param("userCreate") Long userCreate);
     List<MsReport> selectByReportDateTest(Map<String, Object> queryParam);
+    List<MsSuspected> selectByReportDateTestxq(Map<String, Object> queryParam);
 
     @Select("select * from ms_report where report_date<curdate()  and user_create=#{userCreate} ORDER BY report_date desc LIMIT 1")
     List<MsReport> getNowByYesterdayDate(@Param("userCreate") Long userCreate);

+ 37 - 0
whepi-web/src/main/java/com/bofeng/entity/MsSuspected.java

@@ -33,6 +33,7 @@ public class MsSuspected {
     @TableField("grender")
     private Integer grender;
 
+
     @TableField(exist = false)
     private String grenderStr = "";
 
@@ -176,15 +177,51 @@ public class MsSuspected {
     private String workLocalOther = "";
 
     @TableField(exist = false)
+    private String workLocalOtherStr = "";
+
+    @TableField(exist = false)
     private Integer todayLocal;
 
     @TableField(exist = false)
     private String todayLocalOther = "";
 
     @TableField(exist = false)
+    private String todayLocalOtherStr = "";
+
+    @TableField(exist = false)
     private Integer isTrip ;
 
     @TableField(exist = false)
+    private Integer isTripStr ;
+
+    @TableField(exist = false)
+    private Integer tripType ;
+
+    @TableField(exist = false)
+    private Integer tripTypeStr ;
+
+    @TableField(exist = false)
+    private Integer endLocal ;
+
+    @TableField(exist = false)
+    private String endLocalOther ;
+
+    @TableField(exist = false)
+    private String endLocalOtherStr ;
+
+    @TableField(exist = false)
+    private String startLocalOther ;
+
+    @TableField(exist = false)
+    private String startLocalOtherStr ;
+
+    @TableField(exist = false)
+    private Integer startLocal ;
+
+    @TableField(exist = false)
+    private String tripTypeDesp ;
+
+    @TableField(exist = false)
     private String tripDet ;
 
     @TableField(exist = false)

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

@@ -550,4 +550,47 @@ public class MsReportService {
         queryParam.put("userCreate", userCreate);
         return msReportMapper.selectByReportDateTest(queryParam);
     }
+    public List<MsSuspected> getByReportReportDateTestxq(Map<String, Object> queryParam) {
+        List<MsSuspected> msReports = msReportMapper.selectByReportDateTestxq(queryParam);
+        if(msReports.size() != 0){
+            for (int i = 0; i < msReports.size(); i++) {
+                if(msReports.get(i).getWorkLocal() == 1){
+                    msReports.get(i).setWorkLocalOtherStr("武汉市");
+                }else if(msReports.get(i).getWorkLocal() == 2){
+                    msReports.get(i).setWorkLocalOtherStr("宜昌市");
+                }else if(msReports.get(i).getWorkLocal() == 3){
+                    msReports.get(i).setWorkLocalOtherStr("当阳市");
+                }
+                if(msReports.get(i).getTodayLocal() == 1){
+                    msReports.get(i).setTodayLocalOtherStr("武汉市");
+                }else if(msReports.get(i).getTodayLocal() == 2){
+                    msReports.get(i).setTodayLocalOtherStr("宜昌市");
+                }else if(msReports.get(i).getTodayLocal() == 3){
+                    msReports.get(i).setTodayLocalOtherStr("当阳市");
+                }
+
+                if(msReports.get(i).getEndLocal() != null){
+                    if(msReports.get(i).getEndLocal() == 1){
+                        msReports.get(i).setEndLocalOtherStr("武汉市");
+                    }else if(msReports.get(i).getEndLocal() == 2){
+                        msReports.get(i).setEndLocalOtherStr("宜昌市");
+                    }else if(msReports.get(i).getEndLocal() == 3){
+                        msReports.get(i).setEndLocalOtherStr("当阳市");
+                    }
+                }
+               if(msReports.get(i).getStartLocal() != null){
+                   if(msReports.get(i).getStartLocal() == 1){
+                       msReports.get(i).setStartLocalOtherStr("武汉市");
+                   }else if(msReports.get(i).getStartLocal() == 2){
+                       msReports.get(i).setStartLocalOtherStr("宜昌市");
+                   }else if(msReports.get(i).getStartLocal() == 3){
+                       msReports.get(i).setStartLocalOtherStr("当阳市");
+                   }
+               }
+
+            }
+        }
+
+        return msReports;
+    }
 }

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

@@ -185,6 +185,10 @@ public class MsReportController {
         Long userCreate = 1231543603566841858L;
         return Model.newSuccess(msReportService.getByReportReportDateTest(userCreate, parser.getMap()));
     }
+    @GetMapping("/whepi/home/queryRibaoTestxq")
+    public Model<List<MsSuspected>> queryRibaoTestxq( HttpParameterParser parser) {
+        return Model.newSuccess(msReportService.getByReportReportDateTestxq(parser.getMap()));
+    }
 
     //获取上报明细
     @GetMapping("/whepi/home/getRibaoDetail")

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 21 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/MsTripController.java


+ 48 - 0
whepi-web/src/main/resources/mapper/MsReport.xml

@@ -22,4 +22,52 @@
         </where>
         order by a.report_date desc
     </select>
+    <select id="selectByReportDateTestxq" resultType="com.bofeng.entity.MsSuspected">
+        select
+        a.suspected_id,
+        a.grender as grenderStr,
+        a.grender,
+        a.user_name,
+        a.age,
+        a.family_status as familyStatusStr,
+        a.family_status,
+        a.medical as medicalStr,
+        a.medical,
+        a.temperature,
+        a.cough as coughStr,
+        a.cough,
+        a.muscle as muscleStr,
+        a.muscle,
+        a.dyspnea as dyspneaStr,
+        a.dyspnea,
+        a.fatigue as fatigueStr,
+        a.fatigue,
+        a.diarrhea as diarrheaStr,
+        a.diarrhea,
+        a.others,
+        b.work_local,
+        b.work_local_other,
+        b.today_local,
+        b.today_local_other,
+        c.start_local,
+        c.start_local_other,
+        c.end_local,
+        c.end_local_other,
+        c.trip_type,
+        c.trip_type as tripTypeStr,
+        c.trip_type_desp,
+        b.is_trip,
+        b.is_trip as isTripStr
+        from ms_suspected a
+        inner join ms_trip b on a.suspected_id = b.trip_id
+        LEFT join ms_trip_det c on c.trip_id = b.trip_id
+        <where>
+            <if test="reportId!=null and reportId!=''">
+                a.report_id =#{reportId}
+            </if>
+            <if test="reportDate!=null and reportDate!=''">
+                and DATE_FORMAT(a.time_update,'%Y-%m-%d') =#{reportDate}
+            </if>
+        </where>
+    </select>
 </mapper>