修改运营方案

This commit is contained in:
shuo.wang
2024-05-20 18:10:00 +08:00
parent 9be6d0747e
commit c277bbb6cb
3 changed files with 30 additions and 43 deletions

View File

@@ -28,13 +28,13 @@ public class OpeningOperationPlanRequest {
private String surveyResult;
@ApiModelProperty("调研结果url")
private List<String> surveyResultUrl;
private String surveyResultUrl;
@ApiModelProperty("活动主题")
private String activityTheme;
@ApiModelProperty("活动主题url")
private List<String> activityThemeUrl;
private String activityThemeUrl;
@ApiModelProperty("筹备人员ids")
private List<String> preparationUserIds;
@@ -49,12 +49,8 @@ public class OpeningOperationPlanRequest {
openingOperationPlanDO.setShopId(this.shopId);
openingOperationPlanDO.setPlanSource(this.planSource);
openingOperationPlanDO.setSurveyResult(this.surveyResult);
if (CollectionUtils.isNotEmpty(this.surveyResultUrl)) {
openingOperationPlanDO.setSurveyResultUrl(String.join(",", this.surveyResultUrl));
}
if (CollectionUtils.isNotEmpty(this.activityThemeUrl)) {
openingOperationPlanDO.setActivityThemeUrl(String.join(",", this.activityThemeUrl));
}
openingOperationPlanDO.setSurveyResultUrl(this.surveyResultUrl);
openingOperationPlanDO.setActivityThemeUrl( this.activityThemeUrl);
if (CollectionUtils.isNotEmpty(this.preparationUserIds)) {
openingOperationPlanDO.setPreparationUserIds(String.join(",", this.preparationUserIds));
}

View File

@@ -26,13 +26,13 @@ public class OpeningOperationPlanVO {
private String surveyResult;
@ApiModelProperty("调研结果url")
private List<String> surveyResultUrl;
private String surveyResultUrl;
@ApiModelProperty("活动主题")
private String activityTheme;
@ApiModelProperty("活动主题url")
private List<String> activityThemeUrl;
private String activityThemeUrl;
@ApiModelProperty("筹备人员name")
private List<UserNameDTO> preparationUsers;
@@ -61,12 +61,8 @@ public class OpeningOperationPlanVO {
this.submittedUserId = openingOperationPlanDO.getSubmittedUserId();
this.submissionTime = openingOperationPlanDO.getSubmissionTime();
this.routeCompleted = openingOperationPlanDO.getRouteCompleted();
if (StringUtils.isNotBlank(openingOperationPlanDO.getActivityThemeUrl())) {
this.activityThemeUrl = Arrays.asList(openingOperationPlanDO.getActivityThemeUrl().split(",")) ;
}
if (StringUtils.isNotBlank(openingOperationPlanDO.getSurveyResultUrl())) {
this.surveyResultUrl = Arrays.asList(openingOperationPlanDO.getSurveyResultUrl().split(",")) ;
}
this.activityThemeUrl = openingOperationPlanDO.getActivityThemeUrl();
this.surveyResultUrl = openingOperationPlanDO.getSurveyResultUrl();
this.activityTheme = openingOperationPlanDO.getActivityTheme();
this.surveyResult = openingOperationPlanDO.getSurveyResult();
}

View File

@@ -77,31 +77,27 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
throw new ServiceException(ErrorCodeEnum.SURVEYRESULT_LENGTH_FALSE);
}
String userId = userInfo.getUserId();
try {
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
Long planId;
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
if (!Objects.isNull(selectByShopId)) {
//提交修改
openingOperationPlanDO.setId(selectByShopId.getId());
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
} else {
//新增
openingOperationPlanDO.setSubmissionTime(new Date());
openingOperationPlanDO.setSubmittedUserId(userId);
openingOperationPlanDO.setCreateTime(new Date());
openingOperationPlanDO.setCreateUserId(userId);
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
}
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
return planId;
} catch (Exception e) {
log.error("addNewPlan Exception:{}", e);
return null;
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
Long planId;
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
if (!Objects.isNull(selectByShopId)) {
//提交修改
openingOperationPlanDO.setId(selectByShopId.getId());
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
} else {
//新增
openingOperationPlanDO.setSubmissionTime(new Date());
openingOperationPlanDO.setSubmittedUserId(userId);
openingOperationPlanDO.setCreateTime(new Date());
openingOperationPlanDO.setCreateUserId(userId);
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
}
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
return planId;
}
@Override
@@ -124,7 +120,6 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
openingOperationPlanVO.setShopName(shopInfo.getShopName());
return openingOperationPlanVO;
}
return null;
}
@@ -219,12 +214,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
@Override
public Boolean getStatus(Long shopId) {
try{
try {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopNum = shopInfo.getStoreNum();
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopNum);
return firstOrder;
}catch (Exception e){
} catch (Exception e) {
log.error("获取鲜丰订货金异常或更新状态失败");
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
}