java110 пре 2 година
родитељ
комит
787ebd75ed

+ 173 - 0
java110-db/src/main/resources/mapper/report/ReportOthersStatisticsServiceDaoImplMapper.xml

@@ -0,0 +1,173 @@
+<?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="reportOthersStatisticsServiceDaoImpl">
+
+    <!-- 场地预约数 -->
+    <select id="venueReservationCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from community_space_person t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 合同数 -->
+    <select id="contractCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract t
+        where 1=1
+        and t.state in ('11','22','44')
+        and t.store_id =  #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 合同资产变更 -->
+    <select id="contractChangeCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract_change_plan t
+        where 1=1
+        and t.plan_type = '3003'
+        and t.state in ('11','22','55')
+        and t.store_id =  #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 合同租期变更 -->
+    <select id="leaseChangeCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract_change_plan t
+        where 1=1
+        and t.plan_type = '2002'
+        and t.state in ('11','22','55')
+        and t.store_id =  #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 主体变更 -->
+    <select id="mainChange" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract_change_plan t
+        where 1=1
+        and t.plan_type = '1001'
+        and t.state in ('11','22','55')
+        and t.store_id =  #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 到期合同 -->
+    <select id="expirationContract" parameterType="Map" resultType="Map">
+        select count(1) count
+        from contract t
+        where 1=1
+        and t.state in ('11','22','44')
+        and t.store_id =  #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.end_time &lt; now()
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 车辆数 -->
+    <select id="carCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from owner_car t
+        where 1=1
+        and t.car_type in ('1001','1002')
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 车位申请数 -->
+    <select id="carApplyCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from parking_space_apply t
+        where 1=1
+        and t.state in ('1001','2002','3003')
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 停车券购买 -->
+    <select id="buyParkingCouponCount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.received_amount),0) amount
+        from parking_coupon_order t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+
+    <!-- 停车券核销 -->
+    <select id="writeOffParkingCouponCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from parking_coupon_car_order t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 赠送优惠券 -->
+    <select id="sendCouponCount" parameterType="Map" resultType="Map">
+        select ifnull(sum(t.send_count),0) count
+        from coupon_property_pool_detail t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 使用优惠券 -->
+    <select id="writeOffCouponCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from coupon_property_user_detail t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 赠送积分 -->
+    <select id="sendIntegralCount" parameterType="Map" resultType="Map">
+        select ifnull(sum(t.quantity),0) count
+        from integral_gift_detail t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 使用积分 -->
+    <select id="writeOffIntegralCount" parameterType="Map" resultType="Map">
+        select ifnull(sum(t.use_quantity),0) count
+        from integral_user_detail t
+        where 1=1
+        and t.community_id = #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+</mapper>

+ 65 - 0
java110-interface/src/main/java/com/java110/intf/report/IReportOthersStatisticsInnerServiceSMO.java

@@ -0,0 +1,65 @@
+package com.java110.intf.report;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.report.QueryStatisticsDto;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+/**
+ * @ClassName IReportFeeStatisticsInnerServiceSMO
+ * @Description 费用统计类 服务类
+ * @Author wuxw
+ * @Date 2019/4/24 9:04
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@FeignClient(name = "report-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/reportOthersStatisticsApi")
+public interface IReportOthersStatisticsInnerServiceSMO {
+
+
+    @RequestMapping(value = "/getCarInCount", method = RequestMethod.POST)
+    long venueReservationCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getCarOutCount", method = RequestMethod.POST)
+    long contractCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getPersonInCount", method = RequestMethod.POST)
+    long contractChangeCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getPersonFaceToMachineCount", method = RequestMethod.POST)
+    long leaseChangeCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseInCount", method = RequestMethod.POST)
+    long mainChange(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseOutCount", method = RequestMethod.POST)
+    long expirationContract(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseInAmount", method = RequestMethod.POST)
+    long carCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseOutAmount", method = RequestMethod.POST)
+    long carApplyCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/allocationCount", method = RequestMethod.POST)
+    double buyParkingCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomRenovationCount", method = RequestMethod.POST)
+    long writeOffParkingCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/itemReleaseCount", method = RequestMethod.POST)
+    double sendCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomInCount", method = RequestMethod.POST)
+    long writeOffCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomOutCount", method = RequestMethod.POST)
+    double sendIntegralCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/ownerRegisterCount", method = RequestMethod.POST)
+    double writeOffIntegralCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+}

+ 0 - 3
service-report/src/main/java/com/java110/report/cmd/dataReport/QueryFeeDataReportCmd.java

@@ -7,7 +7,6 @@ import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
 import com.java110.dto.report.QueryStatisticsDto;
-import com.java110.report.statistics.IBaseDataStatistics;
 import com.java110.report.statistics.IFeeStatistics;
 import com.java110.report.statistics.IOrderStatistics;
 import com.java110.utils.exception.CmdException;
@@ -15,9 +14,7 @@ import com.java110.utils.util.Assert;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import javax.xml.ws.Action;
 import java.text.ParseException;
-import java.util.List;
 
 /**
  * 查询费用类统计

+ 158 - 0
service-report/src/main/java/com/java110/report/cmd/dataReport/QueryOthersDataReportCmd.java

@@ -0,0 +1,158 @@
+package com.java110.report.cmd.dataReport;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+import com.java110.core.context.ICmdDataFlowContext;
+import com.java110.core.event.cmd.Cmd;
+import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.report.QueryStatisticsDto;
+import com.java110.report.statistics.IInoutStatistics;
+import com.java110.report.statistics.IOthersStatistics;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+
+import java.text.ParseException;
+
+/**
+ * 数据统计出入统计
+ *
+ */
+@Java110Cmd(serviceCode = "dataReport.queryOthersDataReport")
+public class QueryOthersDataReportCmd extends Cmd {
+
+    @Autowired
+    private IOthersStatistics othersStatisticsImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        Assert.hasKeyAndValue(reqJson, "communityId", "未包含小区");
+        Assert.hasKeyAndValue(reqJson, "startDate", "未包含开始时间");
+        Assert.hasKeyAndValue(reqJson, "endDate", "未包含结束时间");
+        String startDate = reqJson.getString("startDate");
+        String endDate = reqJson.getString("endDate");
+        if (!startDate.contains(":")) {
+            startDate += " 00:00:00";
+            reqJson.put("startDate", startDate);
+        }
+        if (!endDate.contains(":")) {
+            endDate += " 23:59:59";
+            reqJson.put("endDate", endDate);
+        }
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
+        String storeId = context.getReqHeaders().get("store-id");
+        QueryStatisticsDto queryStatisticsDto = new QueryStatisticsDto();
+        queryStatisticsDto.setStartDate(reqJson.getString("startDate"));
+        queryStatisticsDto.setEndDate(reqJson.getString("endDate"));
+        queryStatisticsDto.setCommunityId(reqJson.getString("communityId"));
+        queryStatisticsDto.setStoreId(storeId);
+        JSONArray datas = new JSONArray();
+        JSONObject data = null;
+        // todo 查询 查询场地预约数
+        long venueReservationCount = othersStatisticsImpl.venueReservationCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","场地预约数");
+        data.put("value", venueReservationCount);
+        datas.add(data);
+
+        // todo 查询 合同数
+        long contractCount = othersStatisticsImpl.contractCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","合同数");
+        data.put("value", contractCount);
+        datas.add(data);
+
+        // todo 查询 合同资产变更
+        long contractChangeCount = othersStatisticsImpl.contractChangeCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","合同资产变更");
+        data.put("value", contractChangeCount);
+        datas.add(data);
+
+
+        // todo 查询 租期变更
+        long leaseChangeCount = othersStatisticsImpl.leaseChangeCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","租期变更");
+        data.put("value", leaseChangeCount);
+        datas.add(data);
+
+        // todo 查询 主体变更
+        long mainChange = othersStatisticsImpl.mainChange(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","主体变更");
+        data.put("value", mainChange);
+        datas.add(data);
+
+        // todo 查询 到期合同
+        long expirationContract = othersStatisticsImpl.expirationContract(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","到期合同");
+        data.put("value", expirationContract);
+        datas.add(data);
+
+        // todo 查询 车辆数
+        long carCount = othersStatisticsImpl.carCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","车辆数");
+        data.put("value", carCount);
+        datas.add(data);
+
+        // todo 查询 车位申请
+        long carApplyCount = othersStatisticsImpl.carApplyCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","车位申请");
+        data.put("value", carApplyCount);
+        datas.add(data);
+
+        // todo 查询 停车券购买
+        double buyParkingCouponCount = othersStatisticsImpl.buyParkingCouponCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","停车券购买");
+        data.put("value", buyParkingCouponCount);
+        datas.add(data);
+
+        // todo 查询 停车券核销
+        long writeOffParkingCouponCount = othersStatisticsImpl.writeOffParkingCouponCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","停车券核销");
+        data.put("value", writeOffParkingCouponCount);
+        datas.add(data);
+
+        // todo 查询 赠送优惠券
+        double sendCouponCount = othersStatisticsImpl.sendCouponCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","赠送优惠券");
+        data.put("value", sendCouponCount);
+        datas.add(data);
+
+        // todo 查询 使用优惠券
+        long writeOffCouponCount = othersStatisticsImpl.writeOffCouponCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","使用优惠券");
+        data.put("value", writeOffCouponCount);
+        datas.add(data);
+
+        // todo 查询 赠送积分
+        double sendIntegralCount = othersStatisticsImpl.sendIntegralCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","退房数量");
+        data.put("value", sendIntegralCount);
+        datas.add(data);
+
+        // todo 查询 使用积分
+        double writeOffIntegralCount = othersStatisticsImpl.writeOffIntegralCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","使用积分");
+        data.put("value", writeOffIntegralCount);
+        datas.add(data);
+
+
+        context.setResponseEntity(ResultVo.createResponseEntity(datas));
+    }
+}

+ 37 - 0
service-report/src/main/java/com/java110/report/dao/IReportOthersStatisticsServiceDao.java

@@ -0,0 +1,37 @@
+package com.java110.report.dao;
+
+import java.util.Map;
+
+/**
+ * 费用统计 dao 层
+ */
+public interface IReportOthersStatisticsServiceDao {
+
+    long venueReservationCount(Map info);
+
+    long contractCount(Map info);
+
+    long contractChangeCount(Map info);
+
+    long leaseChangeCount(Map info);
+
+    long mainChange(Map info);
+
+    long expirationContract(Map info);
+
+    long carCount(Map info);
+
+    long carApplyCount(Map info);
+
+    double buyParkingCouponCount(Map info);
+
+    long writeOffParkingCouponCount(Map info);
+
+    double sendCouponCount(Map info);
+
+    long writeOffCouponCount(Map info);
+
+    double sendIntegralCount(Map info);
+
+    double writeOffIntegralCount(Map info);
+}

+ 212 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportOthersStatisticsServiceDaoImpl.java

@@ -0,0 +1,212 @@
+package com.java110.report.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.core.log.LoggerFactory;
+import com.java110.report.dao.IReportOrderStatisticsServiceDao;
+import com.java110.report.dao.IReportOthersStatisticsServiceDao;
+import org.slf4j.Logger;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @ClassName ReportCommunityServiceDaoImpl
+ * @Description TODO
+ * @Author wuxw
+ * @Date 2020/10/15 22:15
+ * @Version 1.0
+ * add by wuxw 2020/10/15
+ **/
+@Service("reportOthersStatisticsServiceDaoImpl")
+public class ReportOthersStatisticsServiceDaoImpl extends BaseServiceDao implements IReportOthersStatisticsServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ReportOthersStatisticsServiceDaoImpl.class);
+
+    public long venueReservationCount(Map info) {
+        logger.debug("查询 venueReservationCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.venueReservationCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long contractCount(Map info) {
+        logger.debug("查询 contractCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.contractCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long contractChangeCount(Map info) {
+        logger.debug("查询 contractChangeCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.contractChangeCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long leaseChangeCount(Map info) {
+        logger.debug("查询 leaseChangeCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.leaseChangeCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long mainChange(Map info) {
+        logger.debug("查询 mainChange 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.mainChange", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+        Number num = Float.parseFloat(infos.get(0).get("count").toString());
+        long value = Long.valueOf(num.intValue());
+        return value;
+    }
+
+    @Override
+    public long expirationContract(Map info) {
+        logger.debug("查询 expirationContract 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.expirationContract", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        Number num = Float.parseFloat(infos.get(0).get("count").toString());
+        long value = Long.valueOf(num.intValue());
+        return value;
+    }
+
+    @Override
+    public long carCount(Map info) {
+        logger.debug("查询 carCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.carCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long carApplyCount(Map info) {
+        logger.debug("查询 carApplyCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.carApplyCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public double buyParkingCouponCount(Map info) {
+        logger.debug("查询 buyParkingCouponCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.buyParkingCouponCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Double.parseDouble(infos.get(0).get("amount").toString());
+    }
+
+    @Override
+    public long writeOffParkingCouponCount(Map info) {
+        logger.debug("查询 writeOffParkingCouponCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.writeOffParkingCouponCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public double sendCouponCount(Map info) {
+        logger.debug("查询 sendCouponCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.sendCouponCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0D;
+        }
+
+        return Double.parseDouble(infos.get(0).get("amount").toString());
+    }
+
+    @Override
+    public long writeOffCouponCount(Map info) {
+        logger.debug("查询 writeOffCouponCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.writeOffCouponCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public double sendIntegralCount(Map info) {
+        logger.debug("查询 sendIntegralCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.sendIntegralCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Double.parseDouble(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public double writeOffIntegralCount(Map info) {
+        logger.debug("查询 writeOffIntegralCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportOthersStatisticsServiceDaoImpl.writeOffIntegralCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Double.parseDouble(infos.get(0).get("count").toString());
+    }
+
+
+}

+ 115 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportOthersStatisticsInnerServiceSMOImpl.java

@@ -0,0 +1,115 @@
+package com.java110.report.smo.impl;
+
+
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.report.QueryStatisticsDto;
+import com.java110.intf.report.IReportInoutStatisticsInnerServiceSMO;
+import com.java110.intf.report.IReportOthersStatisticsInnerServiceSMO;
+import com.java110.report.dao.IReportInoutStatisticsServiceDao;
+import com.java110.report.dao.IReportOthersStatisticsServiceDao;
+import com.java110.utils.util.BeanConvertUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @ClassName ReportOthersStatisticsInnerServiceSMOImpl
+ * @Description 其他类统计类
+ * @Author wuxw
+ * @Date 2019/4/24 9:20
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@RestController
+public class ReportOthersStatisticsInnerServiceSMOImpl extends BaseServiceSMO implements IReportOthersStatisticsInnerServiceSMO {
+
+    @Autowired
+    private IReportOthersStatisticsServiceDao reportOthersStatisticsServiceDaoImpl;
+
+
+
+    @Override
+    public long venueReservationCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.venueReservationCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long contractCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.contractCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long contractChangeCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.contractChangeCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long leaseChangeCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.leaseChangeCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long mainChange(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.mainChange(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long expirationContract(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.expirationContract(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long carCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.carCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long carApplyCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.carApplyCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double buyParkingCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportOthersStatisticsServiceDaoImpl.buyParkingCouponCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long writeOffParkingCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.writeOffParkingCouponCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double sendCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportOthersStatisticsServiceDaoImpl.sendCouponCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long writeOffCouponCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportOthersStatisticsServiceDaoImpl.writeOffCouponCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double sendIntegralCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportOthersStatisticsServiceDaoImpl.sendIntegralCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double writeOffIntegralCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportOthersStatisticsServiceDaoImpl.writeOffIntegralCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+}
+

+ 115 - 0
service-report/src/main/java/com/java110/report/statistics/IOthersStatistics.java

@@ -0,0 +1,115 @@
+package com.java110.report.statistics;
+
+
+import com.java110.dto.report.QueryStatisticsDto;
+
+/**
+ * 其他统计类
+ */
+public interface IOthersStatistics {
+
+
+    /**
+     * 查询场地预约数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long venueReservationCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询 合同数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long contractCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询资产变更数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long contractChangeCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询 租期变更
+     * @param queryStatisticsDto
+     * @return
+     */
+    long leaseChangeCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 查询主体变更
+     * @param queryStatisticsDto
+     * @return
+     */
+    long mainChange(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 到期合同
+     * @param queryStatisticsDto
+     * @return
+     */
+    long expirationContract(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 车辆数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long carCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 车位申请数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long carApplyCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 停车券购买数
+     * @param queryStatisticsDto
+     * @return
+     */
+    double buyParkingCouponCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 停车券核销
+     * @param queryStatisticsDto
+     * @return
+     */
+    long writeOffParkingCouponCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 赠送优惠券
+     * @param queryStatisticsDto
+     * @return
+     */
+    double sendCouponCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 核销优惠券
+     * @param queryStatisticsDto
+     * @return
+     */
+    long writeOffCouponCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 赠送积分
+     * @param queryStatisticsDto
+     * @return
+     */
+    double sendIntegralCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 核销积分
+     * @param queryStatisticsDto
+     * @return
+     */
+    double writeOffIntegralCount(QueryStatisticsDto queryStatisticsDto);
+
+
+}

+ 91 - 0
service-report/src/main/java/com/java110/report/statistics/impl/OthersStatisticsImpl.java

@@ -0,0 +1,91 @@
+package com.java110.report.statistics.impl;
+
+import com.java110.dto.report.QueryStatisticsDto;
+import com.java110.intf.report.IReportInoutStatisticsInnerServiceSMO;
+import com.java110.intf.report.IReportOthersStatisticsInnerServiceSMO;
+import com.java110.report.statistics.IInoutStatistics;
+import com.java110.report.statistics.IOthersStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 其他报表统计 实现类
+ */
+@Service
+public class OthersStatisticsImpl implements IOthersStatistics {
+
+    @Autowired
+    private IReportOthersStatisticsInnerServiceSMO reportOthersStatisticsInnerServiceSMOImpl;
+
+
+
+    @Override
+    public long venueReservationCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.venueReservationCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long contractCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.contractCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long contractChangeCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.contractChangeCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long leaseChangeCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.leaseChangeCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long mainChange(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.mainChange(queryStatisticsDto);
+    }
+
+    @Override
+    public long expirationContract(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.expirationContract(queryStatisticsDto);
+    }
+
+    @Override
+    public long carCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.carCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long carApplyCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.carApplyCount(queryStatisticsDto);
+    }
+
+    @Override
+    public double buyParkingCouponCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.buyParkingCouponCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long writeOffParkingCouponCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.writeOffParkingCouponCount(queryStatisticsDto);
+    }
+
+    @Override
+    public double sendCouponCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.sendCouponCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long writeOffCouponCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.writeOffCouponCount(queryStatisticsDto);
+    }
+
+    @Override
+    public double sendIntegralCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.sendIntegralCount(queryStatisticsDto);
+    }
+
+    @Override
+    public double writeOffIntegralCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportOthersStatisticsInnerServiceSMOImpl.writeOffIntegralCount(queryStatisticsDto);
+    }
+}