main
黄海 1 year ago
parent afd9496de2
commit 6695a5b917

@ -1,6 +1,7 @@
package com.dsideal.QingLong.TeacherYd.Controller;
import com.alibaba.fastjson.JSONObject;
import com.dsideal.QingLong.Base.Model.BaseModel;
import com.dsideal.QingLong.Interceptor.*;
import com.dsideal.QingLong.LoginPerson.Model.LoginPersonModel;
import com.dsideal.QingLong.TeacherYd.Model.TeacherYdModel;
@ -27,7 +28,7 @@ public class TeacherYdController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
@EmptyInterface({"person_id"})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
public void getPersonStatus(String person_id) {
List<Record> rs = model.getPersonStatus(person_id);
if (rs == null || rs.isEmpty()) {
@ -47,7 +48,7 @@ public class TeacherYdController extends Controller {
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
public void get_dm_status_teacher() {
List<Record> rs = model.get_dm_status_teacher();
renderJson(rs);
@ -58,7 +59,7 @@ public class TeacherYdController extends Controller {
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
public void getTransferApplyStatus() {
List<Record> rs = model.getTransferApplyStatus();
renderJson(rs);
@ -72,8 +73,8 @@ public class TeacherYdController extends Controller {
*/
@Before({POST.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"person_id", "status_code"})
public void updateTeacherStatus(String person_id, String status_code) {
//操作人
@ -96,8 +97,8 @@ public class TeacherYdController extends Controller {
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"person_id"})
public void checkAllowTeacherTransferApply(String person_id) {
//人员
@ -117,8 +118,8 @@ public class TeacherYdController extends Controller {
*/
@Before({POST.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"target_bureau_id", "person_id", "apply_message"})
@LengthInterface({"apply_message,1,255"})
public void teacherTransferApply(String person_id, String target_bureau_id, String apply_message) {
@ -158,19 +159,23 @@ public class TeacherYdController extends Controller {
*
* @param page
* @param limit
* @param bureau_id
* @param person_name
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"bureau_id"})
@IsNumericInterface({"page", "limit"})
public void getTeacherTransferApplyList(int page, int limit, String bureau_id, String person_name) {
public void getTeacherTransferApplyList(int page, int limit, String person_name) {
if (person_name == null) {
person_name = "";
}
//当前登录人员所在单位
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");//当前登录人
BaseModel bm = new BaseModel();
String bureau_id = bm.getPersonInfo(person_id).getStr("bureau_id");
Page<Record> rs = model.getTeacherTransferApplyList(page, limit, bureau_id, person_name);
renderJson(CommonUtil.renderJsonForLayUI(rs));
}
@ -185,8 +190,8 @@ public class TeacherYdController extends Controller {
*/
@Before({POST.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"echo_message"})
@IsNumericInterface({"id", "status_id"})
@LengthInterface({"echo_message,1,255"})
@ -211,19 +216,23 @@ public class TeacherYdController extends Controller {
*
* @param page
* @param limit
* @param bureau_id
* @param person_name
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@EmptyInterface({"bureau_id"})
@IsNumericInterface({"page", "limit"})
public void getTeacherTransferEchoList(int page, int limit, String bureau_id, String person_name) {
public void getTeacherTransferEchoList(int page, int limit, String person_name) {
if (person_name == null) {
person_name = "";
}
//当前登录人员所在单位
String person_id = SessionKit.get(getRequest(), getResponse(), "person_id");//当前登录人
BaseModel bm = new BaseModel();
String bureau_id = bm.getPersonInfo(person_id).getStr("bureau_id");
Page<Record> rs = model.getTeacherTransferEchoList(page, limit, bureau_id, person_name);
renderJson(CommonUtil.renderJsonForLayUI(rs));
}
@ -235,8 +244,8 @@ public class TeacherYdController extends Controller {
*/
@Before({GET.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@IsNumericInterface({"id"})
public void getTeacherTransferInfoById(int id) {
//尝试修改一下阅读状态
@ -256,8 +265,8 @@ public class TeacherYdController extends Controller {
*/
@Before({POST.class})
@IsLoginInterface({})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
@IsNumericInterface({"id"})
public void deleteTransferInfoById(int id) {
//1、是登录人员本单位申请的
@ -268,7 +277,7 @@ public class TeacherYdController extends Controller {
}
String source_bureau_id = records.get(0).getStr("source_bureau_id");
String personId = SessionKit.get(getRequest(), getResponse(), "person_id");
String identity_id = SessionKit.get(getRequest(), getResponse(),"identity_id");
String identity_id = SessionKit.get(getRequest(), getResponse(), "identity_id");
LoginPersonModel _loginPersonModel = new LoginPersonModel();
Record obj = _loginPersonModel.getLoginInfoByPersonId(personId);
if (identity_id.equals("4") && !obj.get("bureau_id").equals(source_bureau_id)) {
@ -305,8 +314,8 @@ public class TeacherYdController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
@EmptyInterface({"bureau_id"})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
public void getNewTeacherTransferApplyCount(String bureau_id) {
int count = model.getNewTeacherTransferApplyCount(bureau_id);
JSONObject jo = new JSONObject();
@ -322,8 +331,8 @@ public class TeacherYdController extends Controller {
@Before({GET.class})
@IsLoginInterface({})
@EmptyInterface({"bureau_id"})
@IsSysAdminInterface({"1","2","3", "4"})
@IsSysAdminInterface({"1", "2", "3", "4"})
public void getNewTeacherTransferEchoCount(String bureau_id) {
int count = model.getNewTeacherTransferEchoCount(bureau_id);
JSONObject jo = new JSONObject();
@ -341,7 +350,7 @@ public class TeacherYdController extends Controller {
@IsLoginInterface({})
@EmptyInterface({"person_id", "org_id"})
@IsSysAdminInterface({"1"})
public void changeTransferPersonByAdmin(String person_id, String org_id) {
//操作人
String operator = SessionKit.get(getRequest(), getResponse(), "person_id");

Loading…
Cancel
Save