| | |
| | | generateCacheOutTask(station, locCache, userId); |
| | | |
| | | /**生成立库出库任务*/ |
| | | generateCRNOutTask(station, locCache, userId); |
| | | // generateCRNOutTask(station, locCache, userId); |
| | | |
| | | return R.ok(); |
| | | } |
| | |
| | | Task task = new Task(); |
| | | task.setWrkNo(workNo) |
| | | .setIoTime(new Date()) |
| | | .setWrkSts(1L) // 工作状态:11.生成出库ID |
| | | .setWrkSts(201L) // 工作状态:11.生成入库库ID |
| | | .setIoType(1) // 入出库状态: 11.库格移载 |
| | | .setTaskType("agv") |
| | | .setIoPri(10D) |
| | |
| | | throw new CoolException("容器编码未维护,请维护后再操作!!"); |
| | | } |
| | | |
| | | Integer whsType = 1; |
| | | Integer whsType = 2; |
| | | Short lcoType = 1; |
| | | //用于判断料箱托盘,料箱,笼框 |
| | | if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | whsType = 3; |
| | | } else if (container.getType().equals(ContainerType.CONTAINER_TYPE_CAGE.type)) { |
| | | if (!container.getType().equals(ContainerType.CONTAINER_TYPE_BOX.type)) { |
| | | whsType = 2; |
| | | if (container.getType().equals(ContainerType.CONTAINER_TYPE_SALVER.type)) { |
| | | lcoType = 2; |
| | | } |
| | | } |
| | | |
| | | WrkMast barcode = wrkMastService.selectOne(new EntityWrapper<WrkMast>().eq("barcode", param.getBarcode())); |
| | |
| | | throw new CoolException("数据错误,组拖档已不存在!!"); |
| | | } |
| | | |
| | | WrkMast wrkMast = generateCrnInTask(waitPakins, whsType, station, param.getLocType1(), userId); |
| | | WrkMast wrkMast = generateCrnInTask(waitPakins, whsType, station, lcoType, userId); |
| | | |
| | | response.put("taskNo", wrkMast.getWrkNo()); |
| | | response.put("locNo", wrkMast.getLocNo()); |
| | |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Slf4j |
| | | @Service("orderService") |
| | |
| | | @Override |
| | | public boolean saveHandlerOrder(Boolean pakin, WrkMast wrkMast, List<WrkDetl> wrkDetls) { |
| | | try { |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | wrkDetls.forEach(wrkDetl -> { |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme(), wrkDetl.getThreeCode())); |
| | | }); |
| | | String orderNo = "HAND" + snowflakeIdWorker.nextId(); |
| | | if (pakin) { |
| | | // 生成入库单据 |
| | | OpenOrderPakinParam openParam = new OpenOrderPakinParam(); |
| | | openParam.setOrderNo(orderNo); |
| | | openParam.setOrderTime(DateUtils.convert(wrkMast.getModiTime())); |
| | | openParam.setOrderType("手动入库单"); |
| | | openParam.setOrderDetails(detlDtos); |
| | | openService.pakinOrderCreate(openParam); |
| | | } else { |
| | | // 生成出库单据 |
| | | OpenOrderPakoutParam openParam = new OpenOrderPakoutParam(); |
| | | openParam.setOrderNo(orderNo); |
| | | openParam.setOrderTime(DateUtils.convert(wrkMast.getModiTime())); |
| | | openParam.setOrderType("手动出库单"); |
| | | openParam.setOrderDetails(detlDtos); |
| | | openService.pakoutOrderCreate(openParam); |
| | | } |
| | | |
| | | // String orderNo = "HAND" + snowflakeIdWorker.nextId(); |
| | | // if (pakin) { |
| | | // // 生成入库单据 |
| | | // OpenOrderPakinParam openParam = new OpenOrderPakinParam(); |
| | | // openParam.setOrderNo(orderNo); |
| | | // openParam.setOrderTime(DateUtils.convert(wrkMast.getModiTime())); |
| | | // openParam.setOrderType("手动入库单"); |
| | | // openParam.setOrderDetails(detlDtos); |
| | | // openService.pakinOrderCreate(openParam); |
| | | // } else { |
| | | // // 生成出库单据 |
| | | // OpenOrderPakoutParam openParam = new OpenOrderPakoutParam(); |
| | | // openParam.setOrderNo(orderNo); |
| | | // openParam.setOrderTime(DateUtils.convert(wrkMast.getModiTime())); |
| | | // openParam.setOrderType("手动出库单"); |
| | | // openParam.setOrderDetails(detlDtos); |
| | | // openService.pakoutOrderCreate(openParam); |
| | | // } |
| | | |
| | | |
| | | Map<String, List<WrkDetl>> listMap = wrkDetls.stream().collect(Collectors.groupingBy(WrkDetl::getOrderNo)); |
| | | |
| | | listMap.keySet().forEach(orderNo -> { |
| | | Order order = this.selectByNo(orderNo); |
| | | if (null == order) { |
| | | throw new CoolException("生成单据失败"); |
| | |
| | | if (!this.updateSettle(order.getId(), 4L, null)) { |
| | | throw new CoolException("修改单据状态失败"); |
| | | } |
| | | |
| | | List<DetlDto> detlDtos = new ArrayList<>(); |
| | | listMap.get(orderNo).forEach(wrkDetl -> { |
| | | detlDtos.add(new DetlDto(wrkDetl.getMatnr(), wrkDetl.getBatch(),wrkDetl.getBrand(),wrkDetl.getStandby1(),wrkDetl.getStandby2(),wrkDetl.getStandby3(), |
| | | wrkDetl.getBoxType1(),wrkDetl.getBoxType2(),wrkDetl.getBoxType3(), wrkDetl.getAnfme(), wrkDetl.getThreeCode())); |
| | | }); |
| | | |
| | | for (DetlDto detlDto : detlDtos) { |
| | | // 修改订单明细数量 |
| | | if (!orderDetlService.increase(order.getId(), detlDto.getMatnr(), detlDto.getBatch(),detlDto.getBrand(),detlDto.getStandby1(),detlDto.getStandby2(),detlDto.getStandby3(),detlDto.getBoxType1(),detlDto.getBoxType2(),detlDto.getBoxType3(), detlDto.getAnfme())) { |
| | |
| | | throw new CoolException("修改单据作业数量失败"); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | log.error("saveHandlerOrder===>>", e); |
| | | return false; |
| | |
| | | import com.zy.asrs.service.*; |
| | | import com.zy.asrs.service.impl.TaskDetlLogServiceImpl; |
| | | import com.zy.asrs.service.impl.TaskDetlServiceImpl; |
| | | import com.zy.asrs.service.impl.WrkDetlLogServiceImpl; |
| | | import com.zy.asrs.task.AbstractHandler; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.utils.OrderInAndOutUtil; |
| | |
| | | CheckOrderDetlService checkOrderDetlService; |
| | | @Autowired |
| | | private TaskDetlLogService taskDetlLogService; |
| | | @Autowired |
| | | private WrkDetlLogServiceImpl wrkDetlLogService; |
| | | |
| | | |
| | | @Transactional |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | ReportOrderParams itemParam = new ReportOrderParams(); |
| | | |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | //TODO 正常完结需要打开 |
| | | // TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | // .eq("matnr", detl.getMatnr()) |
| | | // .eq("supp_code", detl.getStandby1()) |
| | | // .eq("order_no", detl.getOrderNo())); |
| | | // if (Objects.isNull(detlLog)) { |
| | | // throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!"); |
| | | // } |
| | | WrkDetlLog detlLog = wrkDetlLogService.selectOne(new EntityWrapper<WrkDetlLog>() |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | | .eq("order_no", detl.getOrderNo())); |
| | | if (Objects.isNull(detlLog)) { |
| | | throw new CoolException("数据错误 ,请检查AGV任务档是否已完成!!"); |
| | | throw new CoolException("物料编码:" + detl.getMatnr() + "数据错误 ,请检查堆垛机任务档是否已完成!!"); |
| | | } |
| | | //目标库区 |
| | | orderParam.setTarget_location(detlLog.getAreaType()); |
| | | orderParam.setTarget_location("2"); |
| | | // orderParam.setTarget_location(detlLog.getAreaType()); |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | // BS Code |
| | | itemParam |
| | |
| | | // // 上报时,默认来源位置是null |
| | | .setLocation_no(detlLog.getZpallet()) |
| | | // 上报时,默认上报数量是订单数量 |
| | | .setPick_qty(detl.getQty().intValue()); |
| | | .setPick_qty(Objects.isNull(detl.getQty()) ? 0 : detl.getQty().intValue()); |
| | | reportOrderParams.add(itemParam); |
| | | }); |
| | | |
| | |
| | | orderDetls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | |
| | | TaskDetlLog detlLog = taskDetlLogService.selectOne(new EntityWrapper<TaskDetlLog>() |
| | | .eq("matnr", detl.getMatnr()) |
| | | .eq("supp_code", detl.getStandby1()) |
| | |
| | | detls.forEach(detl -> { |
| | | Mat material = matService.selectByMatnr(detl.getMatnr()); |
| | | if (Objects.isNull(material)) { |
| | | throw new CoolException("物料不存在"); |
| | | throw new CoolException(material.getMatnr() + "物料不存在"); |
| | | } |
| | | OrderItemsParam itemParam = new OrderItemsParam(); |
| | | itemParam.setLocation_no(detl.getZpallet()) |
| | |
| | | case 2://经典单伸库位(2排货架) |
| | | return LocNecessaryParametersDoubleExtension2(rowLastno, curRow, crnNumber); //已完善 |
| | | case 3://经典单双伸库位 左单右双(小单大双) |
| | | return LocNecessaryParametersDoubleExtension3(rowLastno, curRow, crnNumber); //未完善 |
| | | return LocNecessaryParametersDoubleExtension(rowLastno, curRow, crnNumber); //已完善 |
| | | // return LocNecessaryParametersDoubleExtension3(rowLastno, curRow, crnNumber); //未完善 |
| | | case 4://经典单双伸库位 左双右单(小双大单) |
| | | return LocNecessaryParametersDoubleExtension4(rowLastno, curRow, crnNumber); //未完善 |
| | | case 5://双工位单伸库位(4排货架) |
| | |
| | | continue; |
| | | } |
| | | } |
| | | if (dto.getAnfme() > locDetl.getAnfme()) { |
| | | throw new CoolException("服务器内部错误"); |
| | | if (dto.getAnfme() > locDetl.getAnfme() && dto.getStandby1().equals(locDetl.getStandby1()) ) { |
| | | throw new CoolException("订单数量不能大于库存数量!!"); |
| | | } |
| | | if (dto.getAnfme().equals(locDetl.getAnfme())) { |
| | | sameNumber++; |
| | |
| | | // /** |
| | | // * 库型 1: 标准堆垛机库 2: 平库 3: 穿梭板 4: 四向车 5: AGV 0: 未知 |
| | | // */ |
| | | if (rowLastnoType.getType() == 3) { |
| | | return getDoubleLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, |
| | | 4, locTypeDto, 0); |
| | | } else { |
| | | // if (rowLastnoType.getType() == 3) { |
| | | // return getDoubleLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, |
| | | // 4, locTypeDto, 0); |
| | | // } else { |
| | | // |
| | | // } |
| | | return getLocNoRun(whsType, staDescId, sourceStaNo, findLocNoAttributeVo, 0, locTypeDto, 0); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("站点={} 未查询到对应的规则", sourceStaNo); |
| | | } |
| | |
| | | * @return locNo 检索到的库位号 |
| | | */ |
| | | @Transactional |
| | | public StartupDto getLocNoRun(Integer staDescId, Integer whsType, Integer sourceStaNo, |
| | | public StartupDto getLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo, |
| | | FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | staDescId = 1; |
| | | // 初始化参数 |
| | |
| | | throw new CoolException("数据异常,请联系管理员===>库位规则未知"); |
| | | } |
| | | |
| | | // 均衡分布堆垛机 |
| | | int minCount = Integer.MAX_VALUE; |
| | | if (whsType == 2) { |
| | | if (locTypeDto.getLocType1() == 2) { |
| | | // 均衡分布堆垛机 |
| | | for (int i = 4; i <= 5; i++) { |
| | | int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i)); |
| | | if (count < minCount) { |
| | | minCount = count; |
| | | crnNo = i; |
| | | } |
| | | } |
| | | } else { |
| | | for (int i = 4; i <= 6; i++) { |
| | | int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i)); |
| | | if (count < minCount) { |
| | | minCount = count; |
| | | crnNo = 6; |
| | | } |
| | | } |
| | | |
| | | if (crnNo == 6) { |
| | | return getDoubleLocNoRun(3, 1, sourceStaNo, findLocNoAttributeVo, null, locTypeDto, times); |
| | | } |
| | | } |
| | | } else { |
| | | // 均衡分布堆垛机 |
| | | for (int i = rowLastno.getsCrnNo(); i <= rowLastno.geteCrnNo(); i++) { |
| | | int count = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", i)); |
| | | if (count < minCount) { |
| | |
| | | crnNo = i; |
| | | } |
| | | } |
| | | } |
| | | |
| | | StartupDto startupDto = new StartupDto(); |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .ge("row1", rowLastno.getsRow()) |
| | | .le("row1", rowLastno.geteRow()) |
| | | .eq("crn_no", crnNo) |
| | | // .eq("move_status", 0) |
| | | .eq("loc_type1", locTypeDto.getLocType1()) |
| | | .eq("loc_sts", "O") |
| | | .orderAsc(Arrays.asList("lev1", "row1", "bay1"))); |
| | | // int crnCountO = wrkMastService.selectCount(new |
| | | // EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100)); |
| | | |
| | | // 生成工作号 |
| | | int workNo = getWorkNo(0); |
| | | int workNo; |
| | | if (whsType == 2) { |
| | | // 生成工作号 |
| | | workNo = getWorkNo(3); |
| | | } else { |
| | | // 生成工作号 |
| | | workNo = getWorkNo(0); |
| | | } |
| | | // 返回dto |
| | | startupDto.setWorkNo(workNo); |
| | | startupDto.setCrnNo(locMast.getCrnNo()); |
| | |
| | | */ |
| | | public StartupDto getDoubleLocNoRun(Integer whsType, Integer staDescId, Integer sourceStaNo, FindLocNoAttributeVo findLocNoAttributeVo, Integer moveCrnNo, LocTypeDto locTypeDto, int times) { |
| | | // 初始化参数 |
| | | int crnNo = 0; //堆垛机号 |
| | | int nearRow = 0; //最浅库位排 |
| | | int curRow = 0; //最深库位排 |
| | | int crnNo = 6; //堆垛机号 |
| | | int nearRow = 11; //最浅库位排 |
| | | int curRow = 14; //最深库位排 |
| | | int rowCount = 0; //轮询轮次 |
| | | LocMast locMast = null; // 目标库位 |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | //此程序用于优化堆垛机异常时的运行时间 |
| | | for (int i = times; i < crnNumber * 2; i++) { |
| | | int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | curRow = locNecessaryParameters[1]; |
| | | crnNo = locNecessaryParameters[2]; |
| | | if (basCrnpService.checkSiteError(crnNo, true)) { |
| | | rowCount = locNecessaryParameters[0]; |
| | | nearRow = locNecessaryParameters[3]; |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100)); |
| | | if (locMasts.size() - crnCountO <= 2) { |
| | | log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | nearRow = 0; |
| | | times++; |
| | | continue; |
| | | } |
| | | break; |
| | | } else { |
| | | times++; |
| | | } |
| | | } |
| | | // //此程序用于优化堆垛机异常时的运行时间 |
| | | // for (int i = times; i < crnNumber * 2; i++) { |
| | | // int[] locNecessaryParameters = Utils.LocNecessaryParameters(rowLastno, curRow, crnNumber); |
| | | // curRow = locNecessaryParameters[1]; |
| | | // crnNo = locNecessaryParameters[2]; |
| | | // if (basCrnpService.checkSiteError(crnNo, true)) { |
| | | // rowCount = locNecessaryParameters[0]; |
| | | // nearRow = locNecessaryParameters[3]; |
| | | // List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | // .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | // int crnCountO = wrkMastService.selectCount(new EntityWrapper<WrkMast>().eq("crn_no", crnNo).le("io_type", 100)); |
| | | // if (locMasts.size() - crnCountO <= 2) { |
| | | // log.error(crnNo + "号堆垛机没有空库位!!! 尺寸规格: {}, 轮询次数:{}", JSON.toJSONString(locTypeDto), times); |
| | | // nearRow = 0; |
| | | // times++; |
| | | // continue; |
| | | // } |
| | | // break; |
| | | // } else { |
| | | // times++; |
| | | // } |
| | | // } |
| | | if (nearRow == 0) { |
| | | throw new CoolException("无可用堆垛机"); |
| | | } |
| | |
| | | if (signRule1) { |
| | | if (nearRow != curRow) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("row1", nearRow).eq("loc_sts", "O").eq("crn_no", crnNo)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | //获取巷道 |
| | | // List<String> groupOutsideLocCrn = Utils.getGroupOutLocCrn(curRow,nearRow,locMast1.getLocNo(), curRow>nearRow); |
| | |
| | | if (Cools.isEmpty(locMast) && crnNo != 0) { |
| | | List<LocMast> locMasts = locMastService.selectList(new EntityWrapper<LocMast>() |
| | | .eq("row1", nearRow) |
| | | .eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue()) |
| | | .eq("loc_sts", "O").eq("crn_no", crnNo) |
| | | .orderBy("lev1", true).orderBy("bay1", true)); |
| | | for (LocMast locMast1 : locMasts) { |
| | | if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | continue; |
| | | } |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } |
| | | } else { |
| | | if (!Cools.isEmpty(locMast1)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | // for (LocMast locMast1 : locMasts) { |
| | | // if (!VersionUtils.locMoveCheckLocTypeComplete(locMast1, locTypeDto)) { |
| | | // continue; |
| | | // } |
| | | // if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | // String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | // LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | // .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("crn_no", crnNo)); |
| | | // if (!Cools.isEmpty(locMast2)) { |
| | | // locMast = locMast2; |
| | | // break; |
| | | // } |
| | | // } else { |
| | | // if (!Cools.isEmpty(locMast1)) { |
| | | // locMast = locMast1; |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | |
| | | if (Cools.isEmpty(locMast) && Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | for (LocMast locMast1 : locMasts) { |
| | |
| | | if (Utils.BooleanWhsTypeStaIoType(rowLastno)) { |
| | | String shallowLoc = Utils.getDeepLoc(slaveProperties, locMast1.getLocNo()); |
| | | LocMast locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "O").eq("crn_no", crnNo)); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast2; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "F").eq("crn_no", crnNo)); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | | } else { |
| | | locMast2 = locMastService.selectOne(new EntityWrapper<LocMast>() |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("whs_type", rowLastnoType.getType().longValue())); |
| | | .eq("loc_no", shallowLoc).eq("loc_sts", "D").eq("crn_no", crnNo)); |
| | | if (!Cools.isEmpty(locMast2)) { |
| | | locMast = locMast1; |
| | | break; |
| | |
| | | page: true, |
| | | height: '450px;', |
| | | cellMinWidth: 100, |
| | | cols: [ |
| | | // [ |
| | | // { type: 'numbers' }, |
| | | // { field: 'matnr', title: '商品编码', width: 160 }, |
| | | // { field: 'maktx', title: '商品名称', width: 160 }, |
| | | // { field: 'standby1', title: '供应商编码', width: 160 }, |
| | | // { field: 'threeCode', title: 'BS Code', width: 160 }, |
| | | // { field: 'tag$', title: '物料种类' }, |
| | | // { field: 'anfme', title: '数量' }, |
| | | // { field: 'workQty', title: '作业数量' }, |
| | | // { field: 'qty', title: '完成数量', style: 'font-weight: bold' }, |
| | | // { field: 'specs', title: '规格' } |
| | | // ] |
| | | getCol() |
| | | |
| | | ], |
| | | cols: [[ |
| | | {field: 'matnr', title: '商品编码', width: 160}, |
| | | {field: 'maktx', title: '商品名称', width: 160}, |
| | | {field: 'tag$', align: 'center', title: '零件类型'}, |
| | | {field: 'standby1', title: '供应商编码', width: 120}, |
| | | {field: 'anfme', title: '数量'}, |
| | | {field: 'workQty', title: '作业数量'}, |
| | | {field: 'qty', title: '完成数量', style: 'font-weight: bold'}, |
| | | {field: 'weight', align: 'center',title: '重量', hide: false }, |
| | | {field: 'volume', align: 'center',title: '尺寸', hide: false}, |
| | | {field: 'specs', title: '规格'} |
| | | ]], |
| | | request: { |
| | | pageName: 'curr', |
| | | pageSize: 'limit' |
| | |
| | | }); |
| | | |
| | | function getCol() { |
| | | var cols = []; |
| | | var cols = [{field: 'locNo$', align: 'center', title: '库位号'},]; |
| | | cols.push.apply(cols, cacheCols); |
| | | return cols; |
| | | } |
| | |
| | | }, |
| | | color: ['#10B4E8', '#E0E0E0', '#FF0000'], |
| | | tooltip: {trigger: 'item'}, |
| | | series: [{name: '数量', type: 'pie', radius: ['75%', '80%'], label: {normal: {show: false}}}] |
| | | series: [{ |
| | | name: '数量', |
| | | type: 'pie', |
| | | radius: ['75%', '80%'], |
| | | label: {normal: {show: false}} |
| | | }] |
| | | }; |
| | | traceCharts.setOption(traceOptions); |
| | | // 赋值 |
| | |
| | | { |
| | | data: [ |
| | | {name: '已作业', value: res.data.wrkQty}, |
| | | {name: '未作业', value: res.data.totalQty-res.data.wrkQty-res.data.lackQty}, |
| | | { |
| | | name: '未作业', |
| | | value: res.data.totalQty - res.data.wrkQty - res.data.lackQty |
| | | }, |
| | | {name: '库存不足', value: res.data.lackQty}, |
| | | ] |
| | | } |