| | |
| | | final double LENGTH_MIN = 315, LENGTH_MAX = 1150; |
| | | final double WIDTH_MIN = 160, WIDTH_MAX = 730; |
| | | final double HEIGHT_MIN = 140, HEIGHT_MAX = 810; |
| | | |
| | | final double WIEGHT_MIN = 0,WIEGHT_MAX = 23; |
| | | for (OrderDetlPakin detl : list) { |
| | | Mat mat = matService.selectOne( |
| | | new EntityWrapper<Mat>().eq("matnr", detl.getMatnr()) |
| | |
| | | Double len = mat.getManLength(); |
| | | Double wid = mat.getWidth(); |
| | | Double hei = mat.getHeight(); |
| | | Double WET = mat.getWeight(); |
| | | |
| | | if (len == null || len < LENGTH_MIN || len > LENGTH_MAX) { |
| | | errorMessages.add(String.format("物料 %s 长度异常:必须 %.0f~%.0f mm,当前 %s", |
| | |
| | | if (hei == null || hei < HEIGHT_MIN || hei > HEIGHT_MAX) { |
| | | errorMessages.add(String.format("物料 %s 高度异常:必须 %.0f~%.0f mm,当前 %s", |
| | | detl.getMatnr(), HEIGHT_MIN, HEIGHT_MAX, hei)); |
| | | } |
| | | if (hei == null || WET < WIEGHT_MIN || WET > WIEGHT_MAX) { |
| | | errorMessages.add(String.format("物料 %s 毛重异常:必须 %.0f~%.0f mm,当前 %s", |
| | | detl.getMatnr(), WIEGHT_MIN, WIEGHT_MAX, hei)); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/beBatch/update/auth") |
| | | @ManagerAuth(memo = "同步已下发数量") |
| | | public R updateBeBatch(@RequestParam Long id, @RequestParam Integer beBatch) { |
| | | if (id == null) { |
| | | return R.error("id不能为空"); |
| | | } |
| | | if (!orderDetlService.updateBeBatch(id, beBatch)) { |
| | | return R.error("更新失败"); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/orderDetl/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |