| | |
| | | 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.List; |
| | | |
| | |
| | | @PostMapping("uploadBomAcceptance") |
| | | public Response uploadBomAcceptance(@RequestParam(required = false) MultipartFile fileLeft,@RequestParam(required = false) MultipartFile fileRight |
| | | ,@RequestParam(required = false) MultipartFile fileFront,@RequestParam(required = false) MultipartFile fileBack |
| | | ,@RequestParam(required = false) MultipartFile agreement |
| | | ,@RequestPart(required = false) List<MultipartFile> multipartFileList, @RequestParam String feedbackJson) throws IOException { |
| | | ,@RequestParam(required = false) MultipartFile agreement,@RequestParam(required = false) MultipartFile bomManual |
| | | ,@RequestParam(required = false) MultipartFile testReport,@RequestParam(required = false) MultipartFile icdFile |
| | | ,@RequestParam(required = false) MultipartFile cadPicpart,@RequestParam(required = false) MultipartFile namePlate |
| | | ,@RequestPart(required = false) List<MultipartFile> multipartFileList,@RequestPart(required = false) List<MultipartFile> installCasePics |
| | | ,@RequestParam String feedbackJson) throws IOException { |
| | | BomAcceptance bomAcceptance = ActionUtil.getGson().fromJson(feedbackJson, BomAcceptance.class); |
| | | return service.uploadBomAcceptance(fileLeft,fileRight,fileFront,fileBack,agreement,multipartFileList,bomAcceptance); |
| | | return service.uploadBomAcceptance(fileLeft,fileRight,fileFront,fileBack |
| | | ,agreement,bomManual,testReport,icdFile,cadPicpart,namePlate |
| | | ,multipartFileList,installCasePics |
| | | ,bomAcceptance); |
| | | } |
| | | |
| | | @ApiOperation("查询产品验收信息") |
| | |
| | | |
| | | @ApiOperation(value = "编辑单个图片上传") |
| | | @PostMapping("updateDevPic") |
| | | public Response updateDevPic(@RequestParam(required = false) MultipartFile filePic,@RequestParam int num,@RequestParam int picNum,@RequestParam(required = false) String picUrl) throws IOException { |
| | | return service.updateDevPic(filePic,num,picNum,picUrl); |
| | | public Response updateDevPic(@RequestParam(required = false) MultipartFile filePic,@RequestParam int num,@RequestParam int picNum) throws IOException { |
| | | return service.updateDevPic(filePic,num,picNum); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑多个图片上传") |
| | | @ApiOperation(value = "编辑配件图多个图片上传") |
| | | @PostMapping("updatePartPic") |
| | | public Response updatePartPic(@RequestPart(required = false) List<MultipartFile> multipartFileList,@RequestParam(required = false) String picUrl) throws IOException { |
| | | return service.updatePartPic(multipartFileList,picUrl); |
| | | public Response updatePartPic(@RequestPart(required = false) List<MultipartFile> multipartFileList,@RequestParam int num) throws IOException { |
| | | return service.updatePartPic(multipartFileList,num); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑现场安装图片多个图片上传") |
| | | @PostMapping("updateInstallPic") |
| | | public Response updateInstallPic(@RequestPart(required = false) List<MultipartFile> multipartFileList,@RequestParam int num) throws IOException { |
| | | return service.updateInstallPic(multipartFileList,num); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除图") |
| | | @PostMapping("delPic") |
| | | public Response delPic(@RequestParam int num,@RequestParam int picNum,@RequestParam String picUrl){ |
| | | service.delPic(num,picNum,picUrl,""); |
| | | return new Response().set(1,true,"删除图成功"); |
| | | return service.delPic(num,picNum,picUrl); |
| | | } |
| | | |
| | | @ApiOperation(value = "导出产品验收信息") |
| | | @GetMapping("downloadBomAcceptance") |
| | | public void downloadBomAcceptance(HttpServletRequest req, HttpServletResponse resp, @RequestParam int num){ |
| | | service.downloadBomAcceptance(req,resp,num); |
| | | } |
| | | |
| | | @ApiOperation(value = "跳转详情") |
| | | @PostMapping("getBomAcceptanceByNum") |
| | | public Response getBomAcceptanceByNum(@RequestParam int num){ |
| | | return service.getBomAcceptanceByNum(num); |
| | | } |
| | | |
| | | } |