|
|
|
@ -47,7 +47,7 @@ public class StudentController extends Controller {
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@EmptyInterface({"class_id", "student_name", "xb", "mz", "id_card", "zzmm", "birthday"})
|
|
|
|
|
@EmptyInterface({"class_id", "student_name", "xb", "mz", "zzmm", "birthday"})
|
|
|
|
|
@IsNumericInterface({"sort_id"})
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3", "4"})
|
|
|
|
|
@VerifyIDCardInterface({})
|
|
|
|
@ -511,7 +511,7 @@ public class StudentController extends Controller {
|
|
|
|
|
//判断文件大小大于20mb则返回错误信息,并终止上传,删除上传文件
|
|
|
|
|
long size = picFile.getFile().length();
|
|
|
|
|
if (size > 1024 * 1024 * 20) {
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("success", false);
|
|
|
|
|
map.put("message", "xls文件大小大于20MB,请检查!");
|
|
|
|
|
renderJson(map);
|
|
|
|
@ -544,10 +544,10 @@ public class StudentController extends Controller {
|
|
|
|
|
//3、检查值域是不是正确
|
|
|
|
|
//身份
|
|
|
|
|
String bureau_id = SessionKit.get(getRequest(), getResponse(), "bureau_id");
|
|
|
|
|
int identity_id = Integer.parseInt(SessionKit.get(getRequest(), getResponse(),"identity_id"));
|
|
|
|
|
int identity_id = Integer.parseInt(SessionKit.get(getRequest(), getResponse(), "identity_id"));
|
|
|
|
|
if (identity_id == 1) {
|
|
|
|
|
if (getPara("bureau_id") == null) {
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("success", false);
|
|
|
|
|
map.put("message", "超级管理员使用此接口,需要传入bureau_id参数,单位管理员不需要。");
|
|
|
|
|
renderJson(map);
|
|
|
|
@ -585,7 +585,7 @@ public class StudentController extends Controller {
|
|
|
|
|
String ip_address = IpUtil.getIpAddr(getRequest());
|
|
|
|
|
|
|
|
|
|
jo = StudentImportExcelUtil.SaveBatch(batch_id, bureau_id, operator, ip_address);
|
|
|
|
|
Map<String,Object> map = new HashMap<>();
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
map.put("success", true);
|
|
|
|
|
map.put("message", "导入成功!");
|
|
|
|
|
map.put("count", jo.getInteger("count"));
|
|
|
|
|