| | |
| | | |
| | | } |
| | | m=m*mat.getVolume(); |
| | | Double currentStock = locDetlService.getSumAnfme(matnr); |
| | | if (currentStock == null) { |
| | | currentStock = 0D; |
| | | } |
| | | if (mat.getStoreMax() != null && currentStock + m > mat.getStoreMax()) { |
| | | log.info("WCS入库拦截: 物料超过库存上限, matnr={}, currentStock={}, inboundQty={}, storeMax={}", |
| | | matnr, currentStock, m, mat.getStoreMax()); |
| | | return R.error("物料已到达上限禁止入库"); |
| | | } |
| | | //Double val = Math.round((m - matnr.getSafeQty()) * 10000) / 10000.0; |
| | | Config config = configService.selectConfigByCode("SimulationInbound"); |
| | | if (config != null && config.getValue().equals("Y")) { |