| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.utils.PlaExcelListener; |
| | | import com.zy.asrs.utils.SaasUtils; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.entity.PlaExcel; |
| | | import com.zy.common.web.BaseController; |
| | | import lombok.Synchronized; |
| | |
| | | return R.ok("成功同步"+listener.getTotal()+"条pla物料数据"); |
| | | } |
| | | |
| | | // // 打印 |
| | | // @RequestMapping(value = "/pla/print/auth") |
| | | // @ManagerAuth(memo = "pla编码打印") |
| | | // public R matCodePrint(@RequestParam(value = "param[]") String[] param) { |
| | | // if(Cools.isEmpty(param)) { |
| | | // return R.parse(CodeRes.EMPTY); |
| | | // } |
| | | // List<MatPrint> res = new ArrayList<>(); |
| | | // for (String matnr : param){ |
| | | // Mat mat = matService.selectByMatnr(matnr); |
| | | // // 打印数据注入 |
| | | // MatPrint print = new MatPrint(); |
| | | // print.setMatnr(mat.getMatnr()); |
| | | // print.setBarcode(mat.getBarcode()); |
| | | // print.setMaktx(mat.getMaktx()); |
| | | // print.setSpecs(mat.getSpecs()); |
| | | // print.setUnit(mat.getUnit()); |
| | | // print.setMemo(mat.getMemo()); |
| | | // res.add(print); |
| | | // } |
| | | // return R.ok().add(res); |
| | | // } |
| | | // 打印 |
| | | @RequestMapping(value = "/pla/print/auth") |
| | | @ManagerAuth(memo = "pla编码打印") |
| | | public R matCodePrint(@RequestBody List<Pla> plas) { |
| | | if(Cools.isEmpty(plas)) { |
| | | return R.parse(CodeRes.EMPTY); |
| | | } |
| | | List<Pla> res = new ArrayList<>(); |
| | | for (Pla pla : plas){ |
| | | res.add(pla); |
| | | } |
| | | return R.ok().add(res); |
| | | } |
| | | |
| | | private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){ |
| | | for (Map.Entry<String, Object> entry : map.entrySet()){ |