kgdxpr 1 year ago
commit 235019a05c

@ -634,12 +634,8 @@ public class TeacherImportExcelUtil {
jo.put("success", true);
jo.put("message", "检查通过!");
}
if (in != null) {
in.close();
}
if (wb != null) {
wb.close();
}
in.close();
wb.close();
return jo;
}

@ -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 {

@ -121,14 +121,11 @@ public class StudentModel {
* @param xb
* @param mz
* @param id_card
* @param birthday
* @param xjh
* @param xjfh
* @param stu_source
* @param sort_id
* @return
*/
public boolean updateStudentInfo(String person_id, String person_name, String xb, String mz, String id_card, String birthday, String xjh, String xjfh, String stu_source, int sort_id, String zzmm, String operator, String ip_address) {
public boolean updateStudentInfo(String person_id, String person_name, String xb, String mz, String id_card, String stu_source, int sort_id, String zzmm, String operator, String ip_address) {
String sql = Db.getSql("loginPerson.getLoginInfoByPersonId");
List<Record> list = Db.find(sql, person_id);
if (list.size() > 0) {
@ -139,16 +136,14 @@ public class StudentModel {
record.set("xb", Integer.parseInt(xb));
record.set("mz", mz);
record.set("idcard_code", id_card);
if (StrKit.isBlank(birthday)) {
birthday = "2000-01-01 00:00:00";
}
String birthday = CommonUtil.extractFormattedBirthDate(id_card);
record.set("birthday", DateUtil.parse(birthday));
record.set("create_time", DateTime.now());
record.set("sort_id", sort_id);
record.set("b_use", 1);
if (StrKit.isBlank(xjh)) xjh = "";
String xjh = "G" + id_card;
record.set("s_xjh", xjh);
if (StrKit.isBlank(xjfh)) xjfh = "";
record.set("s_source", Integer.parseInt(stu_source));
record.set("zzmm", zzmm);
record.set("operator", operator);

@ -468,10 +468,11 @@ public class TeacherController extends Controller {
return;
}
String basePath = CommonUtil.getClassPath() + PropKit.get("ExcelImportTemplatePathSuffix").replace("\\", "/");
basePath = basePath.replace("//", "/");
String TemplatePath = basePath + "excelTemp/";
String uuidString = UUID.randomUUID().toString().toUpperCase();
String templateXls = TemplatePath + "/" + uuidString + ".xls";
String templateXls = TemplatePath + uuidString + ".xls";
//判断目录是不是存在
File file = new File(TemplatePath);
if (!file.exists()) {

@ -67,23 +67,23 @@
},
{
"column": 8,
"value": "学段",
"value": "任教学段",
"name":"stage",
"width": 16,
"promptContent": "学段请在下拉框中选择,或者将内容复制!",
"promptContent": "任教学段请在下拉框中选择,或者将内容复制!",
"need":1
},
{
"column": 9,
"value": "学科",
"value": "任教科目",
"name":"subject",
"width": 22,
"promptContent": "学科请在下拉框中选择,或者将内容复制!",
"promptContent": "任教科目请在下拉框中选择,或者将内容复制!",
"need":1
},
{
"column": 10,
"value": "从教年月日",
"value": "任教日期",
"name":"teach_date",
"width": 18,
"promptContent": "例1978-01-01",

@ -85,7 +85,8 @@
-- 根据人员的ID获取此人员的登录信息
#sql("getLoginInfoByPersonId")
select person_id,person_name,identity_id,login_name,pwd,original_pwd,xb,zzmm,mz,idcard_code,birthday,create_time,sort_id,telephone,wx_openid,qq_openid,email,status_code,b_use,identity_pk_num,city_id,area_id,main_school_id,bureau_id,org_id,s_class_id,s_xjh,s_xjfh,s_source,
select person_id,person_name,identity_id,login_name,pwd,original_pwd,xb,zzmm,mz,idcard_code,birthday,create_time,sort_id,telephone,
wx_openid,qq_openid,email,status_code,b_use,identity_pk_num,city_id,area_id,main_school_id,bureau_id,org_id,s_class_id,s_xjh,s_source,
t_duty_charge,t_xl_id,t_zc_id,t_stage_id,t_subject_id,t_teaching_date,p_child_id,
update_ts from t_sys_loginperson where person_id =?
#end

Loading…
Cancel
Save