|
@@ -1,21 +1,13 @@
|
|
|
package org.fouram.controller;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
-
|
|
|
import org.fouram.core.base.controller.BaseController;
|
|
|
import org.fouram.core.util.AppUtil;
|
|
|
import org.fouram.core.util.AppUtil.ResultConstant;
|
|
|
-import org.fouram.core.util.DateUtil;
|
|
|
import org.fouram.core.util.LoggerUtil;
|
|
|
-import org.fouram.service.SapApprovalInfoService;
|
|
|
-import org.fouram.service.SapCheckService;
|
|
|
-import org.fouram.service.SapEmployeeTimeService;
|
|
|
import org.fouram.service.SapReportService;
|
|
|
import org.fouram.service.SapUserService;
|
|
|
import org.fouram.service.TaskService;
|
|
|
import org.fouram.service.TestUserService;
|
|
|
-import org.fouram.service.WxDepartService;
|
|
|
-import org.fouram.service.WxUserService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Controller;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -28,21 +20,11 @@ public class TaskController extends BaseController {
|
|
|
@Autowired
|
|
|
private TaskService taskService;
|
|
|
@Autowired
|
|
|
- private WxUserService wxUserService;
|
|
|
- @Autowired
|
|
|
private SapUserService sapUserService;
|
|
|
@Autowired
|
|
|
- private WxDepartService wxDepartService;
|
|
|
- @Autowired
|
|
|
- private SapCheckService sapCheckService;
|
|
|
- @Autowired
|
|
|
private TestUserService testUserService;
|
|
|
@Autowired
|
|
|
private SapReportService sapReportService;
|
|
|
- @Autowired
|
|
|
- private SapEmployeeTimeService employeeTimeService;
|
|
|
- @Autowired
|
|
|
- private SapApprovalInfoService sapApprovalInfoService;
|
|
|
|
|
|
/**
|
|
|
* http://localhost:8080/sapcms/task/syncWeixinUser
|
|
@@ -93,77 +75,6 @@ public class TaskController extends BaseController {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * http://localhost:8080/sapcms/task/saveReportBaseData
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/saveReportBaseData", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
- public Object saveReportBaseData() {
|
|
|
- try {
|
|
|
- Date startDate = DateUtil.sdfTime.parse("2020-05-11 00:00:00");
|
|
|
- Date endDate = DateUtil.sdfTime.parse("2020-05-15 23:59:59");
|
|
|
- sapCheckService.saveAllUserCheckData(startDate, endDate);
|
|
|
- sapCheckService.saveCheckoutStartAndEndData();
|
|
|
- employeeTimeService.saveEmployeeTimes();
|
|
|
- sapCheckService.saveAllUserCheckOption();
|
|
|
- sapApprovalInfoService.saveApprovalInfos(DateUtil.sdfTime.parse("2020-05-01 00:00:00"), endDate);
|
|
|
- return AppUtil.success();
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * http://localhost:8080/sapcms/task/saveWxUsers
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/saveWxUsers", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
- public Object saveWxUsers() {
|
|
|
- try {
|
|
|
- wxUserService.saveUsers();
|
|
|
- return AppUtil.success();
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * http://localhost:8080/sapcms/task/saveWxDeparts
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/saveWxDeparts", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
- public Object saveWxDeparts() {
|
|
|
- try {
|
|
|
- wxDepartService.saveDeparts();
|
|
|
- return AppUtil.success();
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * http://localhost:8080/sapcms/task/saveReportResultData
|
|
|
- * @return
|
|
|
- */
|
|
|
- @RequestMapping(value = "/saveReportResultData", produces = "application/json;charset=utf-8")
|
|
|
- @ResponseBody
|
|
|
- public Object saveReportResultData() {
|
|
|
- try {
|
|
|
- sapCheckService.updateReportBaseData();
|
|
|
- sapCheckService.saveReportResultData();
|
|
|
- return AppUtil.success();
|
|
|
- } catch (Exception e) {
|
|
|
- LoggerUtil.error(e);
|
|
|
- return AppUtil.error(ResultConstant.WEB_ERR_MSG);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
* http://localhost:8080/sapcms/task/updateUnableData
|
|
|
* @return
|
|
|
*/
|