完成部分TODO

This commit is contained in:
shuo.wang
2024-05-08 20:29:43 +08:00
parent 6f5af7c3b8
commit e54a45143b
29 changed files with 322 additions and 201 deletions

View File

@@ -13,6 +13,7 @@ import com.cool.store.response.ThreeSignResponse;
import com.cool.store.service.DecorationService;
import com.cool.store.vo.Fitment.DecorationModelVO;
import com.cool.store.vo.Fitment.DesignInfoVo;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.OpeningOperationPlanListVO;
import com.cool.store.vo.PartnerUserInfoVO;
import com.cool.store.vo.fitmentCheckVO;
@@ -56,7 +57,7 @@ public class PCDecorationController {
}
@ApiOperation("获取装修款信息")
@GetMapping("/getDecorationModelInfo")
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId){
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
}
@ApiOperation("获取验收列表三方验收1200待预约1210 待验收1220验收中1230已验收视觉验收1300待验收,1310验收不通过,1320验收通过")

View File

@@ -17,6 +17,7 @@ import com.cool.store.vo.AssessmentTemplateVO;
import com.cool.store.vo.Fitment.DecorationStageVO;
import com.cool.store.vo.Fitment.DecorationModelVO;
import com.cool.store.vo.Fitment.DesignInfoVo;
import com.cool.store.vo.LinePayVO;
import com.cool.store.vo.PartnerUserInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@@ -74,7 +75,7 @@ public class MiniDecorationController {
@ApiOperation("获取装修款详情信息")
@GetMapping("/getDecorationModelInfo")
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId){
PartnerUserInfoVO user = PartnerUserHolder.getUser();
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
}

View File

@@ -5,7 +5,10 @@ import com.cool.store.dao.*;
import com.cool.store.dto.OpenCityDTO;
import com.cool.store.entity.*;
import com.cool.store.mapper.HyOpenAreaInfoMapper;
import com.cool.store.request.xfsgFirstOrderListRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.xfsgFirstOderListResponse;
import com.cool.store.service.CoolStoreStartFlowService;
import com.cool.store.service.RegionService;
import com.cool.store.utils.poi.ExcelUtil;
import com.cool.store.vo.RegionPathNameVO;
@@ -24,7 +27,8 @@ import java.util.concurrent.Future;
@RestController
@RequestMapping("/test")
public class TestController {
@Resource
private CoolStoreStartFlowService coolStoreStartFlowService;
@Resource
private EnterpriseUserDAO enterpriseUserDAO;
@@ -46,7 +50,11 @@ public class TestController {
@Resource
private RegionService regionService;
@PostMapping("/getFirstOrders")
public ResponseResult<xfsgFirstOderListResponse> getFirstOrders(@RequestBody xfsgFirstOrderListRequest storeCodeList) {
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(storeCodeList);
return ResponseResult.success(firstOrderList);
}
@PostMapping("/importCity")
public ResponseResult<Integer> importCity(MultipartFile file){
ExcelUtil<OpenCityDTO> util = new ExcelUtil<>(OpenCityDTO.class);

View File

@@ -6,6 +6,7 @@ import com.cool.store.constants.CommonConstants;
import com.cool.store.dao.*;
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.dto.xfsgFirstOderDTO;
import com.cool.store.entity.AcceptanceInfoDO;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.entity.LineInterviewDO;
@@ -17,6 +18,8 @@ import com.cool.store.exception.ServiceException;
import com.cool.store.mapper.LineInfoMapper;
import com.cool.store.mapper.TrainingExperienceMapper;
import com.cool.store.mq.util.HttpRestTemplateService;
import com.cool.store.request.xfsgFirstOrderListRequest;
import com.cool.store.response.xfsgFirstOderListResponse;
import com.cool.store.service.CoolStoreStartFlowService;
import com.cool.store.service.DecorationService;
import com.cool.store.service.PreparationService;
@@ -131,23 +134,18 @@ public class XxlJobHandler {
return;
}
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIdListByStageStatus);
Map<Long, String> map = openPlanShopInfoDTOS.stream().
collect(Collectors.toMap(OpenPlanShopInfoDTO::getShopId, OpenPlanShopInfoDTO::getStoreNum));
for (Long shopId : map.keySet()) {
String shopCode = map.get(shopId);
try {
// TOdo 能不能一次调用
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
if (firstOrder == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
Map<String, Long> map = openPlanShopInfoDTOS.stream().filter(OpenPlanShopInfoDTO -> OpenPlanShopInfoDTO.getStoreNum() != null).
collect(Collectors.toMap(OpenPlanShopInfoDTO::getStoreNum, OpenPlanShopInfoDTO::getShopId));
List<String> storeCodes = new ArrayList<>(map.keySet());
xfsgFirstOrderListRequest request = new xfsgFirstOrderListRequest();
request.setStoreCodeList(storeCodes);
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(request);
if (Objects.nonNull(firstOrderList) && CollectionUtils.isNotEmpty(firstOrderList.getData())) {
for (xfsgFirstOderDTO o : firstOrderList.getData()) {
if (o.getBalance()) {
shopStageInfoDAO.updateShopStageAndAuditInfo(map.get(o.getStoreCode()), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(map.get(o.getStoreCode()));
}
if (firstOrder) {
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
}
hasNext = shopIdListByStageStatus.size() >= PageSize;
@@ -178,10 +176,7 @@ public class XxlJobHandler {
return;
}
List<AcceptanceInfoDO> acceptanceInfoDOS = new ArrayList<>();
for (Long shopId : shops) {
//TODO ids查
acceptanceInfoDOS.add(acceptanceInfoDAO.selectByShopId(shopId));
}
acceptanceInfoDOS.addAll(acceptanceInfoDAO.selectByShopIds(shops));
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOS) {
Long shopId = acceptanceInfoDO.getShopId();
acceptanceInfoDO.setUpdateTime(new Date());
@@ -219,7 +214,7 @@ public class XxlJobHandler {
LocalDate now = LocalDate.now();
//TODO 时间问题
if (datePlusFiveDays.equals(now)) {
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
}
} catch (ParseException e) {
log.error("初始化acceptanceInfo鲜丰服务进场时间日期转化异常");
@@ -231,24 +226,26 @@ public class XxlJobHandler {
}
}
/**
* @Auther: wangshuo
* @Date: 2024/5/7
* @description:三方验收预约短信通知
*/
@XxlJob("ThreeAcceptanceMessage")
public void ThreeAcceptanceMessage(){
public void ThreeAcceptanceMessage() {
log.info("------三方验收预约短信通知-----");
boolean hasNext = true;
int PageNum = 1;
int PageSize = 50;
while (hasNext) {
// hasNext = ;
// hasNext = ;
PageNum++;
}
}
@XxlJob("interviewRemind")
public void interviewRemind() {
log.info("------面试提醒------");
@@ -260,10 +257,10 @@ public class XxlJobHandler {
for (LineInterviewDO interview : interviewList) {
Map<String, String> templateParamMap = new HashMap<>();
templateParamMap.put("interviewTime", DateUtil.format(interview.getStartTime(), "HH:mm"));
if(InterviewTypeEnum.INTERVIEW.getCode().equals(interview.getInterviewType())){
if (InterviewTypeEnum.INTERVIEW.getCode().equals(interview.getInterviewType())) {
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.FIRST_INTERVIEW_REMIND, templateParamMap);
}
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interview.getInterviewType())){
if (InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interview.getInterviewType())) {
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.SECOND_INTERVIEW_REMIND, templateParamMap);
}
}