报表统计规则修改
diff --git a/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java b/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
index f6d0d62..b6c9631 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
@@ -937,6 +937,47 @@
     }
 
     /**
+     *  辅警干警报表  加载
+     */
+    @ResponseBody
+    @RequestMapping(value="/police/prepare")
+    public Map policerepostlistpre(HttpServletRequest request,
+                                HttpServletResponse response,
+                                @RequestParam(value = "pageNo", required = false, defaultValue = "1") int pageNo,
+                                @RequestParam(value = "pageSize", required = false, defaultValue = "10") int pageSize,
+                                @RequestParam(value = "startdate") String  startdate,
+                                @RequestParam(value = "enddate") String  enddate,
+                                @RequestBody AttedtlSearchBean searchBean,
+                                @AuthenticationPrincipal TOperator operUser) {
+        searchBean.setStartdate(startdate);
+        searchBean.setEnddate(enddate);
+        Map map=new HashMap();
+        try {
+            Pagination page=null;
+            String opertype=operUser.getOpertype();
+            String deptcode=operUser.getDeptcode();
+            if (!StringUtil.isEmpty(opertype) &&(opertype.equals("S")||opertype.equals("P"))){
+                deptcode=null;
+            }else {
+                if(StringUtil.isEmpty(deptcode)){
+                    deptcode="-99";
+                }
+            }
+            searchBean.setDeptcode(deptcode);
+            List<TCustType> custtypelist=systemService.findAllCusttype();
+            map.put("custtypelist",custtypelist);
+            List<TDept> deptlist=systemService.findAllDept();
+            map.put("deptlist",deptlist);
+            map.put("operator",operUser);
+        }catch (Exception e) {
+            e.printStackTrace();
+            log.error("查询考勤规则失败:" + e.getMessage());
+        }
+        return map;
+    }
+
+
+    /**
      *    打印报表   辅警干警
      * @param searchBean
      * @param map
diff --git a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClassDaoImpl.java b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClassDaoImpl.java
index 45faee3..70edde5 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClassDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClassDaoImpl.java
@@ -692,12 +692,11 @@
             sql.append("  and c.cardno like :cno ");
         }
         sql.append(" ) select a.custid,a.custname,a.cardno,a.custtypeid,a.deptcode,a.deptname,a.custtypename, ")
-        .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid  ) cnts,")
+        .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid  ) cnts,'0' cnt5, ")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=1) cnt1,")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=2) cnt2,")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=3) cnt3,")
-                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=0) cnt4,")
-                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=4) cnt5 ")
+                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=0) cnt4 ")
         .append(" from a group by a.custname,a.cardno,a.custtypeid,a.deptcode,a.custid,a.deptname,a.custtypename  ")
          .append(" order by a.deptcode desc ,a.custtypeid desc ");
         Query query=entityManager.createNativeQuery(sql.toString(), AtteReport.class);
@@ -797,12 +796,11 @@
             sql.append("  and c.cardno like :cno ");
         }
         sql.append(" ) select a.custid,a.custname,a.cardno,a.custtypeid,a.deptcode,a.custtypename,a.deptname, ")
-                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid  ) cnts,")
+                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid  ) cnts,'0' cnt5,")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=1) cnt1,")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=2) cnt2,")
                 .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=3) cnt3,")
-                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=0) cnt4,")
-                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=4) cnt5 ")
+                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=0) cnt4 ")
                 .append(" from a group by a.custname,a.cardno,a.custtypeid,a.deptcode,a.custid,a.custtypename,a.deptname ")
                 .append(" order by a.deptcode desc ,a.custtypeid desc ");
         Query query=entityManager.createNativeQuery(sql.toString(), AtteReport.class);
diff --git a/src/main/resources/templates/atte/report/p_index.html b/src/main/resources/templates/atte/report/p_index.html
index ec3a056..3ebafe4 100644
--- a/src/main/resources/templates/atte/report/p_index.html
+++ b/src/main/resources/templates/atte/report/p_index.html
@@ -75,7 +75,7 @@
                         <label class="control-label col-md-4 col-sm-12 col-xs-12" style="font-size: 14px;"></span>
                         </label>
                         <div class="col-md-8 col-sm-12 col-xs-12">
-                        <button type="button" class="btn btn-info" @click="query" id="attedtl_qrybtn">查 询</button>
+                        <button type="button" class="btn btn-info" @click="query" id="attedtl_qrybtn">查看报表</button>
                         <button type="button" class="btn btn-info" @click="print" id="print_preport">打印</button>
                         </div>
                     </div>
@@ -121,14 +121,9 @@
 
                             >
                     </el-table-column>
-                    <el-table-column
-                            prop="cnt5"
-                            label="迟到或早退(天)"
-                    >
-                    </el-table-column>
                         <el-table-column
                                 prop="cnt2"
-                                label="迟到并早退(天)"
+                                label="异常(天)"
                         >
                     </el-table-column>
                     <el-table-column
@@ -175,7 +170,7 @@
             pageSize:10,
             totSize:0,
             currentRow: null,
-            stategrplist:[{value:0,label:'未打卡'},{value:1,label:'正常'},{value:2,label:'迟到'},{value:3,label:'请假'},{value:4,label:'旷工'},],
+            stategrplist:[{value:0,label:'未打卡'},{value:1,label:'正常'},{value:2,label:'异常'},{value:3,label:'请假'},{value:4,label:'旷工'},],
             preportform:{
                 startdate:Date.now(),
                 enddate:Date.now(),
@@ -250,7 +245,7 @@
             $.ajax({
                 type:"post",
                 dataType:"json",
-                url:"[[@{/atte/police/list?startdate=}]]"+startdate+"&enddate="+enddate,
+                url:"[[@{/atte/police/prepare?startdate=}]]"+startdate+"&enddate="+enddate,
                 contentType: "application/json",
                 headers: {
                     'Accept': 'application/json',
@@ -260,7 +255,6 @@
                 data:JSON.stringify(_self.preportform),
                 success:function(ret){
                     // //console.log(ret);
-                     _self.totSize=ret.PageResult.totalCount;
                   //  _self.tableData=ret.PageResult.list;
                     var custtypelist = [];
                     var types=ret.custtypelist;
diff --git a/src/main/resources/templates/atte/report/print/p_printindex.html b/src/main/resources/templates/atte/report/print/p_printindex.html
index e1e0378..98e2b78 100644
--- a/src/main/resources/templates/atte/report/print/p_printindex.html
+++ b/src/main/resources/templates/atte/report/print/p_printindex.html
@@ -25,8 +25,7 @@
                 <th  style="text-align: center;">人员类别</th>
                 <th  style="text-align: center;">部门</th>
                 <th  style="text-align: center;">正常(天)</th>
-                <th  style="text-align: center;">迟到或早退(天)</th>
-                <th  style="text-align: center;">迟到并早退(天)</th>
+                <th  style="text-align: center;">异常(天)</th>
                 <th  style="text-align: center;">请假(天)</th>
                 <th  style="text-align: center;">旷工(天)</th>
                 <th  style="text-align: center;">总考勤天数	</th>
@@ -45,7 +44,6 @@
                     <td th:text="${data.custtypename}"></td>
                     <td th:text="${data.deptname}"></td>
                     <td th:text="${data.cnt1}"></td>
-                    <td th:text="${data.cnt5}"></td>
                     <td th:text="${data.cnt2}"></td>
                     <td th:text="${data.cnt3}"></td>
                     <td th:text="${data.cnt4}"></td>
@@ -57,7 +55,6 @@
                 <tr>
                     <td colspan="4" >合计:</td>
                     <td th:text="${sum.cnt1}"></td>
-                    <td th:text="${sum.cnt5}"></td>
                     <td th:text="${sum.cnt2}"></td>
                     <td th:text="${sum.cnt3}"></td>
                     <td th:text="${sum.cnt4}"></td>
diff --git a/src/main/resources/templates/atte/timedtl/index.html b/src/main/resources/templates/atte/timedtl/index.html
index 0461082..d2082bc 100644
--- a/src/main/resources/templates/atte/timedtl/index.html
+++ b/src/main/resources/templates/atte/timedtl/index.html
@@ -135,9 +135,7 @@
                         <template scope="scope">
                             <span v-if="scope.row.state=='0'" class="layui-badge layui-bg-orange">未打卡</span>
                             <span v-if="scope.row.state=='1'" class="layui-badge layui-bg-green">正常</span>
-                            <span v-if="scope.row.state=='2' && scope.row.timetype == '1' " class="layui-badge layui-bg-red">迟到</span>
-                            <span v-if="scope.row.state=='2' && scope.row.timetype == '2' " class="layui-badge layui-bg-red">早退</span>
-                            <span v-if="scope.row.state=='2' && scope.row.timetype != '1' && scope.row.timetype != '2' " class="layui-badge layui-bg-red">迟到早退</span>
+                            <span v-if="scope.row.state=='2'" class="layui-badge layui-bg-red">异常</span>
                             <span v-if="scope.row.state=='11'" class="layui-badge layui-bg-gray">事假</span>
                             <span v-if="scope.row.state=='12'" class="layui-badge layui-bg-gray">病假</span>
                             <span v-if="scope.row.state=='13'" class="layui-badge layui-bg-gray">年假</span>
@@ -151,9 +149,7 @@
                         <template scope="scope">
                             <span v-if="scope.row.oldstate=='0'" class="layui-badge layui-bg-orange">未打卡</span>
                             <span v-if="scope.row.oldstate=='1'" class="layui-badge layui-bg-green">正常</span>
-                            <span v-if="scope.row.oldstate=='2' && scope.row.timetype == '1' " class="layui-badge layui-bg-red">迟到</span>
-                            <span v-if="scope.row.oldstate=='2' && scope.row.timetype == '2' " class="layui-badge layui-bg-red">早退</span>
-                            <span v-if="scope.row.oldstate=='2' && scope.row.timetype != '1' && scope.row.timetype != '2' " class="layui-badge layui-bg-red">迟到早退</span>
+                            <span v-if="scope.row.oldstate=='2' " class="layui-badge layui-bg-red">异常</span>
                             <span v-if="scope.row.oldstate=='11'" class="layui-badge layui-bg-gray">事假</span>
                             <span v-if="scope.row.oldstate=='12'" class="layui-badge layui-bg-gray">病假</span>
                             <span v-if="scope.row.oldstate=='13'" class="layui-badge layui-bg-gray">年假</span>
@@ -242,7 +238,7 @@
             pageSize:10,
             totSize:0,
             currentRow: null,
-            stategrplist:[{value:0,label:'未打卡'},{value:1,label:'正常'},{value:2,label:'迟到早退'},
+            stategrplist:[{value:0,label:'未打卡'},{value:1,label:'正常'},{value:2,label:'异常'},
                 {value:11,label:'事假'},{value:12,label:'病假'},{value:13,label:'年假'},{value:14,label:'调休'},{value:15,label:'其他'},],
             timedtlform:{
                 startdate:Date.now(),