|
|
|
@ -27,11 +27,11 @@ public class ExamModel {
|
|
|
|
|
public Kv addPerson(String person_name, String ks, String tel) {
|
|
|
|
|
Kv kv = Kv.create();
|
|
|
|
|
//1、检查此人员是不是已经存在过
|
|
|
|
|
String sql = "select count(1) as count from t_exam_person where person_name=? and tel=? and b_use=1";
|
|
|
|
|
String sql = "select count(1) as count from t_exam_person where person_name=? and tel=? and b_use=1 and end_time is not null";
|
|
|
|
|
int cnt = Db.findFirst(sql, person_name, tel).getInt("count");
|
|
|
|
|
if (cnt > 0) {
|
|
|
|
|
kv.set("success", false);
|
|
|
|
|
kv.set("message", "当前人员已经进行过测试,不能重复进行!");
|
|
|
|
|
kv.set("message", "当前人员已经进行过测试并且已交卷,不能重复进行!");
|
|
|
|
|
return kv;
|
|
|
|
|
}
|
|
|
|
|
//2、增加人员信息
|
|
|
|
|