温红权 7 gadi atpakaļ
vecāks
revīzija
a805f1e232

+ 36 - 20
VisualInspection/js/statistics/business_promotion_feedback.js

@@ -2,6 +2,16 @@ var isshownumber = false;
 $(function() {
     $('[data-toggle="tooltip"]').tooltip();
     setVisit();
+
+
+    $.jeDate("#month_date", {
+        isinitVal: true,
+        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+    });
+
+    $("#month_date").val(getCurrentTimeFormat());
+
+
     var road_manager;
     if (roleContains("STATION")) {
         road_manager = getCurrentUser().road_manager_id;
@@ -9,6 +19,7 @@ $(function() {
     if (roleContains("ROAD_MANAGER")) {
         road_manager = getCurrentUser().organid;
     }
+
     setRoadManagerSelect("#center-manager", road_manager, true);
     if (road_manager) {
         var dept;
@@ -46,8 +57,13 @@ function queryEmpClick() {
 
     //每次点击前清空表格数据
     $(".table-tbody").empty('');
-    var start_date = $("#start-time").val();
-    var end_date = $("#end-time").val();
+
+    var t = getTimeByMonth($("#month_date").val());
+    var start_date = getMomentTimeFormat(t.starttime);
+    var end_date = getMomentTimeFormat(t.endtime);
+
+    // var start_date = $("#start-time").val();
+    // var end_date = $("#end-time").val();
     var start_score = $("#start-score").val();
     var end_score = $("#end-score").val();
     var start_num = $("#start-num").val() != '' ? $("#start-num").val() : 0;
@@ -56,24 +72,24 @@ function queryEmpClick() {
     if (flag == false) {
         return;
     }
-    if (start_date == '' || end_date == '') {
-        tip("请选择起止日期");
-        return;
-    } else {
-        start_date += " 23:00:00";
-        end_date += " 23: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_date = start.Format("yyyy-MM-dd HH:mm:ss");
-    var end = new Date(endStr);
-    if (start > end) {
-        tip("开始时间不能比结束时间大");
-        return;
-    }
+    // if (start_date == '' || end_date == '') {
+    //     tip("请选择起止日期");
+    //     return;
+    // } else {
+    //     start_date += " 23:00:00";
+    //     end_date += " 23: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_date = start.Format("yyyy-MM-dd HH:mm:ss");
+    // var end = new Date(endStr);
+    // if (start > end) {
+    //     tip("开始时间不能比结束时间大");
+    //     return;
+    // }
     var param = {
         "parent_dept_id": GV("#center-manager"),
         "dept_id": GV("#fsList"),

+ 2 - 2
VisualInspection/js/statistics/user_check_statistics.js

@@ -46,11 +46,11 @@ $(function() {
     // $(".div-month select").val(initDate);
     $.jeDate("#month_date_from", {
         isinitVal: true,
-        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        format: 'YYYY-MM' // 分隔符可以任意定义,该例子表示只显示年月
     });
     $.jeDate("#month_date_to", {
         isinitVal: true,
-        format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
+        format: 'YYYY-MM' // 分隔符可以任意定义,该例子表示只显示年月
     });
 
     $("#month_date_from").val("2017-07");

+ 13 - 10
VisualInspection/view/statistics/business_promotion_feedback.html

@@ -16,23 +16,26 @@
                         </select>
                     </div>
                 </div>
-                <div  class="form-group col-sm-3">
+                <div class="form-group col-sm-3">
                     <label for="exampleInputAccount1" class="col-sm-4">部门</label>
                     <div class="col-sm-8">
                         <select class="form-control" id="fsList">
                         </select>
                     </div>
                 </div>
-                <div  class="form-group col-sm-4">
-                    <label for="exampleInputAccount1" class="col-sm-4">查询日期</label>
-                    <div class="col-sm-4">
+                <div class="form-group col-sm-4">
+                    <label for="exampleInputAccount1" class="col-sm-4">查询月份</label>
+                    <!-- <div class="col-sm-4">
                         <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
                     </div>
                     <div class="col-sm-4">
                         <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
+                    </div> -->
+                    <div class="div-month col-sm-8">
+                        <input id="month_date" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
                     </div>
                 </div>
-                <div  class="form-group col-sm-2">
+                <div class="form-group col-sm-2">
                     <div class="col-sm-6">
                         <button class="btn btn-primary " type="button" onclick="queryEmpClick()">查询</button>
                     </div>
@@ -42,7 +45,7 @@
                 </div>
             </div>
             <div class="form-group">
-                <div  class="form-group col-sm-3">
+                <div class="form-group col-sm-3">
                     <label for="exampleInputAccount1" class="col-sm-4">考核次数</label>
 
                     <div class="col-sm-3">
@@ -53,8 +56,8 @@
                         <input type="text" id="end-num" class="form-control form-date" value="10">
                     </div>
                 </div>
-                <div  class="form-group col-sm-3">
-                <!--<div class="col-sm-2" style="width:150px;">
+                <div class="form-group col-sm-3">
+                    <!--<div class="col-sm-2" style="width:150px;">
                     <input type="text" id="check_count" class="form-control" value="">
                 </div>-->
                     <label for="exampleInputAccount1" class="col-sm-4">职位</label>
@@ -63,10 +66,10 @@
                         </select>
                     </div>
                 </div>
-                <div  class="form-group col-sm-4">
+                <div class="form-group col-sm-4">
                     <label for="exampleInputAccount1" class="col-sm-4">得分区间</label>
                     <div class="col-sm-3">
-                        <input type="text" id="start-score" class="form-control form-date"  value="0">
+                        <input type="text" id="start-score" class="form-control form-date" value="0">
                     </div>
                     <div class="to-score col-sm-2" style="padding-top: 6px;text-align:center;"><label> - </label></div>
                     <div class="col-sm-3">

+ 1 - 1
VisualInspection/view/statistics/user_check_statistics.html

@@ -92,7 +92,7 @@
                 <input id="month_date_from" class="form-control form-date" type="text" placeholder="请选择" style="height:30px;">
             </div>
             <label class="col-sm-1" style="line-height:30px;width:80px">结束月</label>
-            <div class="div-month col-sm-1">
+            <div class="div-month col-sm-1" style="z-index: 100;">
                 <input id="month_date_to" class="form-control form-date " type="text " placeholder="请选择 " style="height:30px; ">
             </div>
         </div>

+ 19 - 0
VisualInspection_server/pom.xml

@@ -77,6 +77,25 @@
 		</dependency>
 
 
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <optional>true</optional>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-devtools</artifactId>

+ 23 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/task/SysTaskService.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.task;
+
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.stereotype.Component;
+
+/**
+ * 文件名:SysTaskService
+ * 版本信息:日期:2018/7/21 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Slf4j
+@Component
+public class SysTaskService {
+//    //每天3点定时
+//    @Scheduled(cron = "0/5 * * * * *")
+//    public void scheduled(){
+//        //获取所有周期
+//
+////        log.info("=====>>>>>使用cron  {}",System.currentTimeMillis());
+//    }
+}
+
+