|
|
|
@ -273,12 +273,9 @@ public class StudentController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param person_id
|
|
|
|
|
* @param person_name
|
|
|
|
|
* @param birthday
|
|
|
|
|
* @param sort_id
|
|
|
|
|
* @param stu_source
|
|
|
|
|
* @param id_card
|
|
|
|
|
* @param xjh
|
|
|
|
|
* @param xjfh
|
|
|
|
|
* @param xb
|
|
|
|
|
* @param mz
|
|
|
|
|
* @param zzmm
|
|
|
|
@ -286,13 +283,12 @@ public class StudentController extends Controller {
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@EmptyInterface({"person_id", "person_name", "id_card", "xb", "mz", "zzmm"})
|
|
|
|
|
@IsNumericInterface({"sort_id"})
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3", "4"})
|
|
|
|
|
@VerifyIDCardInterface({})
|
|
|
|
|
|
|
|
|
|
@LengthInterface({"person_name,2,64"})
|
|
|
|
|
public void updateStudent(String person_id, String person_name, String birthday, int sort_id, String
|
|
|
|
|
stu_source, String id_card, String xjh, String xjfh, String xb, String mz, String zzmm) {
|
|
|
|
|
public void updateStudent(String person_id, String person_name, int sort_id, String
|
|
|
|
|
stu_source, String id_card, String xb, String mz, String zzmm) {
|
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
|
|
|
|
|
//判断姓名长度
|
|
|
|
@ -325,35 +321,6 @@ public class StudentController extends Controller {
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//如果出生日期不空就判断是否正确
|
|
|
|
|
if (birthday != null && birthday != "") {
|
|
|
|
|
if (!CommonUtil.getIsDateLegal(birthday)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "出生日期格式不正确!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//如果学籍号不空就判断是否正确
|
|
|
|
|
if (xjh != null && xjh != "") {
|
|
|
|
|
if (xjh.length() > 20) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "学籍号不正确!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//如果学籍辅号不空就判断是否正确
|
|
|
|
|
if (xjfh != null && xjfh != "") {
|
|
|
|
|
if (xjh.length() > 20) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "学籍辅号不正确!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//如果学生来源不空就判断是否正确
|
|
|
|
|
if (stu_source != null && stu_source != "") {
|
|
|
|
@ -370,7 +337,7 @@ public class StudentController extends Controller {
|
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (_studentModel.updateStudentInfo(person_id, person_name, xb, mz, id_card, birthday, xjh, xjfh, stu_source, sort_id, zzmm, operator, ip_address)) {
|
|
|
|
|
if (_studentModel.updateStudentInfo(person_id, person_name, xb, mz, id_card, stu_source, sort_id, zzmm, operator, ip_address)) {
|
|
|
|
|
resultJson.put("success", true);
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
} else {
|
|
|
|
|