Jelajahi Sumber

凌云集团更改公司

peiguo 5 tahun lalu
induk
melakukan
fd258dfa79

+ 6 - 4
admin-ui/app/whepi/lingyun/lingyunUser.js

@@ -146,7 +146,9 @@ define(function (require) {
                   },
                   {
                     text: '导出所有凌云上报', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      window.open(api('/lun/exportRiBao?date=' + date + "&unitId=" + unitId));
+                      var queryProperties = $form.formGet().queryProperties;
+                      var unitId = $form.formGet().unitId;
+                      window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId="+unitId));
                     }
                   },
                 ]
@@ -160,11 +162,11 @@ define(function (require) {
                 [
                   [
                     {field: 'userId', title: '用户ID', hidden: true},
-                    {field: 'linkman', title: '用户名', maxWidth: 200, align: 'left',},
-                    {field: 'dept', title: '部门名称', maxWidth: 200, align: 'left',},
+                    {field: 'linkman', title: '名', maxWidth: 200, align: 'left',},
+                    {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {field: 'phone', title: '联系电话', maxWidth: 200, align: 'left',},
                     {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},
-                    {field: 'door', title: '病情表述', maxWidth: 200, align: 'left',},
+                    {field: 'bingqingDesc', title: '病情表述', maxWidth: 200, align: 'left',},
                   ]
                 ]
             }

+ 5 - 4
admin-ui/app/whepi/lingyun/lingyunUser2.js

@@ -128,7 +128,8 @@ define(function (require) {
                   },
                   {
                     text: '导出所有凌云上报', iconCls: 'fa fa-cloud-upload', onClick: function () {
-                      window.open(api('/lun/exportRiBao?date=' + date + "&unitId=" + unitId));
+                      var queryProperties = $form.formGet().queryProperties;
+                      window.open(api('/sweepCode/exSelectLingyunUser?queryProperties='+queryProperties+"&unitId=0"));
                     }
                   },
                 ]
@@ -142,11 +143,11 @@ define(function (require) {
                 [
                   [
                     {field: 'userId', title: '用户ID', hidden: true},
-                    {field: 'linkman', title: '用户名', maxWidth: 200, align: 'left',},
-                    {field: 'dept', title: '部门名称', maxWidth: 200, align: 'left',},
+                    {field: 'linkman', title: '名', maxWidth: 200, align: 'left',},
+                    {field: 'loudong', title: '部门名称', maxWidth: 200, align: 'left',},
                     {field: 'phone', title: '联系电话', maxWidth: 200, align: 'left',},
                     {field: 'doorplate', title: '工号', maxWidth: 200, align: 'left',},
-                    {field: 'door', title: '病情表述', maxWidth: 200, align: 'left',},
+                    {field: 'bingqingDesc', title: '病情表述', maxWidth: 200, align: 'left',},
                   ]
                 ]
             }

+ 5 - 0
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -3,6 +3,7 @@ package com.bofeng.dao;
 import com.baomidou.mybatisplus.mapper.BaseMapper;
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.bofeng.entity.*;
+import com.yvan.PageDb;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
@@ -95,6 +96,10 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
 
     List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date, @Param("unitId") Long unitId);
 
+    List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam);
+
+    List<ExcelRiBaoLYBM4> exSelectLingyunUserPage(PageDb pagination, Map<String, Object> queryParam);
+
     @Select(
             "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,\n" +
                     "msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum, \n" +

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

@@ -0,0 +1,264 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.google.common.base.Strings;
+import com.yvan.platform.Conv;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+@Getter
+@Setter
+public class ExcelRiBaoLYBM4 {
+
+    private String ridgepole = "";
+    private String unit = "";
+    private String doorplate = "";
+    private BigDecimal temperature = new BigDecimal(0);
+    private int grender = 0;
+    private String familyStatus = "0,0,0,0,0,0,0";
+    private int medical = 0;
+    private int cough = 0;
+    private int muscle = 0;
+    private int dyspnea = 0;
+    private int fatigue = 0;
+    private int diarrhea = 0;
+    private int singleRoom = 0;
+    private int scoreRezult = 0;
+    private int safetyNum = 0;
+    private int reportStatus = 0;
+    private int sureNum = 0;
+    private int singleNum = 0;
+    private int suspectedNum = 0;
+    private int normalNum = 0;
+    private String statusDesp = "";
+    private String others = "";
+    private Long tripId = 0L;
+    private int workLocal = 0;
+    private String workLocalOther = "";
+    private int todayLocal = 0;
+    private String todayLocalOther = "";
+    private int isTrip = 0;
+
+
+    @ExcelProperty(value = "部门名称", index = 1)
+    private String loudong = "";
+
+    public String getLoudong() {
+        if (loudong.length() <= 0) {
+            loudong = ridgepole + unit;
+        }
+        return loudong;
+    }
+
+    @ExcelProperty(value = "工号", index = 3)
+    private String fanghao = "";
+
+    public String getFanghao() {
+        if (fanghao.length() <= 0) {
+            fanghao = doorplate;
+        }
+        return fanghao;
+    }
+
+    @ExcelProperty(value = "姓名", index = 0)
+    private String linkman;
+
+    @ExcelProperty(value = "联系电话", index = 2)
+    private String phone; String safetyNumStr = "";
+
+    public String getSafetyNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        safetyNumStr = "" + safetyNum;
+
+        return safetyNumStr;
+    }
+
+    private String sureNumStr;
+
+    public String getSureNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        sureNumStr = "" + sureNum;
+
+        return sureNumStr;
+    }
+
+    private String singleNumStr;
+
+    public String getSingleNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        singleNumStr = "" + singleNum;
+
+        return singleNumStr;
+    }
+
+    private String suspectedNumStr;
+
+    public String getSuspectedNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        suspectedNumStr = "" + suspectedNum;
+
+        return suspectedNumStr;
+    }
+
+    private String normalNumStr;
+
+    public String getNormalNumStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        normalNumStr = "" + normalNum;
+
+        return normalNumStr;
+    }
+
+    private String userName;
+
+
+    private String temperatureStr;
+
+    public String getTemperatureStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        temperatureStr = temperature.floatValue() > 10 ? temperature + "" : "未填报";
+        return temperatureStr;
+    }
+
+    private String medicalStr;
+
+    public String getMedicalStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (medical == 0) {
+            medicalStr = "无";
+        } else if (medical == 1) {
+            medicalStr = "确诊";
+        } else if (medical == 2) {
+            medicalStr = "疑似";
+        } else if (medical == 3) {
+            medicalStr = "有接触史";
+        } else if (medical == 4) {
+            medicalStr = "解除隔离";
+        }
+        return medicalStr;
+    }
+
+    private String singleRoomStr;
+
+    public String getSingleRoomStr() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (singleRoom == 0) {
+            singleRoomStr = "否";
+        } else {
+            singleRoomStr = "是";
+        }
+        return singleRoomStr;
+    }
+
+    private String baseDesc = "";
+
+    public String getBaseDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (Conv.NI(familyStatus.split(",")[0]) == 1) {
+            baseDesc += "心血管疾病(服用ARB),";
+        } else if (Conv.NI(familyStatus.split(",")[1]) == 1) {
+            baseDesc += "心血管疾病(未服用ARB),";
+        }
+        if (Conv.NI(familyStatus.split(",")[2]) == 1) {
+            baseDesc += "呼吸系统病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[3]) == 1) {
+            baseDesc += "肿瘤病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[4]) == 1) {
+            baseDesc += "糖尿病史,";
+        }
+        if (Conv.NI(familyStatus.split(",")[5]) == 1) {
+            baseDesc += "服用过激素药物,";
+        }
+        if (Conv.NI(familyStatus.split(",")[6]) == 1) {
+            baseDesc += "妊娠期";
+        }
+        return baseDesc;
+    }
+
+    @ExcelProperty(value = "病情描述", index = 4)
+    private String bingqingDesc = "";
+
+    public String getBingqingDesc() {
+        if (reportStatus == 0) {
+            return "未填报";
+        }
+        if (medical == 1) {
+            bingqingDesc += "已确诊、";
+        }
+
+        if (singleRoom == 1) {
+            bingqingDesc += "单间隔离、";
+        }
+
+        bingqingDesc = bingqingDesc + "体温:" + temperatureStr + "、";
+
+        if (cough == 1) {
+            bingqingDesc += "偶尔短暂咳嗽、";
+        } else if (cough == 2) {
+            bingqingDesc += "咳嗽轻度影响生活、";
+        } else if (cough == 3) {
+            bingqingDesc += "咳嗽严重影响生活、";
+        }
+        if (muscle == 1) {
+            bingqingDesc += "肌肉按压有酸痛、";
+        } else if (muscle == 2) {
+            bingqingDesc += "偶尔肌肉按压酸痛、";
+        } else if (muscle == 3) {
+            bingqingDesc += "肌肉按压持续酸痛、";
+        }
+        if (dyspnea == 1) {
+            bingqingDesc += "呼吸急走或上坡气短、";
+        } else if (dyspnea == 2) {
+            bingqingDesc += "呼吸气短而走路变慢、";
+        } else if (dyspnea == 3) {
+            bingqingDesc += "呼吸走路数分钟后气短、";
+        } else if (dyspnea == 4) {
+            bingqingDesc += "呼吸气短无法离开房间、";
+        }
+        if (fatigue == 1) {
+            bingqingDesc += "可体力劳动但觉得累、";
+        } else if (fatigue == 2) {
+            bingqingDesc += "轻体力劳动后长时间不能恢复、";
+        } else if (fatigue == 3) {
+            bingqingDesc += "不能正常生活、";
+        }
+        if (diarrhea == 1) {
+            bingqingDesc += "轻度腹泻少于于3次、";
+        } else if (diarrhea == 2) {
+            bingqingDesc += "中度腹泻4-6次、";
+        } else if (diarrhea == 3) {
+            bingqingDesc += "重度腹泻超过6次、";
+        }
+
+        if (!Strings.isNullOrEmpty(statusDesp)) {
+            bingqingDesc += statusDesp;
+            bingqingDesc += "、";
+        }
+        if (!Strings.isNullOrEmpty(others)) {
+            bingqingDesc += others;
+        }
+        return bingqingDesc;
+    }
+}

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

@@ -3,7 +3,9 @@ package com.bofeng.service;
 
 import com.bofeng.JwtHelper;
 import com.bofeng.dao.OutScanEstateMapper;
+import com.bofeng.dao.RbMapper;
 import com.bofeng.dao.SweepCodeMapper;
+import com.bofeng.entity.ExcelRiBaoLYBM4;
 import com.bofeng.entity.OutScanEstate;
 import com.bofeng.entity.SysUptownHouse;
 import com.yvan.PageDb;
@@ -22,6 +24,8 @@ public class SweepCodeService {
     private SweepCodeMapper sweepCodeMapper;
     @Autowired
     private OutScanEstateMapper outScanEstateMapper;
+    @Autowired
+    private RbMapper rbMapper;
 
 
     public List<SysUptownHouse> selectCode(PageDb pageDb, Map<String, Object> queryParam) {
@@ -30,13 +34,33 @@ public class SweepCodeService {
     }
 
 
-    public List<SysUptownHouse> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) {
+//    public List<SysUptownHouse> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) {
+//        Long userId = JwtHelper.getUserId();
+//        if (userId > 7000 && userId < 8000) {
+//            queryParam.put("unitId", userId);
+//        }
+//        queryParam.put("uptownId", 1238790987234L);
+//        List<SysUptownHouse> sysUptownHouses = sweepCodeMapper.selectLingyunUser(pageDb,queryParam);
+//        return sysUptownHouses;
+//    }
+
+    public List<ExcelRiBaoLYBM4> selectLingyunUser(PageDb pageDb, Map<String, Object> queryParam) {
+        Long userId = JwtHelper.getUserId();
+        if (userId > 7000 && userId < 8000) {
+            queryParam.put("unitId", userId);
+        }
+        queryParam.put("uptownId", 1238790987234L);
+        List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUserPage(pageDb,queryParam);
+        return sysUptownHouses;
+    }
+
+    public List<ExcelRiBaoLYBM4> exSelectLingyunUser(Map<String, Object> queryParam) {
         Long userId = JwtHelper.getUserId();
         if (userId > 7000 && userId < 8000) {
             queryParam.put("unitId", userId);
         }
         queryParam.put("uptownId", 1238790987234L);
-        List<SysUptownHouse> sysUptownHouses = sweepCodeMapper.selectLingyunUser(pageDb,queryParam);
+        List<ExcelRiBaoLYBM4> sysUptownHouses = rbMapper.exSelectLingyunUser(queryParam);
         return sysUptownHouses;
     }
 

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

@@ -2,6 +2,7 @@ package com.bofeng.wx.controller;
 
 import cn.afterturn.easypoi.cache.manager.IFileLoader;
 import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.JwtHelper;
 import com.bofeng.dao.*;
 import com.bofeng.entity.*;
 import com.bofeng.excel.ExcelUtils;
@@ -39,7 +40,9 @@ 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;
 
 @Api("进出扫码后台信息")
 @RestController
@@ -60,6 +63,8 @@ public class ScanAdminController {
     private UptownHomeMapper uptownHomeMapper;
     @Autowired
     private UptownUnitMapper uptownUnitMapper;
+    @Autowired
+    private RbMapper rbMapper;
 
     @ApiOperation("出入查询")
     @PostMapping("/whepi/sweepCode/selectCode")
@@ -71,12 +76,25 @@ public class ScanAdminController {
 
     @ApiOperation("凌云用户管理")
     @PostMapping("/whepi/sweepCode/selectLingyunUser")
-    public Model<List<SysUptownHouse>> selectLingyunUser(PageDb pageDb,HttpParameterParser parser) {
+    public Model<List<ExcelRiBaoLYBM4>> selectLingyunUser(PageDb pageDb,HttpParameterParser parser) {
 //        HttpServletResponse response,HttpServletRequest request
-        List<SysUptownHouse> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap());
+        List<ExcelRiBaoLYBM4> sysUptownHouses = sweepCodeService.selectLingyunUser(pageDb,parser.getMap());
         return Model.newSuccess(pageDb,sysUptownHouses);
     }
 
+    @ApiOperation("凌云用户管理导出")
+    @GetMapping("/whepi/sweepCode/exSelectLingyunUser")
+    @SneakyThrows
+    public void exSelectLingyunUser(HttpParameterParser parser,HttpServletResponse resp,@Pd(name = "queryProperties", required = false, defaultValue = "") String queryProperties,
+                                    @Pd(name = "unitId", required = false, defaultValue = "0") Long unitId) {
+        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+        Map<String, Object> map = new HashMap<>();
+        map.put("queryProperties", queryProperties);
+        map.put("unitId", unitId);
+        List<ExcelRiBaoLYBM4> list = sweepCodeService.exSelectLingyunUser(map);
+        ExcelUtils.writeSheet(ExcelRiBaoLYBM4.class, list).export(resp, "上报信息-" + sdf.format(new Date()));
+    }
+
     @ApiOperation("导出")
     @PostMapping("/whepi/sweepCode/export")
     @SneakyThrows

+ 44 - 0
whepi-web/src/main/resources/mapper/RbMapper.xml

@@ -21,4 +21,48 @@
         order by suu.unit_id asc,suho.linkman
     </select>
 
+    <select id="exSelectLingyunUser" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
+        select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult
+        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}
+        left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = curdate()
+        left join ms_suspected mss on mss.report_id=msr.report_id
+        <where>
+            <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
+                and suu.unit_id=#{unitId}
+            </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                and (suho.linkman like concat('%',#{queryProperties},'%')
+                or suho.phone like concat('%',#{queryProperties},'%'))
+            </if>
+        </where>
+        order by suu.unit_id asc,suho.linkman
+    </select>
+
+    <select id="exSelectLingyunUserPage" resultType="com.bofeng.entity.ExcelRiBaoLYBM4">
+        select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum, msr.report_status as reportStatus,
+        msr.sure_num as sureNum,msr.suspected_num as suspectedNum,msr.normal_num as normalNum,
+        msr.single_num as singleNum,mss.user_name as userName,mss.grender, mss.age,mss.family_status as familyStatus,
+        mss.medical,mss.temperature,mss.cough,mss.muscle ,mss.dyspnea,mss.fatigue,mss.diarrhea,mss.single_room as singleRoom,mss.score_rezult
+        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}
+        left join ms_report msr on msr.house_id = suh.house_id and msr.report_date = curdate()
+        left join ms_suspected mss on mss.report_id=msr.report_id
+        <where>
+            <if test="unitId!=null and uptownId!='' and unitId!= '0'.toString()">
+                and suu.unit_id=#{unitId}
+            </if>
+            <if test="queryProperties != null and queryProperties != ''">
+                and (suho.linkman like concat('%',#{queryProperties},'%')
+                or suho.phone like concat('%',#{queryProperties},'%'))
+            </if>
+        </where>
+        order by suu.unit_id asc,suho.linkman
+    </select>
+
 </mapper>