| | |
| | | value= (String) param.get(s); |
| | | } |
| | | LocMast loc_no = locMastService.selectOne(new EntityWrapper<LocMast>().eq("loc_no", value)); |
| | | if (loc_no.getLocSts().equals("O")||loc_no.getLocSts().equals("F")){ |
| | | if (loc_no.getLocSts().equals("O")||loc_no.getLocSts().equals("D")||loc_no.getLocSts().equals("F")){ |
| | | EntityWrapper<LocDetl> wrapper = new EntityWrapper<>(); |
| | | convert(param, wrapper); |
| | | allLike(LocDetl.class, param.keySet(), wrapper, condition); |
| | |
| | | // 判断入出库类型:101.全板出库 or 103.拣料出库 |
| | | Double sumCount=locDetlService.getLocDetlSumQty(locDetl.getLocNo()); |
| | | int ioType=0; |
| | | ioType=sumCount-outQty>0?103 : 101; |
| | | ioType = sumCount-locDetl.getQty()>0 ? 103 : 101; |
| | | |
| | | if (outQty >= locDetl.getQty()){ |
| | | //生成文档记录 |
| | | stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId); |
| | | waitMatout.setOutQty(waitMatout.getOutQty() + locDetl.getQty()); |
| | | waitMatout.setIoStatus(1); |
| | | //修改记录 |
| | | Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | }else { |
| | | //生成文档记录 |
| | | stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId); |
| | | waitMatout.setOutQty(waitMatout.getOutQty() + outQty); |
| | | waitMatout.setIoStatus(1); |
| | | //修改记录 |
| | | Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | } |
| | | Double curOutQty = outQty >= locDetl.getQty() ? locDetl.getQty() : outQty; //本次出库量 |
| | | stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,curOutQty),ioType,userId); |
| | | waitMatout.setOutQty(waitMatout.getOutQty() + curOutQty); |
| | | waitMatout.setIoStatus(1); |
| | | //修改记录 |
| | | Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | |
| | | // if (outQty >= locDetl.getQty()){ |
| | | // //生成文档记录 |
| | | // stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,locDetl.getQty()),ioType,userId); |
| | | // waitMatout.setOutQty(waitMatout.getOutQty() + locDetl.getQty()); |
| | | // waitMatout.setIoStatus(1); |
| | | // //修改记录 |
| | | // Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | // .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | // }else { |
| | | // //生成文档记录 |
| | | // stockOut(waitMatout.getBillNo(),waitMatout.getSeqNo(),staNo,new LocDetlDto(locDetl,outQty),ioType,userId); |
| | | // waitMatout.setOutQty(waitMatout.getOutQty() + outQty); |
| | | // waitMatout.setIoStatus(1); |
| | | // //修改记录 |
| | | // Integer update = waitMatoutMapper.update(waitMatout, new EntityWrapper<WaitMatout>().eq("bill_no", paramLocDetl.getBillNo()) |
| | | // .eq("seq_no",paramLocDetl.getSeqNo())); |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | throw new CoolException("库位不存在"); |
| | | } |
| | | //查询库位状态 |
| | | if (locMast.getLocSts().equals("O")){ |
| | | if (locMast.getLocSts().equals("O") || locMast.getLocSts().equals("D")){ |
| | | //更新库位状态 |
| | | locMast.setLocSts("F"); |
| | | // boolean b = locMastService.updateById(locMast); |
| | |
| | | {field: 'appe_time', title: '入库时间', align: 'center', width: 200} |
| | | ,{field: 'stay_time', align: 'center',title: '滞留天数'} |
| | | ,{field: 'loc_no', align: 'center',title: '库位号'} |
| | | ,{field: 'mat_no', align: 'center',title: '物料编号'} |
| | | ,{field: 'mat_name', align: 'center',title: '物料名称'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "matNo"); |
| | | arrRemove(detlCols, "field", "matName") |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | |
| | | var cols = [ |
| | | {field: 'io_time', align: 'center', title: '入库日期', width: 200} |
| | | ,{field: 'loc_no', align: 'center',title: '库位号'} |
| | | ,{field: 'mat_no', align: 'center',title: '物料编号'} |
| | | ,{field: 'mat_name', align: 'center',title: '物料名称'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "matNo"); |
| | | arrRemove(detlCols, "field", "matName") |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | |
| | | statusCode: 200 |
| | | }, |
| | | done: function(res, curr, count) { |
| | | console.log(res); |
| | | if (res.code === 403) { |
| | | top.location.href = baseUrl+"/"; |
| | | } |
| | |
| | | ,{field: 'loc_no', align: 'center',title: '库位号'} |
| | | ,{field: 'crn_str_time', align: 'center',title: '堆垛机启动时间'} |
| | | ,{field: 'crn_end_time', align: 'center',title: '堆垛机停止时间'} |
| | | ,{field: 'mat_no', align: 'center',title: '物料编号'} |
| | | ,{field: 'mat_name', align: 'center',title: '物料名称'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "matNo"); |
| | | arrRemove(detlCols, "field", "matName") |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |
| | |
| | | {field: 'appe_time', title: '入库时间', align: 'center', width: 200} |
| | | ,{field: 'stay_time', align: 'center',title: '滞留天数'} |
| | | ,{field: 'loc_no', align: 'center',title: '库位号'} |
| | | ,{field: 'mat_no', align: 'center',title: '物料编号'} |
| | | ,{field: 'mat_name', align: 'center',title: '物料名称'} |
| | | ]; |
| | | arrRemove(detlCols, "field", "matNo"); |
| | | arrRemove(detlCols, "field", "matName") |
| | | cols.push.apply(cols, detlCols); |
| | | return cols; |
| | | } |