|
|
|
@ -39,8 +39,11 @@ import org.springblade.common.exception.CustomerException;
|
|
|
|
|
import org.springblade.common.utils.CommonUtil; |
|
|
|
|
import org.springblade.core.mp.base.BaseServiceImpl; |
|
|
|
|
import org.springblade.core.secure.utils.AuthUtil; |
|
|
|
|
import org.springblade.core.tool.api.R; |
|
|
|
|
import org.springblade.core.tool.utils.Func; |
|
|
|
|
import org.springblade.core.tool.utils.StringUtil; |
|
|
|
|
import org.springblade.system.entity.Tenant; |
|
|
|
|
import org.springblade.system.feign.ISysClient; |
|
|
|
|
import org.springframework.amqp.rabbit.core.RabbitTemplate; |
|
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
@ -65,6 +68,7 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
|
|
|
|
|
private final RabbitTemplate rabbitTemplate; |
|
|
|
|
private final ITrunklineAdvanceDetailService advanceDetailService; |
|
|
|
|
private final IBasicdataBrandClient basicdataBrandClient; |
|
|
|
|
private final ISysClient sysClient; |
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
public boolean saveOrderAndPackage(TrunklineAdvanceDetailEntity advanceDetailEntity, Long warehouseId) { |
|
|
|
@ -764,7 +768,24 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
|
|
|
|
|
@Override |
|
|
|
|
public boolean saveOrderAndPackages(List<TrunklineAdvanceDetailEntity> advanceDetailEntities, Long warehouseId) { |
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer isTransfer; |
|
|
|
|
|
|
|
|
|
R<Tenant> tenant = sysClient.getTenant(AuthUtil.getTenantId()); |
|
|
|
|
if(tenant.isSuccess()){ |
|
|
|
|
Tenant data = tenant.getData(); |
|
|
|
|
if(new Integer(2).equals(data.getTenantType())){ |
|
|
|
|
isTransfer=0; |
|
|
|
|
} else { |
|
|
|
|
isTransfer = 1; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
isTransfer = 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
BasicdataWarehouseEntity warehouseEntity = basicdataWarehouseClient.getEntityWarehouseId(warehouseId); |
|
|
|
|
if (Objects.isNull(warehouseEntity)) { |
|
|
|
|
log.warn("############saveOrderAndPackages: 仓库信息不存在warehouseId={}", warehouseId); |
|
|
|
|
throw new CustomerException(405, "仓库信息不存在"); |
|
|
|
@ -1010,7 +1031,11 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
|
|
|
|
|
parcelList.setTenantId(tenantId); |
|
|
|
|
parcelList.setWarehouse(warehouseEntity.getName()); |
|
|
|
|
parcelList.setWarehouseId(warehouseId); |
|
|
|
|
parcelList.setIsTransfer(1); |
|
|
|
|
|
|
|
|
|
/*增加通过当前登陆人所应对的租户类型来判断是否是 中转包件 还是 目的仓包件*/ |
|
|
|
|
|
|
|
|
|
parcelList.setIsTransfer(isTransfer); |
|
|
|
|
|
|
|
|
|
String waybillNo = ad.getWaybillNo(); |
|
|
|
|
if (StringUtil.isNotBlank(waybillNo)) { |
|
|
|
|
WarehouseWaybillEntity waybillEntity = finalWaybillEntityMap.get(waybillNo); |
|
|
|
|