huangchengzdm 8 лет назад
Родитель
Сommit
2a37560c04

+ 1 - 0
VisualInspection/fwq/js/other_check/other_check.js

@@ -34,6 +34,7 @@ function init() {
         format: 'YYYY-MM-DD hh:mm',
         zIndex: 300000000000 // 分隔符可以任意定义,该例子表示只显示年月日
     });
+    $("#month_date").val(getCurrentTimeFormat());
     var road_manager;
     if (roleContains("STATION") || roleContains("WRECKER")) {
         road_manager = getCurrentUser().road_manager_id;

+ 1 - 1
VisualInspection/fwq/js/statistics/dept_check_statistics.js

@@ -16,7 +16,7 @@ $(function() {
     });
 
     $("#month_date_from").val("2018/04");
-    $("#month_date_to").val(moment(moment().format("YYYY/MM")).subtract(1, "month").format("YYYY/MM"));
+    $("#month_date_to").val(getCurrentTimeFormat());
 
 
     $("#searchbtn").on("click", function() {

+ 1 - 1
VisualInspection/fwq/js/statistics/service_area_check_statistics.js

@@ -16,7 +16,7 @@ $(function() {
     });
 
     $("#month_date_from").val("2018-04");
-    $("#month_date_to").val(moment(moment().format("YYYY-MM")).subtract(1, "month").format("YYYY-MM"));
+    $("#month_date_to").val(getCurrentTimeFormat());
 
 
     $("#searchbtn").on("click", function() {

+ 13 - 20
VisualInspection/fwq/js/statistics/service_area_data_statistics.js

@@ -18,6 +18,7 @@ $.jeDate("#start-time", {
     isinitVal: true,
     format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
 });
+$("#start-time").val(getCurrentTimeFormat());
 
 var t = getTimeByMonth($("#start-time").val());
 var start_date = getMomentTimeFormat(t.starttime);
@@ -77,51 +78,43 @@ $(function() {
         var url_t = "f/statistics/employee/order/detail"
         post_common_service(url_t, data_t, function(res) {
 
-            $("#c_dept_ranking").html("-");
-            $("#c_road_ranking").html("-");
             $("#c_com_ranking").html("-");
-            $("#c_score_ranking").html("-");
-            $("#l_dept_ranking").html("-");
-            $("#l_road_ranking").html("-");
+            $("#c_score_ranking").html("-");         
             $("#l_com_ranking").html("-");
             $("#l_score_ranking").html("-");
 
             var isshow_c = false;
             var isshow_l = false;
             if (typeof(res.currentP) != undefined && res.currentP != null) {
-                var p = res.currentP;
-                $("#c_dept_ranking").html(p.service_area_ranking == undefined ? "-" : p.service_area_ranking);
+                var p = res.currentP;          
                 $("#c_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
                 $("#c_score_ranking").html(p.check_all_score + p.check_all_m_score);
-                $("#c_road_ranking").html(p.center_ranking == undefined ? "-" : p.center_ranking);
                 isshow_c = true;
             }
             if (typeof(res.lastP) != undefined && res.lastP != null) {
                 var p = res.lastP;
-                $("#l_dept_ranking").html(p.service_area_ranking == undefined ? "-" : p.service_area_ranking);
                 $("#l_com_ranking").html(p.company_ranking == undefined ? "-" : p.company_ranking);
                 $("#l_score_ranking").html(p.check_all_score + p.check_all_m_score);
-                $("#l_road_ranking").html(p.center_ranking == undefined ? "-" : p.center_ranking);
                 isshow_l = true;
             }
 
             if (isshow_c && isshow_l) {
                 var p_c = res.currentP;
                 var p_l = res.lastP;
-                if (p_c.service_area_ranking != undefined && p_l.service_area_ranking != undefined) {
-                    var dept_r = p_c.service_area_ranking - p_l.service_area_ranking;
-                    if (dept_r != 0) {
-                        $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
-                    }
+                // if (p_c.service_area_ranking != undefined && p_l.service_area_ranking != undefined) {
+                    // var dept_r = p_c.service_area_ranking - p_l.service_area_ranking;
+                    // if (dept_r != 0) {
+                    //     $("#c_dept_ranking").html($("#c_dept_ranking").html() + "<i style='margin-left:10px;color:" + (dept_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (dept_r > 0 ? "down" : "up") + "'>" + Math.abs(dept_r) + "</i>");
+                    // }
                     var com_r = p_c.company_ranking - p_l.company_ranking;
                     if (com_r != 0) {
                         $("#c_com_ranking").html($("#c_com_ranking").html() + "<i style='margin-left:10px;color:" + (com_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (com_r > 0 ? "down" : "up") + "'>" + Math.abs(com_r) + "</i>");
                     }
-                    var road_r = p_c.center_ranking - p_l.center_ranking;
-                    if (road_r != 0) {
-                        $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
-                    }
-                }
+                    // var road_r = p_c.center_ranking - p_l.center_ranking;
+                    // if (road_r != 0) {
+                    //     $("#c_road_ranking").html($("#c_road_ranking").html() + "<i style='margin-left:10px;color:" + (road_r > 0 ? "red" : "#0aef3d") + "' class='icon icon-long-arrow-" + (road_r > 0 ? "down" : "up") + "'>" + Math.abs(road_r) + "</i>");
+                    // }
+                // }
             }
         }, function(error) {})
 

+ 1 - 0
VisualInspection/fwq/js/statistics/total_company_statistics.js

@@ -46,6 +46,7 @@ $(function() {
         isinitVal: true,
         format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
     });
+    $("#month_date").val(getCurrentTimeFormat());
 
     var p = $.zui.store.get('store_param_' + current_url);
     $.zui.store.set('store_param_' + current_url, null)

+ 1 - 0
VisualInspection/fwq/view/statistics/assess_type.html

@@ -74,6 +74,7 @@
             isinitVal: true,
             format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
         });
+        $("#start-time").val(getCurrentTimeFormat());
         initQueryType();
     });
 </script>

+ 1 - 0
VisualInspection/fwq/view/statistics/operation_management_integration.html

@@ -71,6 +71,7 @@
             isinitVal: true,
             format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
         });
+        $("#start-time").val(getCurrentTimeFormat());
         initQueryType();
     });
 </script>

+ 0 - 4
VisualInspection/fwq/view/statistics/service_area_data_statistics.html

@@ -48,8 +48,6 @@
         <div class="line-5"></div>
         <div class="current-month">
             <span style="margin-left:20px;">本月:</span>
-            <span style="margin-left:50px;">区内排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_dept_ranking">-</span>
-            <span>道管排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_road_ranking">-</span>
             <span>公司排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_com_ranking">-</span>
             <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="c_score_ranking">-</span>
 
@@ -57,8 +55,6 @@
         <div class="line-6"></div>
         <div class="next-month">
             <span style="margin-left:20px;">上月:</span>
-            <span style="margin-left:50px;">区内排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_dept_ranking">-</span>
-            <span>道管排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_road_ranking">-</span>
             <span>公司排名:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_com_ranking">-</span>
             <span>总扣分:</span><span style="display: -moz-inline-box;display: inline-block;width:100px" id="l_score_ranking">-</span>
 

+ 20 - 12
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleController.java

@@ -1,17 +1,5 @@
 package com.xintong.visualinspection.controller;
 
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.validation.Valid;
-
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.mysql.jdbc.StringUtils;
@@ -19,6 +7,18 @@ import com.xintong.system.err.BusinessException;
 import com.xintong.visualinspection.bean.CheckItem;
 import com.xintong.visualinspection.bean.CheckRule;
 import com.xintong.visualinspection.service.CheckRuleService;
+import com.xintong.visualinspection.service.ItemService;
+import com.xintong.visualinspection.util.CacheUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.validation.Valid;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 /**
  * 文件名:TestController
@@ -30,6 +30,8 @@ public class CheckRuleController extends BaseController {
 
     @Autowired
     private CheckRuleService checkRuleService;
+	@Autowired
+	private ItemService itemService;
 
     /**
      * 获取所有考核办法及下面的
@@ -55,6 +57,8 @@ public class CheckRuleController extends BaseController {
     @RequestMapping(value = "/add")
     public String add(@Valid @RequestBody CheckRule checkRule){
     	checkRuleService.insert(checkRule);
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult("添加成功");
     }
     
@@ -71,6 +75,8 @@ public class CheckRuleController extends BaseController {
     		throw new BusinessException(20002);
     	}
     	checkRuleService.update(checkRule);
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult("修改成功");
     }
     
@@ -87,6 +93,8 @@ public class CheckRuleController extends BaseController {
     		throw new BusinessException(20002);
     	}
     	checkRuleService.delete(checkRule.getId());
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult("删除成功");
     }
     

+ 11 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckRuleItemController.java

@@ -4,6 +4,8 @@ import java.util.List;
 
 import javax.validation.Valid;
 
+import com.xintong.visualinspection.service.ItemService;
+import com.xintong.visualinspection.util.CacheUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -23,7 +25,9 @@ import com.xintong.visualinspection.service.CheckRuleItemService;
 public class CheckRuleItemController extends BaseController {
 
 	@Autowired
-	private CheckRuleItemService checkRuleItemService ;
+	private CheckRuleItemService checkRuleItemService;
+	@Autowired
+	private ItemService itemService;
 	
 	/**
      * 增加考核项
@@ -38,6 +42,8 @@ public class CheckRuleItemController extends BaseController {
     		throw new BusinessException(20002);
     	}
     	checkRuleItemService.insert(checkItem);
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult("增加成功");
     }
     
@@ -52,6 +58,8 @@ public class CheckRuleItemController extends BaseController {
     		throw new BusinessException(20002);
     	}
     	String returnMsg = checkRuleItemService.insertList(checkItems);
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult(returnMsg==null?"增加成功":returnMsg);
     }
     
@@ -69,6 +77,8 @@ public class CheckRuleItemController extends BaseController {
     		throw new BusinessException(20002);
     	}
     	checkRuleItemService.delete(checkItem);
+		CacheUtil.refreshItemMap(itemService);
+		CacheUtil.refreshItemNameMap(itemService);
     	return super.returnSuccessResult("删除成功");
     }
 }

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/gettway/StatisticsController_F.java

@@ -71,7 +71,7 @@ public class StatisticsController_F extends BaseController {
             totalOnsiteNum += bean.getOnsite_check_num();
             totalOnsiteScore += bean.getOnsite_total_score();
         }
-        Map<String, Object> resultMap = new HashMap<String, Object>();
+        Map<String, Object> resultMap = new HashMap<>();
         resultMap.put("list", lists);
         resultMap.put("totalCompanyNum", totalCompanyNum);
         resultMap.put("totalCompanyScore", totalCompanyScore);

+ 61 - 55
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/StatisticsServiceImpl.java

@@ -73,6 +73,8 @@ public class StatisticsServiceImpl implements StatisticsService_F {
             mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
         }
 
+        // 获取公司检查的某个收费站的受检次数和扣分合计
+        List<FwqStatisticsBean> company_beans =  getFeeStationCheckItemScore(obj);
         // 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
         obj.setCheck_type(8);
         List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
@@ -80,6 +82,10 @@ public class StatisticsServiceImpl implements StatisticsService_F {
         obj.setCheck_type(9);
         List<FwqStatisticsBean> onsite_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
 
+        for (FwqStatisticsBean company_bean : company_beans) {
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_check_num(company_bean.getChecked_num());
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_total_score(company_bean.getAll_check_score());
+        }
         for (FwqStatisticsBean third_bean : third_beans) {
             mapStationInfos.get(third_bean.getDept_id()).setThird_check_num(third_bean.getChecked_num() > 1 ? 1 : third_bean.getChecked_num());
             mapStationInfos.get(third_bean.getDept_id()).setThird_total_score(third_bean.getCheck_total_score());
@@ -170,23 +176,23 @@ public class StatisticsServiceImpl implements StatisticsService_F {
         SimpleDateFormat ff1 = new SimpleDateFormat("MM月");
 
         for (CheckTaskPeriod p : checkTaskPeriods) {
-            if (obj.getStart_date() == p.getEndtime().getTime()) {
+            if (obj.getStart_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
                 obj.setStartperiod_id(p.getId());
             }
-            if (obj.getEnd_date() == p.getEndtime().getTime()) {
+            if (obj.getEnd_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
                 obj.setEndperiod_id(p.getId());
             }
         }
-        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime())) {
+        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             return null;
         }
-        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime())) {
+        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             return null;
         }
-        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime())) {
+        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             obj.setStartperiod_id(checkTaskPeriods.get(0).getId());
         }
-        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime())) {
+        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
         }
 
@@ -463,8 +469,8 @@ public class StatisticsServiceImpl implements StatisticsService_F {
         CheckTaskPeriod lastTaskPeriod = commonService.getCheckTaskPeriod(obj.getStart_date().getTime(), obj.getEnd_date().getTime());
         if (lastTaskPeriod != null) {
             FwqStatisticsBean temp = new FwqStatisticsBean();
-            temp.setStart_date(new Date(lastTaskPeriod.getStarttime().getTime()));
-            temp.setEnd_date(new Date(lastTaskPeriod.getEndtime().getTime()));
+            temp.setStart_date(new Date(lastTaskPeriod.getStarttime().getTime() - 1 * 1000 * 60 * 60));
+            temp.setEnd_date(new Date(lastTaskPeriod.getEndtime().getTime() - 1 * 1000 * 60 * 60));
             List<FwqStatisticsBo> list = getEmployeeCheckedInfo(temp);
             if (list == null || list.size() < 1) {
                 return data;
@@ -657,24 +663,24 @@ public class StatisticsServiceImpl implements StatisticsService_F {
         });
         // 道管Map
         // 排名
-        Map<String, Integer> center_ranking = new HashMap<>();
+//        Map<String, Integer> center_ranking = new HashMap<>();
         // 留last
-        Map<String, FwqStatisticsBo> center_ranking2 = new HashMap<>();
-        center_ranking.put("30", 1);
-        center_ranking.put("31", 1);
-        center_ranking.put("32", 1);
-
-        center_ranking2.put("30", null);
-        center_ranking2.put("31", null);
-        center_ranking2.put("32", null);
+//        Map<String, FwqStatisticsBo> center_ranking2 = new HashMap<>();
+//        center_ranking.put("30", 1);
+//        center_ranking.put("31", 1);
+//        center_ranking.put("32", 1);
+//
+//        center_ranking2.put("30", null);
+//        center_ranking2.put("31", null);
+//        center_ranking2.put("32", null);
 
-        Map<String, Integer> service_area_ranking = new HashMap<>();
-        Map<String, FwqStatisticsBo> service_area_ranking2 = new HashMap<>();
+//        Map<String, Integer> service_area_ranking = new HashMap<>();
+//        Map<String, FwqStatisticsBo> service_area_ranking2 = new HashMap<>();
         // 这边需要对道管和服务区进行排名
-        for (FeeStation fee : saList) {
-            service_area_ranking.put(fee.getDeptid(), 1);
-            service_area_ranking2.put(fee.getDeptid(), null);
-        }
+//        for (FeeStation fee : saList) {
+//            service_area_ranking.put(fee.getDeptid(), 1);
+//            service_area_ranking2.put(fee.getDeptid(), null);
+//        }
 
         for (int i = 0; i < lists.size(); i++) {
 
@@ -691,34 +697,34 @@ public class StatisticsServiceImpl implements StatisticsService_F {
 
             // 累计道管排名
             // 获取道管id
-            String centerId = deptMap.get(statisticsBo.getDept_id()).getParentid().toString();
-
-            if (center_ranking2.get(centerId) == null) {
-                statisticsBo.setCenter_ranking(center_ranking.get(centerId));
-            } else {
-                center_ranking.put(centerId, center_ranking.get(centerId) + 1);
-                if (statisticsBo.compareTo(center_ranking2.get(centerId)) == 0) {
-                    statisticsBo.setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
-                } else {
-                    statisticsBo.setCenter_ranking(center_ranking.get(centerId));
-                }
-            }
-            center_ranking2.put(centerId, statisticsBo);
+//            String centerId = deptMap.get(statisticsBo.getDept_id()).getParentid().toString();
+//
+//            if (center_ranking2.get(centerId) == null) {
+//                statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+//            } else {
+//                center_ranking.put(centerId, center_ranking.get(centerId) + 1);
+//                if (statisticsBo.compareTo(center_ranking2.get(centerId)) == 0) {
+//                    statisticsBo.setCenter_ranking(center_ranking2.get(centerId).getCenter_ranking());
+//                } else {
+//                    statisticsBo.setCenter_ranking(center_ranking.get(centerId));
+//                }
+//            }
+//            center_ranking2.put(centerId, statisticsBo);
 
             // 累计服务区的排名
-            String serviceAreaId = statisticsBo.getDept_id().toString();
-
-            if (service_area_ranking2.get(serviceAreaId) == null) {
-                statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
-            } else {
-                service_area_ranking.put(serviceAreaId, service_area_ranking.get(serviceAreaId) + 1);
-                if (statisticsBo.compareTo(service_area_ranking2.get(serviceAreaId)) == 0) {
-                    statisticsBo.setService_area_ranking(service_area_ranking2.get(serviceAreaId).getService_area_ranking());
-                } else {
-                    statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
-                }
-            }
-            service_area_ranking2.put(serviceAreaId, statisticsBo);
+//            String serviceAreaId = statisticsBo.getDept_id().toString();
+
+//            if (service_area_ranking2.get(serviceAreaId) == null) {
+//                statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
+//            } else {
+//                service_area_ranking.put(serviceAreaId, service_area_ranking.get(serviceAreaId) + 1);
+//                if (statisticsBo.compareTo(service_area_ranking2.get(serviceAreaId)) == 0) {
+//                    statisticsBo.setService_area_ranking(service_area_ranking2.get(serviceAreaId).getService_area_ranking());
+//                } else {
+//                    statisticsBo.setService_area_ranking(service_area_ranking.get(serviceAreaId));
+//                }
+//            }
+//            service_area_ranking2.put(serviceAreaId, statisticsBo);
 
             // 公司排名s
             if (i == 0) {
@@ -1026,23 +1032,23 @@ public class StatisticsServiceImpl implements StatisticsService_F {
         Map<Long, Organ> deptMap = commonService.getDeptMap();
 
         for (CheckTaskPeriod p : checkTaskPeriods) {
-            if (obj.getStart_date() == p.getEndtime().getTime()) {
+            if (obj.getStart_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
                 obj.setStartperiod_id(p.getId());
             }
-            if (obj.getEnd_date() == p.getEndtime().getTime()) {
+            if (obj.getEnd_date() + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
                 obj.setEndperiod_id(p.getId());
             }
         }
-        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime())) {
+        if (obj.getStart_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             return new ArrayList<>();
         }
-        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime())) {
+        if (obj.getEnd_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             return new ArrayList<>();
         }
-        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime())) {
+        if (obj.getStart_date() < (checkTaskPeriods.get(0).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             obj.setStartperiod_id(checkTaskPeriods.get(0).getId());
         }
-        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime())) {
+        if (obj.getEnd_date() > (checkTaskPeriods.get(checkTaskPeriods.size() - 1).getEndtime().getTime() - 1 * 1000 * 60 * 60)) {
             obj.setEndperiod_id(checkTaskPeriods.get(checkTaskPeriods.size() - 1).getId());
         }
 

+ 6 - 2
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/StatisticsService_FImpl.java

@@ -71,6 +71,8 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             mapStationInfos.put(Long.valueOf(sta.getDeptid()), obj2);
         }
 
+        // 获取公司检查的某个收费站的受检次数和扣分合计
+        List<FwqStatisticsBean> company_beans =  getFeeStationCheckItemScore(obj);
         // 获取第三方暗访稽查的某个服务区的受检次数和扣分合计
         obj.setCheck_type(8);
         List<FwqStatisticsBean> third_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
@@ -78,6 +80,10 @@ public class StatisticsService_FImpl implements StatisticsService_F {
         obj.setCheck_type(9);
         List<FwqStatisticsBean> onsite_beans = fwqStatisticsDao.getselectFeeStationOperationScoreDetail(obj);
 
+        for (FwqStatisticsBean company_bean : company_beans) {
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_check_num(company_bean.getChecked_num());
+            mapStationInfos.get(company_bean.getDept_id()).setCompany_total_score(company_bean.getAll_check_score());
+        }
         for (FwqStatisticsBean third_bean : third_beans) {
             mapStationInfos.get(third_bean.getDept_id()).setThird_check_num(third_bean.getChecked_num() > 1 ? 1 : third_bean.getChecked_num());
             mapStationInfos.get(third_bean.getDept_id()).setThird_total_score(third_bean.getCheck_total_score());
@@ -144,8 +150,6 @@ public class StatisticsService_FImpl implements StatisticsService_F {
             }
         }
 
-//        threadTaskService.saveDeptStatic(sortList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
-
         return sortList;
     }