|
|
|
@ -884,42 +884,48 @@ public class TrunklineAdvanceServiceImpl extends BaseServiceImpl<TrunklineAdvanc
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
Long clientId = basicdataTripartiteMallClient.getClientIdByNameAndBrand(dealerName, advanceEntity.getBrand()); |
|
|
|
|
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId); |
|
|
|
|
if (!Objects.isNull(basicdataClientEntity)) { |
|
|
|
|
String clientType = basicdataClientEntity.getClientType(); |
|
|
|
|
if ("5".equals(clientType)) { |
|
|
|
|
stockArticleEntity.setStoreId(basicdataClientEntity.getId()); |
|
|
|
|
stockArticleEntity.setStoreCode(basicdataClientEntity.getClientCode()); |
|
|
|
|
stockArticleEntity.setStoreName(basicdataClientEntity.getClientName()); |
|
|
|
|
//查询门店的父级商场
|
|
|
|
|
Long pid = basicdataClientEntity.getPid(); |
|
|
|
|
BasicdataClientEntity pidEntity = basicdataClientClient.findEntityById(pid); |
|
|
|
|
if (!Objects.isNull(pidEntity)) { |
|
|
|
|
String pidEntityClientType = pidEntity.getClientType(); |
|
|
|
|
if ("2".equals(pidEntityClientType)) { |
|
|
|
|
//商城
|
|
|
|
|
stockArticleEntity.setMallId(pidEntity.getId()); |
|
|
|
|
stockArticleEntity.setMallName(pidEntity.getClientName()); |
|
|
|
|
stockArticleEntity.setMallCode(pidEntity.getClientCode()); |
|
|
|
|
|
|
|
|
|
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(pidEntity.getId(), 3); |
|
|
|
|
if (!Objects.isNull(basicdataStoreBusinessEntity)) { |
|
|
|
|
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); |
|
|
|
|
if(!Objects.isNull(clientId)){ |
|
|
|
|
BasicdataClientEntity basicdataClientEntity = basicdataClientClient.findEntityById(clientId); |
|
|
|
|
if (!Objects.isNull(basicdataClientEntity)) { |
|
|
|
|
String clientType = basicdataClientEntity.getClientType(); |
|
|
|
|
if ("5".equals(clientType)) { |
|
|
|
|
stockArticleEntity.setStoreId(basicdataClientEntity.getId()); |
|
|
|
|
stockArticleEntity.setStoreCode(basicdataClientEntity.getClientCode()); |
|
|
|
|
stockArticleEntity.setStoreName(basicdataClientEntity.getClientName()); |
|
|
|
|
//查询门店的父级商场
|
|
|
|
|
Long pid = basicdataClientEntity.getPid(); |
|
|
|
|
if(!Objects.isNull(pid)){ |
|
|
|
|
BasicdataClientEntity pidEntity = basicdataClientClient.findEntityById(pid); |
|
|
|
|
if (!Objects.isNull(pidEntity)) { |
|
|
|
|
String pidEntityClientType = pidEntity.getClientType(); |
|
|
|
|
if ("2".equals(pidEntityClientType)) { |
|
|
|
|
//商城
|
|
|
|
|
stockArticleEntity.setMallId(pidEntity.getId()); |
|
|
|
|
stockArticleEntity.setMallName(pidEntity.getClientName()); |
|
|
|
|
stockArticleEntity.setMallCode(pidEntity.getClientCode()); |
|
|
|
|
|
|
|
|
|
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(pidEntity.getId(), 3); |
|
|
|
|
if (!Objects.isNull(basicdataStoreBusinessEntity)) { |
|
|
|
|
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else if ("2".equals(clientType)) { |
|
|
|
|
//商城
|
|
|
|
|
stockArticleEntity.setMallId(basicdataClientEntity.getId()); |
|
|
|
|
stockArticleEntity.setMallName(basicdataClientEntity.getClientName()); |
|
|
|
|
stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode()); |
|
|
|
|
|
|
|
|
|
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(basicdataClientEntity.getId(), 3); |
|
|
|
|
if (!Objects.isNull(basicdataStoreBusinessEntity)) { |
|
|
|
|
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); |
|
|
|
|
} else if ("2".equals(clientType)) { |
|
|
|
|
//商城
|
|
|
|
|
stockArticleEntity.setMallId(basicdataClientEntity.getId()); |
|
|
|
|
stockArticleEntity.setMallName(basicdataClientEntity.getClientName()); |
|
|
|
|
stockArticleEntity.setMallCode(basicdataClientEntity.getClientCode()); |
|
|
|
|
|
|
|
|
|
BasicdataStoreBusinessEntity basicdataStoreBusinessEntity = basicdataStoreBusinessClient.findByClientIdAndTypeService(basicdataClientEntity.getId(), 3); |
|
|
|
|
if (!Objects.isNull(basicdataStoreBusinessEntity)) { |
|
|
|
|
stockArticleEntity.setTypeService(basicdataStoreBusinessEntity.getMold()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
stockArticleEntity.setCustomerName(advanceEntity.getCustomerName()); |
|
|
|
|
stockArticleEntity.setCustomerTelephone(advanceEntity.getCustomerPhone()); |
|
|
|
|