|
|
@ -17,7 +17,7 @@ public class YpModel {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public List<Record> getCurrentTaskInfo() {
|
|
|
|
public List<Record> getCurrentTask() {
|
|
|
|
String sql = "select task_id,task_name,is_run from t_yp_task where b_use=1 and is_run=1";
|
|
|
|
String sql = "select task_id,task_name,is_run from t_yp_task where b_use=1 and is_run=1";
|
|
|
|
List<Record> list = Db.find(sql);
|
|
|
|
List<Record> list = Db.find(sql);
|
|
|
|
return list;
|
|
|
|
return list;
|
|
|
@ -224,8 +224,9 @@ public class YpModel {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public int save(int task_id, String name, String xb, int bx_id, String address, String father_name, String mother_name, String sfzh, String tel, String uuid) {
|
|
|
|
public int save(int task_id, String name, String xb, int bx_id, String address, String father_name, String mother_name, String sfzh, String tel, String uuid) {
|
|
|
|
//1、检查身份证号是不是已存在
|
|
|
|
//1、检查身份证号是不是已存在
|
|
|
|
String sql = "select count(1) as count from t_yp_record where sfzh=?";
|
|
|
|
Record currentR = getCurrentTask().get(0);
|
|
|
|
int count = Db.findFirst(sql, sfzh).getInt("count");
|
|
|
|
String sql = "select count(1) as count from t_yp_record where sfzh=? and task_id=? and b_use=1";
|
|
|
|
|
|
|
|
int count = Db.findFirst(sql, sfzh, currentR.getInt("task_id")).getInt("count");
|
|
|
|
if (count > 0) return 2;
|
|
|
|
if (count > 0) return 2;
|
|
|
|
//2、是不是指定班型已招满
|
|
|
|
//2、是不是指定班型已招满
|
|
|
|
count = applyCount(task_id, bx_id);
|
|
|
|
count = applyCount(task_id, bx_id);
|
|
|
@ -250,6 +251,15 @@ public class YpModel {
|
|
|
|
return 1;
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 功能:删除记录
|
|
|
|
|
|
|
|
* @param id
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public void delRecord(int id) {
|
|
|
|
|
|
|
|
String sql = "update t_yp_record set b_use=0 where id=?";
|
|
|
|
|
|
|
|
Db.update(sql, id);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 功能:查看指定任务的结果
|
|
|
|
* 功能:查看指定任务的结果
|
|
|
|
*
|
|
|
|
*
|
|
|
|