fix
This commit is contained in:
@@ -1183,6 +1183,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
List<Long> isShopIds = isCreateStore.stream().map(IsCreateStoreDTO::getShopId).collect(Collectors.toList());
|
List<Long> isShopIds = isCreateStore.stream().map(IsCreateStoreDTO::getShopId).collect(Collectors.toList());
|
||||||
//未建店
|
//未建店
|
||||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectByNotCreateStore(isShopIds);
|
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectByNotCreateStore(isShopIds);
|
||||||
|
//List<ShopInfoDO> shopInfoDOS = Collections.singletonList(shopInfoDAO.getShopInfo(414L));
|
||||||
Set<String> investUserIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
Set<String> investUserIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(investUserIds));
|
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(investUserIds));
|
||||||
List<ImportOaOldShopDataErrorDTO> errorList = new ArrayList<>();
|
List<ImportOaOldShopDataErrorDTO> errorList = new ArrayList<>();
|
||||||
@@ -1210,11 +1211,7 @@ public class DataHandlerServerImpl implements DataHandlerServer {
|
|||||||
}else{
|
}else{
|
||||||
regionDO= branchStoreManageMap.get(name);
|
regionDO= branchStoreManageMap.get(name);
|
||||||
}
|
}
|
||||||
if (shopInfoDO.getId()==313){
|
if (Objects.isNull(regionDO)||!Long.valueOf(regionDO.getParentId()).equals(bigRegionDTO.getStoreManageRegionId())){
|
||||||
log.info("bigRegionDTO:{}",JSONObject.toJSONString(bigRegionDTO));
|
|
||||||
log.info("regionDO:{}",JSONObject.toJSONString(regionDO));
|
|
||||||
}
|
|
||||||
if (Objects.isNull(regionDO)){
|
|
||||||
log.info("门店所属管理区域未找到 shopId:{}",shopInfoDO.getId());
|
log.info("门店所属管理区域未找到 shopId:{}",shopInfoDO.getId());
|
||||||
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO(shopInfoDO.getShopCode(), "门店所属管理区域未找到");
|
ImportOaOldShopDataErrorDTO errorDTO = new ImportOaOldShopDataErrorDTO(shopInfoDO.getShopCode(), "门店所属管理区域未找到");
|
||||||
errorDTO.setShopName(shopInfoDO.getShopName());
|
errorDTO.setShopName(shopInfoDO.getShopName());
|
||||||
|
|||||||
@@ -72,14 +72,15 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
private String eid;
|
private String eid;
|
||||||
@Resource
|
@Resource
|
||||||
private StoreDao storeDao;
|
private StoreDao storeDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Async
|
@Async
|
||||||
public void syncStore(Long shopId) {
|
public void syncStore(Long shopId) {
|
||||||
StoreRequestBody requestBody = new StoreRequestBody();
|
StoreRequestBody requestBody = new StoreRequestBody();
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
StoreDO storeDO = storeDao.getByStoreNum(shopInfo.getShopCode());
|
StoreDO storeDO = storeDao.getByStoreNum(shopInfo.getShopCode());
|
||||||
if (Objects.nonNull(storeDO)){
|
if (Objects.nonNull(storeDO)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
throw new ServiceException(ErrorCodeEnum.STORE_IS_EXIST);
|
||||||
}
|
}
|
||||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||||
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
PointInfoDO pointInfoDO = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||||
@@ -88,17 +89,17 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
|
|
||||||
requestBody.setStore_name(shopInfo.getShopName());
|
requestBody.setStore_name(shopInfo.getShopName());
|
||||||
requestBody.setStore_num(shopInfo.getShopCode());
|
requestBody.setStore_num(shopInfo.getShopCode());
|
||||||
requestBody.setProvince(pointInfoDO.getProvince());
|
requestBody.setProvince(shopInfo.getProvince());
|
||||||
requestBody.setCity(pointInfoDO.getCity());
|
requestBody.setCity(shopInfo.getCity());
|
||||||
requestBody.setCounty(pointInfoDO.getDistrict());
|
requestBody.setCounty(shopInfo.getDistrict());
|
||||||
requestBody.setLocation_address(shopInfo.getDetailAddress());
|
requestBody.setLocation_address(shopInfo.getDetailAddress());
|
||||||
requestBody.setStore_address(shopInfo.getDetailAddress());
|
requestBody.setStore_address(shopInfo.getDetailAddress());
|
||||||
if (shopInfo.getManagerRegionId() == null) {
|
if (shopInfo.getManagerRegionId() == null) {
|
||||||
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
BigRegionDO byRegionId = bigRegionDAO.getByRegionId(shopInfo.getRegionId());
|
||||||
if (byRegionId != null){
|
if (byRegionId != null) {
|
||||||
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
|
requestBody.setStore_area(byRegionId.getStoreManageRegionId() == null
|
||||||
? shopInfo.getRegionId().toString() : shopInfo.getManagerRegionId().toString());
|
? shopInfo.getRegionId().toString() : shopInfo.getManagerRegionId().toString());
|
||||||
}else{
|
} else {
|
||||||
requestBody.setStore_area(shopInfo.getRegionId().toString());
|
requestBody.setStore_area(shopInfo.getRegionId().toString());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -106,8 +107,10 @@ public class SyncMainSysServerImpl implements SyncMainSysServer {
|
|||||||
}
|
}
|
||||||
//未开业
|
//未开业
|
||||||
requestBody.setStore_status("not_open");
|
requestBody.setStore_status("not_open");
|
||||||
requestBody.setStore_acreage(pointInfoDO.getPointArea());
|
if (pointInfoDO != null) {
|
||||||
requestBody.setLongitude_latitude(pointInfoDO.getLongitude() + "," + pointInfoDO.getLatitude());
|
requestBody.setStore_acreage(pointInfoDO.getPointArea());
|
||||||
|
requestBody.setLongitude_latitude(pointInfoDO.getLongitude() + "," + pointInfoDO.getLatitude());
|
||||||
|
}
|
||||||
requestBody.setTelephone(buildInformationDO.getBusinessMobile());
|
requestBody.setTelephone(buildInformationDO.getBusinessMobile());
|
||||||
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
|
if (StringUtils.isNotBlank(buildInformationDO.getBusinessHours())) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user