|
|
|
@ -21,6 +21,7 @@ import com.gaotao.modules.handlingunit.entity.HandlingUnit; |
|
|
|
import com.gaotao.modules.handlingunit.service.HandlingUnitService; |
|
|
|
import com.gaotao.modules.trans.entity.*; |
|
|
|
import com.gaotao.modules.trans.service.*; |
|
|
|
import com.gaotao.modules.warehouse.dao.PalletMapper; |
|
|
|
import com.gaotao.modules.warehouse.entity.InventoryStock; |
|
|
|
import com.gaotao.modules.warehouse.entity.Pallet; |
|
|
|
import com.gaotao.modules.warehouse.service.InventoryStockService; |
|
|
|
@ -65,6 +66,8 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private PalletService palletService; |
|
|
|
@Autowired |
|
|
|
private PalletMapper palletMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WcsIntegrationService wcsIntegrationService; |
|
|
|
@ -379,8 +382,22 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
throw new RuntimeException("托盘不存在:" + inData.getPalletId()); |
|
|
|
} |
|
|
|
|
|
|
|
// 更新托盘位置和调用标志 - rqrq |
|
|
|
log.info("取货通知-更新托盘信息前 - rqrq,托盘ID: {}, 主键ID: {}, 当前位置: {}, 当前调用标志: {}, 目标位置: {}", |
|
|
|
pallet.getPalletId(), pallet.getId(), pallet.getLocationCode(), pallet.getCallingFlag(), inData.getToBarcode()); |
|
|
|
|
|
|
|
pallet.setLocationCode(inData.getToBarcode()); |
|
|
|
palletService.updateById(pallet); |
|
|
|
pallet.setCallingFlag("N"); |
|
|
|
// boolean updateResult = palletService.updateById(pallet); |
|
|
|
palletMapper.updateLocationWithPalletId(pallet.getSite(),pallet.getPalletId(),pallet.getLocationCode(),null); |
|
|
|
|
|
|
|
// log.info("取货通知-更新托盘信息完成 - rqrq,托盘ID: {}, 主键ID: {}, 更新结果: {}, 新位置: {}, 新调用标志: N", |
|
|
|
// pallet.getPalletId(), pallet.getId(), updateResult ? "成功" : "失败", inData.getToBarcode()); |
|
|
|
// |
|
|
|
// if (!updateResult) { |
|
|
|
// throw new RuntimeException("更新托盘信息失败,托盘ID: " + inData.getPalletId()); |
|
|
|
// } |
|
|
|
|
|
|
|
// 4. 保存WCS回调数据到新表,作为记录 后续根据order表去取货就行 |
|
|
|
WcsCallbackTask callbackTask = new WcsCallbackTask(); |
|
|
|
callbackTask.setSite(inData.getSite()); |
|
|
|
@ -498,7 +515,8 @@ public class WmsMessageServiceImpl implements WmsMessageService { |
|
|
|
} |
|
|
|
pallet.setLocationCode(request.getToStation()); |
|
|
|
pallet.setWcsLocation(request.getToStation()); |
|
|
|
palletService.updateById(pallet); |
|
|
|
|
|
|
|
palletMapper.updateLocationWithPalletId(pallet.getSite(),pallet.getPalletId(),pallet.getLocationCode(),pallet.getWcsLocation()); |
|
|
|
|
|
|
|
//如果更新wcs库位 |
|
|
|
//这里插入逻辑 |
|
|
|
|