|
|
|
@ -101,116 +101,116 @@ public class HrmSelfHelpController {
|
|
|
|
|
public String tenant_key = "t7akvdnf84" ;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi12")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi12(HttpServletRequest request){
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi13");
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
String pageSize = request.getParameter("pagesize");
|
|
|
|
|
String pageNum = request.getParameter("pagenum");
|
|
|
|
|
String startDate = request.getParameter("startDate");
|
|
|
|
|
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
if(StringUtils.isBlank(startDate)){
|
|
|
|
|
startDate = "2001-01-01";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
|
//设置当前时间
|
|
|
|
|
cal.setTime(new Date());
|
|
|
|
|
//同理增加一天的方法:
|
|
|
|
|
cal.add(Calendar.DATE, -1);
|
|
|
|
|
String endDate = format.format(cal.getTime());
|
|
|
|
|
Long cid = employee.getCid();
|
|
|
|
|
dataMap.put("startDate",startDate);
|
|
|
|
|
dataMap.put("endDate",endDate);
|
|
|
|
|
dataMap.put("cid",cid);
|
|
|
|
|
|
|
|
|
|
dataMap.put("pageSize",pageSize);
|
|
|
|
|
dataMap.put("pageNum",pageNum);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> json = new HashMap<String, Object>();
|
|
|
|
|
json.put("cid",cid);
|
|
|
|
|
json.put("pageNum",pageNum);
|
|
|
|
|
json.put("pageSize",pageSize);
|
|
|
|
|
json.put("startDate",startDate);
|
|
|
|
|
json.put("endDate",endDate);
|
|
|
|
|
|
|
|
|
|
com.weaver.em.msg.api.entity.Request emrequest = new com.weaver.em.msg.api.entity.Request();
|
|
|
|
|
emrequest.setUrl("/user-profile/dailySingleSession");
|
|
|
|
|
emrequest.setParamsMap(json);
|
|
|
|
|
emrequest.setAsync(false);
|
|
|
|
|
com.weaver.em.msg.api.entity.Response response2 = oaRest.executeIm(emrequest);
|
|
|
|
|
String data = response2.getData();
|
|
|
|
|
dataMap.put("datas",data);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi13:"+e);
|
|
|
|
|
dataMap.put("count","-1");
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi13")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi13(HttpServletRequest request){
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi13");
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
String pageSize = request.getParameter("pagesize");
|
|
|
|
|
String pageNum = request.getParameter("pagenum");
|
|
|
|
|
String startDate = request.getParameter("startDate");
|
|
|
|
|
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
if(StringUtils.isBlank(startDate)){
|
|
|
|
|
startDate = "2001-01-01";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
|
//设置当前时间
|
|
|
|
|
cal.setTime(new Date());
|
|
|
|
|
//同理增加一天的方法:
|
|
|
|
|
cal.add(Calendar.DATE, -1);
|
|
|
|
|
String endDate = format.format(cal.getTime());
|
|
|
|
|
Long cid = employee.getCid();
|
|
|
|
|
dataMap.put("startDate",startDate);
|
|
|
|
|
dataMap.put("endDate",endDate);
|
|
|
|
|
dataMap.put("cid",cid);
|
|
|
|
|
|
|
|
|
|
dataMap.put("pageSize",pageSize);
|
|
|
|
|
dataMap.put("pageNum",pageNum);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Map<String, Object> json = new HashMap<String, Object>();
|
|
|
|
|
json.put("cid",cid);
|
|
|
|
|
json.put("pageNum",pageNum);
|
|
|
|
|
json.put("pageSize",pageSize);
|
|
|
|
|
json.put("startDate",startDate);
|
|
|
|
|
json.put("endDate",endDate);
|
|
|
|
|
|
|
|
|
|
com.weaver.em.msg.api.entity.Request emrequest = new com.weaver.em.msg.api.entity.Request();
|
|
|
|
|
emrequest.setUrl("/user-profile/groupSession");
|
|
|
|
|
emrequest.setParamsMap(json);
|
|
|
|
|
emrequest.setAsync(false);
|
|
|
|
|
com.weaver.em.msg.api.entity.Response response2 = oaRest.executeIm(emrequest);
|
|
|
|
|
String data = response2.getData();
|
|
|
|
|
dataMap.put("datas",data);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi13:"+e);
|
|
|
|
|
dataMap.put("count","-1");
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
// @GetMapping("/testSapi12")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<Object> testSapi12(HttpServletRequest request){
|
|
|
|
|
// Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
// dataMap.put("test","testSapi13");
|
|
|
|
|
//
|
|
|
|
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
// try {
|
|
|
|
|
//
|
|
|
|
|
// String pageSize = request.getParameter("pagesize");
|
|
|
|
|
// String pageNum = request.getParameter("pagenum");
|
|
|
|
|
// String startDate = request.getParameter("startDate");
|
|
|
|
|
//
|
|
|
|
|
// SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
// if(StringUtils.isBlank(startDate)){
|
|
|
|
|
// startDate = "2001-01-01";
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// Calendar cal = Calendar.getInstance();
|
|
|
|
|
// //设置当前时间
|
|
|
|
|
// cal.setTime(new Date());
|
|
|
|
|
// //同理增加一天的方法:
|
|
|
|
|
// cal.add(Calendar.DATE, -1);
|
|
|
|
|
// String endDate = format.format(cal.getTime());
|
|
|
|
|
// Long cid = employee.getCid();
|
|
|
|
|
// dataMap.put("startDate",startDate);
|
|
|
|
|
// dataMap.put("endDate",endDate);
|
|
|
|
|
// dataMap.put("cid",cid);
|
|
|
|
|
//
|
|
|
|
|
// dataMap.put("pageSize",pageSize);
|
|
|
|
|
// dataMap.put("pageNum",pageNum);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Map<String, Object> json = new HashMap<String, Object>();
|
|
|
|
|
// json.put("cid",cid);
|
|
|
|
|
// json.put("pageNum",pageNum);
|
|
|
|
|
// json.put("pageSize",pageSize);
|
|
|
|
|
// json.put("startDate",startDate);
|
|
|
|
|
// json.put("endDate",endDate);
|
|
|
|
|
//
|
|
|
|
|
// com.weaver.em.msg.api.entity.Request emrequest = new com.weaver.em.msg.api.entity.Request();
|
|
|
|
|
// emrequest.setUrl("/user-profile/dailySingleSession");
|
|
|
|
|
// emrequest.setParamsMap(json);
|
|
|
|
|
// emrequest.setAsync(false);
|
|
|
|
|
// com.weaver.em.msg.api.entity.Response response2 = oaRest.executeIm(emrequest);
|
|
|
|
|
// String data = response2.getData();
|
|
|
|
|
// dataMap.put("datas",data);
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// log.error("testSapi13:"+e);
|
|
|
|
|
// dataMap.put("count","-1");
|
|
|
|
|
// }
|
|
|
|
|
// return WeaResult.success(dataMap);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// @GetMapping("/testSapi13")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<Object> testSapi13(HttpServletRequest request){
|
|
|
|
|
// Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
// dataMap.put("test","testSapi13");
|
|
|
|
|
//
|
|
|
|
|
// SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
// try {
|
|
|
|
|
//
|
|
|
|
|
// String pageSize = request.getParameter("pagesize");
|
|
|
|
|
// String pageNum = request.getParameter("pagenum");
|
|
|
|
|
// String startDate = request.getParameter("startDate");
|
|
|
|
|
//
|
|
|
|
|
// SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
// if(StringUtils.isBlank(startDate)){
|
|
|
|
|
// startDate = "2001-01-01";
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// Calendar cal = Calendar.getInstance();
|
|
|
|
|
// //设置当前时间
|
|
|
|
|
// cal.setTime(new Date());
|
|
|
|
|
// //同理增加一天的方法:
|
|
|
|
|
// cal.add(Calendar.DATE, -1);
|
|
|
|
|
// String endDate = format.format(cal.getTime());
|
|
|
|
|
// Long cid = employee.getCid();
|
|
|
|
|
// dataMap.put("startDate",startDate);
|
|
|
|
|
// dataMap.put("endDate",endDate);
|
|
|
|
|
// dataMap.put("cid",cid);
|
|
|
|
|
//
|
|
|
|
|
// dataMap.put("pageSize",pageSize);
|
|
|
|
|
// dataMap.put("pageNum",pageNum);
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// Map<String, Object> json = new HashMap<String, Object>();
|
|
|
|
|
// json.put("cid",cid);
|
|
|
|
|
// json.put("pageNum",pageNum);
|
|
|
|
|
// json.put("pageSize",pageSize);
|
|
|
|
|
// json.put("startDate",startDate);
|
|
|
|
|
// json.put("endDate",endDate);
|
|
|
|
|
//
|
|
|
|
|
// com.weaver.em.msg.api.entity.Request emrequest = new com.weaver.em.msg.api.entity.Request();
|
|
|
|
|
// emrequest.setUrl("/user-profile/groupSession");
|
|
|
|
|
// emrequest.setParamsMap(json);
|
|
|
|
|
// emrequest.setAsync(false);
|
|
|
|
|
// com.weaver.em.msg.api.entity.Response response2 = oaRest.executeIm(emrequest);
|
|
|
|
|
// String data = response2.getData();
|
|
|
|
|
// dataMap.put("datas",data);
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// log.error("testSapi13:"+e);
|
|
|
|
|
// dataMap.put("count","-1");
|
|
|
|
|
// }
|
|
|
|
|
// return WeaResult.success(dataMap);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// @GetMapping("/testSapi15")
|
|
|
|
@ -674,8 +674,6 @@ public class HrmSelfHelpController {
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi60(HttpServletRequest request){
|
|
|
|
|
log.error("testSapi60");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Long count = 0L ;
|
|
|
|
|
try{
|
|
|
|
|
RequestListConditionApiEntity conditionEntity = new RequestListConditionApiEntity();
|
|
|
|
@ -1822,72 +1820,72 @@ public class HrmSelfHelpController {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test200")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> test200(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","test200");
|
|
|
|
|
try {
|
|
|
|
|
String objid = request.getParameter("objid");
|
|
|
|
|
if(StringUtils.isNotBlank(objid)) {
|
|
|
|
|
Long obj_id = Long.valueOf(objid);
|
|
|
|
|
WeaResult<Obj> list = remoteEBObjService.getObjInfo(obj_id,tenant_key);
|
|
|
|
|
dataMap.put("datas",list);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("test200:"+e);
|
|
|
|
|
dataMap.put("message",e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test201")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> test201(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","test201");
|
|
|
|
|
String columnnames = request.getParameter("columnnames");
|
|
|
|
|
String objid = request.getParameter("objid");
|
|
|
|
|
log.error("objid:"+objid);
|
|
|
|
|
try {
|
|
|
|
|
if(StringUtils.isNotBlank(objid)){
|
|
|
|
|
Long obj_id = Long.valueOf(objid);
|
|
|
|
|
List<Obj> fieldlist = remoteEBObjService.getAllTablesByMasterId(obj_id,tenant_key);
|
|
|
|
|
dataMap.put("datas",fieldlist);
|
|
|
|
|
}
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("test201:"+e);
|
|
|
|
|
dataMap.put("message",e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @GetMapping("/test200")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<Object> test200(HttpServletRequest request){
|
|
|
|
|
//
|
|
|
|
|
// Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
// dataMap.put("test","test200");
|
|
|
|
|
// try {
|
|
|
|
|
// String objid = request.getParameter("objid");
|
|
|
|
|
// if(StringUtils.isNotBlank(objid)) {
|
|
|
|
|
// Long obj_id = Long.valueOf(objid);
|
|
|
|
|
// WeaResult<Obj> list = remoteEBObjService.getObjInfo(obj_id,tenant_key);
|
|
|
|
|
// dataMap.put("datas",list);
|
|
|
|
|
// }
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// log.error("test200:"+e);
|
|
|
|
|
// dataMap.put("message",e.getMessage());
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
// return WeaResult.success(dataMap);
|
|
|
|
|
// }
|
|
|
|
|
//
|
|
|
|
|
//
|
|
|
|
|
// @GetMapping("/test201")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<Object> test201(HttpServletRequest request){
|
|
|
|
|
//
|
|
|
|
|
// Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
// dataMap.put("test","test201");
|
|
|
|
|
// String columnnames = request.getParameter("columnnames");
|
|
|
|
|
// String objid = request.getParameter("objid");
|
|
|
|
|
// log.error("objid:"+objid);
|
|
|
|
|
// try {
|
|
|
|
|
// if(StringUtils.isNotBlank(objid)){
|
|
|
|
|
// Long obj_id = Long.valueOf(objid);
|
|
|
|
|
// List<Obj> fieldlist = remoteEBObjService.getAllTablesByMasterId(obj_id,tenant_key);
|
|
|
|
|
// dataMap.put("datas",fieldlist);
|
|
|
|
|
// }
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// log.error("test201:"+e);
|
|
|
|
|
// dataMap.put("message",e.getMessage());
|
|
|
|
|
// }
|
|
|
|
|
// return WeaResult.success(dataMap);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test202")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> test202(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","test202");
|
|
|
|
|
try {
|
|
|
|
|
String TenantKey = TenantRpcContext.getTenantKey();
|
|
|
|
|
dataMap.put("TenantKey",TenantKey);
|
|
|
|
|
String appIds = request.getParameter("appIds");
|
|
|
|
|
List<Obj> list = IEtFormDatasetService.getTables(appIds);
|
|
|
|
|
dataMap.put("datas",list);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("test202:"+e);
|
|
|
|
|
dataMap.put("message",e.getMessage());
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
// @GetMapping("/test202")
|
|
|
|
|
// @WeaPermission(publicPermission = true)
|
|
|
|
|
// public WeaResult<Object> test202(HttpServletRequest request){
|
|
|
|
|
//
|
|
|
|
|
// Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
// dataMap.put("test","test202");
|
|
|
|
|
// try {
|
|
|
|
|
// String TenantKey = TenantRpcContext.getTenantKey();
|
|
|
|
|
// dataMap.put("TenantKey",TenantKey);
|
|
|
|
|
// String appIds = request.getParameter("appIds");
|
|
|
|
|
// List<Obj> list = IEtFormDatasetService.getTables(appIds);
|
|
|
|
|
// dataMap.put("datas",list);
|
|
|
|
|
// } catch (Exception e) {
|
|
|
|
|
// e.printStackTrace();
|
|
|
|
|
// log.error("test202:"+e);
|
|
|
|
|
// dataMap.put("message",e.getMessage());
|
|
|
|
|
// }
|
|
|
|
|
// return WeaResult.success(dataMap);
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/test203")
|
|
|
|
|