java110 před 2 roky
rodič
revize
2e58c159ce

+ 183 - 0
java110-db/src/main/resources/mapper/report/ReportInoutStatisticsServiceDaoImplMapper.xml

@@ -0,0 +1,183 @@
+<?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="reportInoutStatisticsServiceDaoImpl">
+
+    <!-- 进场车辆数 -->
+    <select id="getCarInCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from car_inout_detail t
+        where 1=1
+        and t.car_inout = '3306'
+        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="getCarOutCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from car_inout_detail t
+        where 1=1
+        and t.car_inout = '3307'
+        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="getPersonInCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from machine_record 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="getPersonFaceToMachineCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from machine_translate t
+        where 1=1
+        and t.type_cd = '8899'
+        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="purchaseInCount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.quantity),0) count from purchase_apply_detail t
+        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '10000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
+        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="purchaseOutCount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.quantity),0) count from purchase_apply_detail t
+        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '20000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
+        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="purchaseInAmount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.quantity*t.price),0) amount from purchase_apply_detail t
+        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '10000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
+        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="purchaseOutAmount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.quantity*t.price),0) amount from purchase_apply_detail t
+        inner join purchase_apply pa on t.apply_order_id = pa.apply_order_id and pa.res_order_type = '20000' and pa.status_cd = '0' and pa.state  in ('1003','1002')
+        where 1=1
+        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="allocationCount" parameterType="Map" resultType="Map">
+        select IFNULL(sum(t.apply_count),0) count
+        from allocation_storehouse_apply 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="roomRenovationCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from room_renovation 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="itemReleaseCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from item_release 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'
+        and t.state in ('W','D','C')
+    </select>
+
+    <!-- 交房数 -->
+    <select id="roomInCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from building_owner_room_rel t
+        inner join building_room br on t.room_id = br.room_id and br.status_cd = '0'
+        inner join building_owner bo on t.owner_id = bo.owner_id and bo.status_cd = '0'
+        where 1=1
+        and br.community_id =  #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+    <!-- 退房数 -->
+    <select id="roomOutCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from building_owner_room_rel t
+        inner join building_room br on t.room_id = br.room_id and br.status_cd = '0'
+        inner join building_owner bo on t.owner_id = bo.owner_id
+        where 1=1
+        and br.community_id =  #{communityId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '1'
+    </select>
+
+    <!-- 业主绑定数 -->
+    <select id="ownerRegisterCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from owner_app_user 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="noAttendanceCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from attendance_classes_task t
+        inner join attendance_classes ac on t.class_id = ac.classes_id and ac.status_cd = '0'
+        where 1=1
+        and t.state =  '10000'
+        and t.store_id = #{storeId}
+        and t.create_time &gt; #{startDate}
+        and t.create_time &lt; #{endDate}
+        and t.status_cd = '0'
+    </select>
+
+</mapper>

+ 67 - 0
java110-interface/src/main/java/com/java110/intf/report/IReportInoutStatisticsInnerServiceSMO.java

@@ -0,0 +1,67 @@
+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("/reportInoutStatisticsApi")
+public interface IReportInoutStatisticsInnerServiceSMO {
+
+
+    @RequestMapping(value = "/getCarInCount", method = RequestMethod.POST)
+    long getCarInCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getCarOutCount", method = RequestMethod.POST)
+    long getCarOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getPersonInCount", method = RequestMethod.POST)
+    long getPersonInCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/getPersonFaceToMachineCount", method = RequestMethod.POST)
+    long getPersonFaceToMachineCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseInCount", method = RequestMethod.POST)
+    long purchaseInCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseOutCount", method = RequestMethod.POST)
+    long purchaseOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseInAmount", method = RequestMethod.POST)
+    double purchaseInAmount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/purchaseOutAmount", method = RequestMethod.POST)
+    double purchaseOutAmount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/allocationCount", method = RequestMethod.POST)
+    long allocationCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomRenovationCount", method = RequestMethod.POST)
+    long roomRenovationCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/itemReleaseCount", method = RequestMethod.POST)
+    long itemReleaseCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomInCount", method = RequestMethod.POST)
+    long roomInCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/roomOutCount", method = RequestMethod.POST)
+    long roomOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/ownerRegisterCount", method = RequestMethod.POST)
+    long ownerRegisterCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+
+    @RequestMapping(value = "/noAttendanceCount", method = RequestMethod.POST)
+    long noAttendanceCount(@RequestBody QueryStatisticsDto queryStatisticsDto);
+}

+ 164 - 0
service-report/src/main/java/com/java110/report/cmd/dataReport/QueryInoutDataReportCmd.java

@@ -0,0 +1,164 @@
+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.IOrderStatistics;
+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.queryInoutDataReport")
+public class QueryInoutDataReportCmd extends Cmd {
+
+    @Autowired
+    private IInoutStatistics inoutStatisticsImpl;
+
+    @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 查询 进场车辆数
+        double carInCount = inoutStatisticsImpl.getCarInCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","进场车辆数");
+        data.put("value", carInCount);
+        datas.add(data);
+
+        // todo 查询 出场车辆数
+        double carOutCount = inoutStatisticsImpl.getCarOutCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","出场车辆数");
+        data.put("value", carOutCount);
+        datas.add(data);
+
+        // todo 查询 进场人员数
+        double personInCount = inoutStatisticsImpl.getPersonInCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","进场人员数");
+        data.put("value", personInCount);
+        datas.add(data);
+
+
+        // todo 查询 人脸同步数
+        double personFaceToMachine = inoutStatisticsImpl.getPersonFaceToMachineCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","人脸同步数");
+        data.put("value", personFaceToMachine);
+        datas.add(data);
+
+        // todo 查询 采购入库数
+        double purchaseInCount = inoutStatisticsImpl.purchaseInCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","采购入库数");
+        data.put("value", purchaseInCount);
+        datas.add(data);
+
+        // todo 查询 领用出库数
+        double purchaseOutCount = inoutStatisticsImpl.purchaseOutCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","领用出库数");
+        data.put("value", purchaseOutCount);
+        datas.add(data);
+
+        // todo 查询 采购入库金额
+        double purchaseInAmount = inoutStatisticsImpl.purchaseInAmount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","采购入库金额");
+        data.put("value", purchaseInAmount);
+        datas.add(data);
+
+        // todo 查询 领用出库金额
+        double purchaseOutAmount = inoutStatisticsImpl.purchaseOutAmount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","完成巡检");
+        data.put("value", purchaseOutAmount);
+        datas.add(data);
+
+        // todo 查询 调拨数量
+        double allocationCount = inoutStatisticsImpl.allocationCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","调拨数量");
+        data.put("value", allocationCount);
+        datas.add(data);
+
+        // todo 查询 房屋装修数
+        double roomRenovationCount = inoutStatisticsImpl.roomRenovationCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","房屋装修数");
+        data.put("value", roomRenovationCount);
+        datas.add(data);
+
+        // todo 查询 物品放行
+        double itemReleaseCount = inoutStatisticsImpl.itemReleaseCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","物品放行");
+        data.put("value", itemReleaseCount);
+        datas.add(data);
+
+        // todo 查询 交房数量
+        double roomInCount = inoutStatisticsImpl.roomInCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","交房数量");
+        data.put("value", roomInCount);
+        datas.add(data);
+
+        // todo 查询 退房数量
+        double roomOutCount = inoutStatisticsImpl.roomOutCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","退房数量");
+        data.put("value", roomOutCount);
+        datas.add(data);
+
+        // todo 查询 业主绑定
+        double ownerRegisterCount = inoutStatisticsImpl.ownerRegisterCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","业主绑定");
+        data.put("value", ownerRegisterCount);
+        datas.add(data);
+
+        // todo 查询 未考勤数
+        double noAttendanceCount = inoutStatisticsImpl.noAttendanceCount(queryStatisticsDto);
+        data = new JSONObject();
+        data.put("name","未考勤数");
+        data.put("value", noAttendanceCount);
+        datas.add(data);
+
+        context.setResponseEntity(ResultVo.createResponseEntity(datas));
+    }
+}

+ 39 - 0
service-report/src/main/java/com/java110/report/dao/IReportInoutStatisticsServiceDao.java

@@ -0,0 +1,39 @@
+package com.java110.report.dao;
+
+import java.util.Map;
+
+/**
+ * 费用统计 dao 层
+ */
+public interface IReportInoutStatisticsServiceDao {
+
+    long getCarInCount(Map info);
+
+    long getCarOutCount(Map info);
+
+    long getPersonInCount(Map info);
+
+    long getPersonFaceToMachineCount(Map info);
+
+    long purchaseInCount(Map info);
+
+    long purchaseOutCount(Map info);
+
+    double purchaseInAmount(Map info);
+
+    double purchaseOutAmount(Map info);
+
+    long allocationCount(Map info);
+
+    long roomRenovationCount(Map info);
+
+    long itemReleaseCount(Map info);
+
+    long roomInCount(Map info);
+
+    long roomOutCount(Map info);
+
+    long ownerRegisterCount(Map info);
+
+    long noAttendanceCount(Map info);
+}

+ 222 - 0
service-report/src/main/java/com/java110/report/dao/impl/ReportInoutStatisticsServiceDaoImpl.java

@@ -0,0 +1,222 @@
+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.IReportInoutStatisticsServiceDao;
+import com.java110.report.dao.IReportOrderStatisticsServiceDao;
+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("reportInoutStatisticsServiceDaoImpl")
+public class ReportInoutStatisticsServiceDaoImpl extends BaseServiceDao implements IReportInoutStatisticsServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(ReportInoutStatisticsServiceDaoImpl.class);
+
+
+    @Override
+    public long getCarInCount(Map info) {
+        logger.debug("查询 getCarInCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.getCarInCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long getCarOutCount(Map info) {
+        logger.debug("查询 getCarOutCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.getCarOutCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long getPersonInCount(Map info) {
+        logger.debug("查询 getPersonInCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.getPersonInCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long getPersonFaceToMachineCount(Map info) {
+        logger.debug("查询 getPersonFaceToMachineCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.getPersonFaceToMachineCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long purchaseInCount(Map info) {
+        logger.debug("查询 purchaseInCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.purchaseInCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long purchaseOutCount(Map info) {
+        logger.debug("查询 purchaseOutCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.purchaseOutCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public double purchaseInAmount(Map info) {
+        logger.debug("查询 purchaseInAmount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.purchaseInAmount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Double.parseDouble(infos.get(0).get("amount").toString());
+    }
+
+    @Override
+    public double purchaseOutAmount(Map info) {
+        logger.debug("查询 purchaseOutAmount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.purchaseOutAmount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Double.parseDouble(infos.get(0).get("amount").toString());
+    }
+
+    @Override
+    public long allocationCount(Map info) {
+        logger.debug("查询 allocationCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.allocationCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long roomRenovationCount(Map info) {
+        logger.debug("查询 roomRenovationCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.roomRenovationCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long itemReleaseCount(Map info) {
+        logger.debug("查询 itemReleaseCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.itemReleaseCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long roomInCount(Map info) {
+        logger.debug("查询 roomInCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.roomInCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long roomOutCount(Map info) {
+        logger.debug("查询 roomOutCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.roomOutCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long ownerRegisterCount(Map info) {
+        logger.debug("查询 ownerRegisterCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.ownerRegisterCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+
+    @Override
+    public long noAttendanceCount(Map info) {
+        logger.debug("查询 noAttendanceCount 入参 info : {}", JSONObject.toJSONString(info));
+
+        List<Map> infos = sqlSessionTemplate.selectList("reportInoutStatisticsServiceDaoImpl.noAttendanceCount", info);
+
+        if (infos == null || infos.size() < 1) {
+            return 0;
+        }
+
+        return Long.parseLong(infos.get(0).get("count").toString());
+    }
+}

+ 120 - 0
service-report/src/main/java/com/java110/report/smo/impl/ReportInnerStatisticsInnerServiceSMOImpl.java

@@ -0,0 +1,120 @@
+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.report.dao.IReportInoutStatisticsServiceDao;
+import com.java110.report.dao.IReportOrderStatisticsServiceDao;
+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 ReportInnerStatisticsInnerServiceSMOImpl
+ * @Description 出入类统计类
+ * @Author wuxw
+ * @Date 2019/4/24 9:20
+ * @Version 1.0
+ * add by wuxw 2019/4/24
+ **/
+@RestController
+public class ReportInnerStatisticsInnerServiceSMOImpl extends BaseServiceSMO implements IReportInoutStatisticsInnerServiceSMO {
+
+    @Autowired
+    private IReportInoutStatisticsServiceDao reportInoutStatisticsServiceDaoImpl;
+
+
+
+    @Override
+    public long getCarInCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.getCarInCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long getCarOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.getCarOutCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long getPersonInCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.getPersonInCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long getPersonFaceToMachineCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.getPersonFaceToMachineCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long purchaseInCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.purchaseInCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long purchaseOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.purchaseOutCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double purchaseInAmount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportInoutStatisticsServiceDaoImpl.purchaseInAmount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public double purchaseOutAmount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        double info = reportInoutStatisticsServiceDaoImpl.purchaseOutAmount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long allocationCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.allocationCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long roomRenovationCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.roomRenovationCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long itemReleaseCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.itemReleaseCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long roomInCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.roomInCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long roomOutCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.roomOutCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long ownerRegisterCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.ownerRegisterCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+
+    @Override
+    public long noAttendanceCount(@RequestBody QueryStatisticsDto queryStatisticsDto) {
+        long info = reportInoutStatisticsServiceDaoImpl.noAttendanceCount(BeanConvertUtil.beanCovertMap(queryStatisticsDto));
+        return info;
+    }
+}
+

+ 120 - 0
service-report/src/main/java/com/java110/report/statistics/IInoutStatistics.java

@@ -0,0 +1,120 @@
+package com.java110.report.statistics;
+
+
+import com.java110.dto.report.QueryStatisticsDto;
+
+/**
+ * 出入统计类
+ */
+public interface IInoutStatistics {
+
+
+    /**
+     * 查询进场车辆数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long getCarInCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询出场车辆数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long getCarOutCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询进场人员数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long getPersonInCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 查询 人脸同步数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long getPersonFaceToMachineCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 采购入库数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long purchaseInCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 领用出库数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long purchaseOutCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 采购入库金额
+     * @param queryStatisticsDto
+     * @return
+     */
+    double purchaseInAmount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 领用出库金额
+     * @param queryStatisticsDto
+     * @return
+     */
+    double purchaseOutAmount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 调拨数量
+     * @param queryStatisticsDto
+     * @return
+     */
+    long allocationCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 房屋装修数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long roomRenovationCount(QueryStatisticsDto queryStatisticsDto);
+
+
+    /**
+     * 物品放行
+     * @param queryStatisticsDto
+     * @return
+     */
+    long itemReleaseCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 交房数量
+     * @param queryStatisticsDto
+     * @return
+     */
+    long roomInCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 退房数量
+     * @param queryStatisticsDto
+     * @return
+     */
+    long roomOutCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 业主绑定
+     * @param queryStatisticsDto
+     * @return
+     */
+    long ownerRegisterCount(QueryStatisticsDto queryStatisticsDto);
+
+    /**
+     * 未考勤数
+     * @param queryStatisticsDto
+     * @return
+     */
+    long noAttendanceCount(QueryStatisticsDto queryStatisticsDto);
+}

+ 102 - 0
service-report/src/main/java/com/java110/report/statistics/impl/InoutStatisticsImpl.java

@@ -0,0 +1,102 @@
+package com.java110.report.statistics.impl;
+
+import com.java110.dto.report.QueryStatisticsDto;
+import com.java110.intf.report.IReportInoutStatisticsInnerServiceSMO;
+import com.java110.intf.report.IReportOrderStatisticsInnerServiceSMO;
+import com.java110.report.statistics.IInoutStatistics;
+import com.java110.report.statistics.IOrderStatistics;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 基础报表统计 实现类
+ */
+@Service
+public class InoutStatisticsImpl implements IInoutStatistics {
+
+    @Autowired
+    private IReportInoutStatisticsInnerServiceSMO reportInoutStatisticsInnerServiceSMOImpl;
+
+
+    /**
+     * 查询投诉工单数
+     * @param queryStatisticsDto
+     * @return
+     */
+    @Override
+    public long getCarInCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.getCarInCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long getCarOutCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.getCarOutCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long getPersonInCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.getPersonInCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long getPersonFaceToMachineCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.getPersonFaceToMachineCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long purchaseInCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.purchaseInCount(queryStatisticsDto);
+
+    }
+
+    @Override
+    public long purchaseOutCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.purchaseOutCount(queryStatisticsDto);
+    }
+
+    @Override
+    public double purchaseInAmount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.purchaseInAmount(queryStatisticsDto);
+    }
+
+    @Override
+    public double purchaseOutAmount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.purchaseOutAmount(queryStatisticsDto);
+    }
+
+    @Override
+    public long allocationCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.allocationCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long roomRenovationCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.roomRenovationCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long itemReleaseCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.itemReleaseCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long roomInCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.roomInCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long roomOutCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.roomOutCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long ownerRegisterCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.ownerRegisterCount(queryStatisticsDto);
+    }
+
+    @Override
+    public long noAttendanceCount(QueryStatisticsDto queryStatisticsDto) {
+        return reportInoutStatisticsInnerServiceSMOImpl.noAttendanceCount(queryStatisticsDto);
+    }
+
+}