Commit ccadb990 by 丁伟

1、报名系统2.0版本修改

parent d5476d07
...@@ -116,8 +116,8 @@ public class EmailSendController extends BaseController { ...@@ -116,8 +116,8 @@ public class EmailSendController extends BaseController {
Mail mail = null; Mail mail = null;
if (emailInfo != null) { if (emailInfo != null) {
mail = new Mail(); mail = new Mail();
mail.setHost("smtp.exmail.qq.com"); mail.setHost("mail.ccpit.org");
mail.setProtocol("smtp"); mail.setProtocol("pop");
StringBuilder sb = new StringBuilder("<div class='emailbody'>"); StringBuilder sb = new StringBuilder("<div class='emailbody'>");
sb.append("<div>尊敬的考生:</div>"); sb.append("<div>尊敬的考生:</div>");
......
...@@ -386,6 +386,7 @@ public class IndexController extends BaseController { ...@@ -386,6 +386,7 @@ public class IndexController extends BaseController {
subjectInfo.setPhaseName(phase.getName()); subjectInfo.setPhaseName(phase.getName());
subjectInfo.setInvoiceInfo("发票内容为相应考试的考试费"); subjectInfo.setInvoiceInfo("发票内容为相应考试的考试费");
RegisterInfo registerInfo = registerService.queryRegisterById(registerInfo_id); RegisterInfo registerInfo = registerService.queryRegisterById(registerInfo_id);
subjectInfo.setRegisterName(registerInfo.getName());
boolean success = subjectInfoService.addSubjectInfo(subjectInfo); boolean success = subjectInfoService.addSubjectInfo(subjectInfo);
if (success){ if (success){
request.getSession().setAttribute("registerInfo",registerInfo); request.getSession().setAttribute("registerInfo",registerInfo);
......
...@@ -189,9 +189,29 @@ public class RegisterController extends BaseController { ...@@ -189,9 +189,29 @@ public class RegisterController extends BaseController {
pageRequest.setOrderBy("submitTime desc "); pageRequest.setOrderBy("submitTime desc ");
StringBuffer hql = new StringBuffer(sb.toString()); StringBuffer hql = new StringBuffer(sb.toString());
Page<RegisterInfo> infoPage = registerService.queryRegisterInfos(pageRequest, hql.toString()); Page<RegisterInfo> infoPage = registerService.queryRegisterInfos(pageRequest, hql.toString());
// List<RegisterInfo> reg_infos = registerService.query(subject,phase,name,status); return infoPage;
// infoPage.getRows().addAll(reg_infos); }
// infoPage.setTotal(infoPage.getTotal()+reg_infos.size());
@RequestMapping("/queryAllSubjectInfo")
public Object queryAllSubjectInfo(HttpServletRequest request,String name,String status,String subject,Long phase) {
PageRequest pageRequest = getPage(request);
StringBuilder sb = new StringBuilder("from SubjectInfo where 1=1 ");
Object p = request.getParameter("phase");
if (StringUtils.isNotBlank(name)){
sb.append(" and registerName like '%"+name+"%'");
}
if (StringUtils.isNotBlank(status)){
sb.append(" and registerStatus='"+status+"'");
}
if (StringUtils.isNotBlank(subject)){
sb.append(" and subject = "+subject);
}
if (phase!=null &&phase!=0){
sb.append(" and phaseId = '"+phase+"'");
}
pageRequest.setOrderBy("submitTime desc ");
StringBuffer hql = new StringBuffer(sb.toString());
Page<SubjectInfo> infoPage = subjectInfoService.querySubjectInfos(pageRequest, hql.toString());
return infoPage; return infoPage;
} }
......
...@@ -23,6 +23,10 @@ public class SubjectInfo implements Serializable { ...@@ -23,6 +23,10 @@ public class SubjectInfo implements Serializable {
private long id; private long id;
/** /**
* 注册用户姓名
*/
private String registerName;
/**
* 注册用户信息id * 注册用户信息id
*/ */
private long registerInfo_id; private long registerInfo_id;
...@@ -300,4 +304,12 @@ public class SubjectInfo implements Serializable { ...@@ -300,4 +304,12 @@ public class SubjectInfo implements Serializable {
public void setInvoiceInfo(String invoiceInfo) { public void setInvoiceInfo(String invoiceInfo) {
this.invoiceInfo = invoiceInfo; this.invoiceInfo = invoiceInfo;
} }
public String getRegisterName() {
return registerName;
}
public void setRegisterName(String registerName) {
this.registerName = registerName;
}
} }
...@@ -5,7 +5,7 @@ jdbc.driverClassName=com.mysql.jdbc.Driver ...@@ -5,7 +5,7 @@ jdbc.driverClassName=com.mysql.jdbc.Driver
#jdbc.user=root #jdbc.user=root
#jdbc.pass=root #jdbc.pass=root
# 开发环境 # 开发环境
jdbc.url=jdbc:mysql://localhost:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8 jdbc.url=jdbc:mysql://localhost:3306/registration_0611?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.user=ccpit jdbc.user=ccpit
jdbc.pass=ccpit1516 jdbc.pass=ccpit1516
......
# jdbc.X # jdbc.X
jdbc.driverClassName=com.mysql.jdbc.Driver jdbc.driverClassName=com.mysql.jdbc.Driver
# 生产环境 docker 环境下一定要注意 将localhost 换成mysql # 生产环境 docker 环境下一定要注意 将localhost 换成mysql
jdbc.url=jdbc:mysql://mysql:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8 #jdbc.url=jdbc:mysql://mysql:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.user=root #jdbc.user=root
jdbc.pass=root #jdbc.pass=root
# 开发环境 # 开发环境
#jdbc.url=jdbc:mysql://localhost:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8 jdbc.url=jdbc:mysql://localhost:3306/registration_0611?createDatabaseIfNotExist=true&characterEncoding=utf-8
#jdbc.user=ccpit jdbc.user=ccpit
#jdbc.pass=ccpit1516 jdbc.pass=ccpit1516
# hibernate.X # hibernate.X
hibernate.dialect=org.hibernate.dialect.MySQL5Dialect hibernate.dialect=org.hibernate.dialect.MySQL5Dialect
......
/* create by dingwei 20210617 start */
set character set utf8;
update reg_subjectinfo set registerName = '邓默' where registerInfo_id = 12983;
update reg_subjectinfo set registerName = '丁伟' where registerInfo_id = 12979;
update reg_subjectinfo set registerName = '丁伟' where registerInfo_id = 12979;
/* create by dingwei 20210617 end */
/* create by dingwei 20210611 start */
delete from reg_subjectinfo where registerInfo_id = 12978;
delete from reg_subjectinfo where registerInfo_id = 12977;
delete from reg_subjectinfo where registerInfo_id = 12976;
delete from reg_subjectinfo where registerInfo_id = 12975;
delete from reg_subjectinfo where registerInfo_id = 12969;
delete from reg_subjectinfo where registerInfo_id = 12974;
delete from reg_subjectinfo where registerInfo_id = 12971;
delete from reg_subjectinfo where registerInfo_id = 12970;
delete from reg_subjectinfo where registerInfo_id = 12968;
delete from reg_subjectinfo where registerInfo_id = 12967;
delete from reg_subjectinfo where registerInfo_id = 12964;
delete from reg_subjectinfo where registerInfo_id = 12956;
delete from reg_subjectinfo where registerInfo_id = 12955;
delete from reg_subjectinfo where registerInfo_id = 12954;
delete from reg_subjectinfo where registerInfo_id = 12953;
/* create by dingwei 20210611 end */
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
<div id="toolbar"> <div id="toolbar">
<security:url uri="/admin/business/registerManage/add"><a href="#" class="easyui-linkbutton" iconCls="icon-edit_add" plain="true" onclick="openAddWin()"><span >新增</span></a></security:url> <security:url uri="/admin/business/registerManage/add"><a href="#" class="easyui-linkbutton" iconCls="icon-edit_add" plain="true" onclick="openAddWin()"><span >新增</span></a></security:url>
<security:url uri="/admin/business/registerManage/update"><a href="#" class="easyui-linkbutton" iconCls="icon-pencil" plain="true" onclick="openEditWin()"><span >修改</span></a></security:url> <security:url uri="/admin/business/registerManage/update"><a href="#" class="easyui-linkbutton" iconCls="icon-pencil" plain="true" onclick="openEditWin()"><span >修改</span></a></security:url>
<security:url uri="/admin/business/registerManage/delete"><a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteNews()"><span >删除</span></a></security:url> <%-- <security:url uri="/admin/business/registerManage/delete"><a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true" onclick="deleteNews()"><span >删除</span></a></security:url>--%>
<a href="#" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="active()"><span >启用</span></a> <a href="#" class="easyui-linkbutton" iconCls="icon-ok" plain="true" onclick="active()"><span >启用</span></a>
<a href="#" class="easyui-linkbutton" iconCls="icon-no" plain="true" onclick="inActive()"><span >关闭</span></a> <a href="#" class="easyui-linkbutton" iconCls="icon-no" plain="true" onclick="inActive()"><span >关闭</span></a>
</div> </div>
......
...@@ -91,21 +91,19 @@ ...@@ -91,21 +91,19 @@
<body style="overflow:hidden"> <body style="overflow:hidden">
<div class="easyui-panel" id="queryDiv" title="报名查询" collapsed="false" collapsible="false"> <div class="easyui-panel" id="queryDiv" title="报名查询" collapsed="false" collapsible="false">
<form method="post" id="queryFormId" name="queryForm"> <form method="post" id="queryFormId" name="queryForm">
<table> <table border="0">
<tr> <tr>
<td width="10%" align="right"><span>姓名:</span></td> <td width="5%" align="right"><span>姓名:</span></td>
<td align="left"><input id="name00Id" name='name' title="50字以内" class="easyui-textbox" /></td> <td width="7%"align="left"><input id="name00Id" name='name' title="50字以内" class="easyui-textbox" /></td>
<td width="10%" align="right"><span>科目:</span></td> <td width="5%"align="right"><span>状态:</span></td>
<td> <td width="7%"><input id="registerStatus00Id" name="registerStatus" type="text" class="easyui-combobox" /></td>
<td width="7%"align="right"><span>报名期数:</span></td>
<td width="7%"><input id="phaseId" name="phase" class="easyui-combobox" /></td>
<td width="5%" align="right"><span>科目:</span></td>
<td width="30%">
<input id="subject00Id" name="subject" class="easyui-combobox" /> <input id="subject00Id" name="subject" class="easyui-combobox" />
</td> </td>
</tr> <td align="center" width="20%">
<tr>
<td align="right"><span>状态:</span></td>
<td><input id="registerStatus00Id" name="registerStatus" type="text" class="easyui-combobox" /></td>
<td align="right"><span>报名期数:</span></td>
<td><input id="phaseId" name="phase" class="easyui-combobox" /></td>
<td align="center">
<a id="saveButtonId01" href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="queryData()">查询</a> <a id="saveButtonId01" href="#" class="easyui-linkbutton" iconCls="icon-search" onclick="queryData()">查询</a>
<a id="saveButtonId02" href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="clearQueryForm()">清空</a> <a id="saveButtonId02" href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="clearQueryForm()">清空</a>
</td> </td>
......
...@@ -151,7 +151,7 @@ function initDataTable(){ ...@@ -151,7 +151,7 @@ function initDataTable(){
queryParams : { queryParams : {
phase:activePhase phase:activePhase
}, },
title : "报名用户列表", title : "用户首次注册报名科目列表",
url : '/admin/business/registerManage/queryAllRegisterInfo', url : '/admin/business/registerManage/queryAllRegisterInfo',
columns : [ [ { columns : [ [ {
field : 'ck', field : 'ck',
...@@ -211,12 +211,20 @@ function initDataTable(){ ...@@ -211,12 +211,20 @@ function initDataTable(){
onLoadSuccess : function(data) { // 加载成功之后执行 onLoadSuccess : function(data) { // 加载成功之后执行
} }
}); });
subjectTableById(0);
} }
function subjectTableById(id){ function subjectTableById(id){
var url = "";
if(0 == id){
url = '/admin/business/registerManage/queryAllSubjectInfo';
}
if(0 != id){
url = '/admin/business/registerManage/queryAllSubject?id='+ id;
}
var h = document.documentElement.clientHeight; var h = document.documentElement.clientHeight;
$("#subjectTable").datagrid({ $("#subjectTable").datagrid({
height: (h - divHeight) / 3 + 30, height: (h - divHeight) / 3*1+6,
nowrap : true, nowrap : true,
striped : true, striped : true,
pagination : true, pagination : true,
...@@ -225,21 +233,29 @@ function subjectTableById(id){ ...@@ -225,21 +233,29 @@ function subjectTableById(id){
singleSelect : true, singleSelect : true,
autoRowHeight : false, autoRowHeight : false,
fitColumns : true, fitColumns : true,
title : "用户报名科目列表", queryParams : {
url : '/admin/business/registerManage/queryAllSubject?id='+ id, phase:activePhase
},
title : "用户再次报名科目列表",
url : url,
columns : [ [ { columns : [ [ {
field : 'ck', field : 'ck',
title : 'id', title : 'id',
width : 15, width : 15,
checkbox : true checkbox : true
}, { }, {
field : 'registerName',
title : '姓名',
align : 'center',
width : 20
},{
field : 'subject', field : 'subject',
title : '报名科目', title : '报名科目',
align : 'center', align : 'center',
formatter:function(val,row){ formatter:function(val,row){
return subjectArray[val]; return subjectArray[val];
}, },
width : 30 width : 40
}, { }, {
field : 'registerStatus', field : 'registerStatus',
title : '报名状态', title : '报名状态',
...@@ -247,21 +263,29 @@ function subjectTableById(id){ ...@@ -247,21 +263,29 @@ function subjectTableById(id){
formatter:function(val,row){ formatter:function(val,row){
return statusArray[val]; return statusArray[val];
}, },
width : 30 width : 20
},{ },
field : 'appreciationTaxType', {
title : '发票类型', field : 'phaseName',
title : '报名期数',
align : 'center', align : 'center',
width : 30, width : 20
formatter:function (val,row) { },
if (1 == val){ // {
return "增值税普通发票"; // field : 'appreciationTaxType',
} // title : '发票类型',
if (2 == val){ // align : 'center',
return "增值税专用发票"; // width : 30,
} // formatter:function (val,row) {
} // if (1 == val){
}, { // return "增值税普通发票";
// }
// if (2 == val){
// return "增值税专用发票";
// }
// }
// },
{
field : 'taxIssue', field : 'taxIssue',
title : '发票开具时间', title : '发票开具时间',
align : 'center', align : 'center',
...@@ -306,8 +330,11 @@ function status(val,row){ ...@@ -306,8 +330,11 @@ function status(val,row){
* 初始化各输入框宽度 * 初始化各输入框宽度
*/ */
function initInputWidth(){ function initInputWidth(){
$("#name00Id").attr("style", "width:" + fixShortWidth()/2 + "px");
$("#standby1Id").attr("style", "width:" + fixShortWidth() + "px"); $("#standby1Id").attr("style", "width:" + fixShortWidth() + "px");
$("#name00Id").attr("style", "width:" + fixShortWidth() + "px");
$("#nameId").attr("style", "width:" + fixShortWidth() + "px"); $("#nameId").attr("style", "width:" + fixShortWidth() + "px");
$("#name_enId").attr("style", "width:" + fixShortWidth() + "px"); $("#name_enId").attr("style", "width:" + fixShortWidth() + "px");
$("#name_en_lastId").attr("style", "width:" + fixShortWidth() + "px"); $("#name_en_lastId").attr("style", "width:" + fixShortWidth() + "px");
...@@ -454,7 +481,7 @@ function initInputWidth(){ ...@@ -454,7 +481,7 @@ function initInputWidth(){
panelHeight:'auto', panelHeight:'auto',
}); });
$("#registerStatus00Id").combobox({ $("#registerStatus00Id").combobox({
width : fixShortWidth()+4, width : (fixShortWidth()+4)/2,
data:JD.statusJson, data:JD.statusJson,
valueField : 'dataNameId', valueField : 'dataNameId',
textField : 'dataName', textField : 'dataName',
...@@ -465,7 +492,7 @@ function initInputWidth(){ ...@@ -465,7 +492,7 @@ function initInputWidth(){
valueField:'id', valueField:'id',
textField:'name', textField:'name',
panelHeight:'auto', panelHeight:'auto',
width : fixShortWidth()+4, width : (fixShortWidth()+4)/2
}) })
$("#subjectId").combobox({ $("#subjectId").combobox({
data:JD.subjectJson, data:JD.subjectJson,
...@@ -479,7 +506,7 @@ function initInputWidth(){ ...@@ -479,7 +506,7 @@ function initInputWidth(){
valueField : 'dataNameId', valueField : 'dataNameId',
textField : 'dataName', textField : 'dataName',
panelHeight:'auto', panelHeight:'auto',
width : fixShortWidth()+4, width : (fixShortWidth()+4)
}) })
$("#emailSenderId").combobox({ $("#emailSenderId").combobox({
...@@ -497,6 +524,7 @@ function queryData() { ...@@ -497,6 +524,7 @@ function queryData() {
var phase = $("#phaseId").combobox('getValue'); var phase = $("#phaseId").combobox('getValue');
var subject = $("#subject00Id").combobox('getValue'); var subject = $("#subject00Id").combobox('getValue');
var queryParams = null; var queryParams = null;
queryData2(name,status,phase,subject);
$("#registersTable").datagrid({ $("#registersTable").datagrid({
queryParams : { queryParams : {
name : name, name : name,
...@@ -505,7 +533,19 @@ function queryData() { ...@@ -505,7 +533,19 @@ function queryData() {
subject:subject subject:subject
} }
}); });
} }
function queryData2(name,status,phase,subject){
$("#subjectTable").datagrid({
queryParams : {
name : name,
phase:phase,
status:status,
subject:subject
}
});
}
//导出为excel //导出为excel
function exportExl(){ function exportExl(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment