yangys
2025-07-31 4a54cd2dcc4f1e239e1e68b352b532e09b974f33
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
package org.springblade.qinzhesync.controller;
 
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springblade.core.tool.api.R;
import org.springblade.qinzhesync.service.QinzheSyncService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
 
@Slf4j
@RestController
@RequestMapping("/test/qinzhe")
@Tag(name = "主制分工表", description = "主制分工表")
public class SyncController {
 
    @Autowired
    private QinzheSyncService service;
 
    /**
     * 新增
     */
    @GetMapping("/sync")
    @Operation(summary = "同步", description = "同步分工表")
    public R<Boolean> sync() {
        try {
            service.syncData();
        }catch (Exception e) {
            log.error("同步失败", e);;
            return R.fail(e.getMessage());
        }
        return R.<Boolean>status(true);
    }
 
}