| | |
| | | throw new CoolException("物料数据错误,请联系管理员"); |
| | | } |
| | | ManLocDetl check = manLocDetlService.selectOne(new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", node.getUuid()) |
| | | .eq("loc_no", node.getName()) |
| | | .eq("matnr", dto.getMatnr())); |
| | | if (check == null) { |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | manLocDetl.setLocNo(node.getUuid()); |
| | | manLocDetl.setLocNo(node.getName()); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setZpallet(mat.getBarcode()); |
| | | manLocDetl.setZpallet(node.getName()); |
| | | manLocDetl.setAnfme(dto.getCount()); |
| | | manLocDetl.setMatnr(mat.getMatnr()); |
| | | manLocDetl.setMaktx(mat.getMaktx()); |
| | |
| | | SaasUtils.insertLog(0,manLocDetl.getLocNo(),manLocDetl.getMatnr(), manLocDetl.getAnfme(),user.getUsername()); |
| | | manLocDetlService.insert(manLocDetl); |
| | | }else { |
| | | check.setAnfme(dto.getCount() + check.getAnfme()); |
| | | manLocDetlService.update(check,new EntityWrapper<ManLocDetl>() |
| | | .eq("loc_no", node.getUuid()) |
| | | .eq("matnr", dto.getMatnr())); |
| | | // check.setAnfme(dto.getCount() + check.getAnfme()); |
| | | // manLocDetlService.update(check,new EntityWrapper<ManLocDetl>() |
| | | // .eq("loc_no", node.getName()) |
| | | // .eq("matnr", dto.getMatnr())); |
| | | return R.error("库位存在物料,请勿重复入库"); |
| | | } |
| | | if (!Cools.isEmpty(dto.getOrderNo())) { |
| | | OrderDetl orderDetl = orderDetlService.selectOne(new EntityWrapper<OrderDetl>() |