常熟吴彦祖 3 months ago
parent
commit
3ae980b77d
  1. 8
      src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java
  2. 34
      src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java

8
src/main/java/com/gaotao/modules/automatedWarehouse/service/impl/WcsIntegrationServiceImpl.java

@ -418,8 +418,8 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
AgvStation nowStation = wcsIntegrationMapper.getNowStation(site, palletId);
if (nowStation == null) {
//初始化的时候用 一开始栈板是没有位置的 按照第一个入栈的标签来给虚拟位置 后期不需要处理
if("Temp".equals(labelWarehouseId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Temp");
if("TEMP".equals(labelWarehouseId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "TEMP");
}else if("AS".equals(labelLocationId)){
wcsIntegrationMapper.updatePalletLocationCode(site, palletId, "Virtual_AS");
}else {
@ -428,6 +428,7 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
}
// 校验栈板和物料的仓库是否一致栈板的仓库通过location_code关联agv_station获取warehouse_code
nowStation=wcsIntegrationMapper.getNowStation(site, palletId);
String palletWarehouseCode = nowStation.getWarehouseCode();
if (!labelWarehouseId.equals(palletWarehouseCode)) {
throw new Exception("栈板和物料的仓库不同,无法进行打托操作");
@ -1119,9 +1120,6 @@ public class WcsIntegrationServiceImpl implements WcsIntegrationService {
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername();
// 更新栈板calling_flag为Y
wcsIntegrationMapper.updatePalletCallingFlag(site, palletId, "Y", username);
}else {
//如果是分次组托 说明在分拣 需要查下是否有相关订单
}
Boolean boFlag="Y".equals(endFlag);
//有常用料就有这个标记

34
src/main/java/com/gaotao/modules/warehouse/service/impl/LabelQueryServiceImpl.java

@ -101,23 +101,23 @@ public class LabelQueryServiceImpl implements LabelQueryService {
// 校验库位是否存在以及是否属于指定仓库 - rqrq
if (dto.getLocationId() != null && !dto.getLocationId().isEmpty()) {
Location location = locationService.lambdaQuery()
.eq(Location::getSite, dto.getSite())
.eq(Location::getLocationId, dto.getLocationId())
.one();
if (location == null) {
throw new RuntimeException("库位【" + dto.getLocationId() + "】不存在");
}
// 检查库位是否属于指定仓库 - rqrq
if (dto.getWarehouseId() != null && !dto.getWarehouseId().isEmpty()) {
if (!dto.getWarehouseId().equals(location.getWarehouseId())) {
throw new RuntimeException("库位【" + dto.getLocationId() + "】不属于仓库【" + dto.getWarehouseId() + "】");
}
}
}
// if (dto.getLocationId() != null && !dto.getLocationId().isEmpty() && !"TEMP".equals(dto.getWarehouseId())){
// Location location = locationService.lambdaQuery()
// .eq(Location::getSite, dto.getSite())
// .eq(Location::getLocationId, dto.getLocationId())
// .one();
//
// if (location == null) {
// throw new RuntimeException("库位【" + dto.getLocationId() + "】不存在");
// }
//
// // 检查库位是否属于指定仓库 - rqrq
// if (dto.getWarehouseId() != null && !dto.getWarehouseId().isEmpty()) {
// if (!dto.getWarehouseId().equals(location.getWarehouseId())) {
// throw new RuntimeException("库位【" + dto.getLocationId() + "】不属于仓库【" + dto.getWarehouseId() + "】");
// }
// }
// }
// 更新HandlingUnit信息 - rqrq
handlingUnit.setWarehouseId(dto.getWarehouseId());

Loading…
Cancel
Save