Procházet zdrojové kódy

将条件中的25日的23:00:00全部改为26号的00:00:00

huangchengzdm před 8 roky
rodič
revize
44d61dfbbe

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

@@ -126,7 +126,7 @@ $("#save-check").click(function() {
         // var check_time_name = timeStamp2String(new Date(),"yyyy/MM");
         var check_time_name = timeStamp2String(new Date((check_time + ":00").replace("-g-/", "")), "yyyy/MM");
         var timeday = moment(check_time);
-        var timec = moment(timeday.get("year") + "-" + (timeday.get('month') + 1) + "-25 23:00:00");
+        var timec = moment(timeday.get("year") + "-" + (timeday.get('month') + 1) + "-26 00:00:00");
 
 
         if (timeday.valueOf() > timec.valueOf()) {

+ 11 - 11
VisualInspection/fwq/js/statistics/operation_management_integration.js

@@ -18,14 +18,14 @@ function queryTypeClick() {
         tip("请选择起止日期");
         return;
     } else {
-        start_date += " 23:00:00";
-        end_date += " 23:00:00";
+        start_date += " 00:00:00";
+        end_date += " 00:00:00";
     }
     var startStr = start_date.replace(/-/g, '/');
     var endStr = end_date.replace(/-/g, '/');
     var start = new Date(startStr);
     //开始日期取前一天的23:00
-    start.setDate(start.getDate() - 1);
+    // start.setDate(start.getDate() - 1);
     start_date = start.Format("yyyy-MM-dd HH:mm:ss");
     var end = new Date(endStr);
     if (start > end) {
@@ -58,21 +58,21 @@ function initQueryType() {
     if (tdaytime.get('D') >= 26) {
         start_time = tdaytime.set('date', 26).format("YYYY-MM-DD");
         tdaytime = moment();
-        end_time = tdaytime.set('date', 25).add(1, 'M').format("YYYY-MM-DD");
+        end_time = tdaytime.set('date', 26).add(1, 'M').format("YYYY-MM-DD");
     } else {
         start_time = tdaytime.set('date', 26).subtract(1, 'M').format("YYYY-MM-DD");
         tdaytime = moment();
-        end_time = tdaytime.set('date', 25).format("YYYY-MM-DD");
+        end_time = tdaytime.set('date', 26).format("YYYY-MM-DD");
 
     }
     // 默认初始化时间页面回显
     $("#start-time").val(start_time);
     $("#end-time").val(end_time);
-    var start_date = start_time + " 23:00:00";
-    var end_date = end_time + " 23:00:00";
+    var start_date = start_time + " 00:00:00";
+    var end_date = end_time + " 00:00:00";
     var start = new Date(start_date);
     //开始日期取前一天的23:00
-    start.setDate(start.getDate() - 1);
+    // start.setDate(start.getDate() - 1);
     start_date = start.Format("yyyy-MM-dd HH:mm:ss");
     var param = {
         "start_date": start_date,
@@ -198,11 +198,11 @@ function exportExcel() {
         tip("请选择起止日期");
         return;
     } else {
-        start_date += " 23:00:00";
-        end_date += " 23:00:00";
+        start_date += " 00:00:00";
+        end_date += " 00:00:00";
         var start = new Date(start_date);
         //开始日期取前一天的23:00
-        start.setDate(start.getDate() - 1);
+        // start.setDate(start.getDate() - 1);
         start_date = start.Format("yyyy-MM-dd HH:mm:ss");
     }
     window.open(getExcelServeraddr() + "f/file/operation/manage/integration?start_date=" + start_date + "&end_date=" + end_date);

+ 143 - 145
Visuallnspection_fjq/visuallnspection_fjq/src/main/java/com/xintong/visualinspection/visuallnspection_fjq/service/impl/CheckOtherServiceImpl.java

@@ -16,8 +16,6 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -44,10 +42,10 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     @Autowired
     private FwqCheckOtherDao fwqCheckOtherDao;
 
-//    @Reference(version = "1.0.0",
-//            application = "${dubbo.application.id}",
-//            registry = "${dubbo.registry.address}")
-//    private CommonService commonService;
+    @Reference(version = "1.0.0",
+            application = "${dubbo.application.id}",
+            registry = "${dubbo.registry.address}")
+    private CommonService commonService;
 
     /**
      * 第三方暗访稽查查询(查询条件:时间,道管,服务区)
@@ -63,30 +61,30 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
             PageHelper.startPage(page, size);
         }
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
-//        Map<Long, Organ> deptMap = commonService.getDeptMap();
-//        Map<Long, Item> itemMap = commonService.getItemMap();
-//        Map<String, Constant> codeMap = commonService.getCodeMap();
-//        for (FwqCheckOther data : checkOtherList) {
-//            if (deptMap.get(data.getDept_id()) != null) {
-//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-//            }
-//            if (itemMap.get(data.getCheck_item_id()) != null) {
-//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-//                    } else {
-//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-//                    }
-//                }
-//            }
-//            if (codeMap.get(data.getWrecker_check_type()) != null) {
-//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-//            }
-//            if (codeMap.get(data.getSpecial_check_type()) != null) {
-//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-//            }
-//        }
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
         if (!(page.equals(0) && size.equals(0))) {
             return new PageInfo<FwqCheckOther>(checkOtherList);
         }
@@ -102,30 +100,30 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     private Object getAllCheckOther(FwqCheckOther fwqCheckOther) {
 
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther == null ? new FwqCheckOther() : fwqCheckOther);
-//        Map<Long, Organ> deptMap = commonService.getDeptMap();
-//        Map<Long, Item> itemMap = commonService.getItemMap();
-//        Map<String, Constant> codeMap = commonService.getCodeMap();
-//        for (FwqCheckOther data : checkOtherList) {
-//            if (deptMap.get(data.getDept_id()) != null) {
-//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-//            }
-//            if (itemMap.get(data.getCheck_item_id()) != null) {
-//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-//                    } else {
-//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-//                    }
-//                }
-//            }
-//            if (codeMap.get(data.getWrecker_check_type()) != null) {
-//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-//            }
-//            if (codeMap.get(data.getSpecial_check_type()) != null) {
-//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-//            }
-//        }
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
         return checkOtherList;
     }
 
@@ -152,8 +150,8 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
     @Override
     public FwqCheckOther selectCheckById(Long id) {
         FwqCheckOther fwqCheckOther = fwqCheckOtherDao.selectCheckById(id);
-//        Map<Long, Item> itemMap = commonService.getItemMap();
-//        fwqCheckOther.setCheck_item_name(itemMap.get(fwqCheckOther.getCheck_item_id()).getName());
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        fwqCheckOther.setCheck_item_name(itemMap.get(fwqCheckOther.getCheck_item_id()).getName());
         return fwqCheckOther;
     }
 
@@ -171,96 +169,96 @@ public class CheckOtherServiceImpl implements CheckOtherService_F {
 
         fwqCheckOther.setCheck_time_name(fwqCheckOther.getCheck_period());
         List<FwqCheckOther> checkOtherList = fwqCheckOtherDao.getAllCheckOther(fwqCheckOther);
-//        Map<Long, Organ> deptMap = commonService.getDeptMap();
-//        Map<Long, Item> itemMap = commonService.getItemMap();
-//        Map<String, Constant> codeMap = commonService.getCodeMap();
-//        for (FwqCheckOther data : checkOtherList) {
-//            if (deptMap.get(data.getDept_id()) != null) {
-//                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
-//            }
-//            if (itemMap.get(data.getCheck_item_id()) != null) {
-//                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
-//                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
-//                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
-//                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
-//                    } else {
-//                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
-//                    }
-//                }
-//            }
-//            if (codeMap.get(data.getWrecker_check_type()) != null) {
-//                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
-//            }
-//            if (codeMap.get(data.getSpecial_check_type()) != null) {
-//                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
-//            }
-//        }
-//
-//        // 获得所有服务区数据
-//        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
-//        // 获得所有道管中心数据
-//        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
-//
-//        int checkType = fwqCheckOther.getCheck_type();
-//        if (checkType == 8 || checkType == 9) {
-//            Long id = 26L;
-//            if (checkType == 8) {
-//                id = 26L;
-//            }
-//            if (checkType == 9) {
-//                id = 27L;
-//            }
-//            //获取考核办法对应的考核项
-//            List<String> itemName = commonService.getCheckItemName(id);
-//
-//            for (FwqCheckOther c : checkOtherList) {
-//                if (!itemName.contains(c.getPcheckname())) {
-//                    itemName.add(c.getPcheckname());
-//                }
-//            }
-//
-//            for (FeeStation station : saList) {
-//                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
-//                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
-//                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
-//                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
-//                HashMap<String, Integer> s = new HashMap<>();
-//                for (String i : itemName) {
-//                    s.put(i, 0);
-//                }
-//                for (FwqCheckOther c : checkOtherList) {
-//                    if (c.getDept_id().toString().equals(station.getDeptid())) {
-//                        Integer i = s.get(c.getPcheckname());
-//                        if (i == null) {
-//                            i = 0;
+        Map<Long, Organ> deptMap = commonService.getDeptMap();
+        Map<Long, Item> itemMap = commonService.getItemMap();
+        Map<String, Constant> codeMap = commonService.getCodeMap();
+        for (FwqCheckOther data : checkOtherList) {
+            if (deptMap.get(data.getDept_id()) != null) {
+                data.setOrgan_name(deptMap.get(data.getDept_id()).getOrganname());
+            }
+            if (itemMap.get(data.getCheck_item_id()) != null) {
+                data.setCheck_item_name(itemMap.get(data.getCheck_item_id()).getName());
+                if (itemMap.get(data.getCheck_item_id()).getParent_id() != null) {
+                    if (itemMap.get(data.getCheck_item_id()).getScore() == null) {
+                        data.setPcheckname(itemMap.get(data.getCheck_item_id()).getName());
+                    } else {
+                        data.setPcheckname(itemMap.get(itemMap.get(data.getCheck_item_id()).getParent_id()).getName());
+                    }
+                }
+            }
+            if (codeMap.get(data.getWrecker_check_type()) != null) {
+                data.setWrecker_check_type_name(codeMap.get(data.getWrecker_check_type()).getCode_name());
+            }
+            if (codeMap.get(data.getSpecial_check_type()) != null) {
+                data.setSpecial_check_type_name(codeMap.get(data.getSpecial_check_type()).getCode_name());
+            }
+        }
+
+        // 获得所有服务区数据
+        List<FeeStation> saList = commonService.getAllDeptByLayer("SA");
+        // 获得所有道管中心数据
+        List<FeeStation> rmList = commonService.getAllDeptByLayer("RM");
+
+        int checkType = fwqCheckOther.getCheck_type();
+        if (checkType == 8 || checkType == 9) {
+            Long id = 26L;
+            if (checkType == 8) {
+                id = 26L;
+            }
+            if (checkType == 9) {
+                id = 27L;
+            }
+            //获取考核办法对应的考核项
+            List<String> itemName = commonService.getCheckItemName(id);
+
+            for (FwqCheckOther c : checkOtherList) {
+                if (!itemName.contains(c.getPcheckname())) {
+                    itemName.add(c.getPcheckname());
+                }
+            }
+
+            for (FeeStation station : saList) {
+                FwqCheckOtherStatistics fwqCheckOtherStatistics = new FwqCheckOtherStatistics();
+                fwqCheckOtherStatistics.setDeptid(station.getDeptid());
+                fwqCheckOtherStatistics.setDeptname(station.getName().replaceAll("服务区", ""));
+                fwqCheckOtherStatistics.setPdeptid(station.getParentid());
+                HashMap<String, Integer> s = new HashMap<>();
+                for (String i : itemName) {
+                    s.put(i, 0);
+                }
+                for (FwqCheckOther c : checkOtherList) {
+                    if (c.getDept_id().toString().equals(station.getDeptid())) {
+                        Integer i = s.get(c.getPcheckname());
+                        if (i == null) {
+                            i = 0;
+                        }
+//                        if (checkType == 2) {
+                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                        } else {
+//                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
+//                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
+//                            } else {
+//                                s.put(c.getPcheckname(), i);
+//                            }
 //                        }
-////                        if (checkType == 2) {
-//                        s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
-////                        } else {
-////                            if (c.getOrgan_name() == null || "".equals(c.getOrgan_name())) {
-////                                s.put(c.getPcheckname(), Integer.valueOf((int) (i + c.getCheck_score())));
-////                            } else {
-////                                s.put(c.getPcheckname(), i);
-////                            }
-////                        }
-//                    }
-//                }
-//                fwqCheckOtherStatistics.setScoremap(s);
-//                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
-//            }
-//
-//            for (FeeStation a : rmList) {
-//                List<FwqCheckOtherStatistics> s = new ArrayList<>();
-//                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
-//                    if (o.getPdeptid().equals(a.getDeptid())) {
-//                        o.setPdeptname(a.getName());
-//                        s.add(o);
-//                    }
-//                }
-//                datas.put(a.getName().replaceAll("道管中心", ""), s);
-//            }
-//
-//        }
+                    }
+                }
+                fwqCheckOtherStatistics.setScoremap(s);
+                fwqCheckOtherStatisticses.add(fwqCheckOtherStatistics);
+            }
+
+            for (FeeStation a : rmList) {
+                List<FwqCheckOtherStatistics> s = new ArrayList<>();
+                for (FwqCheckOtherStatistics o : fwqCheckOtherStatisticses) {
+                    if (o.getPdeptid().equals(a.getDeptid())) {
+                        o.setPdeptname(a.getName());
+                        s.add(o);
+                    }
+                }
+                datas.put(a.getName().replaceAll("道管中心", ""), s);
+            }
+
+        }
 
         return datas;
     }