Просмотр исходного кода

Merge branch 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection

wenhongquan 8 лет назад
Родитель
Сommit
d04af4e67b
18 измененных файлов с 216 добавлено и 94 удалено
  1. 2 1
      VisualInspection/js/config.js
  2. 7 4
      VisualInspection/js/mytask/check.js
  3. 64 25
      VisualInspection/js/statistics/assess_ranking.js
  4. 3 2
      VisualInspection/js/statistics/assess_type.js
  5. 17 0
      VisualInspection/js/util/util.js
  6. 1 1
      VisualInspection/view/statistics/assess_type.html
  7. 27 15
      VisualInspection/view/statistics/emp_ranking.html
  8. 25 22
      VisualInspection_server/src/main/java/com/xintong/SystemInit.java
  9. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Job.java
  10. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  11. 3 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/User.java
  12. 1 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml
  13. 9 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  14. 6 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  15. 5 5
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml
  16. 8 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  17. 27 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/util/CacheUtil.java
  18. 8 8
      VisualInspection_server/src/main/resources/application.properties

+ 2 - 1
VisualInspection/js/config.js

@@ -15,7 +15,8 @@ function getserveraddr(){
         return "http://server_yanhai.jsxt.jsjtyxt.com/";
     }
     else if(base_ui_url.indexOf("localhost")!=-1){
-        return "http://server_yanhai.jsxt.jsjtyxt.com/"
+        // return "http://server_yanhai.jsxt.jsjtyxt.com/"
+        return "http://localhost:8089/"
     }
     else if(base_ui_url.indexOf("192.168.8.236")!=-1){
         return "http://192.168.8.236:8089/"

+ 7 - 4
VisualInspection/js/mytask/check.js

@@ -43,7 +43,9 @@ function initCheck() {
         format: "yyyy-mm-dd"
     });
     if ($.checkTask) {
-        getUserCheckCount();
+        getUserCheckCount(function(userList){
+            $("#checked_count").html(userList.length);
+        });
         initCheckAppealBtns();
         setFeSelect("#fsList", $.checkTask.checked_dept);
         // setFeeUserSelect("#check_checked_person_select", $.checkTask.checked_person);
@@ -180,15 +182,16 @@ function fullscreen() {
 
 }
 
-function getUserCheckCount() {
+function getUserCheckCount(callback) {
     var param = {
         "id":$.checkTask.id,
         "checked_person":$.checkTask.checked_person
     };
-    post_common_service("/task/getUserCount/", param, function (userList) {       
-        $("#checked_count").html(userList.length);
+    post_common_service("/task/getUserCount/", param, function (userList) { 
+        callback(userList);//$("#checked_count").html(userList.length);
     });
 }
+
 function showCheckDetailCount(){
     
 }

+ 64 - 25
VisualInspection/js/statistics/assess_ranking.js

@@ -33,6 +33,9 @@ function initQueryEmp(){
     var startD = new Date(now.getTime() - 7 * 24 * 3600 * 1000);
     var start_time = startD.getFullYear()+"-"+(startD.getMonth()+1)+"-"+startD.getDate(); 
     var end_time = endD.getFullYear()+"-"+(endD.getMonth()+1)+"-"+endD.getDate(); 
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    setJobSelect("#jobSelect");
     //默认初始化时间页面回显
     $("#start-time").val(start_time);
     $("#end-time").val(end_time);
@@ -44,7 +47,7 @@ function initQueryEmp(){
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfos(url,param);
+    getEmployeeInfosClick(url,param,start_score,end_score);
 }
 /**
  * click
@@ -53,51 +56,86 @@ function initQueryEmp(){
  */
 function getEmployeeInfosClick(url,param,start_score,end_score){
     post_common_service( url,param,function(data){
+        
         var strTbody='';
+        var count=0;
         for(var i=0;i<data.length;i++){
             var score = 1000-filterByZeroHandle(average(data[i]).toFixed(2),'0');
-            if(score>=parseFloat(start_score) && score<=parseFloat(end_score)){
-            strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
-                +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
+            var flag=judgeParamFilter(data, i,score, start_score,end_score)
+            console.log("职位是是:"+flag)
+            if(flag){
+                strTbody+="<tr><td width='67px;'>"+(count+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
+                +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+data[i].user.position_name+"</td>"
                 +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
                 +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
                 +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
                 +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
                 +getItemScore(data[i], '安全管理')+"</td><td width='58px;'>"+data[i].check_all_score+"</td>"
                 +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
-                +"<td width='55px;'>"+score+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
+                +"<td width='55px;'>"+score+"</td><td width='58px;'>"+"</td><td width='58px;'>"+"</td></tr>";
+                count++;
+            }
         }
-    }
        $(".table-tbody").append(strTbody);   
     },function(error){
         return "" ;
     });
 }
 
+function judgeParamFilter(data,i,score, start_score,end_score){
+    var flag1=false;
+    if(score>=parseFloat(start_score) && score<=parseFloat(end_score)){
+        flag1=true;
+    }else{
+        flag1=false; 
+    } 
+    var checkCount = $("#check_count").val();   
+    if(checkCount){
+        console.log("fff:"+filter(data[i].checked_num,'0')+","+(filter(data[i].checked_num,'0')==checkCount));
+        if(filter(data[i].checked_num,'0')==checkCount){
+            flag2=true;
+        }else{
+            flag2=false;
+        }
+    }else{
+        flag2=true;
+    }
+    var jobSelect = $("#jobSelect").val();
+    if(jobSelect){
+        if(data[i].user.positionid==jobSelect){
+            flag3=true;
+        }else{
+            flag3=false;  
+        }
+    }else{
+        flag3=true;
+    }
+    return flag1&flag2&flag3;
+} 
 /**
  * init
  * @param {*} url 
  * @param {*} param 
  */
-function getEmployeeInfos(url,param){
-    post_common_service( url,param,function(data){
-        var strTbody='';
-        for(var i=0;i<data.length;i++){
-            strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
-                +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
-                +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
-                +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
-                +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
-                +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
-                +getItemScore(data[i], '安全管理')+"</td><td width='58px'>"+data[i].check_all_score+"</td>"
-                +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
-                +"<td width='55px;'>"+(1000-filterByZeroHandle(average(data[i]).toFixed(2),'0'))+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
-        }
-       $(".table-tbody").append(strTbody);   
-    },function(error){
-        return "" ;
-    });
-}
+// function getEmployeeInfos(url,param){
+//     post_common_service( url,param,function(data){
+//         var strTbody='';
+//         for(var i=0;i<data.length;i++){
+//             strTbody+="<tr><td width='67px;'>"+(i+1)+"</td><td width='87px;'>"+data[i].user.fee_station_name+"</td>"
+//                 +"<td width='67px;'>"+data[i].user.truename+"</td><td width='67px;'>"+"</td>"
+//                 +"<td width='87px;'>"+data[i].user.workno+"</td><td width='58px;'>"+ getItemScore(data[i], '环境') +"</td>"
+//                 +"<td width='58px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='58px;'>"+getItemScore(data[i], '表情')+"</td>"
+//                 +"<td width='58px;'>"+getItemScore(data[i], '动作')+"</td><td width='58px;'>"+getItemScore(data[i], '文明用语')+"</td>"
+//                 +"<td width='58px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='58px'>"+getItemScore(data[i], '便民服务')+"</td><td width='58px'>"
+//                 +getItemScore(data[i], '安全管理')+"</td><td width='58px'>"+data[i].check_all_score+"</td>"
+//                 +"<td width='67px;'>"+filter(data[i].checked_num,'0')+"</td><td width='67px;'>"+filterByZeroHandle(average(data[i]).toFixed(2),'0')+"</td>"
+//                 +"<td width='55px;'>"+(1000-filterByZeroHandle(average(data[i]).toFixed(2),'0'))+"</td><td width='58px;'>"+"</td><td>"+"</td></tr>";
+//         }
+//        $(".table-tbody").append(strTbody);   
+//     },function(error){
+//         return "" ;
+//     });
+// }
 
 function average(obj){
     if(filter(obj.checked_num,'0') == 0){
@@ -195,3 +233,4 @@ function param_method(start_score,end_score){
         return true;
     }
 }
+

+ 3 - 2
VisualInspection/js/statistics/assess_type.js

@@ -62,6 +62,7 @@ function initQueryType(){
      });
     
 }
+
 /**
  * 表格拼接及数据传入
  * @param {*} data 
@@ -107,7 +108,7 @@ function gethtml(data,i,avg,lists){
                    +"</td><td>"+filter(data.checked_people_num,'0')
                    +"</td><td>"+filter(data.checked_num,'0')+"</td><td>"+getItemScore(data, '环境卫生')
                    +"</td> <td>"+getItemScore(data, '仪容仪表')+"</td><td>"+getItemScore(data, '表情')
-                   +"</td><td>"+getItemScore(data, '收费动作')+"</td><td>"+getItemScore(data, '文明用语')
+                   +"</td><td>"+getItemScore(data, '动作')+"</td><td>"+getItemScore(data, '文明用语')
                    +"</td><td>"+getItemScore(data, '工作纪律')+"</td><td>"+getItemScore(data, '便民服务')
                    +"</td><td>"+getItemScore(data, '安全管理')+"</td><td>"+data.all_check_score+"</td><td>"
                    +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')
@@ -120,7 +121,7 @@ function gethtml(data,i,avg,lists){
         strTbody+="<td>"+data.name+"</td><td>"+data.people_num+"</td><td>"
                   +filter(data.checked_people_num,'0')+"</td><td>"+filter(data.checked_num,'0')
                   +"</td><td>"+getItemScore(data, '环境卫生')+"</td><td>"+getItemScore(data, '仪容仪表')
-                  +"</td><td>"+getItemScore(data, '表情')+"</td><td>"+getItemScore(data, '收费动作')
+                  +"</td><td>"+getItemScore(data, '表情')+"</td><td>"+getItemScore(data, '动作')
                   +"</td><td>"+getItemScore(data, '文明用语')+"</td><td>"+getItemScore(data, '工作纪律')
                   +"</td><td>"+getItemScore(data, '便民服务')+"</td><td>"+getItemScore(data, '安全管理')
                   +"</td><td>"+data.all_check_score+"</td><td>"

+ 17 - 0
VisualInspection/js/util/util.js

@@ -392,4 +392,21 @@ function setTeamUserSelect(div,selectId,classId){
         $(div).html('');
         $(div).html(optStr);
     });
+}
+
+function setJobSelect(div,selectId){
+    var param={
+        "dept_id":1
+    };
+    post_common_service("/job/getList/",param,function(data){
+        var optStr = '<option value="">全部</option>';
+        for(var i in data) {
+            if(data[i].id==selectId)
+                optStr += '<option value="'+data[i].id+'" selected="selected">'+data[i].name+'</option>';
+            else
+                optStr += '<option value="'+data[i].id+'">'+data[i].name+'</option>';
+        }
+        $(div).html('');
+        $(div).html(optStr);
+    });
 }

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

@@ -31,7 +31,7 @@
                         <th rowspan="2" width="67px">道管整体排名</th><th rowspan="2" width="67px">单位</th><th rowspan="2" width="67px">管道内收费站排名</th>
                         <th rowspan="2" width="85px">单位</th><th rowspan="2" width="67px">收费值机岗位人数</th><th rowspan="2" width="67px">被检查人数</th>
                         <th rowspan="2" width="67px">受检次数</th><th colspan="9" height="40px">存在问题扣分详情</th>
-                        <th rowspan="2">受检人平均每人次扣分(千分制)</th><th rowspan="2">管道中心受检人平均每人次扣分(千分制)</th>
+                        <th rowspan="2" width="67px">受检人平均每人次扣分(千分制)</th><th rowspan="2" width="67px">管道中心受检人平均每人次扣分(千分制)</th>
                         </tr>
                         <tr> 
                         <th width="67px">环境卫生</th><th width="67px">仪容仪表</th><th width="67px">表情</th>

+ 27 - 15
VisualInspection/view/statistics/emp_ranking.html

@@ -4,27 +4,27 @@
     <div class="form-div">
         <form  class="form-horizontal">
             <div class="form-group">
-                <label for="exampleInputAccount1" class="col-sm-1">查询范围</label>
+                <label for="exampleInputAccount1" class="col-sm-1">部门</label>
                 <div class="col-sm-2">
                     <select class="form-control" id="fsList">
                     </select>
                 </div>
-                <div class="select-date"><label class="select-date1">查询日期</label></div>
+                <label for="exampleInputAccount1" class="col-sm-1">查询日期</label>
                 <div class="col-sm-3">
                     <input type="text" id="start-time" class="form-control form-date" placeholder="开始日期">
                 </div>
-                <div class="col-sm-4">
+                <div class="col-sm-3">
                     <input type="text" id="end-time" class="form-control form-date" placeholder="结束日期">
                 </div>
                 <div class="div-score">
                     <label for="exampleInputAccount1" class="lable-score">得分区间</label>
                 </div>
                 <div class="col-sm-3" style="width:60px;">
-                    <input type="text" id="start-score" class="form-control form-date" style="width:60px;">
+                    <input type="text" id="start-score" class="form-control form-date" style="width:60px;" value="0">
                 </div>
                 <div class="to-score" style="float:left;margin-left:20px;padding-top: 6px;"><label> - </label></div>
                 <div class="col-sm-4" style="width:60px;margin-left:10px;">
-                    <input type="text" id="end-score" class="form-control form-date" style="width:60px;">
+                    <input type="text" id="end-score" class="form-control form-date" style="width:60px;" value="1000">
                 </div>
                 <div class="col-sm-5">
                     <button class="btn btn-primary " type="button" onclick="queryEmpClick()">查询</button>
@@ -33,6 +33,17 @@
                     <button class="btn btn-primary " type="button" onclick="exportExcel()">导出Excel</button>
                 </div>
             </div>
+            <div class="form-group">
+                <label for="exampleInputAccount1" class="col-sm-1">考核次数</label>
+                <div class="col-sm-2">
+                    <input type="text" id="check_count" class="form-control" value="">
+                </div>
+                <label for="exampleInputAccount1" class="col-sm-1">职位</label>
+                <div class="col-sm-2" style="width:200px;">
+                    <select class="form-control" id="jobSelect">
+                    </select>
+                </div>
+            </div>
         </form>
     </div>
     <div class="table-title"><span>温馨服务考核情况反馈表(所有员工排名)</span></div>
@@ -47,7 +58,7 @@
                             <th rowspan="2" width="67px;">序号</th><th rowspan="2" width="87px">站名</th><th rowspan="2" width="67px">姓名</th>
                             <th rowspan="2" width="67px">岗位</th><th rowspan="2" width="87px">工号</th><th colspan="9" height="40px">考核扣分</th>
                             <th rowspan="2" width="67px">受检次数</th><th rowspan="2" width="67px">平均扣分(千分制)</th><th rowspan="2" width="55px">得分</th>
-                            <th rowspan="2" width="58px">服务评价</th><th rowspan="2">备注</th>
+                            <th rowspan="2" width="58px">服务评价</th><th rowspan="2"  width="58px">备注</th>
                             </tr>
                             <tr> 
                             <th width="58px">环境卫生</th><th width="58px">仪容仪表</th><th width="58px">表情</th>
@@ -63,15 +74,16 @@
                  <table style="border-top:0;" border="1" width="100%"  align="center">
                     <thead class="table-thead" style="height:0;" align="center">
                         <tr style="display:none;">
-                            <th rowspan="2" width="67px;"></th><th rowspan="2" width="77px"></th><th rowspan="2" width="67px"></th>
-                            <th rowspan="2" width="67px"></th><th rowspan="2" width="67px"></th><th colspan="7" height="40px"></th>
-                            <th rowspan="2" width="67px"></th><th rowspan="2" width="67px"></th><th width="55px"></th>
-                            <th rowspan="2" width="55px"></th><th rowspan="2" ></th>
+                            <th rowspan="2" width="67px;">序号</th><th rowspan="2" width="87px">站名</th><th rowspan="2" width="67px">姓名</th>
+                            <th rowspan="2" width="67px">岗位</th><th rowspan="2" width="87px">工号</th><th colspan="9" height="40px">考核扣分</th>
+                            <th rowspan="2" width="67px">受检次数</th><th rowspan="2" width="67px">平均扣分(千分制)</th><th rowspan="2" width="55px">得分</th>
+                            <th rowspan="2" width="58px">服务评价</th><th rowspan="2"  width="58px">备注</th>
                         </tr>
                         <tr style="display:none;"> 
-                            <th width="55px"></th><th width="55px"></th><th width="55px"></th>
-                            <th width="55px"></th><th width="55px"></th><th width="55px"></th>
-                            <th width="55px"></th>
+                            <th width="58px">环境卫生</th><th width="58px">仪容仪表</th><th width="58px">表情</th>
+                            <th width="58px">收费动作</th><th width="58px">文明用语</th><th width="58px">工作纪律</th>
+                            <th width="58px">便民服务</th><th width="58px">安全管理</th>
+                            <th width="58px">扣分合计</th>
                         </tr>
                     </thead>
                     <tbody class="table-tbody" style="background:white; " align="center">
@@ -83,9 +95,9 @@
 </div>
 <script>
     $(document).ready(function() {
-
+    
         // 设置滚动表格的高度
-        $("#scrollTable").height(  document.body.clientHeight  - 360 );
+        $("#scrollTable").height(  $(window).height()  - 360 );
 
         // 仅选择日期
         $("#start-time").datetimepicker(

+ 25 - 22
VisualInspection_server/src/main/java/com/xintong/SystemInit.java

@@ -1,19 +1,16 @@
 package com.xintong;
 
-import java.util.List;
-
 import org.slf4j.LoggerFactory;
 import org.springframework.context.ApplicationListener;
 import org.springframework.context.event.ContextRefreshedEvent;
 
-import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.bean.Organ;
-import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.ConstantService;
 import com.xintong.visualinspection.service.DepartmentService;
+import com.xintong.visualinspection.service.JobService;
 import com.xintong.visualinspection.service.UserService;
 import com.xintong.visualinspection.service.impl.ConstantServiceImpl;
 import com.xintong.visualinspection.service.impl.DepartmentServiceImpl;
+import com.xintong.visualinspection.service.impl.JobServiceImpl;
 import com.xintong.visualinspection.service.impl.UserServiceImpl;
 import com.xintong.visualinspection.util.CacheUtil;
 
@@ -22,33 +19,39 @@ public class SystemInit implements ApplicationListener<ContextRefreshedEvent> {
 	ConstantService constantService;
 	UserService userService;
 	DepartmentService deptService;
-	
+	JobService jobService;
 	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(SystemInit.class);
 	@Override
 	public void onApplicationEvent(ContextRefreshedEvent arg0) {
 		
 		constantService = arg0.getApplicationContext().getBean(ConstantServiceImpl.class);
-		//加载用户信息
-		List<Constant> constantList = constantService.getAll();
-		for(Constant c:constantList){
-			CacheUtil.codeMap.put(c.getCode_flag()+"_"+c.getCode_value(), c);
-		}
-		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
+		//加载常量信息
+		CacheUtil.refreshCodeMap(constantService);
+		
+//		List<Constant> constantList = constantService.getAll();
+//		for(Constant c:constantList){
+//			CacheUtil.codeMap.put(c.getCode_flag()+"_"+c.getCode_value(), c);
+//		}
+//		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
 		
 		userService = arg0.getApplicationContext().getBean(UserServiceImpl.class);
 		//加载用户信息
-		List<User> userList = userService.getAll();
-		for(User user:userList){
-			CacheUtil.userMap.put(new Long(user.getId()), user);
-		}
-		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
+		CacheUtil.refreshUserMap(userService);
+//		List<User> userList = userService.getAll();
+//		for(User user:userList){
+//			CacheUtil.userMap.put(new Long(user.getId()), user);
+//		}
+//		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
 		//加载部门信息
 		deptService = arg0.getApplicationContext().getBean(DepartmentServiceImpl.class);
-		List<Organ> deptList = deptService.getAll();
-		for(Organ organ:deptList){
-			CacheUtil.deptMap.put(new Long(organ.getId()), organ);
-		}
-		logger.info("加载部门信息成功,数据数:"+CacheUtil.deptMap.size());
+		CacheUtil.refreshDeptMap(deptService);
+//		List<Organ> deptList = deptService.getAll();
+//		for(Organ organ:deptList){
+//			CacheUtil.deptMap.put(new Long(organ.getId()), organ);
+//		}
+//		logger.info("加载部门信息成功,数据数:"+CacheUtil.deptMap.size());
 		
+		jobService = arg0.getApplicationContext().getBean(JobServiceImpl.class);
+		CacheUtil.refreshJobMap(jobService);
 	}
 }

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/Job.java

@@ -15,4 +15,5 @@ public class Job {
     
     // 部门id
     private Long dept_id;
+
 }

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

@@ -69,6 +69,8 @@ public class StatisticsBean {
     private List<Integer> seq_checked_score = new ArrayList<>() ;
     
     private List<Organ> dept_list  ;
+    private List<Integer> checked_score_ids = new ArrayList<>() ;
+    
     
     private String start_score;
     private String end_score;

+ 3 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/User.java

@@ -67,6 +67,8 @@ public class User implements UserDetails {
 	private Integer age;
 	// 职位ID
 	private Integer positionid;
+	// 职位ID
+	private String position_name;
 	// 性别
 	private String sex;
 	// 工号
@@ -85,7 +87,7 @@ public class User implements UserDetails {
 	private List<Role> roles;
 	private List<? extends GrantedAuthority> authorities;
 
-	
+	private List<Integer> position_ids;
 	
 
 	public User() {

+ 1 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/DepartmentMapper.xml

@@ -93,7 +93,7 @@
 	<select id="selectFeeStationGroup" resultType="com.xintong.visualinspection.bean.StatisticsBean"  >
 		SELECT COUNT(1) AS people_num,s.ORGAN_ID AS dept_id, s.name from t_sys_users t 
 			       LEFT JOIN t_br_layer_fee_station s ON t.ORGANID = s.ORGAN_ID
-			WHERE t.POSITIONID =1 AND s.ORGAN_ID IS NOT NULL GROUP BY s.ORGAN_ID 
+			WHERE t.POSITIONID in (1,6) AND s.ORGAN_ID IS NOT NULL GROUP BY s.ORGAN_ID 
 	</select>
     
 </mapper>

+ 9 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml

@@ -9,6 +9,7 @@
         <result column="workno" property="workno" jdbcType="VARCHAR" />
         <result property="truename" column="truename" jdbcType="VARCHAR"/>
         <result property="positionid" column="positionid" jdbcType="INTEGER"/>
+        <result property="position_name" column="position_name" jdbcType="INTEGER"/>
         <result property="idno" column="idno" jdbcType="VARCHAR"/>
         <result property="pic" column="pic" jdbcType="VARCHAR"/>
         <result column="workno" property="workno" jdbcType="VARCHAR" />
@@ -93,10 +94,17 @@
         FROM t_sys_users t LEFT JOIN t_br_layer_fee_station fs ON t.organid = fs.organ_id
         where 1=1 and t.status>0 
         <if test="organid != null and organid != 0">and t.organid = #{organid} </if>
-         <if test="username != null">and t.username = #{username} </if>
+        <if test="username != null">and t.username = #{username} </if>
         <if test="positionid != null and positionid != 0">and t.positionid = #{positionid} </if>
         <if test="classid != null and classid != 0">and t.classid = #{classid} </if>
         <if test="teamid != null and teamid != 0">and t.teamid = #{teamid} </if>
+        <if test="position_ids != null and position_ids.size() > 0">AND
+        		t.positionid in 
+        		<foreach collection="position_ids" item="position_id" index="index"
+		            open="(" close=")" separator=",">
+		            #{position_id}
+		        </foreach>
+        	</if>
         order by workno
     </select>
     <select id="getAllCheckmans" parameterType="com.xintong.visualinspection.bean.User" resultMap="BaseResultMap"  >

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

@@ -7,7 +7,7 @@
 			SELECT t.checked_person , t.checked_dept,ci.parent_id, ci.score  FROM check_score t 
 			LEFT JOIN check_item ci ON t.check_item_id = ci.id 
 			LEFT JOIN check_task ct ON ct.id = t.task_id
-			WHERE 1=1 
+			WHERE 1=1 and ct.check_status!=22
 			<if test="start_date!=null and end_date != null">
 		        AND	 ct.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date} AND ct.check_status != 23
 			</if>
@@ -20,7 +20,7 @@
 
     <select id="selectCheckedTimes" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
     	SELECT COUNT(1) AS checked_num , t.checked_person AS user_id FROM check_task t 
-    	WHERE 1=1 
+    	WHERE 1=1 and t.check_status!=22
 			<if test="start_date!=null and end_date != null">
 		        AND	 t.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date}   AND t.check_status != 23
 			</if>
@@ -32,7 +32,7 @@
     
     <select id="selectFeeStationCheckNum" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
     	SELECT COUNT(DISTINCT( t.checked_person )) AS checked_people_num , COUNT(t.checked_person) AS checked_num  ,t.checked_dept AS dept_id FROM check_task  t
-    	WHERE 1=1
+    	WHERE 1=1 and t.check_status!=22
     		<if test="start_date!=null and end_date != null">
 		        AND	 t.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date}   AND t.check_status != 23
 			</if>
@@ -44,7 +44,7 @@
     		FROM check_score t 
     		LEFT JOIN check_item c ON t.check_item_id = c.id
     		LEFT JOIN check_task ct ON ct.id = t.task_id
-    		WHERE 1=1
+    		WHERE 1=1 and ct.check_status!=22
     		<if test="start_date!=null and end_date != null">
 		        AND	 ct.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date}  AND ct.check_status != 23
 			</if>
@@ -52,11 +52,11 @@
     </select>
     
     <select id="selectFeeStationCheckedPersonScoreDetail" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
-    	    SELECT  u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name  FROM (
+    	    SELECT  u.checked_dept AS dept_id ,u.parent_id AS item_id ,sum(u.score) AS score ,s.name,s.id  FROM (
 			SELECT  t.checked_dept,ci.parent_id, ci.score  FROM check_score t 
 			LEFT JOIN check_item ci ON t.check_item_id = ci.id
 			LEFT JOIN check_task ct ON ct.id = t.task_id
-			WHERE 1=1
+			WHERE 1=1  and ct.check_status!=22
 			<if test="start_date!=null and end_date != null">
 		        AND	 ct.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date}  AND ct.check_status != 23
 			</if> )

+ 5 - 5
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml

@@ -259,13 +259,13 @@
     </update>
     <select id="getUserCount" parameterType="com.xintong.visualinspection.bean.Task" resultMap="userCountMap" >
         SELECT *
-        FROM check_user_count
-        WHERE user_id = #{checked_person}
+        FROM check_task
+        WHERE check_status!=22
+          and checked_person = #{checked_person}
           and period_id = (
           	select period_id
-          	from check_user_count
-          	where task_id = #{id}
-          		and user_id = #{checked_person}
+          	from check_task
+          	where id = #{id}
           )
     </select>
 </mapper>

+ 8 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -32,6 +32,7 @@ import com.xintong.visualinspection.dao.cluster.UserInfoDao;
 import com.xintong.visualinspection.dao.master.StatisticsDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.StatisticsService;
+import com.xintong.visualinspection.util.CacheUtil;
 
 /**
  * 文件名:StatisticsServiceImpl 版本信息:日期:2017/3/30 Copyright 江苏省交通规划设计院 Corporation
@@ -63,7 +64,11 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		Map<Long, StatisticsBo> statisticBoMap = new HashMap<Long, StatisticsBo>();
 
 		User user = new User();
-		user.setPositionid(1);
+		List<Integer> positionList = new ArrayList<Integer>();
+		positionList.add(1);
+		positionList.add(6);
+		user.setPosition_ids(positionList);
+//		user.setPositionid(1);
 		if (obj.getDept_id() != null)
 			user.setOrganid(obj.getDept_id().intValue());
 		List<User> listUserts = userInfoDao.getUsers(user);
@@ -74,6 +79,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 				tmp.setUser(u);
 				statisticBoMap.put(u.getId() + 0L, tmp);
 			}
+			u.setPosition_name(CacheUtil.getJobnameFromMap(new Long(u.getPositionid())));
 		}
 
 		for (StatisticsBean statisticsBean : list) {
@@ -235,6 +241,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 				statis.setAll_check_score(statis.getAll_check_score() + sta.getScore());
 				statis.getChecked_socre_name().add(sta.getName());
 				statis.getChecked_score().add(sta.getScore());
+				statis.getChecked_score_ids().add(sta.getId());
 			}
 		}
 

+ 27 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/util/CacheUtil.java

@@ -6,12 +6,13 @@ import java.util.Map;
 
 import org.slf4j.LoggerFactory;
 
-import com.xintong.SystemInit;
 import com.xintong.visualinspection.bean.Constant;
+import com.xintong.visualinspection.bean.Job;
 import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.User;
 import com.xintong.visualinspection.service.ConstantService;
 import com.xintong.visualinspection.service.DepartmentService;
+import com.xintong.visualinspection.service.JobService;
 import com.xintong.visualinspection.service.UserService;
 
 public class CacheUtil {
@@ -22,6 +23,8 @@ public class CacheUtil {
 	
 	public static Map<String,Constant> codeMap = new HashMap<String,Constant>();
 	
+	public static Map<Long,Job> jobMap = new HashMap<Long,Job>();
+	
 	private static final org.slf4j.Logger logger = LoggerFactory.getLogger(CacheUtil.class);
 	
 	public static void refreshCodeMap(ConstantService constantService){
@@ -51,6 +54,17 @@ public class CacheUtil {
 		logger.info("加载部门信息成功,数据数:"+CacheUtil.deptMap.size());
 	}
 	
+	public static void refreshJobMap(JobService jobService){
+		//加载用户信息
+		Job j = new Job();
+		j.setDept_id(1L);
+		List<Job> jobList = jobService.getJobList(j);
+		for(Job job:jobList){
+			CacheUtil.jobMap.put(new Long(job.getId()), job);
+		}
+		logger.info("加载用户信息成功,数据数:"+CacheUtil.userMap.size());
+	}
+	
 	public static User getUserFromMap(Long key){
 		if(key == null) return null;
 		return  CacheUtil.userMap.get(key);
@@ -74,4 +88,16 @@ public class CacheUtil {
 		}
 		return null;
 	}
+	
+	public static Job getJobFromMap(Long key){
+		if(key == null) return null;
+		return  CacheUtil.jobMap.get(key);
+	}
+	
+	public static String getJobnameFromMap(Long key){
+		if(getJobFromMap(key)!=null){
+			return getJobFromMap(key).getName();
+		}
+		return null;
+	}
 }

+ 8 - 8
VisualInspection_server/src/main/resources/application.properties

@@ -3,8 +3,8 @@ spring.thymeleaf.cache=false
 context.listener.classes=com.xintong.SystemInit
 
 #master.datasource.url = jdbc:mysql://10.112.0.199:3306/visualinspection?useUnicode=true&characterEncoding=utf-8
-#master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
-master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
+master.datasource.url = jdbc:mysql://git.topm.win:6381/visualinspection?useUnicode=true&characterEncoding=utf-8
+#master.datasource.url = jdbc:mysql://10.112.0.199:7002/visualinspection?useUnicode=true&characterEncoding=utf-8
 master.datasource.username = root
 master.datasource.password = root
 master.datasource.driver-class-name = com.mysql.jdbc.Driver
@@ -12,8 +12,8 @@ master.mapper-locations=classpath:com/xintong/visualinspection/mapper/master/*.x
 
 ## \u7528\u6237\u6570\u636e\u6e90\u914d\u7f6e
 #cluster.datasource.url=jdbc:mysql://10.112.0.199:3306/yanhai?useUnicode=true&characterEncoding=utf8
-#cluster.datasource.url=jdbc:mysql://git.topm.win:6381/yanhai?useUnicode=true&characterEncoding=utf8
-cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/yanhai?useUnicode=true&characterEncoding=utf8
+cluster.datasource.url=jdbc:mysql://git.topm.win:6381/yanhai?useUnicode=true&characterEncoding=utf8
+#cluster.datasource.url=jdbc:mysql://10.112.0.199:7002/yanhai?useUnicode=true&characterEncoding=utf8
 cluster.datasource.username=root
 cluster.datasource.password=root
 cluster.datasource.driver-class-name = com.mysql.jdbc.Driver
@@ -54,12 +54,12 @@ spring.datasource.useGlobalDataSourceStat=true
 # Redis\u6570\u636e\u5e93\u7d22\u5f15\uff08\u9ed8\u8ba4\u4e3a0\uff09
 spring.redis.database=0  
 # Redis\u670d\u52a1\u5668\u5730\u5740
-spring.redis.host=10.112.0.199
-#spring.redis.host=git.topm.win
+#spring.redis.host=10.112.0.199
+spring.redis.host=git.topm.win
 # Redis\u670d\u52a1\u5668\u8fde\u63a5\u7aef\u53e3
-#spring.redis.port=6380
+spring.redis.port=6380
 
-spring.redis.port=7003
+#spring.redis.port=7003
 #spring.redis.port=6379 
 # Redis\u670d\u52a1\u5668\u8fde\u63a5\u5bc6\u7801\uff08\u9ed8\u8ba4\u4e3a\u7a7a\uff09
 spring.redis.password=xintong