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

报表增加分数区间选择

wangjianguo 8 лет назад
Родитель
Сommit
23abc97826

+ 13 - 2
VisualInspection/css/statistics/assess_situation.css

@@ -8,11 +8,11 @@
     width:60px;
     float:left;
     padding-top: 6px;
-    margin-left: 100px;
+    margin-left: 5px;
 }
 
 .col-sm-1{
-    width:102px;
+    width:80px;
     float:left;
 }
 
@@ -79,6 +79,17 @@ table{
     border-color:#d9d9d9;
 }
 
+.div-score{
+    float:left;
+    padding-top: 6px;
+}
+
+
+
+
+
+
+
 
 
 

+ 74 - 14
VisualInspection/js/statistics/assess_ranking.js

@@ -4,24 +4,26 @@ function queryEmpClick(){
     $(".table-tbody").empty('');
     var start_date = $("#start-time").val();
     var end_date = $("#end-time").val();
-    if(start_date==null||start_date==''||start_date==undefined||end_date==null||end_date==''||end_date==undefined){
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    var flag = param_method(start_score,end_score);
+    if(flag==false){
+        return;
+    }
+    if( start_date=='' || end_date==''){
         tip("请选择起止日期");
-        return ;
+        return;
     }else{
         start_date += " 00:00:00";
         end_date += " 00:00:00";
     }
-    // if(end_date < start_date){
-    //     alert("结束时间不能比开始时间小");
-    //             return ;
-    // }
     var param = {
         "dept_id": $("#fsList").val(),
         "start_date": start_date,
         "end_date": end_date,
     }
     var url = "statistics/employee/order";
-    getEmployeeInfos(url,param)
+    getEmployeeInfosClick(url,param,start_score,end_score)
 }
 
 function initQueryEmp(){
@@ -44,19 +46,50 @@ function initQueryEmp(){
     var url = "statistics/employee/order";
     getEmployeeInfos(url,param);
 }
+/**
+ * click
+ * @param {*} url 
+ * @param {*} param 
+ */
+function getEmployeeInfosClick(url,param,start_score,end_score){
+    post_common_service( url,param,function(data){
+        var strTbody='';
+        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>"
+                +"<td width='87px;'>"+data[i].user.workno+"</td><td width='55px;'>"+ getItemScore(data[i], '环境') +"</td>"
+                +"<td width='55px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='55px;'>"+getItemScore(data[i], '表情')+"</td>"
+                +"<td width='55px;'>"+getItemScore(data[i], '动作')+"</td><td width='55px;'>"+getItemScore(data[i], '文明用语')+"</td>"
+                +"<td width='55px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='55px;'>"+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='55px;'>"+"</td><td>"+"</td></tr>";
+        }
+    }
+       $(".table-tbody").append(strTbody);   
+    },function(error){
+        return "" ;
+    });
+}
 
+/**
+ * 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='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>"
+                +"<td width='87px;'>"+data[i].user.workno+"</td><td width='55px;'>"+ getItemScore(data[i], '环境') +"</td>"
+                +"<td width='55px;'>"+getItemScore(data[i], '仪容仪表')+"</td><td width='55px;'>"+getItemScore(data[i], '表情')+"</td>"
+                +"<td width='55px;'>"+getItemScore(data[i], '动作')+"</td><td width='55px;'>"+getItemScore(data[i], '文明用语')+"</td>"
+                +"<td width='55px;'>"+ getItemScore(data[i], '工作纪律') +"</td><td width='55px;'>"+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='75px;'>"+"</td><td>"+"</td></tr>";
+                +"<td width='55px;'>"+(1000-filterByZeroHandle(average(data[i]).toFixed(2),'0'))+"</td><td width='55px;'>"+"</td><td>"+"</td></tr>";
         }
        $(".table-tbody").append(strTbody);   
     },function(error){
@@ -121,9 +154,15 @@ function filterByZeroHandle(value , default_display_value){
 }
 
 function exportExcel(){
+    var dept_id = $("#fsList").val();
     var start_date = $("#start-time").val();
     var end_date = $("#end-time").val();
-    var dept_id = $("#fsList").val();
+    var start_score = $("#start-score").val();
+    var end_score = $("#end-score").val();
+    var flag = param_method(start_score,end_score);
+    if(flag==false){
+        return;
+    }
     if( start_date=='' || end_date==''){
         tip("请选择起止日期");
         return ;
@@ -131,5 +170,26 @@ function exportExcel(){
         start_date += " 00:00:00";
         end_date += " 00:00:00";
     }
-    window.open( getserveraddr() + "/file/employee/order?dept_id="+dept_id+"&start_date="+start_date+"&end_date="+end_date);
+    window.open( getserveraddr() + "/file/employee/order?dept_id="+dept_id+
+    "&start_date="+start_date+"&end_date="+end_date+"&start_score="+start_score+"&end_score="+end_score);
+}
+
+
+function param_method(start_score,end_score){
+    
+    if(start_score==''||end_score==''){
+        tip("请输入得分区间");
+        return false;
+    }else if(!(/^[0-9]*$/).test(start_score) || !(/^[0-9]*$/).test(end_score)){
+        tip("请输入整数字!");
+        return false;
+    }else if(parseInt(start_score)>parseInt(end_score)){
+        tip("开始得分不能比结束得分大");
+        return false;
+    }else if(start_score<0 || start_score>1000 || end_score<0 || end_score>1000){
+        tip("得分只能在0-1000之间");
+        return false;
+    }else{
+        return true;
+    }
 }

+ 21 - 11
VisualInspection/view/statistics/emp_ranking.html

@@ -4,7 +4,7 @@
     <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>
@@ -16,6 +16,16 @@
                 <div class="col-sm-4">
                     <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;">
+                </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;">
+                </div>
                 <div class="col-sm-5">
                     <button class="btn btn-primary " type="button" onclick="queryEmpClick()">查询</button>
                 </div>
@@ -36,13 +46,13 @@
                             <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="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>
+                            <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>
                             </tr>
                             <tr> 
-                            <th width="67px">环境卫生</th><th width="67px">仪容仪表</th><th width="67px">表情</th>
-                            <th width="67px">收费动作</th><th width="67px">文明用语</th><th width="67px">工作纪律</th>
-                            <th width="67px">扣分合计</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="55px">扣分合计</th>
                             </tr>
                         </thead>
                        
@@ -56,13 +66,13 @@
                         <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 rowspan="2" width="75px"></th><th rowspan="2" width="75px"></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>
                         </tr>
                         <tr style="display:none;"> 
-                            <th width="67px"></th><th width="67px"></th><th width="67px"></th>
-                            <th width="67px"></th><th width="67px"></th><th width="67px"></th>
-                            <th width="67px"></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="55px"></th>
                         </tr>
                     </thead>
                     <tbody class="table-tbody" style="background:white; " align="center">

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

@@ -67,4 +67,7 @@ public class StatisticsBean {
     private List<Integer> checked_score = new ArrayList<>() ;
     
     private List<Integer> seq_checked_score = new ArrayList<>() ;
+    
+    private String start_score;
+    private String end_score;
 }

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

@@ -29,4 +29,6 @@ public class StatisticsBo {
     
     private String check_score_avg;
     
+    private String check_score;
+    
 }

+ 6 - 2
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java

@@ -37,8 +37,10 @@ public class FileExcelController extends BaseController {
      * @since  1.0.0
      */
     @RequestMapping(value = "/employee/order",method=RequestMethod.GET)
-    public String getEmployeeOrder(HttpServletRequest req,HttpServletResponse resp,@RequestParam Long dept_id,
-    		@RequestParam String start_date,@RequestParam String end_date){
+    public String getEmployeeOrder(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam Long dept_id,
+    		@RequestParam String start_date,@RequestParam String end_date,
+    		@RequestParam String start_score,@RequestParam String end_score){
     	StatisticsBean obj = new StatisticsBean();
     	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
     	try {
@@ -47,6 +49,8 @@ public class FileExcelController extends BaseController {
 			obj.setDept_id(dept_id);
 			obj.setStart_date(start);
 			obj.setEnd_date(end);
+			obj.setStart_score(start_score);
+			obj.setEnd_score(end_score);
 		} catch (ParseException e) {
 			e.printStackTrace();
 		}

+ 89 - 74
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -10,6 +10,7 @@ import java.io.OutputStream;
 import java.util.ArrayList;
 import java.util.Comparator;
 import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -99,9 +100,9 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			public int compare(StatisticsBo o1, StatisticsBo o2) {
 				if (o1.getCheck_all_score() > o2.getCheck_all_score()) {
 					return 1;
-				} else if(o1.getCheck_all_score()< o2.getCheck_all_score()){
-					return -1 ;
-				}else {
+				} else if (o1.getCheck_all_score() < o2.getCheck_all_score()) {
+					return -1;
+				} else {
 					return 0;
 				}
 			}
@@ -117,11 +118,11 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		int i = 0;
 		for (StatisticsBean sta : lists) {
-			if(i++ <7){
+			if (i++ < 7) {
 				sta.setId(1);
-			}else if(i++ < 13){
+			} else if (i++ < 13) {
 				sta.setId(2);
-			}else{
+			} else {
 				sta.setId(3);
 			}
 			mapStationInfos.put(sta.getDept_id(), sta);
@@ -152,26 +153,26 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		}
 
 		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()){
+				if (o1.getId() > o2.getId()) {
 					return 1;
-				}else if(o1.getId() == o2.getId()){
-					if(o1.getAll_check_score() > o2.getAll_check_score()){
+				} 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()){
+					} else if (o1.getAll_check_score() < o2.getAll_check_score()) {
 						return -1;
-					}else{
-						return 0 ;
+					} else {
+						return 0;
 					}
-				}else{
-					return -1 ;
+				} else {
+					return -1;
 				}
 			}
 		});
-		
+
 		return sortList;
 	}
 
@@ -183,11 +184,11 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		Map<Long, StatisticsBean> mapStationInfos = new HashMap<>();
 		int i = 0;
 		for (StatisticsBean sta : lists) {
-			if(i++ <7){
+			if (i++ < 7) {
 				sta.setId(1);
-			}else if(i++ < 13){
+			} else if (i++ < 13) {
 				sta.setId(2);
-			}else{
+			} else {
 				sta.setId(3);
 			}
 			mapStationInfos.put(sta.getDept_id(), sta);
@@ -216,104 +217,118 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		sortList.sort(new Comparator<StatisticsBean>() {
 			@Override
 			public int compare(StatisticsBean o1, StatisticsBean o2) {
-				if(o1.getId()> o2.getId()){
+				if (o1.getId() > o2.getId()) {
 					return 1;
-				}else if(o1.getId() == o2.getId()){
-					if(o1.getAll_check_score() > o2.getAll_check_score()){
+				} 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()){
+					} else if (o1.getAll_check_score() < o2.getAll_check_score()) {
 						return -1;
-					}else{
-						return 0 ;
+					} else {
+						return 0;
 					}
-				}else{
-					return -1 ;
+				} else {
+					return -1;
 				}
 			}
 		});
-		
+
 		return sortList;
 
 	}
 
-	private Integer getItemScore(StatisticsBo obj ,String name){
+	private Integer getItemScore(StatisticsBo obj, String name) {
 		List<String> names = obj.getChecked_socre_name();
 		List<Integer> scores = obj.getChecked_score();
-		for(int i=0;i<names.size();i++ ){
-			if( names.get(i).indexOf(name)>-1){
+		for (int i = 0; i < names.size(); i++) {
+			if (names.get(i).indexOf(name) > -1) {
 				return scores.get(i);
 			}
 		}
-		return 0 ;
+		return 0;
 	}
-	
-	private Integer getItemScore2(StatisticsBean obj ,String name){
+
+	private Integer getItemScore2(StatisticsBean obj, String name) {
 		List<String> names = obj.getChecked_socre_name();
 		List<Integer> scores = obj.getChecked_score();
-		for(int i=0;i<names.size();i++ ){
-			if( names.get(i).indexOf(name)>-1){
+		for (int i = 0; i < names.size(); i++) {
+			if (names.get(i).indexOf(name) > -1) {
 				return scores.get(i);
 			}
 		}
-		return 0 ;
+		return 0;
 	}
-	
+
 	@Override
 	public void getEmployeeCheckedInfo(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
 		// 检索数据
 		List<StatisticsBo> listStatistic = getEmployeeCheckedInfo(obj);
+		double start_score = Double.parseDouble(obj.getStart_score());
+		double end_score = Double.parseDouble(obj.getEnd_score());
 		// 处理数据
-		for(int i=0;i<listStatistic.size();i++){
-			StatisticsBo st = listStatistic.get(i) ;
-			// id值设置
-			st.setId(i+1);  
-			//平均值
-			st.setCheck_score_avg((st.getChecked_num()!=0)?String.format("%.2f", st.getCheck_all_score()/(st.getChecked_num()+0.0)):"0.00");
-			st.getEmp_item_score().add(getItemScore(st,"环境卫生"));
-			st.getEmp_item_score().add(getItemScore(st,"仪容仪表"));
-			st.getEmp_item_score().add(getItemScore(st,"表情"));
-			st.getEmp_item_score().add(getItemScore(st,"动作"));
-			st.getEmp_item_score().add(getItemScore(st,"文明用语"));
-			st.getEmp_item_score().add(getItemScore(st,"工作纪律"));
-		}
-		exportExcel("温馨服务考核情况反馈表","employee_order",listStatistic,resp);
+		int j = 1;
+		for (Iterator<StatisticsBo> it = listStatistic.iterator(); it.hasNext(); ) {
+			StatisticsBo st = it.next();
+			double score = (st.getChecked_num() != 0) ? 1000 - (st.getCheck_all_score() / (st.getChecked_num())) : 1000;
+			if (score >= start_score && score <= end_score) {
+				// 得分
+				st.setCheck_score((st.getChecked_num() != 0) ? String.format("%.2f", score) : "1000.00");
+				// 平均值
+				st.setCheck_score_avg((st.getChecked_num() != 0)
+						? String.format("%.2f", st.getCheck_all_score() / (st.getChecked_num() + 0.0)) : "0.00");
+				// id值设置
+				st.setId(j++);
+				st.getEmp_item_score().add(getItemScore(st, "环境卫生"));
+				st.getEmp_item_score().add(getItemScore(st, "仪容仪表"));
+				st.getEmp_item_score().add(getItemScore(st, "表情"));
+				st.getEmp_item_score().add(getItemScore(st, "动作"));
+				st.getEmp_item_score().add(getItemScore(st, "文明用语"));
+				st.getEmp_item_score().add(getItemScore(st, "工作纪律"));
+			} else {
+				it.remove();
+			}
+        }
+		
+		exportExcel("温馨服务考核情况反馈表", "employee_order", listStatistic, resp);
 	}
 
 	@Override
 	public void getFeeStationCheckedScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
 		List<StatisticsBean> list = getFeeStationCheckedScore(obj);
-		for(StatisticsBean st :list){
-			st.setCheck_no_score(st.getPeople_num() - st.getScore_fifteen() -st.getScore_fifteen()-st.getScore_over_fifty() );
-			st.setCheck_score_avg((st.getChecked_num()!=0)?st.getAll_check_score()/(st.getChecked_num()+0.0f):0.00f );
+		for (StatisticsBean st : list) {
+			st.setCheck_no_score(
+					st.getPeople_num() - st.getScore_fifteen() - st.getScore_fifteen() - st.getScore_over_fifty());
+			st.setCheck_score_avg(
+					(st.getChecked_num() != 0) ? st.getAll_check_score() / (st.getChecked_num() + 0.0f) : 0.00f);
 			st.setScore_avg(String.format("%.2f", 1000.0 - st.getCheck_score_avg()));
 		}
 		// 处理数据
-		exportExcel("温馨服务检查千分考核扣分情况汇总表","checked_info",list,resp);
+		exportExcel("温馨服务检查千分考核扣分情况汇总表", "checked_info", list, resp);
 	}
 
 	@Override
 	public void getFeeStationCheckItemScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
 		List<StatisticsBean> list = getFeeStationCheckItemScore(obj);
 		// 处理数据
-		for(int i=0;i<list.size();i++){
-			StatisticsBean st = list.get(i) ;
-			// id值设置   seq_checked_score
-			//平均值
-			st.setCheck_score_avg((st.getChecked_num()!=0)? st.getAll_check_score()/(st.getChecked_num()+0.0f):0.00f);
-			st.getSeq_checked_score().add(getItemScore2(st,"环境卫生"));
-			st.getSeq_checked_score().add(getItemScore2(st,"仪容仪表"));
-			st.getSeq_checked_score().add(getItemScore2(st,"表情"));
-			st.getSeq_checked_score().add(getItemScore2(st,"动作"));
-			st.getSeq_checked_score().add(getItemScore2(st,"文明用语"));
-			st.getSeq_checked_score().add(getItemScore2(st,"工作纪律"));
+		for (int i = 0; i < list.size(); i++) {
+			StatisticsBean st = list.get(i);
+			// id值设置 seq_checked_score
+			// 平均值
+			st.setCheck_score_avg(
+					(st.getChecked_num() != 0) ? st.getAll_check_score() / (st.getChecked_num() + 0.0f) : 0.00f);
+			st.getSeq_checked_score().add(getItemScore2(st, "环境卫生"));
+			st.getSeq_checked_score().add(getItemScore2(st, "仪容仪表"));
+			st.getSeq_checked_score().add(getItemScore2(st, "表情"));
+			st.getSeq_checked_score().add(getItemScore2(st, "动作"));
+			st.getSeq_checked_score().add(getItemScore2(st, "文明用语"));
+			st.getSeq_checked_score().add(getItemScore2(st, "工作纪律"));
 		}
-		exportExcel("温馨服务检查情况统计表","checked_item_info",list,resp);
+		exportExcel("温馨服务检查情况统计表", "checked_item_info", list, resp);
 	}
 
-	
-	private void exportExcel(String fileName , String excelTemplateName,List<?> list,HttpServletResponse resp){
-		String path = "./"+fileName+".xls";
-		try (InputStream is = this.getClass().getResourceAsStream("/"+excelTemplateName+".xls")) {
+	private void exportExcel(String fileName, String excelTemplateName, List<?> list, HttpServletResponse resp) {
+		String path = "./" + fileName + ".xls";
+		try (InputStream is = this.getClass().getResourceAsStream("/" + excelTemplateName + ".xls")) {
 			try (OutputStream os = new FileOutputStream(path)) {
 				Context context = new Context();
 				context.putVar("list", list);
@@ -341,10 +356,10 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			toClient.flush();
 			toClient.close();
 			// 删除生成的临时文件
-			if(file.exists()){
+			if (file.exists()) {
 				file.delete();
 			}
-			
+
 		} catch (Exception e) {
 			logger.error(e.toString());
 		}

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