|
|
|
@ -3,7 +3,7 @@ package com.dsideal.dsBase.Base.Controller;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.dsideal.dsBase.Base.Model.BaseModel;
|
|
|
|
|
import com.dsideal.dsBase.Bean.TBaseOrgTypePrincipalship;
|
|
|
|
|
import com.dsideal.dsBase.Handler.RepeatIntercetpor;
|
|
|
|
|
import com.dsideal.dsBase.Handler.RepeatInterceptor;
|
|
|
|
|
import com.dsideal.dsBase.Interceptor.*;
|
|
|
|
|
import com.dsideal.dsBase.Util.CommonUtil;
|
|
|
|
|
import com.dsideal.dsBase.Util.ExcelCommonUtil;
|
|
|
|
@ -12,7 +12,6 @@ import com.jfinal.aop.Before;
|
|
|
|
|
import com.jfinal.core.Controller;
|
|
|
|
|
import com.jfinal.ext.interceptor.GET;
|
|
|
|
|
import com.jfinal.ext.interceptor.POST;
|
|
|
|
|
import com.jfinal.kit.Kv;
|
|
|
|
|
import com.jfinal.kit.PathKit;
|
|
|
|
|
import com.jfinal.kit.PropKit;
|
|
|
|
|
import com.jfinal.kit.StrKit;
|
|
|
|
@ -30,7 +29,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* 获取当前登录人员的Session信息
|
|
|
|
|
* from:默认是0,表示从本地数据库中取,1:表示从第三方系统数据库中取
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getCurrentPersonInfo(int from) {
|
|
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
@ -48,7 +47,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 获取整个单位类型与职务+分管信息树数据
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
@IsSysAdminInterface({"1"})
|
|
|
|
|
public void getOrgTypePrincipalshipTree() {
|
|
|
|
|
List<Record> dt = bm.getOrgTypePrincipalshipTree();
|
|
|
|
@ -76,7 +75,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 获取单位类型与职务+分管信息树数据指定结点的信息
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
@IsNumericInterface({"id"})
|
|
|
|
|
@IsSysAdminInterface({"1"})
|
|
|
|
|
public void getOrgTypePrincipalshipById(String id) {
|
|
|
|
@ -87,7 +86,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 获取单位类型与职务+分管信息树数据指定结点下一级的数据ById
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3", "4"})
|
|
|
|
|
public void getOrgTypePrincipalshipForTreeTable(int parent_id, int is_school, String bureau_id) {
|
|
|
|
|
List<Record> list = bm.getOrgTypePrincipalship(parent_id, is_school, bureau_id);
|
|
|
|
@ -140,7 +139,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param parent_code
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
@IsNumericInterface({"parent_code"})
|
|
|
|
|
@IsSysAdminInterface({"1"})
|
|
|
|
|
public void getOrgTypePrincipalshipByParentCode(String parent_code) {
|
|
|
|
@ -157,7 +156,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param is_school
|
|
|
|
|
* @param code
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({POST.class, RepeatInterceptor.class})
|
|
|
|
|
@EmptyInterface({"code", "name"})
|
|
|
|
|
@IsNumericInterface({"parent_id", "sort_id"})
|
|
|
|
|
@LengthInterface({"code,2,2", "name,2,32"})
|
|
|
|
@ -191,7 +190,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param id
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({POST.class, RepeatInterceptor.class})
|
|
|
|
|
@IsNumericInterface({"id"})
|
|
|
|
|
@IsSysAdminInterface({"1"})
|
|
|
|
|
public void delOrgTypePrincipalshipById(int id) {
|
|
|
|
@ -221,7 +220,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param code
|
|
|
|
|
* @param is_school
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({POST.class, RepeatInterceptor.class})
|
|
|
|
|
@EmptyInterface({"code", "name"})
|
|
|
|
|
@IsNumericInterface({"id", "parent_id", "sort_id", "b_use"})
|
|
|
|
|
@IsSysAdminInterface({"1"})
|
|
|
|
@ -261,7 +260,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param bureau_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
@EmptyInterface({"bureau_id"})
|
|
|
|
|
@IsGuidInterface({"bureau_id"})
|
|
|
|
|
@IsSysAdminInterface({"1", "2", "3", "4"})
|
|
|
|
@ -273,7 +272,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 输出打印职务与分管工作的数据,方便第三方系统接入时,提供填写EXCEL示例
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getPrincipalshipThirdParty() {
|
|
|
|
|
Page<Record> dt = bm.getPrincipalshipThirdParty(1, 10000);
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(dt));
|
|
|
|
@ -282,7 +281,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 输出打印职务与分管工作的数据
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getPrincipalshipThirdPartyForExcel() {
|
|
|
|
|
//模板文件
|
|
|
|
|
String excelPath = PathKit.getRootClassPath() + PropKit.get("excelExportTemplatePathSuffix").replace("\\", "/");
|
|
|
|
@ -303,7 +302,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param ids
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void isInDutyList(String ids) {
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
|
String person_id = rPerson.getStr("person_id");
|
|
|
|
@ -314,7 +313,7 @@ public class BaseController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 获取所有的用户城市列表
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getAllUserCity() {
|
|
|
|
|
List<Record> list = bm.getAllUserCity();
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list, list.size()));
|
|
|
|
@ -325,7 +324,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param bureau_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void selectPersonsByBureauId(String bureau_id) {
|
|
|
|
|
//如果不传入单位ID,即当前操作人员的单位ID
|
|
|
|
|
if (StrKit.isBlank(bureau_id)) {
|
|
|
|
@ -359,7 +358,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getTermListByYear(int batch_year) {
|
|
|
|
|
List<Record> list = bm.getTermListByYear(batch_year);
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list, list.size()));
|
|
|
|
@ -370,7 +369,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* 作者:黄海
|
|
|
|
|
* 时间:2019-10-30
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getCurrentTerm() {
|
|
|
|
|
Record record = bm.getCurrentTerm();
|
|
|
|
|
renderJson(record);
|
|
|
|
@ -381,7 +380,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* 作者:黄海
|
|
|
|
|
* 时间:2021-08-17
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getCurrentPerson() {
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
|
String person_id = rPerson.getStr("person_id");
|
|
|
|
@ -394,7 +393,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* 作者:黄海
|
|
|
|
|
* 时间:2021-08-18
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getCurrentClass() {
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
|
String person_id = rPerson.getStr("person_id");
|
|
|
|
@ -408,7 +407,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* 作者:黄海
|
|
|
|
|
* 时间:2019-10-18
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getSiteTypeList() {
|
|
|
|
|
List<Record> list = bm.getSiteTypeList();
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list, list.size()));
|
|
|
|
@ -421,7 +420,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param xq_id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getTermInfo(int xq_id) {
|
|
|
|
|
Record record = bm.getTermInfo(xq_id);
|
|
|
|
|
renderJson(record);
|
|
|
|
@ -433,7 +432,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param teacher_id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getPersonInfo(String teacher_id) {
|
|
|
|
|
if (StrKit.isBlank(teacher_id)) {
|
|
|
|
|
Record rPerson = JwtUtil.getPersonInfo(getRequest());
|
|
|
|
@ -453,7 +452,7 @@ public class BaseController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param xq_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({POST.class, RepeatInterceptor.class})
|
|
|
|
|
public void saveTermId(String xq_id) {
|
|
|
|
|
bm.saveTermId(xq_id);
|
|
|
|
|
renderJson(CommonUtil.returnMessageJson(true, "保存成功"));
|
|
|
|
@ -471,7 +470,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param ksrq
|
|
|
|
|
* @param jsrq
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({POST.class, RepeatInterceptor.class})
|
|
|
|
|
@LengthInterface({"xn,4,4"})
|
|
|
|
|
public void updateXq(int xq_id, String xn, String xq_code, String ksrq, String jsrq) {
|
|
|
|
|
BaseModel.updateXq(xq_id, xn, xq_code, ksrq, jsrq);
|
|
|
|
@ -486,7 +485,7 @@ public class BaseController extends Controller {
|
|
|
|
|
* @param org_id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class, RepeatInterceptor.class})
|
|
|
|
|
public void getPersonList(String org_id) {
|
|
|
|
|
List<Record> list = bm.getPersonList(org_id);
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list, list.size()));
|
|
|
|
|