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