| | |
| | | import com.zy.asrs.entity.Mat; |
| | | import com.zy.asrs.entity.MatPrint; |
| | | import com.zy.asrs.entity.OrderDetl; |
| | | import com.zy.asrs.entity.Pakout; |
| | | import com.zy.asrs.entity.result.KeyValueVo; |
| | | import com.zy.asrs.service.MatService; |
| | | import com.zy.asrs.service.PakoutService; |
| | | import com.zy.asrs.utils.MatExcelListener; |
| | | import com.zy.common.CodeRes; |
| | | import com.zy.common.config.AdminInterceptor; |
| | |
| | | private MatService matService; |
| | | @Autowired |
| | | private SnowflakeIdWorker snowflakeIdWorker; |
| | | @Autowired |
| | | private PakoutService pakoutService; |
| | | |
| | | @RequestMapping(value = "/mat/auto/matnr/auth") |
| | | public R autoMatnr(){ |
| | |
| | | |
| | | @RequestMapping(value = "/mat/list/pda/auth") |
| | | @ManagerAuth |
| | | public R pdaList(@RequestParam(required = true)Long tagId){ |
| | | public R pdaList(@RequestParam(defaultValue = "1")Integer curr, |
| | | @RequestParam(defaultValue = "20")Integer limit, |
| | | @RequestParam Map<String, Object> param, |
| | | @RequestParam(required = true) Long tagId){ |
| | | EntityWrapper<Mat> wrapper = new EntityWrapper<>(); |
| | | wrapper.eq("tag_id", tagId); |
| | | wrapper.orderBy("create_time", false); |
| | | List<Mat> mats = matService.selectList(wrapper); |
| | | return R.ok().add(mats); |
| | | // wrapper.eq("tag_id", tagId); |
| | | // wrapper.orderBy("create_time", false); |
| | | Page<Mat> matPage = toPage(curr, limit, param, Mat.class); |
| | | Page<Mat> page = matService.selectAllPage(matPage); |
| | | // List<Mat> mats = matService.selectList(wrapper); |
| | | return R.ok().add(page); |
| | | } |
| | | |
| | | @RequestMapping(value = "/mat/search/pda/auth") |
| | |
| | | return R.ok(); |
| | | } |
| | | OrderDetl orderDetl = new OrderDetl(); |
| | | orderDetl.sync(orderDetl); |
| | | orderDetl.sync(mat); |
| | | orderDetl.setAnfme(0.0D); |
| | | return R.ok().add(orderDetl); |
| | | } |
| | | |
| | | @RequestMapping(value = "/pakOut/show") |
| | | public R showQR(){ |
| | | List<Pakout> manPakOuts = pakoutService.selectList(null); |
| | | return R.ok(manPakOuts); |
| | | } |
| | | |
| | | |
| | | /*************************************** 打印相关 ***********************************************/ |
| | | |
| | |
| | | for (Mat mat : mats) { |
| | | KeyValueVo vo = new KeyValueVo(); |
| | | vo.setName(mat.getMatnr() + " - " + mat.getMaktx()); |
| | | vo.setValue(mat.getId()); |
| | | vo.setValue(mat.getMatnr()); |
| | | valueVos.add(vo); |
| | | } |
| | | return R.ok().add(valueVos); |