This commit is contained in:
shuo.wang
2025-01-13 14:53:18 +08:00
parent 5d2afdf9c5
commit 06e37e0e89
9 changed files with 34 additions and 25 deletions

View File

@@ -76,11 +76,11 @@ public class ShopInfoDAO {
return shopInfoMapper.getShopList(lineId);
}
public List<ShopInfoDO> getShopListByRegion(Long lineId,List<Long> regionIdList){
public List<ShopInfoDO> getShopListByRegion(Long lineId,List<Long> regionIdList,String userId){
if(Objects.isNull(lineId)){
return new ArrayList<>();
}
return shopInfoMapper.getShopListByRegion(lineId,regionIdList);
return shopInfoMapper.getShopListByRegion(lineId,regionIdList,userId);
}
/**

View File

@@ -39,7 +39,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
*/
List<ShopInfoDO> getShopList(@Param("lineId") Long lineId);
List<ShopInfoDO> getShopListByRegion(@Param("lineId") Long lineId,@Param("list") List<Long> regions);
List<ShopInfoDO> getShopListByRegion(@Param("lineId") Long lineId,@Param("list") List<Long> regions,@Param("userId") String userId);
/**
* 店铺信息

View File

@@ -330,6 +330,12 @@
#{item}
</foreach>
</if>
<if test="userId ==null or userId ==''">
and shop_status in (0,1)
</if>
<if test="userId !=null and userId !=''">
and shop_status in (0,1,2)
</if>
</select>
<select id="getShopPointListByDevelopmentManager" resultType="com.cool.store.dto.point.ShopPointDTO">

View File

@@ -14,11 +14,7 @@ import java.util.List;
* @注释:
*/
@Data
public class BranchShopRequest {
//页码
private Integer pageNum=1;
//分页大小
private Integer pageSize=10;
public class BranchShopRequest extends PageBasicInfo{
@ApiModelProperty("加盟商姓名或手机号")
private String partnerKeyword;
@ApiModelProperty("门店名称/编号")

View File

@@ -39,7 +39,7 @@ public class BranchShopResponse {
@ApiModelProperty("完成项")
private Integer completionColumn;
@ApiModelProperty("开店时长")
private String openTime;
private String days;
@ApiModelProperty("督导/招商经理")
private String investmentManagerName;
@ApiModelProperty("状态")
@@ -49,15 +49,15 @@ public class BranchShopResponse {
@ApiModelProperty("开业活动完成时间")
private Date openingActivityEndTime;
public void setOpenTime() {
public void setDays() {
if (this.openingActivityEndTime==null){
long between = ChronoUnit.SECONDS.between(this.createTime.toInstant(), new Date().toInstant());
double days = (double) between / (24*60*60);
this.openTime=String.format("%.1f", days);
this.days=String.format("%.1f", days);
}else{
long between = ChronoUnit.SECONDS.between(this.createTime.toInstant(), this.openingActivityEndTime.toInstant());
double days = (double) between / (24*60*60);
this.openTime = String.format("%.1f", days);
this.days = String.format("%.1f", days);
}
}

View File

@@ -73,6 +73,7 @@ public class ExportServiceImpl implements ExportService {
private ShopService shopService;
//原先进度管理接口废弃使用branchShopList
@Override
public Integer preparationList(PreparationRequest request, LoginUserInfo loginUserInfo) {
if (!sysRoleService.checkIsAdmin(request.getCurUserId())) {
@@ -112,6 +113,7 @@ public class ExportServiceImpl implements ExportService {
@Override
public Long branchShopList(BranchShopRequest request, LoginUserInfo user) {
request.setPageSize(CommonConstants.MAX_EXPORT_SIZE + 100);
request.setPageNum(CommonConstants.ONE);
PageInfo<BranchShopResponse> branchShopList = shopService.getBranchShopList(request, user.getUserId());
long total = branchShopList.getTotal();
List<BranchShopResponse> exportList = new ArrayList<>();

View File

@@ -121,6 +121,11 @@ public class ShopServiceImpl implements ShopService {
return result;
}
/**
* @Auther: wangshuo
* @Date: 2025/1/13
* @description: 当userId为空时表示为mini查询的门店不包括结束跟进的否则为mini查询的门店包括结束跟进的
*/
@Override
public List<MiniShopPageVO> getShopList(Long lineId, String userId) {
List<Long> authRegions = new ArrayList<>();
@@ -129,7 +134,7 @@ public class ShopServiceImpl implements ShopService {
authRegions.add(Long.valueOf(region));
}
}
List<ShopInfoDO> shopList = shopInfoDAO.getShopListByRegion(lineId, authRegions);
List<ShopInfoDO> shopList = shopInfoDAO.getShopListByRegion(lineId, authRegions,userId);
List<Long> shopIds = shopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
List<Long> wantShopAreaIds = shopList.stream().map(ShopInfoDO::getWantShopAreaId).collect(Collectors.toList());
Map<Long, String> wantRegionMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIds);
@@ -381,7 +386,7 @@ public class ShopServiceImpl implements ShopService {
response.setInvestmentManagerName(userInfoMap.getOrDefault(dto.getInvestmentManager(), new EnterpriseUserDO()).getName());
response.setShopStatus(ShopStatusEnum.getDesc(dto.getShopStatus()));
response.setCreateTime(dto.getCreateTime());
response.setOpenTime();
response.setDays();
responses.add(response);
}

View File

@@ -117,12 +117,7 @@ public class PCShopController {
return ResponseResult.success(transferLogService.getTransferLogPage(pageNum, pageSize, lineId, lineShopType));
}
@ApiOperation("开店管理列表")
@PostMapping("/getBranchShopList")
public ResponseResult<PageInfo<BranchShopResponse>> getBranchShopList(@RequestBody @Validated BranchShopRequest request) {
String userId = CurrentUserHolder.getUserId();
return ResponseResult.success(shopService.getBranchShopList(request, userId));
}
@ApiOperation("门店结束跟进")

View File

@@ -1,10 +1,14 @@
package com.cool.store.controller.webb;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.request.BranchShopRequest;
import com.cool.store.request.PreparationRequest;
import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.response.BranchShopDetailResponse;
import com.cool.store.response.BranchShopResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.PreparationService;
import com.cool.store.service.ShopService;
import com.cool.store.service.impl.PreparationServiceImpl;
import com.cool.store.vo.Preparation.PreparationProcessVO;
import com.cool.store.vo.Preparation.PreparationScheduleDetailVO;
@@ -31,19 +35,20 @@ public class PreparationController {
@Resource
PreparationService preparationService;
@Resource
ShopService shopService;
@ApiOperation("进度列表")
@PostMapping("/list")
public ResponseResult<PageInfo<PreparationScheduleVO>> distribution(@RequestBody PreparationRequest request) {
request.setCurUserId(CurrentUserHolder.getUserId());
return ResponseResult.success(preparationService.getPreparationSchedule(request));
public ResponseResult<PageInfo<BranchShopResponse>> distribution(@RequestBody BranchShopRequest request) {
return ResponseResult.success(shopService.getBranchShopList(request,CurrentUserHolder.getUserId()));
}
@ApiOperation("筹建详情")
@GetMapping("/getPreparationDetail")
public ResponseResult<PreparationScheduleDetailVO> getPreparationDetail(@RequestParam("shopId")Long shopId) {
return ResponseResult.success(preparationService.getPreparationDetail(shopId));
public ResponseResult<BranchShopDetailResponse> getPreparationDetail(@RequestParam("shopId")Long shopId) {
return ResponseResult.success(shopService.getBranchShopDetail(shopId));
}
@ApiOperation("筹建进展")