浏览代码

大屏 营销数据

xiaolongrong 1 年之前
父节点
当前提交
08cfba0b7f

+ 2 - 2
hnls-gis/src/main/java/com/tofly/xrtygis/custom/controller/LscreenController.java

@@ -79,14 +79,14 @@ public class LscreenController {
             @ApiImplicitParam(name = "startMonth",value = "开始月份yyyyMM",required = false,dataType = "String"),
             @ApiImplicitParam(name = "endMonth",value = "结束月份yyyyMM",required = false,dataType = "String"),
     })
-    public ResultRespone GetUserYsXzAndMoneyNew(String startMonth,String endMonth){
+    public ResultRespone GetUserYsXzAndMoney(String startMonth,String endMonth){
         if(!StringUtil.isNotEmpty(startMonth) && !StringUtil.isNotEmpty(endMonth)){
             Calendar calendar=Calendar.getInstance();
             calendar.add(Calendar.MONTH, -1);
             startMonth=CalendarHelper.getFormatDate(calendar.getTime(),"yyyyMM");
             endMonth=CalendarHelper.getFormatDate(calendar.getTime(),"yyyyMM");
         }
-        return ResultRespone.success(lscreenService.getUserYsXzAndMoneyNew(startMonth,endMonth));
+        return ResultRespone.success(lscreenService.getUserYsXzAndMoney(startMonth,endMonth));
     }
 
 

+ 1 - 3
hnls-gis/src/main/java/com/tofly/xrtygis/custom/mapper/LscreenMapper.java

@@ -18,10 +18,8 @@ public interface LscreenMapper {
      * 上月多种分类的收费数据和用水量收入情况统计
      * @return
      */
-    Map<String, Object> getUserYsXzAndMoney(@Param("typeNames") List<String> typeNames);
 
-
-    List<Map<String, Object>> getUserYsXzAndMoneyNew(@Param("start")String start,@Param("end")String end);
+    List<Map<String, Object>> getUserYsXzAndMoney(@Param("start")String start,@Param("end")String end);
 
 
     Map<String, Object> getLastSfQf();

+ 1 - 6
hnls-gis/src/main/java/com/tofly/xrtygis/custom/service/LscreenService.java

@@ -40,18 +40,13 @@ public interface LscreenService {
      */
     List<LargeUseWaterVo> getLargeUseWater(Integer num);
 
-    /**
-     * 上月多种分类用水性质统计/收费数据收入情况统计
-     * @return
-     */
-    List<Map<String, Object>> getUserYsXzAndMoney();
 
 
     /**
      * 上月多种分类用水性质统计/收费数据收入情况统计
      * @return
      */
-    List<Map<String, Object>> getUserYsXzAndMoneyNew(String startMonth,String endMonth);
+    List<Map<String, Object>> getUserYsXzAndMoney(String startMonth,String endMonth);
 
 
     /**

+ 2 - 23
hnls-gis/src/main/java/com/tofly/xrtygis/custom/service/impl/LscreenServiceImpl.java

@@ -80,31 +80,10 @@ public class LscreenServiceImpl implements LscreenService {
         return lscreenMapper.getLargeUseWater(topNum);
     }
 
-    @Override
-    public List<Map<String, Object>> getUserYsXzAndMoney() {
-        List<Map<String, Object>> list=new ArrayList<>();
-        for (EnumUserSfYsxzInfo info:EnumUserSfYsxzInfo.values()
-             ) {
-            String name=info.getName();
-            String typeName=info.getTypeName();
-            List<String> typeNames=new ArrayList<>();
-            String[] split = typeName.split(",");
-            typeNames.addAll(Arrays.asList(split));
-
-            Map<String, Object> map=lscreenMapper.getUserYsXzAndMoney(typeNames);
-            if(map==null){
-                map=new HashMap<>();
-            }
-            map.put("mc",name);
-            list.add(map);
-        }
-
-        return list;
-    }
 
 
-    public List<Map<String, Object>> getUserYsXzAndMoneyNew(String startMonth,String endMonth) {
-       return lscreenMapper.getUserYsXzAndMoneyNew(startMonth,endMonth);
+    public List<Map<String, Object>> getUserYsXzAndMoney(String startMonth,String endMonth) {
+       return lscreenMapper.getUserYsXzAndMoney(startMonth,endMonth);
     }
 
     @Override

+ 4 - 20
hnls-gis/src/main/resources/mapper/custom/LscreenMapper.xml

@@ -81,7 +81,7 @@
 
     <select id="getQf3Data" resultType="Map">
         --欠费超过三月的数据,时间 startTime
-        select count(1) as QF3COUNT,sum(MONEY) as QF3ZJE from OSM_T_RECORDS@yxdblink
+        select count(1) as QF3COUNT,sum(MONEY) as QF3ZJE from OSM_T_RECORDS@yxdblink t1
         where  ISPAYMENT=0
          <![CDATA[ and to_char(FINANCIAL_DATE,'yyyyMM')<#{yearAndMonth} ]]>
     </select>
@@ -89,7 +89,8 @@
 
     <select id="getQfData" resultType="Map">
         --欠费超过三月的数据,时间 startTime
-        select count(distinct customer_code) as QF3COUNT,sum(MONEY) as QF3ZJE,to_char(FINANCIAL_DATE,'yyyyMM') as cwrq from OSM_T_RECORDS@yxdblink
+        select count(distinct customer_code) as QF3COUNT,
+sum(MONEY) as QF3ZJE,to_char(FINANCIAL_DATE,'yyyyMM') as cwrq from OSM_T_RECORDS@yxdblink t1
         where  ISPAYMENT=0
         and to_char(FINANCIAL_DATE,'yyyyMM') between #{start} and #{end}
                            group by to_char(FINANCIAL_DATE,'yyyyMM')
@@ -119,26 +120,9 @@
     </select>
 
 
-    <select id="getUserYsXzAndMoney" resultType="Map">
-        select
-            sum(case when t1.ISPAYMENT=1 then t1.MONEY else 0 end) as je,
-            sum(t1.MONEY) as zje,
-            sum(t1.AMOUNT) as num
-        from OSM_T_RECORDS@yxdblink t1
-                 inner join OSM_T_CUSTOMERS@yxdblink t2
-                            on t1.CUSTOMER_CODE=t2.CUSTOMER_CODE
-        where to_char(t1.FINANCIAL_DATE,'yyyyMM')=to_char(ADD_MONTHS(SYSDATE, -1),'yyyyMM')
-        <if test="typeNames!=null and typeNames.size()>0">
-            AND t2.NATURENAME in
-            <foreach item="item" index="index" collection="typeNames" separator="," open="(" close=")">
-                #{item}
-            </foreach>
-        </if>
-    </select>
 
 
-
-    <select id="getUserYsXzAndMoneyNew" resultType="Map">
+    <select id="getUserYsXzAndMoney" resultType="Map">
 
         select
         nvl(config.name,'其他') as  mc,