| | |
| | | package com.ycl.platform.controller; |
| | | |
| | | import annotation.Log; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ycl.platform.domain.entity.CalculateMoneyRule; |
| | | import com.ycl.platform.domain.entity.TContract; |
| | | import com.ycl.platform.domain.entity.TMonitor; |
| | | import com.ycl.platform.domain.query.ContractQuery; |
| | | import com.ycl.platform.domain.query.YwUnitQuery; |
| | | import com.ycl.platform.domain.vo.TMonitorVO; |
| | | import com.ycl.platform.service.ITContractService; |
| | | import com.ycl.system.AjaxResult; |
| | | import com.ycl.system.Result; |
| | | import com.ycl.system.controller.BaseController; |
| | | import com.ycl.utils.poi.ExcelUtil; |
| | | import com.ycl.system.page.TableDataInfo; |
| | | import enumeration.BusinessType; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 【请填写功能名称】Controller |
| | |
| | | |
| | | private final ITContractService tContractService; |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:contract:list')") |
| | | @GetMapping("/list") |
| | | public Result page(ContractQuery query) { |
| | | return tContractService.selectAll(query); |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:contract:query')") |
| | | @GetMapping("/selectMoneyRules") |
| | | public AjaxResult selectMoneyRules(Integer contractId) { |
| | | return success(tContractService.selectMoneyRules(contractId)); |
| | | } |
| | | |
| | | /** |
| | | * 合同导入模板 |
| | |
| | | /** |
| | | * 合同导入 |
| | | * |
| | | * @param file 导入文件 |
| | | * @param unitId 运维单位 |
| | | * @param startTime 开始时间 |
| | | * @param endTime 结束时间 |
| | | * @return 导入结果 |
| | | */ |
| | | @Log(title = "合同导入", businessType = BusinessType.IMPORT) |
| | | @PreAuthorize("@ss.hasPermi('system:user:import')") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file, String unitId, String startTime, String endTime) { |
| | | ExcelUtil<TContract> util = new ExcelUtil<>(TContract.class); |
| | | return success(); |
| | | public AjaxResult importData(TContract tContract) { |
| | | return tContractService.importData(tContract.getFile(), tContract); |
| | | } |
| | | |
| | | /** |