Browse Source

小区名称最终版

maoyunfeng 5 years ago
parent
commit
1adecfcba2

+ 2 - 2
whepi-ui/templates/yeweihui/home.ftl

@@ -85,12 +85,12 @@
                 $.ajax({
                     url: '/yeweihui/ribaohuiz',
                     data: {
-                        "userCreate": userId,
+                        // "userCreate": userId,
                         "reportDate": reportDate,
                     },
                     type: 'GET',
                     success: function (data) {
-                        // $('#ribao_famliy').empty();
+                        $('#ribao_famliy').empty();
                         for (var i = 0; i < data.data.length; i++) {
                             var v = data.data[i];
                             if(i == 0){

+ 8 - 10
whepi-web/src/main/java/com/bofeng/dao/RbMapper.java

@@ -43,30 +43,28 @@ public interface RbMapper extends BaseMapper<sysUptownUnit> {
 
     @Select("select * from " +
             "(" +
-            "select count(*) as num,d.user_id as userId,e.uptown_name as uptownName from sys_uptown_house a " +
+            "select count(*) as num,e.uptown_name as uptownName from sys_uptown_house a " +
             "inner join sys_uptown_unit b on b.unit_id = a.unit_id " +
             "inner join sys_uptown e on b.uptown_id = e.uptown_id " +
             "inner join sys_owner c on c.uptown_id = b.uptown_id " +
             "inner join sys_user_role d on d.property_id = c.owner_id and d.role_id = 2 " +
-            "GROUP BY d.user_id,e.uptown_name " +
+            "where d.user_id = #{userId} " +
+            "GROUP BY e.uptown_name " +
             "union all " +
-            "select DISTINCT count(*) as num,e.user_id as userId,'' as uptownName from ms_report a " +
+            "select DISTINCT count(*) as num,'' as uptownName from ms_report a " +
             "inner join sys_uptown_house b on a.house_id = b.house_id " +
             "inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
             "inner join sys_owner d on d.uptown_id = c.uptown_id " +
             "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
-            "where a.report_status = 1  and a.report_date = #{reportDate} " +
-            "GROUP BY e.user_id " +
+            "where a.report_status = 1  and a.report_date = #{reportDate} and e.user_id = #{userId} " +
             "union all " +
-            "select DISTINCT count(*) as num,e.user_id as userId,'' as uptownName from ms_report a " +
+            "select DISTINCT count(*) as num,'' as uptownName from ms_report a " +
             "inner join sys_uptown_house b on a.house_id = b.house_id " +
             "inner join sys_uptown_unit c on c.unit_id = b.unit_id " +
             "inner join sys_owner d on d.uptown_id = c.uptown_id " +
             "inner join sys_user_role e on e.property_id = d.owner_id and e.role_id = 2 " +
-            "where a.report_status = 1 and a.ms_status = 2 and a.report_date = #{reportDate} " +
-            "GROUP BY e.user_id " +
-            ") tt " +
-            "where tt.userId = #{userId}")
+            "where a.report_status = 1 and a.ms_status = 2 and a.report_date = #{reportDate} and e.user_id = #{userId} " +
+            ") tt ")
     List<MsSuspected> selecthuiz(@Param("userId") Long userId,@Param("reportDate") String reportDate);
 
     @Select(

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

@@ -189,7 +189,7 @@ public class YeWeiHuiController {
 
     @GetMapping("/yeweihui/ribaohuiz")
     public Model<List<MsSuspected>> yeweihuiRibaohuiz(Long userCreate,String reportDate) {
-//        Long userCreate = 1225331049509187586L;
+//        Long userCreate = 1225321682867105793L;
         List<MsSuspected> rbList = rbService.selecthuiz(userCreate,reportDate);
         return Model.newSuccess(rbList);
     }

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

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