|
|
|
@ -43,7 +43,6 @@ public class CollectController extends Controller {
|
|
|
|
|
BaseModel bm = new BaseModel();
|
|
|
|
|
String basePath = CommonUtil.WebRoot + File.separator + "Excel";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/********以下为EXCEL模板上传管理功能******************************************************
|
|
|
|
|
/**
|
|
|
|
|
* EXCEL原始模板上传
|
|
|
|
@ -132,7 +131,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void getSheets(int job_id) {
|
|
|
|
@ -147,7 +146,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param sheet_index
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id", "sheet_index"})
|
|
|
|
|
public void getSheetStruct(int job_id, int sheet_index) {
|
|
|
|
@ -162,7 +161,7 @@ public class CollectController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:获取数据类型下拉列表
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getDataTypeDict() {
|
|
|
|
|
List<Record> list = cm.getDataTypeDict();
|
|
|
|
@ -666,7 +665,7 @@ public class CollectController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:获取任务列表,支持关键字查询
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getJobList(String job_name, int page, int limit) throws ParseException {
|
|
|
|
|
//操作人员
|
|
|
|
@ -688,7 +687,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getBureauType() {
|
|
|
|
|
List<Record> list = cm.getBureauType();
|
|
|
|
@ -711,7 +710,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@LayUiPageInfoInterface({"page", "limit"})
|
|
|
|
|
@EmptyInterface({"bureau_type_ids"})
|
|
|
|
@ -738,7 +737,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param bureauIds
|
|
|
|
|
* @param groupIds
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void isExistXianQuJiaoYuJu(String bureauIds, String groupIds) {
|
|
|
|
|
if (StrKit.isBlank(bureauIds) && StrKit.isBlank(groupIds)) {
|
|
|
|
@ -825,7 +824,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void getJob(int job_id) {
|
|
|
|
@ -874,7 +873,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param bureau_id
|
|
|
|
|
* @param type_id 1:EXCEL下载 2:PDF在线查看
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id", "type_id"})
|
|
|
|
|
public void getJobBureauFillInfo(int job_id, String bureau_id, int type_id) throws Exception {
|
|
|
|
@ -951,7 +950,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param limit 每页多少个
|
|
|
|
|
* @param fill_type_id 填报类型,1:直接填报,2:转发,3:填报并转发
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id", "is_finish"})
|
|
|
|
|
@LayUiPageInfoInterface({"page", "limit"})
|
|
|
|
@ -972,7 +971,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param limit 每页多少个
|
|
|
|
|
* @param forward_progress 转发进度 0:待转发,1:已转发,2:已回复上级
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"is_finish"})
|
|
|
|
|
@LayUiPageInfoInterface({"page", "limit"})
|
|
|
|
@ -996,7 +995,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id 任务ID
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void viewJobPerson(int job_id) {
|
|
|
|
@ -1014,7 +1013,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param page 第几页
|
|
|
|
|
* @param limit 每页多少个
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"is_finish"})
|
|
|
|
|
@LayUiPageInfoInterface({"page", "limit"})
|
|
|
|
@ -1100,7 +1099,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param job_id
|
|
|
|
|
* @param target_id http://10.10.21.20:9000/QingLong/collect/getJobUploadList?job_id=42
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void getJobUploadList(int job_id, String target_id) {
|
|
|
|
@ -1262,7 +1261,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param job_id
|
|
|
|
|
* @param target_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void getFormFillJob(int job_id, String target_id) {
|
|
|
|
@ -1333,7 +1332,7 @@ public class CollectController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:组列表
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void listGroup() {
|
|
|
|
|
//操作人员
|
|
|
|
@ -1372,7 +1371,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param group_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"group_id"})
|
|
|
|
|
public void getGroup(int group_id) {
|
|
|
|
@ -1385,7 +1384,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id http://10.10.21.20:9000/QingLong/collect/exportTableStructExcel?job_id=1
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void exportTableStructExcel(int job_id) {
|
|
|
|
@ -1546,7 +1545,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param file_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getFormJobFile(String file_id) {
|
|
|
|
|
Record record = cm.getFormJobFile(file_id);
|
|
|
|
@ -1654,7 +1653,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void viewForwardJobList(int job_id, int page, int limit) {
|
|
|
|
@ -1674,7 +1673,7 @@ public class CollectController extends Controller {
|
|
|
|
|
*
|
|
|
|
|
* @param job_id
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
@IsNumericInterface({"job_id"})
|
|
|
|
|
public void getSummaryExcel(int job_id) throws IOException {
|
|
|
|
@ -1713,7 +1712,7 @@ public class CollectController extends Controller {
|
|
|
|
|
/**
|
|
|
|
|
* 功能:获取当前人员的发布角色
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getCurrentPersonPublishRole() {
|
|
|
|
|
//操作人员
|
|
|
|
@ -1729,7 +1728,7 @@ public class CollectController extends Controller {
|
|
|
|
|
* @param school_id
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@Before({GET.class, RepeatIntercetpor.class})
|
|
|
|
|
@Before({GET.class})
|
|
|
|
|
@IsLoginInterface({})
|
|
|
|
|
public void getSchoolNjList(String school_id) {
|
|
|
|
|
//操作人员
|
|
|
|
@ -1741,4 +1740,88 @@ public class CollectController extends Controller {
|
|
|
|
|
List<Record> list = cm.getSchoolNjList(bureau_id);
|
|
|
|
|
renderJson(CommonUtil.renderJsonForLayUI(list));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 功能:填报系统专用登录接口,后期可以扩展支持天喻平台对接
|
|
|
|
|
* @param username
|
|
|
|
|
* @param password
|
|
|
|
|
*/
|
|
|
|
|
@Before({POST.class})
|
|
|
|
|
public void doFillLogin(String username, String password) {
|
|
|
|
|
JSONObject resultJson = new JSONObject();
|
|
|
|
|
String checkCodeKey = "";
|
|
|
|
|
|
|
|
|
|
if (StrKit.isBlank(username)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "用户名不允许为空!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (StrKit.isBlank(password)) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "密码不允许为空!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//检查缓存中此账号错误了几次
|
|
|
|
|
String PassWordKey = "WrongPassWord_" + username;
|
|
|
|
|
int ErrCnt = 4; //最多允许错几次 4+1
|
|
|
|
|
int cntNum = 0; //错几次了
|
|
|
|
|
|
|
|
|
|
if (RedisKit.Exists(PassWordKey))
|
|
|
|
|
cntNum = Integer.parseInt(RedisKit.Get(PassWordKey));
|
|
|
|
|
if (cntNum > ErrCnt) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "账号被停用5分钟,请稍后再试!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//与前端配合RSA通用加密解密
|
|
|
|
|
try {
|
|
|
|
|
password = RsaUtils.decryptDataOnJava(password, RsaUtils.PRIVATEKEY);
|
|
|
|
|
} catch (Exception err) {
|
|
|
|
|
password = "!@#$%^&&*^*&(*)(*_)^%^$%$^%$^%";
|
|
|
|
|
}
|
|
|
|
|
String passwordEncode = CommonUtil.getLdapPassword(password);
|
|
|
|
|
BaseModel bm = new BaseModel();
|
|
|
|
|
Map loginMap = bm.getLoginInfoByUserName(username);
|
|
|
|
|
if (loginMap == null || !passwordEncode.equals(loginMap.get("password").toString())) {
|
|
|
|
|
//扩展支持连续输入用户名密码错误,停用账号5分钟功能 2022.06.07
|
|
|
|
|
cntNum = 1;
|
|
|
|
|
if (RedisKit.Exists(PassWordKey))
|
|
|
|
|
cntNum = Integer.parseInt(RedisKit.Get(PassWordKey)) + cntNum;
|
|
|
|
|
|
|
|
|
|
int finalCntNum = cntNum;
|
|
|
|
|
RedisKit.incrBy(PassWordKey, finalCntNum);
|
|
|
|
|
RedisKit.Expire(PassWordKey, 60 * 5);
|
|
|
|
|
if (cntNum > ErrCnt) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "密码连续输入" + (ErrCnt + 1) + "次全部错误,账号将被停用5分钟!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (cntNum == ErrCnt) {
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "用户名或密码连续错误,你还有1次机会,再次错误后账号将被封掉5分钟!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
resultJson.put("success", false);
|
|
|
|
|
resultJson.put("msg", "用户名或密码错误!");
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
//去掉限制
|
|
|
|
|
RedisKit.Del(PassWordKey);
|
|
|
|
|
RedisKit.Del(checkCodeKey);
|
|
|
|
|
//防止用户攻击修改Cookie
|
|
|
|
|
Map<String, Object> _map = new HashMap<>();
|
|
|
|
|
_map.put("person_id", loginMap.get("person_id"));
|
|
|
|
|
|
|
|
|
|
SessionKit.set(getRequest(), getResponse(), "person_id", loginMap.get("person_id").toString());
|
|
|
|
|
resultJson.put("success", true);
|
|
|
|
|
resultJson.put("person_id", loginMap.get("person_id").toString());
|
|
|
|
|
renderJson(resultJson);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|