| | |
| | | List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(), orderDetl.getBatch(), null, exist); |
| | | for (LocDetl locDetl : locDetls) { |
| | | if (issued > 0) { |
| | | // LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | // issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | // List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103); |
| | | LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | locDetl.getAnfme(), issued < locDetl.getAnfme()? issued : locDetl.getAnfme()); |
| | | //速腾只有全板,所以只能101全板出库 |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101); |
| | | issued >= locDetl.getAnfme() ? locDetl.getAnfme() : issued); |
| | | List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), issued >= locDetl.getAnfme() ? 101 : 103); |
| | | // LocDto locDto = new LocDto(locDetl.getLocNo(), locDetl.getMatnr(), locDetl.getMaktx(), locDetl.getBatch(), orderDetl.getOrderNo(), |
| | | // locDetl.getAnfme(), issued < locDetl.getAnfme()? issued : locDetl.getAnfme()); |
| | | // //速腾只有全板,所以只能101全板出库 |
| | | // List<Integer> staNos = staDescService.queryOutStaNosByLocNo(locDetl.getLocNo(), 101); |
| | | locDto.setStaNos(staNos); |
| | | locDtos.add(locDto); |
| | | exist.add(locDetl.getLocNo()); |
| | |
| | | } |
| | | } |
| | | if (issued > 0) { |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued); |
| | | LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), issued); |
| | | // LocDto locDto = new LocDto(null, orderDetl.getMatnr(), orderDetl.getMaktx(), orderDetl.getBatch(), orderDetl.getOrderNo(), 0.0,issued); |
| | | locDto.setLack(Boolean.TRUE); |
| | | locDtos.add(locDto); |
| | | } |
| | |
| | | int increaseWorkQty(@Param("orderId")Long orderId, @Param("matnr")String matnr, @Param("batch")String batch, @Param("workQty")Double workQty); |
| | | |
| | | Integer checkAllDetlFinish(@Param("orderNo") String orderNo); |
| | | |
| | | Integer sameOrderComb(@Param("orderNo") String orderNo, @Param("matnr") String matnr, @Param("batch") String batch); |
| | | } |
| | |
| | | boolean increaseWorkQty(Long orderId, String matnr, String batch, Double workQty); |
| | | |
| | | Boolean checkAllDetlFinish(String orderNo); |
| | | |
| | | Integer sameOrderComb(String orderNo, String matnr, String batch); |
| | | } |
| | |
| | | combMat.setBatch(""); |
| | | } |
| | | } |
| | | for (CombParam.CombMat combMat : param.getCombMats()) { |
| | | Integer sum = orderDetlService.sameOrderComb(param.getOrderNo(), combMat.getMatnr(),combMat.getBatch()); |
| | | OrderDetl orderDetl = orderDetlService.selectItem(param.getOrderNo(), combMat.getMatnr(), combMat.getBatch()); |
| | | if ( combMat.getAnfme() > (orderDetl.getAnfme() - sum)) { |
| | | throw new CoolException("组托数量已超出订单需求量,请检查是否有其他的组托已完成"); |
| | | } |
| | | } |
| | | |
| | | |
| | | Date now = new Date(); |
| | |
| | | public Boolean checkAllDetlFinish(String orderNo) { |
| | | return this.baseMapper.checkAllDetlFinish(orderNo) <= 0 ; |
| | | } |
| | | |
| | | /** |
| | | * 获取相同单号,相同批号,相同物料代码已经在入库通知档里组托的数量 |
| | | * @param orderNo |
| | | * @param matnr |
| | | * @param batch |
| | | * @return |
| | | */ |
| | | @Override |
| | | public Integer sameOrderComb(String orderNo, String matnr, String batch) { |
| | | Integer sum = this.baseMapper.sameOrderComb(orderNo, matnr, batch); |
| | | return sum != null ? sum : 0; |
| | | } |
| | | } |
| | |
| | | // 获取库位 |
| | | LocMast locMast = locMastService.selectById(taskDto.getLocNo()); |
| | | // 获取路径 |
| | | // int ioType = taskDto.isAll() ? 101 : 103; |
| | | //仅适用于速腾项目,没有捡料 |
| | | int ioType = 101; |
| | | int ioType = taskDto.isAll() ? 101 : 103; |
| | | |
| | | StaDesc staDesc = staDescService.queryCrnStnAuto(ioType, locMast.getCrnNo(), staNo.getDevNo()); |
| | | // 生成工作号 |
| | | int workNo = commonService.getWorkNo(WorkNoType.getWorkNoType(ioType)); |
| | |
| | | // 获取目标站 |
| | | Wrapper<StaDesc> wrapper = new EntityWrapper<StaDesc>() |
| | | .eq("type_no", wrkMast.getIoType() - 50) |
| | | .eq("stn_no", wrkMast.getStaNo()) // 作业站点 = 拣料出库的目标站 |
| | | //速腾特有捡料, 11站是出库站, 然后手动走到15站进行再入库 |
| | | |
| | | .eq("stn_no", 15) // 作业站点 = 拣料出库的目标站 |
| | | .eq("crn_no", wrkMast.getCrnNo()); // 堆垛机号 |
| | | StaDesc staDesc = staDescService.selectOne(wrapper); |
| | | if (Cools.isEmpty(staDesc)) { |
| | |
| | | // 更新工作档数据状态 |
| | | wrkMast.setIoType(wrkMast.getIoType() - 50); // 入出库类型: 103->53,104->54,107->57 |
| | | wrkMast.setWrkSts(2L); // 工作状态: 2.设备上走 |
| | | wrkMast.setSourceStaNo(wrkMast.getStaNo()); // 源站 |
| | | wrkMast.setSourceStaNo(staDesc.getStnNo()); // 源站 |
| | | wrkMast.setStaNo(staNo); // 目标站 |
| | | wrkMast.setLocNo(wrkMast.getSourceLocNo()); // 目标库位 = 出库时的源库位 |
| | | wrkMast.setSourceLocNo(""); // 源库位清空 |
| | |
| | | <select id="checkAllDetlFinish" resultType="java.lang.Integer"> |
| | | SELECT count(*) From man_order_detl WHERE qty < anfme and order_no = #{orderNo} |
| | | </select> |
| | | <select id="sameOrderComb" resultType="java.lang.Integer"> |
| | | SELECT SUM(anfme) FROM cust_wait_pakin WHERE 1=1 |
| | | <if test="orderNo!=null and orderNo!='' "> |
| | | and order_no like '%' + #{orderNo} + '%' |
| | | </if> |
| | | and matnr = #{matnr} |
| | | and batch = #{batch} |
| | | </select> |
| | | |
| | | <update id="increase"> |
| | | update man_order_detl |
| | |
| | | {field: 'batch', title: '批号', edit: true}, |
| | | {field: 'specs', title: '规格'}, |
| | | {field: 'anfme', title: '数量(修改)', style: 'color: blue;font-weight: bold', edit: true, minWidth: 110, width: 110}, |
| | | {field: 'workQty', title: '作业数量', minWidth: 100, width: 100}, |
| | | {field: 'qty', title: '作业数量', minWidth: 100, width: 100}, |
| | | // {field: 'unit', title: '单位', width: 80}, |
| | | {field: 'memo', title: '备注' , edit: true}, |
| | | {align: 'center', title: '操作', toolbar: '#formSSXMTableBar', minWidth: 80, width: 80, fixed: 'right'} |
| | |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | | return false; |
| | | } |
| | | if(obj.value < data.workQty){ |
| | | if(obj.value < data.qty){ |
| | | layer.msg("输入数量不能小于作业中数量", {icon: 2}); |
| | | // data[obj.field] = 0; |
| | | // insTbSSXM.reload({data: xxDataList}); |
| | |
| | | {field: 'orderNo', title: '单据编号', merge: true, align: 'center'}, |
| | | {field: 'title', title: '商品', merge: true, align: 'center', width: 350}, |
| | | {field: 'batch', title: '序列码', align: 'center'}, |
| | | { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'}, |
| | | // { title: '剩余需求量', align: 'center' , width: 120, toolbar: '#checkNeedQty'}, |
| | | // {field: 'anfme', title: '实际数量', align: 'center', width: 90, style: 'font-weight: bold'}, |
| | | { title: '立库余量', align: 'center', width: 90, toolbar: '#checkAnfme'}, |
| | | { title: '出库数量', align: 'center',field: 'anfme', width: 90, style: 'font-weight: bold; color: red'}, |
| | | {field: 'locNo', title: '货位', align: 'center', width: 100, templet: '#locNoTpl'}, |
| | | {field: 'staNos', align: 'center', title: '出库站', merge: ['locNo'], templet: '#tbBasicTbStaNos'}, |
| | | {type: 'checkbox', merge: ['locNo']}, |