大理考勤报表修改
diff --git a/src/main/java/com/supwisdom/dlpay/atte/bean/AtteDetailInfo.java b/src/main/java/com/supwisdom/dlpay/atte/bean/AtteDetailInfo.java
index d999a7d..d8563b1 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/bean/AtteDetailInfo.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/bean/AtteDetailInfo.java
@@ -16,7 +16,7 @@
     private String timeid;
     private String deptcode;
     private String oldstate;
-
+    private Integer timetype;
 
     public String getCustname() {
         return custname;
@@ -98,4 +98,12 @@
     public void setOldstate(String oldstate) {
         this.oldstate = oldstate;
     }
+
+    public Integer getTimetype() {
+        return timetype;
+    }
+
+    public void setTimetype(Integer timetype) {
+        this.timetype = timetype;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/atte/bean/AtteReport.java b/src/main/java/com/supwisdom/dlpay/atte/bean/AtteReport.java
index f66a55b..e5f2f3a 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/bean/AtteReport.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/bean/AtteReport.java
@@ -12,10 +12,11 @@
     private Integer custtypeid;
     private String deptcode;
     private float cnt1; //正常
-    private float cnt2;  //迟到早退
+    private float cnt2;  //迟到并早退
     private float cnt3; // 请假
     private float cnt4; //旷工
     private float cnts;//
+    private float cnt5;//迟到或早退
     private String custtypename;
     private String deptname;
 
@@ -114,4 +115,12 @@
     public void setDeptname(String deptname) {
         this.deptname = deptname;
     }
+
+    public float getCnt5() {
+        return cnt5;
+    }
+
+    public void setCnt5(float cnt5) {
+        this.cnt5 = cnt5;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/atte/bean/Sum.java b/src/main/java/com/supwisdom/dlpay/atte/bean/Sum.java
index af3381a..254ca65 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/bean/Sum.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/bean/Sum.java
@@ -6,6 +6,7 @@
     private float cnt3;
     private float cnt4;
     private float cnts;
+    private float cnt5;
 
     public Sum() {
         this.cnt1=0;
@@ -13,6 +14,7 @@
         this.cnt3=0;
         this.cnt4=0;
         this.cnts=0;
+        this.cnt5=0;
     }
 
     public float getCnt1() {
@@ -54,4 +56,12 @@
     public void setCnts(float cnts) {
         this.cnts = cnts;
     }
+
+    public float getCnt5() {
+        return cnt5;
+    }
+
+    public void setCnt5(float cnt5) {
+        this.cnt5 = cnt5;
+    }
 }
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 dda0da9..f6d0d62 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/CustAtteController.java
@@ -977,6 +977,7 @@
                     sum.setCnt3(sum.getCnt3()+report.getCnt3());
                     sum.setCnt4(sum.getCnt4()+report.getCnt4());
                     sum.setCnts(sum.getCnts()+report.getCnts());
+                    sum.setCnt5(sum.getCnt5()+report.getCnt5());
                 }
                 map.addAttribute("sum",sum);
             }
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 2c7ede0..39d6658 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
@@ -279,8 +279,8 @@
     @Override
     public Pagination getAttedtlWithPage(AttedtlSearchBean searchBean, int pageNo, int pageSize) {
         StringBuffer sql=new StringBuffer();
-        sql.append(" select t.timeid,t.atteno,t.attedate,t.remark,c.custname,c.custtypeid,b.cardno,t.state,c.deptcode,t.oldstate    from t_atte_dtl t left join t_customer c on t.custid=c.custid ");
-            sql.append(" left join t_card b on b.custid=t.custid where c.status='1' and b.status='normal'   ");
+        sql.append(" select t.timeid,t.atteno,t.attedate,t.remark,c.custname,c.custtypeid,b.cardno,t.state,c.deptcode,t.oldstate,n.timetype    from t_atte_dtl t left join t_customer c on t.custid=c.custid ");
+            sql.append(" left join t_card b on b.custid=t.custid left join t_nc_time n on t.timeid=n.timeid where c.status='1' and b.status='normal'   ");
             if(!StringUtil.isEmpty(searchBean.getStartdate())&&!StringUtil.isEmpty(searchBean.getEnddate())){
                 sql.append(" and t.attedate between :sdate and :edate ");
               }
@@ -696,7 +696,8 @@
                 .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=0) cnt4,")
+                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=4) cnt5 ")
         .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);
@@ -800,7 +801,8 @@
                 .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=0) cnt4,")
+                .append(" (select count(*)/2.0 from a aa where aa.custid=a.custid and aa.state=4) cnt5 ")
                 .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 f7433b4..18ac05f 100644
--- a/src/main/resources/templates/atte/report/p_index.html
+++ b/src/main/resources/templates/atte/report/p_index.html
@@ -122,10 +122,15 @@
                             >
                     </el-table-column>
                     <el-table-column
-                            prop="cnt2"
-                            label="迟到早退(天)"
+                            prop="cnt5"
+                            label="迟到或早退(天)"
                     >
                     </el-table-column>
+                        <el-table-column
+                                prop="cnt2"
+                                label="迟到并早退(天)"
+                        >
+                    </el-table-column>
                     <el-table-column
                             prop="cnt3"
                             label="请假(天)"
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 d81651b..e1e0378 100644
--- a/src/main/resources/templates/atte/report/print/p_printindex.html
+++ b/src/main/resources/templates/atte/report/print/p_printindex.html
@@ -25,7 +25,8 @@
                 <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>
@@ -44,6 +45,7 @@
                     <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>
@@ -55,6 +57,7 @@
                 <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 25cec89..f143754 100644
--- a/src/main/resources/templates/atte/timedtl/index.html
+++ b/src/main/resources/templates/atte/timedtl/index.html
@@ -135,7 +135,9 @@
                         <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'" class="layui-badge layui-bg-red">迟到早退</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=='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>
@@ -149,7 +151,9 @@
                         <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'" class="layui-badge layui-bg-red">迟到早退</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=='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>