yuliang 5 anni fa
parent
commit
1ec478c3b8

+ 1 - 58
whepi-ui/templates/home/frag.foot.ftl

@@ -13,61 +13,4 @@
 <script src="${s3('/jquery-weui/1.2.1/js/jquery-weui.min.js')}"></script>
 <script src="${s3('/jquery-weui/1.2.1/js/jquery-weui.min.js')}"></script>
 <script src="${s3('/jquery-weui/1.2.1/js/swiper.min.js')}"></script>
 <script src="${s3('/jquery-weui/1.2.1/js/swiper.min.js')}"></script>
 <script src="${s3('/jquery-weui/1.2.1/js/city-picker.min.js')}"></script>
 <script src="${s3('/jquery-weui/1.2.1/js/city-picker.min.js')}"></script>
-<#--<script src="https://www.w3cways.com/demo/vconsole/vconsole.min.js?v=2.2.0"></script>-->
-<script>
-
-    Window.prototype.alert = function(){
-        //创建一个大盒子
-        var box = document.createElement("div");
-        //创建一个关闭按钮
-        var button = document.createElement("button");
-        //定义一个对象保存样式
-        var boxName = {
-            width:"500px",
-            height:"180px",
-            backgroundColor:"#f8f8f8",
-            border:"1px solid #ccc",
-            position:"absolute",
-            top:"50%",
-            left:"50%",
-            margin:"-90px 0 0 -250px",
-            zIndex:"999",
-            textAlign:"center",
-            lineHeight:"180px"
-        }
-        //给元素添加元素
-        for(var k in boxName){
-            box.style[k] = boxName[k];
-        }
-        //把创建的元素添加到body中
-        document.body.appendChild(box);
-        //把alert传入的内容添加到box中
-        if(arguments[0]){
-            box.innerHTML = arguments[0];
-        }
-        button.innerHTML = "关闭";
-        //定义按钮样式
-        var btnName = {
-            border:"1px solid #ccc",
-            backgroundColor:"#fff",
-            width:"70px",
-            height:"30px",
-            textAlign:"center",
-            lineHeight:"30px",
-            outline:"none",
-            position:"absolute",
-            bottom:"10px",
-            right:"20px",
-        }
-        for(var j in btnName){
-            button.style[j] = btnName[j];
-        }
-        //把按钮添加到box中
-        box.appendChild(button);
-        //给按钮添加单击事件
-        button.addEventListener("click",function(){
-            box.style.display = "none";
-        })
-    }
-
-</script>
+<script src="https://www.w3cways.com/demo/vconsole/vconsole.min.js?v=2.2.0"></script>

+ 14 - 2
whepi-ui/templates/user/changeRole.ftl

@@ -4,6 +4,8 @@
 <div class="weui-tab">
 <div class="weui-tab">
     <div class="weui-tab__bd">
     <div class="weui-tab__bd">
         <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
         <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
+        <input id="uptownId" type="text" hidden="hidden" value=${uptown_id!}/>
+        <input id="uptownName" type="text" hidden="hidden" value=${uptown_name!}/>
             <div class="weui-tab__bd-item weui-tab__bd-item--active">
             <div class="weui-tab__bd-item weui-tab__bd-item--active">
                 <div class="page__bd">
                 <div class="page__bd">
                     <header class="user-header">
                     <header class="user-header">
@@ -13,6 +15,8 @@
                         <br/>
                         <br/>
                         <h1 class="user-title">家园抗击疫情公共服务平台</h1>
                         <h1 class="user-title">家园抗击疫情公共服务平台</h1>
                         <br/>
                         <br/>
+                        <h1 class="user-title"><#if uptown_name ??>${uptown_name!''}</#if></h1>
+                        <br/>
                         <h1 class="user-title"><#if user ??>${user.nickName!''}</#if>登录</h1>
                         <h1 class="user-title"><#if user ??>${user.nickName!''}</#if>登录</h1>
                         <br/>
                         <br/>
                         <br/>
                         <br/>
@@ -27,7 +31,7 @@
                                     <i class="weui-icon-checked"></i>
                                     <i class="weui-icon-checked"></i>
                                 </div>
                                 </div>
                                 <div class="weui-cell__bd">
                                 <div class="weui-cell__bd">
-                                    <p>家庭用户</p>
+                                    <p id="homeName">家庭用户</p>
                                 </div>
                                 </div>
                             </label>
                             </label>
                             <label class="weui-cell weui-cell_active weui-check__label" for="s12">
                             <label class="weui-cell weui-cell_active weui-check__label" for="s12">
@@ -36,7 +40,7 @@
                                     <i class="weui-icon-checked"></i>
                                     <i class="weui-icon-checked"></i>
                                 </div>
                                 </div>
                                 <div class="weui-cell__bd">
                                 <div class="weui-cell__bd">
-                                    <p>业委会人员</p>
+                                    <p id="adminName">业委会人员</p>
                                 </div>
                                 </div>
                             </label>
                             </label>
                         </div>
                         </div>
@@ -54,6 +58,14 @@
 </body>
 </body>
 <#include "/home/frag.foot.ftl" />
 <#include "/home/frag.foot.ftl" />
 <script>
 <script>
+
+    (function ($){
+      if ($("#uptownId").val() == '1238790987234') {
+          $("#adminName").text('管理员');
+          $("#homeName").text('员工');
+      }
+    })(jQuery);
+
     function login() {
     function login() {
         var userType = $('input:radio:checked').val();
         var userType = $('input:radio:checked').val();
         if (!userType) {
         if (!userType) {

+ 23 - 4
whepi-ui/templates/user/home.ftl

@@ -168,7 +168,7 @@
                     </div>
                     </div>
                     <div class="weui-cell weui-cell_select weui-cell_select-after" id="unitMsg">
                     <div class="weui-cell weui-cell_select weui-cell_select-after" id="unitMsg">
                         <div class="weui-cell__hd">
                         <div class="weui-cell__hd">
-                            <label for="" class="weui-label">栋/单元</label>
+                            <label for="" class="weui-label" id="danweiTitle">栋/单元</label>
                         </div>
                         </div>
                         <div class="weui-cell__bd">
                         <div class="weui-cell__bd">
                             <select class="weui-select" id="unitId" name="select4">
                             <select class="weui-select" id="unitId" name="select4">
@@ -176,7 +176,7 @@
                         </div>
                         </div>
                     </div>
                     </div>
                     <div id="doorplateMsg">
                     <div id="doorplateMsg">
-                        <div class="weui-cells__title">门牌号码</div>
+                        <div class="weui-cells__title" id="menpaiTitle">门牌号码</div>
                         <div class="weui-cells">
                         <div class="weui-cells">
                             <div class="weui-cell">
                             <div class="weui-cell">
                                 <div class="weui-cell__bd">
                                 <div class="weui-cell__bd">
@@ -412,7 +412,7 @@
 
 
         $("#uptownId").on("change", function () {
         $("#uptownId").on("change", function () {
             getUptownUnitData();
             getUptownUnitData();
-            $("#houseId").empty();
+            $("#houseId").empty()
         })
         })
     })
     })
 
 
@@ -430,6 +430,20 @@
                     }
                     }
                     $('#uptownId').append(html);
                     $('#uptownId').append(html);
                     $("#uptownId").val(data[0].uptownId);
                     $("#uptownId").val(data[0].uptownId);
+                    var uptownId = $("#uptownId").val();
+                    // console.log("uptownId:"+uptownId);
+                    if (uptownId == '1238790987234') {
+                        console.log("单位");
+                        $("#danweiTitle").text("单位");
+                        $("#menpaiTitle").text("工号");
+                        $("#doorplate").attr("placeholder", "输入工号");
+
+                    } else {
+                        console.log("小区");
+                        $("#danweiTitle").text("栋/单元");
+                        $("#menpaiTitle").text("门牌号码");
+                        $("#doorplate").attr("placeholder", "请输入门牌号码: 如 108");
+                    }
                     getUptownUnitData();
                     getUptownUnitData();
                 }
                 }
             }
             }
@@ -447,7 +461,12 @@
                     $("#unitId").empty();
                     $("#unitId").empty();
                     var html = "";
                     var html = "";
                     for (var i = 0; i < data.length; i++) {
                     for (var i = 0; i < data.length; i++) {
-                        html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+'栋'+data[i].unit+'单元' + '</option>';
+                        var uptownId = $("#uptownId").val();
+                        if (uptownId == '1238790987234') {
+                            html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+data[i].unit + '</option>';
+                        } else {
+                            html += '<option value="' + data[i].unitId + '">'+data[i].ridgepole+'栋'+data[i].unit+'单元' + '</option>';
+                        }
                     }
                     }
                     $('#unitId').append(html);
                     $('#unitId').append(html);
                     $("#unitId").val(data[0].unitId);
                     $("#unitId").val(data[0].unitId);

+ 16 - 5
whepi-ui/templates/yeweihui/home.ftl

@@ -1,8 +1,11 @@
-<#assign title="业委会"/>
+<#assign title="管理员"/>
 <#include "/home/frag.head.ftl" />
 <#include "/home/frag.head.ftl" />
 
 
 <div class="weui-tab">
 <div class="weui-tab">
     <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
     <input id="userId" type="text" hidden="hidden" value=${user_id!}/>
+    <input id="uptownId" type="text" hidden="hidden" value=${uptown_id!}/>
+    <input id="uptownName" type="text" hidden="hidden" value=${uptown_name!}/>
+
     <div class="weui-tab__bd">
     <div class="weui-tab__bd">
         <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
         <div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
         <#--<#include "/yeweihui/ribaoDy.ftl" />-->
         <#--<#include "/yeweihui/ribaoDy.ftl" />-->
@@ -80,12 +83,20 @@
             inputReadOnly: false,
             inputReadOnly: false,
             onChange: function (p, values, displayValues) {
             onChange: function (p, values, displayValues) {
                 var reportDate = values.toString();
                 var reportDate = values.toString();
-                $("#exportRiBao").attr('href', "/yeweihui/exportRiBao?userId=" + $('#userId').val() + "&date=" + reportDate);
-                console.log(reportDate);
-                $("#exportRiBaoLink").val(window.location.hostname + "/yeweihui/exportRiBao?userId=" + $('#userId').val() + "&date=" + reportDate);
+
+                console.log("uptownId:"+ $('#uptownId').val());
+                if ($('#uptownId').val() == '1238790987234') {
+                    $("#exportRiBao").attr('href', "/epi/lun/exportRiBao?userId=" + $('#userId').val() + "&date=" + reportDate);
+                    $("#doorplateMsg").attr("style", "display: none");
+                } else {
+                    $("#exportRiBao").attr('href', "/epi/yeweihui/exportRiBao?userId=" + $('#userId').val() + "&date=" + reportDate);
+                    $("#doorplateMsg").attr("style", "");
+                }
+                // $("#doorplateMsg").attr("style", "");
+                $("#exportRiBaoLink").val(window.location.hostname + "/epi/yeweihui/exportRiBao?userId=" + $('#userId').val() + "&date=" + reportDate);
                 var userId = $("#userId").val();
                 var userId = $("#userId").val();
                 $.ajax({
                 $.ajax({
-                    url: '/yeweihui/ribaohuiz',
+                    url: '/epi/yeweihui/ribaohuiz',
                     data: {
                     data: {
                         "userCreate": userId,
                         "userCreate": userId,
                         "reportDate": reportDate,
                         "reportDate": reportDate,

+ 1 - 1
whepi-ui/templates/yeweihui/ribaohuiz.ftl

@@ -29,7 +29,7 @@
     <#--<p id="btnRB" class="weui-btn weui-btn_primary" href="javascript:" type="hidden">一键通知</p>-->
     <#--<p id="btnRB" class="weui-btn weui-btn_primary" href="javascript:" type="hidden">一键通知</p>-->
         <a id="exportRiBao" class="weui-btn weui-btn_primary" href="javascript:">生成报表</a>
         <a id="exportRiBao" class="weui-btn weui-btn_primary" href="javascript:">生成报表</a>
     </div>
     </div>
-    <div id="doorplateMsg">
+    <div id="doorplateMsg" style="display: none">
         <div class="weui-cells__title">复制下面下载链接到浏览器下载</div>
         <div class="weui-cells__title">复制下面下载链接到浏览器下载</div>
         <div class="weui-cells">
         <div class="weui-cells">
             <div class="weui-cell">
             <div class="weui-cell">

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

@@ -92,6 +92,19 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
                     "inner join sys_uptown_unit suu on suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId} "+
                     "inner join sys_uptown_unit suu on suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId} "+
                     "left join sys_uptown_home suho on suho.house_id = suh.house_id order by doorplate asc"
                     "left join sys_uptown_home suho on suho.house_id = suh.house_id order by doorplate asc"
     )
     )
+    List<ExcelRiBaoLY> selectExcelRiBaoLY(@Param("uptownId") Long uptownId, @Param("date") String date);
+
+    @Select(
+            "select suu.ridgepole,suu.unit,suh.doorplate,suho.linkman,suho.phone,msr.safety_num as safetyNum," +
+                    "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 from ms_suspected mss "+
+                    "inner join ms_report msr on msr.report_id = mss.report_id and msr.report_date = #{date} "+
+                    "inner join sys_uptown_house suh on suh.house_id = msr.house_id "+
+                    "inner join sys_uptown_unit suu on suu.unit_id = suh.unit_id and suu.uptown_id=#{uptownId} "+
+                    "left join sys_uptown_home suho on suho.house_id = suh.house_id order by doorplate asc"
+    )
     List<ExcelRiBaoPrivate> selectExcelRiBaoPrivate(@Param("uptownId") Long uptownId, @Param("date") String date);
     List<ExcelRiBaoPrivate> selectExcelRiBaoPrivate(@Param("uptownId") Long uptownId, @Param("date") String date);
 
 
     @Select(
     @Select(
@@ -102,4 +115,6 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
                     "where ur.role_id = 1 and ur.user_id = #{userId} "
                     "where ur.role_id = 1 and ur.user_id = #{userId} "
     )
     )
     List<Uptown> selectUptown(@Param("userId") Long userId);
     List<Uptown> selectUptown(@Param("userId") Long userId);
+
+
 }
 }

+ 201 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoLY.java

@@ -0,0 +1,201 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+@Getter
+@Setter
+public class ExcelRiBaoLY {
+
+    private String ridgepole;
+    private String unit;
+    private String doorplate;
+    private int grender;
+    private int familyStatus;
+    private int medical;
+    private int cough;
+    private int muscle;
+    private int dyspnea;
+    private int fatigue;
+    private int diarrhea;
+    private int singleRoom;
+    private String statusDesp = "";
+    private String others = "";
+
+
+    @ExcelProperty(value = "单位", index = 0)
+    private String loudong = "";
+
+    public String getLoudong() {
+        if (loudong.length() <= 0) {
+            loudong = ridgepole + unit;
+        }
+        return loudong;
+    }
+
+    @ExcelProperty(value = "工号", index = 1)
+    private String fanghao = "";
+
+    public String getFanghao() {
+        if (fanghao.length() <= 0) {
+            fanghao = doorplate;
+        }
+        return fanghao;
+    }
+
+    @ExcelProperty(value = "联系人", index = 2)
+    private String linkman;
+
+    @ExcelProperty(value = "联系电话", index = 3)
+    private String phone;
+
+    @ExcelProperty(value = "今日居家人数", index = 4)
+    private int safetyNum;
+
+    @ExcelProperty(value = "确诊人数", index = 5)
+    private int sureNum;
+
+    @ExcelProperty(value = "隔离人数", index = 6)
+    private int singleNum;
+
+    @ExcelProperty(value = "异常观察人数", index = 7)
+    private int suspectedNum;
+
+    @ExcelProperty(value = "身体正常人数", index = 8)
+    private int normalNum;
+
+    @ExcelProperty(value = "居家人员姓名", index = 9)
+    private String userName;
+//
+//    @ExcelProperty(value = "性别", index = 10)
+//    private String grenderStr;
+
+//    public String getGrenderStr() {
+//        if (grender == 1) {
+//            grenderStr = "男";
+//        } else if (grender == 2) {
+//            grenderStr = "女";
+//        } else {
+//            grenderStr = "未知";
+//        }
+//        return grenderStr;
+//    }
+
+//    @ExcelProperty(value = "年龄", index = 11)
+//    private String age;
+
+    @ExcelProperty(value = "体温", index = 10)
+    private BigDecimal temperature;
+
+    @ExcelProperty(value = "确诊", index = 11)
+    private String medicalStr;
+    public String getMedicalStr() {
+        if (medical == 0) {
+            medicalStr = "否";
+        } else {
+            medicalStr = "是";
+        }
+        return medicalStr;
+    }
+
+    @ExcelProperty(value = "单间隔离", index = 12)
+    private String singleRoomStr;
+    public String getSingleRoomStr() {
+        if (singleRoom == 0) {
+            singleRoomStr = "否";
+        } else {
+            singleRoomStr = "是";
+        }
+        return singleRoomStr;
+    }
+
+//    @ExcelProperty(value = "身体基本情况", index = 14)
+//    private String baseDesc;
+//    public String getBaseDesc() {
+//        if (familyStatus == 0) {
+//            baseDesc = "无病史";
+//        } else if (familyStatus == 1) {
+//            baseDesc = "心血管疾病(服用ARB)";
+//        } else if (familyStatus == 2) {
+//            baseDesc = "心血管疾病(未服用ARB)";
+//        } else if (familyStatus == 3) {
+//            baseDesc = "呼吸系统病史";
+//        } else if (familyStatus == 4) {
+//            baseDesc = "肿瘤病史";
+//        } else if (familyStatus == 5) {
+//            baseDesc = "糖尿病史";
+//        } else if (familyStatus == 6) {
+//            baseDesc = "服用过激素药物";
+//        } else if (familyStatus == 7) {
+//            baseDesc = "妊娠期";
+//        } else {
+//            baseDesc = "其他";
+//        }
+//        return baseDesc;
+//    }
+//
+//    @ExcelProperty(value = "病情描述", index = 15)
+//    private String bingqingDesc = "";
+//    public String getBingqingDesc() {
+//
+//        if (medical == 1) {
+//            bingqingDesc += "已确诊、";
+//        }
+//
+//        if (singleRoom == 1) {
+//            bingqingDesc += "单间隔离、";
+//        }
+//
+//        bingqingDesc = bingqingDesc + "体温:" + temperature + "、";
+//
+//        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;
+//    }
+}

+ 24 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/UserOpenController.java

@@ -52,6 +52,8 @@ public class UserOpenController {
     private RbService rbService;
     private RbService rbService;
     @Autowired
     @Autowired
     private MsReportService msReportService;
     private MsReportService msReportService;
+    @Autowired
+    private RbMapper rbMapper;
 
 
     @ApiOperation("登陆首页")
     @ApiOperation("登陆首页")
     @ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "用户ID", required = false, dataType = "Long",paramType="query"),
     @ApiImplicitParams({@ApiImplicitParam(name = "userId", value = "用户ID", required = false, dataType = "Long",paramType="query"),
@@ -62,13 +64,23 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false,defaultValue = "0") Integer userType) throws JsonProcessingException {
                              @RequestParam(value = "userType", required = false,defaultValue = "0") Integer userType) throws JsonProcessingException {
         List<UserRole> list = new ArrayList<>();
         List<UserRole> list = new ArrayList<>();
         if (userId == 0) {
         if (userId == 0) {
-           /* UserOpen userOpen = homeService.getUserOpen();
-            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());*/
-            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
-            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
+            UserOpen userOpen = homeService.getUserOpen();
+            list = userRoleMapper.getUserRoleByUserId(userOpen.getUserId());
+//            list = userRoleMapper.getUserRoleByUserId(1225321682867105793L);
+//            UserOpen userOpen = userOpenMapper.selectByUserId(1225321682867105793L);
             userId = userOpen.getUserId();
             userId = userOpen.getUserId();
             model.put("user", userOpen);
             model.put("user", userOpen);
             model.put("user_id", "\""+userOpen.getUserId()+"\"");
             model.put("user_id", "\""+userOpen.getUserId()+"\"");
+
+            List<Uptown> uptowns = rbMapper.selectUptown(userId);
+            if (uptowns!=null && uptowns.size()>0) {
+                Long uptown_id = uptowns.get(0).getUptownId();
+                String uptown_name = uptowns.get(0).getUptownName();
+                model.put("uptown_id", "\""+uptown_id+"\"");
+                model.put("uptown_name", uptown_name);
+            }
+
+
             if (list.size() == 0) {
             if (list.size() == 0) {
                 return new ModelAndView("/user/home.ftl", model);
                 return new ModelAndView("/user/home.ftl", model);
             }
             }
@@ -99,6 +111,13 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false,defaultValue = "0") Integer userType) throws JsonProcessingException {
                              @RequestParam(value = "userType", required = false,defaultValue = "0") Integer userType) throws JsonProcessingException {
         if (userId != 0 && userType != 0) {
         if (userId != 0 && userType != 0) {
             model.put("user_id", "\"" + userId + "\"");
             model.put("user_id", "\"" + userId + "\"");
+            List<Uptown> uptowns = rbMapper.selectUptown(userId);
+            if (uptowns!=null && uptowns.size()>0) {
+                Long uptown_id = uptowns.get(0).getUptownId();
+                String uptown_name = uptowns.get(0).getUptownName();
+                model.put("uptown_id", "\""+uptown_id+"\"");
+                model.put("uptown_name", uptown_name);
+            }
             if (userType == 1) {
             if (userType == 1) {
                 MsReport msReport = msReportService.getReportByDateNow(userId);
                 MsReport msReport = msReportService.getReportByDateNow(userId);
                 model.put("msReport", new JsonWapper(msReport));
                 model.put("msReport", new JsonWapper(msReport));
@@ -108,6 +127,7 @@ public class UserOpenController {
                 model.put("taskList", YvanUtil.toJsonPretty(taskList));
                 model.put("taskList", YvanUtil.toJsonPretty(taskList));
                 List<sysUptownUnit> rbList = rbService.selectAll(userId);
                 List<sysUptownUnit> rbList = rbService.selectAll(userId);
                 model.put("rbList", YvanUtil.toJsonPretty(rbList));
                 model.put("rbList", YvanUtil.toJsonPretty(rbList));
+
                 return new ModelAndView("/yeweihui/home.ftl", model);
                 return new ModelAndView("/yeweihui/home.ftl", model);
             }
             }
         }
         }

+ 22 - 3
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -187,7 +187,7 @@ public class YeWeiHuiController {
         return new ModelAndView("/yeweihui/ribaohuiz.ftl", model);
         return new ModelAndView("/yeweihui/ribaohuiz.ftl", model);
     }
     }
 
 
-    @GetMapping("/yeweihui/ribaohuiz")
+    @GetMapping("/epi/yeweihui/ribaohuiz")
     public Model<Map<String, Object>> yeweihuiRibaohuiz(Long userCreate,String reportDate) {
     public Model<Map<String, Object>> yeweihuiRibaohuiz(Long userCreate,String reportDate) {
 //        Long userCreate = 1225321682867105793L;
 //        Long userCreate = 1225321682867105793L;
 
 
@@ -215,7 +215,7 @@ public class YeWeiHuiController {
     }
     }
 
 
     @ApiOperation("导出家庭上报明细")
     @ApiOperation("导出家庭上报明细")
-    @GetMapping("/yeweihui/exportRiBao")
+    @GetMapping("/epi/yeweihui/exportRiBao")
     @SneakyThrows
     @SneakyThrows
     public void exportRiBao(@Pd(name = "userId") Long userId,
     public void exportRiBao(@Pd(name = "userId") Long userId,
                             @Pd(name = "date") String date,
                             @Pd(name = "date") String date,
@@ -234,7 +234,26 @@ public class YeWeiHuiController {
     }
     }
 
 
     @ApiOperation("导出家庭上报明细")
     @ApiOperation("导出家庭上报明细")
-    @GetMapping("/yeweihui/EXR")
+    @GetMapping("/epi/lun/exportRiBao")
+    @SneakyThrows
+    public void lunExportRiBao(@Pd(name = "userId") Long userId,
+                            @Pd(name = "date") String date,
+                            HttpServletResponse resp) {
+
+        List<Uptown> uptowns = rbMapper.selectUptown(userId);
+
+        if (uptowns!=null && uptowns.size()>0) {
+            Long upId = uptowns.get(0).getUptownId();
+            String fileName = uptowns.get(0).getUptownName();
+            fileName += "上报信息-";
+            fileName += date;
+            List<ExcelRiBaoLY> list = rbMapper.selectExcelRiBaoLY(upId,date);
+            ExcelUtils.writeSheet(ExcelRiBaoLY.class, list).export(resp, fileName);
+        }
+    }
+
+    @ApiOperation("导出家庭上报明细")
+    @GetMapping("/epi/yeweihui/EXR")
     @SneakyThrows
     @SneakyThrows
     public void exportRiBaoByXiaoQu(@Pd(name = "xid") Long xid,
     public void exportRiBaoByXiaoQu(@Pd(name = "xid") Long xid,
                             @Pd(name = "d") String d,
                             @Pd(name = "d") String d,