CZT
2023-12-01 9541189ca4c0e4dc21a6402d5f879b63d892eb60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 "";
    }
}