州公安局剩余收尾
diff --git a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
index da1b933..c2e6151 100644
--- a/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
+++ b/src/main/java/com/supwisdom/dlpay/app/controller/AppController.java
@@ -454,9 +454,7 @@
if(null==review){
return "/error/403";
}
-
model.addAttribute("deptcode",cust.getDeptcode());
-
return "apph5/conference/confreviewlist";
}
@@ -487,11 +485,13 @@
public PageResult<TCustomerImportBean> listConfpeople(
@RequestParam(value = "custname", required = false) String custname,
@RequestParam(value = "deptcode", required = false) String deptcode,
+ @RequestParam(value = "confid", required = false) Integer confid,
@AuthenticationPrincipal TOperator operUser) {
try {
CustomerSearchBean searchBean = new CustomerSearchBean();
searchBean.setCustname(custname);
searchBean.setDeptcode(deptcode);
+ searchBean.setConfid(confid);
PageResult<TCustomerImportBean> bean = webInterfaceService.getCustomerInfo(searchBean);
return bean;
} catch (Exception e) {
diff --git a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportCountBean.java b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportCountBean.java
new file mode 100644
index 0000000..a5f67f0
--- /dev/null
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportCountBean.java
@@ -0,0 +1,22 @@
+package com.supwisdom.dlpay.conference.bean;
+
+public class ConfReportCountBean {
+ private Integer cnt;
+ private String attstatus;
+
+ public Integer getCnt() {
+ return cnt;
+ }
+
+ public void setCnt(Integer cnt) {
+ this.cnt = cnt;
+ }
+
+ public String getAttstatus() {
+ return attstatus;
+ }
+
+ public void setAttstatus(String attstatus) {
+ this.attstatus = attstatus;
+ }
+}
diff --git a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java
index ebb7e81..7e46932 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfReportShowBean.java
@@ -1,15 +1,33 @@
package com.supwisdom.dlpay.conference.bean;
+import cn.afterturn.easypoi.excel.annotation.Excel;
+
public class ConfReportShowBean {
private Integer confid;
+ @Excel(name = "会议名称")
private String confname;
+ @Excel(name = "会议类别")
private String conftype;
+ @Excel(name = "会议日期")
private String confdate;
+ @Excel(name = "参会时间")
private String attendtime;
+ @Excel(name = "会议时间")
private String timeperoid;
+ @Excel(name = "签到率")
private String attendrate;
- private String actualcnt;
+ @Excel(name = "应到人数")
private String totcnt;
+ @Excel(name = "实到人数")
+ private String actualcnt;
+ @Excel(name = "准时签到人数")
+ private String checkedcnt="0";
+ @Excel(name = "未到人数")
+ private String uncheckcnt="0";
+ @Excel(name = "迟到人数")
+ private String latecnt="0";
+ @Excel(name = "代签人数")
+ private String insteadcnt="0";
public Integer getConfid() {
return confid;
@@ -84,4 +102,36 @@
public void setTotcnt(String totcnt) {
this.totcnt = totcnt;
}
+
+ public String getCheckedcnt() {
+ return checkedcnt;
+ }
+
+ public void setCheckedcnt(String checkedcnt) {
+ this.checkedcnt = checkedcnt;
+ }
+
+ public String getUncheckcnt() {
+ return uncheckcnt;
+ }
+
+ public void setUncheckcnt(String uncheckcnt) {
+ this.uncheckcnt = uncheckcnt;
+ }
+
+ public String getLatecnt() {
+ return latecnt;
+ }
+
+ public void setLatecnt(String latecnt) {
+ this.latecnt = latecnt;
+ }
+
+ public String getInsteadcnt() {
+ return insteadcnt;
+ }
+
+ public void setInsteadcnt(String insteadcnt) {
+ this.insteadcnt = insteadcnt;
+ }
}
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 a873c5c..453c91e 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/bean/ConfpeopleShowBean.java
@@ -1,17 +1,25 @@
package com.supwisdom.dlpay.conference.bean;
+import cn.afterturn.easypoi.excel.annotation.Excel;
+
public class ConfpeopleShowBean {
private String pid;
private Integer confid;
private String custid;
+ @Excel(name = "客户姓名")
private String custname;
private String confname;
private String conftype;
+ @Excel(name = "卡号")
private String cardno;
+ @Excel(name = "部门")
private String deptname;
private String confdate;
+ @Excel(name = "签到状态")
private String attstatus;
+ @Excel(name = "签到时间")
private String atttime;
+ @Excel(name = "备注")
private String remark;
private String atttype;
private String insteadcustid;
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 484394d..ee2458a 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfPeopleController.java
@@ -1,5 +1,9 @@
package com.supwisdom.dlpay.conference.controller;
+import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import cn.afterturn.easypoi.view.PoiBaseView;
import com.supwisdom.dlpay.api.bean.JsonResult;
import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
import com.supwisdom.dlpay.conference.bean.ConfpeopleReportBean;
@@ -14,6 +18,7 @@
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.bean.TDoordtlInfo;
import com.supwisdom.dlpay.mainservice.domain.TCustomer;
import com.supwisdom.dlpay.mainservice.service.WebInterfaceService;
import com.supwisdom.dlpay.ncmgr.domain.TNcDevice;
@@ -24,13 +29,14 @@
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 org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
@Controller
public class ConfPeopleController {
@@ -119,4 +125,46 @@
}
+ /**
+ * 获取需Excel导出流水数据
+ * @param request
+ * @param response
+ */
+ @ResponseBody
+ @RequestMapping(value = "/confpeople/exportexcel")
+ public void exportexcel(HttpServletRequest request, HttpServletResponse response,
+ @RequestParam(value = "confid", required = false) Integer confid,
+ @RequestParam(value = "attstatus", required = false) String attstatus,
+ @RequestParam(value = "atttype", required = false) String atttype,
+ @AuthenticationPrincipal TOperator operUser) {
+ Map map = new HashMap();
+ try {
+ /**
+ * 1. 查询数据
+ */
+ // final int max_field = 9;
+ // 保存表字段
+ List<ConfpeopleShowBean> bean = null;
+ bean = conferenceService.getConfpeopleExportList(confid, attstatus,atttype );
+ /**
+ * 2.设置表格属性: title:标题 sheetName:工作簿名 type:表格类型
+ */
+ if(bean.size()==0){
+ return ;
+ }
+ String confname=bean.get(0).getConfname();
+ ExportParams params = new ExportParams(confname+"参会人员名单", "人员报表", ExcelType.XSSF);
+// params.setFreezeCol(2);
+ map.put(NormalExcelConstants.DATA_LIST, bean );//设置值
+ map.put(NormalExcelConstants.PARAMS, params);//设置属性
+ map.put(NormalExcelConstants.CLASS, ConfpeopleShowBean.class);
+ map.put(NormalExcelConstants.FILE_NAME, confname+"参会人员名单");
+ PoiBaseView.render(map, request, response, NormalExcelConstants.EASYPOI_EXCEL_VIEW);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ map.put("result", "导出excel文件失败");
+ }
+ }
+
}
diff --git a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java
index b93540b..31d0d82 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConfReportController.java
@@ -1,5 +1,9 @@
package com.supwisdom.dlpay.conference.controller;
+import cn.afterturn.easypoi.entity.vo.NormalExcelConstants;
+import cn.afterturn.easypoi.excel.entity.ExportParams;
+import cn.afterturn.easypoi.excel.entity.enmus.ExcelType;
+import cn.afterturn.easypoi.view.PoiBaseView;
import com.supwisdom.dlpay.api.bean.JsonResult;
import com.supwisdom.dlpay.conference.bean.ConfReportShowBean;
import com.supwisdom.dlpay.conference.bean.ConferenceShowBean;
@@ -25,13 +29,14 @@
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
-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 org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
@Controller
public class ConfReportController {
@@ -176,4 +181,43 @@
return "confreport/print/attindex";
}
+ /**
+ * 获取需Excel导出流水数据
+ * @param request
+ * @param response
+ */
+ @ResponseBody
+ @RequestMapping(value = "/confreport/exportexcel")
+ public void exportexcel(HttpServletRequest request, HttpServletResponse response,
+ @RequestParam(value = "confname", required = false) String confname,
+ @RequestParam(value = "conftype", required = false) String conftype,
+ @RequestParam(value = "startdate", required = false) String startdate,
+ @RequestParam(value = "enddate", required = false) String enddate,
+ @AuthenticationPrincipal TOperator operUser) {
+ Map map = new HashMap();
+ try {
+ /**
+ * 1. 查询数据
+ */
+ // final int max_field = 9;
+ // 保存表字段
+ TOperator oper = (TOperator) operUser;
+ String deptcode = oper.getDeptcode();
+ String status = ConferenceConstant.CONFSTATUS_OVER;
+
+ PageResult<ConfReportShowBean> page=conferenceService.getConfReportPage(confname, conftype, deptcode, startdate,enddate, status, 1, 100);
+ ExportParams params = new ExportParams("会议报表", "人员报表", ExcelType.XSSF);
+// params.setFreezeCol(2);
+ map.put(NormalExcelConstants.DATA_LIST, page.getData() );//设置值
+ map.put(NormalExcelConstants.PARAMS, params);//设置属性
+ map.put(NormalExcelConstants.CLASS, ConfReportShowBean.class);
+ map.put(NormalExcelConstants.FILE_NAME, "会议报表");
+ PoiBaseView.render(map, request, response, NormalExcelConstants.EASYPOI_EXCEL_VIEW);
+
+ } catch (Exception e) {
+ e.printStackTrace();
+ map.put("result", "导出excel文件失败");
+ }
+ }
+
}
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 83f82c4..2d3585f 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/controller/ConferenceController.java
@@ -553,12 +553,14 @@
@RequestMapping("/conference/listpeopleforimport")
@ResponseBody
public PageResult<TCustomerImportBean> listConfpeople(
+ @RequestParam(value = "confid") Integer confid,
@RequestParam(value = "custname", required = false) String custname,
@RequestParam(value = "deptcode", required = false) String deptcode,
@AuthenticationPrincipal TOperator operUser) {
try {
CustomerSearchBean searchBean = new CustomerSearchBean();
searchBean.setCustname(custname);
+ searchBean.setConfid(confid);
searchBean.setDeptcode(deptcode);
PageResult<TCustomerImportBean> bean = webInterfaceService.getCustomerInfo(searchBean);
return bean;
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 2290aec..569e85b 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/dao/ConfPeopleDao.java
@@ -30,4 +30,6 @@
int countByConfidAndAttstatusNotIn(Integer confid, List<String> attstatus);
int countByConfidAndAttstatusNotInAndAtttypeNot(Integer confid, List<String> attstatus,String 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 7a024ce..4e914a0 100644
--- a/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java
+++ b/src/main/java/com/supwisdom/dlpay/conference/service/ConferenceService.java
@@ -96,6 +96,9 @@
PageResult<ConfpeopleShowBean> getPersonalConfDtl(String custid, String startdate,String enddate );
@Transactional(rollbackFor = Exception.class, readOnly = true)
+ List<ConfpeopleShowBean> getConfpeopleExportList(Integer confid, String attstatus,String atttype );
+
+ @Transactional(rollbackFor = Exception.class, readOnly = true)
PageResult<ConfpeopleReportBean> getConfPeopleReport(Integer confid, String searchkey,String attstatus, String deptcode,String attflag);
@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 f8c848a..f1e74cc 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
@@ -116,7 +116,11 @@
bean.setAttendtime(conf.getAttendtime().substring(0, 2) + ":" + conf.getAttendtime().substring(2));
if (ConferenceConstant.CONFTYPE_NOLIST.equals(conf.getConftype())) {
Integer totcnt = getNoListConfPeopleTotalCount(conf.getConfid());
- Integer actualcnt = nolistConfPeopleDao.countByConfid(conf.getConfid());
+ // Integer actualcnt = nolistConfPeopleDao.countByConfid(conf.getConfid());
+ Integer actualcnt=0;
+ List<ConfReportCountBean> cntbeans=getConfReportCount(conf.getConfid(),ConferenceConstant.CONFTYPE_NOLIST);
+ actualcnt = getConfReportDetails(bean, actualcnt, cntbeans);
+
Float rate = 0f;
if (0 != totcnt) {
rate = actualcnt * 100f / totcnt;
@@ -127,7 +131,11 @@
} else if (ConferenceConstant.CONFTYPE_LIST.equals(conf.getConftype())) {
Integer totcnt = getListConfPeopleTotalCount(conf.getConfid());
- Integer actualcnt = getConfPeopleActualCount(conf.getConfid());
+ // Integer actualcnt = getConfPeopleActualCount(conf.getConfid());
+ Integer actualcnt=0;
+ List<ConfReportCountBean> cntbeans=getConfReportCount(conf.getConfid(),ConferenceConstant.CONFTYPE_LIST);
+ actualcnt = getConfReportDetails(bean, actualcnt, cntbeans);
+
Float rate = 0f;
if (0 != totcnt) {
rate = actualcnt * 100f / totcnt;
@@ -144,6 +152,24 @@
return new PageResult<>(page.getTotalElements(), result);
}
+ private Integer getConfReportDetails(ConfReportShowBean bean, Integer actualcnt, List<ConfReportCountBean> cntbeans) {
+ for(ConfReportCountBean b:cntbeans){
+ if(ConferenceConstant.ATTENDSTATUS_CHECKED.equals(b.getAttstatus())||ConferenceConstant.ATTENDSTATUS_HANDCHECK.equals(b.getAttstatus())){
+ actualcnt+=b.getCnt();
+ bean.setCheckedcnt(b.getCnt()+"");
+ }else if(ConferenceConstant.ATTENDSTATUS_LATE.equals(b.getAttstatus())){
+ actualcnt+=b.getCnt();
+ bean.setLatecnt(b.getCnt()+"");
+ }else if(ConferenceConstant.ATTENDSTATUS_INSTEAD.equals(b.getAttstatus())){
+ actualcnt+=b.getCnt();
+ bean.setInsteadcnt(b.getCnt()+"");
+ }else if(ConferenceConstant.ATTENDSTATUS_UNCHECK.equals(b.getAttstatus())){
+ bean.setUncheckcnt(b.getCnt()+"");
+ }
+ }
+ return actualcnt;
+ }
+
@NotNull
private Page<TConference> getConferencePage(String confname, String conftype, String deptcode, String startdate, String enddate, String status, int pageNo, int pageSize) {
Sort.Order order1 = new Sort.Order(Sort.Direction.DESC, "confdate");
@@ -514,6 +540,24 @@
return list;
}
+ private List<ConfReportCountBean> getConfReportCount(Integer confid,String conftype) {
+ String table;
+ if(ConferenceConstant.CONFTYPE_NOLIST.equals(conftype)){
+ table="tb_nolist_conf_people";
+ }else{
+ table="tb_conf_people";
+ }
+ StringBuffer querySql = new StringBuffer("select cast(count (*) as int4) cnt , attstatus from "+table+
+ " where confid=:confid " +
+ " group by attstatus");
+
+ Query query = entityManager.createNativeQuery(querySql.toString());
+ query.setParameter("confid", confid);
+ query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(ConfReportCountBean.class));
+ List<ConfReportCountBean> list = query.getResultList();
+ return list;
+ }
+
@Override
public TNolistConfPeople saveNolistConfPeople(TNolistConfPeople people) {
return nolistConfPeopleDao.save(people);
@@ -635,8 +679,11 @@
countQuery.setParameter("attstatus", attstatus);
}
query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(ConfpeopleShowBean.class));
- query.setFirstResult((pageNo - 1) * pageSize);
- query.setMaxResults(pageSize); //分页显示
+ if(0!=pageSize){
+ query.setFirstResult((pageNo - 1) * pageSize);
+ query.setMaxResults(pageSize); //分页显示
+ }
+
List<ConfpeopleShowBean> list = query.getResultList();
BigInteger count = (BigInteger) countQuery.getSingleResult();
return new PageResult<>(count.longValue(), list);
@@ -679,6 +726,69 @@
}
@Override
+ public List<ConfpeopleShowBean> getConfpeopleExportList(Integer confid, String attstatus, String atttype) {
+ TConference conf = conferenceDao.findByConfid(confid);
+ if (null == conf) {
+ return new ArrayList<>(0);
+ }
+ String table = "tb_conf_people";
+
+ 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," +
+ "(case when b.attstatus='uncheck' then '未签到' " +
+ "when b.attstatus='checked' then '已签到' " +
+ "when b.attstatus='handcheck' then '手工签到' " +
+ "when b.attstatus= 'late' then '迟到' " +
+ "when b.attstatus='instead' then '代签' " +
+ "when b.attstatus='closed' then '关闭' " +
+ "else '未知' end ) attstatus," +
+ "(substr(b.atttime,1, 2)||':'||substr(b.atttime, 3, 2)) 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 and b.atttype!='temp' " +
+ "union " +
+ "select a.confid,a.confname,b.custname,b.cardno,b.remark as deptname," +
+ "(case when b.attstatus='uncheck' then '未签到' " +
+ "when b.attstatus='checked' then '已签到' " +
+ "when b.attstatus='handcheck' then '手工签到' " +
+ "when b.attstatus= 'late' then '迟到' " +
+ "when b.attstatus='instead' then '代签' " +
+ "when b.attstatus='closed' then '关闭' " +
+ "else '未知' end ) attstatus," +
+ "(substr(b.atttime,1, 2)||':'||substr(b.atttime, 3, 2)) atttime,b.custid,b.pid,'临时人员' as remark,'' as insteadcustid,a.conftype,'' as insteadcustname,b.atttype from " + table + " b " +
+ "left join tb_conference a on a.confid=b.confid " +
+ "where b.confid=:confid and b.atttype='temp' ");
+
+
+
+ if (!StringUtil.isEmpty(attstatus)) {
+ querySql.append("and b.attstatus=:attstatus ");
+ }
+ if (!StringUtil.isEmpty(atttype)) {
+ querySql.append("and b.atttype=:atttype ");
+ }
+ querySql.append(" order by cardno ");
+ Query query = entityManager.createNativeQuery(querySql.toString());
+
+ query.setParameter("confid", confid);
+ if (!StringUtil.isEmpty(attstatus)) {
+ query.setParameter("attstatus", attstatus);
+ }
+ if (!StringUtil.isEmpty(atttype)) {
+ query.setParameter("atttype", atttype);
+ }
+ query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(ConfpeopleShowBean.class));
+
+ List<ConfpeopleShowBean> list = query.getResultList();
+ return list;
+ }
+
+ @Override
public PageResult<ConfpeopleReportBean> getConfPeopleReport(Integer confid, String searchkey, String attstatus, String deptcode, String attflag) {
TConference conf = conferenceDao.findByConfid(confid);
if (null == conf) {
diff --git a/src/main/java/com/supwisdom/dlpay/customer/bean/CustomerSearchBean.java b/src/main/java/com/supwisdom/dlpay/customer/bean/CustomerSearchBean.java
index 9658f04..7481c6b 100644
--- a/src/main/java/com/supwisdom/dlpay/customer/bean/CustomerSearchBean.java
+++ b/src/main/java/com/supwisdom/dlpay/customer/bean/CustomerSearchBean.java
@@ -7,6 +7,7 @@
private String checkstatus;
private String deptcode;
private Integer custtypeid;
+ private Integer confid;
public String getCustname() {
return custname;
@@ -39,4 +40,12 @@
public void setCusttypeid(Integer custtypeid) {
this.custtypeid = custtypeid;
}
+
+ public Integer getConfid() {
+ return confid;
+ }
+
+ public void setConfid(Integer confid) {
+ this.confid = confid;
+ }
}
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 4815d9d..56b2346 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
@@ -171,7 +171,8 @@
String sql = "select a.custid,a.custname,c.deptname,b.cardno from T_Customer a " +
"left join t_card b on a.custid = b.custid " +
"left join tb_dept c on a.deptcode=c.deptcode" +
- " where a.status='1' and b.status='normal' and b.transtatus='normal' ";
+ " where a.status='1' and b.status='normal' and b.transtatus='normal' "+
+ " and a.custid not in (select custid from tb_conf_people where confid=:confid)";
if (!StringUtil.isEmpty(perName)){
sql += " and a.custname like :perName ";
@@ -186,6 +187,8 @@
if (!StringUtil.isEmpty(perName)){
query.setParameter("perName", "%"+perName+"%");
}
+ query.setParameter("confid", param.getConfid());
+
query.setFirstResult((param.getPageNo() - 1) * param.getPageSize());
query.setMaxResults(param.getPageSize()); //分页显示
query.unwrap(NativeQueryImpl.class).setResultTransformer(Transformers.aliasToBean(TCustomerImportBean.class));
diff --git a/src/main/resources/templates/apph5/conference/confpeoplebind.html b/src/main/resources/templates/apph5/conference/confpeoplebind.html
index 1d427f3..7c06909 100644
--- a/src/main/resources/templates/apph5/conference/confpeoplebind.html
+++ b/src/main/resources/templates/apph5/conference/confpeoplebind.html
@@ -33,7 +33,6 @@
var form = layui.form;
var table = layui.table;
var deptcode=$("#conferenceReview-deptcode").val();
- console.log(deptcode)
var renderDetailTable = function (obj) {
table.render({
@@ -51,17 +50,20 @@
]
});
}
+ var confid = $("#confpeoplebind-confid").val();
- renderDetailTable({ deptcode:deptcode});
+ renderDetailTable({ deptcode:deptcode,confid:confid});
// 搜索按钮点击事件
$('#btn-search-confpeoplebind-form').click(function () {
var deptcode = $("#search-confpeoplebind-form-deptcode").val();
var custname = $("#search-confpeoplebind-form-searchkey").val();
+ var confid = $("#confpeoplebind-confid").val();
table.reload('confpeoplebind-form-table', {
where: {
deptcode: deptcode,
- custname: custname
+ custname: custname,
+ confid:confid
}
});
});
diff --git a/src/main/resources/templates/conference/confpeoplebind.html b/src/main/resources/templates/conference/confpeoplebind.html
index 81edd53..4ddfd42 100644
--- a/src/main/resources/templates/conference/confpeoplebind.html
+++ b/src/main/resources/templates/conference/confpeoplebind.html
@@ -89,31 +89,37 @@
}
});
- // 渲染表格
- table.render({
- elem: '#confpeoplebind-form-table',
- url: '[[@{/conference/listpeopleforimport}]]',
- size: 'sm',
- height: 350,
- page: false,
- cols: [
- [
- {type: 'checkbox', style: "#confpeoplebind-form-css", fixed: 'left'},
- {field: 'custname', title: '姓名', align: 'center'},
- {field: 'cardno', title: '卡号', align: 'center'},
- {field: 'deptname', title: '部门', align: 'center'}
+ var renderDetailTable = function (obj) {
+ table.render({
+ elem: '#confpeoplebind-form-table',
+ url: '[[@{/conference/listpeopleforimport}]]',
+ size: 'sm',
+ where:obj,
+ height: 350,
+ page: false,
+ cols: [
+ [
+ {type: 'checkbox', style: "#confpeoplebind-form-css", fixed: 'left'},
+ {field: 'custname', title: '姓名', align: 'center'},
+ {field: 'cardno', title: '卡号', align: 'center'},
+ {field: 'deptname', title: '部门', align: 'center'}
+ ]
]
- ]
- });
+ });
+ }
+ var confid = $("#confpeoplebind-confid").val();
+ renderDetailTable({confid:confid});
// 搜索按钮点击事件
$('#btn-search-confpeoplebind-form').click(function () {
- var deptcode = $("#search-confpeoplebind-form-deptcode").val();
- var custname = $("#search-confpeoplebind-form-searchkey").val();
+ let deptcode = $("#search-confpeoplebind-form-deptcode").val();
+ let custname = $("#search-confpeoplebind-form-searchkey").val();
+ var confid = $("#confpeoplebind-confid").val();
table.reload('confpeoplebind-form-table', {
where: {
deptcode: deptcode,
- custname: custname
+ custname: custname,
+ confid:confid
}
});
});
diff --git a/src/main/resources/templates/confpeople/index.html b/src/main/resources/templates/confpeople/index.html
index da17eb2..89e1c21 100644
--- a/src/main/resources/templates/confpeople/index.html
+++ b/src/main/resources/templates/confpeople/index.html
@@ -32,6 +32,9 @@
<button id="btn-search-confpeople" class="layui-btn icon-btn" data-type="search"><i class="layui-icon"></i>搜索
</button>
+ <button id="btn-export-confpeople" class="layui-btn icon-btn" data-type="export"><i class="layui-icon"></i>导出
+ </button>
+
</div>
<table class="layui-table" id="confpeopleTable" lay-filter="confpeopleTable-filter"></table>
</div>
@@ -123,6 +126,16 @@
});
+
+ $('#btn-export-confpeople').click(function () {
+ var confid = $("#search-confpeople-confid").val();
+ var attstatus = $("#search-confpeople-attstatus").val();
+ var atttype= $("#search-confpeople-atttype").val();
+ var url =encodeURI( "[[@{/confpeople/exportexcel?confid=}]]"+confid+"&attstatus="
+ +attstatus+"&atttype="+atttype)
+ window.open(url);
+
+ });
let showModel = function (data) {
let title = '编辑'
admin.putTempData('t_people', data);
diff --git a/src/main/resources/templates/confreport/index.html b/src/main/resources/templates/confreport/index.html
index 8470a3c..dd67a4c 100644
--- a/src/main/resources/templates/confreport/index.html
+++ b/src/main/resources/templates/confreport/index.html
@@ -49,6 +49,9 @@
<button id="btn-search-confreport" class="layui-btn icon-btn" data-type="search"><i
class="layui-icon"></i>搜索
</button>
+ <button id="btn-search-confreportexport" class="layui-btn icon-btn" ><i
+ class="layui-icon"></i>导出
+ </button>
<button id="btn-search-confreportprint" class="layui-btn icon-btn" data-type="search"><i
class="layui-icon"></i>打印
</button>
@@ -98,11 +101,17 @@
page: true,
cols: [
[
- {field: 'confname', title: '会议名称', align: 'center', fixed: 'left'},
+ {field: 'confname', width: 200,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: 'attendtime', width: 100, title: '签到时间', align: 'center'},
+ {field: 'totcnt', width: 100, title: '名单人数', align: 'center'},
+ {field: 'actualcnt', width: 100, title: '参会人数', align: 'center'},
+ {field: 'checkedcnt', width: 100, title: '准时签到人数', align: 'center'},
+ {field: 'uncheckcnt', width: 100, title: '未到人数', align: 'center'},
+ {field: 'latecnt', width: 100, title: '迟到人数', align: 'center'},
+ {field: 'insteadcnt', width: 100, title: '代签人数', align: 'center'},
+ {field: 'attendrate', width: 100, title: '签到率', align: 'center'},
{
field: 'conftype',
title: '会议类型',
@@ -144,6 +153,15 @@
page: {curr: 1}
});
});
+ $('#btn-search-confreportexport').click(function () {
+ var conftype = $("#search-confreport-conftype").val();
+ var confname = $("#search-confreport-confname").val();
+ var startdate = $("#search-confreport-startdate").val();
+ var enddate = $("#search-confreport-enddate").val();
+ var url =encodeURI( "[[@{/confreport/exportexcel?conftype=}]]"+conftype+"&confname="
+ +confname+"&startdate="+startdate+"&enddate="+enddate)
+ window.open(url);
+ });
var LODOP;
$('#btn-search-confreportprint').click(function () {
var conftype = $("#search-confreport-conftype").val();
@@ -157,7 +175,7 @@
LODOP.PRINT_INIT("会议报表");
LODOP.SET_PRINT_PAGESIZE(2, 0, 0,"A4");
LODOP.ADD_PRINT_URL(30, 20, "95%", "90%", encodeURI(url));
- LODOP.ADD_PRINT_HTM("95%", "48%", 150, 50, "<font style='font-size:12px'><span tdata='pageNO'>##</span>/<span tdata='pageCount'> ##</span></font>");
+ LODOP.ADD_PRINT_HTM("95%", "48%", 100, 50, "<font style='font-size:12px'><span tdata='pageNO'>##</span>/<span tdata='pageCount'> ##</span></font>");
LODOP.SET_PRINT_STYLEA(0, "ItemType", 1);
LODOP.SET_PRINT_STYLEA(0, "HOrient", 3);
LODOP.SET_PRINT_STYLEA(0, "VOrient", 3);
diff --git a/src/main/resources/templates/confreport/print/printindex.html b/src/main/resources/templates/confreport/print/printindex.html
index 1483b94..e2d7473 100644
--- a/src/main/resources/templates/confreport/print/printindex.html
+++ b/src/main/resources/templates/confreport/print/printindex.html
@@ -23,6 +23,10 @@
<th style="text-align: center;">会议日期</th>
<th style="text-align: center;">名单人数</th>
<th style="text-align: center;">参会人数</th>
+ <th style="text-align: center;">准时签到人数</th>
+ <th style="text-align: center;">未到人数</th>
+ <th style="text-align: center;">迟到人数</th>
+ <th style="text-align: center;">代签人数</th>
<th style="text-align: center;">参会率</th>
</tr>
</thead>
@@ -37,7 +41,12 @@
<td th:text="${data.confdate}"></td>
<td th:text="${data.totcnt}"></td>
<td th:text="${data.actualcnt}"></td>
+ <td th:text="${data.checkedcnt}"></td>
+ <td th:text="${data.uncheckcnt}"></td>
+ <td th:text="${data.latecnt}"></td>
+ <td th:text="${data.insteadcnt}"></td>
<td th:text="${data.attendrate}"></td>
+
</tr>
</div>