Commit b08a68bf by guojuxing

如果是添加分店,不要判断总店重复

parent f75f0fb2
......@@ -96,19 +96,17 @@ public class WmStoreSyncController {
@RequestMapping("list-store")
public RestResponse listStore(StoreSearchDTO storeSearchDTO, Integer wmMallStoreId) {
//todo 过滤已同步过的门店
storeSearchDTO.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
storeSearchDTO.setStatus(1);
//已完善
storeSearchDTO.setCompleteStatus(1);
ServiceResponse<List<WmStoreSyncLogDTO>> hasSyncStoreListResult = wmStoreSyncLogApiService.getStoreList(null, wmMallStoreId);
LOGGER.info("微盟门店列表查询同步门店日志:{}", JSON.toJSONString(hasSyncStoreListResult));
//过滤已同步过的门店
if (hasSyncStoreListResult.isSuccess()) {
StringBuilder sb = new StringBuilder();
hasSyncStoreListResult.getResult().forEach(e -> sb.append(e.getStoreId()).append(" "));
storeSearchDTO.setStoreIdsOfNot(sb.toString());
}
LOGGER.info("微盟门店列表查询参数:{}", JSON.toJSONString(storeSearchDTO));
return ResultControllerUtils.commonResult(storeApiService
.listStore(storeSearchDTO, storeSearchDTO.getCurrentPage(), storeSearchDTO.getPageSize()));
}
......@@ -197,7 +195,7 @@ public class WmStoreSyncController {
isBranch = false;
}
if (getHasSyncStore(wmMallStoreId).contains(headStoreId.toString())) {
if (!isBranch && getHasSyncStore(wmMallStoreId).contains(headStoreId.toString())) {
return RestResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "重复同步");
}
......@@ -509,6 +507,13 @@ public class WmStoreSyncController {
}
}
/**
* 一对一Excel导入
* @param wmMallStoreId
* @param file
* @return
* @throws IOException
*/
@RequestMapping("weimob-init-import")
public RestResponse importSettlement(Integer wmMallStoreId, MultipartFile file) throws IOException {
if (file == null || file.isEmpty()) {
......@@ -778,7 +783,8 @@ public class WmStoreSyncController {
}
private StoreDTO getStoreByRegionAndCode(Integer enterpriseId, Integer regionId, String storeCode) {
ServiceResponse<StoreDTO> storeResponse = storeApiService.getStoreByStoreCode(enterpriseId, regionId, storeCode);
ServiceResponse<StoreDTO> storeResponse = storeApiService
.getStoreContainBusinessTimeByStoreCode(enterpriseId, regionId, storeCode);
if (storeResponse.isSuccess()) {
return storeResponse.getResult();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment