Blame view

ServiceCompanyFilesController.java 2.15 KB
涂亚平 committed
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 45 46 47 48 49 50 51 52 53 54 55
package com.subsidy.controller;


import com.subsidy.common.ResponseData;
import com.subsidy.common.ResponseVO;
import com.subsidy.dto.company.CompanyFilesDTO;
import com.subsidy.dto.company.GetServiceCompaniesDTO;
import com.subsidy.dto.service.CancelAuthDTO;
import com.subsidy.model.ServiceCompanyFilesDO;
import com.subsidy.service.ServiceCompanyFilesService;
import com.subsidy.service.ServiceCompanyMappingService;
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.RequestMapping;

import org.springframework.web.bind.annotation.RestController;
import io.swagger.annotations.Api;

/**
 * <p>
 * 协议管理材料表 前端控制器
 * </p>
 *
 * @author Tuyp
 * @since 2024-01-11
 */
@RestController
@Api(tags = "协议管理材料表")
@RequestMapping("/serviceCompanyFiles")
public class ServiceCompanyFilesController {

    @Autowired
    private ServiceCompanyFilesService serviceCompanyFilesService;

    @PostMapping("companyFiles")
    @ApiOperation("查看业务合同/业务材料  pageSize pageNum  fileName serviceCompanyId  fileType  0:业务合同 1:业务材料 ")
    public ResponseVO companyFiles(@RequestBody CompanyFilesDTO companyFilesDTO){
        return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.companyFiles(companyFilesDTO));
    }

    @PostMapping("deleteFile")
    @ApiOperation("删除协议/材料 id companyFiles返回的id")
    public ResponseVO deleteFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){
        return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.deleteFile(serviceCompanyFilesDO));
    }

    @PostMapping("uploadFile")
    @ApiOperation("上传新文件 serviceCompanyId  fileType  0:业务合同 1:业务材料 fileName fileAddress ")
    public ResponseVO uploadFile(@RequestBody ServiceCompanyFilesDO serviceCompanyFilesDO){
        return ResponseData.generateCreatedResponse(0,serviceCompanyFilesService.uploadFile(serviceCompanyFilesDO));
    }

}