Jelajahi Sumber

Merge branch 'master' of http://git_xt.git.topm.win:8080/wenhongquan/VisualInspection

minitiger 8 tahun lalu
induk
melakukan
6926a9c8ca

+ 1 - 1
VisualInspection/js/statistics/assess_ranking.js

@@ -51,7 +51,7 @@ function getEmployeeInfos(url,param){
         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='77px;'>"+data[i].user.workno+"</td><td width='67px;'>"+ getItemScore(data[i], '环境') +"</td>"
+                +"<td width='87px;'>"+data[i].user.workno+"</td><td width='67px;'>"+ getItemScore(data[i], '环境') +"</td>"
                 +"<td width='67px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='67px;'>"+getItemScore(data[i], '表情')+"</td>"
                 +"<td width='67px;'>"+getItemScore(data[i], '动作')+"</td><td width='67px;'>"+getItemScore(data[i], '文明用语')+"</td>"
                 +"<td width='67px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='67px;'>"+data[i].check_all_score+"</td>"

+ 20 - 7
VisualInspection/js/statistics/assess_type.js

@@ -68,7 +68,7 @@ function initQueryType(){
  * @param {*} i 
  * @param {*} avg 
  */
-function gethtml(data,i,avg){
+function gethtml(data,i,avg,lists){
     var strTbody = "";
 
     if(i==0 || i==7 || i==13){
@@ -76,18 +76,31 @@ function gethtml(data,i,avg){
         num = 1;
         var name = "";
         var rowspan = 0;
+          order = 1;
         if(i==0){
             name = "连云港";
             rowspan = 7;
-            order = 1;
+            for(var i=0;i<lists.length;i++){
+                if(avg < lists[i]){
+                    order = order + 1;
+                }
+            }
         }else if(i==7){
             name = "盐城";
             rowspan = 6;
-            order = 2;
+            for(var i=0;i<lists.length;i++){
+                if(avg < lists[i]){
+                    order = order + 1;
+                }
+            }
         }else if(i==13){
             name = "南通";
             rowspan = 8;
-            order = 3;
+            for(var i=0;i<lists.length;i++){
+                if(avg < lists[i]){
+                    order = order + 1;
+                }
+            }
         }
         strTbody += "<tr><td rowspan="+rowspan+">"+order+"</td>"+"<td rowspan="+rowspan+">"+name+"</td>";
         strTbody+="<td>"+num+"</td><td>"+data.name+"</td><td>"+filter(data.people_num,'0')
@@ -148,11 +161,11 @@ function check_people_avg(data){
      
         for(i=0;i<data.length;i++){
            if(i==0){
-                $(".table-tbody").append(gethtml(data[i],i,dataArray[0]));
+                $(".table-tbody").append(gethtml(data[i],i,dataArray[0],dataArray));
            }else if(i==7){
-                $(".table-tbody").append(gethtml(data[i],i,dataArray[1]));
+                $(".table-tbody").append(gethtml(data[i],i,dataArray[1],dataArray));
            }else if(i==13){
-                $(".table-tbody").append(gethtml(data[i],i,dataArray[2]));
+                $(".table-tbody").append(gethtml(data[i],i,dataArray[2],dataArray));
            }else{
                 $(".table-tbody").append(gethtml(data[i],i));
                

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

@@ -35,7 +35,7 @@
                         <thead class="table-thead" align="center">
                             <tr>
                             <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="77px">工号</th><th colspan="7" height="40px">考核扣分</th>
+                            <th rowspan="2" width="67px">岗位</th><th rowspan="2" width="87px">工号</th><th colspan="7" height="40px">考核扣分</th>
                             <th rowspan="2" width="67px">受检次数</th><th rowspan="2" width="67px">平均扣分(千分制)</th>
                             <th rowspan="2" width="75px">服务评价</th><th rowspan="2">备注</th>
                             </tr>

+ 59 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -115,7 +115,15 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		// 获取收费站信息收费站人数
 		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
+		int i = 0;
 		for (StatisticsBean sta : lists) {
+			if(i++ <7){
+				sta.setId(1);
+			}else if(i++ < 13){
+				sta.setId(2);
+			}else{
+				sta.setId(3);
+			}
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
@@ -143,7 +151,28 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		}
 
-		return new ArrayList<>(mapStationInfos.values());
+		List<StatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+		
+		sortList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				if(o1.getId()> o2.getId()){
+					return 1;
+				}else if(o1.getId() == o2.getId()){
+					if(o1.getAll_check_score() > o2.getAll_check_score()){
+						return 1;
+					}else if(o1.getAll_check_score() < o2.getAll_check_score()){
+						return -1;
+					}else{
+						return 0 ;
+					}
+				}else{
+					return -1 ;
+				}
+			}
+		});
+		
+		return sortList;
 	}
 
 	@Override
@@ -152,7 +181,15 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		// 获取收费站信息收费站人数
 		List<StatisticsBean> lists = departmentDao.selectFeeStationGroup(obj);
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
+		int i = 0;
 		for (StatisticsBean sta : lists) {
+			if(i++ <7){
+				sta.setId(1);
+			}else if(i++ < 13){
+				sta.setId(2);
+			}else{
+				sta.setId(3);
+			}
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
@@ -175,7 +212,27 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		}
 
-		return new ArrayList<>(mapStationInfos.values());
+		List<StatisticsBean> sortList = new ArrayList<>(mapStationInfos.values());
+		sortList.sort(new Comparator<StatisticsBean>() {
+			@Override
+			public int compare(StatisticsBean o1, StatisticsBean o2) {
+				if(o1.getId()> o2.getId()){
+					return 1;
+				}else if(o1.getId() == o2.getId()){
+					if(o1.getAll_check_score() > o2.getAll_check_score()){
+						return 1;
+					}else if(o1.getAll_check_score() < o2.getAll_check_score()){
+						return -1;
+					}else{
+						return 0 ;
+					}
+				}else{
+					return -1 ;
+				}
+			}
+		});
+		
+		return sortList;
 
 	}