| | |
| | | import com.ruoyi.common.utils.WebUtils; |
| | | import com.ruoyi.system.dto.TIntegralSettlementDTO; |
| | | import com.ruoyi.system.export.IntegralSettlementImport; |
| | | import com.ruoyi.system.model.TIntegralSettlement; |
| | | import com.ruoyi.system.query.TIntegralSettlementDetailQuery; |
| | | import com.ruoyi.system.query.TIntegralSettlementQuery; |
| | | import com.ruoyi.system.service.TIntegralSettlementService; |
| | | import com.ruoyi.system.vo.TIntegralSettlementDetailVO; |
| | | import com.ruoyi.system.vo.TIntegralSettlementVO; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | import java.io.IOException; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 积分结算 前端控制器 |
| | |
| | | private final TIntegralSettlementService integralSettlementService; |
| | | |
| | | @ApiOperation(value = "积分结算列表(分页)") |
| | | @PostMapping("/pageList") |
| | | @PostMapping("/page-list") |
| | | public R<Page<TIntegralSettlementVO>> pageList(@RequestBody TIntegralSettlementQuery query) { |
| | | return R.ok(integralSettlementService.getSettlementPageList(query)); |
| | | } |
| | |
| | | response.setHeader("content-Type", "application/vnd.ms-excel"); |
| | | response.setHeader("Pragma", "no-cache"); |
| | | response.setHeader("Cache-Control", "no-cache"); |
| | | workbook.write(outputStream); |
| | | outputStream = response.getOutputStream(); |
| | | workbook.write(outputStream); |
| | | } catch (IOException e) { |
| | | log.error("积分结算导入模板下载失败", e); |
| | | } finally { |
| | |
| | | integralSettlementService.importData(file, dto); |
| | | return R.ok(); |
| | | } |
| | | @ApiOperation("详情") |
| | | @GetMapping("/detail/{id}") |
| | | public R<TIntegralSettlementVO> detail(@PathVariable Integer id) { |
| | | return R.ok(integralSettlementService.getDetail(id)); |
| | | } |
| | | |
| | | @ApiOperation(value = "积分结算详情列表(分页)") |
| | | @PostMapping("/detail/page-list") |
| | | public R<Page<TIntegralSettlementDetailVO>> pageDetailList(@RequestBody TIntegralSettlementDetailQuery query) { |
| | | return R.ok(integralSettlementService.getSettlementDetailPageList(query)); |
| | | } |
| | | } |