| | |
| | | package com.zy.asrs.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.core.common.BaseRes; |
| | |
| | | for (StockOutParam.LocDetl locDetl : param.getLocDetls()) { |
| | | //获取同一库位组的外侧库位号 |
| | | List<String> groupOuterSingleLoc = Utils.getGroupOuterSingleLoc(locDetl.getLocNo()); |
| | | if (Utils.getBay(locDetl.getLocNo())>=21){ |
| | | groupOuterSingleLoc = Utils.getGroupOuterSingleLocLowFrequency(locDetl.getLocNo()); |
| | | } |
| | | |
| | | for (String locNo : groupOuterSingleLoc) { |
| | | //每个库位的库位明细 |
| | | if(locs.contains(locNo)) continue; |
| | |
| | | Mat mat = matService.selectByMatnr(locDetl.getMatnr()); |
| | | if (Cools.isEmpty(mat)) { |
| | | throw new CoolException(locDetl.getMatnr() + "商品档案不存在"); |
| | | } |
| | | int zpallet = waitPakinService.selectCount(new EntityWrapper<WaitPakin>().eq("zpallet", locDetl.getZpallet()).ne("loc_no",locDetl.getLocNo())); |
| | | if (zpallet>0) { |
| | | throw new CoolException(locDetl.getZpallet() + "入库通知档中已存在"); |
| | | } |
| | | WaitPakin waitPakin = new WaitPakin(); |
| | | waitPakin.sync(mat); |
| | |
| | | if (!wrkMastRes || !locMastRes) { |
| | | throw new CoolException("保存数据失败"); |
| | | } |
| | | WaitPakin waitPakin = waitPakinService.selectOne(new EntityWrapper<WaitPakin>().eq("zpallet", wrkMast.getBarcode())); |
| | | waitPakinService.delete(new EntityWrapper<>(waitPakin)); |
| | | } |
| | | |
| | | @Override |