|
|
|
@ -0,0 +1,44 @@
|
|
|
|
|
package com.docus.server.report.controller;
|
|
|
|
|
|
|
|
|
|
import com.docus.core.util.Func;
|
|
|
|
|
import com.docus.infrastructure.web.api.CommonResult;
|
|
|
|
|
import com.docus.server.report.service.ReportService;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @author wyb
|
|
|
|
|
* 文件上报下载服务
|
|
|
|
|
*/
|
|
|
|
|
@Slf4j
|
|
|
|
|
@Api(tags = "文件上报,补偿控制")
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/report/makeup")
|
|
|
|
|
public class ReportDownController {
|
|
|
|
|
@Resource
|
|
|
|
|
private ReportService reportService;
|
|
|
|
|
|
|
|
|
|
@ApiOperation(value = "根据任务id补偿报告下载")
|
|
|
|
|
@PostMapping("/makeupReportByTaskIds")
|
|
|
|
|
public CommonResult<String> makeupReportByTaskIds(@RequestBody List<Long> taskIds){
|
|
|
|
|
if (Func.isEmpty(taskIds)) {
|
|
|
|
|
return CommonResult.failed("补偿任务id不能为空!");
|
|
|
|
|
}
|
|
|
|
|
try {
|
|
|
|
|
reportService.makeupReportByTaskIds(taskIds);
|
|
|
|
|
} catch (Exception ex) {
|
|
|
|
|
log.error(ex.getMessage(), ex);
|
|
|
|
|
return CommonResult.failed("补偿出现了一点小问题!");
|
|
|
|
|
}
|
|
|
|
|
return CommonResult.success("补偿成功!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|