会议报表提交
diff --git a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java
new file mode 100644
index 0000000..b93d495
--- /dev/null
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java
@@ -0,0 +1,69 @@
+package com.supwisdom.dlpay.conference.bean;
+
+public class ConfReportShowBean {
+    private Integer confid;
+    private String confname;
+    private String conftype;
+    private String confdate;
+    private String attendtime;
+    private String timeperoid;
+    private String attendrate;
+
+    public Integer getConfid() {
+        return confid;
+    }
+
+    public void setConfid(Integer confid) {
+        this.confid = confid;
+    }
+
+    public String getConfname() {
+        return confname;
+    }
+
+    public void setConfname(String confname) {
+        this.confname = confname;
+    }
+
+
+
+    public String getConftype() {
+        return conftype;
+    }
+
+    public void setConftype(String conftype) {
+        this.conftype = conftype;
+    }
+
+    public String getConfdate() {
+        return confdate;
+    }
+
+    public void setConfdate(String confdate) {
+        this.confdate = confdate;
+    }
+
+    public String getAttendrate() {
+        return attendrate;
+    }
+
+    public void setAttendrate(String attendrate) {
+        this.attendrate = attendrate;
+    }
+
+    public String getTimeperoid() {
+        return timeperoid;
+    }
+
+    public void setTimeperoid(String timeperoid) {
+        this.timeperoid = timeperoid;
+    }
+
+    public String getAttendtime() {
+        return attendtime;
+    }
+
+    public void setAttendtime(String attendtime) {
+        this.attendtime = attendtime;
+    }
+}
diff --git a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleReportBean.java b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleReportBean.java
new file mode 100644
index 0000000..d56b9da
--- /dev/null
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleReportBean.java
@@ -0,0 +1,67 @@
+package com.supwisdom.dlpay.conference.bean;
+
+public class ConfpeopleReportBean {
+    private String custname;
+    private String deptname;
+    private String attstatus;
+    private String atttime;
+    private String remark;
+    private String atttype;
+    private String insteadcustname;
+
+    public String getCustname() {
+        return custname;
+    }
+
+    public void setCustname(String custname) {
+        this.custname = custname;
+    }
+
+    public String getDeptname() {
+        return deptname;
+    }
+
+    public void setDeptname(String deptname) {
+        this.deptname = deptname;
+    }
+
+    public String getAttstatus() {
+        return attstatus;
+    }
+
+    public void setAttstatus(String attstatus) {
+        this.attstatus = attstatus;
+    }
+
+    public String getAtttime() {
+        return atttime;
+    }
+
+    public void setAtttime(String atttime) {
+        this.atttime = atttime;
+    }
+
+    public String getRemark() {
+        return remark;
+    }
+
+    public void setRemark(String remark) {
+        this.remark = remark;
+    }
+
+    public String getAtttype() {
+        return atttype;
+    }
+
+    public void setAtttype(String atttype) {
+        this.atttype = atttype;
+    }
+
+    public String getInsteadcustname() {
+        return insteadcustname;
+    }
+
+    public void setInsteadcustname(String insteadcustname) {
+        this.insteadcustname = insteadcustname;
+    }
+}
diff --git a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java
index f314880..b36dcd9 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java
@@ -12,7 +12,10 @@
     private String attstatus;
     private String atttime;
     private String remark;
+    private String atttype;
     private String insteadcustid;
+    private String insteadcustname;
+
 
     public String getPid() {
         return pid;
@@ -109,4 +112,20 @@
     public void setConftype(String conftype) {
         this.conftype = conftype;
     }
+
+    public String getAtttype() {
+        return atttype;
+    }
+
+    public void setAtttype(String atttype) {
+        this.atttype = atttype;
+    }
+
+    public String getInsteadcustname() {
+        return insteadcustname;
+    }
+
+    public void setInsteadcustname(String insteadcustname) {
+        this.insteadcustname = insteadcustname;
+    }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java
index 6d3dd92..35dc941 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java
@@ -2,6 +2,7 @@
 
 import com.supwisdom.dlpay.api.bean.JsonResult;
 import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
+import com.supwisdom.dlpay.conference.bean.ConfpeopleReportBean;
 import com.supwisdom.dlpay.conference.bean.ConfpeopleShowBean;
 import com.supwisdom.dlpay.conference.domain.TConference;
 import com.supwisdom.dlpay.conference.service.ConferenceService;
@@ -28,6 +29,7 @@
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.ResponseBody;
 
+import java.util.ArrayList;
 import java.util.List;
 
 @Controller
@@ -60,22 +62,19 @@
     @GetMapping("/confpeople/peoplelist")
     @ResponseBody
     public PageResult<ConfpeopleShowBean> searchConfPeople(@RequestParam("page") Integer pageNo,
-                                                              @RequestParam("limit") Integer pageSize,
-                                                              @RequestParam(value = "confid", required = false) Integer confid,
-                                                              @RequestParam(value = "attstatus", required = false) String attstatus,
-                                                           Model model) {
+                                                             @RequestParam("limit") Integer pageSize,
+                                                             @RequestParam(value = "confid", required = false) Integer confid,
+                                                             @RequestParam(value = "attstatus", required = false) String attstatus,
+                                                             @RequestParam(value = "atttype", required = false) String atttype,
+                                                             Model model) {
         try {
             if(null==confid){
                 return new PageResult<>(99, "请选择会议");
             }
             if (null == pageNo || pageNo < 1) pageNo = WebConstant.PAGENO_DEFAULT;
             if (null == pageSize || pageSize < 1) pageSize = WebConstant.PAGESIZE_DEFAULT;
-            TConference conf=conferenceService.getConferenceById(confid);
-           /* if(null!=conf){
-                model.addAttribute("conf",conf);
-            }*/
 
-            return conferenceService.getConfPeoplePage(confid, attstatus,conf.getConftype(), pageNo, pageSize);
+            return conferenceService.getConfPeoplePage(confid, attstatus,atttype, pageNo, pageSize);
         } catch (Exception e) {
             e.printStackTrace();
             return new PageResult<>(99, "系统查询错误");
diff --git a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java
new file mode 100644
index 0000000..de20159
--- /dev/null
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java
@@ -0,0 +1,122 @@
+package com.supwisdom.dlpay.conference.controller;
+
+import com.supwisdom.dlpay.api.bean.JsonResult;
+import com.supwisdom.dlpay.conference.bean.ConfReportShowBean;
+import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
+import com.supwisdom.dlpay.conference.bean.ConfpeopleReportBean;
+import com.supwisdom.dlpay.conference.bean.ConfpeopleShowBean;
+import com.supwisdom.dlpay.conference.domain.TConfPeople;
+import com.supwisdom.dlpay.conference.domain.TConference;
+import com.supwisdom.dlpay.conference.service.ConferenceService;
+import com.supwisdom.dlpay.conference.util.ConferenceConstant;
+import com.supwisdom.dlpay.customer.bean.CustomerSearchBean;
+import com.supwisdom.dlpay.doorlist.bean.TCustomerInfo;
+import com.supwisdom.dlpay.framework.domain.TOperator;
+import com.supwisdom.dlpay.framework.util.DateUtil;
+import com.supwisdom.dlpay.framework.util.PageResult;
+import com.supwisdom.dlpay.framework.util.StringUtil;
+import com.supwisdom.dlpay.framework.util.WebConstant;
+import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.annotation.AuthenticationPrincipal;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Controller
+public class ConfReportController {
+    @Autowired
+    private ConferenceService conferenceService;
+    @Autowired
+    private WebInterfaceService webInterfaceService;
+
+
+    @GetMapping("/confreport/index")
+    public String ConferenceView(Model model) {
+      /*  String today = DateUtil.getNow("yyyy-MM-dd");
+
+        model.addAttribute("confDate", today);*/
+        return "confreport/index";
+    }
+
+    @GetMapping("/confreport/reportlist")
+    @ResponseBody
+    public PageResult<ConfReportShowBean> searchConfPeople(@RequestParam("page") Integer pageNo,
+                                                           @RequestParam("limit") Integer pageSize,
+                                                           @RequestParam(value = "confname", required = false) String confname,
+                                                           @RequestParam(value = "conftype", required = false) String conftype,
+                                                           @RequestParam(value = "confdate", required = false) String confdate,
+                                                           @AuthenticationPrincipal UserDetails operUser,
+                                                           Model model) {
+        try {
+            if (null == pageNo || pageNo < 1) pageNo = WebConstant.PAGENO_DEFAULT;
+            if (null == pageSize || pageSize < 1) pageSize = WebConstant.PAGESIZE_DEFAULT;
+            TOperator oper = (TOperator) operUser;
+            String deptcode = oper.getDeptcode();
+            String status = ConferenceConstant.CONFSTATUS_OVER;
+            String date=DateUtil.reformatDatetime(confdate,"yyyy-MM-dd","yyyyMMdd");
+
+            return conferenceService.getConfReportPage(confname, conftype, deptcode, date, status, pageNo, pageSize);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return new PageResult<>(99, "系统查询错误");
+        }
+    }
+
+    @GetMapping("/confreport/load4detail")
+    public String load4ConfDetails(@RequestParam("confid") Integer confid, Model model) {
+        model.addAttribute("detailConfid", confid);
+        return "confreport/detail";
+    }
+
+    @GetMapping("/confreport/attlist")
+    @ResponseBody
+    public PageResult<ConfpeopleReportBean> searchUnAttendConfPeople(
+            @RequestParam("confid") Integer confid,
+            @RequestParam(value = "searchkey", required = false) String searchkey,
+            @RequestParam(value ="attstatus", required = false) String attstatus,
+            @RequestParam(value ="deptcode", required = false) String deptcode) {
+        try {
+            List<String> statuslist=new ArrayList<>();
+            if(!StringUtil.isEmpty(attstatus)){
+                statuslist.add(attstatus);
+            }else{
+                statuslist.add(ConferenceConstant.ATTENDSTATUS_CHECKED);
+                statuslist.add(ConferenceConstant.ATTENDSTATUS_LATE);
+            }
+            return conferenceService.getConfPeopleReport(confid,searchkey, statuslist,deptcode);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return new PageResult<>(99, "系统查询错误");
+        }
+    }
+
+    @GetMapping("/confreport/unattlist")
+    @ResponseBody
+    public PageResult<ConfpeopleReportBean> searchAttendConfPeople(
+            @RequestParam("confid") Integer confid,
+            @RequestParam(value = "searchkey", required = false) String searchkey,
+            @RequestParam(value ="attstatus", required = false) String attstatus,
+            @RequestParam(value ="deptcode", required = false) String deptcode) {
+        try {
+            List<String> statuslist=new ArrayList<>();
+            if(!StringUtil.isEmpty(attstatus)){
+                statuslist.add(attstatus);
+            }else{
+                statuslist.add(ConferenceConstant.ATTENDSTATUS_INSTEAD);
+                statuslist.add(ConferenceConstant.ATTENDSTATUS_UNCHECK);
+            }
+            return conferenceService.getConfPeopleReport(confid, searchkey,statuslist,deptcode);
+        } catch (Exception e) {
+            e.printStackTrace();
+            return new PageResult<>(99, "系统查询错误");
+        }
+    }
+}
diff --git a/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java b/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
index 3d865ce..c3a32dd 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
@@ -59,7 +59,7 @@
             if (null == pageSize || pageSize < 1) pageSize = WebConstant.PAGESIZE_DEFAULT;
             TOperator oper = (TOperator) operUser;
             String deptcode = oper.getDeptcode();
-            return conferenceService.getConferenceInfos(confname, conftype, deptcode, pageNo, pageSize);
+            return conferenceService.getConferenceInfos(confname, conftype, deptcode,"", pageNo, pageSize);
         } catch (Exception e) {
             e.printStackTrace();
             return new PageResult<>(99, "系统查询错误");
diff --git a/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java b/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java
index a3d6e27..c3d3f74 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java
@@ -8,6 +8,8 @@
 import org.springframework.data.jpa.repository.Query;
 import org.springframework.stereotype.Repository;
 
+import java.util.List;
+
 @Repository
 public interface ConfPeopleDao extends JpaRepository<TConfPeople, String> {
 
@@ -16,4 +18,8 @@
     void deleteConfPeopleByconfid(int confid);
 
     TConfPeople findByConfidAndCustid(Integer confid,String custid);
+
+    int countByConfid(Integer confid);
+
+    int countByConfidAndAttstatusIn(Integer confid, List<String> attstatus);
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/dao/NolistConfPeopleDao.java b/src/main/java/com/supwisdom/dlpay/conference/dao/NolistConfPeopleDao.java
index 908ea93..4f8abc1 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/dao/NolistConfPeopleDao.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/dao/NolistConfPeopleDao.java
@@ -8,6 +8,6 @@
 
 @Repository
 public interface NolistConfPeopleDao extends JpaRepository<TNolistConfPeople, String> {
-
+    int countByConfid(int confid);
 
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/domain/TConfPeople.java b/src/main/java/com/supwisdom/dlpay/conference/domain/TConfPeople.java
index 444b7a9..046f070 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/domain/TConfPeople.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/domain/TConfPeople.java
@@ -29,6 +29,9 @@
   @Column(name="ATTSTATUS",  length = 12)
   private String attstatus;
 
+  @Column(name="ATTTYPE",  length = 12)
+  private String atttype;
+
   @Column(name="ATTTIME",  length = 4)
   private String atttime;
 
@@ -120,4 +123,12 @@
   public void setRemark(String remark) {
     this.remark = remark;
   }
+
+  public String getAtttype() {
+    return atttype;
+  }
+
+  public void setAtttype(String atttype) {
+    this.atttype = atttype;
+  }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/domain/TNolistConfPeople.java b/src/main/java/com/supwisdom/dlpay/conference/domain/TNolistConfPeople.java
index a688f5c..d937f97 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/domain/TNolistConfPeople.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/domain/TNolistConfPeople.java
@@ -29,6 +29,9 @@
   @Column(name="ATTSTATUS", length = 12)
   private String attstatus;
 
+  @Column(name="ATTTYPE",  length = 12)
+  private String atttype;
+
   @Column(name="ATTTIME", length = 4)
   private String atttime;
 
@@ -120,4 +123,12 @@
   public void setRemark(String remark) {
     this.remark = remark;
   }
+
+  public String getAtttype() {
+    return atttype;
+  }
+
+  public void setAtttype(String atttype) {
+    this.atttype = atttype;
+  }
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java b/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java
index 16416da..9e6e477 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java
@@ -1,7 +1,9 @@
 package com.supwisdom.dlpay.conference.service;
 
 import com.supwisdom.dlpay.api.bean.JsonResult;
+import com.supwisdom.dlpay.conference.bean.ConfReportShowBean;
 import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
+import com.supwisdom.dlpay.conference.bean.ConfpeopleReportBean;
 import com.supwisdom.dlpay.conference.bean.ConfpeopleShowBean;
 import com.supwisdom.dlpay.conference.domain.*;
 import com.supwisdom.dlpay.framework.domain.TOperator;
@@ -16,7 +18,10 @@
 public interface ConferenceService {
 
     @Transactional(rollbackFor = Exception.class, readOnly = true)
-    PageResult<ConferenceShowBean> getConferenceInfos(String confname, String conftype,String deptocde, int pageNo, int pageSize);
+    PageResult<ConferenceShowBean> getConferenceInfos(String confname, String conftype,String deptocde,String confdate, int pageNo, int pageSize);
+
+    @Transactional(rollbackFor = Exception.class, readOnly = true)
+    PageResult<ConfReportShowBean> getConfReportPage(String confname, String conftype, String deptcode, String confdate,String status, int pageNo, int pageSize);
 
     @Transactional(rollbackFor = Exception.class)
     boolean deleteConference(int confid) throws Exception;
@@ -66,7 +71,10 @@
     JsonResult updateConfPeople(String id,String conftype,String insteadcustid,String attstatus,String remark) ;
 
     @Transactional(rollbackFor = Exception.class, readOnly = true)
-    PageResult<ConfpeopleShowBean> getConfPeoplePage(Integer confid, String attstatus,String conftype, int pageNo, int pageSize);
+    PageResult<ConfpeopleShowBean> getConfPeoplePage(Integer confid, String attstatus,String atttype, int pageNo, int pageSize);
+
+    @Transactional(rollbackFor = Exception.class, readOnly = true)
+    PageResult<ConfpeopleReportBean> getConfPeopleReport(Integer confid, String searchkey,List<String> attstatus, String deptcode);
 
 
     @Transactional(rollbackFor = Exception.class, readOnly = true)
diff --git a/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java b/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
index a09dc10..d5698ca 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/service/impl/ConferenceServiceImpl.java
@@ -4,9 +4,7 @@
 import cn.afterturn.easypoi.excel.ExcelImportUtil;
 import cn.afterturn.easypoi.excel.entity.ImportParams;
 import com.supwisdom.dlpay.api.bean.JsonResult;
-import com.supwisdom.dlpay.conference.bean.ConfPeopleImportBean;
-import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
-import com.supwisdom.dlpay.conference.bean.ConfpeopleShowBean;
+import com.supwisdom.dlpay.conference.bean.*;
 import com.supwisdom.dlpay.conference.dao.*;
 import com.supwisdom.dlpay.conference.domain.*;
 import com.supwisdom.dlpay.conference.service.ConferenceService;
@@ -18,6 +16,7 @@
 import com.supwisdom.dlpay.framework.util.DateUtil;
 import com.supwisdom.dlpay.framework.util.PageResult;
 import com.supwisdom.dlpay.framework.util.StringUtil;
+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;
@@ -27,6 +26,7 @@
 import org.apache.commons.lang3.StringUtils;
 import org.hibernate.query.internal.NativeQueryImpl;
 import org.hibernate.transform.Transformers;
+import org.jetbrains.annotations.NotNull;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.domain.Page;
 import org.springframework.data.domain.PageRequest;
@@ -45,6 +45,7 @@
 import javax.persistence.criteria.Root;
 import java.io.File;
 import java.math.BigInteger;
+import java.text.DecimalFormat;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -67,36 +68,16 @@
     private ConfDtlDao confDtlDao;
     @Autowired
     private NolistConfPeopleDao nolistConfPeopleDao;
+    @Autowired
+    private CustomerDao customerDao;
 
 
     @PersistenceContext
     private EntityManager entityManager;
 
     @Override
-    public PageResult<ConferenceShowBean> getConferenceInfos(String confname, String conftype,String deptcode, int pageNo, int pageSize) {
-        Pageable pageable = PageRequest.of(pageNo - 1, pageSize, Sort.by("confdate"));
-
-        Page<TConference> page = conferenceDao.findAll(new Specification<TConference>() {
-            @Override
-            public Predicate toPredicate(Root<TConference> root, CriteriaQuery<?> query, CriteriaBuilder criteriaBuilder) {
-                List<Predicate> predicates = new ArrayList<>();
-                if (!StringUtil.isEmpty(confname)) {
-                    predicates.add(criteriaBuilder.like(root.get("confname").as(String.class), "%" + confname.trim() + "%"));
-                }
-                if (!StringUtil.isEmpty(conftype)) {
-                    predicates.add(criteriaBuilder.equal(root.get("conftype").as(String.class), conftype));
-
-                }
-                if (!StringUtil.isEmpty(deptcode)) {
-                    predicates.add(criteriaBuilder.equal(root.get("deptcode").as(String.class), deptcode));
-
-                }
-              /*  if (!StringUtil.isEmpty(status)) {
-                    predicates.add(criteriaBuilder.equal(root.get("status").as(String.class), status));
-                }*/
-                return criteriaBuilder.and(predicates.toArray(new Predicate[0]));
-            }
-        }, pageable);
+    public PageResult<ConferenceShowBean> getConferenceInfos(String confname, String conftype,String deptcode,String confdate, int pageNo, int pageSize) {
+        Page<TConference> page = getConferencePage(confname, conftype, deptcode, confdate,"", pageNo, pageSize);
         List<ConferenceShowBean> result = new ArrayList<>(0);
         if (null != page && page.getTotalElements() > 0) {
             for (TConference conf : page.getContent()) {
@@ -118,6 +99,85 @@
     }
 
     @Override
+    public PageResult<ConfReportShowBean> getConfReportPage(String confname, String conftype, String deptcode, String confdate,String status, int pageNo, int pageSize) {
+        Page<TConference> page = getConferencePage(confname, conftype, deptcode, confdate,status, pageNo, pageSize);
+        List<ConfReportShowBean> result = new ArrayList<>(0);
+        DecimalFormat format=new DecimalFormat("0.00");
+        if (null != page && page.getTotalElements() > 0) {
+            for (TConference conf : page.getContent()) {
+                ConfReportShowBean bean=new ConfReportShowBean();
+                bean.setConfname(conf.getConfname());
+                bean.setConfdate(DateUtil.reformatDatetime(conf.getConfdate(),"yyyyMMdd","yyyy-MM-dd"));
+                bean.setConftype(conf.getConftype());
+                bean.setConfid(conf.getConfid());
+                String starttime=conf.getStarttime().substring(0, 2) + ":" + conf.getStarttime().substring(2);
+                String endtime=conf.getEndtime().substring(0, 2) + ":" + conf.getEndtime().substring(2);
+                bean.setTimeperoid(starttime+"~"+endtime);
+                bean.setAttendtime(conf.getAttendtime().substring(0, 2) + ":" + conf.getAttendtime().substring(2));
+                if(ConferenceConstant.CONFTYPE_NOLIST.equals(conf.getConftype())){
+                    Integer totcnt=checkNolistDeptCustomer(conf.getConfid());
+                    Integer actualcnt=nolistConfPeopleDao.countByConfid(conf.getConfid());
+                    Float rate=0f;
+                    if(0!=totcnt){
+                        rate=actualcnt*100f/totcnt;
+                    }
+                    bean.setAttendrate(format.format(rate)+"%");
+
+                }else if(ConferenceConstant.CONFTYPE_LIST.equals(conf.getConftype())){
+                    Integer totcnt=confPeopleDao.countByConfid(conf.getConfid());
+                    List<String> list=new ArrayList<>();
+                    list.add(ConferenceConstant.ATTENDSTATUS_CHECKED);
+                    list.add(ConferenceConstant.ATTENDSTATUS_LATE);
+                    Integer actualcnt=confPeopleDao.countByConfidAndAttstatusIn(conf.getConfid(),list);
+                    Float rate=0f;
+                    if(0!=totcnt){
+                        rate=actualcnt*100f/totcnt;
+                    }
+                    bean.setAttendrate(format.format(rate)+"%");
+
+                }
+                result.add(bean);
+
+            }
+        }
+        return new PageResult<>(page.getTotalElements(), result);
+    }
+
+    @NotNull
+    private Page<TConference> getConferencePage(String confname, String conftype, String deptcode, String confdate,String status, int pageNo, int pageSize) {
+        Pageable pageable = PageRequest.of(pageNo - 1, pageSize, Sort.by("confdate"));
+
+
+        return conferenceDao.findAll(new Specification<TConference>() {
+            @Override
+            public Predicate toPredicate(Root<TConference> root, CriteriaQuery<?> query, CriteriaBuilder criteriaBuilder) {
+                List<Predicate> predicates = new ArrayList<>();
+                if (!StringUtil.isEmpty(confname)) {
+                    predicates.add(criteriaBuilder.like(root.get("confname").as(String.class), "%" + confname.trim() + "%"));
+                }
+                if (!StringUtil.isEmpty(conftype)) {
+                    predicates.add(criteriaBuilder.equal(root.get("conftype").as(String.class), conftype));
+                }
+                List<String> childdplist=null;
+                if(!StringUtil.isEmpty(deptcode)){
+                    childdplist = customerDao.getChildDeptlist( deptcode);
+                }
+                if (!StringUtil.isEmpty(childdplist)) {
+                    predicates.add(root.get("deptcode").in(childdplist));
+
+                }
+                if (!StringUtil.isEmpty(confdate)) {
+                    predicates.add(criteriaBuilder.equal(root.get("confdate").as(String.class), confdate));
+                }
+                if (!StringUtil.isEmpty(status)) {
+                    predicates.add(criteriaBuilder.equal(root.get("status").as(String.class), status));
+                }
+                return criteriaBuilder.and(predicates.toArray(new Predicate[0]));
+            }
+        }, pageable);
+    }
+
+    @Override
     public boolean deleteConference(int confid) throws Exception{
         TConference conf = conferenceDao.findByConfid(confid);
         if (null == conf) {
@@ -278,14 +338,9 @@
                 if (!StringUtil.isEmpty(msg)) {
                     errmsgList.add("第" + (n + 1) + "行数据错误" + msg);
                 } else {
-                    TConfPeople people = new TConfPeople();
-                    people.setAttstatus(ConferenceConstant.ATTENDSTATUS_UNCHECK);
-                    people.setCardno(cardno);
-                    people.setCustid(customer.getCustid());
-                    people.setConfid(conference.getConfid());
-                    people.setLastsaved(DateUtil.getNow());
-                    people.setCustname(name);
-                    confPeopleDao.save(people); //保存明细
+                    String atttype=ConferenceConstant.ATTTYPE_SELF;
+                    String custid=customer.getCustid();
+                    saveNewConfPeople(confid, cardno, name, atttype, custid);
 
                     successCardnos.add(cardno);
                 }
@@ -310,6 +365,18 @@
         return true;
     }
 
+    private void saveNewConfPeople(Integer confid, String cardno, String name, String atttype, String custid) {
+        TConfPeople people = new TConfPeople();
+        people.setAttstatus(ConferenceConstant.ATTENDSTATUS_UNCHECK);
+        people.setAtttype(atttype);
+        people.setCardno(cardno);
+        people.setCustid(custid);
+        people.setConfid(confid);
+        people.setLastsaved(DateUtil.getNow());
+        people.setCustname(name);
+        confPeopleDao.save(people); //保存明细
+    }
+
     @Override
     public PageResult<TConfPeople> getConferenceDetails(String searchkey, int confid, int pageNo, int pageSize) {
         StringBuffer querySql = new StringBuffer("from TConfPeople t where t.confid=:confid ");
@@ -360,11 +427,17 @@
 
     @Override
     public JsonResult updateConfPeople(String pid, String conftype, String insteadcustid, String attstatus, String remark) {
+
         if(ConferenceConstant.CONFTYPE_NOLIST.equals(conftype)){
             TNolistConfPeople people=nolistConfPeopleDao.getOne(pid);
             if(null==people){
                 return JsonResult.error("修改失败,未查询到该用户");
             }
+            TConference conf=conferenceDao.findByConfid(people.getConfid());
+            if(null==conf){
+                return JsonResult.error("修改失败,会议不存在");
+            }
+
             people.setInsteadcustid(insteadcustid);
             people.setAttstatus(attstatus);
             people.setRemark(remark);
@@ -374,32 +447,56 @@
             if(null==people){
                 return JsonResult.error("修改失败,未查询到该用户");
             }
+            TConference conf=conferenceDao.findByConfid(people.getConfid());
+            if(null==conf){
+                return JsonResult.error("修改失败,会议不存在");
+            }
+            if(ConferenceConstant.ATTENDSTATUS_INSTEAD.equals(attstatus)){
+                if(ConferenceConstant.CONFSTATUS_OVER.equals(conf.getStatus())||ConferenceConstant.CONFSTATUS_START.equals(conf.getStatus())){
+                    return JsonResult.error("已开始或结束的会议不能代签");
+                }
+                List<TCustomerInfo> clist=customerDao.getAllTCustomerList("","","",insteadcustid);
+                if(clist.size()<=0){
+                    return JsonResult.error("代签人员不存在");
+                }
+                TCustomerInfo cust=clist.get(0);
+                saveNewConfPeople(conf.getConfid(),cust.getCardno(),cust.getCustname(),ConferenceConstant.ATTTYPE_INSTEAD,insteadcustid);
+            }
+
             people.setInsteadcustid(insteadcustid);
             people.setAttstatus(attstatus);
             people.setRemark(remark);
             confPeopleDao.save(people);
+
+
         }
         return JsonResult.ok();
     }
 
     @Override
-    public PageResult<ConfpeopleShowBean> getConfPeoplePage(Integer confid, String attstatus,String conftype, int pageNo, int pageSize) {
+    public PageResult<ConfpeopleShowBean> getConfPeoplePage(Integer confid, String attstatus,String atttype, int pageNo, int pageSize) {
+        TConference conf=conferenceDao.findByConfid(confid);
+        if(null==conf){
+            return new PageResult<>(99, "会议不存在");
+        }
         String table="tb_conf_people";
 
-        if(ConferenceConstant.CONFTYPE_NOLIST.equals(conftype)){
+        if(ConferenceConstant.CONFTYPE_NOLIST.equals(conf.getConftype())){
             table="tb_nolist_conf_people";
         }
 
-        StringBuffer querySql=new StringBuffer("select a.confid,a.confname,b.custname,b.cardno,d.deptname,b.attstatus,b.atttime,b.custid,b.pid,b.remark,b.insteadcustid,a.conftype from "+table+" b  " +
+        StringBuffer querySql=new StringBuffer("select a.confid,a.confname,b.custname,b.cardno,d.deptname,b.attstatus,b.atttime,b.custid,b.pid,b.remark,b.insteadcustid,a.conftype,e.custname as insteadcustname,b.atttype from "+table+" b  " +
                 "left join tb_conference a on a.confid=b.confid " +
                 "left join t_customer c on b.custid=c.custid " +
                 "left join tb_dept d on c.deptcode=d.deptcode " +
+                "left join t_customer e on b.insteadcustid=e.custid " +
                 "where b.confid=:confid ");
 
         StringBuffer countSql = new StringBuffer("select count(*) from "+table+" b  " +
                 "left join tb_conference a on a.confid=b.confid " +
                 "left join t_customer c on b.custid=c.custid " +
                 "left join tb_dept d on c.deptcode=d.deptcode " +
+                "left join t_customer e on b.insteadcustid=e.custid " +
                 "where b.confid=:confid");
 
 
@@ -407,6 +504,10 @@
             querySql.append("and b.attstatus=:attstatus ");
             countSql.append("and b.attstatus=:attstatus ");
         }
+        if (!StringUtil.isEmpty(atttype)) {
+            querySql.append("and b.atttype=:atttype ");
+            countSql.append("and b.atttype=:atttype ");
+        }
         querySql.append(" order by b.cardno ");
         Query query = entityManager.createNativeQuery(querySql.toString());
         Query countQuery = entityManager.createNativeQuery(countSql.toString());
@@ -426,6 +527,52 @@
     }
 
     @Override
+    public PageResult<ConfpeopleReportBean> getConfPeopleReport(Integer confid,String searchkey, List<String> attstatus, String deptcode) {
+        TConference conf=conferenceDao.findByConfid(confid);
+        if(null==conf){
+            return null;
+        }
+        String table="tb_conf_people";
+
+        if(ConferenceConstant.CONFTYPE_NOLIST.equals(conf.getConftype())){
+            table="tb_nolist_conf_people";
+        }
+
+        StringBuffer querySql=new StringBuffer("select b.custname,d.deptname,b.attstatus,b.atttime,b.remark,e.custname as insteadcustname,b.atttype from "+table+" b  " +
+                "left join tb_conference a on a.confid=b.confid " +
+                "left join t_customer c on b.custid=c.custid " +
+                "left join tb_dept d on c.deptcode=d.deptcode " +
+                "left join t_customer e on b.insteadcustid=e.custid " +
+                "where b.confid=:confid ");
+        if (!StringUtil.isEmpty(attstatus)) {
+            querySql.append(" and b.attstatus in ('"+ StringUtils.join(attstatus.toArray(),"','")+"') ");
+        }
+        if(!StringUtil.isEmpty(deptcode)){
+            List<String> deptlist=customerDao.getChildDeptlist(deptcode);
+            if(!StringUtil.isEmpty(deptlist)){
+                querySql.append(" and d.deptcode in ('"+ StringUtils.join(deptlist.toArray(),"','")+"') ");
+            }
+        }
+        if(!StringUtil.isEmpty(searchkey)){
+            querySql.append("and b.custname=:searchkey");
+        }
+        querySql.append(" order by b.atttime ");
+
+
+
+        Query query = entityManager.createNativeQuery(querySql.toString());
+        query.setParameter("confid",confid);
+        if(!StringUtil.isEmpty(searchkey)){
+            query.setParameter("searchkey", searchkey);
+        }
+
+        query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(ConfpeopleReportBean.class));
+        List<ConfpeopleReportBean> list = query.getResultList();
+        return  new PageResult<>(list);
+    }
+
+
+    @Override
     public TConfPeople getTConfPeopleByConfidAndCustid(Integer confid, String custid) {
         return confPeopleDao.findByConfidAndCustid(confid,custid);
     }
@@ -467,5 +614,16 @@
         return null;
     }
 
+    private Integer checkNolistDeptCustomer(Integer confid) {
+        Query query = entityManager.createNativeQuery("select count(t.custid) from t_customer t " +
+                "where t.deptcode in (select distinct d.deptcode from tb_conf_people p left join t_customer t " +
+                "on p.custid=t.custid left join tb_dept d on d.deptcode=t.deptcode where confid=:confid)");
+        query.setParameter("confid", confid);
+        BigInteger cnt = (BigInteger) query.getSingleResult();
+        System.out.println("cnt:::"+cnt);
+
+        return cnt.intValue();
+    }
+
 
 }
diff --git a/src/main/java/com/supwisdom/dlpay/conference/task/ConferenceTask.java b/src/main/java/com/supwisdom/dlpay/conference/task/ConferenceTask.java
index a1f566e..02eec78 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/task/ConferenceTask.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/task/ConferenceTask.java
@@ -121,6 +121,7 @@
                     people.setCustid(dtl.getCustid());
                     people.setAtttime(atttime);
                     people.setCustname(dtl.getCustname());
+                    people.setAtttype(ConferenceConstant.ATTTYPE_SELF);
                     people.setLastsaved(DateUtil.getNow());
                     conferenceService.saveNolistConfPeople(people);
                 }else{
diff --git a/src/main/java/com/supwisdom/dlpay/conference/util/ConferenceConstant.java b/src/main/java/com/supwisdom/dlpay/conference/util/ConferenceConstant.java
index 5c43481..81b231b 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/util/ConferenceConstant.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/util/ConferenceConstant.java
@@ -2,6 +2,8 @@
 
 import com.supwisdom.dlpay.framework.util.DateUtil;
 
+import java.text.DecimalFormat;
+
 public class ConferenceConstant {
     public static final String CONFTYPE_LIST="list";
     public static final String CONFTYPE_NOLIST="nolist";
@@ -12,10 +14,14 @@
     public static final String ATTENDSTATUS_UNCHECK="uncheck";
     public static final String ATTENDSTATUS_CHECKED="checked";
     public static final String ATTENDSTATUS_LATE="late";
+    public static final String ATTENDSTATUS_CLOSED="closed";
     public static final String ATTENDSTATUS_INSTEAD="instead";
+    public static final String ATTTYPE_SELF="self";
+    public static final String ATTTYPE_INSTEAD="instead";
     public static final String DEVICETYPE_CONFERENCE="H";
 
     public static final Integer CONFDTL_STATUS_UPDATED=1;
     public static final Integer CONFDTL_STATUS_UNUPDATE=0;
 
+
 }
diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/dao/CustomerDao.java b/src/main/java/com/supwisdom/dlpay/mainservice/dao/CustomerDao.java
index e6e5001..8baff67 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/dao/CustomerDao.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/dao/CustomerDao.java
@@ -16,7 +16,7 @@
 

     public boolean saveCustomer(TCustomer bean);

 

-    public List<TCustomerInfo> getAllTCustomerList(String perName, String cardno, String bankcardno);

+    public List<TCustomerInfo> getAllTCustomerList(String perName, String cardno, String bankcardno,String custid);

 

     public TCustomerInfo getTCustomerByExcel(String cardno);

 

@@ -25,4 +25,7 @@
     boolean deleteCustomer(String custid);

 

     List<TCustomerExportBean> getCustomerExportList(String custname,String deptcode);

-}

+

+    List<String> getChildDeptlist( String deptcode) ;

+

+    }

diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CustomerDaoImpl.java b/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CustomerDaoImpl.java
index d9af3d7..c9e0a92 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CustomerDaoImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/dao/impl/CustomerDaoImpl.java
@@ -68,7 +68,7 @@
 

     @Transactional

     @Override

-    public List<TCustomerInfo> getAllTCustomerList(String perName, String cardno, String bankcardno) {

+    public List<TCustomerInfo> getAllTCustomerList(String perName, String cardno, String bankcardno,String custid) {

         String sql = "select a.custid,a.custname,b.cardno,b.bankcardno,b.cardphyid,b.expiredate,a.custtypeid,a.deptcode from T_Customer a left join t_card b on a.custid = b.custid " +

                 " where a.status='1' and b.status='normal' and b.transtatus='normal' ";

         if (!StringUtil.isEmpty(perName)){

@@ -80,6 +80,9 @@
         if (!StringUtil.isEmpty(bankcardno)){

             sql +=" and b.bankcardno like :bankcardno ";

         }

+        if (!StringUtil.isEmpty(custid)){

+            sql +=" and a.custid = :custid ";

+        }

         sql +=" order by b.cardno desc ";

         Query query = entityManager.createNativeQuery(sql, TCustomerInfo.class);

         if (!StringUtil.isEmpty(perName)){

@@ -91,6 +94,9 @@
         if (!StringUtil.isEmpty(bankcardno)){

             query.setParameter("bankcardno", "%"+bankcardno+"%");

         }

+        if (!StringUtil.isEmpty(custid)){

+            query.setParameter("custid", custid);

+        }

         List<TCustomerInfo> list = query.getResultList();

         return list;

     }

@@ -99,9 +105,8 @@
     @Override

     public PageResult<TCustomerInfo> getCustomerInfoPage(CustomerSearchBean param) {

 

-        List<String> childdplist=null;

         String deptcode=param.getDeptcode();

-        childdplist = getChildDeptlist(childdplist, deptcode);

+        List<String> childdplist = getChildDeptlist( deptcode);

 

         String perName=param.getCustname();

         String sql = "select a.custid,a.custname,a.deptcode,a.custtypeid,b.cardno,b.bankcardno,b.cardphyid,b.expiredate from T_Customer a left join t_card b on a.custid = b.custid " +

@@ -137,8 +142,9 @@
         return new PageResult<>(count.longValue(), list);

     }

 

-    private List<String> getChildDeptlist(List<String> childdplist, String deptcode) {

-        if (!StringUtil.isEmpty(deptcode)&&!"0".equals(deptcode)) {

+    public List<String> getChildDeptlist( String deptcode) {

+        List<String> childdplist=null;

+        if (!StringUtil.isEmpty(deptcode)) {

             Query chirdGroupQuery = entityManager.createNativeQuery("WITH RECURSIVE r AS(" +

                     "SELECT * FROM tb_dept WHERE deptcode =:deptcode " +

                     "union ALL " +

@@ -182,8 +188,7 @@
 

     @Override

     public List<TCustomerExportBean> getCustomerExportList(String custname,String deptcode) {

-        List<String> childdplist=null;

-        childdplist = getChildDeptlist(childdplist, deptcode);

+        List<String> childdplist= getChildDeptlist( deptcode);

         String sql = "select a.custname,a.deptname,a.custtypename,b.cardno,b.bankcardno,b.cardphyid from T_Customer a left join t_card b on a.custid = b.custid " +

                 " where a.status='1' and b.status='normal' and b.transtatus='normal' ";

 

diff --git a/src/main/java/com/supwisdom/dlpay/mainservice/service/impl/WebInterfaceServiceImpl.java b/src/main/java/com/supwisdom/dlpay/mainservice/service/impl/WebInterfaceServiceImpl.java
index 469cd16..6b3d10d 100644
--- a/src/main/java/com/supwisdom/dlpay/mainservice/service/impl/WebInterfaceServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/mainservice/service/impl/WebInterfaceServiceImpl.java
@@ -125,7 +125,7 @@
 

     @Override

     public List<TCustomerInfo> getAllTCustomerList(String perName, String cardno, String bankcardno) {

-        return customerDao.getAllTCustomerList(perName, cardno, bankcardno);

+        return customerDao.getAllTCustomerList(perName, cardno, bankcardno,"");

     }

 

     @Override

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 a113305..f3f5fc3 100644
--- a/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java
+++ b/src/main/java/com/supwisdom/dlpay/system/dao/DeptDao.java
@@ -26,4 +26,6 @@
 
   List<TDept> findByDeptno(String deptno);
 
+  int countByFdeptcode(String fdeptcode);
+
 }
diff --git a/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java b/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
index 166403e..ef8b1a0 100644
--- a/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
+++ b/src/main/java/com/supwisdom/dlpay/system/service/impl/SystemServiceImpl.java
@@ -4,6 +4,7 @@
 import com.supwisdom.dlpay.framework.util.DateUtil;

 import com.supwisdom.dlpay.framework.util.PageResult;

 import com.supwisdom.dlpay.framework.util.StringUtil;

+import com.supwisdom.dlpay.mainservice.dao.CustomerDao;

 import com.supwisdom.dlpay.ncmgr.domain.TBuilding;

 import com.supwisdom.dlpay.system.bean.*;

 import com.supwisdom.dlpay.system.dao.*;

@@ -37,6 +38,8 @@
     private CustTypeDao custTypeDao;

     @Autowired

     private DeptDao deptDao;

+    @Autowired

+    private CustomerDao customerDao;

 

     @Override

     @CacheEvict(cacheNames = "door_dictionary_cache", key = "'.*'", allEntries = true)

@@ -363,6 +366,12 @@
 

     @Override

     public JsonResult deleteDept(String deptcode) {

+        if("0".equals(deptcode)){

+            return JsonResult.error("根目录不能删除");

+        }

+        if(deptDao.countByFdeptcode(deptcode)>0){

+            return JsonResult.error("不能删除含有子部门的部门");

+        }

         deptDao.deleteById(deptcode);

         return JsonResult.ok("成功");

     }

diff --git a/src/main/resources/data.sql b/src/main/resources/data.sql
index 4740cba..4f18d9a 100644
--- a/src/main/resources/data.sql
+++ b/src/main/resources/data.sql
@@ -197,7 +197,7 @@
 INSERT INTO tb_systemparam(param_key,param_value,param_desc,param_flag) VALUES ('PAYAPI_APPID','300003','登录核心平台appid','1');

 INSERT INTO tb_systemparam(param_key,param_value,param_desc,param_flag) VALUES ('PAYAPI_SECRET','b32309b244904e1789b055eb1da51db1','登录核心平台secret','1');

 

-

+INSERT INTO "tb_dept"("deptcode", "deptname", "deptno", "ename", "fdeptcode", "lastsaved", "status") VALUES ('0', '根部门', 'root', NULL, '-1', NULL, 'normal');

 

 INSERT INTO "t_dictionary"("dicttype", "dicttypename", "dictval", "dictcaption") VALUES (8, '设备类型', 'H', '会议平板');

 INSERT INTO "t_dictionary"("dicttype", "dicttypename", "dictval", "dictcaption") VALUES (16, '设备使用类别', 'HY', '会议签到');

diff --git a/src/main/resources/templates/confpeople/form.html b/src/main/resources/templates/confpeople/form.html
index 2ef3aea..bffbc79 100644
--- a/src/main/resources/templates/confpeople/form.html
+++ b/src/main/resources/templates/confpeople/form.html
@@ -25,7 +25,7 @@
             </select>&emsp;
         </div>
     </div>
-    <div class="layui-form-item instead-form">
+    <div class="layui-form-item">
         <label class="layui-form-label">备注</label>
         <div class="layui-input-block">
             <textarea name="remark" placeholder="请输入" class="layui-textarea"></textarea>
diff --git a/src/main/resources/templates/confpeople/index.html b/src/main/resources/templates/confpeople/index.html
index ab22d0a..4221243 100644
--- a/src/main/resources/templates/confpeople/index.html
+++ b/src/main/resources/templates/confpeople/index.html
@@ -19,6 +19,12 @@
                 <option value="checked"> 已签到</option>
                 <option value="uncheck"> 未签到</option>
                 <option value="late"> 迟到</option>
+                <option value="instead"> 被代签</option>
+            </select>&emsp;
+
+            <select id="search-confpeople-atttype">
+                <option value=""> 选择签到方式</option>
+                <option value="self"> 实签</option>
                 <option value="instead"> 代签</option>
             </select>&emsp;
 
@@ -34,7 +40,8 @@
 
 <!-- 表格操作列 -->
 <script type="text/html" id="confpeople-table-bar">
-    <a class="layui-btn layui-btn layui-btn-xs" lay-event="edit">查看\编辑</a>
+    <a class="layui-btn layui-btn layui-btn-xs" lay-event="edit">编辑</a>
+    <a class="layui-btn layui-btn layui-btn-xs layui-btn-danger" lay-event="close">关闭</a>
 </script>
 
 
@@ -57,7 +64,6 @@
                     {field: 'cardno', title: '卡号', align: 'center'},
                     {field: 'deptname', title: '所属部门', align: 'center'},
                     {field: 'attendtime', title: '签到时间', align: 'center'},
-
                     {
                         field: 'attstatus', title: '状态', align: 'center', sort: true, templet: function (d) {
                             if ('uncheck' == d.attstatus) {
@@ -65,14 +71,30 @@
                             } else if ('checked' == d.attstatus) {
                                 return '<span class="layui-badge layui-bg-green">已签到</span>';
                             } else if ('late' == d.attstatus) {
-                                return '<span class="layui-badge layui-bg-gray">迟到</span>';
+                                return '<span class="layui-badge layui-bg-cyan">迟到</span>';
                             } else if ('instead' == d.attstatus) {
-                                return '<span class="layui-badge">代签</span>';
-                            } else {
+                                return '<span class="layui-badge">被代签</span>';
+                            }  else if ('closed' == d.attstatus) {
+                                return '<span class="layui-badge layui-bg-gray">关闭</span>';
+                            }
+                            else {
                                 return d.attstatus;
                             }
                         }
                     },
+                    {
+                        field: 'atttype', title: '签到方式', align: 'center', sort: true, templet: function (d) {
+                            if ('instead' == d.atttype) {
+                                return '<span class="layui-badge layui-bg-orange">代签</span>'
+                            } else if ('self' == d.atttype) {
+                                return '<span class="layui-badge layui-bg-green">实签</span>';
+                            } else {
+                                return d.atttype;
+                            }
+                        }
+                    },
+                    {field: 'insteadcustname', title: '代签人', align: 'center'},
+                    {field: 'remark', title: '备注', align: 'center'},
                     {field: 'id', align: 'center', title: '操作', toolbar: '#confpeople-table-bar', fixed: 'right'}
                 ]
             ]
@@ -82,12 +104,13 @@
         $('#btn-search-confpeople').click(function () {
             var confid = $("#search-confpeople-confid").val();
             var attstatus = $("#search-confpeople-attstatus").val();
-            table.reload('confpeopleTable', {where: {confid: confid, attstatus: attstatus}, page: {curr: 1}});
+            var atttype= $("#search-confpeople-atttype").val();
+            table.reload('confpeopleTable', {where: {confid: confid, attstatus: attstatus,atttype:atttype}, page: {curr: 1}});
 
 
         });
         let showModel = function (data) {
-            let title = '查看/编辑'
+            let title = '编辑'
             admin.putTempData('t_people', data);
             admin.popupCenter({
                 title: title,
@@ -102,8 +125,44 @@
 
         //监听单元格
         table.on('tool(confpeopleTable-filter)', function (obj) {
+
             var data = obj.data;
-            showModel(data);
+            console.log(data);
+            if ('edit' == obj.event) {
+                showModel(data);
+            }else if('close' == obj.event){
+                layer.confirm('确定关闭【' + data.custname + '】的签到吗?', {
+                    btn: ['确定', '取消']
+                }, function () {
+                    layer.load(2);
+                    let token = $("meta[name='_csrf_token']").attr("value");
+                    admin.go('[[@{/confpeople/editconfpeople}]]', {
+                        _csrf:token,
+                        conftype: data.conftype,
+                        pid:data.pid,
+                        attstatus:'closed',
+                        insteadcustid:'',
+                        remark:''
+                    }, function (data) {
+                        layer.closeAll('loading');
+                        if (data.code == 200) {
+                            layer.msg(data.msg, {icon: 1});
+                            var confid=$("#search-confpeople-confid").val();
+                            table.reload('confpeopleTable', confid);
+                        } else if (data.code == 401) {
+                            layer.msg(data.msg, {icon: 2, time: 1500}, function () {
+                                location.replace('[[@{/login}]]');
+                            }, 1000);
+                            return;
+                        } else {
+                            layer.msg(data.msg, {icon: 2});
+                        }
+                        table.reload('conferenceTable');
+                    }, function (err) {
+                        admin.errorBack(err)
+                    });
+                });
+            }
 
         });
 
diff --git a/src/main/resources/templates/confreport/detail.html b/src/main/resources/templates/confreport/detail.html
new file mode 100644
index 0000000..4073e27
--- /dev/null
+++ b/src/main/resources/templates/confreport/detail.html
@@ -0,0 +1,251 @@
+<div id="confreport" lay-filter="confreport-devbind-filter" class="layui-form model-form"
+     style="padding: 30px 25px 10px 25px;">
+    <input type="hidden" id="confreport-hidden-confid" th:value="${detailConfid}"/>
+
+    <div class="layui-row">
+        <div class="layui-col-md6"> <label class="layui-form-label" style="margin:0;padding:0;display: flex">到会人员</label></div>
+        <div class="layui-col-md6"> <label class="layui-form-label" style="margin:0;padding:0;display: flex">未到人员</label></div>
+    </div>
+    <div class="layui-row layui-col-space10">
+
+        <div class="layui-col-md6">
+            <div  style="border: 1px solid #ddd;border-radius: 4px;padding: 10px;">
+                <div class="layui-card-body">
+                    <div class="layui-form toolbar">
+                        <div class="layui-input-inline">
+                            <input id="search-confreport-deptcode" type="text"
+                                   lay-filter="search-confreport-devgroupid-filter" autocomplete="off"
+                                   class="layui-input"/>
+                        </div>
+                        姓名:
+                        <input id="search-confreport-searchkey" type="text" class="layui-input search-input"
+                               maxlength="20" style="width: 200px;" placeholder="输入姓名"/>&emsp;
+                        <button id="btn-search-confreport-att" class="layui-btn icon-btn"><i
+                                class="layui-icon">&#xe615;</i>搜索
+                        </button>
+                        <table class="layui-table" id="confreport-table"
+                               lay-filter="confreport-table-filter"></table>
+                    </div>
+                </div>
+            </div>
+        </div>
+
+        <div class="layui-col-md6">
+            <div style="border: 1px solid #ddd;border-radius: 4px;padding: 10px;">
+                <div class="layui-card-body">
+                    <div class="layui-form toolbar">
+                        <div class="layui-input-inline">
+                            <input id="search-confreport-deptcode-unatt" type="text"
+                                   lay-filter="search-confreport-devgroupid-filter" autocomplete="off"
+                                   class="layui-input"/>
+                        </div>
+                        姓名:
+                        <input id="search-confreport-searchkey-unatt" type="text" class="layui-input search-input"
+                               maxlength="20" style="width: 200px;" placeholder="输入姓名"/>&emsp;
+                        <button id="btn-search-confreport-unatt" class="layui-btn icon-btn"><i
+                                class="layui-icon">&#xe615;</i>搜索
+                        </button>
+
+                        <table class="layui-table" id="confreport-table-unatt"
+                               lay-filter="confreport-table-filter"></table>
+                    </div>
+                </div>
+            </div>
+        </div>
+    </div>
+
+
+    <div class="layui-form-item model-form-footer">
+        <button class="layui-btn layui-btn-primary" type="button" ew-event="closeDialog">取消</button>
+        <!--<button class="layui-btn" lay-filter="confreport-submit" lay-submit id="submitbtn">保存</button>-->
+    </div>
+</div>
+
+<style type="text/css" id="confreport-css">
+    .layui-form-item .layui-form-checkbox[lay-skin=primary] {
+        margin-top: 0;
+    }
+</style>
+
+<script>
+    layui.use(['layer', 'table', 'admin', 'form', 'treeSelect'], function () {
+        var layer = layui.layer;
+        var admin = layui.admin;
+        var form = layui.form;
+        var table = layui.table;
+        //  var treeSelect = layui.treeSelect;
+        var $ = layui.$
+        var treeSelect=layui.treeSelect;
+        treeSelect.render({
+            elem: '#search-confreport-deptcode',
+            data: '[[@{/customer/depttree}]]',
+            type: 'get',
+            placeholder: '选择部门',
+            search: false,
+            style: {
+                folder: {
+                    enable: false
+                },
+                line: {
+                    enable: true
+                }
+            },
+            // 点击回调
+            click: function (d) {
+                var treeNode = d.current;
+                console.log(treeNode);
+                return true;
+            },
+            success: function (d) {
+                console.log(d); // 加载完成后的回调函数
+            }
+        });
+
+        treeSelect.render({
+            elem: '#search-confreport-deptcode-unatt',
+            data: '[[@{/customer/depttree}]]',
+            type: 'get',
+            placeholder: '选择部门',
+            search: false,
+            style: {
+                folder: {
+                    enable: false
+                },
+                line: {
+                    enable: true
+                }
+            },
+            // 点击回调
+            click: function (d) {
+                var treeNode = d.current;
+                console.log(treeNode);
+                return true;
+            },
+            success: function (d) {
+                console.log(d); // 加载完成后的回调函数
+            }
+        });
+        var confid = $("#confreport-hidden-confid").val();
+
+        // 渲染表格
+        var renderDetailTable = function (obj) {
+            table.render({
+                elem: '#confreport-table',
+                url: '[[@{/confreport/attlist}]]',
+                size: 'sm',
+                where: obj,
+                height: 350,
+                page: false,
+                cols: [
+                    [
+                        {field: 'custname', title: '姓名', align: 'center'},
+                        {field: 'deptname', title: '部门', align: 'center'},
+                        {
+                            field: 'attstatus', title: '状态', align: 'center', sort: true, templet: function (d) {
+                                if ('uncheck' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-orange">未签到</span>'
+                                } else if ('checked' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-green">已签到</span>';
+                                } else if ('late' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-gray">迟到</span>';
+                                } else if ('instead' == d.attstatus) {
+                                    return '<span class="layui-badge">被代签</span>';
+                                } else {
+                                    return d.attstatus;
+                                }
+                            }
+                        },
+                        {
+                            field: 'atttype', title: '签到方式', align: 'center', sort: true, templet: function (d) {
+                                if ('instead' == d.atttype) {
+                                    return '<span class="layui-badge layui-bg-orange">代签</span>'
+                                } else if ('self' == d.atttype) {
+                                    return '<span class="layui-badge layui-bg-green">实签</span>';
+                                } else {
+                                    return '<span class="layui-badge layui-bg-green">实签</span>';
+
+                                }
+                            }
+                        }
+                    ]
+                ]
+            });
+        }
+
+        var renderUnattDetailTable = function (obj) {
+            table.render({
+                elem: '#confreport-table-unatt',
+                url: '[[@{/confreport/unattlist}]]',
+                size: 'sm',
+                where: obj,
+                height: 350,
+                page: false,
+                cols: [
+                    [
+                        {field: 'custname', title: '姓名', align: 'center'},
+                        {field: 'deptname', title: '部门', align: 'center'},
+                        {
+                            field: 'attstatus', title: '状态', align: 'center', sort: true, templet: function (d) {
+                                if ('uncheck' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-orange">未签到</span>'
+                                } else if ('checked' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-green">已签到</span>';
+                                } else if ('late' == d.attstatus) {
+                                    return '<span class="layui-badge layui-bg-gray">迟到</span>';
+                                } else if ('instead' == d.attstatus) {
+                                    return '<span class="layui-badge">被代签</span>';
+                                } else {
+                                    return d.attstatus;
+                                }
+                            }
+                        },
+                        {
+                            field: 'atttype', title: '签到方式', align: 'center', sort: true, templet: function (d) {
+                                if ('instead' == d.atttype) {
+                                    return '<span class="layui-badge layui-bg-orange">代签</span>'
+                                } else if ('self' == d.atttype) {
+                                    return '<span class="layui-badge layui-bg-green">实签</span>';
+                                } else {
+                                    return '<span class="layui-badge layui-bg-green">实签</span>';
+
+                                }
+                            }
+                        }
+                    ]
+                ]
+            });
+        }
+
+        renderDetailTable({confid: confid});
+        renderUnattDetailTable({confid: confid});
+        // 搜索按钮点击事件
+        $('#btn-search-confreport-att').click(function () {
+
+            var deptcode = $("#search-confreport-deptcode").val();
+            var searchkey = $("#search-confreport-searchkey").val();
+            console.log(confid+deptcode+searchkey);
+            table.reload('confreport-table', {
+                where: {
+                    confid: confid,
+                    searchkey: searchkey,
+                    deptcode: deptcode
+                }
+            });
+        });
+
+        $('#btn-search-confreport-unatt').click(function () {
+
+            var deptcode = $("#search-confreport-deptcode-unatt").val();
+            var searchkey = $("#search-confreport-searchkey-unatt").val();
+            console.log(confid+deptcode+searchkey);
+            table.reload('confreport-table-unatt', {
+                where: {
+                    confid: confid,
+                    searchkey: searchkey,
+                    deptcode: deptcode
+                }
+            });
+        });
+
+    });
+</script>
\ No newline at end of file
diff --git a/src/main/resources/templates/confreport/index.html b/src/main/resources/templates/confreport/index.html
new file mode 100644
index 0000000..396ace6
--- /dev/null
+++ b/src/main/resources/templates/confreport/index.html
@@ -0,0 +1,153 @@
+<div class="layui-card">
+    <div class="layui-card-header">
+        <h2 class="header-title">会议报表</h2>
+        <span class="layui-breadcrumb pull-right">
+          <a href="#">会议管理</a>
+          <a><cite>会议报表</cite></a>
+        </span>
+    </div>
+    <div class="layui-card-body">
+        <div class="layui-form toolbar">
+            <div class="layui-form-item">
+                <div class="layui-inline">
+                    <label class="layui-form-label">会议类型:</label>
+                    <div class="layui-input-inline">
+                        <select id="search-confreport-conftype">
+                            <option value=""> 选择会议类型</option>
+                            <option value="list"> 名单会议</option>
+                            <option value="nolist"> 临时会议</option>
+                        </select>
+                    </div>
+                </div>
+                <div class="layui-inline">
+                    <label class="layui-form-label">会议名称:</label>
+                    <div class="layui-input-inline">
+                        <input id="search-confreport-confname" class="layui-input search-input" maxlength="20"
+                               type="text"
+                               placeholder="输入名称查询"/>
+                    </div>
+                </div>
+                <div class="layui-inline">
+                    <label class="layui-form-label">会议日期:</label>
+                    <div class="layui-input-inline">
+                        <input type="text" name="confdate" class="layui-input" th:value="${confDate}"
+                               id="search-confreport-confdate" placeholder="yyyy-MM-dd">
+                    </div>
+                </div>
+
+                <div class="layui-inline">
+                    <button id="btn-search-confreport" class="layui-btn icon-btn" data-type="search"><i
+                            class="layui-icon">&#xe615;</i>搜索
+                    </button>
+                </div>
+
+            </div>
+
+
+        </div>
+        <table class="layui-table" id="confreportTable" lay-filter="confreportTable-filter"></table>
+    </div>
+</div>
+
+
+<!-- 表格操作列 -->
+<script type="text/html" id="confreport-table-bar">
+
+</script>
+
+<script>
+    layui.use(['form', 'table', 'layer', 'admin', 'element', 'laydate'], function () {
+        var form = layui.form;
+        var table = layui.table;
+        var admin = layui.admin;
+        var element = layui.element;
+
+        form.render("select");
+        var confdate = $("#search-confreport-confdate").val();
+
+        var laydate = layui.laydate;
+        laydate.render({
+            elem: '#search-confreport-confdate',
+            btns: ['now', 'confirm'],
+            trigger: 'click',
+            max: confdate
+        });
+
+        // 渲染表格
+        table.render({
+            elem: '#confreportTable',
+            url: '[[@{/confreport/reportlist}]]',
+            page: true,
+            cols: [
+                [
+                    {field: 'confname', title: '会议名称', align: 'center', fixed: 'left'},
+                    {field: 'confdate', width: 150, title: '会议日期', align: 'center'},
+                    {field: 'timeperoid', width: 150, title: '会议时间', align: 'center'},
+                    {field: 'attendtime', width: 150, title: '签到时间', align: 'center'},
+                    {field: 'attendrate', width: 150, title: '签到率', align: 'center'},
+                    {
+                        field: 'conftype',
+                        title: '会议类型',
+                        align: 'center',
+                        width: 120,
+                        sort: true,
+                        templet: function (d) {
+                            if ('list' == d.conftype) {
+                                return '名单会议';
+                            } else if ('nolist' == d.conftype) {
+                                return '临时会议';
+                            } else {
+                                return d.conftype;
+                            }
+                        }
+                    },
+                    {
+                        field: 'confid',
+                        align: 'center',
+                        width: 150,
+                        title: '操作',
+                        fixed: 'right',
+                        templet: function (item) {
+                            return ' <a class="layui-btn  layui-btn-xs" lay-event="detail"><i class="layui-icon layui-icon-edit"></i>查看明细</a> ';
+                        }
+                    }
+                ]
+            ]
+        });
+
+        // 搜索按钮点击事件
+        $('#btn-search-confreport').click(function () {
+            var conftype = $("#search-confreport-conftype").val();
+            var confname = $("#search-confreport-confname").val();
+            var confdate = $("#search-confreport-confdate").val();
+            table.reload('confreportTable', {
+                where: {conftype: conftype, confname: confname, confdate: confdate},
+                page: {curr: 1}
+            });
+        });
+
+
+        //监听单元格
+        table.on('tool(confreportTable-filter)', function (obj) {
+            var data = obj.data;
+            if ('detail' == obj.event) {
+                admin.popupCenter({
+                    title: data.confname,
+                    path: '[[@{/confreport/load4detail}]]?confid=' + data.confid,
+                    area: '1200px',
+                    finish: function () {
+                        table.reload('confreportTable');
+                    }
+                });
+            }
+
+        });
+
+    });
+</script>
+
+<style>
+    .layui-form-label{
+        width:120px;
+    }
+</style>
\ No newline at end of file
diff --git a/src/main/resources/templates/z216Eh5Oyy.txt b/src/main/resources/templates/z216Eh5Oyy.txt
new file mode 100644
index 0000000..a767980
--- /dev/null
+++ b/src/main/resources/templates/z216Eh5Oyy.txt
@@ -0,0 +1 @@
+5ad846dc0ba018513eb969693df3070e
\ No newline at end of file