2 커밋 449fd2de9d ... 33c2b45316

작성자 SHA1 메시지 날짜
  minitiger 33c2b45316 Merge branch 'master' of http://git_xt.jsxt.jsjtyxt.com/wenhongquan/VisualInspection 8 년 전
  minitiger 22e53c6257 修改其他稽查的bug 8 년 전

+ 31 - 18
VisualInspection/js/other_check/other_check.js

@@ -73,8 +73,11 @@ var al_data = [];
             loadData(nodedata);
             $("#add_btn").data("tree_flag",0);
         })
+        
+        setCheckTypeSelect('#speacial_type_select','','special_check_type',true);
         queryTable();
-        setCheckTypeSelect('#select-check-type','');
+        setCheckTypeSelect('#select-check-type','','wrecker_group_check_type');
+        setCheckTypeSelect('#select-special-check-type','','special_check_type');
     }
 
      //关闭弹窗
@@ -95,6 +98,7 @@ var al_data = [];
         var check_time = $("#month_date2").val();
         var check_num = $("#check_num").val();
         var wrecker_check_type = $("#select-check-type").val();
+        var special_check_type = $("#select-special-check-type").val();
         if(idUpdate){
             if($("#editImage").attr("file_src") != ''){
                 var src  = $("#editImage").attr("file_src").split(",");
@@ -142,9 +146,10 @@ var al_data = [];
             "check_time":check_time,
             "check_time_name":check_time_name,
             "check_num":check_num,
-            "wrecker_check_type":wrecker_check_type
+            "wrecker_check_type":wrecker_check_type,
+            "special_check_type":special_check_type
         }
-        console.log(data);
+        // console.log(data);
         if(idUpdate){
             post_common_service("checkOther/update", data, function(data){
                 file_src = "";
@@ -202,29 +207,33 @@ function queryTable(){
     var data = {
         "check_time_name":$("#month_date").val(),
         "dept_id":$("#second").val(),
-        "check_type":check_type
+        "check_type":check_type,
+        "special_check_type":$("#speacial_type_select").val()
     }
-    hide = true;
+    var hide = true;
     if(check_type==5){
         hide = false;
     }
     operation = true;
-    if(check_type==5){
-        hide = false;
+    var hide1 = true;
+    if(check_type==2){
+
+        hide1 = false;
     }
     var cols = [
                     {width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
                     {width: 50, text: '时间', flex: false,colClass: '',field:'check_time'},
                     {width: 50, text: '部门', flex: false,colClass: '',field:'organname'},
-                    {width: 50, text: '人员', flex: false,colClass: '',field:'username'},
+                    {width: 30, text: '人员', flex: false,colClass: '',field:'username'},
                     {width: 50, text: '扣分类型', flex: false,colClass: '',field:'check_item_name'},
-                    {width: 50, text: '扣分值', flex: false,colClass: '',field:'check_score'},
-                    {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'},
-                    {width: 50, text: '扣分描述', flex: false,colClass: '',field:'remark'},
-                    {width: 50, text: '检查类型', flex: false,hide: hide,field:'wrecker_check_type_name'}
+                    {width: 30, text: '扣分值', flex: false,colClass: '',field:'check_score'},
+                    {width: 70, text: '扣分描述', flex: false,colClass: '',field:'remark'},
+                    {width: 30, text: '检查类型', flex: false,hide: hide,field:'wrecker_check_type_name'},
+                    {width: 50, text: '稽查类型', flex: false,hide: hide1,field:'special_check_type_name'},
+                    {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'}
                 ];
     if(roleContains("JICHA") || hasRole("ROLE_ADMIN")){
-        cols.push({width: 50, text: '操作',  flex: false,field:'id',oper:[
+        cols.push({width: 60, text: '操作',  flex: false,field:'id',oper:[
             {func:'updateCheckTeam',text:'修改',icon_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',icon_class:'icon-remove-circle'}
         ]});
     }
@@ -254,7 +263,8 @@ function updateCheckTeam(id){
         var time = data.check_time;
         $("#month_date2").val(data.check_time);
         $("#check_num").val(data.check_num);
-        setCheckTypeSelect('#select-check-type',data.wrecker_check_type);
+        setCheckTypeSelect('#select-check-type',data.wrecker_check_type,"wrecker_group_check_type");
+        setCheckTypeSelect('#select-special-check-type',data.special_check_type,'special_check_type');
         $("#editImage").empty();
         if(data.file_ids !=null && data.file_ids != ""){
             var ids = data.file_ids.split(",");
@@ -415,10 +425,12 @@ function refreshUploader(){
                 for (var i = 0; i < data.length; i++) {
                     // for (var j = 33; j <= 53; j++) {
                         // if (select_road == j) {
+                            var workno=data[i].workno;
+                            if(workno) workno = workno.substring(workno.length-3);
                             if (data[i].id == userId) {
-                                tempStr += "<option value=" + data[i].id + " selected='selected'>" + data[i].truename + "</option>";
+                                tempStr += "<option value=" + data[i].id + " selected='selected'>" + workno+ data[i].truename + "</option>";
                             } else {
-                                tempStr += "<option value=" + data[i].id + ">" + data[i].truename + "</option>";
+                                tempStr += "<option value=" + data[i].id + ">" + workno+data[i].truename + "</option>";
                             }
                         // }
                     // }
@@ -659,9 +671,10 @@ function refreshUploader(){
 
 var map =  {} ;
 
-function setCheckTypeSelect(div, selectId) {
-    post_common_service("/constant/getConstantByFlag", {code_flag: "wrecker_group_check_type"}, function(data) {
+function setCheckTypeSelect(div, selectId, codeFlag, hasAll) {
+    post_common_service("/constant/getConstantByFlag", {code_flag: codeFlag}, function(data) {
         var optStr = '';
+        if(hasAll) optStr='<option value="">全部</option>';
         for (var i in data) {
             if (data[i].code_value == selectId)
                 optStr += '<option value="' + data[i].code_value + '" selected="selected">' + data[i].code_name + '</option>';

+ 5 - 2
VisualInspection/js/statistics/assess_ranking.js

@@ -226,7 +226,10 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
                         html += "<button id=\"user_" + data[i].user.id + "\" onClick='addTask(" + data[i].user.id + ",\"" + data[i].user.truename + "\",\"" + data[i].user.fee_station_name + "\",\"" + data[i].checked_num + "\",\"" + param.start_date + "\",\"" + param.end_date + "\")'  class=\"btn\" style='margin-left: 10px;padding: 0px;border: 0;background: none;' type=\"button\"><i class=\"icon icon-plus-sign\"></i></button>"
                     }
                 }
-
+                var showNumberHtml = (isshownumber ? (filter(data[i].checked_num, '0') + (data[i].checked_num < 6 ? html : "")) : "-");
+                if (hasRole(ROLE_ADMIN)){
+                    showNumberHtml = filter(data[i].checked_num, '0')+html;
+                }
                 strTbody += "<tr><td width='4%;'>" + (count + 1) + "</td><td width='6%;'>" + data[i].user.fee_station_name + "</td>" +
                     "<td width='6%;'><a href='JavaScript:void(0)' onclick='jumpuser(\"" + data[i].user.id + "\",\"" + data[i].user.organid + "\")'>" + data[i].user.truename + "</a></td><td width='6%;'>" + data[i].user.position_name + "</td>" +
                     "<td width='7%;'>" + data[i].user.workno + "</td><td width='4%;'>" + filter(data[i].company_ranking, '/') + "</td>" +
@@ -236,7 +239,7 @@ function getEmployeeInfosClick(url, param, start_score, end_score, start_num, en
                     "<td width='4%;'>" + getItemScore(data[i], '动作') + "</td><td width='4%;'>" + getItemScore(data[i], '文明用语') + "</td>" +
                     "<td width='4%;'>" + getItemScore(data[i], '工作纪律') + "</td><td width='4%'>" + getItemScore(data[i], '便民服务') + "</td><td width='4%;'>" +
                     getItemScore(data[i], '安全管理') + "</td><td width='4%;'>" + data[i].check_all_score + "</td>" +
-                    "<td width='6%;'>" + (isshownumber ? (filter(data[i].checked_num, '0') + (data[i].checked_num < 6 ? html : "")) : "-") + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td>" +
+                    "<td width='6%;'>" + showNumberHtml + "</td><td width='4%;'>" + filterSlash(filterByZeroHandle(data[i].check_score_avg, '0'), filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td>" +
                     "<td width='4%;'>" + filterSlash(score, filter(data[i].checked_num + data[i].checked_m_num, '0')) + "</td><td width='4%;'>" + "</td><td width='4%;'>" + "</td></tr>";
                 count++;
             }

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

@@ -240,14 +240,10 @@
 
           var now_date = moment(nowStr).toDate(); //new Date();
           now_date.setDate(now_date.getDate() - 1);
-          if(now_date.Format('yyyy-MM-dd') >= $("#save_user_class").data("work_date").trim() ){
+          if(now_date.Format('yyyy-MM-dd') >= $("#save_user_class").data("work_date").trim()){
               tip("不能生成过期的排班");
               return ;
           }
-          // if($("#save_user_class").data("work_date").trim() >'2017-06-25'){
-          //     tip("只能生成6月份排班");// tip("不能生成过期的排班");
-          //     return ;
-          // }
 
           var dutyList = [];
           var work_date = $("#save_user_class").data("work_date") + "00:00:00";
@@ -728,15 +724,11 @@
           // 判断当前时间和待添加班组时间判断
           var now_date = moment(nowStr).toDate(); //new Date();
           now_date.setDate(now_date.getDate() - 1);
-          if(now_date.Format('yyyy-MM-dd') >= $("#save_term_class").data("date").trim() ){
+          if(now_date.Format('yyyy-MM-dd') >= $("#save_term_class").data("date").trim()){
               tip("不能生成过期的排班");
               return ;
           }
 
-          // if($("#save_term_class").data("date").trim() >'2017-06-25'){
-          //     tip("只能生成6月份排班");// tip("不能生成过期的排班");
-          //     return ;
-          // }
           var data = [];
           for (var i = 0; i < $("select[id*='_term']").length; i++) {
               if ($("select[id*='_term']").eq(i).val() != "") {

+ 1 - 1
VisualInspection/view/other_check/data_platform_check.html

@@ -1,5 +1,5 @@
 <link rel="stylesheet" type="text/css" href="/css/other_check/other_check.css">
-<script src="/js/other_check/other_check.js?_inline"></script>
+<script src="/js/other_check/other_check.js"></script>
 <!--  start -->
 <div class="container-fluid ">
         <div class="row">

+ 11 - 1
VisualInspection/view/other_check/special_check.html

@@ -13,7 +13,9 @@
                 <div class="div-station">
                     <select class="form-control" id="second"></select>
                 </div>
-
+                <div  class="col-xs-1">
+                    <select class="form-control" id="speacial_type_select"></select>
+                </div>
                <div class="col-xs-3">
                     <div class="input-group">
                         <button class="btn btn-primary " type="button" id="conditional_query">查询</button>
@@ -92,6 +94,14 @@
             </div>
             <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
                 <div style="width:80px;float:left;">
+                    <span style="line-height:32px;">稽查类型</span>
+                </div>
+                <div style="width:260px;float:left;">
+                    <select class="form-control" id="select-special-check-type"></select>
+                </div>
+            </div>
+            <div style="width:100%;margin-top:10px;overflow:hidden;zoom:1;">
+                <div style="width:80px;float:left;">
                     <span style="line-height:32px;">附件上传</span>
                 </div>
                 <div style="width:260px;float:left;">

+ 4 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/bean/CheckOther.java

@@ -54,4 +54,8 @@ public class CheckOther {
     private Integer wrecker_check_type;
     // 清障检查类型
     private String wrecker_check_type_name;
+    // 特情稽查类型
+    private Integer special_check_type;
+    // 特情稽查类型名称
+    private String special_check_type_name;
 }

+ 3 - 0
VisualInspection_server/src/main/java/com/xintong/visualinspection/controller/CheckOtherController.java

@@ -82,6 +82,9 @@ public class CheckOtherController extends BaseController {
     		if(co.getWrecker_check_type()!=null){
     			co.setWrecker_check_type_name(CodeUtil.getCodeNameByFlagAndValue("wrecker_group_check_type", co.getWrecker_check_type()+""));
     		}
+    		if(co.getSpecial_check_type()!=null){
+    			co.setSpecial_check_type_name(CodeUtil.getCodeNameByFlagAndValue("special_check_type", co.getSpecial_check_type()+""));
+    		}
     	}
     	return super.returnSuccessResult(new PageInfo(checkOtherList));
     }

+ 6 - 4
VisualInspection_server/src/main/java/com/xintong/visualinspection/mapper/master/CheckOtherMapper.xml

@@ -5,21 +5,22 @@
 	<insert id="insert" parameterType="com.xintong.visualinspection.bean.CheckOther">
 		INSERT INTO
 		other_check
-		(dept_id,user_id,check_person_id,check_score,check_item_id,remark,check_type,file_ids,check_num,check_time,check_time_name,update_time,wrecker_check_type)
+		(dept_id,user_id,check_person_id,check_score,check_item_id,remark,check_type,file_ids,check_num,check_time,check_time_name,update_time,wrecker_check_type, special_check_type)
 		VALUES
-		(#{dept_id},#{user_id},#{check_person_id},#{check_score},#{check_item_id},#{remark},#{check_type},#{file_ids},#{check_num},#{check_time},#{check_time_name},now(),#{wrecker_check_type})
+		(#{dept_id},#{user_id},#{check_person_id},#{check_score},#{check_item_id},#{remark},#{check_type},#{file_ids},#{check_num},#{check_time},#{check_time_name},now(),#{wrecker_check_type},#{special_check_type})
 	</insert>
 	
 	<select id="getCheckByDeptId" parameterType="com.xintong.visualinspection.bean.CheckOther"
 	resultType="com.xintong.visualinspection.bean.CheckOther" >
        SELECT
 		o.id,o.dept_id,o.user_id,o.check_person_id,o.check_score,o.check_item_id,o.remark,o.check_type,o.file_ids,o.check_num,o.check_time,
-		o.check_time_name,o.delete_flag,o.update_time , t.ORGANNAME organname,u.TRUENAME  username,c.name check_item_name, o.wrecker_check_type
+		o.check_time_name,o.delete_flag,o.update_time , t.ORGANNAME organname,u.TRUENAME  username,c.name check_item_name, o.wrecker_check_type,o.special_check_type
 		FROM
 			(SELECT * FROM other_check
 			where 1=1 and check_type = #{check_type}
 	        <if test="check_time_name != null and check_time_name != ''">AND check_time_name = #{check_time_name}</if>
 			 <if test="dept_id != null">AND dept_id = #{dept_id}</if>
+			 <if test="special_check_type != null">AND special_check_type = #{special_check_type}</if>
 			)o
 		LEFT JOIN t_sys_organ t ON o.dept_id = t.id
 		LEFT JOIN t_sys_users u ON o.user_id = u.id
@@ -27,7 +28,7 @@
     </select>
     <select id="getCheckById" parameterType="java.lang.Long" resultType="com.xintong.visualinspection.bean.CheckOther" >
         SELECT o.id,o.dept_id,o.user_id,o.check_person_id,o.check_score,o.check_item_id,o.remark,o.check_type,o.file_ids,o.check_num,o.check_time,
-		o.check_time_name,o.delete_flag,o.update_time,c.name check_item_name, o.wrecker_check_type
+		o.check_time_name,o.delete_flag,o.update_time,c.name check_item_name, o.wrecker_check_type,o.special_check_type
         FROM other_check o
         LEFT JOIN check_item c ON o.check_item_id = c.id
         WHERE o.id = #{id}
@@ -50,6 +51,7 @@
         <if test="check_time_name !=  null">,check_time_name= #{check_time_name} </if>
         <if test="check_num != null">,check_num = #{check_num}</if>
         <if test="wrecker_check_type != null">,wrecker_check_type = #{wrecker_check_type}</if>
+        <if test="special_check_type != null">,special_check_type = #{special_check_type}</if>
         WHERE
         id = #{id}
     </update>