|
@@ -22,61 +22,9 @@ import cn.hmsoft.helper.StringHelper;
|
|
|
*/
|
|
|
public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
-
|
|
|
- /*** 央美附中的准考证生成规则
|
|
|
- public final String stdSql = "select std.std_id,aspect_code from std_enrol e,std_reg std,cf_aspect t where std.std_id=e.std_id and e.batch_pay_status='Active' and e.std_batch=1 and t.aspect_id=e.aspect_id group by std.std_id,aspect_code order by aspect_code+0";
|
|
|
-
|
|
|
- @Override
|
|
|
- protected void makeTicket(LyStdTicketDao daoTicket, LyAgent agent) {
|
|
|
- //准考证号码的长度
|
|
|
- int ticketLength = Integer.parseInt(
|
|
|
- CollectionHelper.getParamValue(AppHelper.GobalParamMap, ArtParamName.LayoutTicketNoSeqLength, "" + 3));
|
|
|
- List<Map<String,Object>> stdArray = daoTicket.listMapBySql(stdSql);
|
|
|
- int ticket_seq = 0;
|
|
|
- for(Map<String,Object> reg : stdArray) {
|
|
|
- int seq = ++ticket_seq;
|
|
|
- LyStdTicket ticket = new LyStdTicket();
|
|
|
- ticket.setLy_agent_id(101);
|
|
|
- ticket.setStd_id(Integer.parseInt(reg.get("std_id").toString()));
|
|
|
- ticket.setCategory_id(1);
|
|
|
- ticket.setTicket_batch(1);
|
|
|
- ticket.setTicket_seq(seq);
|
|
|
- ticket.setTicket_no("FZ"+ ArtParamHelper.ArtYear.substring(2, 4) + String.valueOf(reg.get("aspect_code")) +
|
|
|
- StringHelper.leftPadding((seq) + "", ticketLength, '0'));
|
|
|
- daoTicket.insert(ticket);
|
|
|
- }
|
|
|
- } */
|
|
|
-
|
|
|
-
|
|
|
- /***********************
|
|
|
- * 央美本科的准考证生成规则-使用不到,使用专业考号
|
|
|
- *
|
|
|
- *
|
|
|
- private final static String ALL_STD = "select distinct s.std_id from std_reg s,std_enrol e where s.std_id=e.std_id and e.agent_id=? and e.batch_pay_status='Active' ";
|
|
|
- @Override
|
|
|
- protected void makeTicket(LyStdTicketDao daoTicket, LyAgent agent) {
|
|
|
- CfCategory category = daoTicket.find(CfCategory.class, 1);
|
|
|
- List<StdReg> regList = daoTicket.listBySql(StdReg.class, ALL_STD, agent.getLy_agent_id());
|
|
|
- int ticketLength = Integer.parseInt(CollectionHelper.getParamValue(AppHelper.GobalParamMap,
|
|
|
- ArtParamName.LayoutTicketNoSeqLength, ""+7));
|
|
|
- int ticket_seq = 0;
|
|
|
- for(StdReg std : regList) {
|
|
|
- LyStdTicket ticket = new LyStdTicket();
|
|
|
- ticket.setCategory_id(category.getCategory_id());
|
|
|
- ticket.setLy_agent_id(agent.getLy_agent_id());
|
|
|
- ticket.setStd_id(std.getStd_id());
|
|
|
- ticket.setTicket_batch(1);
|
|
|
- ticket.setTicket_seq(ticket_seq+1);
|
|
|
- ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + StringHelper.leftPadding((++ticket_seq) + "", ticketLength, '0'));
|
|
|
- daoTicket.insert(ticket);
|
|
|
- }
|
|
|
|
|
|
- }*/
|
|
|
-
|
|
|
-
|
|
|
//以下为初试准考证生成规则(一个考生只有一个准考证)
|
|
|
-
|
|
|
- /*// 普通高考
|
|
|
+ // 普通高考
|
|
|
private final static String LIST_STD = " select distinct std_id from (select a.std_id,b.ticket_no from ( "+
|
|
|
" select s.std_id from std_reg s,std_enrol e where s.std_id=e.std_id and e.agent_id=? and s.ticket_order=0 and e.pay_status='Active' "+
|
|
|
" and (e.category_id=? or 1=?) and s.std_province <= 65 and e.aspect_id=? "+
|
|
@@ -108,8 +56,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
//建筑学和美术学-初试准考证不生成
|
|
|
String sql = " select t.* from cf_major m,cf_aspect t where major_category_id=1 and m.major_id=t.aspect_major_id and t.aspect_id not in (20401,20701) order by aspect_code ";
|
|
|
List<CfAspect> aspectArr = daoTicket.listBySql(CfAspect.class, sql);
|
|
|
- int ticketLength = Integer.parseInt(CollectionHelper.getParamValue(AppHelper.GobalParamMap,
|
|
|
- ArtParamName.LayoutTicketNoSeqLength, ""+4));
|
|
|
+ int ticketLength;
|
|
|
int num = 1;
|
|
|
for(CfAspect aspect : aspectArr) {
|
|
|
ticketLength = 4;
|
|
@@ -125,7 +72,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
ticket.setStd_id(std.getStd_id());
|
|
|
ticket.setTicket_batch(1);
|
|
|
ticket.setTicket_seq(num++);
|
|
|
- ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + "" + aspect.getAspect_code()+"0"
|
|
|
+ ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + aspect.getAspect_code() + "0"
|
|
|
+ StringHelper.leftPadding((++ticket_seq) + "", ticketLength, '0'));
|
|
|
daoTicket.insert(ticket);
|
|
|
}
|
|
@@ -143,18 +90,18 @@ public class Ticket10047 extends TicketHelper {
|
|
|
ticket.setStd_id(std.getStd_id());
|
|
|
ticket.setTicket_batch(1);
|
|
|
ticket.setTicket_seq(num++);
|
|
|
- ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + "" + aspect.getAspect_code()+"S"
|
|
|
+ ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + aspect.getAspect_code() + "S"
|
|
|
+ StringHelper.leftPadding((++ticket_seq) + "", ticketLength, '0'));
|
|
|
daoTicket.insert(ticket);
|
|
|
}
|
|
|
- continue;
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+ // 初试-只有大陆考生和新疆少民的考生参加,港澳台和香港中学文凭考生 直接参加复试
|
|
|
+ /**
|
|
|
//港澳台
|
|
|
stdArray = daoTicket.listBySql(StdReg.class, GAT_LIST_STD, agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
- category.getCategory_id() == null ? 1 : 2, aspect.getAspect_id(), agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
+ category.getCategory_id() == null ? 1 : 2, aspect.getAspect_id(), agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
category.getCategory_id() == null ? 1 : 2);
|
|
|
-
|
|
|
+
|
|
|
for(StdReg std : stdArray) {
|
|
|
LyStdTicket ticket = new LyStdTicket();
|
|
|
ticket.setCategory_id(category.getCategory_id());
|
|
@@ -162,14 +109,14 @@ public class Ticket10047 extends TicketHelper {
|
|
|
ticket.setStd_id(std.getStd_id());
|
|
|
ticket.setTicket_batch(1);
|
|
|
ticket.setTicket_seq(num++);
|
|
|
- ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + "" + aspect.getAspect_code()+"H"
|
|
|
+ ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + aspect.getAspect_code()+"H"
|
|
|
+ StringHelper.leftPadding((++ticket_seq) + "", ticketLength, '0'));
|
|
|
daoTicket.insert(ticket);
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
//香港中学文凭考生
|
|
|
stdArray = daoTicket.listBySql(StdReg.class, ZXWP_LIST_STD, agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
- category.getCategory_id() == null ? 1 : 2, aspect.getAspect_id(), agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
+ category.getCategory_id() == null ? 1 : 2, aspect.getAspect_id(), agent.getLy_agent_id(), category.getCategory_id(),
|
|
|
category.getCategory_id() == null ? 1 : 2);
|
|
|
for(StdReg std : stdArray) {
|
|
|
LyStdTicket ticket = new LyStdTicket();
|
|
@@ -178,17 +125,18 @@ public class Ticket10047 extends TicketHelper {
|
|
|
ticket.setStd_id(std.getStd_id());
|
|
|
ticket.setTicket_batch(1);
|
|
|
ticket.setTicket_seq(num++);
|
|
|
- ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + "" + aspect.getAspect_code()+"D"
|
|
|
+ ticket.setTicket_no(ArtParamHelper.ArtYear.substring(2, 4) + aspect.getAspect_code()+"D"
|
|
|
+ StringHelper.leftPadding((++ticket_seq) + "", ticketLength, '0'));
|
|
|
daoTicket.insert(ticket);
|
|
|
}
|
|
|
-
|
|
|
+ **/
|
|
|
+
|
|
|
}
|
|
|
- }*/
|
|
|
-
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- //以下为复试准考证生成规则
|
|
|
+ /****
|
|
|
+ //以下为复试准考证生成规则 --使用的是专业考号
|
|
|
// 普通高考where ticket_no is null
|
|
|
private final static String LIST_STD_FS = " select distinct std_id from (select a.std_id,b.ticket_no from ( "+
|
|
|
" select s.std_id from std_reg s,std_enrol e where s.std_id=e.std_id and e.agent_id=? and s.ticket_order=0 and e.pay_status='Active' "+
|
|
@@ -307,7 +255,7 @@ public class Ticket10047 extends TicketHelper {
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ **/
|
|
|
|
|
|
|
|
|
|