| | |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public void nodePakinNoComb(CombParam param) { |
| | | if(Cools.isEmpty(param.getLocno())){ |
| | | throw new CoolException("库位号未填写,无法入库"); |
| | | } |
| | | param.getCombMats().forEach(combMat -> { |
| | | Wrapper<ManLocDetl> wrapper = new EntityWrapper<ManLocDetl>().eq("loc_no", param.getLocno()).eq("matnr",combMat.getMatnr()); |
| | | Utils.wapperSetCondition(wrapper,"container_code",combMat.getContainerCode()); |
| | | Utils.wapperSetCondition(wrapper,"batch",combMat.getBatch()); |
| | | Utils.wapperSetCondition(wrapper,"csocode",combMat.getCsocode()); |
| | | Utils.wapperSetCondition(wrapper,"isoseq",combMat.getIsoseq()); |
| | | ManLocDetl manLocDetl = manLocDetlService.selectOne(wrapper); |
| | | if(Cools.isEmpty(manLocDetl)){ |
| | | saveManlocDetl(combMat,param.getLocno()); |
| | | }else{ |
| | | manLocDetl.setAnfme(manLocDetl.getAnfme() + combMat.getAnfme()); |
| | | manLocDetlService.update(manLocDetl,wrapper); |
| | | } |
| | | //生成平库入出库日志 |
| | | SaasUtils.insertLog(0,param.getLocno(),combMat.getMatnr(), combMat.getAnfme(),""); |
| | | }); |
| | | |
| | | } |
| | | |
| | | private boolean saveManlocDetl(CombParam.CombMat combMat, String locNo){ |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |
| | | .eq("name", locNo)); |
| | | Mat mat = matService.selectByMatnr(combMat.getMatnr()); |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | BeanUtils.copyProperties(mat,manLocDetl); |
| | | manLocDetl.setAnfme(combMat.getAnfme()); |
| | | manLocDetl.setNodeId(node.getId()); |
| | | manLocDetl.setContainerCode(combMat.getContainerCode()); |
| | | manLocDetl.setCsocode(combMat.getCsocode()); |
| | | manLocDetl.setIsoseq(combMat.getIsoseq()); |
| | | manLocDetl.setCreateTime(new Date()); |
| | | manLocDetl.setModiTime(new Date()); |
| | | manLocDetl.setLocNo(locNo); |
| | | manLocDetl.setStatus(1); |
| | | return manLocDetlService.insert(manLocDetl); |
| | | } |
| | | |
| | | private void saveManlocDetl(WaitPakin waitPakin, Date now, String locNo){ |
| | | |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |