فهرست منبع

Merge branch 'master' of http://git.yvanui.com/hust/wuhan_epi

lange 5 سال پیش
والد
کامیت
62caff68f6

+ 21 - 0
whepi-doc/group.sql

@@ -0,0 +1,21 @@
+-- ----------------------------
+-- Table structure for jm_buy
+-- ----------------------------
+drop table if exists jm_buy;
+create table jm_buy (
+    jm_id           bigint(20)      NOT NULL DEFAULT 0          COMMENT '团购参团id',
+    user_id         bigint(20)      NOT NULL DEFAULT 0          COMMENT '居民id',
+    buy_count       int(11)         NOT NULL DEFAULT 0          COMMENT '购买数量',
+    buy_money       Decimal(4,2)    NOT NULL DEFAULT 0.00       COMMENT '购买金额',
+    phone           varchar(20)     NOT NULL DEFAULT ''         COMMENT '联系电话',
+    buy_status      int(11)         NOT NULL DEFAULT 0          COMMENT '状态 1 在团 2 发货 3取消 4撤销 5完成',
+    remark          varchar(200)    NOT NULL DEFAULT ''         COMMENT '备注',
+    user_create     bigint(20)      NOT NULL DEFAULT 0          COMMENT '新增人',
+    time_create     datetime(0)     NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '新增时间(订单提交时间)',
+    PRIMARY KEY (jm_id) USING BTREE,
+    INDEX user_id(user_id) USING BTREE
+)
+ENGINE = InnoDB
+DEFAULT CHARSET = utf8
+COMMENT = '居民团购表'
+;

+ 96 - 0
whepi-ui/templates/home/buy.ftl

@@ -0,0 +1,96 @@
+<div class="page__bd">
+    <div class="weui-tab">
+        <div class="weui-navbar">
+            <a class="weui-navbar__item weui-bar__item_on" target="#buy_nav1" module="buy_zhu" onclick="buyGroup()">
+                团购信息
+            </a>
+            <a class="weui-navbar__item" target="#buy_nav2" module="buy_zhu" id="buy_help" onclick="buyGroup2()">
+                我的团购
+            </a>
+        </div>
+        <div class="weui-tab__panel"><#--团购信息的列表-->
+            <div id="buy_nav1" style="text-align: center ">
+                团购信息
+            </div>
+
+
+            <div id="buy_nav2" style="display: none"><#--我的团购信息-->
+                <div class="weui-form-preview">
+                    <div class="weui-form-preview__label">
+                        <label class="weui-form-preview__label">我的订单&emsp;&emsp;&emsp;&emsp;提交时间&emsp;&emsp;&emsp;&emsp;订单状态</label>
+                    </div>
+                    <div id="MyBuyAll"></div>
+                </div>
+            </div>
+        </div>
+        <div class="weui-form-preview" style="display: " id="buyListGroup">
+            <div class="weui-form-preview__label">
+                <label class="weui-form-preview__label">标题&emsp;&emsp;&emsp;&emsp;已团&emsp;&emsp;&emsp;&emsp;截止时间&emsp;&emsp;&emsp;&emsp;状态</label>
+            </div>
+            <div id="buyAll"></div>
+        </div>
+
+    <#--业委会的套餐-->
+        <div id="details">
+            <div id="myyw">
+
+            </div>
+        <#--团购详情页面的展示-->
+            <div class="weui-btn-area">
+                <br>
+                <div style="text-align: center;size: 20px">
+                    我的团购
+                </div>
+            <#--居民自己填写的-->
+                <div id="client">
+            <#include "/home/buyClient.ftl" />
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script>
+        //商品的团购信息的展示
+        function buyGroup() {
+            $('#buy_nav1')[0].style.display = '';
+            $('#buyListGroup')[0].style.display = '';
+            $('#details')[0].style.display = '';
+
+            $.ajax({
+                url: '',
+                type: 'get',
+                data: {},
+                success: function (data) {
+                    if (data.success) {
+                        if (data.data.length > 0) {
+                            hasData = true;
+                            data.data.forEach(function (v) {
+                                buyList(v);
+                            });
+                        }
+                        else {
+                        }
+
+                    }
+                },
+            });
+        }
+
+        function buyList(v) {
+        }
+
+        /*我的团购数量的填写*/
+        function myBuy() {
+
+        }
+
+
+        //点击我的团购按钮
+        function buyGroup2() {
+            $('#buy_nav1')[0].style.display = 'none';
+            $('#buyListGroup')[0].style.display = 'none';
+            $('#details')[0].style.display = 'none';
+            $('#buy_nav2')[0].style.display = '';
+
+        }
+    </script>

+ 100 - 0
whepi-ui/templates/home/buyClient.ftl

@@ -0,0 +1,100 @@
+<div class="weui-btn-area">
+    <div>
+        <div class="weui-flex__item">
+            <div class="placeholder" style="display: inline;float: left">当前参团:</div>
+            <div style="display: inline;">107</div>
+        </div>
+        <div class="weui-flex__item">
+            <div style="display: inline;" class="placeholder">状态:</div>
+            <div style="display: inline;">在团</div>
+        </div>
+    </div>
+    <div class="weui-flex">
+        <div class="weui-flex__item">
+            <div style="display: inline;text-align: center;">我的团购:</div>
+            <div style="display: inline;">
+                <input type="text" id="buyCount"
+                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 20%;"
+                       maxlength="3" onkeyup="this.value=this.value.replace(/[^0-9-]+/,'');">
+            </div>
+        </div>
+        <div class="weui-flex__item">
+            <div style="display: inline;">金额¥:</div>
+            <div style="display: inline;" id="myMenory">107</div>
+        </div>
+    </div>
+    <div class="weui-flex">
+        <div class="weui-flex__item">
+            <div style="display: inline;">联系电话:</div>
+            <div class="weui-flex__item" style="display: inline;">
+                <input type="text" maxlength="11" id="myPhone" onkeyup="value=value.replace(/[^\d]/g,'')"
+                       maxlength=11
+                       style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; height: 5vh; width: 50%;"">
+            </div>
+        </div>
+    </div>
+    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh;">
+        <div style="color:#1e282c;height: 5vh; line-height: 5vh;margin-right: 2vw;width: 13%;">备注:</div>
+        <textarea id="Myremarks" class="weui-textarea" placeholder="输入内容(200字内)" rows="3"
+                  style="border: 1px solid rgba(0,0,0,.2);box-sizing:border-box; border-radius: 5px; margin-top: 1vh;"></textarea>
+    </div>
+    <div style="display:flex; flex-direction: row; justify-content: space-between; margin-top: 1vh; margin-bottom: 5vh;">
+        <a id="buyBack" onclick="buyBack()" href="javascript:;" class="weui-btn weui-btn_default"
+           style="width: 30%;">返回</a>
+        <a id="buyRepeal" onclick="buyBack()" href="javascript:;" class="weui-btn weui-btn_default"
+           style="width: 30%;display: none">撤销</a>
+        <a id="buyCommit" onclick="buyCommit()" href="javascript:;" class="weui-btn weui-btn_primary"
+           style="margin-top: 0;width: 30%;">提交</a>
+    </div>
+
+</div>
+
+
+
+<script>
+
+    <#--返回-->
+    function buyBack() {
+        $('#details')[0].style.display = 'none';
+    }
+
+    //提交
+    function buyCommit() {
+        if ($('#buyCount').val() == '' || $('#buyCount').val() == undefined) {
+            $.alert("请填写团购数量");
+            return;
+        }
+        if ($('#myPhone').val() == undefined || $('#myPhone').val() == '') {
+            $.alert("请填写联系电话");
+            return;
+        }
+        if ($('#Myremarks').val() == undefined || $('#Myremarks').val() == '') {
+            $.alert("请填写备注");
+            return;
+        }
+        /*   $.ajax({
+               url: '/home/home/buyGroup',
+               data: {
+                   userId: $('#userId').val(),
+                   buyCount: $('#buyCount').val(),
+                   phone: $('#myPhone').val(),
+                   remark: $('#Myremarks').val(),
+                   buyMoney: $('#myMenory').text(),
+
+               },
+               type: 'GET',
+               success: function (data) {
+                   console.log(data);
+                   buyBack();
+               },
+               error: function () {
+               }
+           });*/
+    }
+
+    /* //输入数量自动结算金额
+     function menory() {
+      $('#myMenory').val($('#buyCount').val()*6)
+     }*/
+
+</script>

+ 7 - 7
whepi-ui/templates/home/home.ftl

@@ -8,8 +8,8 @@
             <#include "/home/ribao.ftl" /></div>
         <div id="tab2" class="weui-tab__bd-item">
             <#include "/home/qiuzhu.ftl" /></div>
-    <#--<div id="tab3" class="weui-tab__bd-item">-->
-    <#--<h1>页面三</h1> </div>-->
+        <div id="tab3" class="weui-tab__bd-item">
+           <#include "/home/buy.ftl" /></div>
     <#--<div id="tab4" class="weui-tab__bd-item">-->
     <#--<h1>页面四</h1> </div>-->
     </div>
@@ -22,10 +22,10 @@
             <div class="weui-tabbar__icon"><img src="/static/images/wx/customer_service.png" alt=""></div>
             <p class="weui-tabbar__label" onclick="familyClick()">家庭求助</p>
         </a>
-    <#--<a href="#tab3" class="weui-tabbar__item">-->
-    <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_article.png" alt=""> </div>-->
-    <#--<p class="weui-tabbar__label">发现</p>-->
-    <#--</a>-->
+        <a href="#tab3" class="weui-tabbar__item">
+            <div class="weui-tabbar__icon"><img src="/static/images/wx/upload.png" alt=""></div>
+            <p class="weui-tabbar__label" onclick="buyGroup()">商品团购</p>
+        </a>
     <#--<a href="#tab4" class="weui-tabbar__item">-->
     <#--<div class="weui-tabbar__icon"> <img src="./images/icon_nav_cell.png" alt=""> </div>-->
     <#--<p class="weui-tabbar__label">我</p>-->
@@ -139,7 +139,7 @@
                         hasData = true;
                         $('#qzHS').append($('<div>' + data.data[0].taskTitle + '</div>\n' + '<div class="weui-cell ">\n' + '<div class="weui-cell__bd">\n'
                                 + '<textarea class="weui-textarea" rows="1" readonly />' + data.data[0].remark + '</div>'));
-                        if (data.data[0].nickName!=null) {
+                        if (data.data[0].nickName != null) {
                             data.data.forEach(function (v) {
                                 shValue(v);
                             });

+ 11 - 0
whepi-web/src/main/java/com/bofeng/dao/BuyMapper.java

@@ -0,0 +1,11 @@
+package com.bofeng.dao;
+
+import com.baomidou.mybatisplus.mapper.BaseMapper;
+import com.bofeng.entity.Buy;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface BuyMapper extends BaseMapper<Buy> {
+}

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

@@ -82,6 +82,19 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
     List<ExcelRiBao> selectExcelRiBao(@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);
+
+    @Select(
             "select u.* from sys_user_role ur " +
                     "left join sys_uptown_house up on up.house_id = ur.property_id " +
                     "left join sys_uptown_unit uu on uu.unit_id = up.unit_id " +

+ 44 - 0
whepi-web/src/main/java/com/bofeng/entity/Buy.java

@@ -0,0 +1,44 @@
+package com.bofeng.entity;
+
+import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
+import com.baomidou.mybatisplus.annotations.TableName;
+import lombok.Getter;
+import lombok.Setter;
+import org.joda.time.DateTime;
+
+import java.math.BigDecimal;
+
+@Getter
+@Setter
+@TableName("jm_buy")
+public class Buy {
+
+  @TableId("jm_id")
+  private Long jmId;
+
+  @TableField("user_id")
+  private Long userId;
+  
+  @TableField("buy_count")
+  private Integer buyCount;
+
+  @TableField("buy_money")
+  private BigDecimal buyMoney;
+
+  @TableField("phone")
+  private String phone;
+
+  @TableField("buy_status")
+  private Integer buyStatus;
+
+  @TableField("my_remark")
+  private String myRemark;
+
+  @TableField("user_create")
+  private Long userCreate;
+
+  @TableField("time_create")
+  private DateTime timeCreate;
+
+}

+ 202 - 0
whepi-web/src/main/java/com/bofeng/entity/ExcelRiBaoPrivate.java

@@ -0,0 +1,202 @@
+package com.bofeng.entity;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.google.common.base.Strings;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.math.BigDecimal;
+
+@Getter
+@Setter
+public class ExcelRiBaoPrivate {
+
+    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 = 12)
+    private BigDecimal temperature;
+
+    @ExcelProperty(value = "确诊", index = 13)
+    private String medicalStr;
+    public String getMedicalStr() {
+        if (medical == 0) {
+            medicalStr = "否";
+        } else {
+            medicalStr = "是";
+        }
+        return medicalStr;
+    }
+
+    @ExcelProperty(value = "单间隔离", index = 14)
+    private String singleRoomStr;
+    public String getSingleRoomStr() {
+        if (singleRoom == 0) {
+            singleRoomStr = "否";
+        } else {
+            singleRoomStr = "是";
+        }
+        return singleRoomStr;
+    }
+
+    @ExcelProperty(value = "身体基本情况", index = 15)
+    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 = 16)
+    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;
+    }
+}

+ 4 - 3
whepi-web/src/main/java/com/bofeng/entity/Uptown.java

@@ -1,6 +1,7 @@
 package com.bofeng.entity;
 
 import com.baomidou.mybatisplus.annotations.TableField;
+import com.baomidou.mybatisplus.annotations.TableId;
 import com.baomidou.mybatisplus.annotations.TableName;
 import lombok.Getter;
 import lombok.Setter;
@@ -14,7 +15,7 @@ import org.joda.time.DateTime;
 @TableName("sys_uptown")
 public class Uptown {
 
-    @TableField("uptown_id")
+    @TableId("uptown_id")
     private Long uptownId;
 
     @TableField("uptown_name")
@@ -38,13 +39,13 @@ public class Uptown {
     @TableField("status")
     private Integer status;
 
-    @TableField("user_create")
+    @TableField(exist = false)
     private Long userCreate;
 
     @TableField(exist = false)
     private DateTime timeCreate;
 
-    @TableField("user_update")
+    @TableField(exist = false)
     private Long userUpdate;
 
     @TableField(exist = false)

+ 23 - 0
whepi-web/src/main/java/com/bofeng/service/BuyService.java

@@ -0,0 +1,23 @@
+package com.bofeng.service;
+
+import com.baomidou.mybatisplus.toolkit.IdWorker;
+import com.bofeng.dao.BuyMapper;
+import com.bofeng.entity.Buy;
+import org.joda.time.DateTime;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class BuyService {
+
+  @Autowired
+  private BuyMapper buyMapper;
+
+  public int buyGroup(Buy buy) {
+    buy.setJmId(IdWorker.getId());
+    buy.setUserCreate(buy.getUserId());
+    buy.setTimeCreate(new DateTime());
+
+    return 1;
+  }
+}

+ 20 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/BuyController.java

@@ -0,0 +1,20 @@
+package com.bofeng.wx.controller;
+
+import com.bofeng.entity.Buy;
+import com.bofeng.service.BuyService;
+import com.yvan.ModelOps;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class BuyController {
+
+  @Autowired
+  private BuyService buyService;
+
+  @GetMapping("/home/home/buyGroup")
+  public ModelOps buyGroup(Buy buy) {
+    return ModelOps.newSuccess(buyService.buyGroup(buy));
+  }
+}

+ 5 - 4
whepi-web/src/main/java/com/bofeng/wx/controller/RiBaoController.java

@@ -72,8 +72,9 @@ public class RiBaoController {
 
     // 查询日报关联的家人列表
     @GetMapping("/riBao/queryRibaoDetailList")
-    public Model<List<MsSuspected>> queryRibaoDetailList(@Pd(name = "userCreate") Long userCreate) {
-        Long reportId = riBaoService.getNowByYesterday(userCreate);
+//    public Model<List<MsSuspected>> queryRibaoDetailList(@Pd(name = "userCreate") Long userCreate) {
+    public Model<List<MsSuspected>> queryRibaoDetailList(@Pd(name = "reportId") Long reportId) {
+//        Long reportId = riBaoService.getNowByYesterday(userCreate);
         List<MsSuspected> listSuspected = riBaoService.queryRibaoDetailList(reportId);
         return Model.newSuccess(listSuspected);
     }
@@ -86,8 +87,8 @@ public class RiBaoController {
 
     // 新增或者修改日报关联的家人 必须传reportId,userCreate,userUpdate
     @PostMapping("/riBao/addOrEditRibaoDetail")
-    public Model<MsSuspected> addOrEditRibaoDetail(@RequestBody MsSuspected ribaoDetail) {
-        return ModelOps.newSuccess(riBaoService.addOrEditRibaoDetail(ribaoDetail));
+    public Model<MsSuspected> addOrEditRibaoDetail(@RequestBody MsSuspected msSuspected) {
+        return ModelOps.newSuccess(riBaoService.addOrEditRibaoDetail(msSuspected));
     }
 
     // 删除日报关联的家人

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

@@ -62,10 +62,10 @@ public class UserOpenController {
                              @RequestParam(value = "userType", required = false,defaultValue = "0") Integer userType) throws JsonProcessingException {
         List<UserRole> list = new ArrayList<>();
         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();
             model.put("user", userOpen);
             model.put("user_id", "\""+userOpen.getUserId()+"\"");

+ 23 - 0
whepi-web/src/main/java/com/bofeng/wx/controller/YeWeiHuiController.java

@@ -1,6 +1,7 @@
 package com.bofeng.wx.controller;
 
 import com.bofeng.dao.RbMapper;
+import com.bofeng.dao.UptownMapper;
 import com.bofeng.entity.*;
 import com.bofeng.excel.ExcelUtils;
 import com.bofeng.service.HomeService;
@@ -45,6 +46,9 @@ public class YeWeiHuiController {
     private HomeService homeService;
 
     @Autowired
+    private UptownMapper uptownMapper;
+
+    @Autowired
     private RbMapper rbMapper;
 
     @GetMapping("/yeweihui/home.html")
@@ -228,4 +232,23 @@ public class YeWeiHuiController {
             ExcelUtils.writeSheet(ExcelRiBao.class, list).export(resp, fileName);
         }
     }
+
+    @ApiOperation("导出家庭上报明细")
+    @GetMapping("/yeweihui/EXR")
+    @SneakyThrows
+    public void exportRiBaoByXiaoQu(@Pd(name = "xid") Long xid,
+                            @Pd(name = "d") String d,
+                            HttpServletResponse resp) {
+
+        Uptown uptown = uptownMapper.selectById(xid);
+
+        if (uptown!=null && uptown.getUptownId()>0) {
+            Long upId = uptown.getUptownId();
+            String fileName = uptown.getUptownName();
+            fileName += "上报信息-";
+            fileName += d;
+            List<ExcelRiBaoPrivate> list = rbMapper.selectExcelRiBaoPrivate(upId,d);
+            ExcelUtils.writeSheet(ExcelRiBaoPrivate.class, list).export(resp, fileName);
+        }
+    }
 }

+ 1 - 1
whepi-web/src/main/resources/application.yml

@@ -43,7 +43,7 @@ endpoints:
 #  whitelabel.enabled: false
 
 spring:
-  profiles.active: hudingbo
+  profiles.active: guojing
 
   application:
     name: whepi-web

+ 5 - 0
whepi-web/src/main/resources/mapper/BuyMapper.xml

@@ -0,0 +1,5 @@
+<?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.BuyMapper">
+
+</mapper>