| | |
| | | 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", |
| | |
| | | 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)); |
| | | } |
| | | } |
| | | |
| | | if (!errorMessages.isEmpty()) { |