| | |
| | | import com.alibaba.fastjson.JSON;
|
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
| | | import com.mysql.cj.util.StringUtils;
|
| | | import com.zy.asrs.wms.asrs.entity.param.StockOutParam;
|
| | | import com.zy.asrs.framework.exception.CoolException;
|
| | |
| | |
|
| | | /**
|
| | | * 波次出库预览
|
| | | *
|
| | | * @param param
|
| | | * @return
|
| | | */
|
| | |
| | | locDto.setLocNo(detl.getLocNo());
|
| | | locDto.setTypeId(LocAreaTypeSts.LOC_AREA_TYPE_FLAT.id);
|
| | | locDto.setLocDetlId(detl.getId());
|
| | | locDto.setAnfme(detl.getAnfme());
|
| | | locDto.setAnfme(detl.getAnfme() - detl.getWorkQty());
|
| | | locDto.setWorkQty(detl.getWorkQty());
|
| | | locDtos.add(locDto);
|
| | | //库位实际可用数量
|
| | |
| | | throw new CoolException("保存工作档失败");
|
| | | }
|
| | |
|
| | | wave.setSite(operationPort.getFlag());
|
| | | if (!waveService.updateById(wave)) {
|
| | | throw new CoolException("波次站口状态更新失败!!");
|
| | | }
|
| | |
|
| | | for (OrderOutMergeDto merge : list) {
|
| | | LocDetl locDetl = locDetlService.getById(merge.getLocDetlId());
|
| | | if (locDetl == null) {
|
| | |
| | | .eq(WaveDetl::getStockIndex, matUniqueKey)
|
| | | .eq(WaveDetl::getWaveId, wave.getId()));
|
| | | if (waveDetl == null) {
|
| | | throw new CoolException("waveId:" + wave.getId() + "物料:" + taskDetl.getMatnr() + "波次数据不存在");
|
| | | throw new CoolException("waveId:" + wave.getId() + "物料:" + taskDetl.getMatnr() + "波次数据不存在");
|
| | | }
|
| | | waveDetl.setWorkQty(waveDetl.getWorkQty() + taskDetl.getAnfme());
|
| | | waveDetl.setUpdateTime(new Date());
|
| | |
| | | if (orders.isEmpty()) {
|
| | | throw new CoolException("当前波次订单不存在!!");
|
| | | }
|
| | |
|
| | |
|
| | | // List<CacheSite> cacheSites = cacheSiteService.list(new LambdaQueryWrapper<CacheSite>()
|
| | | // .eq(CacheSite::getSiteStatus, CacheSiteStatusType.O.id).eq(CacheSite::getChannel, task.getTargetSite()));
|
| | |
| | | if (!locDetlService.updateById(locDetl)) {
|
| | | throw new CoolException("库存加锁失败!!");
|
| | | }
|
| | |
|
| | | orderDetlService.update(new LambdaUpdateWrapper<OrderDetl>()
|
| | | .set(OrderDetl::getWareType, 2)
|
| | | .eq(OrderDetl::getMatId, mat.getId())
|
| | | .eq(StringUtils.isNullOrEmpty(outOder.getBatch()), OrderDetl::getBatch, outOder.getBatch())
|
| | | .in(OrderDetl::getOrderId, outOder.getOrderIds()));
|
| | | });
|
| | |
|
| | | curLoc.setLocStsId(LocStsType.R.val());
|
| | |
| | |
|
| | | for (LocDetl locDetl : param.getLocDetls()) {
|
| | | List<OrderOutMergeParam> orders = new ArrayList<>();
|
| | | LocDetl detl = locDetlService.getOne(new LambdaQueryWrapper<LocDetl>().eq(LocDetl::getLocNo, locDetl.getLocNo()));
|
| | | LocDetl detl = locDetlService.getOne(new LambdaQueryWrapper<LocDetl>()
|
| | | .eq(LocDetl::getMatId, locDetl.getMatId())
|
| | | .eq(LocDetl::getBatch, locDetl.getBatch())
|
| | | .eq(LocDetl::getLocNo, locDetl.getLocNo()));
|
| | | if (Objects.isNull(detl)) {
|
| | | continue;
|
| | | }
|