wenhongquan 8 سال پیش
والد
کامیت
07a3be9352
19فایلهای تغییر یافته به همراه629 افزوده شده و 576 حذف شده
  1. 9 0
      .idea/VisualInspection.iml
  2. 6 0
      .idea/inspectionProfiles/profiles_settings.xml
  3. 8 0
      .idea/modules.xml
  4. 6 0
      .idea/vcs.xml
  5. 248 0
      .idea/workspace.xml
  6. 37 2
      VisualInspection/js/statistics/assess_ranking.js
  7. 21 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/DeptStatistic.java
  8. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  9. 5 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java
  10. 17 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  11. 23 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckDeptStatisticsDao.java
  12. 7 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  13. 80 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckDeptStatisticsMapper.xml
  14. 26 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  15. 14 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/pojo/StatisticExUser.java
  16. 9 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java
  17. 30 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/ThreadTaskService.java
  18. 81 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  19. 0 565
      VisualInspection_server/visual/visual.log

+ 9 - 0
.idea/VisualInspection.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 6 - 0
.idea/inspectionProfiles/profiles_settings.xml

@@ -0,0 +1,6 @@
+<component name="InspectionProjectProfileManager">
+  <settings>
+    <option name="PROJECT_PROFILE" />
+    <version value="1.0" />
+  </settings>
+</component>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/VisualInspection.iml" filepath="$PROJECT_DIR$/.idea/VisualInspection.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 248 - 0
.idea/workspace.xml

@@ -0,0 +1,248 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ChangeListManager">
+    <list default="true" id="7e07990a-b77f-4d9c-a115-352fd03d9310" name="Default" comment="" />
+    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
+    <option name="TRACKING_ENABLED" value="true" />
+    <option name="SHOW_DIALOG" value="false" />
+    <option name="HIGHLIGHT_CONFLICTS" value="true" />
+    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+    <option name="LAST_RESOLUTION" value="IGNORE" />
+  </component>
+  <component name="Git.Settings">
+    <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
+  </component>
+  <component name="GradleLocalSettings">
+    <option name="externalProjectsViewState">
+      <projects_view />
+    </option>
+  </component>
+  <component name="JsBuildToolGruntFileManager" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsBuildToolPackageJson" detection-done="true" sorting="DEFINITION_ORDER" />
+  <component name="JsGulpfileManager">
+    <detection-done>true</detection-done>
+    <sorting>DEFINITION_ORDER</sorting>
+  </component>
+  <component name="NodeModulesDirectoryManager">
+    <handled-path value="$PROJECT_DIR$/VisualInspection/node_modules" />
+  </component>
+  <component name="ProjectFrameBounds">
+    <option name="x" value="243" />
+    <option name="y" value="241" />
+    <option name="width" value="1364" />
+    <option name="height" value="726" />
+  </component>
+  <component name="ProjectView">
+    <navigator currentView="ProjectPane" proportions="" version="1">
+      <flattenPackages />
+      <showMembers />
+      <showModules />
+      <showLibraryContents />
+      <hideEmptyPackages />
+      <abbreviatePackageNames />
+      <autoscrollToSource />
+      <autoscrollFromSource />
+      <sortByType />
+      <manualOrder />
+      <foldersAlwaysOnTop value="true" />
+    </navigator>
+    <panes>
+      <pane id="PackagesPane" />
+      <pane id="Scratches" />
+      <pane id="AndroidView" />
+      <pane id="ProjectPane">
+        <subPane>
+          <expand>
+            <path>
+              <item name="VisualInspection" type="b2602c69:ProjectViewProjectNode" />
+              <item name="VisualInspection" type="462c0819:PsiDirectoryNode" />
+            </path>
+            <path>
+              <item name="VisualInspection" type="b2602c69:ProjectViewProjectNode" />
+              <item name="VisualInspection" type="462c0819:PsiDirectoryNode" />
+              <item name="VisualInspection_server" type="462c0819:PsiDirectoryNode" />
+            </path>
+          </expand>
+          <select />
+        </subPane>
+      </pane>
+      <pane id="Scope" />
+    </panes>
+  </component>
+  <component name="PropertiesComponent">
+    <property name="settings.editor.selected.configurable" value="Lombok plugin" />
+    <property name="WebServerToolWindowFactoryState" value="false" />
+    <property name="aspect.path.notification.shown" value="true" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/VisualInspection_server" />
+  </component>
+  <component name="RunDashboard">
+    <option name="ruleStates">
+      <list>
+        <RuleState>
+          <option name="name" value="ConfigurationTypeDashboardGroupingRule" />
+        </RuleState>
+        <RuleState>
+          <option name="name" value="StatusDashboardGroupingRule" />
+        </RuleState>
+      </list>
+    </option>
+  </component>
+  <component name="RunManager">
+    <configuration default="true" type="Applet" factoryName="Applet">
+      <option name="WIDTH" value="400" />
+      <option name="HEIGHT" value="300" />
+      <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+      <module />
+    </configuration>
+    <configuration default="true" type="Application" factoryName="Application">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="VM_PARAMETERS" />
+      <option name="PROGRAM_PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="ENABLE_SWING_INSPECTOR" value="false" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <module name="" />
+      <envs />
+    </configuration>
+    <configuration default="true" type="JUnit" factoryName="JUnit">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <envs />
+      <patterns />
+    </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </configuration>
+    <configuration default="true" type="TestNG" factoryName="TestNG">
+      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
+      <module name="" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="SUITE_NAME" />
+      <option name="PACKAGE_NAME" />
+      <option name="MAIN_CLASS_NAME" />
+      <option name="METHOD_NAME" />
+      <option name="GROUP_NAME" />
+      <option name="TEST_OBJECT" value="CLASS" />
+      <option name="VM_PARAMETERS" value="-ea" />
+      <option name="PARAMETERS" />
+      <option name="WORKING_DIRECTORY" value="$MODULE_DIR$" />
+      <option name="OUTPUT_DIRECTORY" />
+      <option name="ANNOTATION_TYPE" />
+      <option name="ENV_VARIABLES" />
+      <option name="PASS_PARENT_ENVS" value="true" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="singleModule" />
+      </option>
+      <option name="USE_DEFAULT_REPORTERS" value="false" />
+      <option name="PROPERTIES_FILE" />
+      <envs />
+      <properties />
+      <listeners />
+    </configuration>
+    <configuration default="true" type="#org.jetbrains.idea.devkit.run.PluginConfigurationType" factoryName="Plugin">
+      <module name="" />
+      <option name="VM_PARAMETERS" value="-Xmx512m -Xms256m -XX:MaxPermSize=250m -ea" />
+      <option name="PROGRAM_PARAMETERS" />
+      <predefined_log_file id="idea.log" enabled="true" />
+    </configuration>
+  </component>
+  <component name="ShelveChangesManager" show_recycled="false">
+    <option name="remove_strategy" value="false" />
+  </component>
+  <component name="TaskManager">
+    <task active="true" id="Default" summary="Default task">
+      <changelist id="7e07990a-b77f-4d9c-a115-352fd03d9310" name="Default" comment="" />
+      <created>1521600047268</created>
+      <option name="number" value="Default" />
+      <option name="presentableId" value="Default" />
+      <updated>1521600047268</updated>
+      <workItem from="1521600054369" duration="99000" />
+      <workItem from="1521678767348" duration="1193000" />
+      <workItem from="1521680740012" duration="14000" />
+    </task>
+    <servers />
+  </component>
+  <component name="TimeTrackingManager">
+    <option name="totallyTimeSpent" value="1306000" />
+  </component>
+  <component name="ToolWindowManager">
+    <frame x="243" y="241" width="1364" height="726" extended-state="0" />
+    <layout>
+      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
+      <window_info id="Palette&#9;" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Image Layers" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
+      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
+      <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
+      <window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Theme Preview" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
+      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
+      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
+      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
+      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
+      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
+    </layout>
+  </component>
+  <component name="TypeScriptGeneratedFilesManager">
+    <option name="version" value="1" />
+  </component>
+  <component name="VcsContentAnnotationSettings">
+    <option name="myLimit" value="2678400000" />
+  </component>
+  <component name="XDebuggerManager">
+    <breakpoint-manager />
+    <watches-manager />
+  </component>
+  <component name="masterDetails">
+    <states>
+      <state key="ProjectJDKs.UI">
+        <settings>
+          <last-edited>1.8</last-edited>
+          <splitter-proportions>
+            <option name="proportions">
+              <list>
+                <option value="0.2" />
+              </list>
+            </option>
+          </splitter-proportions>
+        </settings>
+      </state>
+    </states>
+  </component>
+</project>

+ 37 - 2
VisualInspection/js/statistics/assess_ranking.js

@@ -257,14 +257,18 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
                         userChangeStation.new_dept_name + ":" + userChangeStation.new_dept_check_num + "次";
                 }
 
+                var exuserHtml = "";
 
-
+                $("#th_14").html("备注")
 
                 var showNumberHtml = (isshownumber ? (filter(data[i].checked_num, '0') + (data[i].checked_num < 6 ? html : "")) : "-");
                 if (hasRole(ROLE_ADMIN) || hasRole(ROLE_JICHA_ADMIN)) {
                     showNumberHtml = (ischage ? ("<span style='color:red;' data-toggle='tooltip' data-placement='right' title=" + tiptext + ">" + userChangeStation.old_dept_check_num + "+" + userChangeStation.new_dept_check_num + "</span>") : filter(data[i].checked_num, '0')) + html;
+                    exuserHtml = '<div class="switch"><input type="checkbox" onchange="exUserfun(this,'+data[i].user.id+','+data[i].period_id+')" '+ (data[i].isEx?'checked="checked"':'') +' > <label>排除</label></div>';
+                    $("#th_14").html("是否排除统计");
                 }
 
+               
 
 
                 strTbody += "<tr><td width='4%;'>" + (count + 1) + "</td><td width='6%;'>" + data[i].user.fee_station_name + "</td>" +
@@ -277,7 +281,7 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
                     "<td width='4%;'>" + getItemScore(data[i], '工作纪律') + "</td><td width='4%'>" + getItemScore(data[i], '便民服务') + "</td><td width='4%;'>" +
                     getItemScore(data[i], '安全管理') + "</td><td width='4%;'>" + data[i].check_all_score + "</td>" +
                     "<td width='6%;'>" + showNumberHtml + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td>" +
-                    "<td width='4%;'>" + filterSlash(score, filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td><td width='4%;'>" + "</td><td width='4%;'>" + "</td></tr>";
+                    "<td width='4%;'>" + filterSlash(score, filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td><td width='4%;'>" + "</td><td width='4%;'>" +(exuserHtml)+ "</td></tr>";
                 count++;
             }
         }
@@ -288,6 +292,37 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
         return "";
     });
 }
+function exUserfun(o,u,p){
+   var check = $(o).prop("checked");
+   if(check){
+       //add
+
+       var url = "statistics/userex/add"
+       var param = {
+           "user_id": u,
+           "period_id": p
+       }
+       post_common_service(url, param, function(data) {
+            $(o).prop("checked", true)
+       },function(e){
+            $(o).prop("checked", false)
+       });
+   }else{
+       //delete
+       var url = "statistics/userex/delete"
+       var param = {
+        "user_id": u,
+        "period_id": p
+       }
+       post_common_service(url, param, function(data) {
+        $(o).prop("checked", false)
+       },function(e){
+        $(o).prop("checked", true)
+   });
+
+   }
+}
+
 
 function jumpuser(userid, deptid) {
 

+ 21 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/DeptStatistic.java

@@ -0,0 +1,21 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+/**
+ * 文件名:UserStatistic
+ * 版本信息:日期:2018/2/5 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Data
+public class DeptStatistic {
+    private Long id;
+    private Integer period_id;
+    private Long dept_id;
+    private Double start_date;
+    private Double end_date;
+    private Integer integral;
+    private Double score;
+
+    private Integer count;
+
+}

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java

@@ -183,6 +183,8 @@ public class StatisticsBean {
     private Integer check_all_num = 0;
     
     private Integer check_all_score = 0;
+
+    private Integer period_id = 0;
     
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBean o2){

+ 5 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java

@@ -56,6 +56,11 @@ public class StatisticsBo {
     private Integer check_s_score = 0;
     
     private Integer check_all_num = 0;
+
+    //是否排除
+    private Boolean isEx;
+
+	private Integer period_id;
     
     // 比较大小 1 小 , -1 大
     public int compareTo(StatisticsBo o2){

+ 17 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java

@@ -4,8 +4,10 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import com.xintong.system.err.BusinessException;
 import com.xintong.visualinspection.bean.*;
 import com.xintong.visualinspection.pojo.StatisiticPojo;
+import com.xintong.visualinspection.pojo.StatisticExUser;
 import com.xintong.visualinspection.pojo.UserRankingData;
 import com.xintong.visualinspection.util.CacheUtil;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -381,5 +383,20 @@ public class StatisticsController extends BaseController {
         List<StatisiticPojo> returnList=  statisticsService.getuserStatistic(obj);
         return super.returnSuccessResult((returnList));
     }
+
+
+	@RequestMapping(value = "/userex/add")
+	public String addcheckSExUser(@RequestBody StatisticExUser obj){
+    	Object s = statisticsService.addcheckSExUser(obj);
+    	if(s==null) throw new BusinessException(20001,"发生错误");
+		return super.returnSuccessResult();
+	}
+
+	@RequestMapping(value = "/userex/delete")
+	public String deletecheckSExUser(@RequestBody StatisticExUser obj){
+		Object s=statisticsService.deletecheckSExUser(obj);
+		if(s==null) throw new BusinessException(20001,"发生错误");
+		return super.returnSuccessResult();
+	}
     
 }

+ 23 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/CheckDeptStatisticsDao.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.dao.master;
+
+import com.xintong.visualinspection.bean.DeptStatistic;
+import com.xintong.visualinspection.bean.UserStatistic;
+import org.apache.ibatis.annotations.Mapper;
+
+import java.util.List;
+
+/**
+ * 文件名:CheckUserStatistics
+ * 版本信息:日期:2018/2/5 Copyright 江苏省交通规划设计院 Corporation 2018 版权所有.
+ */
+@Mapper
+public interface CheckDeptStatisticsDao {
+    public DeptStatistic getOne(Long id);
+    public DeptStatistic getByDept(DeptStatistic deptStatistic);
+    public void insert(DeptStatistic deptStatistic);
+    public void update(DeptStatistic deptStatistic);
+    public void delete(Long id);
+    public void saveandupdate(DeptStatistic deptStatistic);
+    public List<DeptStatistic> selectdepts(DeptStatistic statistic);
+
+}

+ 7 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -3,6 +3,7 @@ package com.xintong.visualinspection.dao.master;
 import java.util.List;
 
 import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.pojo.StatisticExUser;
 import org.apache.ibatis.annotations.Mapper;
 
 import com.xintong.visualinspection.pojo.TaskAndScore;
@@ -85,4 +86,10 @@ public interface StatisticsDao  {
 
     public List<UserChangeStation> selectuserchangestation(StatisticsBean obj);
 
+    public List<StatisticExUser> getcheckSExUser(StatisticExUser statisticExUser);
+
+	public void deletecheckSExUser(StatisticExUser statisticExUser);
+
+	public void addcheckSExUser(StatisticExUser statisticExUser);
+
 }

+ 80 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckDeptStatisticsMapper.xml

@@ -0,0 +1,80 @@
+<?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="com.xintong.visualinspection.dao.master.CheckDeptStatisticsDao" >
+    <resultMap id="BaseResultMap" type="com.xintong.visualinspection.bean.DeptStatistic" >
+        <id column="id" property="id" jdbcType="INTEGER" />
+        <result column="period_id" property="period_id" jdbcType="INTEGER" />
+        <result column="score" property="score" jdbcType="DOUBLE" />
+        <result column="integral" property="integral" jdbcType="INTEGER" />
+        <result column="dept_id" property="dept_id" jdbcType="INTEGER" />
+
+    </resultMap>
+
+
+    <select id="getOne" parameterType="java.lang.Long" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_dept_score
+        WHERE id = #{id}
+    </select>
+    
+    <select id="getByDept" parameterType="com.xintong.visualinspection.bean.DeptStatistic" resultMap="BaseResultMap" >
+        SELECT *
+        FROM check_dept_score
+        WHERE dept_id = #{dept_id} and period_id = #{period_id}
+    </select>
+    
+    <insert id="insert" useGeneratedKeys="true" keyProperty="id"  parameterType="com.xintong.visualinspection.bean.DeptStatistic" >
+        <include refid="insertc"/>
+    </insert>
+
+    <update id="update" parameterType="com.xintong.visualinspection.bean.DeptStatistic" >
+        <include refid="updatec"/>
+    </update>
+
+    <delete id="delete" parameterType="java.lang.Long" >
+        DELETE FROM
+        check_dept_score
+        WHERE
+        id =#{id}
+    </delete>
+
+    <insert id="saveandupdate" useGeneratedKeys="true" keyProperty="id" parameterType="com.xintong.visualinspection.bean.DeptStatistic" >
+        <selectKey keyProperty="count" resultType="int" order="BEFORE">
+            select count(*) as count from check_dept_score where dept_id = #{dept_id} and period_id = #{period_id}
+        </selectKey>
+        <if test="count>0">
+           <include refid="updatec"/>
+        </if>
+        <if test="count==0">
+            <include refid="insertc"/>
+        </if>
+    </insert>
+
+
+    <sql id="updatec">
+        UPDATE
+        check_dept_score
+        SET
+        <if test="score != null">score = #{score},</if>
+        <if test="integral != null">integral = #{integral},</if>
+        WHERE
+        dept_id = #{dept_id} and period_id = #{period_id}
+    </sql>
+    <sql id="insertc">
+         INSERT INTO
+        check_dept_score
+        (dept_id,period_id,score,integral)
+        VALUES
+        (#{dept_id}, #{period_id},#{score},#{integral})
+    </sql>
+
+
+    <select id="selectdepts"   parameterType="com.xintong.visualinspection.bean.DeptStatistic" resultMap="BaseResultMap">
+      select * from  check_dept_score where     period_id >= #{startperiod_id}
+        AND period_id &lt;= #{endperiod_id}
+    </select>
+
+
+
+
+</mapper>

+ 26 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml

@@ -282,6 +282,10 @@
                 #{position_id}
             </foreach>
         </if>
+
+        <if test="period_id !=null ">
+            AND t.checked_person not in (select user_id from check_statistic_exclude_users where period_id = #{period_id})
+        </if>
         GROUP BY t.checked_dept
     </select>
 
@@ -317,6 +321,9 @@
         <if test="start_date!=null and end_date != null">
             AND t.start_time &gt;= #{start_date} AND t.end_time &lt; #{end_date}
         </if>
+        <if test="period_id !=null ">
+            AND t.checked_person not in (select user_id from check_statistic_exclude_users where period_id = #{period_id})
+        </if>
         GROUP BY t.checked_dept,t.checked_person
     </select>
 
@@ -340,6 +347,10 @@
                 #{position_id}
             </foreach>
         </if>
+
+        <if test="period_id !=null ">
+            AND t.checked_person not in (select user_id from check_statistic_exclude_users where period_id = #{period_id})
+        </if>
         )
         u LEFT JOIN check_item s ON u.parent_id = s.id GROUP BY dept_id,item_id
     </select>
@@ -1090,6 +1101,21 @@
 
 
 
+    <select id="getcheckSExUser" parameterType="com.xintong.visualinspection.pojo.StatisticExUser" resultType="com.xintong.visualinspection.pojo.StatisticExUser">
+        select * from check_statistic_exclude_users where  period_id = #{period_id}
+    </select>
+
+    <delete id="deletecheckSExUser" parameterType="com.xintong.visualinspection.pojo.StatisticExUser">
+         delete from  check_statistic_exclude_users where  period_id = #{period_id} and user_id = #{user_id}
+    </delete>
+
+    <insert id="addcheckSExUser"  parameterType="com.xintong.visualinspection.pojo.StatisticExUser">
+         INSERT INTO
+        check_statistic_exclude_users
+        (period_id,user_id)
+        VALUES
+        (#{period_id}, #{user_id})
+    </insert>
 
 
 </mapper>

+ 14 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/pojo/StatisticExUser.java

@@ -0,0 +1,14 @@
+package com.xintong.visualinspection.pojo;
+
+import lombok.Data;
+
+@Data
+public class StatisticExUser {
+    //编号
+    private Integer id;
+    //用户编号
+    private Integer user_id;
+    //周期编号
+    private  Integer period_id;
+
+}

+ 9 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java

@@ -9,6 +9,7 @@ import javax.servlet.http.HttpServletResponse;
 
 import com.xintong.visualinspection.bean.*;
 import com.xintong.visualinspection.pojo.StatisiticPojo;
+import com.xintong.visualinspection.pojo.StatisticExUser;
 import com.xintong.visualinspection.pojo.TaskAndScore;
 import com.xintong.visualinspection.pojo.UserRankingData;
 
@@ -113,6 +114,14 @@ public interface StatisticsService {
 	// 获取清障稽查的信息
 	public List<WreckerStatisticsBO> getWreckerStaffInfo(WreckerStatisticsBO obj);
 
+	//获取连续月达标的员工
     public List<StatisiticPojo> getuserStatistic(UserStatistic obj);
 
+
+	public Object addcheckSExUser(StatisticExUser statisticExUser);
+	public Object deletecheckSExUser(StatisticExUser statisticExUser);
+
+
+
+
 }

+ 30 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/ThreadTaskService.java

@@ -1,8 +1,7 @@
 package com.xintong.visualinspection.service;
 
-import com.xintong.visualinspection.bean.CheckTaskPeriod;
-import com.xintong.visualinspection.bean.StatisticsBo;
-import com.xintong.visualinspection.bean.UserStatistic;
+import com.xintong.visualinspection.bean.*;
+import com.xintong.visualinspection.dao.master.CheckDeptStatisticsDao;
 import com.xintong.visualinspection.dao.master.CheckOtherDao;
 import com.xintong.visualinspection.dao.master.CheckTaskPeriodDao;
 import com.xintong.visualinspection.dao.master.CheckUserStatisticsDao;
@@ -25,6 +24,9 @@ public class ThreadTaskService {
     @Autowired
     private CheckUserStatisticsDao checkUserStatisticsDao;
 
+    @Autowired
+    private CheckDeptStatisticsDao checkDeptStatisticsDao;
+
     @Async("threadExecutor")
     public void saveUserStatic(List<StatisticsBo> statisticsBos, Long starttime,Long endtime){
 
@@ -53,4 +55,29 @@ public class ThreadTaskService {
             checkUserStatisticsDao.saveandupdate(ss);
         }
     }
+
+    @Async("threadExecutor")
+    public void saveDeptStatic(List<StatisticsBean> statisticsBos, Long starttime, Long endtime){
+
+        List<CheckTaskPeriod> checkTaskPeriods = checkTaskPeriodDao.select(new CheckTaskPeriod());
+
+        CheckTaskPeriod period = null;
+        // 计算上个周期时间 周期时间:00:00:00 ----- 00:00:00 参数:23:00:00
+        for (CheckTaskPeriod p : checkTaskPeriods) {
+            if (starttime + 1 * 1000 * 60 * 60 == p.getStarttime().getTime() && endtime + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+                period = p;
+                break;
+            }
+        }
+        if(period==null) { return;}
+        for (StatisticsBean s:statisticsBos
+                ) {
+            DeptStatistic ss =new DeptStatistic();
+            ss.setScore(Double.parseDouble(s.getScore_avg()));
+            ss.setIntegral(statisticsBos.size()-s.getCompany_ranking2()+1);
+            ss.setDept_id(s.getDept_id());
+            ss.setPeriod_id(period.getId());
+            checkDeptStatisticsDao.saveandupdate(ss);
+        }
+    }
 }

+ 81 - 6
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -21,6 +21,7 @@ import com.xintong.visualinspection.dao.master.CheckOtherDao;
 import com.xintong.visualinspection.dao.master.CheckTaskPeriodDao;
 import com.xintong.visualinspection.dao.master.CheckUserStatisticsDao;
 import com.xintong.visualinspection.pojo.StatisiticPojo;
+import com.xintong.visualinspection.pojo.StatisticExUser;
 import com.xintong.visualinspection.pojo.UserRankingData;
 import com.xintong.visualinspection.service.ThreadTaskService;
 import org.jxls.common.Context;
@@ -298,26 +299,57 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 
 		}
+
+
+		CheckTaskPeriod period = getperiod(obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+
+		Map<Integer,StatisticExUser> statisticExUserMap = new HashMap<>();
+		if(period!=null) {
+			StatisticExUser u = new StatisticExUser();
+			u.setPeriod_id(period.getId());
+			List<StatisticExUser> statisticExUsers = statisticsDao.getcheckSExUser(u);
+			if(statisticExUsers!=null && statisticExUsers.size()>0){
+				for (StatisticExUser d:statisticExUsers
+						) {
+					statisticExUserMap.put(d.getUser_id(),d);
+				}
+			}
+		}
+
 		// 这边进行赛选一下;
 		List<StatisticsBo> reList = new ArrayList<>();
 		for (int i = 0; i < lists.size(); i++) {
 			if (parent_dept_id == null || lists.get(i).getUser().getParent_organid() == parent_dept_id + 0) {
 				if (organId == null || lists.get(i).getUser().getOrganid() == organId + 0) {
+					if(statisticExUserMap.get(lists.get(i).getUser().getId())!=null){
+						lists.get(i).setIsEx(true);
+					}else{
+						lists.get(i).setIsEx(false);
+					}
+					lists.get(i).setPeriod_id(period==null?0:period.getId());
 					reList.add(lists.get(i));
 				}
 			}
 		}
-
-
-        //更新数据库统计
-
-    threadTaskService.saveUserStatic(reList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+		//更新数据库统计
+       threadTaskService.saveUserStatic(reList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
 
 		return reList;
 	}
 
 
-
+  private CheckTaskPeriod getperiod(long st,long et){
+    	CheckTaskPeriod period = null;
+	  List<CheckTaskPeriod> checkTaskPeriods = checkTaskPeriodDao.select(new CheckTaskPeriod());
+	  // 计算上个周期时间 周期时间:00:00:00 ----- 00:00:00 参数:23:00:00
+	  for (CheckTaskPeriod p : checkTaskPeriods) {
+		  if (st + 1 * 1000 * 60 * 60 == p.getStarttime().getTime() && et + 1 * 1000 * 60 * 60 == p.getEndtime().getTime()) {
+			  period = p;
+			  break;
+		  }
+	  }
+	  return period;
+  }
 
 	@Override
 	public List<StatisticsBean> getFeeStationCheckedScore(StatisticsBean obj) {
@@ -347,6 +379,14 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
+		if(obj.getStart_date()!=null && obj.getEnd_date()!=null){
+			CheckTaskPeriod p = getperiod(obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+			if(p!=null){
+				obj.setPeriod_id(p.getId());
+			}
+		}
+
+
 		// 检查人数 和 检查次数
 		obj.setPosition_ids(positionList);
 		List<StatisticsBean> listCheckNum = statisticsDao.selectFeeStationCheckNum(obj);
@@ -452,6 +492,15 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
+		if(obj.getStart_date()!=null && obj.getEnd_date()!=null){
+			CheckTaskPeriod p = getperiod(obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+			if(p!=null){
+				obj.setPeriod_id(p.getId());
+			}
+		}
+
+
+
 		// 检查人数 和 检查次数
 		obj.setPosition_ids(positionList);
 		List<StatisticsBean> listCheckNum = statisticsDao.selectFeeStationCheckNum(obj);
@@ -2041,6 +2090,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 //				}
 //			}
 //		}
+
+		threadTaskService.saveDeptStatic(sortList,obj.getStart_date().getTime(),obj.getEnd_date().getTime());
+
 		return sortList;
 	}
 
@@ -2500,4 +2552,27 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 
         return user_ids;
     }
+
+	@Override
+	public Object addcheckSExUser(StatisticExUser statisticExUser) {
+		try {
+			statisticsDao.addcheckSExUser(statisticExUser);
+		}catch (Exception e){
+            return null;
+		}
+		return "";
+
+	}
+
+	@Override
+	public Object deletecheckSExUser(StatisticExUser statisticExUser) {
+		try {
+			statisticsDao.deletecheckSExUser(statisticExUser);
+		}catch (Exception e){
+			return null;
+		}
+		return "";
+	}
+
+
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 0 - 565
VisualInspection_server/visual/visual.log


برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است