修改运营方案

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

View File

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

View File

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