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

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

minitiger 8 лет назад
Родитель
Сommit
bdc862b398
23 измененных файлов с 275 добавлено и 106 удалено
  1. 7 0
      VisualInspection/css/common/header.css
  2. 27 1
      VisualInspection/css/user/login.css
  3. BIN
      VisualInspection/images/bg.png
  4. BIN
      VisualInspection/images/brige.png
  5. 1 1
      VisualInspection/js/lib/imageupload/js/imgUp.js
  6. 1 1
      VisualInspection/js/main.js
  7. 11 6
      VisualInspection/js/statistics/assess_ranking.js
  8. 32 6
      VisualInspection/js/statistics/assess_situation.js
  9. 18 4
      VisualInspection/js/statistics/assess_type.js
  10. 8 2
      VisualInspection/js/user/addUser.js
  11. 1 2
      VisualInspection/js/util/util.js
  12. 4 0
      VisualInspection/view/common/head.html
  13. 1 1
      VisualInspection/view/statistics/assess_situation.html
  14. 1 1
      VisualInspection/view/statistics/assess_type.html
  15. 1 1
      VisualInspection/view/user/addUser.html
  16. 32 24
      VisualInspection/view/user/login.html
  17. 14 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  18. 3 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBo.java
  19. 30 7
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java
  20. 83 43
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  21. BIN
      VisualInspection_server/src/main/resources/checked_info.xls
  22. BIN
      VisualInspection_server/src/main/resources/checked_item_info.xls
  23. BIN
      VisualInspection_server/src/main/resources/employee_order.xls

+ 7 - 0
VisualInspection/css/common/header.css

@@ -20,4 +20,11 @@ html body {
 
 .main {
     background: #328dc7;
+}
+
+.logout_btn{
+
+    background: rgba(0,0,0,0);
+    border: none;
+    outline:none;
 }

+ 27 - 1
VisualInspection/css/user/login.css

@@ -62,8 +62,34 @@ fieldset[disabled] .btn-primary:hover {
 }
 
 .main {
-    background-image: url("/images/bg.jpg");
+    background-image: url("/images/bg.png");
     filter: "progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='scale')";
     -moz-background-size: 100% 100%;
     background-size: 100% 100%;
+}
+.bg{
+     background-image: url("/images/brige.png");
+     background-repeat:no-repeat;
+     background-position:center;
+     position: relative;
+     width: 1022px;
+     height: 485px;
+     margin: 0 auto;
+     top:100px
+}
+.login{
+    position: absolute;
+    bottom: 120px;
+    width: 260px;
+    right: 60px;
+}
+.ll{
+
+    padding:0px;
+    line-height: 32px;
+    text-align: left;
+
+}
+.lll{
+    padding: 0px
 }

BIN
VisualInspection/images/bg.png


BIN
VisualInspection/images/brige.png


+ 1 - 1
VisualInspection/js/lib/imageupload/js/imgUp.js

@@ -41,7 +41,7 @@ $(function() {
 
                 });
                 $img0.attr("src", "/js/lib/imageupload/img/a7.png").appendTo($section);
-                var $img = $("<img class='up-img up-opcity' id='user_pic'>");
+                var $img = $("<img class='up-img up-opcity' id='user_pic' style='height:200px;width: auto;'>");
                 $img.attr("src", imgArr[i]);
                 $img.attr("path", imgArr[i]);
                 $img.appendTo($section);

+ 1 - 1
VisualInspection/js/main.js

@@ -28,7 +28,7 @@ $(document).ready(function () {
         $("#user").html(html);
     }
 
-    $("#user").on("click", function () {
+    $("#login_out_btn").on("click", function () {
         layer.confirm('您确定要退出登录?', {
             btn: ['确定'] //按钮
         }, function () {

+ 11 - 6
VisualInspection/js/statistics/assess_ranking.js

@@ -104,27 +104,32 @@ function getItemScore(obj, check_item_name){
     return 0 ;
 }
 
+/**
+ * 过滤除数为0和保留二位小数时出现的0.00
+ * @param {*} value 
+ * @param {*} default_display_value 
+ */
 function filterByZeroHandle(value , default_display_value){
-        if(isNaN(value)|| value=='0.00'){
+        if(isNaN(value)){
             return default_display_value ;
         }else{
+            if((value+'').endsWith('.00')){
+                return value.substring(0,value.length-3);
+            }
             return value ;
         }
-       
 }
 
 function exportExcel(){
     var start_date = $("#start-time").val();
     var end_date = $("#end-time").val();
     var dept_id = $("#fsList").val();
-    if(start_date==null||start_date==''||start_date==undefined||end_date==null||end_date==''||end_date==undefined){
+    if( start_date=='' || end_date==''){
         tip("请选择起止日期");
         return ;
     }else{
         start_date += " 00:00:00";
         end_date += " 00:00:00";
     }
-    window.open("http://localhost:8089/file/employee/order?dept_id="+dept_id+"&start_date="+start_date+"&end_date="+end_date);
-    //window.location.href="http://localhost:8089/file/employee/order?id="+dept_id+"&start="+start_date+"&end="+end_date;
+    window.open( getserveraddr() + "/file/employee/order?dept_id="+dept_id+"&start_date="+start_date+"&end_date="+end_date);
 }
-

+ 32 - 6
VisualInspection/js/statistics/assess_situation.js

@@ -85,8 +85,8 @@ function gethtml(data,i){
                         +"</td><td>"+(data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty))
                         +"</td><td>"+data.score_fifteen+"</td><td>"+data.score_fifty+"</td><td>"
                         +data.score_over_fifty+"</td><td>"+data.all_check_score+"</td><td>"
-                        +filterByZeroHandle((data.all_check_score/data.checked_num).toFixed(2),'0')+"</td><td>"
-                        +filterByZeroHandle((1000-((data.all_check_score/data.checked_num).toFixed(2))),'1000')+"</td>";
+                        +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')+"</td><td>"
+                        +filterByZeroHandle((1000-filterJudge(data.all_check_score,data.checked_num)),'1000')+"</td>";
                 strTbody += "</tr>";
        }else{
                 num ++;
@@ -97,8 +97,8 @@ function gethtml(data,i){
                         +"</td><td>"+(data.people_num-(data.score_fifteen+data.score_fifty+data.score_over_fifty))
                         +"</td><td>"+data.score_fifteen+"</td><td>"+data.score_fifty+"</td><td>"
                         +data.score_over_fifty+"</td><td>"+data.all_check_score+"</td><td>"
-                        +filterByZeroHandle((data.all_check_score/data.checked_num).toFixed(2),'0')+"</td><td>"
-                        +filterByZeroHandle((1000-((data.all_check_score/data.checked_num).toFixed(2))),'1000')+"</td>";
+                        +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')+"</td><td>"
+                        +filterByZeroHandle((1000-filterJudge(data.all_check_score,data.checked_num)),'1000')+"</td>";
                 strTbody+="</tr>";
             
       }
@@ -115,16 +115,42 @@ function filter(value , default_display_value){
         }
 }
 
+/**
+ * 过滤除数为0和保留二位小数时出现的0.00
+ * @param {*} value 
+ * @param {*} default_display_value 
+ */
 function filterByZeroHandle(value , default_display_value){
-        if(isNaN(value)|| value=='0.00'){
+        if(isNaN(value)){
             return default_display_value ;
         }else{
+            if((value+'').endsWith('.00')){
+                return value.substring(0,value.length-3);
+            }
             return value ;
         }
-       
 }
 
+function filterJudge(num1,num2){
+        if(num2==0){
+            return 0;
+        }else{
+            return (num1/num2).toFixed(2);
+        }
+}
 
+function exportExcel(){
+    var start_date = $("#start-time").val();
+    var end_date = $("#end-time").val();
+    if( start_date=='' || end_date==''){
+        tip("请选择起止日期");
+        return ;
+    }else{
+        start_date += " 00:00:00";
+        end_date += " 00:00:00";
+    }
+    window.open( getserveraddr() + "/file/score/info?start_date="+start_date+"&end_date="+end_date);
+}
 
 
 

+ 18 - 4
VisualInspection/js/statistics/assess_type.js

@@ -96,7 +96,7 @@ function gethtml(data,i,avg){
                    +"</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((data.all_check_score/data.checked_num).toFixed(2),'0')
+                   +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')
                    +"</td><td rowspan="+rowspan+">"+avg+"</td>";
         strTbody += "</tr>";
     }else{
@@ -109,7 +109,7 @@ function gethtml(data,i,avg){
                   +"</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((data.all_check_score/data.checked_num).toFixed(2),'0')+"</td>";
+                  +filterByZeroHandle(filterJudge(data.all_check_score,data.checked_num),'0')+"</td>";
         strTbody += "</tr>";
           
     }
@@ -198,9 +198,12 @@ function getItemScore(obj, check_item_name){
  * @param {*} default_display_value 
  */
 function filterByZeroHandle(value , default_display_value){
-        if(isNaN(value) || value=='0.00'){
+        if(isNaN(value)){
             return default_display_value ;
         }else{
+            if((value+'').endsWith('.00')){
+                return value.substring(0,value.length-3);
+            }
             return value ;
         }
 }
@@ -213,7 +216,18 @@ function filterJudge(num1,num2){
         }
 }
 
-
+function exportExcel(){
+    var start_date = $("#start-time").val();
+    var end_date = $("#end-time").val();
+    if( start_date=='' || end_date==''){
+        tip("请选择起止日期");
+        return ;
+    }else{
+        start_date += " 00:00:00";
+        end_date += " 00:00:00";
+    }
+    window.open( getserveraddr() + "/file/score/item/info?start_date="+start_date+"&end_date="+end_date);
+}
 
 
 

+ 8 - 2
VisualInspection/js/user/addUser.js

@@ -19,6 +19,8 @@ function loadUserData(nodedata) {
     }
     role_selectinput.closeDropDownMenu();
 
+    $(".ComboTreeItemChlid").find("input").prop('checked', false);
+
     if (edittype == "edit") {
         usertemp = nodedata;
         pnode = [{ "id": usertemp.organid }]
@@ -96,8 +98,8 @@ function initUserInfo() {
 
         });
         $img0.attr("src", "/js/lib/imageupload/img/a7.png").appendTo($section);
-        var $img = $("<img class='up-img up-opcity' id='user_pic'>");
-        $img.attr("src", usertemp.pic);
+        var $img = $("<img class='up-img up-opcity' id='user_pic' style='height:200px;width: auto;'>");
+        $img.attr("src", base_image_server_url+usertemp.pic);
         $img.appendTo($section);
         var $p = $("<p class='img-name-p'>");
         $p.html("image").appendTo($section);
@@ -116,9 +118,13 @@ function initUserInfo() {
             ii["id"] = usertemp.roles[j].id;
             ii["title"] = usertemp.roles[j].des;
             attr.push(ii);
+
+            $("span[data-id='"+usertemp.roles[j].id+"']").find("input").prop('checked', true)
         }
     }
 
+    
+
     role_selectinput._selectedItems = attr;
     role_selectinput.refreshInputVal();
 

+ 1 - 2
VisualInspection/js/util/util.js

@@ -345,7 +345,6 @@ function initStringfunc(){
         }else{  
             return false;  
         }  
-        return true;  
     };  
     
     String.prototype.startWith = function(str){  
@@ -357,7 +356,7 @@ function initStringfunc(){
     }else{  
         return false;  
     }         
-    return true;   
+
     };  
 }
 

+ 4 - 0
VisualInspection/view/common/head.html

@@ -18,6 +18,10 @@
             <li>
                 <p id="time_p" class="header_font"></p>
             </li>
+
+            <li>
+               <button class="header_font logout_btn " id="login_out_btn"> <i class="icon icon-signout" style="font-size: 24px;"></i> </button>
+            </li>
         </ul>
     </div>
 </div>

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

@@ -15,7 +15,7 @@
                     <button class="btn btn-primary " type="button" onclick="querySituationClick()">查询</button>
                 </div>
                 <div class="col-sm-6">
-                    <button class="btn btn-primary " type="button" >导出Excel</button>
+                    <button class="btn btn-primary " type="button"  onclick="exportExcel()" >导出Excel</button>
                 </div>
             </div>
         </form>

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

@@ -15,7 +15,7 @@
                     <button class="btn btn-primary " type="button" onclick="queryTypeClick()">查询</button>
                 </div>
                 <div class="col-sm-6">
-                    <button class="btn btn-primary " type="button" >导出Excel</button>
+                    <button class="btn btn-primary " type="button" onclick="exportExcel()" >导出Excel</button>
                 </div>
             </div>
         </form>

+ 1 - 1
VisualInspection/view/user/addUser.html

@@ -48,7 +48,7 @@
 
 
             </div>
-            <div class="col-md-4" style="width:240px;height:200px;">
+            <div class="col-md-4" >
                 <div class="row hide" id="user_img_pre">
                     <section class='up-section fl loading' id="user_img_pre2">
                     </section>

+ 32 - 24
VisualInspection/view/user/login.html

@@ -9,42 +9,50 @@
 </head>
 
 <body>
-    <link rel="import" href="/view/common/login_head.html?__inline">
+    <!--<link rel="import" href="/view/common/login_head.html?__inline">-->
 
     <div id="main" class="container-fluid main">
-        <div class="row">
-            <div class="col-md-5"></div>
-            <div class="col-md-4">
-                <div class="panel">
-                    <div class="panel-heading">
-                        <p>登录</p>
-                    </div>
-                    <div class="panel-body">
-                        <div class="row">
-                            <div class="input-group">
-                                <span class="input-group-addon fix-border input_login"><i class="icon icon-envelope icon-1x"></i></span>
-                                <input id="username" type="text" class="form-control input_login" placeholder="用户账号">
-                            </div>
+        <div class="bg">
+            <div class="row login">
+      
+                    <!--<div class="form-group">
+                        <label for="exampleInputAccount4" class="col-sm-2">账号</label>
+                        <div class="input-group">
+                            <span class="input-group-addon fix-border input_login"><i class="icon icon-envelope icon-1x"></i></span>
+                            <input id="username" type="text" class="form-control input_login" placeholder="用户账号">
                         </div>
-                        <div class="row" style="margin-top:20px">
-                            <div class="input-group">
-                                <span class="input-group-addon fix-border input_login"><i class="icon icon-lock icon-1x"></i></span>
-                                <input id="password" type="password" class="form-control input_login" placeholder="密码">
-                            </div>
+                    </div>-->
+                     <!--<div class="row" style="margin-top:20px">
+                    <div class="input-group">
+                        <span class="input-group-addon fix-border input_login"><i class="icon icon-lock icon-1x"></i></span>
+                        <input id="password" type="password" class="form-control input_login" placeholder="密码">
+                    </div>
+                </div>-->
+
+                    <div class="row">
+                        <label for="exampleInputAccount4" class="col-md-3  ll">用户名:</label>
+                        <div class="col-md-9 lll">
+                            <input type="text" id="username" class="form-control" placeholder="用户账号">
                         </div>
-                        <div class="row" style="margin-top:20px">
-                            <button id="loadingBtn" type="button" class="btn btn-primary  btn-block login_btn" data-loading-text="正在登录...">登录</button>
+                    </div>
+
+                    <div class="row" style="margin-top:20px">
+                        <label for="exampleInputAccount4" class="col-md-3  ll">密&emsp;码:</label>
+                        <div class="col-md-9 lll">
+                            <input id="password" type="password" class="form-control" placeholder="密码">
                         </div>
                     </div>
+
+               
+                <div class="row" style="margin-top:20px">
+                    <button id="loadingBtn" type="button" class="btn btn-primary  btn-block login_btn" data-loading-text="正在登录...">登录</button>
                 </div>
             </div>
-            <div class="col-md-2"></div>
-
         </div>
 
-
     </div>
 
+
     <link rel="import" href="/view/common/foot.html?__inline">
     <link rel="import" href="/view/common/commonscriptlink.html?__inline">
 

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

@@ -39,11 +39,11 @@ public class StatisticsBean {
     
     private Integer item_id ;
 
-    private Integer checked_num;
+    private int checked_num;
     
-    private Integer checked_people_num ;
+    private int checked_people_num ;
     
-    private Integer people_num;
+    private int people_num;
     
     private int score_fifteen;
     
@@ -53,7 +53,18 @@ public class StatisticsBean {
     
     private int all_check_score ;
     
+    // 满分
+    private int check_no_score ;
+    
+    // 平均得分
+    private String score_avg ;
+    
+    // 平均人均扣分
+    private float check_score_avg;
+    
     private List<String> checked_socre_name = new ArrayList<>() ;
     
     private List<Integer> checked_score = new ArrayList<>() ;
+    
+    private List<Integer> seq_checked_score = new ArrayList<>() ;
 }

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

@@ -15,7 +15,7 @@ public class StatisticsBo {
     //编号
     private Integer id;
  
-    private Integer checked_num ;
+    private int checked_num = 0 ;
     
     private int check_all_score =0 ; 
     
@@ -25,8 +25,8 @@ public class StatisticsBo {
     
     private User user;
     
-    //private Integer[] emp_assess;
+    private List<Integer> emp_item_score = new ArrayList<>();
     
-    private int check_score_avg;
+    private String check_score_avg;
     
 }

+ 30 - 7
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/FileExcelController.java

@@ -37,7 +37,8 @@ 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){
     	StatisticsBean obj = new StatisticsBean();
     	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
     	try {
@@ -59,17 +60,39 @@ public class FileExcelController extends BaseController {
      * @return
      */
     @RequestMapping(value = "/score/info",method=RequestMethod.GET)
-    public String getScoreInfo(@RequestBody StatisticsBean obj){
-    	List<StatisticsBean> lists=  statisticsService.getFeeStationCheckedScore(obj);
-    	return super.returnSuccessResult(lists);
+    public String getScoreInfo(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam String start_date,@RequestParam String end_date){
+    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+    	StatisticsBean obj = new StatisticsBean();
+    	try {
+			Date start = sdf.parse(start_date);
+			Date end = sdf.parse(end_date);
+			obj.setStart_date(start);
+			obj.setEnd_date(end);
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+    	statisticsService.getFeeStationCheckedScore(obj, req, resp);
+    	return super.returnSuccessResult(null);
     }
     
     /**
      * 温馨服务检查情况统计表
      */
     @RequestMapping(value = "/score/item/info",method=RequestMethod.GET)
-    public String getScoreItemInfo(@RequestBody StatisticsBean obj){
-    	List<StatisticsBean> lists=  statisticsService.getFeeStationCheckItemScore(obj);
-    	return super.returnSuccessResult(lists);
+    public String getScoreItemInfo(HttpServletRequest req,HttpServletResponse resp,
+    		@RequestParam String start_date,@RequestParam String end_date){
+    	SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss" );
+    	StatisticsBean obj = new StatisticsBean();
+    	try {
+			Date start = sdf.parse(start_date);
+			Date end = sdf.parse(end_date);
+			obj.setStart_date(start);
+			obj.setEnd_date(end);
+		} catch (ParseException e) {
+			e.printStackTrace();
+		}
+    	statisticsService.getFeeStationCheckItemScore(obj, req, resp);
+    	return super.returnSuccessResult(null);
     }
 }

+ 83 - 43
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java

@@ -66,6 +66,7 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			user.setOrganid(obj.getDept_id().intValue());
 		List<User> listUserts = userInfoDao.getUsers(user);
 		for (User u : listUserts) {
+			u.setPassword(null);
 			if (u.getFee_station_name() != null) {
 				StatisticsBo tmp = new StatisticsBo();
 				tmp.setUser(u);
@@ -73,16 +74,6 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			}
 		}
 
-		// for(User user:CacheUtil.userMap.values()){
-		// if(user.getPositionid() ==1){
-		// if(organId ==null || user.getOrganid()+0L == organId+0L ){
-		// StatisticsBo tmp = new StatisticsBo();
-		// tmp.setUser(user);
-		// statisticBoMap.put(user.getId()+0L,tmp);
-		// }
-		// }
-		// }
-
 		for (StatisticsBean statisticsBean : list) {
 			if (statisticBoMap.containsKey(statisticsBean.getUser_id())) {
 				StatisticsBo tmp = statisticBoMap.get(statisticsBean.getUser_id());
@@ -106,10 +97,12 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 		lists.sort(new Comparator<StatisticsBo>() {
 			@Override
 			public int compare(StatisticsBo o1, StatisticsBo o2) {
-				if (o1.getCheck_all_score() >= o2.getCheck_all_score()) {
+				if (o1.getCheck_all_score() > o2.getCheck_all_score()) {
 					return 1;
-				} else {
-					return -1;
+				} else if(o1.getCheck_all_score()< o2.getCheck_all_score()){
+					return -1 ;
+				}else {
+					return 0;
 				}
 			}
 		});
@@ -186,32 +179,87 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 
 	}
 
+	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){
+				return scores.get(i);
+			}
+		}
+		return 0 ;
+	}
+	
+	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){
+				return scores.get(i);
+			}
+		}
+		return 0 ;
+	}
+	
 	@Override
 	public void getEmployeeCheckedInfo(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
 		// 检索数据
 		List<StatisticsBo> listStatistic = getEmployeeCheckedInfo(obj);
 		// 处理数据
-		//Integer[] emp_assess = new Integer[listStatistic.size()];
-		for (int i = 0; i < listStatistic.size(); i++) {
-			StatisticsBo st = new StatisticsBo();
-			st = listStatistic.get(i);
-			try {
-				st.setCheck_score_avg(listStatistic.get(i).getCheck_all_score() 
-						/ listStatistic.get(i).getChecked_num());
-			} catch (Exception e) {
-				e.printStackTrace();
-			}
-			/*List<Integer> checked_score_list = st.getChecked_score();
-			for (int j = 0; j < checked_score_list.size(); i++) {
-				emp_assess[j] = checked_score_list.get(i);
-			}*/
+		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);
+	}
+
+	@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 );
+			st.setScore_avg(String.format("%.2f", 1000.0 - st.getCheck_score_avg()));
+		}
+		// 处理数据
+		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,"工作纪律"));
 		}
+		exportExcel("温馨服务检查情况统计表","checked_item_info",list,resp);
+	}
 
-		String path = "D:/file20170606.xls";
-		try (InputStream is = this.getClass().getResourceAsStream("/employee_order.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", listStatistic);
+				context.putVar("list", list);
 				JxlsHelper.getInstance().processTemplate(is, os, context);
 			}
 			Thread.sleep(1000);
@@ -235,21 +283,13 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			toClient.write(buffer);
 			toClient.flush();
 			toClient.close();
+			// 删除生成的临时文件
+			if(file.exists()){
+				file.delete();
+			}
+			
 		} catch (Exception e) {
 			logger.error(e.toString());
 		}
 	}
-
-	@Override
-	public void getFeeStationCheckedScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
-		// TODO Auto-generated method stub
-
-	}
-
-	@Override
-	public void getFeeStationCheckItemScore(StatisticsBean obj, HttpServletRequest req, HttpServletResponse resp) {
-		// TODO Auto-generated method stub
-
-	}
-
 }

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


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


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