package com.fzzy.web; import com.bstek.dorado.util.DateUtils; import com.fzzy.api.data.ApiParam; import com.fzzy.async.fzzy30.Fzzy30SyncService12; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; /** * @author vince.xu * @Title: TestController * @ProjectName igds-api * @Description: TODO * @date 2022-9-2512:50 */ @Slf4j @Controller @RequestMapping public class TestController { @Autowired private Fzzy30SyncService12 fzzySyncService12; /** * */ @RequestMapping(value = "test", method = RequestMethod.GET) public String test(@RequestParam(name = "kqdm")String kqdm, @RequestParam(name = "deptId")String deptId, @RequestParam(name = "start")String start,@RequestParam(name = "end") String end) { try { ApiParam apiParam = new ApiParam(); apiParam.setKqdm(kqdm); apiParam.setDeptId(deptId); apiParam.setStart(DateUtils.parse("yyyy-MM-dd HH:mm:ss",start)); apiParam.setEnd(DateUtils.parse("yyyy-MM-dd HH:mm:ss",end)); fzzySyncService12.syncData(apiParam); } catch (Exception e) { log.error(e.getMessage(),e); e.printStackTrace(); } return ""; } }