|
|
|
@ -4,11 +4,9 @@ import com.weaver.common.authority.annotation.WeaPermission;
|
|
|
|
|
import com.weaver.common.base.entity.result.WeaResult;
|
|
|
|
|
import com.weaver.ebuilder.datasource.api.entity.SqlParamEntity;
|
|
|
|
|
import com.weaver.ebuilder.datasource.api.enums.SqlParamType;
|
|
|
|
|
import com.weaver.em.msg.api.rest.OaRest;
|
|
|
|
|
import com.weaver.framework.remote.client.rest.RestClient;
|
|
|
|
|
import com.weaver.framework.rpc.annotation.RpcReference;
|
|
|
|
|
import com.weaver.mc.api.async.AsyncSystemMessageRest;
|
|
|
|
|
import com.weaver.mc.api.entity.*;
|
|
|
|
|
import com.weaver.mc.api.rest.SystemMessageRest;
|
|
|
|
|
import com.weaver.seconddev.jcldoor.util.DatabaseUtils;
|
|
|
|
|
import com.weaver.seconddev.jcldoor.util.JucailinPortalUtils;
|
|
|
|
@ -64,7 +62,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
DocClientService docClientService;
|
|
|
|
|
|
|
|
|
|
@RpcReference
|
|
|
|
|
private OaRest oaRest;
|
|
|
|
|
private com.weaver.em.msg.api.rest.OaRest oaRest;
|
|
|
|
|
|
|
|
|
|
@RpcReference
|
|
|
|
|
private RemoteBlogInfoService remoteBlogInfoService ;
|
|
|
|
@ -83,37 +81,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
|
|
|
|
|
public String tenant_key = "t7akvdnf84" ;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi10")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi10(HttpServletRequest request){
|
|
|
|
|
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi10");
|
|
|
|
|
try {
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
log.error("employee:"+employee.getEmployeeId());
|
|
|
|
|
|
|
|
|
|
employee.getFormdata();
|
|
|
|
|
|
|
|
|
|
RequestListConditionApiEntity conditionEntity = new RequestListConditionApiEntity();
|
|
|
|
|
log.error("3333333");
|
|
|
|
|
WeaResult<RequestCountInfoPAEntity> requestCountInfo = wflRequestListRest.getRequestCountByTabId(employee, RequestListInitDimensionTabEnum.DONE_FLOWALL.getTabid(), conditionEntity);
|
|
|
|
|
log.error("requestCountInfo:"+requestCountInfo.toString());
|
|
|
|
|
int code = requestCountInfo.getCode();
|
|
|
|
|
log.error("code:"+code);
|
|
|
|
|
RequestCountInfoPAEntity requestCountInfoPAEntity = requestCountInfo.getData();
|
|
|
|
|
log.error("requestCountInfoPAEntity:"+requestCountInfoPAEntity);
|
|
|
|
|
long count = requestCountInfoPAEntity.getCount();
|
|
|
|
|
log.error("count:"+count);
|
|
|
|
|
dataMap.put("code",code);
|
|
|
|
|
dataMap.put("count",count);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi10:"+e);
|
|
|
|
|
dataMap.put("count","-1");
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi13")
|
|
|
|
@ -129,7 +97,7 @@ public class HrmSelfHelpController {
|
|
|
|
|
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
|
int year = cal.get(Calendar.YEAR);
|
|
|
|
|
String startDate = year+"-01-01";
|
|
|
|
|
String startDate = "2018-01-01";
|
|
|
|
|
|
|
|
|
|
//设置当前时间
|
|
|
|
|
cal.setTime(new Date());
|
|
|
|
@ -172,47 +140,32 @@ public class HrmSelfHelpController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi14")
|
|
|
|
|
@GetMapping("/testSapi16")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi14(HttpServletRequest request){
|
|
|
|
|
//com.weaver.workrelate.performance.api.rest.RemotePerformanceService#queryFlowData
|
|
|
|
|
public WeaResult<Object> testSapi16(HttpServletRequest request){
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi14");
|
|
|
|
|
dataMap.put("test","testSapi16");
|
|
|
|
|
|
|
|
|
|
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
SimpleEmployee employee = UserContext.getCurrentUser();
|
|
|
|
|
|
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
|
int year = cal.get(Calendar.YEAR);
|
|
|
|
|
String startDate = year+"-01-01";
|
|
|
|
|
|
|
|
|
|
//设置当前时间
|
|
|
|
|
cal.setTime(new Date());
|
|
|
|
|
//同理增加一天的方法:
|
|
|
|
|
cal.add(Calendar.DATE, 1);
|
|
|
|
|
String endDate = format.format(cal.getTime());
|
|
|
|
|
|
|
|
|
|
Long cid = employee.getCid();
|
|
|
|
|
String pageSize = "100";
|
|
|
|
|
String pageNum = "1";
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
com.weaver.em.msg.api.entity.Response response = oaRest.executeIm(emrequest);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi13:"+e);
|
|
|
|
|
dataMap.put("count","-1");
|
|
|
|
|
}
|
|
|
|
|
return WeaResult.success(dataMap);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String data = response.getData();
|
|
|
|
|
dataMap.put("datas",data);
|
|
|
|
|
|
|
|
|
|
@GetMapping("/testSapi15")
|
|
|
|
|
@WeaPermission(publicPermission = true)
|
|
|
|
|
public WeaResult<Object> testSapi15(HttpServletRequest request){
|
|
|
|
|
//com.weaver.workrelate.performance.api.rest.RemotePerformanceService#queryFlowData
|
|
|
|
|
Map<String,Object> dataMap = new HashMap<String,Object>();
|
|
|
|
|
dataMap.put("test","testSapi15");
|
|
|
|
|
try {
|
|
|
|
|
jucailinPortalUtils.getChatGroup();
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
log.error("testSapi14:"+e);
|
|
|
|
|