Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
zhangchenbiao
2024-04-25 14:38:58 +08:00
9 changed files with 216 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
package com.cool.store.service;
import com.cool.store.vo.AssessmentTemplateVO;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:24
* @Version 1.0
*/
public interface AssessmentTemplateService {
/**
* listByType
* @Description
* @Author suzhuhong
* @Date 2024/4/25 11:24
* @param type
* @return
*/
List<AssessmentTemplateVO> listByType(Integer type);
}

View File

@@ -0,0 +1,44 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dao.AssessmentTemplateDAO;
import com.cool.store.entity.AssessmentTemplateDO;
import com.cool.store.service.AssessmentTemplateService;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.vo.AssessmentTemplateVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @Author suzhuhong
* @Date 2024/4/25 11:25
* @Version 1.0
*/
@Service
public class AssessmentTemplateServiceImpl implements AssessmentTemplateService {
@Resource
AssessmentTemplateDAO assessmentTemplateDAO;
@Override
public List<AssessmentTemplateVO> listByType(Integer type) {
List<AssessmentTemplateDO> assessmentTemplateDOS = assessmentTemplateDAO.listByType(type);
List<AssessmentTemplateVO> result = new ArrayList<>();
assessmentTemplateDOS.forEach(x->{
AssessmentTemplateVO assessmentTemplateVO = new AssessmentTemplateVO();
BeanUtil.copyProperties(x,assessmentTemplateVO);
x.getTemplateRemark();
if (StringUtils.isNotEmpty(x.getTemplateRemark())){
String[] split = x.getTemplateRemark().replaceAll("[\\[\\]\\s]", "").split(",");
assessmentTemplateVO.setTemplateRemarkList(Arrays.asList(split));
}
result.add(assessmentTemplateVO);
});
return result;
}
}

View File

@@ -25,7 +25,7 @@ import java.util.stream.Collectors;
* @Version 1.0
*/
@Service
public class PreparationServiceImpl implements PreparationService {
public class PreparationServiceImpl implements PreparationService {
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@@ -38,8 +38,8 @@ public class PreparationServiceImpl implements PreparationService {
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
if (CollectionUtils.isNotEmpty(shopStageInfo)){
Map<Integer, ShopStageInfoDO> shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data));
Boolean buildStoreCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatusName().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
Boolean contractCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatusName().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage()).getShopSubStageStatus());
Boolean buildStoreCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
Boolean contractCompletionFlag= ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage()).getShopSubStageStatus());
//都完成了 初始化后续流程数据
if (buildStoreCompletionFlag && contractCompletionFlag){