| | |
| | | if (Cools.isEmpty(mat) || null==mat.getId()){ |
| | | return R.error(); |
| | | } |
| | | if (null != matService.selectByMatnr(mat.getMatnr())) { |
| | | return R.error("商品模具名称已存在"); |
| | | } |
| | | if (mat.getColor().equals("正常")){ |
| | | mat.setColor("报废"); |
| | | }else if (mat.getColor().equals("报废")){ |
| | |
| | | public R matExcelImport(MultipartFile file) throws IOException { |
| | | MatExcelListener listener = new MatExcelListener(getUserId()); |
| | | EasyExcel.read(file.getInputStream(), MatExcel.class, listener).sheet().doRead(); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据"); |
| | | return R.ok("成功同步"+listener.getTotal()+"条商品数据,更新" + listener.getCount() + "条商品数据"); |
| | | } |
| | | |
| | | /*************************************** xm-select ***********************************************/ |