| | |
| | | package org.springblade.jfpt.parcel.controller; |
| | | |
| | | import lombok.AllArgsConstructor; |
| | | import org.springblade.core.excel.util.ExcelUtil; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.DateUtil; |
| | | import org.springblade.jfpt.animalheat.vo.AnimalHeatVo; |
| | | import org.springblade.jfpt.healthcode.vo.HealthcodeExcel; |
| | | import org.springblade.jfpt.healthcode.vo.HealthcodeVO; |
| | | import org.springblade.jfpt.parcel.service.ParcelService; |
| | | import org.springblade.jfpt.parcel.vo.ConditionVo; |
| | | import org.springblade.jfpt.parcel.vo.ParcelExcel; |
| | | import org.springblade.jfpt.parcel.vo.ParcelKindExcel; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title 包裹控制层 |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取包裹违禁品明细分页数据,远程调用api获取数据 |
| | | * @param conditionVo 请求参数对象 |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @GetMapping("/getParcelkindDetailPage") |
| | | public R getParcelkindDetailPage(ConditionVo conditionVo,HttpServletResponse response){ |
| | | response.setHeader("Access-Control-Allow-Origin", "*"); |
| | | response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE"); |
| | | response.setHeader("Access-Control-Allow-Credentials","true"); |
| | | return R.data(parcelService.getParcelkindDetailPage(conditionVo)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 导出包裹数据表格 |
| | | * @param conditionVo 查询条件 |
| | | * @param response |
| | | */ |
| | | @GetMapping("/export-parcel") |
| | | public void exportParcel(ConditionVo conditionVo, HttpServletResponse response){ |
| | | List<ParcelExcel> list = parcelService.exportParcel(conditionVo); |
| | | ExcelUtil.export(response, "包裹数据" + DateUtil.time(), "包裹数据表", list, ParcelExcel.class); |
| | | } |
| | | |
| | | /** |
| | | * 导出违禁品数据表格 |
| | | * @param conditionVo 查询条件 |
| | | * @param response |
| | | */ |
| | | @GetMapping("/export-parcelKind") |
| | | public void exportParcelKind(ConditionVo conditionVo, HttpServletResponse response){ |
| | | List<ParcelKindExcel> list = parcelService.exportParcelKind(conditionVo); |
| | | System.out.println("list = " + list); |
| | | ExcelUtil.export(response, "违禁品数据" + DateUtil.time(), "违禁品数据表", list, ParcelKindExcel.class); |
| | | } |
| | | |
| | | |
| | | } |