|
|
@ -12,6 +12,7 @@ import com.jfinal.aop.Before;
|
|
|
|
import com.jfinal.core.Controller;
|
|
|
|
import com.jfinal.core.Controller;
|
|
|
|
import com.jfinal.ext.interceptor.GET;
|
|
|
|
import com.jfinal.ext.interceptor.GET;
|
|
|
|
import com.jfinal.ext.interceptor.POST;
|
|
|
|
import com.jfinal.ext.interceptor.POST;
|
|
|
|
|
|
|
|
import com.jfinal.kit.Kv;
|
|
|
|
import com.jfinal.kit.PathKit;
|
|
|
|
import com.jfinal.kit.PathKit;
|
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
|
import com.jfinal.plugin.activerecord.Page;
|
|
|
|
import com.jfinal.plugin.activerecord.Page;
|
|
|
@ -36,12 +37,12 @@ public class TeacherController extends Controller {
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Before({POST.class})
|
|
|
|
@Before({POST.class})
|
|
|
|
@IsGuidInterface({"org_id"})
|
|
|
|
@IsGuidInterface({"org_id"})
|
|
|
|
@EmptyInterface({"org_id", "person_name","mz","t_duty_charge", "zzmm","zc_id"})
|
|
|
|
@EmptyInterface({"org_id", "person_name", "mz", "t_duty_charge", "zzmm", "zc_id"})
|
|
|
|
@IsSysAdminInterface({"1", "4"})
|
|
|
|
@IsSysAdminInterface({"1", "4"})
|
|
|
|
@AuthorityInterface({})
|
|
|
|
@AuthorityInterface({})
|
|
|
|
@LengthInterface({"person_name,1,64"})
|
|
|
|
@LengthInterface({"person_name,1,64"})
|
|
|
|
public void addTeacher(String org_id, String person_name,
|
|
|
|
public void addTeacher(String org_id, String person_name,
|
|
|
|
String xb, String mz, String t_duty_charge,String zzmm,String id_card,int sort_id,String zc_id) {
|
|
|
|
String xb, String mz, String t_duty_charge, String zzmm, String id_card, int sort_id, String zc_id) {
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
//判断姓名长度
|
|
|
|
//判断姓名长度
|
|
|
@ -102,13 +103,13 @@ public class TeacherController extends Controller {
|
|
|
|
//将明文密码加密
|
|
|
|
//将明文密码加密
|
|
|
|
String pwd = CommonUtil.getLdapPassword(originalPwd);
|
|
|
|
String pwd = CommonUtil.getLdapPassword(originalPwd);
|
|
|
|
//对身份证号进行一次加密
|
|
|
|
//对身份证号进行一次加密
|
|
|
|
id_card= MysqlAesUtil.Encrypt(id_card);
|
|
|
|
id_card = MysqlAesUtil.Encrypt(id_card);
|
|
|
|
//操作人
|
|
|
|
//操作人
|
|
|
|
String operator = getCookie("person_id");
|
|
|
|
String operator = getCookie("person_id");
|
|
|
|
//客户端ip_address
|
|
|
|
//客户端ip_address
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
|
|
|
|
|
|
|
if (_teacherModel.addTeacherInfo(pwd, person_name, org_id, xb, mz, id_card, originalPwd, cityId, areaId, mainSchoolId, bureauId,sort_id,t_duty_charge,zzmm,zc_id, operator, ip_address)) {
|
|
|
|
if (_teacherModel.addTeacherInfo(pwd, person_name, org_id, xb, mz, id_card, originalPwd, cityId, areaId, mainSchoolId, bureauId, sort_id, t_duty_charge, zzmm, zc_id, operator, ip_address)) {
|
|
|
|
resultJson.put("success", true);
|
|
|
|
resultJson.put("success", true);
|
|
|
|
renderJson(resultJson);
|
|
|
|
renderJson(resultJson);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -164,6 +165,7 @@ public class TeacherController extends Controller {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 功能:获取教师列表:通过单位ID
|
|
|
|
* 功能:获取教师列表:通过单位ID
|
|
|
|
* 作者:黄海
|
|
|
|
* 作者:黄海
|
|
|
@ -315,14 +317,14 @@ public class TeacherController extends Controller {
|
|
|
|
* 日期:2018-12-08
|
|
|
|
* 日期:2018-12-08
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Before({POST.class})
|
|
|
|
@Before({POST.class})
|
|
|
|
@EmptyInterface({"person_id", "person_name", "org_id", "t_duty_charge","xb", "mz", "zzmm","zc_id"})
|
|
|
|
@EmptyInterface({"person_id", "person_name", "org_id", "t_duty_charge", "xb", "mz", "zzmm", "zc_id"})
|
|
|
|
@IsSysAdminInterface({"1", "4"})
|
|
|
|
@IsSysAdminInterface({"1", "4"})
|
|
|
|
@AuthorityInterface({})
|
|
|
|
@AuthorityInterface({})
|
|
|
|
@LengthInterface({"person_name,1,64"})
|
|
|
|
@LengthInterface({"person_name,1,64"})
|
|
|
|
public void updateTeacher(String person_id, String person_name,
|
|
|
|
public void updateTeacher(String person_id, String person_name,
|
|
|
|
String t_duty_charge,
|
|
|
|
String t_duty_charge,
|
|
|
|
String xb, String mz, String zzmm,
|
|
|
|
String xb, String mz, String zzmm,
|
|
|
|
String org_id,String id_card,String zc_id,int sort_id){
|
|
|
|
String org_id, String id_card, String zc_id, int sort_id) {
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
@ -367,9 +369,9 @@ public class TeacherController extends Controller {
|
|
|
|
//客户端ip_address
|
|
|
|
//客户端ip_address
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
//对身份证号进行一次加密
|
|
|
|
//对身份证号进行一次加密
|
|
|
|
id_card= MysqlAesUtil.Encrypt(id_card);
|
|
|
|
id_card = MysqlAesUtil.Encrypt(id_card);
|
|
|
|
|
|
|
|
|
|
|
|
if (_teacherModel.updateTeacher(person_id, person_name, xb, mz,t_duty_charge, org_id, zzmm, operator, ip_address,id_card,zc_id,sort_id)) {
|
|
|
|
if (_teacherModel.updateTeacher(person_id, person_name, xb, mz, t_duty_charge, org_id, zzmm, operator, ip_address, id_card, zc_id, sort_id)) {
|
|
|
|
resultJson.put("success", true);
|
|
|
|
resultJson.put("success", true);
|
|
|
|
renderJson(resultJson);
|
|
|
|
renderJson(resultJson);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
@ -597,4 +599,20 @@ public class TeacherController extends Controller {
|
|
|
|
renderJson(map);
|
|
|
|
renderJson(map);
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 功能:将指定人员设置为指定的身份, 申报员:2,一级审核员:3,二级审核员:4
|
|
|
|
|
|
|
|
* 作者:黄海
|
|
|
|
|
|
|
|
* 时间:2020-11-23
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param person_id
|
|
|
|
|
|
|
|
* @param identity_id
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
public void setIdentity(String person_id, int identity_id) {
|
|
|
|
|
|
|
|
_teacherModel.setIdentity(person_id, identity_id);
|
|
|
|
|
|
|
|
Kv kv = Kv.create();
|
|
|
|
|
|
|
|
kv.set("success", true);
|
|
|
|
|
|
|
|
kv.set("message", "保存成功!");
|
|
|
|
|
|
|
|
renderJson(kv);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|