package com.huimv.receive.controller; import com.huimv.receive.common.utils.PdfUtil; import com.huimv.receive.common.utils.Result; import com.huimv.receive.common.utils.ResultCode; import com.huimv.receive.service.IBillLuggageService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.HashMap; import java.util.Map; /** *
* 前端控制器 *
* * @author author * @since 2023-07-24 */ @RestController @RequestMapping("/bill-luggage") @CrossOrigin public class BillLuggageController { @Autowired private IBillLuggageService billLuggageService; @PostMapping("/addLuggage") public Result addLuggage(HttpServletRequest httpServletRequest, @RequestParam("farmId") String farmId, @RequestParam("userName") String userName, @RequestParam("phone") String phone, @RequestParam("luggageDate") String luggageDate, @RequestParam("luggageLocation") String luggageLocation, @RequestParam("luggageLocationId") String luggageLocationId, @RequestParam("luggageNum") Integer luggageNum, @RequestParam(value = "img1",required = false) MultipartFile img, @RequestParam(value = "img2",required = false) MultipartFile img2, @RequestParam(value = "img3",required = false) MultipartFile img3, @RequestParam(value = "img4",required = false) MultipartFile img4, @RequestParam(value = "img5",required = false) MultipartFile img5) throws IOException { return billLuggageService.addLuggage(httpServletRequest,farmId,userName,phone,luggageDate,luggageLocation,luggageLocationId,luggageNum,img,img2,img3,img4,img5); } @PostMapping("/listPersonalLuggage") public Result listPersonalLuggage(HttpServletRequest httpServletRequest, @RequestBody Map