|
|
|
@ -265,7 +265,6 @@ public class TeacherController extends Controller {
|
|
|
|
|
* @param zc_id
|
|
|
|
|
* @param org_id
|
|
|
|
|
* @param id_card
|
|
|
|
|
* @param birthday
|
|
|
|
|
* @param t_teaching_date
|
|
|
|
|
* @param stage_id
|
|
|
|
|
* @param subject_id
|
|
|
|
@ -273,13 +272,13 @@ public class TeacherController extends Controller {
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@EmptyInterface({"person_id", "person_name", "org_id", "t_duty_charge", "xl_id", "zc_id", "xb", "mz", "zzmm"})
|
|
|
|
|
@IsNumericInterface({"sort_id", "stage_id", "subject_id"})
|
|
|
|
|
@IsNumericInterface({"stage_id", "subject_id"})
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3", "4"})
|
|
|
|
|
@LengthInterface({"person_name,2,64", "xl_id,2,2", "zc_id,2,2"})
|
|
|
|
|
public void updateTeacher(String person_id, String person_name,
|
|
|
|
|
String t_duty_charge, String xl_id,
|
|
|
|
|
String xb, String mz, String zzmm,
|
|
|
|
|
int sort_id, String zc_id, String org_id, String id_card, String birthday, String t_teaching_date,
|
|
|
|
|
int sort_id, String zc_id, String org_id, String id_card, String t_teaching_date,
|
|
|
|
|
int stage_id, int subject_id) {
|
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
|
|
|
|
@ -313,15 +312,9 @@ public class TeacherController extends Controller {
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//如果出生日期不空就判断是否正确
|
|
|
|
|
if (!CommonUtil.getIsDateLegal(birthday)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "出生日期格式不正确!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//判断是不是合法的任教年月日
|
|
|
|
|
if (!CommonUtil.getIsDateLegal(t_teaching_date)) {
|
|
|
|
|
if (!StrKit.isBlank(t_teaching_date) && !CommonUtil.getIsDateLegal(t_teaching_date)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "任教年月日不正确!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
@ -330,7 +323,7 @@ public class TeacherController extends Controller {
|
|
|
|
|
|
|
|
|
|
if (!CommonUtil.isJsonArray(t_duty_charge)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("message", "职务与分管工作不是标准的JSON格式!");
|
|
|
|
|
resultJson.put("message", "职务不是标准的JSON格式!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
@ -340,7 +333,7 @@ public class TeacherController extends Controller {
|
|
|
|
|
//客户端ip_address
|
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
|
|
|
|
|
if (_teacherModel.updateTeacher(person_id, person_name, xb, mz, id_card, birthday, xl_id, stage_id, subject_id, zc_id, t_teaching_date, sort_id, t_duty_charge, org_id, zzmm, operator, ip_address)) {
|
|
|
|
|
if (_teacherModel.updateTeacher(person_id, person_name, xb, mz, id_card, xl_id, stage_id, subject_id, zc_id, t_teaching_date, sort_id, t_duty_charge, org_id, zzmm, operator, ip_address)) {
|
|
|
|
|
resultJson.put("success", true);
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
} else {
|
|
|
|
|