浏览代码

PC端增加提交疫苗接种信息

peiguo 3 年之前
父节点
当前提交
af732b411d

+ 55 - 0
admin-ui/app/whepi/lingyun/dialogVaccine.js

@@ -0,0 +1,55 @@
+define(function (require) {
+    return function (context) {
+
+        var $dlg, $grid;
+
+        function queryGrid1() {
+            $grid.reload({
+                mtype: 'GET',
+                url: api('/sweepCode/selectVaccineByUserId'),
+                queryParams: {userId: context.userId}
+            }, true);
+        }
+
+        return {
+            xtype: 'dialog',
+            dialogId: 'dialogDetail',
+            title: '疫苗接种记录 >> ' + context.linkman,
+            width: '45%',
+            height: '50%',
+            onOpen: function () {
+                $dlg = $(this);
+            },
+            center: {
+                items: {
+                    onRender: function () {
+                        $grid = $(this);
+                        queryGrid1();
+                    },
+                    toolbar: {
+                        xtype: 'toolbar',
+                        title: '疫苗接种',
+                    },
+                    xtype: 'grid',
+                    idField: "reportDate",
+                    pagination: false,
+                    columns: [[
+                        {field: 'num', title: 'num', hidden: true},
+                        {field: 'times', title: '剂次', maxWidth: 150, align: 'right',},
+                        {field: 'time', title: '接种日期', align: 'left', formatter: 'tsymd'},
+                        {field: 'hospital', title: '接种医院', maxWidth: 200, align: 'right',},
+                        {field: 'unit', title: '接种单位', maxWidth: 200, align: 'right',},
+                    ]],
+                }
+            },
+            buttons: [
+                {
+                    text: "关闭", iconCls: "fa fa-times", onClick: function () {
+                        // $dlg.dialog('close');
+                        $dlg.window('close');
+                    }
+                }
+            ]
+        };
+    };
+});

+ 79 - 20
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -237,34 +237,68 @@ define(function (require) {
                 xtype: 'toolbar',
                 title: '用户列表',
                 items: [
+                  // {
+                  //   text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyReports?userId=' + ids));
+                  //   }
+                  // },
+                  // {
+                  //   text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyApproves?userId=' + ids));
+                  //   }
+                  // },
                   {
-                    text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '查看人员接种记录', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if ( row.inoculateStatus.indexOf("是") < 0) {
+                        $.yvan.msg('该员工没有接种新冠疫苗');
+                        return
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyReports?userId=' + ids));
+                      $.yvan.showDialog(this,
+                          require('/app/whepi/lingyun/dialogVaccine.js')({
+                            userId: row.userId,
+                            linkman: row.linkman,
+                            confirm: function () {
+                            }
+                          })
+                      );
                     }
                   },
                   {
-                    text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '导出接种明细', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                      var unitId = $form.formGet().unitId;
+                      var departmentId = $form.formGet().departmentId;
+                      if (unitId == null || unitId == "") {
+                        unitId = 0
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if (departmentId == null || departmentId == "") {
+                        departmentId = 0
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyApproves?userId=' + ids));
+                      window.open(api('/sweepCode/exSelectVaccine?unitId='+unitId+'&departmentId='+departmentId));
                     }
                   },
                   {
@@ -344,6 +378,31 @@ define(function (require) {
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
+                      field: 'inoculateStatus', title: '是否接种新冠疫苗', maxWidth: 130, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>是<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>否<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {field: 'reason', title: '未接种原因', maxWidth: 200, align: 'left',},
+                    {
+                      field: 'vaccineType', title: '接种疫苗类别', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span>腺病毒疫苗<span>";
+                        } else if (value == 2) {
+                          return "<span>灭活疫苗<span>";
+                        } else if (value == 3) {
+                          return "<span>重组亚单位疫苗<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {
                       field: 'living', title: '居家2公里', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {
                           return "<span style='color: green;'>是<span>";

+ 80 - 20
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -216,34 +216,69 @@ define(function (require) {
                 xtype: 'toolbar',
                 title: '用户列表',
                 items: [
+                  // {
+                  //   text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyReports?userId=' + ids));
+                  //   }
+                  // },
+                  // {
+                  //   text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyApproves?userId=' + ids));
+                  //   }
+                  // },
                   {
-                    text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '查看人员接种记录', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if ( row.inoculateStatus.indexOf("是") < 0) {
+                        $.yvan.msg('该员工没有接种新冠疫苗');
+                        return
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyReports?userId=' + ids));
+                      $.yvan.showDialog(this,
+                          require('/app/whepi/lingyun/dialogVaccine.js')({
+                            userId: row.userId,
+                            linkman: row.linkman,
+                            confirm: function () {
+                              // $grid2.reload();
+                            }
+                          })
+                      );
                     }
                   },
                   {
-                    text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '导出接种明细', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                      var unitId = $form.formGet().unitId;
+                      var departmentId = $form.formGet().departmentId;
+                      if (unitId == null || unitId == "") {
+                        unitId = 0
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if (departmentId == null || departmentId == "") {
+                        departmentId = 0
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyApproves?userId=' + ids));
+                      window.open(api('/sweepCode/exSelectVaccine?unitId='+unitId+'&departmentId='+departmentId));
                     }
                   },
                   {
@@ -320,6 +355,31 @@ define(function (require) {
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
+                      field: 'inoculateStatus', title: '是否接种新冠疫苗', maxWidth: 130, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>是<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>否<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {field: 'reason', title: '未接种原因', maxWidth: 200, align: 'left',},
+                    {
+                      field: 'vaccineType', title: '接种疫苗类别', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span>腺病毒疫苗<span>";
+                        } else if (value == 2) {
+                          return "<span>灭活疫苗<span>";
+                        } else if (value == 3) {
+                          return "<span>重组亚单位疫苗<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {
                       field: 'living', title: '居家2公里', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {
                           return "<span style='color: green;'>是<span>";

+ 80 - 20
admin-ui/app/whepi/lingyun/lingyunUser7.js

@@ -237,34 +237,69 @@ define(function (require) {
                 xtype: 'toolbar',
                 title: '用户列表',
                 items: [
+                  // {
+                  //   text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyReports?userId=' + ids));
+                  //   }
+                  // },
+                  // {
+                  //   text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                  //     var row = $grid1.checkedData();
+                  //     if (row.length == 0) {
+                  //       $.yvan.msg('请至少选择一行数据');
+                  //       return;
+                  //     }
+                  //     var ids = "";
+                  //     for (var i = 0; i < row.length; i++) {
+                  //       ids += row[i].userId + ","
+                  //     }
+                  //     ids=ids.substring(0,ids.length-1);
+                  //     window.open(api('/export/lyApproves?userId=' + ids));
+                  //   }
+                  // },
                   {
-                    text: '生成健康及旅居申请表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '查看人员接种记录', iconCls: 'fa fa-search', onClick: function () {
+                      var row = $grid1.rowData();
+                      if ( row == null || row == undefined || row.userId == null || row.userId == "") {
+                        $.yvan.msg('请选择数据');
+                        return
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if ( row.inoculateStatus.indexOf("是") < 0) {
+                        $.yvan.msg('该员工没有接种新冠疫苗');
+                        return
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyReports?userId=' + ids));
+                      $.yvan.showDialog(this,
+                          require('/app/whepi/lingyun/dialogVaccine.js')({
+                            userId: row.userId,
+                            linkman: row.linkman,
+                            confirm: function () {
+                              // $grid2.reload();
+                            }
+                          })
+                      );
                     }
                   },
                   {
-                    text: '生成隔离人员解除隔离审批表', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      var row = $grid1.checkedData();
-                      if (row.length == 0) {
-                        $.yvan.msg('请至少选择一行数据');
-                        return;
+                    text: '导出接种明细', iconCls: 'fa fa-cloud-upload', onClick: function () {
+                      var unitId = $form.formGet().unitId;
+                      var departmentId = $form.formGet().departmentId;
+                      if (unitId == null || unitId == "") {
+                        unitId = 0
                       }
-                      var ids = "";
-                      for (var i = 0; i < row.length; i++) {
-                        ids += row[i].userId + ","
+                      if (departmentId == null || departmentId == "") {
+                        departmentId = 0
                       }
-                      ids=ids.substring(0,ids.length-1);
-                      window.open(api('/export/lyApproves?userId=' + ids));
+                      window.open(api('/sweepCode/exSelectVaccine?unitId='+unitId+'&departmentId='+departmentId));
                     }
                   },
                   {
@@ -341,6 +376,31 @@ define(function (require) {
                     {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {field: 'departmentName', title: '二级部门', maxWidth: 200, align: 'left',},
                     {
+                      field: 'inoculateStatus', title: '是否接种新冠疫苗', maxWidth: 130, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span style='color: green;'>是<span>";
+                        } else if (value == 0) {
+                          return "<span style='color: red;'>否<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {field: 'reason', title: '未接种原因', maxWidth: 200, align: 'left',},
+                    {
+                      field: 'vaccineType', title: '接种疫苗类别', maxWidth: 100, align: 'center', formatter: function (value) {
+                        if (value == 1) {
+                          return "<span>腺病毒疫苗<span>";
+                        } else if (value == 2) {
+                          return "<span>灭活疫苗<span>";
+                        } else if (value == 3) {
+                          return "<span>重组亚单位疫苗<span>";
+                        } else {
+                          return "";
+                        }
+                      }
+                    },
+                    {
                       field: 'living', title: '居家2公里', maxWidth: 100, align: 'center', formatter: function (value) {
                         if (value == 1) {
                           return "<span style='color: green;'>是<span>";

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

@@ -701,7 +701,7 @@
                     </div>
                     <div class="weui-loadmore weui-loadmore_line inoculate_yes"
                          style="margin: 20px 0 0 0;width: 100%;height: 20px">
-                        <span class="weui-loadmore__tips">第一剂</span>
+                        <span class="weui-loadmore__tips">接种第一剂</span>
                     </div>
                     <div class="inoculate_time_view"
                          style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
@@ -720,9 +720,18 @@
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                     </div>
+                    <div class="inoculate_unit_view"
+                         style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                        <div style="color: gray;height: 30px;line-height: 30px; width: 35%;">接种单位</div>
+                        <input id="first_unit" class="weui-input" autofocus="" type="text"
+                               <#if vaccine?? && vaccine.firstUnit??>value="${vaccine.firstUnit}"</#if>
+                               placeholder="请选择"
+                               maxlength="20"
+                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
+                    </div>
                     <div class="weui-loadmore weui-loadmore_line inoculate_yes"
                          style="margin: 20px 0 0 0;width: 100%;height: 20px">
-                        <span class="weui-loadmore__tips">第二剂</span>
+                        <span class="weui-loadmore__tips">接种第二剂</span>
                     </div>
                     <div class="inoculate_time_view"
                          style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
@@ -741,9 +750,18 @@
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                     </div>
+                    <div class="inoculate_unit_view"
+                         style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                        <div style="color: gray;height: 30px;line-height: 30px; width: 35%;">接种单位</div>
+                        <input id="second_unit" class="weui-input" autofocus="" type="text"
+                               <#if vaccine?? && vaccine.secondUnit??>value="${vaccine.secondUnit}"</#if>
+                               placeholder="请选择"
+                               maxlength="20"
+                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
+                    </div>
                     <div class="weui-loadmore weui-loadmore_line inoculate_yes"
                          style="margin: 20px 0 0 0;width: 100%;height: 20px">
-                        <span class="weui-loadmore__tips">第三剂</span>
+                        <span class="weui-loadmore__tips">接种第三剂</span>
                     </div>
                     <div class="inoculate_time_view"
                          style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
@@ -762,6 +780,15 @@
                                maxlength="20"
                                style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
                     </div>
+                    <div class="inoculate_unit_view"
+                         style="display:flex; display: -webkit-flex;flex-direction: row; -webkit-flex-direction: row;justify-content: space-between; -webkit-justify-content: space-between;margin-top: 5px;">
+                        <div style="color: gray;height: 30px;line-height: 30px; width: 35%;">接种单位</div>
+                        <input id="third_unit" class="weui-input" autofocus="" type="text"
+                               <#if vaccine?? && vaccine.thirdUnit??>value="${vaccine.thirdUnit}"</#if>
+                               placeholder="请选择"
+                               maxlength="20"
+                               style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 30px;"/>
+                    </div>
                 </div>
                 <div class="weui-loadmore weui-loadmore_line inoculate_yes"
                      style="margin: 20px 0 0 0;width: 100%;height: 20px">

+ 14 - 3
whepi-ui/templates/home/ribao.js

@@ -2890,11 +2890,14 @@ function inoculateVacc() {
         }
         $("#vaccine_type").val("");
         $("#first_time").val(new Date().format("yyyy-MM-dd") + ' ');
-        $("#firstHospital").val("");
+        $("#first_hospital").val("");
+        $("#first_unit").val("");
         $("#second_time").val(new Date().format("yyyy-MM-dd") + ' ');
-        $("#secondHospital").val("");
+        $("#second_hospital").val("");
+        $("#second_unit").val("");
         $("#third_time").val(new Date().format("yyyy-MM-dd") + ' ');
-        $("#thirdHospital").val("");
+        $("#third_hospital").val("");
+        $("#third_unit").val("");
     } else if (inoculateStatus == 1) {
         let vaccineType = $("#vaccine_type").val();
         if (!vaccineType || vaccineType == "") {
@@ -2910,10 +2913,18 @@ function inoculateVacc() {
         }
         date.firstTime = $("#first_time").val();
         date.firstHospital = $("#first_hospital").val().trim();
+        date.firstUnit = $("#first_unit").val().trim();
         date.secondTime = $("#second_time").val();
         date.secondHospital = $("#second_hospital").val().trim();
+        date.secondUnit = $("#second_unit").val().trim();
         date.thirdTime = $("#third_time").val();
         date.thirdHospital = $("#third_hospital").val().trim();
+        date.thirdUnit = $("#third_unit").val().trim();
+        if (date.firstHospital.length > 50 || date.firstUnit.length > 50 || date.secondHospital.length > 50 || date.secondUnit.length > 50
+            || date.thirdHospital.length > 50 || date.thirdUnit.length > 50) {
+            $.alert("输入文本不能超过50字")
+            return;
+        }
         $("#reason").val("");
     } else {
         $.alert("请选择是否接种新冠疫苗")

+ 9 - 0
whepi-web/src/main/java/com/bofeng/dao/VaccineMapper.java

@@ -2,13 +2,22 @@ package com.bofeng.dao;
 
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.bofeng.entity.Vaccine;
+import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
+import java.util.List;
+import java.util.Map;
+
 @Mapper
 public interface VaccineMapper extends BaseMapper<Vaccine> {
 
     @Select("select * from ms_vaccine where user_id = #{userId}")
     Vaccine selectByUserId(@Param("userId") Long userId);
+
+    @Select("select * from ms_vaccine where user_id = #{userId}")
+    List<Vaccine> selectVaccineByUserId(PageDb pageDb, Map<String, Object> map);
+
+    List<Vaccine> exSelectVaccine(Map<String, Object> map);
 }

+ 33 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLYBM4.java

@@ -63,6 +63,39 @@ public class ExcelRiBaoLYBM4 {
     @ExcelProperty(value = {"二级部门"}, index = 2)
     private String departmentName;
 
+    private Integer inoculateStatus;
+    private Integer vaccineType;
+    @ExcelProperty(value = "是否接种新冠疫苗", index = 16)
+    private String inoculateStatusStr = "";
+
+    public String getInoculateStatusStr() {
+        if (inoculateStatus == null) {
+            inoculateStatusStr = "";
+        } else if (inoculateStatus == 1) {
+            inoculateStatusStr = "是";
+        } else if (inoculateStatus == 2) {
+            inoculateStatusStr = "否";
+        }
+        return inoculateStatusStr;
+    }
+    @ExcelProperty(value = "未接种原因", index = 15)
+    private String reason;
+    @ExcelProperty(value = "接种疫苗类别", index = 17)
+    private String vaccineTypeStr;
+
+    public String getVaccineTypeStr() {
+        if (vaccineType == null) {
+            vaccineTypeStr = "";
+        } else if (vaccineType == 1) {
+            vaccineTypeStr = "腺病毒疫苗";
+        } else if (vaccineType == 2) {
+            vaccineTypeStr = "灭活疫苗";
+        } else if (vaccineType == 3) {
+            vaccineTypeStr = "重组亚单位疫苗";
+        }
+        return vaccineTypeStr;
+    }
+
     @ExcelProperty(value = "今日复工", index = 3)
     private String returnWorkMsg;
 

+ 91 - 0
whepi-web/src/main/java/com/bofeng/entity/Vaccine.java

@@ -1,5 +1,6 @@
 package com.bofeng.entity;
 
+import com.alibaba.excel.annotation.ExcelProperty;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
@@ -37,6 +38,7 @@ public class Vaccine {
     /**
      * 未接种原因
      */
+    @ExcelProperty(value = "未接种原因", index = 6)
     @TableField("reason")
     private String reason;
 
@@ -49,10 +51,18 @@ public class Vaccine {
     /**
      * 第一剂接种医院
      */
+    @ExcelProperty(value = "第一剂接种医院", index = 9)
     @TableField("first_hospital")
     private String firstHospital;
 
     /**
+     * 第一剂接种单位
+     */
+    @ExcelProperty(value = "第一剂接种单位", index = 10)
+    @TableField("first_unit")
+    private String firstUnit;
+
+    /**
      * 第二剂接种日期
      */
     @TableField("second_time")
@@ -61,10 +71,18 @@ public class Vaccine {
     /**
      * 第二剂接种医院
      */
+    @ExcelProperty(value = "第二剂接种医院", index = 12)
     @TableField("second_hospital")
     private String secondHospital;
 
     /**
+     * 第二剂接种单位
+     */
+    @ExcelProperty(value = "第二剂接种单位", index = 13)
+    @TableField("second_unit")
+    private String secondUnit;
+
+    /**
      * 第三剂接种日期
      */
     @TableField("third_time")
@@ -73,10 +91,18 @@ public class Vaccine {
     /**
      * 第三剂接种医院
      */
+    @ExcelProperty(value = "第三剂接种医院", index = 15)
     @TableField("third_hospital")
     private String thirdHospital;
 
     /**
+     * 第三剂接种单位
+     */
+    @ExcelProperty(value = "第二剂接种单位", index = 16)
+    @TableField("third_unit")
+    private String thirdUnit;
+
+    /**
      * 新增时间
      */
     @TableField("time_create")
@@ -87,4 +113,69 @@ public class Vaccine {
      */
     @TableField("time_update")
     private Date timeUpdate;
+
+    @ExcelProperty(value = "姓名", index = 0)
+    @TableField(exist = false)
+    private String userName;
+
+    @ExcelProperty(value = "部门名称", index = 1)
+    @TableField(exist = false)
+    private String unit;
+
+    @ExcelProperty(value = "二级部门", index = 2)
+    @TableField(exist = false)
+    private String departmentName;
+
+    @ExcelProperty(value = "联系电话", index = 3)
+    @TableField(exist = false)
+    private String phone;
+
+    @ExcelProperty(value = "工号", index = 4)
+    @TableField(exist = false)
+    private String doorplate;
+
+    @ExcelProperty(value = "是否接种新冠疫苗", index = 5)
+    @TableField(exist = false)
+    private String inoculateStatusStr;
+
+    public String getInoculateStatusStr() {
+        if (inoculateStatus == null) {
+            inoculateStatusStr = "";
+        } else if (inoculateStatus == 1) {
+            inoculateStatusStr = "是";
+        } else if (inoculateStatus == 2) {
+            inoculateStatusStr = "否";
+        }
+        return inoculateStatusStr;
+    }
+
+    @ExcelProperty(value = "接种疫苗类别", index = 7)
+    @TableField(exist = false)
+    private String vaccineTypeStr;
+
+    public String getVaccineTypeStr() {
+        if (vaccineType == null) {
+            vaccineTypeStr = "";
+        } else if (vaccineType == 1) {
+            vaccineTypeStr = "腺病毒疫苗";
+        } else if (vaccineType == 2) {
+            vaccineTypeStr = "灭活疫苗";
+        } else if (vaccineType == 3) {
+            vaccineTypeStr = "重组亚单位疫苗";
+        }
+        return vaccineTypeStr;
+    }
+
+    @ExcelProperty(value = "第一剂接种日期", index = 8)
+    @TableField(exist = false)
+    private String firstTimeStr;
+
+    @ExcelProperty(value = "第二剂接种日期", index = 11)
+    @TableField(exist = false)
+    private String secondTimeStr;
+
+    @ExcelProperty(value = "第三剂接种日期", index = 14)
+    @TableField(exist = false)
+    private String thirdTimeStr;
+
 }

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

@@ -798,10 +798,13 @@ public class MsReportService {
             vaccine.setVaccineType(0);
             vaccine.setFirstTime(null);
             vaccine.setFirstHospital("");
+            vaccine.setFirstUnit("");
             vaccine.setSecondTime(null);
             vaccine.setSecondHospital("");
+            vaccine.setSecondUnit("");
             vaccine.setThirdTime(null);
             vaccine.setThirdHospital("");
+            vaccine.setFirstUnit("");
         } else if (vaccine.getInoculateStatus() == 1) {
             vaccine.setReason("");
         }

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

@@ -38,6 +38,8 @@ public class SweepCodeService {
     private ScanService scanService;
     @Autowired
     private MsReportMapper msReportMapper;
+    @Autowired
+    private VaccineMapper vaccineMapper;
 
     public List<SysUptownHouse> selectCode(PageDb pageDb, Map<String, Object> queryParam) {
         List<SysUptownHouse> sysUptownHouses = sweepCodeMapper.selectCode(pageDb,queryParam);
@@ -497,4 +499,10 @@ public class SweepCodeService {
     public List<MsReportLog> selectLogAddrHistory(PageDb pageDb, Long userId, String reportDate) {
         return msReportLogMapper.selectLogAddrHistory(pageDb, userId, reportDate);
     }
+
+    public List<Vaccine> exSelectVaccine(Map map, long uptownId, Long userId) {
+        map.put("uptownId", uptownId);
+        map.put("unitType", 7000); // 对应的sql查询中部门大于7000
+        return vaccineMapper.exSelectVaccine(map);
+    }
 }

+ 49 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/ScanAdminController.java

@@ -30,10 +30,7 @@ import java.io.IOException;
 import java.net.URLEncoder;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 @Api("进出扫码后台信息")
 @RestController
@@ -66,6 +63,8 @@ public class ScanAdminController {
     private ScanService scanService;
     @Autowired
     private ReturnWorkLyMapper returnWorkLyMapper;
+    @Autowired
+    private VaccineMapper vaccineMapper;
 
     @ApiOperation("出入查询")
     @PostMapping("/whepi/sweepCode/selectCode")
@@ -229,6 +228,52 @@ public class ScanAdminController {
         return Model.newSuccess(pageDb,sysUptownHouses);
     }
 
+    @ApiOperation("凌云疫苗接种查询")
+    @GetMapping("/whepi/sweepCode/selectVaccineByUserId")
+    public Model<List<Map>> selectVaccineByUserId(HttpParameterParser parser) {
+        Vaccine vaccine = vaccineMapper.selectByUserId(Long.parseLong(parser.getMap().get("userId").toString()));
+        List list = new ArrayList();
+        Map map1 = new HashMap();
+        Map map2 = new HashMap();
+        Map map3 = new HashMap();
+        map1.put("num", 1);
+        map1.put("times", "第一剂次");
+        map1.put("time", vaccine.getFirstTime());
+        map1.put("hospital", vaccine.getFirstHospital());
+        map1.put("unit", vaccine.getFirstUnit());
+        list.add(map1);
+        map2.put("num", 2);
+        map2.put("times", "第二剂次");
+        map2.put("time", vaccine.getSecondTime());
+        map2.put("hospital", vaccine.getSecondHospital());
+        map2.put("unit", vaccine.getSecondUnit());
+        list.add(map2);
+        map3.put("num", 3);
+        map3.put("times", "第三剂次");
+        map3.put("time", vaccine.getThirdTime());
+        map3.put("hospital", vaccine.getThirdHospital());
+        map3.put("unit", vaccine.getThirdUnit());
+        list.add(map3);
+        return Model.newSuccess(list);
+    }
+
+    @ApiOperation("凌云导出疫苗接种")
+    @GetMapping("/whepi/sweepCode/exSelectVaccine")
+    @SneakyThrows
+    public void exSelectVaccine(HttpParameterParser parser,HttpServletResponse resp,
+                                @Pd(name = "departmentId", required = false, defaultValue = "0") Long departmentId,
+                                @Pd(name = "unitId", required = false, defaultValue = "0") Long unitId) {
+        Map map = new HashMap();
+        map.put("departmentId", departmentId);
+        Long userId = JwtHelper.getUserId();
+        if (userId > 7000 && userId < 8000) {
+            unitId = userId;
+        }
+        map.put("unitId", unitId);
+        List<Vaccine> list = sweepCodeService.exSelectVaccine(map, 1238790987234L, userId);
+        ExcelUtils.writeSheet(Vaccine.class, list).export(resp,"凌云集团疫苗接种");
+    }
+
     @ApiOperation("凌云导出")
     @PostMapping("/whepi/sweepCode/exportLY")
     @SneakyThrows

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

@@ -35,7 +35,8 @@
         msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,op.old_open_id as oldOpenId,
         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
+        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,
+        v.inoculate_status as inoculateStatus,v.reason,v.vaccine_type as vaccineType
         from sys_uptown_house suh
         inner join sys_uptown_home suho on suho.house_id=suh.house_id
         INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
@@ -54,6 +55,7 @@
         INNER JOIN sys_user_role ur on ur.property_id = suho.house_id
         left JOIN sys_user_open op on op.user_id = ur.user_id
         left join sys_department de on de.department_id = suh.department_id
+        LEFT JOIN ms_vaccine v ON ur.user_id = v.user_id
         <where>
             <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
                 and suu.unit_id=#{unitId}
@@ -164,7 +166,8 @@
         msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,msr.ms_status as msStatus,op.old_open_id as oldOpenId,
         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,suh.house_id as houseId
+        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,suh.house_id as houseId,
+        v.inoculate_status as inoculateStatus,v.reason,v.vaccine_type as vaccineType
         from sys_uptown_house suh
         left join sys_uptown_home suho on suho.house_id=suh.house_id
         left JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id
@@ -183,6 +186,7 @@
         left JOIN sys_user_role ur on ur.property_id = suho.house_id
         left JOIN sys_user_open op on op.user_id = ur.user_id
         left join sys_department de on de.department_id = suh.department_id
+        left join ms_vaccine v on ur.user_id = v.user_id
         <where>
             <if test="uptownId != null and uptownId != ''">
                 and suu.uptown_id=#{uptownId}

+ 47 - 0
whepi-web/src/main/resources/mapper/VaccineMapper.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.bofeng.dao.VaccineMapper">
+
+    <select id="exSelectVaccine" resultType="com.bofeng.entity.Vaccine">
+        select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman as userName,suho.phone,de.department_name as departmentName,
+        ur.user_id as userId,ifnull(v.inoculate_status, 2) inoculate_status,v.reason,ifnull(v.vaccine_type, 0) vaccine_type,
+        v.first_time,v.first_hospital,v.second_time,v.second_hospital,v.third_time,v.third_hospital,v.first_unit,v.second_unit,v.third_unit,
+        DATE_FORMAT(v.first_time,"%Y-%m-%d") as firstTimeStr,
+        DATE_FORMAT(v.second_time,"%Y-%m-%d") as secondTimeStr,
+        DATE_FORMAT(v.third_time,"%Y-%m-%d") as thirdTimeStr
+        from sys_uptown_house suh
+        inner join sys_uptown_home suho on suho.house_id=suh.house_id
+        INNER JOIN sys_uptown_unit suu ON suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId}
+        <if test="unitType != null and unitType != ''">
+            and suu.unit_id > 7000
+        </if>
+        INNER JOIN sys_user_role ur on ur.property_id = suho.house_id
+        left JOIN sys_user_open op on op.user_id = ur.user_id
+        left join sys_department de on de.department_id = suh.department_id
+        LEFT JOIN ms_vaccine v ON ur.user_id = v.user_id
+        <where>
+            <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
+                and suu.unit_id=#{unitId}
+            </if>
+            <if test="uptownId != null and uptownId != ''">
+                and suu.uptown_id=#{uptownId}
+            </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                and (suho.linkman like concat('%',#{queryProperties},'%')
+                or suho.phone like concat('%',#{queryProperties},'%')
+                or suh.doorplate like concat('%',#{queryProperties},'%'))
+            </if>
+            <if test="departmentId != null and departmentId != ''">
+                and suh.department_id = #{departmentId}
+            </if>
+            <if test="isBand == '1'.toString()">
+                and (op.old_open_id is null or op.old_open_id = '')
+            </if>
+            <if test="isBand == '2'.toString()">
+                and op.old_open_id is not null and op.old_open_id != ''
+            </if>
+            and ur.role_id = 1
+        </where>
+        order by suu.unit_id asc,suho.linkman
+    </select>
+</mapper>