Przeglądaj źródła

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

minitiger 8 lat temu
rodzic
commit
1416e75159

+ 9 - 1
VisualInspection/css/statistics/atendance_style.css

@@ -11,12 +11,20 @@
 .table-head th{
     border: 1px solid #d9d9d9;
     text-align: center;
+    height: 30px;
+    background:#ebf3fd;
 }
 
 .table-tbody td{
     border: 1px solid #d9d9d9;
+    height: 38px;
 }
 
 td.b-grey{
     background:grey;
-}
+}
+
+.table-tbody tr:nth-child(2n){
+    background: #efefef;
+}
+

+ 4 - 4
VisualInspection/css/statistics/personal_data_statistics.css

@@ -10,7 +10,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 .row-2{
     width:100%;
@@ -182,7 +182,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }.container-right{
     width:98%;
     padding-bottom: 0px;
@@ -193,7 +193,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 
 .row-1 span{
@@ -237,7 +237,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 .border-line{
     width:100%;

+ 4 - 4
VisualInspection/css/statistics/road_manage_statistics.css

@@ -10,7 +10,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 
 .row-1 span{
@@ -115,7 +115,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }.container-right{
     width:98%;
     padding-bottom: 0px;
@@ -126,7 +126,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 
 .row-1 span{
@@ -207,7 +207,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 .border-line{
     width:100%;

+ 3 - 3
VisualInspection/css/statistics/toll_station_statistics.css

@@ -149,7 +149,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }.container-right{
     width:98%;
     padding-bottom: 0px;
@@ -160,7 +160,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 
 .row-1 span{
@@ -234,7 +234,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 .border-line{
     width:100%;

+ 4 - 4
VisualInspection/css/statistics/total_company_statistics.css

@@ -10,7 +10,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 
 .row-1 span{
@@ -106,7 +106,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }.container-right{
     width:98%;
     padding-bottom: 0px;
@@ -117,7 +117,7 @@
 .row-1{
     width:100%;
     height:35px;
-    background-color: #f5f5f5;
+    background-color:#fff;
 }
 
 .row-1 span{
@@ -192,7 +192,7 @@
 .row-8{
     height: 100%;
     height:400px;
-    background-color: #f5f5f5;
+    background-color: #fff;
 }
 .border-line{
     width:100%;

+ 1 - 1
VisualInspection/js/mytask/check.js

@@ -396,7 +396,7 @@ function saveEdit() {
         var picsStr = "";
         if (imgArr && imgArr.length > 0) {
             for (var i = 0; i < imgArr.length; i++) {
-                picsStr += imgArr[i].src + ","
+                picsStr += imgArr[i].attr("path") + ","
             }
             picsStr = picsStr.substr(0, picsStr.length - 1);
         }

+ 16 - 5
VisualInspection/js/statistics/check_workload_statistics.js

@@ -1,8 +1,8 @@
 // 默认初始化日期一个月
 $(".div-start input").val(new Date().getFullYear()+"-"+new Date().getMonth()+"-"+new Date().getDate());
 $(".div-end input").val(new Date().getFullYear()+"-"+(new Date().getMonth()+1)+"-"+new Date().getDate());
-var start_date = $(".div-start input").val()+" 00:00:00";
-var end_date = $(".div-end input").val()+" 23:59:59";
+var start_date = $(".div-start input").val()+" 23:00:00";
+var end_date = $(".div-end input").val()+" 23:00:00";
 var user_id = $("#select-personal").val();      
 var cur_status;
 var hide = false;
@@ -84,11 +84,22 @@ $(function(){
 								);
 	}
 
+	// 导出excel
+	$("#export-check-info").click(function(){
+		var param = '';
+		var start_date = $(".div-start input").val()+" 23:00:00";
+		var end_date = $(".div-end input").val()+" 23:00:00";
+		if( $("#select-personal").val()!=''){
+			param += "&user_id=" + $("#select-personal").val() ;
+		}
+		
+		window.open( getserveraddr() +"/file/check/info?queryType=1&start_date="+ start_date +'&end_date='+end_date+param  );
+	})
 
 
     $(".query button").click(function(){
-		var start_date = $(".div-start input").val()+" 00:00:00";
-		var end_date = $(".div-end input").val()+" 23:59:59";
+		var start_date = $(".div-start input").val()+" 23:00:00";
+		var end_date = $(".div-end input").val()+" 23:00:00";
 		var startStr = start_date.replace(/-/g, '/');
 		var endStr = end_date.replace(/-/g, '/');
 		var start = new Date(startStr);
@@ -107,10 +118,10 @@ $(function(){
      * 稽查人员下拉框
      */
     function select_personal(){
-        var tempStr = '';
         var sec = document.getElementById('select-personal');
         post_common_service( "user/getAllCheckman",{},function(data){
             if(data.length!=0){
+        		var tempStr = '<option value="">全部</option>';
                 for(var i=0;i<data.length;i++){
                     tempStr += "<option value="+data[i].id+">"+data[i].truename+"</option>";
                 }

+ 1 - 2
VisualInspection/js/statistics/personal_data_statistics.js

@@ -1,5 +1,4 @@
 var year = new Date().getFullYear();
-var month = new Date().getMonth()+1;
 var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
 var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
 var array_year_score = new Array();
@@ -370,7 +369,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 

+ 3 - 3
VisualInspection/js/statistics/road_manage_statistics.js

@@ -1,5 +1,5 @@
 		var year = new Date().getFullYear();
-		var month = new Date().getMonth()+1;
+		var month = new Date().getMonth();
 		var date = new Date().getDate();
 		var year_assess ;
 		var score_rank;
@@ -535,7 +535,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 
@@ -764,7 +764,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 

+ 6 - 8
VisualInspection/js/statistics/toll_station_statistics.js

@@ -1,5 +1,5 @@
      	var year = new Date().getFullYear();
-		var month = new Date().getMonth()+1;
+		var month = new Date().getMonth();
 		var date = new Date().getDate();
 		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
 		var monthsCH = ['一月','二月','三月','四月','五月','六月','七月','八月','九月','十月','十一月','十二月'];
@@ -472,9 +472,7 @@ $(function(){
 			$("#progress span").text("考核进步Top5排行榜");
 			$("#progress-rank-assess").css("display","block");
 			$("#backward-rank-assess").css("display","none");
-			//init_progress_rank_assess("statistics/fs/up/five",select_month+'',select_station);
-			// document.getElementById("progress-rank-assess").style.display="";
-			// document.getElementById("progress-rank-assess-back").style.display="none";
+			
 			change_echart = 1
 		}
 		
@@ -527,8 +525,8 @@ $(function(){
 						points_assess = ec.init(document.getElementById('tollStation-points-assess'),theme);
 						rank_assess = ec.init(document.getElementById('progress-rank-assess'));
 						score_rank = ec.init(document.getElementById('people-score-rank'));
-						check_type = ec.init(document.getElementById('server-check-type'));
-						people_points = ec.init(document.getElementById('each-people-points'),theme);
+						check_type = ec.init(document.getElementById('server-check-type'),theme);
+						people_points = ec.init(document.getElementById('each-people-points'));
 						rank_assess_back = ec.init(document.getElementById('backward-rank-assess'));
 			}
 	    ); 
@@ -647,7 +645,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 
@@ -853,7 +851,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 

+ 4 - 3
VisualInspection/js/statistics/total_company_statistics.js

@@ -1,5 +1,5 @@
 		var year = new Date().getFullYear();
-		var month = new Date().getMonth()+1;
+		var month = new Date().getMonth();
 		var date = new Date().getDate();
 		var array_year_score = new Array();
 		var months = ['1','2','3','4','5','6','7','8','9','10','11','12'];
@@ -476,7 +476,8 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								// formatter: '{b} : {c} ({d}%)' 
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 
@@ -630,7 +631,7 @@ $(function(){
 						normal:{ 
 							label:{ 
 								show: true, 
-								formatter: '{b} : {c} ({d}%)'  
+								formatter: '{b} : {d}%'  
 							}, 
 							labelLine :{show:true} 
 							} 

+ 3 - 9
VisualInspection/view/statistics/check_workload_statistics.html

@@ -12,6 +12,8 @@
             <div class="div-to"><label>-</label></div>
             <div class="div-end"><input placeholder="请选择考核结束时间"></input></div>
             <div class="query div-button"><button>查询</button></div>
+
+            <div style="margin-right:30px;float:right;" class="div-button"><button id="export-check-info">导出</button></div>
         </div>
     </div> 
 
@@ -28,12 +30,4 @@
             <div class="datatable" data-checkable="true" data-sortable="true"></div>
     </div>
   
-</div>
-<script>
-    $(document).ready(function() {
-
-       
-    });
-</script>
-
-       
+</div>

+ 59 - 62
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java

@@ -1,62 +1,59 @@
-package com.xintong.visualinspection.bean;
-
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import org.mockito.internal.matchers.CompareTo;
-
-import lombok.Data;
-
-/**
- * 文件名:Job
- * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
- */
-@Data
-public class StatisticsBo {
-    //编号
-    private Integer id;
- 
-    private int checked_num = 0 ;
-    
-    private int check_all_score =0 ; 
-    
-    private List<String> checked_socre_name = new ArrayList<>() ;
-    
-    private List<Integer> checked_score = new ArrayList<>() ;
-    
-    private User user;
-    
-    private List<Integer> emp_item_score = new ArrayList<>();
-    
-    private String check_score_avg;
-    
-    private String check_score;
-    
-    // 公司排名
-    private Integer company_ranking;
-    // 道管排名
-    private Integer center_ranking;
-    
-    // 收费站排名
-    private Integer fee_station_ranking;
-    
-    // 比较大小 1 小 , -1 大
-    public int compareTo(StatisticsBo o2){
-    	double a = 1000.0 ,b=1000.0 ;
-		if(this.getChecked_num()!=0 ){
-			a = this.getCheck_all_score() / (this.getChecked_num()+0.00);
-		}
-		if(o2.getChecked_num()!=0){
-			b = o2.getCheck_all_score()/(o2.getChecked_num()+0.00);
-		}
-		if (a > b ) {
-			return 1;
-		} else if (a < b) {
-			return -1;
-		} else {
-			return 0;
-		}	
-    }
-    
-}
+package com.xintong.visualinspection.bean;
+
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import lombok.Data;
+
+/**
+ * 文件名:Job
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class StatisticsBo {
+    //编号
+    private Integer id;
+ 
+    private int checked_num = 0 ;
+    
+    private int check_all_score =0 ; 
+    
+    private List<String> checked_socre_name = new ArrayList<>() ;
+    
+    private List<Integer> checked_score = new ArrayList<>() ;
+    
+    private User user;
+    
+    private List<Integer> emp_item_score = new ArrayList<>();
+    
+    private String check_score_avg;
+    
+    private String check_score;
+    
+    // 公司排名
+    private Integer company_ranking;
+    // 道管排名
+    private Integer center_ranking;
+    
+    // 收费站排名
+    private Integer fee_station_ranking;
+    
+    // 比较大小 1 小 , -1 大
+    public int compareTo(StatisticsBo o2){
+    	double a = 1000.0 ,b=1000.0 ;
+		if(this.getChecked_num()!=0 ){
+			a = this.getCheck_all_score() / (this.getChecked_num()+0.00);
+		}
+		if(o2.getChecked_num()!=0){
+			b = o2.getCheck_all_score()/(o2.getChecked_num()+0.00);
+		}
+		if (a > b ) {
+			return 1;
+		} else if (a < b) {
+			return -1;
+		} else {
+			return 0;
+		}	
+    }
+    
+}

+ 19 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java

@@ -112,4 +112,23 @@ public class FileExcelController extends BaseController {
     	return super.returnSuccessResult(null);
     }
     
+    /**
+     * 稽查人员工作量统计
+     */
+    @RequestMapping(value = "/check/info",method=RequestMethod.GET)
+    public String getCheckWorkExcel(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam String start_date,@RequestParam String end_date,
+    		@RequestParam Integer queryType,@RequestParam(required=false) Integer user_id){
+    	StatisticsBean obj = new StatisticsBean();
+		Date start = DateUtil.strParseDate(start_date);
+		Date end = DateUtil.strParseDate(end_date);
+		obj.setStart_date(start);
+		obj.setEnd_date(end);
+		obj.setQueryType(queryType);
+		if(user_id != null){
+			obj.setUser_id(user_id+0L);			
+		}
+    	statisticsService.getCheckInfo(obj, req, resp);
+    	return super.returnSuccessResult(null);
+    }
 }

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

@@ -292,13 +292,16 @@
      		<if test="queryType!=null and queryType==0">
      			AND   t.checked_person = #{user_id}
      		</if>
-     		<if test="queryType!=null and queryType==1">
+     		<if test="queryType!=null and queryType==1 and user_id!=null and user_id!=''">
      			AND  t.checkman = #{user_id}
      		</if>
-     		<if test="start_date !=null">
+     		<if test="start_date !=null and end_date !=null and queryType ==1">
+     			AND t.create_time >= #{start_date} AND t.create_time &lt;= #{end_date}
+     		</if>
+     		<if test="start_date !=null and queryType == 0">
 				AND  t.start_time >= #{start_date}
 			</if>
-			<if test="end_date !=null">
+			<if test="end_date !=null and queryType == 0">
 				AND t.end_time &lt;= #{end_date}
 			</if>
      </select>
@@ -316,8 +319,10 @@
 					check_task t
 				LEFT JOIN check_score cs ON t.id = cs.task_id
 				WHERE
-				t.check_status != 22 AND
-				t.checkman = #{checkman_id}
+				t.check_status != 22 
+				<if test="checkman_id!=null and checkman_id!=''">
+					AND t.checkman = #{checkman_id}				
+				</if>
 				<if test="start_date !=null">
 					AND  t.start_time >= #{start_date}
 				</if>
@@ -364,7 +369,7 @@
     
     <select id="selectFsWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
     	SELECT t.* , ct.id AS check_id  FROM sys_user_class t 
-    		LEFT JOIN check_task ct ON t.id = ct.user_class_id AND ct.check_status != 22
+    		LEFT JOIN check_task ct ON t.id = ct.user_class_id AND ct.check_status != 22 AND t.class_type = ct.class_type AND t.user_id = ct.checked_person
     		WHERE 1=1
     		<include refid="select_Fswork_condition" />
     		ORDER BY t.work_date , t.user_id
@@ -380,7 +385,7 @@
     
     <select id="selectFsUnregularWork" parameterType="com.xintong.visualinspection.bean.StatisticsFsWork" resultMap="statisticsFsWork">
     	SELECT t.* , ct.id AS check_id  FROM sys_user_class_unregular t 
-    		LEFT JOIN check_task ct ON t.id = ct.user_class_unregular_id  AND ct.check_status != 22
+    		LEFT JOIN check_task ct ON t.id = ct.user_class_unregular_id  AND ct.check_status != 22 AND t.class_type = ct.class_type AND t.user_id = ct.checked_person
     		WHERE 1=1   
     		<include refid="select_Fswork_condition" />
     		ORDER BY t.work_date

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

@@ -89,4 +89,7 @@ public interface StatisticsService {
 	
 	// 收费站Excel申诉
 	public void getExcelAppealInfo(CheckAppealStatistic obj,String monthName,HttpServletRequest req,HttpServletResponse resp);
+	
+	// 稽查人员工作量统计
+	public void getCheckInfo(StatisticsBean obj,HttpServletRequest req,HttpServletResponse resp);
 }

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

@@ -1226,5 +1226,22 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		
 		return ObjList;
 	}
-	
+
+	@Override
+	public void getCheckInfo(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
+		List<StatisticsBean> list = statisticsDao.selectOneCheckedDetailInfo(obj);
+		if(obj.getQueryType() == 1){
+			int seq = 1 ;
+			for(StatisticsBean sta : list){
+				sta.setId(seq++);
+				sta.setCheckman_name( CacheUtil.getUserFromMap(sta.getCheckman_id()+0L).getTruename()  ); 
+				sta.setChecked_name( CacheUtil.getUserFromMap(sta.getUser_id()+0L).getTruename());
+				sta.setFeeStationName( CacheUtil.getOrganFromMap(sta.getDept_id()).getOrganname() );
+				SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm");
+				SimpleDateFormat formatter2 = new SimpleDateFormat("- HH:mm");
+				sta.setCheck_task_time_name( formatter.format(sta.getStart_date())+formatter2.format(sta.getEnd_date()));
+			}
+		}
+		exportExcel("稽查人员工作量统计", "check_info", list, resp);
+	}
 }

BIN
VisualInspection_server/src/main/resources/check_info.xls