فهرست منبع

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

wenhongquan 8 سال پیش
والد
کامیت
724bf1ec2c
26فایلهای تغییر یافته به همراه357 افزوده شده و 108 حذف شده
  1. 43 16
      VisualInspection/js/mytask/check.js
  2. 10 2
      VisualInspection/js/teamClass/check_team_schedule.js
  3. 2 1
      VisualInspection/js/util/util.js
  4. 2 0
      VisualInspection/view/common/commonscriptlink.html
  5. 1 0
      VisualInspection/view/main.html
  6. 36 45
      VisualInspection/view/mytask/check.html
  7. 11 1
      VisualInspection/view/mytask/taskDetail.html
  8. 3 3
      VisualInspection/view/term_management/check_stuff_schedule.html
  9. 8 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/StatisticsBean.java
  10. 23 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/UserClassCount.java
  11. 11 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java
  12. 17 1
      VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java
  13. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java
  14. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java
  15. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/cluster/UserInfoMapper.xml
  16. 1 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml
  17. 72 6
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/StatisticsMapper.xml
  18. 19 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/TaskMapper.xml
  19. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/StatisticsService.java
  20. 2 0
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java
  21. 74 22
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/StatisticsServiceImpl.java
  22. 7 3
      VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java
  23. 8 8
      VisualInspection_server/src/main/resources/application.properties
  24. BIN
      VisualInspection_server/src/main/resources/checked_info.xls
  25. BIN
      VisualInspection_server/src/main/resources/checked_item_info.xls
  26. BIN
      VisualInspection_server/src/main/resources/employee_order.xls

+ 43 - 16
VisualInspection/js/mytask/check.js

@@ -43,6 +43,7 @@ function initCheck() {
         format: "yyyy-mm-dd"
     });
     if ($.checkTask) {
+        getUserCheckCount();
         initCheckAppealBtns();
         setFeSelect("#fsList", $.checkTask.checked_dept);
         // setFeeUserSelect("#check_checked_person_select", $.checkTask.checked_person);
@@ -179,8 +180,17 @@ function fullscreen() {
 
 }
 
-function initInfo() {
-
+function getUserCheckCount() {
+    var param = {
+        "id":$.checkTask.id,
+        "checked_person":$.checkTask.checked_person
+    };
+    post_common_service("/task/getUserCount/", param, function (userList) {       
+        $("#checked_count").html(userList.length);
+    });
+}
+function showCheckDetailCount(){
+    
 }
 function initCheckAppealBtns() {
     if ($.checkTask.appeal) {
@@ -190,25 +200,27 @@ function initCheckAppealBtns() {
         $("#appeal_time").html($.checkTask.appeal.appeal_time);
         $("#appeal_reason").html($.checkTask.appeal.appeal_reason);
         $("#appeal_file_list").html(genAppeaFiles($.checkTask.appeal.file_src));
+        $("#recheck_result").html($.checkTask.appeal.recheck_result);
+        
 
         layer.open({
             type: 1,
             title: "申诉详情",
-            closeBtn: 1,
+            closeBtn: 0,
             shade: false,
-            maxmin: true,
+            maxmin: false,
             shadeClose: true,
             offset: 'rb',
             content: $('#appeal_div'), //捕获的元素,注意:最好该指定的元素要存放在body最外层,否则可能被其它的相对元素所影响
-            min: function (index) {
-                // layer.close(index);
-                layer.style(index,{width: 50,height:50}); 
-                return false;
-            },
-            cancel:function(index){
-                 layer.style(index,{width: 50,height:50,offset:'r'});
-                 return false; 
-            }
+            // min: function (index) {
+            //     // layer.close(index);
+            //     layer.style(index,{width: 50,height:50}); 
+            //     return false;
+            // },
+            // cancel:function(index){
+            //      layer.style(index,{width: 50,height:50,offset:'r'});
+            //      return false; 
+            // }
         });
     } else {
         $("#appeal_div").hide();
@@ -262,7 +274,7 @@ function showEditCheckScore(id) {
     var rowData = getItemByIdFromArr(id, $('#score_datatable').mytable('getTableData'));
     scoreDetailLayer = showPopup4Common('修改考核项',function(data){
        saveScoreEdit();
-    },['350px','500px'],'#score-detail-div','r');
+    },['350px','550px'],'#score-detail-div','r');
     
     $("#score_id_text").val(rowData.id);
     $("#check_item_text").val(rowData.content);
@@ -286,7 +298,7 @@ function setFeeUserSelect(div,selectId){
         }
         $(div).html('');
         $(div).html(optStr);
-        alert("fff");
+
         $('#check_checked_person_select').chosen({
             // width:'200px',
             height:'100px',
@@ -492,7 +504,8 @@ function resetUserImgInfo() {
     $("#user_img_container").empty();
     var str = '<a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle">'
         + '<img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>'
-        + '<label id="checked_person"></label>';
+        + '<label id="checked_person"></label>'
+        + '(次数:<a href="#"><label id="checked_count"></label></a>)';
     $("#user_img_container").html(str);
 }
 function changePersonContent(data) {
@@ -514,6 +527,7 @@ function changePersonContent(data) {
         $("#person_img").attr("href", imgSrc);
         $('a.lightbox-toggle').lightbox();
     }
+    getUserCheckCount();
 }
 var scoreLayer;
 function showScore() {
@@ -742,3 +756,16 @@ function initUpLoad() {
     });
 }
 
+function saveRecheckResult(){
+    var param = {
+        "id":$.checkTask.appeal.id,
+        "recheck_result":$("#recheck_result").val()
+    }
+    post_common_service("/checkAppeal/update", param, function(data){
+        layer.msg("保存成功", {
+            offset:'r',
+            time: 2000//20s后自动关闭
+        });
+    });
+}
+

+ 10 - 2
VisualInspection/js/teamClass/check_team_schedule.js

@@ -53,10 +53,10 @@
                 var newEvents = [];
                 //  console.log(data);
                 for(var i=0;i<data.length;i++){
-                    var obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: data[i].start_time, end: data[i].end_time};
+                    var obj = {id:data[i].id ,desc:data[i].team_name ,title: data[i].team_name+"-"+getTeamName(data[i].class_type),  start: data[i].start_time, end: data[i].start_time};
                     newEvents.push(obj);
                 }
-                // console.log(newEvents)
+                                // console.log(newEvents)
                 calendar.addEvents(newEvents);
             })
         }
@@ -286,6 +286,14 @@
                 for(var i=0;i<data.list.length;i++){
                     $("#mooring_term,#middle_term,#night_term,#all_term").append("<option value='"+data.list[i].id+"'>"+data.list[i].name +"</option>")
                 }
+                //cs客户端弹出框显示下拉框有问题
+                $('#all_term').chosen({
+                    width:'200px',
+                    height:'100px',
+                    no_results_text: '没有找到',    // 当检索时没有找到匹配项时显示的提示文本
+                    disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+                    search_contains: true         // 从任意位置开始检索
+                });
             },function(error){})
         }
 

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

@@ -301,7 +301,7 @@ function roleContains(role){
     return false;
 }
 
-function setCheckmanSelect(div, selectId, notHaveUserId){
+function setCheckmanSelect(div, selectId, notHaveUserId, callback){
     post_common_service("/user/getAllCheckman",null,function(data){
         var optStr = '';
         for(var i in data) {
@@ -313,6 +313,7 @@ function setCheckmanSelect(div, selectId, notHaveUserId){
         }
         $(div).html('');
         $(div).html(optStr);
+        if(callback) callback();
     });
 }
 function genAppeaFiles(file_src){

+ 2 - 0
VisualInspection/view/common/commonscriptlink.html

@@ -19,6 +19,8 @@
 <script src="/js/lib/kkpager.js"></script>
 <script src="/js/lib/slide/js/bootstrap-slider.min.js"></script>
 <script src="/js/lib/webuploader/webuploader.js"></script>
+<script type="text/javascript" src="/js/lib/combotree/icontains.js"></script>
+<script type="text/javascript" src="/js/lib/combotree/comboTreePlugin.js"></script>
 <script src="/js/util/util.js"></script>
 <script src="/js/util/service.js"></script>
 <script src="/js/constant/constant.js"></script>

+ 1 - 0
VisualInspection/view/main.html

@@ -27,6 +27,7 @@
         
     </style>
     <script src="/js/mytask/check.js"></script>
+    <!--<script src="/js/teamClass/check_team_schedule.js"></script>-->
     <script src="/js/teamClass/charge_team_schedule.js"></script>
 </head>
 

+ 36 - 45
VisualInspection/view/mytask/check.html

@@ -12,18 +12,19 @@
                 <label for="exampleInputAccount1" class="col-sm-1">车道号</label>
                 <div class="col-sm-2">
                     <!--<select class="form-control" id="lane" disabled="disabled"></select>-->
-                    <input type="text" class="form-control" id="lane" disabled="disabled" />
+                    <input type="text" class="form-control" id="lane" disabled="disabled"/>
                 </div>
                 <label class="col-sm-1">考核人员</label>
                 <div class="col-sm-3" id="user_img_container">
                     <!-- 使用图片 -->
                     <a id="person_img" href="../../images/img4.jpg" class="lightbox-toggle"><img src="../../images/img4.jpg" class="img-thumbnail" style="width:50px;height:50px;margin-top:-10px;"></a>
                     <label id="checked_person"></label>
+                    <a href="#" onclick="showCheckDetailCount()">次数<label id="checked_count"></label></a>
                 </div>
                 <div class="col-sm-1">
                     <button class="btn btn-primary " type="button" onclick="showChangeUser()">更改考核人员</button>
                 </div>
-
+           
             </div>
         </form>
     </div>
@@ -46,46 +47,34 @@
                                     <li class="tab_lane"><a data-tab href="#tabContent3" bbb="2">广场</a></li>
                                     <li class="tab_not_lane"><a data-tab href="#tabContent4" bbb="3">值机室</a></li>
                                 </ul>
-                                <div id="video_content">
-                                    <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
-                                        <p style="padding-top:180px;font-size:20px">加载中...</p>
-                                        <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
-                                    </div>
-                                    <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">
-                                        <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"
-                                        />
-                                    </div>
-                                    <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
-                                        <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
-                                        <div class="col-md-4" style="padding-left:0">
-                                        <div class="input-group" style="padding-left:0">
-                                            <input type="text" id="video_pos"  style="height:42px" class="form-control" placeholder="时间偏移值">
-                                            <span class="input-group-btn">
-                                                <button class="btn btn-default" style="height:42px" onclick="setVideoPos()" type="button">校正</button>
-                                             </span>
-                                        </div>
-                                        </div>
-                                        <div class="btn-group" style="float:right;">
-                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
-                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
-                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
-                                            <button type="button" class="btn btn-info" style="width:51px;height:42px" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
-                                            <button type="button" class="btn btn-danger " style="width:51px;height:42px" id="video_btn_start" onclick="doAction('video_start')"><img style="width:30px" src="/images/movie.png"></img></i></button>
-                                            <button type="button" class="btn btn-danger hidden" style="width:51px;height:42px" id="video_btn_stop" onclick="doAction('video_stop')"><i class="icon icon-stop icon-2x"></i></button>
-                                            <button type="button" class="btn btn-success" style="width:51px;height:42px" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
-
-
-                                        </div>
+                                <div id="video_content" >
+                                <div class="tab-content" id="tabcontent" style="height:400px;text-align: center;background:black;">
+                                    <p style="padding-top:180px;font-size:20px">加载中...</p>
+                                    <!--<i class="icon icon-spin icon-spinner  icon-5x" style="margin-top:100px"></i>-->
+                                </div>
+                                <div class="row" class="col-md-12" style="padding:5px 10px 5px 10px;text-align:center;margin:0px">
+                                    <input id="ex1" class="col-md-12" type="text" data-slider-min="0" data-slider-max="100" data-slider-step="1" data-slider-value="0"
+                                    />
+                                </div>
+                                <div class="row" style="padding:0px 5px 0px 5px;text-align:center;margin:0px">
+                                    <select class="form-control" id="video_list" style="width:200px;float:left;display:none"></select>
+                                    <div class="btn-group" style="float:right;">
+                                        <button type="button" class="btn btn-info" onclick="doAction('start')"><i class="icon icon-play-circle icon-2x"></i></button>
+                                        <button type="button" class="btn btn-info" onclick="doAction('stop')"><i class="icon icon-pause icon-2x"></i></button>
+                                        <button type="button" class="btn btn-info" onclick="doAction('fast')"><i class="icon icon-forward icon-2x"></i><span id="fast_info"></span></button>
+                                        <button type="button" class="btn btn-info" onclick="doAction('slow')"><span id="slow_info"></span><i class="icon icon-backward icon-2x"></i></button>
+                                        <button type="button" class="btn btn-success" onclick="doAction('screenshot')"><i class="icon icon-camera icon-2x"></i></button>
                                     </div>
                                 </div>
+                                </div> 
                                 <!--<hr>-->
 
                             </div>
                         </div>
                     </div>
                 </section>
-
-
+               
+                
             </div>
 
         </div>
@@ -93,7 +82,7 @@
             <div id="score_datatable" style="height:350px;" data-checkable="true" data-sortable="true"></div>
             <div class="row">
                 <div id="dashboard" class="dashboard dashboard-draggable" data-height="300">
-
+                    
                     <div class="row" class="col-sm-11" style="margin:5px;">
                         <button class="btn btn-primary" type="button" onclick="clearAllImg()" style="margin-right:10px;">清空</button>
                         <button class="btn btn-danger" type="button" onclick="showScore()" style="margin-right:10px;">评分</button>
@@ -138,11 +127,9 @@
     <div>
         <table style="width:100%;">
             <tr>
-                <td width="50%"><button class="btn btn-primary" type="button" onclick="showPre4Appeal()">反馈</button></label>
-                </td>
+                <td width="50%">申诉时间:<label id="appeal_time"></label></td>
             </tr>
             <tr>
-                <td width="50%">申诉时间:<label id="appeal_time"></label></td>
                 <td width="50%">申诉原因:<label id="appeal_reason"></label></td>
             </tr>
             <tr>
@@ -150,6 +137,10 @@
                     <div class="file-list" id="appeal_file_list"></div>
                 </td>
             </tr>
+            <tr>
+                <td width="80%"><textarea id="recheck_result" style="height:50px;"></textarea></td>
+                <td width="20%"><button class="btn btn-primary" type="button" onclick="saveRecheckResult()">保存</button></td>
+            </tr>
         </table>
     </div>
 </div>
@@ -197,15 +188,15 @@
         </div>
     </div>
 </div>
-<img id="userBigImg" style="display:none;margin-right:20px;" />
+<img id="userBigImg" style="display:none;margin-right:20px;"/>
 <script>
     var curVideo;
     $(document).ready(function () {
-        if ($.checkTask.checked_location_type == 1) {
+        if($.checkTask.checked_location_type==1){
             $("li.tab_lane").hide();
             $("li.tab_not_lane").show();
             $("li.tab_not_lane").addClass("active");
-        } else {
+        }else{
             $("li.tab_lane").show();
             $("li.tab_not_lane").hide();
             $("li.tab_lane:first").addClass("active");
@@ -217,9 +208,9 @@
             // console.log('上一个标签页', e.relatedTarget);
             var i = $(e.target).attr('bbb');
             var showVideo;
-            if (i == 3) {
+            if(i==3) {
                 showVideo = $.checkTask.video_id;
-            } else {
+            }else {
                 var videos = $.checkTask.video_id.split(',');
                 showVideo = videos[i];
             }
@@ -243,7 +234,7 @@
     $("#box").click(function () {
         return $("#_f").click();
     });
-
+    
     $("#_f").change(function () {
         UpladFile();
     });
@@ -259,7 +250,7 @@
             addPic(base_image_server_url + data.path);
         }, function (error) {
             console.log(error)
-        }, "task");
+        },"task");
     }
 
 </script>

+ 11 - 1
VisualInspection/view/mytask/taskDetail.html

@@ -346,7 +346,17 @@
         showPopup4Common('分配稽查员',function(){
             saveAssign();
         },'400px','#chooseCheckman-div');
-        setCheckmanSelect('#choseCheckmanList',null,$.checkTask.checkman);
+        setCheckmanSelect('#choseCheckmanList',null,$.checkTask.checkman,
+        function(){
+           $('#choseCheckmanList').chosen({
+                // width:'200px',
+                height:'100px',
+                no_results_text: '没有找到',    // 当检索时没有找到匹配项时显示的提示文本
+                disable_search_threshold: 10, // 10 个以下的选择项则不显示检索框
+                search_contains: true         // 从任意位置开始检索
+            });   
+        });
+       
     }
 
     function saveAssign(){

+ 3 - 3
VisualInspection/view/term_management/check_stuff_schedule.html

@@ -55,11 +55,11 @@
 
 <link rel="stylesheet" type="text/css" href="/css/user/userManager.css?__inline">
 
-<script type="text/javascript" src="/js/lib/combotree/icontains.js?__inline"></script>
-<script type="text/javascript" src="/js/lib/combotree/comboTreePlugin.js?__inline"></script>
+<!--<script type="text/javascript" src="/js/lib/combotree/icontains.js"></script>
+<script type="text/javascript" src="/js/lib/combotree/comboTreePlugin.js"></script>-->
 <link rel="stylesheet" type="text/css" href="/node_modules/zui/dist/lib/calendar/zui.calendar.css">   
 <script src="/node_modules/zui/dist/lib/calendar/zui.calendar.js"></script>
-<script src="/js/teamClass/check_team_schedule.js?__inline"></script>
+<script src="/js/teamClass/check_team_schedule.js"></script>
 <style type="text/css" >
     span.time{
         display: none !important ;

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

@@ -68,6 +68,14 @@ public class StatisticsBean {
     
     private List<Integer> seq_checked_score = new ArrayList<>() ;
     
+    private List<Organ> dept_list  ;
+    
     private String start_score;
     private String end_score;
+    
+    // 查询标记
+    private Integer queryType ;
+    
+    // 月份
+    private String mth ;
 }

+ 23 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/UserClassCount.java

@@ -0,0 +1,23 @@
+package com.xintong.visualinspection.bean;
+
+import lombok.Data;
+
+/**
+ * 文件名:Job
+ * 版本信息:日期:2017/4/18 Copyright 江苏省交通规划设计院 Corporation 2017 版权所有.
+ */
+@Data
+public class UserClassCount {
+    //编号
+    private Integer id;
+    //用户id
+    private Long user_id;
+    //班次类型
+    private Integer class_type;
+    //天
+    private Integer days;
+    
+    private Integer period_id;
+    
+    private Integer task_id;
+}

+ 11 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/StatisticsController.java

@@ -54,4 +54,15 @@ public class StatisticsController extends BaseController {
     	List<StatisticsBean> lists=  statisticsService.getFeeStationCheckItemScore(obj);
     	return super.returnSuccessResult(lists);
     }
+    
+    /**
+     * 12个月考核等分总体
+     */
+    @RequestMapping(value = "/score/year/info")
+    public String selectYearScoreChange(@RequestBody StatisticsBean obj){
+    	List<StatisticsBean> lists=  statisticsService.getYearScoreChange(obj);
+    	return super.returnSuccessResult(lists);
+    }
+    
+    
 }

+ 17 - 1
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/TaskController.java

@@ -16,10 +16,10 @@ import org.springframework.web.bind.annotation.RestController;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
 import com.xintong.system.err.BusinessException;
-import com.xintong.visualinspection.bean.Constant;
 import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.TaskStatus;
 import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.bean.UserClassCount;
 import com.xintong.visualinspection.service.TaskService;
 import com.xintong.visualinspection.util.AuthorUtil;
 import com.xintong.visualinspection.util.CacheUtil;
@@ -253,4 +253,20 @@ public class TaskController extends BaseController {
     	taskService.updateInvalidTaskCount(task);;
     	return super.returnSuccessResult("修改成功!");
     }
+    
+    /**
+     * 查询一个周期用户被考核次数
+     * @return
+     * String
+     * @exception
+     * @since  1.0.0
+     */
+    @RequestMapping(value = "/getUserCount")
+    public String getUserCount(@RequestBody Task task){
+    	if(task.getId()==null){
+    		throw new BusinessException(20002);
+    	}
+    	List<UserClassCount> countList = taskService.getUserCount(task);
+    	return super.returnSuccessResult(countList);
+    }
 }

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/StatisticsDao.java

@@ -22,4 +22,6 @@ public interface StatisticsDao  {
 	public List<StatisticsBean> selectFeeStationCheckedScore(StatisticsBean obj);
    
 	public List<StatisticsBean> selectFeeStationCheckedPersonScoreDetail(StatisticsBean obj);
+	
+	public List<StatisticsBean> selectYearScoreInfo(StatisticsBean obj);
 }

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/dao/master/TaskDao.java

@@ -6,6 +6,7 @@ import org.apache.ibatis.annotations.Mapper;
 
 import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.TaskStatus;
+import com.xintong.visualinspection.bean.UserClassCount;
 
 /**
  * 文件名:UserInfoDao
@@ -29,4 +30,5 @@ public interface TaskDao  {
     public void insertStatusBatch(List<TaskStatus> taskStatusList);
     public void deleteInvalidTaskCount(Long task_id);
     public void updateInvalidTaskCount(Task task);
+    public List<UserClassCount> getUserCount(Task task);
 }

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

@@ -12,6 +12,7 @@
         <result property="idno" column="idno" jdbcType="VARCHAR"/>
         <result property="pic" column="pic" jdbcType="VARCHAR"/>
         <result column="workno" property="workno" jdbcType="VARCHAR" />
+        <result column="fee_station_name" property="fee_station_name" jdbcType="VARCHAR" />
     </resultMap>
     <resultMap id="userMap" type="com.xintong.visualinspection.bean.User">
         <id property="id" column="ID"/>

+ 1 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckAppealMapper.xml

@@ -69,6 +69,7 @@
         check_appeal
         SET
         <if test="check_status != null">check_status = #{check_status}</if>
+        <if test="recheck_result != null">recheck_result = #{recheck_result}</if>
         WHERE
         id = #{id}
     </update>

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

@@ -9,7 +9,7 @@
 			LEFT JOIN check_task ct ON ct.id = t.task_id
 			WHERE 1=1 
 			<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.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date} AND ct.check_status != 23
 			</if>
 			<if test="dept_id!=null">
 				AND t.checked_dept =#{dept_id}			
@@ -22,7 +22,7 @@
     	SELECT COUNT(1) AS checked_num , t.checked_person AS user_id FROM check_task t 
     	WHERE 1=1 
 			<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.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date}   AND t.check_status != 23
 			</if>
 			<if test="dept_id!=null">
 				AND t.checked_dept =#{dept_id}			
@@ -34,7 +34,7 @@
     	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
     		<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.start_time &gt;= #{start_date} AND t.end_time &lt;= #{end_date}   AND t.check_status != 23
 			</if>
     	 GROUP BY t.checked_dept
     </select>
@@ -46,7 +46,7 @@
     		LEFT JOIN check_task ct ON ct.id = t.task_id
     		WHERE 1=1
     		<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.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date}  AND ct.check_status != 23
 			</if>
     		GROUP BY t.checked_dept,t.checked_person
     </select>
@@ -58,9 +58,75 @@
 			LEFT JOIN check_task ct ON ct.id = t.task_id
 			WHERE 1=1
 			<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.start_time &gt;= #{start_date} AND ct.end_time &lt;= #{end_date}  AND ct.check_status != 23
 			</if> )
 			u LEFT JOIN check_item s ON u.parent_id = s.id GROUP  BY dept_id,item_id
     </select>
-       
+      
+     <sql id="selectAllCheckedInfo">
+		 SELECT
+			check_num_t.checked_num , checked_score_t.mth, checked_score_t.checkd_all_score , checked_score_t.checked_person,checked_score_t.checked_dept
+		FROM
+			(
+				SELECT
+					monthfunc (t.start_time) AS mth,
+					sum(m.check_item_score) AS checkd_all_score,
+					t.*
+				FROM
+					check_task t,
+					check_score m
+				WHERE
+					t.id = m.task_id
+				AND t.check_status != 23
+				AND t.checked_person IS NOT NULL
+				<if test="start_date !=null">
+					AND t.start_time >= #{start_date}
+				</if>
+				<if test="end_date !=null">
+					AND t.end_time &lt;= #{end_date}
+				</if>
+				GROUP BY
+					mth,
+					t.checked_person
+			) checked_score_t
+		LEFT JOIN (
+			SELECT
+				COUNT(t.checked_person) AS checked_num,
+				t.checked_person,
+				monthfunc (t.start_time) AS mth,
+				t.id
+			FROM
+				check_task t
+			WHERE
+				t.checked_person IS NOT NULL
+			AND t.check_status != 23
+			<if test="start_date !=null">
+				AND t.start_time >= #{start_date}
+			</if>
+			<if test="end_date !=null">
+				AND t.end_time &lt;= #{end_date}
+			</if>
+			GROUP BY
+				t.checked_person,
+				mth
+		) check_num_t ON checked_score_t.checked_person = check_num_t.checked_person
+		AND check_num_t.mth = checked_score_t.mth
+     </sql>
+    
+    <select id="selectYearScoreInfo" parameterType="com.xintong.visualinspection.bean.StatisticsBean" resultType="com.xintong.visualinspection.bean.StatisticsBean">
+    	SELECT sum(tab.checkd_all_score) AS all_check_score  , sum(tab.checked_num) AS checked_num  , tab.mth FROM ( <include refid="selectAllCheckedInfo" />  ) tab 
+    	WHERE 1=1 
+    	<if test="dept_list!=null and queryType == 2 ">
+    		AND	tab.checked_dept IN
+		    	<foreach item="obj"  collection="dept_list" open="("
+		            separator="," close=")">
+		            #{obj.id}  
+		         </foreach>
+    	</if>
+    	<if test="dept_id!=null and queryType ==3">
+    		AND tab.checked_dept=#{dept_id}
+    	</if>
+    	GROUP BY tab.mth
+    </select>
+      
 </mapper>

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

@@ -30,6 +30,14 @@
         <result property="check_status" column="check_status"/>
         <result property="check_status_name" column="check_status_name"/>
     </resultMap>
+    <resultMap id="userCountMap" type="com.xintong.visualinspection.bean.UserClassCount">
+        <id property="id" column="ID"/>
+        <result property="task_id" column="task_id"/>
+        <result property="user_id" column="user_id"/>
+        <result property="class_type" column="class_type"/>
+        <result property="days" column="days"/>
+        <result property="period_id" column="period_id"/>
+    </resultMap>
 
     <select id="getAll" resultMap="BaseResultMap"  >
         SELECT *
@@ -249,4 +257,15 @@
 	        <if test="checked_person != null">user_id = #{checked_person}</if>
         WHERE task_id=#{id}
     </update>
+    <select id="getUserCount" parameterType="com.xintong.visualinspection.bean.Task" resultMap="userCountMap" >
+        SELECT *
+        FROM check_user_count
+        WHERE user_id = #{checked_person}
+          and period_id = (
+          	select period_id
+          	from check_user_count
+          	where task_id = #{id}
+          		and user_id = #{checked_person}
+          )
+    </select>
 </mapper>

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

@@ -34,4 +34,6 @@ public interface StatisticsService {
 	
 	public void getFeeStationCheckItemScore(StatisticsBean obj,HttpServletRequest req,HttpServletResponse resp);
 	
+	public List<StatisticsBean> getYearScoreChange(StatisticsBean obj);
+	
 }

+ 2 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/TaskService.java

@@ -4,6 +4,7 @@ import java.util.List;
 
 import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.TaskStatus;
+import com.xintong.visualinspection.bean.UserClassCount;
 
 /**
  * 
@@ -31,4 +32,5 @@ public interface TaskService {
     public void insertStatusBatch(List<TaskStatus> taskStatusList);
     public void deleteInvalidTaskCount(Long task_id);
     public void updateInvalidTaskCount(Task task);
+    public List<UserClassCount> getUserCount(Task task);
 }

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

@@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
+import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.StatisticsBean;
 import com.xintong.visualinspection.bean.StatisticsBo;
 import com.xintong.visualinspection.bean.User;
@@ -98,12 +99,24 @@ 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()) {
-					return 1;
-				} else if (o1.getCheck_all_score() < o2.getCheck_all_score()) {
-					return -1;
-				} else {
-					return 0;
+				if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
+					double a = o1.getCheck_all_score() / (o1.getChecked_num()+0.00);
+					double b = o2.getCheck_all_score()/(o2.getChecked_num()+0.00);
+					if (a > b ) {
+						return 1;
+					} else if (a < b) {
+						return -1;
+					} else {
+						return 0;
+					}	
+				}else{
+					if(o1.getChecked_num() == 0){
+						return -1 ;
+					}else if(o2.getChecked_num() ==0){
+						return 1;
+					}else{
+						return 0;
+					}
 				}
 			}
 		});
@@ -118,13 +131,14 @@ 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 {
 				sta.setId(3);
 			}
+			i++ ;
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
@@ -160,12 +174,22 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 				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;
+					if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
+						if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) > o2.getAll_check_score()/(o2.getChecked_num()+0.0) ) {
+							return 1;
+						} else if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) < o2.getAll_check_score()/(o2.getChecked_num()+0.0)) {
+							return -1;
+						} else {
+							return 0;
+						}
+					}else{
+						if(o1.getChecked_num() == 0){
+							return -1 ;
+						}else if(o2.getChecked_num() ==0){
+							return 1;
+						}else{
+							return 0;
+						}
 					}
 				} else {
 					return -1;
@@ -184,13 +208,14 @@ 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 {
 				sta.setId(3);
 			}
+			i++ ;
 			mapStationInfos.put(sta.getDept_id(), sta);
 		}
 
@@ -214,18 +239,29 @@ 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()) {
 					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;
+					if(o1.getChecked_num()!=0 && o2.getChecked_num()!=0){
+						if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) > o2.getAll_check_score()/(o2.getChecked_num()+0.0) ) {
+							return 1;
+						} else if (o1.getAll_check_score()/(o1.getChecked_num()+0.0) < o2.getAll_check_score()/(o2.getChecked_num()+0.0)) {
+							return -1;
+						} else {
+							return 0;
+						}
+					}else{
+						if(o1.getChecked_num() == 0){
+							return -1 ;
+						}else if(o2.getChecked_num() ==0){
+							return 1;
+						}else{
+							return 0;
+						}
 					}
 				} else {
 					return -1;
@@ -368,4 +404,20 @@ public class StatisticsServiceImpl extends BaseService implements StatisticsServ
 			logger.error(e.toString());
 		}
 	}
+
+	@Override
+	public List<StatisticsBean> getYearScoreChange(StatisticsBean obj) {
+		// 导管中心
+		if(obj.getQueryType()!=null && obj.getQueryType() == 2){
+			// 检索当前导管中心下的deptid
+			Organ organ =new Organ();
+			organ.setParentid(obj.getDept_id().intValue());
+			List<Organ> list = departmentDao.getOrgan(organ);
+			// 将导管中心下的收费站部门id 列表放入到list中
+			obj.setDept_list(list);
+		}
+		
+		List<StatisticsBean> lists = statisticsDao.selectYearScoreInfo(obj);
+		return lists;
+	}
 }

+ 7 - 3
VisualInspection_server/src/main/java/com/xintong/visualinspection/service/impl/TaskServiceImpl.java

@@ -7,13 +7,11 @@ import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
-import com.github.pagehelper.util.StringUtil;
 import com.mysql.jdbc.StringUtils;
 import com.xintong.visualinspection.bean.Constant;
-import com.xintong.visualinspection.bean.Organ;
 import com.xintong.visualinspection.bean.Task;
 import com.xintong.visualinspection.bean.TaskStatus;
-import com.xintong.visualinspection.bean.User;
+import com.xintong.visualinspection.bean.UserClassCount;
 import com.xintong.visualinspection.dao.master.TaskDao;
 import com.xintong.visualinspection.service.BaseService;
 import com.xintong.visualinspection.service.TaskService;
@@ -178,4 +176,10 @@ public class TaskServiceImpl extends BaseService implements TaskService {
 		// TODO Auto-generated method stub
 		taskDao.updateInvalidTaskCount(task);
 	}
+
+	@Override
+	public List<UserClassCount> getUserCount(Task task) {
+		// TODO Auto-generated method stub
+		return taskDao.getUserCount(task);
+	}
 }

+ 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

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