| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.IOException; |
| | |
| | | @PostMapping(value = "/out/loc/box/excel/import/auth") |
| | | @ManagerAuth(memo = "导入箱号出库") |
| | | @Transactional |
| | | public R outLocBoxExcelImport(MultipartFile file) throws IOException { |
| | | OutLocBoxExcelListener listener = new OutLocBoxExcelListener(getUserId()); |
| | | public R outLocBoxExcelImport(HttpServletRequest request, MultipartFile file) throws IOException { |
| | | OutLocBoxExcelListener listener = new OutLocBoxExcelListener(request.getRemoteAddr(),getUserId()); |
| | | EasyExcel.read(file.getInputStream(), OutLocBoxExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功出库"+listener.getTotal()+"条商品数据"); |
| | | if (listener.getSign()){ |
| | | return R.ok("成功出库"+listener.getTotal()+"条商品数据."+listener.getErrorMsgOrderLoc()); |
| | | } else { |
| | | return R.error("出库失败:"+listener.getErrorMsgOrderLoc()); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | @PostMapping(value = "/out/loc/box/excel/import/auth1") |
| | | @ManagerAuth(memo = "导入箱号盘点出库") |
| | | @Transactional |
| | | public R outLocBoxExcelImport1(MultipartFile file) throws IOException { |
| | | OutpandianBoxExeclListener listener = new OutpandianBoxExeclListener(getUserId()); |
| | | public R outLocBoxExcelImport1(HttpServletRequest request,MultipartFile file) throws IOException { |
| | | OutpandianBoxExeclListener listener = new OutpandianBoxExeclListener(request.getRemoteAddr(),getUserId()); |
| | | EasyExcel.read(file.getInputStream(), pandianExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功出库"+listener.getTotal()+"条商品数据"); |
| | | if (listener.getSign()){ |
| | | return R.ok("成功出库"+listener.getTotal()+"条商品数据."+listener.getErrorMsgOrderLoc()); |
| | | } else { |
| | | return R.error("出库失败:"+listener.getErrorMsgOrderLoc()); |
| | | } |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |