大理
diff --git a/src/main/java/com/supwisdom/dlpay/atte/bean/ClockSearchBean.java b/src/main/java/com/supwisdom/dlpay/atte/bean/ClockSearchBean.java
index 6eeda85..6ada82b 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/bean/ClockSearchBean.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/bean/ClockSearchBean.java
@@ -6,6 +6,8 @@
     private String deptcode;
     private Integer status;
     private String ex_custid;
+    private String custid;
+    private String isjld;
 
     public String getAttedate() {
         return attedate;
@@ -46,4 +48,20 @@
     public void setEx_custid(String ex_custid) {
         this.ex_custid = ex_custid;
     }
+
+    public String getCustid() {
+        return custid;
+    }
+
+    public void setCustid(String custid) {
+        this.custid = custid;
+    }
+
+    public String getIsjld() {
+        return isjld;
+    }
+
+    public void setIsjld(String isjld) {
+        this.isjld = isjld;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/atte/bean/RestSearchBean.java b/src/main/java/com/supwisdom/dlpay/atte/bean/RestSearchBean.java
index 5d5aa7f..cdf1051 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/bean/RestSearchBean.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/bean/RestSearchBean.java
@@ -10,6 +10,7 @@
     private Integer rtype;
     private Integer custtypeid;
     private String ex_custid;
+    private String isjld;
 
     public String getStartdate() {
         return startdate;
@@ -82,4 +83,12 @@
     public void setEx_custid(String ex_custid) {
         this.ex_custid = ex_custid;
     }
+
+    public String getIsjld() {
+        return isjld;
+    }
+
+    public void setIsjld(String isjld) {
+        this.isjld = isjld;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
index 9845ecf..f5d0e09 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/controller/AppAtteController.java
@@ -1,5 +1,8 @@
 package com.supwisdom.dlpay.atte.controller;
 
+import com.jcabi.log.Logger;
+import com.supwisdom.dlpay.api.bean.ApiResponse;
+import com.supwisdom.dlpay.api.bean.CommonSendMessageParam;
 import com.supwisdom.dlpay.atte.bean.AttedtlSearchBean;
 import com.supwisdom.dlpay.atte.bean.ClockInfo;
 import com.supwisdom.dlpay.atte.bean.ClockSearchBean;
@@ -9,13 +12,20 @@
 import com.supwisdom.dlpay.atte.service.AtteClassService;
 import com.supwisdom.dlpay.atte.service.AtteReportService;
 import com.supwisdom.dlpay.atte.service.AtteRestService;
+import com.supwisdom.dlpay.doorlist.bean.TCustomerInfo;
+import com.supwisdom.dlpay.framework.dao.BusinessparaDao;
+import com.supwisdom.dlpay.framework.domain.TBusinesspara;
 import com.supwisdom.dlpay.framework.util.DateUtil;
 import com.supwisdom.dlpay.framework.util.StringUtil;
 import com.supwisdom.dlpay.mainservice.dao.CardDao;
+import com.supwisdom.dlpay.mainservice.dao.CustomerDao;
 import com.supwisdom.dlpay.mainservice.domain.TCard;
 import com.supwisdom.dlpay.mainservice.domain.TCustomer;
 import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;
+import com.supwisdom.dlpay.paysdk.proxy.ApiCommonProxy;
+import com.supwisdom.dlpay.system.dao.DeptDao;
 import com.supwisdom.dlpay.system.domain.TCustType;
+import com.supwisdom.dlpay.system.domain.TDept;
 import com.supwisdom.dlpay.system.page.Pagination;
 import com.supwisdom.dlpay.system.service.SystemService;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -45,6 +55,14 @@
     private AtteReportService atteReportService;
     @Autowired
     private CardDao cardDao;
+    @Autowired
+    private CustomerDao customerDao;
+    @Autowired
+    private BusinessparaDao businessparaDao;
+    @Autowired
+    private DeptDao deptDao;
+    @Autowired
+    private ApiCommonProxy commonProxy;
 
 
 
@@ -55,7 +73,7 @@
     @RequestMapping("/doorappindex")
     public String appindex(@RequestParam(value = "custid") String custid, Model model) {
         model.addAttribute("custid", custid);
-        TCustomer cust=webInterfaceService.findCustomerById(custid);
+        TCustomer cust=customerDao.findCustomerById(custid);
         if(cust==null){
             return "atte/app/error";
         }
@@ -89,6 +107,28 @@
             if(!atteRestService.saveAtteRest(atteRest)){
                 map.put("errStr","添加数据失败!");
             }else{
+                //消息推送
+                CommonSendMessageParam param=new CommonSendMessageParam();
+                param.setContent("您有新的申请需审核");
+                param.setTitle("报备申请通知");
+                TCustomer cust=customerDao.findCustomerById(custid);
+                String jld_code=getjldcode();
+                TDept dept=deptDao.findByDeptcode(cust.getDeptcode());
+                List<TCustomerInfo> reviewlist=null;
+                if(dept!=null&&atteRestService.isreview(custid)){  // 审核人  发给 局领导
+                     reviewlist=atteClassService.getReviewList(dept.getFdeptcode());
+                }else{  //普通用户
+                     reviewlist=atteClassService.getReviewList(cust.getDeptcode());
+                }
+                if(reviewlist!=null){
+                    for (TCustomerInfo info:reviewlist){
+                        if(!custid.equals(info.getCustid())){
+                            param.setUserid(info.getCustid());
+                            ApiResponse resp=commonProxy.sendMsg(param);
+                            System.out.println("推送成功"+info.getCustname());
+                        }
+                    }
+                }
                 map.put("errStr","");
             }
         }else {
@@ -114,6 +154,12 @@
         searchBean.setRtype(rtype);
         searchBean.setCustid(custid);
         searchBean.setStatus(status);
+        TCustomer cust=customerDao.findCustomerById(custid);
+        if(cust!=null&&!StringUtil.isEmpty(cust.getDeptcode())){
+            searchBean.setDeptcode(cust.getDeptcode());
+        }else{
+            searchBean.setDeptcode("99");
+        }
         Pagination page=atteRestService.getRestInfo(searchBean,pageNo,pageSize);
         map.put("page",page);
         return map;
@@ -125,6 +171,10 @@
     @RequestMapping("/atte/addindex")
     public String impdevindex(@RequestParam(value = "custid") String custid, Model model) {
         model.addAttribute("custid", custid);
+        TCustomer cust=customerDao.findCustomerById(custid);
+        if(cust==null){
+            return "atte/app/error";
+        }
         return "apph5/askforleave";
     }
     /**
@@ -180,13 +230,15 @@
         searchBean.setStatus(status);
         searchBean.setCusttypeid(custtypeid);
         searchBean.setRtype(rtype);
-        TCustomer cust=webInterfaceService.findCustomerById(custid);
-        String oper_code="2c99808271be7ee60171c019b4e30004";
-        if(StringUtil.isEmpty(cust.getDeptcode())){
+        TCustomer cust=customerDao.findCustomerById(custid);
+        String jld_code=getjldcode();
+        if(cust==null||StringUtil.isEmpty(cust.getDeptcode())){
             searchBean.setDeptcode("99");
-        }else if(oper_code.equals(cust.getDeptcode())){
-            searchBean.setDeptcode(null);
-        }else {
+        }else{
+            TDept dept=deptDao.findByDeptcode(cust.getDeptcode());
+            if(dept!=null&&jld_code.equals(dept.getFdeptcode())){
+                searchBean.setIsjld("1");
+            }
             searchBean.setDeptcode(cust.getDeptcode());
         }
         Pagination page=null;
@@ -231,6 +283,17 @@
                   //修改报表
                 atteReportService.updateReport(rest.getStartdate(),rest.getEnddate(),rest.getCustid());
                }
+                //消息推送
+                CommonSendMessageParam param=new CommonSendMessageParam();
+               if(status==1){
+                   param.setContent("您有报备申请已通过");
+               }else{
+                   param.setContent("您有报备申请未通过");
+               }
+                param.setTitle("报备审核结果通知");
+                 param.setUserid(custid);
+              ApiResponse resp=commonProxy.sendMsg(param);
+                  System.out.println("推送成功"+custid);
                map.put("errStr","");
             }else {
                 map.put("errStr","假单不存在");
@@ -279,10 +342,92 @@
     @GetMapping("/atte/clockindex")
     public ModelAndView clockindex(@RequestParam(value = "custid")String custid){
         ModelAndView model=new ModelAndView();
+        TCustomer cust=customerDao.findCustomerById(custid);
+        if(cust==null){
+            model.setViewName("atte/app/error");
+            return model;
+        }
         model.addObject("custid",custid);
         model.setViewName("apph5/doclock");
         return model;
     }
+    /**
+     *  查看补卡记录
+     */
+    @GetMapping("/atte/clockhisindex")
+    public ModelAndView clockhisindex(@RequestParam(value = "custid")String custid){
+        ModelAndView model=new ModelAndView();
+        model.addObject("custid",custid);
+        model.setViewName("apph5/clockhisindex");
+        return model;
+    }
+    /**
+     *  查看补卡记录
+     */
+    @RequestMapping(value = "/atte/getclockhis")
+    @ResponseBody
+    public Map getclockhis(@RequestParam("attedate") String attedate,
+                              @RequestParam("custid") String custid,
+                              @RequestParam(value="status", required = false, defaultValue = "") Integer status,
+                              @RequestParam(value = "pageNo", required = false, defaultValue = "1") int pageNo,
+                              @RequestParam(value = "pageSize", required = false, defaultValue = "10") int pageSize,
+                              HttpServletRequest request){
+
+        Map map=new HashMap();
+        if(StringUtil.isEmpty(custid)){
+            map.put("msg","客户号为空!");
+            return map;
+        }
+
+        ClockSearchBean searchBean=new ClockSearchBean();
+        TCustomer cust= customerDao.findCustomerById(custid);
+        if(cust!=null&&!StringUtil.isEmpty(cust.getDeptcode())){
+            searchBean.setDeptcode(cust.getDeptcode());
+        }else{
+            searchBean.setDeptcode("99");
+        }
+        searchBean.setAttedate(attedate);
+        searchBean.setStatus(status);
+        searchBean.setCustid(custid);
+        Pagination page=atteRestService.getClockPage(searchBean,pageNo,pageSize);
+        map.put("page",page);
+        return map;
+    }
+
+    /**
+     *  取消补签
+     */
+    @RequestMapping(value = "/atte/cancelclock")
+    @ResponseBody
+    public Map cancelclock(
+            @RequestParam("id") Integer id,
+            HttpServletRequest request){
+        Map map=new HashMap();
+
+        try {
+            if(id==null){
+                map.put("errStr","参数错误");
+                return map;
+            }
+            TAtteClock clock=atteRestService.getClockById(id);
+            if(clock!=null&&clock.getStatus()==0){
+                clock.setUpdatetime(DateUtil.getNow());
+                clock.setStatus(3);
+                atteRestService.updateClock(clock);
+                map.put("errStr","");
+            }else {
+                map.put("errStr","加单已审核或不存在!");
+            }
+        } catch (Exception e) {
+            e.printStackTrace();
+            map.put("errStr",e.getMessage());
+        }
+
+        return map;
+
+    }
+
+
 
     /**
      *  查询补卡时段
@@ -338,6 +483,28 @@
             if(!atteRestService.saveClock(clock)){
                 map.put("errStr","添加数据失败!");
             }else{
+                //消息推送
+                CommonSendMessageParam param=new CommonSendMessageParam();
+                param.setContent("您有新的申请需审核");
+                param.setTitle("补签申请通知");
+                TCustomer cust=customerDao.findCustomerById(custid);
+                String jld_code=getjldcode();
+                TDept dept=deptDao.findByDeptcode(cust.getDeptcode());
+                List<TCustomerInfo> reviewlist=null;
+                if(dept!=null&&atteRestService.isreview(custid)){  // 审核人  发给 局领导
+                    reviewlist=atteClassService.getReviewList(dept.getFdeptcode());
+                }else{  //普通用户
+                    reviewlist=atteClassService.getReviewList(cust.getDeptcode());
+                }
+                if(reviewlist!=null){
+                    for (TCustomerInfo info:reviewlist){
+                        if(!custid.equals(info.getCustid())){
+                            param.setUserid(info.getCustid());
+                            ApiResponse resp=commonProxy.sendMsg(param);
+                            System.out.println("推送成功"+info.getCustname());
+                        }
+                    }
+                }
                 map.put("errStr","");
             }
         }else {
@@ -376,13 +543,15 @@
         searchBean.setAttedate(attedate);
         searchBean.setCusttypeid(custtypeid);
         searchBean.setStatus(status);
-        TCustomer cust=webInterfaceService.findCustomerById(custid);
-        String oper_code="2c99808271be7ee60171c019b4e30004";
-        if(StringUtil.isEmpty(cust.getDeptcode())){
+        TCustomer cust=customerDao.findCustomerById(custid);
+        String jld_code=getjldcode();
+        if(cust==null||StringUtil.isEmpty(cust.getDeptcode())){
             searchBean.setDeptcode("99");
-        }else if(oper_code.equals(cust.getDeptcode())){
-            searchBean.setDeptcode(null);
-        }else {
+        }else{
+            TDept dept=deptDao.findByDeptcode(cust.getDeptcode());
+            if(dept!=null&&jld_code.equals(dept.getFdeptcode())){
+                searchBean.setIsjld("1");
+            }
             searchBean.setDeptcode(cust.getDeptcode());
         }
         if(atteRestService.isreview(custid)){
@@ -419,6 +588,17 @@
 
                    atteReportService.updateReport(clock.getAttedate(),clock.getAttedate(),clock.getCustid());
                 }
+                //消息推送
+                CommonSendMessageParam param=new CommonSendMessageParam();
+                if(status==1){
+                    param.setContent("您有补签申请已通过");
+                }else{
+                    param.setContent("您有补签申请未通过");
+                }
+                param.setTitle("补签审核结果通知");
+                param.setUserid(clock.getCustid());
+               ApiResponse resp=commonProxy.sendMsg(param);
+                System.out.println("推送成功"+clock.getRemark());
                 map.put("errStr","");
             }else {
                 map.put("errStr","参数错误!");
@@ -587,4 +767,13 @@
         return map;
 
     }
+
+    public String getjldcode(){
+        String jld_code="2c9b8083734598bf01734be906140000"; //分管局领导
+        TBusinesspara para=businessparaDao.findByParakey("jld_code");
+        if(para!=null&&!StringUtil.isEmpty(para.getParaval())){
+            jld_code=para.getParaval();
+        }
+        return jld_code;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClockDaoImpl.java b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClockDaoImpl.java
index 1969c5f..d805422 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClockDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteClockDaoImpl.java
@@ -85,10 +85,11 @@
         if(!StringUtil.isEmpty(searchBean.getAttedate())){
             sql.append(" and t.attedate=:adate");
         }
-        if(!StringUtil.isEmpty(searchBean.getDeptcode())){
-            sql.append(" and td.deptcode=:dcode ");
-        }else{
+        if (!StringUtil.isEmpty(searchBean.getIsjld())){
             sql.append(" and t.custid in (select custid from t_atte_review ) ");
+            sql.append(" and td.fdeptcode=:dcode ");
+        }else{
+            sql.append(" and td.deptcode=:dcode ");
         }
         if(!StringUtil.isEmpty(searchBean.getEx_custid())){
             sql.append(" and t.custid !=:eid ");
@@ -99,6 +100,9 @@
         if(searchBean.getCusttypeid()!=null){
             sql.append(" and ct.custtypeid=:ctypeid ");
         }
+        if(!StringUtil.isEmpty(searchBean.getCustid())){
+            sql.append(" and t.custid = :cid ");
+        }
         sql.append(" order by t.attedate desc ");
         Query query=entityManager.createNativeQuery(sql.toString());
         if(!StringUtil.isEmpty(searchBean.getAttedate())){
@@ -116,6 +120,9 @@
         if(searchBean.getEx_custid()!=null){
             query.setParameter("eid",searchBean.getEx_custid());
         }
+        if(!StringUtil.isEmpty(searchBean.getCustid())){
+            query.setParameter("cid",searchBean.getCustid());
+        }
         pageNo = pageNo <= 0 ? 1 : pageNo;
         query.setFirstResult((pageNo - 1) * pageSize);
         query.setMaxResults(pageSize);
@@ -141,15 +148,24 @@
         if(!StringUtil.isEmpty(searchBean.getAttedate())){
             sql.append(" and t.attedate=:adate");
         }
-        if(!StringUtil.isEmpty(searchBean.getDeptcode())){
+        if (!StringUtil.isEmpty(searchBean.getIsjld())){
+            sql.append(" and t.custid in (select custid from t_atte_review ) ");
+            sql.append(" and td.fdeptcode=:dcode ");
+        }else{
             sql.append(" and td.deptcode=:dcode ");
         }
+        if(!StringUtil.isEmpty(searchBean.getEx_custid())){
+            sql.append(" and t.custid !=:eid ");
+        }
         if(searchBean.getStatus()!=null){
             sql.append(" and t.status=:stat ");
         }
         if(searchBean.getCusttypeid()!=null){
             sql.append(" and ct.custtypeid=:ctypeid ");
         }
+        if(!StringUtil.isEmpty(searchBean.getCustid())){
+            sql.append(" and t.custid = :cid ");
+        }
         Query query=entityManager.createNativeQuery(sql.toString());
         if(!StringUtil.isEmpty(searchBean.getAttedate())){
             query.setParameter("adate",searchBean.getAttedate());
@@ -163,6 +179,12 @@
         if(searchBean.getCusttypeid()!=null){
             query.setParameter("ctypeid",searchBean.getCusttypeid());
         }
+        if(searchBean.getEx_custid()!=null){
+            query.setParameter("eid",searchBean.getEx_custid());
+        }
+        if(!StringUtil.isEmpty(searchBean.getCustid())){
+            query.setParameter("cid",searchBean.getCustid());
+        }
         int cnt=0;
         Object obj=query.getSingleResult();
         if(obj!=null){
diff --git a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteRestDaoImpl.java b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteRestDaoImpl.java
index 2e4f2b9..2fa62fd 100644
--- a/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteRestDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/atte/dao/impl/AtteRestDaoImpl.java
@@ -87,10 +87,11 @@
             if(!StringUtil.isEmpty(searchBean.getEx_custid())){
                 sql.append(" and r.custid != :eid ");
             }
-            if(!StringUtil.isEmpty(searchBean.getDeptcode())){
-                sql.append(" and c.deptcode = :dcode ");
+            if(!StringUtil.isEmpty(searchBean.getIsjld())){
+                sql.append(" and td.fdeptcode = :dcode ");
+                sql.append(" and r.custid in (select custid from t_atte_review ) ");
             }else{
-                sql.append(" and r.custid in (select custid from t_atte_review )");
+                sql.append(" and c.deptcode = :dcode ");
             }
             if(!StringUtil.isEmpty(searchBean.getCustname())){
                 sql.append(" and c.custname like :cname ");
@@ -160,7 +161,10 @@
         if(!StringUtil.isEmpty(searchBean.getCustid())){
             sql.append(" and r.custid = :cid ");
         }
-        if(!StringUtil.isEmpty(searchBean.getDeptcode())){
+        if(!StringUtil.isEmpty(searchBean.getIsjld())){
+            sql.append(" and td.fdeptcode = :dcode ");
+            sql.append(" and r.custid in (select custid from t_atte_review ) ");
+        }else{
             sql.append(" and c.deptcode = :dcode ");
         }
         if(!StringUtil.isEmpty(searchBean.getCustname())){
diff --git a/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java b/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java
index f3f5fc3..9211784 100644
--- a/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java
+++ b/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java
@@ -28,4 +28,6 @@
 
   int countByFdeptcode(String fdeptcode);
 
+  TDept findByDeptcode(String deptcode);
+
 }
diff --git a/src/main/resources/templates/apph5/clockhisindex.html b/src/main/resources/templates/apph5/clockhisindex.html
new file mode 100644
index 0000000..62e94fe
--- /dev/null
+++ b/src/main/resources/templates/apph5/clockhisindex.html
@@ -0,0 +1,532 @@
+<!DOCTYPE html>
+<html xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4">
+
+<head>
+    <title>补签历史</title>
+    <!--<meta name="_csrf_header" th:content="${_csrf.headerName}" />
+    <meta name="_csrf_token" th:content="${_csrf.parameterName}" th:value="${_csrf.token}" />-->
+    <meta charset="utf-8"/>
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="/static/libs/layui/css/layui.css" th:href="@{/static/libs/layui/css/layui.css}"/>
+
+    <link rel="stylesheet" href="/static/res/assets/plugins/element-ui/theme-default/index.css"
+          th:href="@{/static/res/assets/plugins/element-ui/theme-default/index.css}"/>
+    <link rel="stylesheet" href="/static/res/assets/css/wxpage.css"
+          th:href="@{/static/res/assets/css/wxpage.css}"/>
+    <!--<script type="text/javascript" th:src="@{/static/libs/jquery/jquery-3.2.1.min.js}"></script>-->
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.min.js}"></script>
+    <!--<script type="text/javascript" th:src="@{/static/libs/layui/layui.js}"></script>-->
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/jquery/jquery.form.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/layer/layer.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/js/vue.min.js}"></script>
+    <script type="text/javascript" th:src="@{/static/res/assets/plugins/element-ui/index.js}"></script>
+
+
+</head>
+
+<body>
+
+<div id="app2">
+    <div class="page-title" style="text-align:center; font-size: 24px;color: #FF8247;margin-top:7%">补签历史</div><br>
+
+    <el-button type="primary" @click="showdiv()" style="float: right">筛 选</el-button>
+
+
+    <div class="row">
+        <div class="col-md-12" style="padding-left: 0px;padding-right: 0px">
+            <div class="box box-primary" style="margin-bottom: 15px">
+                <div class="box-body box-profile">
+                    <template>
+                        <el-table
+                                ref="singleTable"
+                                :data="tableData"
+                                highlight-current-row
+                                @current-change="currRowChange"
+                                stripe
+                                border>
+                            <el-table-column
+                                    prop="custid"
+                                    align="center"
+                                    v-show="false">
+                                <template scope="scope">
+                                    <div class="weui-panel__bd">
+                                        <div class="weui-media-box weui-media-box_text">
+                                            <h4 class="weui-media-box__title" style="display: flex">
+                                                <div style="flex: 1">{{scope.row.timename}}</div>
+                                                <!--<div>{{scope.row.deptname}}</div>-->
+                                            </h4>
+                                            <p class="weui-media-box__desc">
+                                            <div class="weui-cell__bd">
+                                                <span style="font-size:14px;color:#999; "></span>
+                                            </div>
+                                            <div style="display: flex;">
+
+                                                <div style="font-size:14px;color:#999;flex: 1">
+                                                   {{scope.row.attedate}}
+                                                </div>
+                                                <div style="font-size:14px;color:#999;margin-left:10px">
+                                                    <span v-if="scope.row.status== '0'"><el-button
+                                                            type="warning"
+                                                            @click="editDtl(scope.row)">未审核</el-button></span>
+                                                    <span v-if="scope.row.status== '1'"><el-button
+                                                            type="success"
+                                                            @click="editDtl(scope.row)">已通过</el-button></span>
+                                                    <span v-if="scope.row.status== '2'"><el-button
+                                                            type="success"
+                                                            @click="editDtl(scope.row)">未通过</el-button></span>
+                                                    <span v-if="scope.row.status== '3'"><el-button
+                                                            type="warning"
+                                                            @click="editDtl(scope.row)">已取消</el-button></span>
+
+                                                </div>
+
+                                            </div>
+                                            </p>
+                                        </div>
+                                    </div>
+
+                                </template>
+                            </el-table-column>
+
+
+                        </el-table>
+                        <el-input v-if="addmoreVis" id="addmore" type="button" value="加载更多" @click.native="addmore" ></el-input>
+                        <div class="clearfix"></div>
+
+
+                    </template>
+                </div>
+            </div>
+        </div>
+    </div>
+    <el-dialog style="width: 85%;height: 85%"  :title="updatetitle2" :visible.sync="dialogFormVisible2" size="large"
+               :modal-append-to-body='false' @close="closeDialog('historyform')">
+        <el-form ref="historyform" class="el-form-item " :model="historyform"
+                 :rules="rules" label-width="36%">
+            <el-form-item label="姓名:" prop="custname">
+                <el-col :span="18">
+                    <el-input v-model="historyform.custname" readonly style="width: 90%;" maxlength="20">
+                    </el-input>
+                </el-col>
+            </el-form-item>
+            <el-form-item label="人员类别:" prop="custtypename">
+                <el-col :span="18">
+                    <el-input v-model="historyform.custtypename" readonly style="width: 90%;" maxlength="20">
+                    </el-input>
+                </el-col>
+            </el-form-item>
+
+            <el-form-item label="状态:" prop="statusname">
+                <el-col :span="18">
+                    <el-input v-model="historyform.statusname" readonly style="width: 90%;" maxlength="20">
+                    </el-input>
+                </el-col>
+            </el-form-item>
+            <el-form-item label="补签原因:" prop="remark">
+                <el-col :span="18">
+                    <el-input type="textarea" style="width: 90%;" v-model="historyform.remark" placeholder="填写备注"
+                              readonly>
+                    </el-input>
+                </el-col>
+            </el-form-item>
+
+
+        </el-form>
+        <div slot="footer" class="dialog-footer">
+            <el-button type="primary" v-if="historyform.status== '0'" @click="cancel('historyform')">取消</el-button>
+        </div>
+    </el-dialog>
+    <el-dialog  :title="updatetitle" :visible.sync="dialogFormVisible" style="width: 85%" :modal-append-to-body='false'
+               @close="closeDialog('tempform')" size="large">
+        <el-form ref="tempform" :model="tempform" data-parsley-validate
+                 class="el-form-item" style="width: 100%">
+            <el-form-item   prop="attedate">
+                <label slot="label">日&emsp;&emsp;期:</label>
+                <div class="el-col el-col-17">
+                    <div class="el-input" style="width: 90%;">
+                        <el-date-picker type="date" v-model="tempform.attedate" id="time"
+                                        :editable="false"
+                                        value-format="yyyyMMdd"
+                                        style="width:100%;"></el-date-picker>
+                    </div>
+                </div>
+            </el-form-item>
+            <el-form-item  prop="status">
+                <label slot="label">状&emsp;&emsp;态:</label>
+                <div class="el-col el-col-17">
+                    <div class="el-input" style="width: 90%;">
+                        <el-select v-model="tempform.status" id="status">
+                            <el-option
+                                    v-for="status in statuslist"
+                                    :key="status.value"
+                                    :label="status.label"
+                                    :value="status.value">
+                            </el-option>
+                        </el-select>
+                    </div>
+                </div>
+            </el-form-item>
+
+
+        </el-form>
+        <div slot="footer" style="text-align:center; ">
+            <el-button type="primary" @click="saveTemp('tempform')">查 询</el-button>
+        </div>
+    </el-dialog>
+</div>
+
+
+</body>
+
+<script>
+    var validatePhone = function (rule, value, callback) {
+        if (value == "") {
+            callback(new Error("请输入手机号"));
+        } else if (!isCellPhone(value)) {//引入methods中封装的检查手机格式的方法
+            callback(new Error("请输入正确的手机号!"));
+        } else {
+            callback();
+        }
+    }
+
+    var app_vue = new Vue({
+        el: '#app2',
+        data: {
+            tableData: [],
+            confName: '1234',
+            currPage: 1,
+            pageSize: 10,
+            totSize: 0,
+            currentRow: null,
+            tempform: {
+                attedate: '',
+                custtypeid: '',
+                status: '',
+                custid:''
+            },
+            historyform: {
+                custid: '',
+                custname: '',
+                startdate: '',
+                enddate: '',
+                remark: '',
+                rtype: '',
+                status: '',
+                custtype: '',
+                id: ''
+            },
+            sexlist: [],
+            rtypelist: [],
+            custtypelist: [],
+            statuslist: [],
+            bannerHeight: 1000,
+            screenWidth: 0,
+            userId: '',
+            addmoreVis:false,
+            dialogFormVisible: false,
+            dialogFormVisible2: false,
+            dlgAllotDevVisible: false,
+            updatetitle: '筛选',
+            updatetitle2: '详情',
+            rules: {
+                /*visitorname: [
+                    {required: true, message: '请输入访客姓名', trigger: 'blur'},
+                ],
+                idno: [
+                    {required: true, message: '请输入访客身份证号', trigger: 'blur'}
+                ],
+                sex: [
+                    {required: true, message: '请输入访客性别', trigger: 'blur'}
+                ],
+                remarks: [
+                    {required: true, message: '请输入备注', trigger: 'blur'}
+                ],
+                phone: [
+                    {required: true, validator: validatePhone, trigger: 'blur'}
+                ]*/
+            },
+        },
+
+        methods: {
+            saveTemp: function (formName) {
+                var _that = this;
+                this.pagesize = 10;
+                this.currPage = 1;
+                // if(this.tempform.attedate==''||this.tempform.attedate==undefined){
+                //     layer.msg("请选择日期!", {icon: 2, time: 2000});
+                //     return ;
+                // }
+                this.tableData=[];
+                this.dialogFormVisible = false;
+                commonQuery(this, this.currPage, this.pageSize);
+            },
+            resetForm:function(formName) {
+                this.$refs[formName].resetFields();
+                this.dialogFormVisible = false;
+                this.dialogFormVisible2 = false;
+            },
+            cancel: function (formName) {
+                this.dialogFormVisible2 = false;
+
+                var _that = this;
+                this.pagesize = 10;
+                this.currPage = 1;
+                this.tableData=[];
+                cancelapply(this, 1,this.historyform.id);
+
+            },
+            showdiv: function (row) {
+                this.dialogFormVisible = true;
+                this.updatetitle = "筛选"
+            },
+            editDtl: function (row) {
+                dtl_getFillData(this, row);
+                this.dialogFormVisible2 = true;
+                this.updatetitle2 = "详情"
+            },
+            closediv: function () {
+                this.dialogFormVisible2 = true;
+
+            },
+            closeDialog:function(formName) {
+                // this.$refs[formName].resetFields();
+                this.dialogFormVisible = false
+            },
+            currRowChange: function (val) {
+                this.currentRow = val;
+            },
+            indexChange: function (pre, next) {
+                var _self = this;
+                var devIdListTmp = _self.devIdList;
+                _self.selectDevId = devIdListTmp[pre];
+                // console.log(_self.selectDevId)
+
+            },
+            setSize: function () {
+                // 通过浏览器宽度(图片宽度)计算高度
+                this.bannerHeight = this.screenWidth;
+            }, handleSizeChange: function (val) {
+                this.pageSize = val;
+                commonQuery(this,this.currPage, this.pageSize);
+                //console.log('每页条'+val);
+            }, currPageChange: function (val) {
+                this.currPage = val;
+                commonQuery(this, this.currPage, this.pageSize);
+                //console.log('当前页:'+val);
+            },
+            addmore:function() {
+                this.currPage=this.currPage+1;
+                commonQuery(this,  this.currPage, this.pageSize);
+            }
+
+        },
+        created: function () {
+            var _self = this;
+            // 首次加载时,需要调用一次
+            _self.screenWidth = window.innerWidth;
+            _self.setSize();
+            var confid = '[[${custid}]]';
+            console.log(confid);
+            _self.tempform.custid = confid;
+
+            var statl = [];
+            statl.push({
+                value: '',
+                label: '请选择'
+            });
+            statl.push({
+                value: '0',
+                label: '未审核'
+            });
+            statl.push({
+                value: '1',
+                label: '已通过'
+            });
+            statl.push({
+                value: '2',
+                label: '未通过'
+            });
+            statl.push({
+                value: '3',
+                label: '已取消'
+            });
+
+
+            _self.statuslist = statl;
+            $.ajax({
+                type: "get",
+                dataType: "json",
+                url: encodeURI("[[@{/app/atte/getcusttypelist}]]"),
+                success: function (ret) {
+
+                    var custtypes=ret.custtypelist;
+                    var custtypelist=[];
+                    for (var i = 0; i < custtypes.length; i++) {
+                        custtypelist.push({
+                            value: custtypes[i].custtypeid,
+                            label: custtypes[i].custtypename
+                        });
+                    }
+                    _self.custtypelist=custtypelist;
+
+                }
+            })
+
+            this.pagesize = 10;
+            this.currPage = 1;
+            commonQuery(this, this.currPage, this.pageSize);
+
+        }
+    })
+
+    // 窗口大小发生改变时,调用一次
+    window.onresize = function () {
+        app_vue.screenWidth = window.innerWidth;
+        app_vue.setSize();
+    }
+
+    function showsearchform() {
+        $("#sear").show();
+    }
+
+    function closesearchform() {
+        $("#sear").hide();
+    }
+
+    function dtl_getFillData(_self, row) {
+        _self.historyform.custname = row.custname;
+        _self.historyform.custtype = row.custtype;
+        _self.historyform.custtypename = row.custtypename;
+        _self.historyform.status = row.status;
+        _self.historyform.id = row.id;
+        if (row.status == "0") {
+            _self.historyform.statusname = "未审核"
+        } else if (row.status == "1") {
+            _self.historyform.statusname = "已通过"
+        } else if (row.status == "2") {
+            _self.historyform.statusname = "未通过"
+        } else if (row.status == "3") {
+            _self.historyform.statusname = "取消"
+        } else {
+            _self.historyform.statusname = "删除"
+        }
+
+        _self.historyform.remark = row.remark;
+    }
+    function class_Formatdate(date){
+        if(date==null||date==''){
+            return '';
+        }
+        var d=new Date(date);
+        var month=d.getMonth() + 1+'';
+        var date=d.getDate()+'';
+        if(month.length==1){
+            month='0'+month;
+        }
+        if(date.length==1){
+            date='0'+date;
+        }
+        var formated=d.getFullYear() + '' + month + '' +date;
+
+        return formated;
+    }
+
+
+    function commonQuery(_self, pageno, pagesize) {
+        var attedate=class_Formatdate(_self.tempform.attedate);
+        var status=_self.tempform.status;
+        var custid=_self.tempform.custid;
+        $.ajax({
+            type: "get",
+            dataType: "json",
+            url: "[[@{/app/atte/getclockhis?attedate=}]]" + attedate +  "&status=" + status + "&custid=" + custid + "&pageNo=" + pageno + "&pageSize=" + pagesize,
+            success: function (info) {
+                console.log(info)
+                if(info.msg != undefined){
+                    _self.addmoreVis=false;
+                    return ;
+                }
+                _self.totSize = info.page.totalCount;
+                var list=info.page.list;
+                for(var i=0;i<list.length;i++){
+                    var date=list[i].attedate;
+                    if (date == undefined||date.startsWith("n")) {
+                        return "";
+                    }
+                    var year =date.substring(0,4);
+                    var month=date.substring(4,6);
+                    var day=date.substring(6,8);
+                    // var hour=date.substring(8,10);
+                    // var min=date.substring(10,12);
+                    // var sec=date.substring(12,14);
+                    list[i].attedate= year+"-"+month+"-"+day;
+                    _self.tableData.push(list[i]);
+                }
+                if(list.length<10){
+                    _self.addmoreVis=false;
+                }else {
+                    _self.addmoreVis=true;
+                }
+            }
+        })
+    }
+
+    function cancelapply(_self, status,id) {
+        $.ajax({
+            type: "get",
+            dataType: "json",
+            url: "[[@{/app/atte/cancelclock?id=}]]" + id ,
+            success: function (info) {
+                console.log(info)
+                if (info.errStr != "") {
+                    layer.msg(info.errStr, {icon: 2, time: 2000});
+                } else {
+                    layer.msg('审核成功!', {icon: 1, time: 1000});
+                }
+                commonQuery(_self,_self.currPage, _self.pageSize);
+
+            }
+        })
+    }
+
+    function isCellPhone(val) {
+        if (!/^1(3|4|5|6|7|8)\d{9}$/.test(val)) {
+            return false;
+        } else {
+            return true;
+        }
+    }
+
+
+</script>
+
+<style>
+    .el-table__header th{
+        height: 0px;
+    }
+    .el-carousel__item h3 {
+        color: #ff3366;
+        font-size: 14px;
+        opacity: 0.75;
+        line-height: 300px;
+        margin: 0;
+        /*background-color:#66cccc;
+        border: 0px solid #e5e5e5;
+        width: 50%;
+        left: 10%;
+        height: 100%;*/
+    }
+
+    .el-carousel__item:nth-child(2n) {
+        background-color: #ffffff;
+    }
+
+    .el-carousel__item:nth-child(2n+1) {
+        background-color: #ffffff;
+    }
+
+    .el-carousel__item .Carousel {
+        border-bottom: 1px solid #f1f4f8;
+    }
+</style>
\ No newline at end of file
diff --git a/src/main/resources/templates/apph5/doclock.html b/src/main/resources/templates/apph5/doclock.html
index 938b632..84e0716 100644
--- a/src/main/resources/templates/apph5/doclock.html
+++ b/src/main/resources/templates/apph5/doclock.html
@@ -45,7 +45,9 @@
 
     </el-form>
     <div  style="text-align:center; ">
-        <el-button type="primary" @click="searchDtl">查询</el-button>
+        <el-button type="primary" @click="searchDtl">查&emsp;&emsp;询</el-button>
+        <br><br>
+        <el-button type="primary" @click="searchHis()">查看历史</el-button>
     </div>
     <div class="row">
         <div class="col-md-12" style="padding-left: 0px;padding-right: 0px">
@@ -217,6 +219,9 @@
             addclock:function (row){
                getFillData(this, row);
                 this.dialogFormVisible = true;
+            },
+            searchHis:function () {
+                window.location="[[@{'/app/atte/clockhisindex?custid='}]]"+'[[${custid}]]'
             }
         },
         created: function () {
diff --git a/src/main/resources/templates/apph5/leavehistory.html b/src/main/resources/templates/apph5/leavehistory.html
index a8291f7..6cf5bed 100644
--- a/src/main/resources/templates/apph5/leavehistory.html
+++ b/src/main/resources/templates/apph5/leavehistory.html
@@ -505,6 +505,25 @@
                 _self.totSize = info.page.totalCount;
                 var list=info.page.list;
                 for(var i=0;i<list.length;i++){
+
+                    var startdate=list[i].startdate;
+                    if (startdate == undefined||startdate.startsWith("n")) {
+                        return "";
+                    }
+                    var year =startdate.substring(0,4);
+                    var month=startdate.substring(4,6);
+                    var day=startdate.substring(6,8);
+                    list[i].startdate= year+"-"+month+"-"+day;
+                    var enddate=list[i].enddate;
+                    if (enddate == undefined||enddate.startsWith("n")) {
+                        return "";
+                    }
+                    year =enddate.substring(0,4);
+                    month=enddate.substring(4,6);
+                    day=enddate.substring(6,8);
+                    list[i].enddate= year+"-"+month+"-"+day;
+
+
                     _self.tableData.push(list[i]);
                 }
                 if(list.length<10){
diff --git a/src/main/resources/templates/apph5/myleave.html b/src/main/resources/templates/apph5/myleave.html
index 33e1ee2..7ba329f 100644
--- a/src/main/resources/templates/apph5/myleave.html
+++ b/src/main/resources/templates/apph5/myleave.html
@@ -455,6 +455,24 @@
                 _self.totSize = info.page.totalCount;
                 var list=info.page.list;
                 for(var i=0;i<list.length;i++){
+
+                    var startdate=list[i].startdate;
+                    if (startdate == undefined||startdate.startsWith("n")) {
+                        return "";
+                    }
+                    var year =startdate.substring(0,4);
+                    var month=startdate.substring(4,6);
+                    var day=startdate.substring(6,8);
+                    list[i].startdate= year+"-"+month+"-"+day;
+                    var enddate=list[i].enddate;
+                    if (enddate == undefined||enddate.startsWith("n")) {
+                        return "";
+                    }
+                     year =enddate.substring(0,4);
+                     month=enddate.substring(4,6);
+                     day=enddate.substring(6,8);
+                    list[i].enddate= year+"-"+month+"-"+day;
+
                     _self.tableData.push(list[i]);
                 }
                 if(list.length<10){
diff --git a/src/main/resources/templates/apph5/reviewclock.html b/src/main/resources/templates/apph5/reviewclock.html
index b5c44c1..beb572f 100644
--- a/src/main/resources/templates/apph5/reviewclock.html
+++ b/src/main/resources/templates/apph5/reviewclock.html
@@ -75,7 +75,9 @@
                                                     <span v-if="scope.row.status== '2'"><el-button
                                                             type="success"
                                                             @click="editDtl(scope.row)">未通过</el-button></span>
-
+                                                    <span v-if="scope.row.status== '3'"><el-button
+                                                            type="warning"
+                                                            @click="editDtl(scope.row)">已取消</el-button></span>
                                                 </div>
 
                                             </div>
@@ -210,7 +212,7 @@
             tableData: [],
             confName: '1234',
             currPage: 1,
-            pageSize: 7,
+            pageSize: 10,
             totSize: 0,
             currentRow: null,
             tempform: {
@@ -370,7 +372,10 @@
                 value: '2',
                 label: '未通过'
             });
-
+            statl.push({
+                value: '3',
+                label: '已取消'
+            });
 
             _self.statuslist = statl;
             $.ajax({
@@ -466,6 +471,17 @@
                 _self.totSize = info.page.totalCount;
                 var list=info.page.list;
                 for(var i=0;i<list.length;i++){
+                    var date=list[i].attedate;
+                    if (date == undefined||date.startsWith("n")) {
+                        return "";
+                    }
+                    var year =date.substring(0,4);
+                    var month=date.substring(4,6);
+                    var day=date.substring(6,8);
+                    // var hour=date.substring(8,10);
+                    // var min=date.substring(10,12);
+                    // var sec=date.substring(12,14);
+                    list[i].attedate= year+"-"+month+"-"+day;
                     _self.tableData.push(list[i]);
                 }
                 if(list.length<10){