Commit ccadb990 by 丁伟

1、报名系统2.0版本修改

parent d5476d07
......@@ -116,8 +116,8 @@ public class EmailSendController extends BaseController {
Mail mail = null;
if (emailInfo != null) {
mail = new Mail();
mail.setHost("smtp.exmail.qq.com");
mail.setProtocol("smtp");
mail.setHost("mail.ccpit.org");
mail.setProtocol("pop");
StringBuilder sb = new StringBuilder("<div class='emailbody'>");
sb.append("<div>尊敬的考生:</div>");
......
......@@ -386,6 +386,7 @@ public class IndexController extends BaseController {
subjectInfo.setPhaseName(phase.getName());
subjectInfo.setInvoiceInfo("发票内容为相应考试的考试费");
RegisterInfo registerInfo = registerService.queryRegisterById(registerInfo_id);
subjectInfo.setRegisterName(registerInfo.getName());
boolean success = subjectInfoService.addSubjectInfo(subjectInfo);
if (success){
request.getSession().setAttribute("registerInfo",registerInfo);
......
......@@ -189,9 +189,29 @@ public class RegisterController extends BaseController {
pageRequest.setOrderBy("submitTime desc ");
StringBuffer hql = new StringBuffer(sb.toString());
Page<RegisterInfo> infoPage = registerService.queryRegisterInfos(pageRequest, hql.toString());
// List<RegisterInfo> reg_infos = registerService.query(subject,phase,name,status);
// infoPage.getRows().addAll(reg_infos);
// infoPage.setTotal(infoPage.getTotal()+reg_infos.size());
return infoPage;
}
@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;
}
......
......@@ -23,6 +23,10 @@ public class SubjectInfo implements Serializable {
private long id;
/**
* 注册用户姓名
*/
private String registerName;
/**
* 注册用户信息id
*/
private long registerInfo_id;
......@@ -300,4 +304,12 @@ public class SubjectInfo implements Serializable {
public void setInvoiceInfo(String 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
#jdbc.user=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.pass=ccpit1516
......
# jdbc.X
jdbc.driverClassName=com.mysql.jdbc.Driver
# 生产环境 docker 环境下一定要注意 将localhost 换成mysql
jdbc.url=jdbc:mysql://mysql:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.user=root
jdbc.pass=root
#jdbc.url=jdbc:mysql://mysql:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
#jdbc.user=root
#jdbc.pass=root
# 开发环境
#jdbc.url=jdbc:mysql://localhost:3306/registration?createDatabaseIfNotExist=true&characterEncoding=utf-8
#jdbc.user=ccpit
#jdbc.pass=ccpit1516
jdbc.url=jdbc:mysql://localhost:3306/registration_0611?createDatabaseIfNotExist=true&characterEncoding=utf-8
jdbc.user=ccpit
jdbc.pass=ccpit1516
# hibernate.X
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 @@
<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/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-no" plain="true" onclick="inActive()"><span >关闭</span></a>
</div>
......
......@@ -91,25 +91,23 @@
<body style="overflow:hidden">
<div class="easyui-panel" id="queryDiv" title="报名查询" collapsed="false" collapsible="false">
<form method="post" id="queryFormId" name="queryForm">
<table>
<table border="0">
<tr>
<td width="10%" align="right"><span>姓名:</span></td>
<td align="left"><input id="name00Id" name='name' title="50字以内" class="easyui-textbox" /></td>
<td width="10%" align="right"><span>科目:</span></td>
<td>
<input id="subject00Id" name="subject" class="easyui-combobox" />
</td>
<td width="5%" align="right"><span>姓名:</span></td>
<td width="7%"align="left"><input id="name00Id" name='name' title="50字以内" class="easyui-textbox" /></td>
<td width="5%"align="right"><span>状态:</span></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" />
</td>
<td align="center" width="20%">
<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>
</td>
</tr>
<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="saveButtonId02" href="#" class="easyui-linkbutton" iconCls="icon-undo" onclick="clearQueryForm()">清空</a>
</td>
</tr>
</table>
<%-- <div class="quick-export">--%>
<%-- <div class="lb">快速导出已缴费名单</div>--%>
......
......@@ -151,7 +151,7 @@ function initDataTable(){
queryParams : {
phase:activePhase
},
title : "报名用户列表",
title : "用户首次注册报名科目列表",
url : '/admin/business/registerManage/queryAllRegisterInfo',
columns : [ [ {
field : 'ck',
......@@ -211,12 +211,20 @@ function initDataTable(){
onLoadSuccess : function(data) { // 加载成功之后执行
}
});
subjectTableById(0);
}
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;
$("#subjectTable").datagrid({
height: (h - divHeight) / 3 + 30,
height: (h - divHeight) / 3*1+6,
nowrap : true,
striped : true,
pagination : true,
......@@ -225,21 +233,29 @@ function subjectTableById(id){
singleSelect : true,
autoRowHeight : false,
fitColumns : true,
title : "用户报名科目列表",
url : '/admin/business/registerManage/queryAllSubject?id='+ id,
queryParams : {
phase:activePhase
},
title : "用户再次报名科目列表",
url : url,
columns : [ [ {
field : 'ck',
title : 'id',
width : 15,
checkbox : true
}, {
field : 'registerName',
title : '姓名',
align : 'center',
width : 20
},{
field : 'subject',
title : '报名科目',
align : 'center',
formatter:function(val,row){
return subjectArray[val];
},
width : 30
width : 40
}, {
field : 'registerStatus',
title : '报名状态',
......@@ -247,21 +263,29 @@ function subjectTableById(id){
formatter:function(val,row){
return statusArray[val];
},
width : 30
},{
field : 'appreciationTaxType',
title : '发票类型',
align : 'center',
width : 30,
formatter:function (val,row) {
if (1 == val){
return "增值税普通发票";
}
if (2 == val){
return "增值税专用发票";
}
}
}, {
width : 20
},
{
field : 'phaseName',
title : '报名期数',
align : 'center',
width : 20
},
// {
// field : 'appreciationTaxType',
// title : '发票类型',
// align : 'center',
// width : 30,
// formatter:function (val,row) {
// if (1 == val){
// return "增值税普通发票";
// }
// if (2 == val){
// return "增值税专用发票";
// }
// }
// },
{
field : 'taxIssue',
title : '发票开具时间',
align : 'center',
......@@ -306,8 +330,11 @@ function status(val,row){
* 初始化各输入框宽度
*/
function initInputWidth(){
$("#name00Id").attr("style", "width:" + fixShortWidth()/2 + "px");
$("#standby1Id").attr("style", "width:" + fixShortWidth() + "px");
$("#name00Id").attr("style", "width:" + fixShortWidth() + "px");
$("#nameId").attr("style", "width:" + fixShortWidth() + "px");
$("#name_enId").attr("style", "width:" + fixShortWidth() + "px");
$("#name_en_lastId").attr("style", "width:" + fixShortWidth() + "px");
......@@ -454,7 +481,7 @@ function initInputWidth(){
panelHeight:'auto',
});
$("#registerStatus00Id").combobox({
width : fixShortWidth()+4,
width : (fixShortWidth()+4)/2,
data:JD.statusJson,
valueField : 'dataNameId',
textField : 'dataName',
......@@ -465,7 +492,7 @@ function initInputWidth(){
valueField:'id',
textField:'name',
panelHeight:'auto',
width : fixShortWidth()+4,
width : (fixShortWidth()+4)/2
})
$("#subjectId").combobox({
data:JD.subjectJson,
......@@ -479,7 +506,7 @@ function initInputWidth(){
valueField : 'dataNameId',
textField : 'dataName',
panelHeight:'auto',
width : fixShortWidth()+4,
width : (fixShortWidth()+4)
})
$("#emailSenderId").combobox({
......@@ -497,6 +524,7 @@ function queryData() {
var phase = $("#phaseId").combobox('getValue');
var subject = $("#subject00Id").combobox('getValue');
var queryParams = null;
queryData2(name,status,phase,subject);
$("#registersTable").datagrid({
queryParams : {
name : name,
......@@ -505,8 +533,20 @@ function queryData() {
subject:subject
}
});
}
function queryData2(name,status,phase,subject){
$("#subjectTable").datagrid({
queryParams : {
name : name,
phase:phase,
status:status,
subject:subject
}
});
}
//导出为excel
function exportExl(){
var name = $("#name00Id").val();
......
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