|
@@ -19,8 +19,10 @@ import org.fouram.core.util.ConfConfig;
|
|
import org.fouram.core.util.LoggerUtil;
|
|
import org.fouram.core.util.LoggerUtil;
|
|
import org.fouram.entity.SapOrg;
|
|
import org.fouram.entity.SapOrg;
|
|
import org.fouram.entity.SapUser;
|
|
import org.fouram.entity.SapUser;
|
|
|
|
+import org.fouram.service.SapCheckService;
|
|
import org.fouram.service.SapOrgService;
|
|
import org.fouram.service.SapOrgService;
|
|
import org.fouram.service.SapUserService;
|
|
import org.fouram.service.SapUserService;
|
|
|
|
+import org.fouram.service.WxDepartService;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -39,6 +41,10 @@ public class ApiController extends BaseController {
|
|
@Autowired
|
|
@Autowired
|
|
private SapUserService sapUserService;
|
|
private SapUserService sapUserService;
|
|
@Autowired
|
|
@Autowired
|
|
|
|
+ private WxDepartService wxDepartService;
|
|
|
|
+ @Autowired
|
|
|
|
+ private SapCheckService sapCheckService;
|
|
|
|
+ @Autowired
|
|
private static final String TOKEN = "UserId";
|
|
private static final String TOKEN = "UserId";
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -213,5 +219,33 @@ public class ApiController extends BaseController {
|
|
}
|
|
}
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "/findDepartJSON", produces = "application/json;charset=utf-8")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public Object findDepartJSON(HttpServletRequest request) {
|
|
|
|
+ try {
|
|
|
|
+ return AppUtil.success(wxDepartService.findDepartJSON(), null);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ LoggerUtil.error(e);
|
|
|
|
+ return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @RequestMapping(value = "/findUserReports", produces = "application/json;charset=utf-8")
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public Object findUsers(HttpServletRequest request) {
|
|
|
|
+ try {
|
|
|
|
+ // 开始时间、结束时间、 部门、姓名
|
|
|
|
+ String startDate = getPageData().getString("startDate");
|
|
|
|
+ String endDate = getPageData().getString("endDate");
|
|
|
|
+ String departId = getPageData().getString("departId");
|
|
|
|
+ String name = getPageData().getString("name");
|
|
|
|
+ return AppUtil.success(sapCheckService.findUserReports(startDate, endDate, departId, name), null);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
+ LoggerUtil.error(e);
|
|
|
|
+ return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
}
|
|
}
|