|
|
|
package com.docus.demo.controller;
|
|
|
|
|
|
|
|
|
|
|
|
import com.docus.demo.dto.SyncBasicDataDto;
|
|
|
|
import com.docus.demo.dto.SyncFileDto;
|
|
|
|
import com.docus.demo.entity.CommonResult;
|
|
|
|
import com.docus.demo.facade.ISyncBasicDataService;
|
|
|
|
import com.docus.demo.facade.ISyncBasicFileService;
|
|
|
|
import com.docus.demo.facade.IWebService;
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
@Api(value = "数据同步接口", tags = "数据同步接口")
|
|
|
|
@RestController("/sync")
|
|
|
|
public class SyncBasicDataController {
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
private ISyncBasicDataService syncBasicDataService;
|
|
|
|
@Autowired
|
|
|
|
private ISyncBasicFileService syncBasicFileService;
|
|
|
|
@Autowired
|
|
|
|
private IWebService webService;
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("去除文件不存在的数据")
|
|
|
|
@PostMapping("/deleteSync")
|
|
|
|
public CommonResult<?> deleteSync(@RequestBody SyncBasicDataDto syncBasicDataDto){
|
|
|
|
return syncBasicFileService.deleteSync(syncBasicDataDto);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("省厅-同步基础数据")
|
|
|
|
@PostMapping("/syncBasicData")
|
|
|
|
public CommonResult<?> syncBasicData(@RequestBody SyncBasicDataDto syncBasicDataDto){
|
|
|
|
return syncBasicDataService.syncBasicData(syncBasicDataDto);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("同步检验图片数据")
|
|
|
|
@PostMapping("/syncInspection")
|
|
|
|
public CommonResult<?> syncInspection(@RequestBody SyncBasicDataDto syncBasicDataDto) {
|
|
|
|
return webService.syncInspection(syncBasicDataDto);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("联众-同步基础数据")
|
|
|
|
@PostMapping("/syncLzBasicData")
|
|
|
|
public CommonResult<?> syncLzBasicData(@RequestBody SyncBasicDataDto syncBasicDataDto){
|
|
|
|
return syncBasicDataService.syncLzBasicData(syncBasicDataDto);
|
|
|
|
}
|
|
|
|
|
|
|
|
@ApiOperation("同步文件数据")
|
|
|
|
@PostMapping("/syncBasicFile")
|
|
|
|
public CommonResult<?> syncBasicFile(@RequestBody SyncFileDto syncFileDto){
|
|
|
|
return syncBasicFileService.syncBasicFile(syncFileDto);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|