|
|
@@ -187,6 +187,12 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R saveShipMessage(PjShip ship) {
|
|
|
+ if(!org.springframework.util.ObjectUtils.isEmpty(ship.getId())) {
|
|
|
+ PjShip srcShip = baseMapper.selectById(ship.getId());
|
|
|
+ if (ObjectUtils.isNotNull(srcShip) && !Objects.equals(ship.getVersion(), srcShip.getVersion())) {
|
|
|
+ return R.fail(601, "数据已被其他用户更新,请等待刷新后重试");
|
|
|
+ }
|
|
|
+ }
|
|
|
//获得所属公司
|
|
|
R<Dept> dept = sysClient.getDept(Long.valueOf(AuthUtil.getDeptId()));
|
|
|
if (ObjectUtil.isNotEmpty(dept)) {
|
|
|
@@ -699,7 +705,6 @@ public class ShipServiceImpl extends ServiceImpl<ShipMapper, PjShip> implements
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public R outboundCompleted(PjShip ship) {
|
|
|
- ship.setStatusName(OrderTypeEnum.OURTBOUND.getType());
|
|
|
if (ObjectUtils.isNull(ship.getStorageId())) {
|
|
|
throw new RuntimeException("请先选择仓库");
|
|
|
}
|