diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageEnum.java index d37b6474a..587557511 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageEnum.java @@ -15,7 +15,6 @@ public enum ShopSubStageEnum { SHOP_STAGE_1(ShopStageEnum.SHOP_STAGE_1, 10, "选址", 12), SHOP_STAGE_2(ShopStageEnum.SHOP_STAGE_1, 20, "上传租赁合同", 14), - SHOP_STAGE_3(ShopStageEnum.SHOP_STAGE_2, 30, "系统建店", 19), SHOP_STAGE_4(ShopStageEnum.SHOP_STAGE_2, 40, "证照办理", 24), SHOP_STAGE_5(ShopStageEnum.SHOP_STAGE_2, 50, "员工招聘", 23), SHOP_STAGE_6(ShopStageEnum.SHOP_STAGE_2, 60, "加盟商/员工培训", 30), @@ -25,9 +24,7 @@ public enum ShopSubStageEnum { SHOP_STAGE_10(ShopStageEnum.SHOP_STAGE_2, 100, "装修款", 24), SHOP_STAGE_11(ShopStageEnum.SHOP_STAGE_2, 110, "施工阶段", 31), SHOP_STAGE_12(ShopStageEnum.SHOP_STAGE_2, 120, "三方验收", 32), - SHOP_STAGE_13(ShopStageEnum.SHOP_STAGE_2, 130, "视觉验收", 32), SHOP_STAGE_14(ShopStageEnum.SHOP_STAGE_2, 140, "开业运营方案", 23), - SHOP_STAGE_15(ShopStageEnum.SHOP_STAGE_2, 150, "首批订货清单", 20), SHOP_STAGE_16(ShopStageEnum.SHOP_STAGE_3, 160, "开业验收", null), SHOP_STAGE_17(ShopStageEnum.SHOP_STAGE_4, 170, "新店开业", null), ; @@ -90,17 +87,13 @@ public enum ShopSubStageEnum { case SHOP_STAGE_7: return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70; case SHOP_STAGE_2: - case SHOP_STAGE_3: case SHOP_STAGE_4: case SHOP_STAGE_6: case SHOP_STAGE_8: case SHOP_STAGE_9: - case SHOP_STAGE_10: case SHOP_STAGE_11: case SHOP_STAGE_12: - case SHOP_STAGE_13: case SHOP_STAGE_14: - case SHOP_STAGE_15: case SHOP_STAGE_16: case SHOP_STAGE_17: return ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00; @@ -123,15 +116,11 @@ public enum ShopSubStageEnum { case SHOP_STAGE_7: case SHOP_STAGE_8: return planCompleteTime.plusDays(getPlanCompleteDays()).toString(); - case SHOP_STAGE_3: case SHOP_STAGE_4: case SHOP_STAGE_9: - case SHOP_STAGE_10: case SHOP_STAGE_11: case SHOP_STAGE_12: - case SHOP_STAGE_13: case SHOP_STAGE_14: - case SHOP_STAGE_15: return planSelectPointCompleteDate.plusDays(getPlanCompleteDays()).toString(); default: return null; diff --git a/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageStatusEnum.java b/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageStatusEnum.java index a9c93b86c..3f718b1b9 100644 --- a/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageStatusEnum.java +++ b/coolstore-partner-common/src/main/java/com/cool/store/enums/point/ShopSubStageStatusEnum.java @@ -25,12 +25,6 @@ public enum ShopSubStageStatusEnum { SHOP_SUB_STAGE_STATUS_22(ShopSubStageEnum.SHOP_STAGE_2, 220, "审核未通过", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_23(ShopSubStageEnum.SHOP_STAGE_2, 230, "审核通过", Boolean.TRUE), - //系统建店 - SHOP_SUB_STAGE_STATUS_30(ShopSubStageEnum.SHOP_STAGE_3, 300, "待建店", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_31(ShopSubStageEnum.SHOP_STAGE_3, 310, "审核中", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_32(ShopSubStageEnum.SHOP_STAGE_3, 320, "未通过", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_33(ShopSubStageEnum.SHOP_STAGE_3, 330, "已通过", Boolean.TRUE), - //证照办理 SHOP_SUB_STAGE_STATUS_40(ShopSubStageEnum.SHOP_STAGE_4, 400, "待提交", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_41(ShopSubStageEnum.SHOP_STAGE_4, 410, "待审核", Boolean.FALSE), @@ -62,11 +56,6 @@ public enum ShopSubStageStatusEnum { SHOP_SUB_STAGE_STATUS_90(ShopSubStageEnum.SHOP_STAGE_9, 900, "进行中", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_91(ShopSubStageEnum.SHOP_STAGE_9, 910, "已完成", Boolean.TRUE), - //装修款 - SHOP_SUB_STAGE_STATUS_100(ShopSubStageEnum.SHOP_STAGE_10, 1000, "待缴费", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_101(ShopSubStageEnum.SHOP_STAGE_10, 1010, "待审批", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_102(ShopSubStageEnum.SHOP_STAGE_10, 1020, "已缴费", Boolean.TRUE), - //施工阶段 SHOP_SUB_STAGE_STATUS_110(ShopSubStageEnum.SHOP_STAGE_11, 1100, "待施工", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_111(ShopSubStageEnum.SHOP_STAGE_11, 1110, "施工中", Boolean.FALSE), @@ -78,22 +67,12 @@ public enum ShopSubStageStatusEnum { SHOP_SUB_STAGE_STATUS_122(ShopSubStageEnum.SHOP_STAGE_12, 1220, "验收中", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_123(ShopSubStageEnum.SHOP_STAGE_12, 1230, "已验收", Boolean.TRUE), - //视觉验收 - SHOP_SUB_STAGE_STATUS_130(ShopSubStageEnum.SHOP_STAGE_13, 1300, "待验收", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_131(ShopSubStageEnum.SHOP_STAGE_13, 1310, "验收不通过", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_132(ShopSubStageEnum.SHOP_STAGE_13, 1320,"验收通过", Boolean.TRUE), - //开业运营方案 SHOP_SUB_STAGE_STATUS_140(ShopSubStageEnum.SHOP_STAGE_14, 1400, "待上传", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_141(ShopSubStageEnum.SHOP_STAGE_14, 1420, "待审核", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_142(ShopSubStageEnum.SHOP_STAGE_14, 1430,"审核不通过", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_143(ShopSubStageEnum.SHOP_STAGE_14, 1440, "已完成", Boolean.TRUE), - //首批订货清单 - SHOP_SUB_STAGE_STATUS_150(ShopSubStageEnum.SHOP_STAGE_15, 1500, "待上传", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_152(ShopSubStageEnum.SHOP_STAGE_15, 1505, "待缴纳", Boolean.FALSE), - SHOP_SUB_STAGE_STATUS_151(ShopSubStageEnum.SHOP_STAGE_15, 1510, "已完成", Boolean.TRUE), - SHOP_SUB_STAGE_STATUS_160(ShopSubStageEnum.SHOP_STAGE_16, 1600, "验收中", Boolean.FALSE), SHOP_SUB_STAGE_STATUS_161(ShopSubStageEnum.SHOP_STAGE_16, 1610, "已完成", Boolean.TRUE), diff --git a/coolstore-partner-model/src/main/java/com/cool/store/vo/shop/ShopStageInfoVO.java b/coolstore-partner-model/src/main/java/com/cool/store/vo/shop/ShopStageInfoVO.java index 6541ecb80..a025387d2 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/vo/shop/ShopStageInfoVO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/vo/shop/ShopStageInfoVO.java @@ -65,9 +65,6 @@ public class ShopStageInfoVO { Map auditMap = auditList.stream().collect(Collectors.toMap(ShopAuditInfoDO::getId, Function.identity())); List resultList = new ArrayList<>(); for (ShopStageInfoDO stageInfo : stageList) { - if (ShopSubStageEnum.SHOP_STAGE_13.getShopSubStage().equals(stageInfo.getShopSubStage())){ - continue; - } ShopStageInfoVO shopStageInfo = new ShopStageInfoVO(stageInfo.getShopStage(), stageInfo.getShopSubStage(), stageInfo.getShopSubStageStatus(), stageInfo.getIsTerminated()); ShopAuditInfoDO auditInfo = auditMap.get(stageInfo.getAuditId()); AuditInfoVO auditInfoVO = AuditInfoVO.convertVO(auditInfo); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java index 0d80c927c..c7934e592 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/CoolStoreStartFlowServiceImpl.java @@ -55,7 +55,6 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService throw new ServiceException(ErrorCodeEnum.FRANCHISE_AGREEMENT_FALSE, initiatingResponse.getMsg(),initiatingResponse.getData()); } else { //更新阶段信息 - shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31, null); return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData()); } } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationServiceImpl.java index 4d05e9e74..4e3d8473e 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DecorationServiceImpl.java @@ -138,8 +138,7 @@ public class DecorationServiceImpl implements DecorationService { ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9); if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_90.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) { //更新设计阶段状态完成//初始化装修款阶段 - shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, - ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_100)); + shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91)); LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopSubStageInfo.getLineId()); commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.DECORATION_MODEL_PAY, null); } @@ -149,7 +148,7 @@ public class DecorationServiceImpl implements DecorationService { @Override public DecorationStageVO getDecorationGoldStage(Long shopId) { - ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_10); + ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, null); if (Objects.isNull(shopSubStageInfo)) { log.error("getDecorationModeStage , shopSubStageInfo is null"); return null; @@ -199,21 +198,6 @@ public class DecorationServiceImpl implements DecorationService { @Transactional(rollbackFor = Exception.class) @Override public Boolean submitDecorationModel(LinePaySubmitRequest request, PartnerUserInfoVO partnerUserInfoVO) { - DecorationDTO decoration = getDecorationDTO(request.getShopId()); - if (decoration == null) { - log.error("拉取云立方接口获取数据为空"); - return null; - } - if (CollectionUtils.isNotEmpty(decoration.getPayment())) { - request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()); - //更新阶段状态 - shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102); - } else { - request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode()); - shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_101); - } - request.setPayBusinessType(PayBusinessTypeEnum.DECORATION_MODEL.getCode()); - linePayService.submitPayInfo(request, partnerUserInfoVO); return Boolean.TRUE; } @@ -247,18 +231,6 @@ public class DecorationServiceImpl implements DecorationService { log.error("拉取云立方接口获取缴费信息为空"); return null; } - //已完成 - if (CollectionUtils.isNotEmpty(decoration.getPayment())) { - linePayInfo.setPayStatus((byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue()); - LinePaySubmitRequest submitRequest = new LinePaySubmitRequest(); - submitRequest.setLineId(linePayInfo.getLineId()); - submitRequest.setShopId(shopId); - submitRequest.setPayBusinessType(PayBusinessTypeEnum.DECORATION_MODEL.getCode()); - submitRequest.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode()); - linePayService.submitPayInfo(submitRequest, partnerUserInfoVO); - //更新阶段状态 - shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102); - } return linePayInfo; } @@ -295,29 +267,28 @@ public class DecorationServiceImpl implements DecorationService { approach = constructionScheduleDTO; } //计划撤场时间 //如果撤场并且视觉验收状态为-100则更新待验收 - if (constructionScheduleDTO.getName().equals(CommonConstants.WITHDRAWAL)) { - ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_13); - if(shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus()) - && constructionScheduleDTO.getState().equals(ConstructionPhaseEnum.construction_FINSH.getCode())){ - shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_130); - //发送给品牌设计经理 - EnterpriseUserDO enterpriseUser = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.DESIGN_MANAGER, lineInfo.getWantShopAreaId()); - if (Objects.nonNull(enterpriseUser)){ - Map messageMap = new HashMap<>(); - messageMap.put("storeName",shopInfo.getShopName()); - messageMap.put("shopId",String.valueOf(shopId)); - messageMap.put("shopName",shopInfo.getShopName()); - messageMap.put("partnerUsername",lineInfo.getUsername()); - messageMap.put("partnerMobile",lineInfo.getMobile()); - commonService.sendMessage(Arrays.asList(enterpriseUser.getUserId()), MessageEnum.MESSAGE_28, messageMap); - } - } - ConstructionScheduleDTO withdrawal = constructionScheduleDTO; - if (Objects.nonNull(acceptanceInfoDO)) { - Date date = CoolDateUtils.parseDate(withdrawal.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY); - acceptanceInfoDO.setPlanExitTime(date); - } - } +// if (constructionScheduleDTO.getName().equals(CommonConstants.WITHDRAWAL)) { +// ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_13); +// if(shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus()) +// && constructionScheduleDTO.getState().equals(ConstructionPhaseEnum.construction_FINSH.getCode())){ +// //发送给品牌设计经理 +// EnterpriseUserDO enterpriseUser = userAuthMappingService.getUserByRoleEnumAndWantShopAreaId(UserRoleEnum.DESIGN_MANAGER, lineInfo.getWantShopAreaId()); +// if (Objects.nonNull(enterpriseUser)){ +// Map messageMap = new HashMap<>(); +// messageMap.put("storeName",shopInfo.getShopName()); +// messageMap.put("shopId",String.valueOf(shopId)); +// messageMap.put("shopName",shopInfo.getShopName()); +// messageMap.put("partnerUsername",lineInfo.getUsername()); +// messageMap.put("partnerMobile",lineInfo.getMobile()); +// commonService.sendMessage(Arrays.asList(enterpriseUser.getUserId()), MessageEnum.MESSAGE_28, messageMap); +// } +// } +// ConstructionScheduleDTO withdrawal = constructionScheduleDTO; +// if (Objects.nonNull(acceptanceInfoDO)) { +// Date date = CoolDateUtils.parseDate(withdrawal.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY); +// acceptanceInfoDO.setPlanExitTime(date); +// } +// } } if (constructionScheduleDTO.getName().equals(CommonConstants.CONSTRUCTION_PHASE)) { constructionSage = constructionScheduleDTO; @@ -438,10 +409,6 @@ public class DecorationServiceImpl implements DecorationService { @Override @Transactional(rollbackFor = Exception.class) public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) { - ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_10); - if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) { - throw new ServiceException(ErrorCodeEnum.FITMENT_FAIL); - } //工程部验收签名 if (Objects.nonNull(request.getEngineeringAcceptance())) { request.getEngineeringAcceptance().setAcceptanceTime(new Date()); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DeskServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DeskServiceImpl.java index 3e39747eb..181dbe184 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DeskServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/DeskServiceImpl.java @@ -326,7 +326,7 @@ public class DeskServiceImpl implements DeskService { @Override public PageInfo systemBuildStorePendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) { - return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_3, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30.getShopSubStageStatus()), Constants.ZERO_INTEGER); + return null; } @Override @@ -348,7 +348,7 @@ public class DeskServiceImpl implements DeskService { @Override public PageInfo firstOrderListPendingList(Integer pageNum, Integer pageSize, LoginUserInfo user) { - return commonPendingVOPageInfo(pageNum, pageSize, user, ShopSubStageEnum.SHOP_STAGE_15, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()), Constants.ONE_INTEGER); + return null; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java index 13f7b99f6..dd678f684 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/FirstOrderServiceImp.java @@ -63,115 +63,12 @@ public class FirstOrderServiceImp implements FirstOrderService { @Override public Integer saveOrder(FirstOrderRequest request, LoginUserInfo user) { - log.info("save order:{}", JSONObject.toJSONString(request)); - if (request == null) { - throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL); - } - String userId = user.getUserId(); - FirstOrderDO order = new FirstOrderDO(); - try { - BeanUtils.copyProperties(order, request); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { - throw new RuntimeException(e); - } - FirstOrderDTO firstOrderDTO = firstOrderDAO.selectFirstOrderByShopId(order.getShopId()); - Integer num; - if (Objects.isNull(firstOrderDTO)) { - //第一次提交 - order.setCreateTime(new Date()); - order.setCreateUserId(userId); - num = firstOrderDAO.insertFirstOrder(order); - } else { - //修改只更新下面2个 - order.setId(firstOrderDTO.getId()); - order.setUpdateTime(new Date()); - order.setUpdateUserId(userId); - num = firstOrderDAO.updateByPrimaryKeySelective(order); - } - shopStageInfoDAO.updateShopStageInfo(order.getShopId(), - ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152); - //发送消息至加盟商 - ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId()); - LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId()); - Map messageMap =new HashMap<>(); - messageMap.put("totalOrderDeposit",request.getTotalOrderDeposit()); - commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.FIRST_ORDER, messageMap); - //云立方同步 - if (num > 0) { - try { - String storeNum = shopInfo.getStoreNum(); - Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum); - log.info("saveOrder,flag:{}", flag); - if (flag == null) { - throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER); - } - if (flag) { - //更改子阶段状态 - shopStageInfoDAO.updateShopStageInfo(order.getShopId(), - ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151); - preparationService.whetherToOpenForAcceptance(order.getShopId()); - } - } catch (Exception e) { - log.error("获取鲜丰订货金异常", e); - } - } - return num; + return 1; } @Transactional(rollbackFor = Exception.class) @Override public FirstOrderDTO getOrder(Long shopId) { - log.info("getOrder shopId:{},", shopId); - if (shopId == null) { - log.error("shopId is null"); - throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL); - } - ShopInfoDO shopInfo = shopService.getShopInfo(shopId); - FirstOrderDTO order = firstOrderDAO.selectFirstOrderByShopId(shopId); - ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15); - if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) { - - String userName = enterpriseUserDAO.getUserName(order.getCreateUserId()); - order.setPartnerName(userName); - order.setFirstOrderSubStage(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus()); - if (Objects.nonNull(shopInfo.getSupervisorUserId())){ - EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getSupervisorUserId()); - order.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber()); - } - return order; - } - if (Objects.nonNull(order)) { - try { - - String userName = enterpriseUserDAO.getUserName(order.getCreateUserId()); - order.setPartnerName(userName); - String storeNum = shopInfo.getStoreNum(); - Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum); - log.info("saveOrder,flag:{}", flag); - if (flag == null) { - throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER); - } - if (flag) { - //更改子阶段状态 - shopStageInfoDAO.updateShopStageInfo(order.getShopId(), - ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151); - order.setFirstOrderSubStage(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus()); - preparationService.whetherToOpenForAcceptance(order.getShopId()); - } else { - order.setFirstOrderSubStage(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus()); - } - } catch (Exception e) { - log.error("获取鲜丰订货金异常", e); - } - }else { - order = new FirstOrderDTO(); - } - if (Objects.nonNull(shopInfo.getSupervisorUserId())){ - EnterpriseUserDO userInfoById = enterpriseUserDAO.getUserInfoById(shopInfo.getSupervisorUserId()); - order.setSubmiter(Objects.isNull(userInfoById) ? null : userInfoById.getName()+"_"+userInfoById.getJobnumber()); - } - return order; + return null; } } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java index 643dd33b5..9610cdc47 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/OpeningOperationPlanImpl.java @@ -215,26 +215,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService { @Override @Transactional(rollbackFor = Exception.class) public Boolean flush(Long shopId) { - ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15); - try { - if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus(). - equals(orderStageInfo.getShopSubStageStatus())) { - ShopInfoDO shopInfo = shopService.getShopInfo(shopId); - String shopNum = shopInfo.getStoreNum(); - Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopNum); - log.info("saveOrder,flag:{}", firstOrder); - if (firstOrder) { - //更改子阶段状态 - shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, - ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null); - preparationService.whetherToOpenForAcceptance(shopId); - } - } - return Boolean.TRUE; - } catch (Exception e) { - log.error("获取鲜丰订货金异常或更新状态失败"); - throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER); - } + return Boolean.TRUE; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java index 3a9accd1a..f500ffacf 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PointServiceImpl.java @@ -969,7 +969,7 @@ public class PointServiceImpl implements PointService { updatePoint.setId(shopInfo.getPointId()); updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_6.getCode()); pointInfoDAO.updatePointInfo(updatePoint); - shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Lists.newArrayList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_30, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40)); + shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Lists.newArrayList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_40)); ShopInfoDO updateShop = new ShopInfoDO(); updateShop.setId(shopId); updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage()); diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PreparationServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PreparationServiceImpl.java index 97b0fecb4..508ff42a3 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PreparationServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/PreparationServiceImpl.java @@ -191,10 +191,9 @@ public class PreparationServiceImpl implements PreparationService { List shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null); if (CollectionUtils.isNotEmpty(shopStageInfo)) { Map shopStageInfoDOMap = shopStageInfo.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopSubStage, data -> data)); - Boolean buildStoreCompletionFlag = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus()); + Boolean buildStoreCompletionFlag = Boolean.TRUE; Boolean contractCompletionFlag = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73.getShopSubStageStatus().equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_7.getShopSubStage()).getShopSubStageStatus()); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); - LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId()); //都完成了 初始化后续流程数据 if (buildStoreCompletionFlag && contractCompletionFlag) { //初始化后续流程数据 设计阶段 装修阶段 开业运营方案 首批订货清单 @@ -216,27 +215,6 @@ public class PreparationServiceImpl implements PreparationService { ShopStageInfoDO data3 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_14.getShopSubStage()); data3.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus()); list.add(data3); - //发送督导钉钉 - Map messageMap = new HashMap<>(); - messageMap.put("storeName",shopInfo.getShopName()); - messageMap.put("shopId",String.valueOf(shopId)); - messageMap.put("lineId", shopInfo.getLineId().toString()); - messageMap.put("partnerUsername",lineInfo.getUsername()); - messageMap.put("shopName",shopInfo.getShopName()); - messageMap.put("partnerMobile",lineInfo.getMobile()); - commonService.sendMessage(Arrays.asList(shopInfo.getSupervisorUserId()), MessageEnum.MESSAGE_26, messageMap); - ShopStageInfoDO data4 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()); - data4.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_150.getShopSubStageStatus()); - list.add(data4); - //发送督导钉钉 - Map messageMap1 = new HashMap<>(); - messageMap1.put("storeName",shopInfo.getShopName()); - messageMap1.put("shopId",String.valueOf(shopId)); - messageMap1.put("shopName",shopInfo.getShopName()); - messageMap1.put("lineId", String.valueOf(shopInfo.getLineId())); - messageMap1.put("partnerUsername",lineInfo.getUsername()); - messageMap1.put("partnerMobile",lineInfo.getMobile()); - commonService.sendMessage(Arrays.asList(shopInfo.getSupervisorUserId()), MessageEnum.MESSAGE_27, messageMap1); shopStageInfoDAO.batchUpdate(list); } } @@ -268,9 +246,9 @@ public class PreparationServiceImpl implements PreparationService { flushFlag = Boolean.TRUE; } //装修款 - Integer Status1000 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_100.getShopSubStageStatus(); - Integer Status1010 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_101.getShopSubStageStatus(); - Integer DecorationModel = collect.get(ShopSubStageEnum.SHOP_STAGE_10.getShopSubStage()).getShopSubStageStatus(); + Integer Status1000 = 1000; + Integer Status1010 = 1010; + Integer DecorationModel = collect.get(100).getShopSubStageStatus(); if (Status1000.equals(DecorationModel) || Status1010.equals(DecorationModel)) { decorationService.getDecorationModel(shopId, null); flushFlag = Boolean.TRUE; diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SeeAcceptanceServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SeeAcceptanceServiceImpl.java index 1f3eafa89..82b65844e 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SeeAcceptanceServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SeeAcceptanceServiceImpl.java @@ -75,36 +75,6 @@ public class SeeAcceptanceServiceImpl implements SeeAcceptanceService { @Override @Transactional(rollbackFor = Exception.class) public Boolean auditSeeAcceptance(SeeAcceptanceRequest request, LoginUserInfo user) { - if (request.getShopId() == null || request.getShopId() == 0) { - throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL); - } - if (request.getResultType() == null) { - throw new ServiceException(ErrorCodeEnum.SEE_ACCEPTANCE_AUDIT_NULL); - } - if (Objects.isNull(user)) { - throw new ServiceException(ErrorCodeEnum.USER_NOT_LOGIN); - } - - ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO(); - shopAuditInfoDO.setShopId(request.getShopId()); - shopAuditInfoDO.setAuditType(AuditTypeEnum.VISUAL_ACCEPTANCE.getCode()); - shopAuditInfoDO.setSubmittedUserId(user.getUserId()); - shopAuditInfoDO.setSubmittedUserName(user.getName()); - shopAuditInfoDO.setResultType(request.getResultType()); - if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) { - shopAuditInfoDO.setPassReason(request.getReason()); - } else { - shopAuditInfoDO.setRejectReason(request.getReason()); - } - shopAuditInfoDO.setCreateTime(new Date()); - shopAuditInfoDO.setDataType(CommonConstants.ONE); - Long id = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO); - if (AuditResultTypeEnum.PASS.getCode().equals(request.getResultType())) { - shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_132, id); - preparationService.whetherToOpenForAcceptance(request.getShopId()); - } else { - shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_131, id); - } return true; } @@ -136,103 +106,7 @@ public class SeeAcceptanceServiceImpl implements SeeAcceptanceService { @Override public PageInfo getAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) { - List authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId()); - List regions = new ArrayList<>(); - for (String authRegionId : authRegionIds) { - regions.add(Long.parseLong(authRegionId)); - } - PageHelper.startPage(request.getPageNum(), request.getPageSize()); - if (regions.isEmpty()) { - log.info("该用户下权限没有管理区域"); - return new PageInfo<>(); - } - List fitmentCheckVOList = new ArrayList<>(); - //shopId,lineid,regionid,shopname,storenum, - - List shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, ShopSubStageEnum.SHOP_STAGE_13.getShopSubStage(),request.getSubStageStatus(),request.getKeyWord()); - PageInfo pageInfo = new PageInfo<>(shopInfoDOS); - if (shopInfoDOS.isEmpty()) { - log.info("该工程部监理下门店为空"); - return pageInfo; - } - Map ShopIdmap = shopInfoDOS.stream().collect(Collectors.toMap(ShopInfoDO::getId, dto1 -> dto1)); - //招商经理,选址人员(拓展经理)id - List lineIds = shopInfoDOS.stream().filter(o -> o.getLineId() != null) - .map(ShopInfoDO::getLineId).distinct().collect(Collectors.toList()); - List lineInfos = lineInfoMapper.getByLineIds(lineIds); - Map lineInfoDOMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, dto -> dto)); - //招商name - List userIds = new ArrayList<>(); - userIds.addAll(lineInfos.stream().filter(o -> o.getInvestmentManager() != null) - .map(LineInfoDO::getInvestmentManager).distinct().collect(Collectors.toList())); - //选址人员(拓展经理)name - userIds.addAll(lineInfos.stream().filter(o -> o.getDevelopmentManager() != null) - .map(LineInfoDO::getDevelopmentManager).distinct().collect(Collectors.toList())); - Map userNameMap = enterpriseUserDAO.getUserNameMap(userIds); - //所属战区 - List regionIds = shopInfoDOS.stream().filter(o -> o.getRegionId() != null). - map(ShopInfoDO::getRegionId).distinct().collect(Collectors.toList()); - Map regionNameMap = regionService.getBelongWarRegionNameMap(regionIds); - //战区经理name - Map fightManger = new HashMap<>(); - for (Long regionId : regionIds) { - String fightMangerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(regionId, Arrays.asList(UserRoleEnum.THEATER_MANAGER)); - String userName = enterpriseUserDAO.getUserName(fightMangerUserId); - fightManger.put(regionId, userName); - } - //施工实际完成实际 - List shopIds = new ArrayList<>(ShopIdmap.keySet()); - List acceptanceInfoDOS = acceptanceInfoDAO.selectByShopIds(shopIds); - Map acceptanceInfoDOSMap = acceptanceInfoDOS.stream() - .collect(Collectors.toMap(AcceptanceInfoDO::getShopId, dto1 -> dto1)); - //验收状态 - List subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_13.getShopSubStage()); - List audits = subStageList.stream().filter(o -> o.getAuditId() != null).map(ShopStageInfoDO::getAuditId).collect(Collectors.toList()); - //验收时间 - List auditInfoList = shopAuditInfoDAO.getAuditInfoList(audits); - Map auditMap = auditInfoList.stream().filter(o -> o.getShopId() != null).collect(Collectors.toMap(ShopAuditInfoDO::getShopId, Function.identity())); - - Map ShopStageInfoDOMap = subStageList.stream() - .collect(Collectors.toMap(ShopStageInfoDO::getShopId, dto1 -> dto1)); - for (ShopInfoDO shopInfoDO : shopInfoDOS) { - Long shopId = shopInfoDO.getId(); - Long lineId = shopInfoDO.getLineId(); - Long regionId = shopInfoDO.getRegionId(); - fitmentCheckVO fitmentCheckVO = new fitmentCheckVO(); - fitmentCheckVO.setShopId(shopId); - fitmentCheckVO.setLineId(lineId); - fitmentCheckVO.setShopName(shopInfoDO.getShopName()); - fitmentCheckVO.setStoreNum(shopInfoDO.getStoreNum()); - fitmentCheckVO.setRegionId(regionId); - fitmentCheckVO.setRegion(regionNameMap.get(regionId)); - fitmentCheckVO.setFightManager(fightManger.get(regionId)); - if (lineId != null) { - fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(lineId) - .getInvestmentManager()); - fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfoDOMap.get(lineId) - .getInvestmentManager())); - fitmentCheckVO.setSitterId(lineInfoDOMap.get(lineId) - .getDevelopmentManager()); - fitmentCheckVO.setSitterName(userNameMap.get(lineInfoDOMap.get(lineId) - .getDevelopmentManager())); - fitmentCheckVO.setPartnerName(lineInfoDOMap.get(lineId).getUsername()); - } - AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDOSMap.get(shopId); - if (shopId != null) { - if (Objects.nonNull(acceptanceInfoDO)) { - fitmentCheckVO.setActualEndTime(acceptanceInfoDO.getConstructionCompletionTime()); - } - } - if (Objects.nonNull(auditMap.get(shopId))) { - fitmentCheckVO.setAcceptanceTime(auditMap.get(shopId).getCreateTime()); - } - if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) { - fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus()); - } - fitmentCheckVOList.add(fitmentCheckVO); - } - pageInfo.setList(fitmentCheckVOList); - return pageInfo; + return null; } diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java index 1a7d3239b..e3aa21505 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/ShopServiceImpl.java @@ -112,10 +112,10 @@ public class ShopServiceImpl implements ShopService { //进入选址不允许删除操作 throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); } - ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_3); - if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){ - throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); - } +// ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfo.getId(), ShopSubStageEnum.SHOP_STAGE_3); +// if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){ +// throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE); +// } if(Objects.nonNull(shopInfo.getPointId())){ PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId()); if(Objects.nonNull(pointInfo) && SelectStatusEnum.SELECT_STATUS_1.getCode().equals(pointInfo.getSelectStatus())){ diff --git a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SysStoreAppServiceImpl.java b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SysStoreAppServiceImpl.java index 37727319b..b99ca9313 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SysStoreAppServiceImpl.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/service/impl/SysStoreAppServiceImpl.java @@ -459,7 +459,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe if (Constants.ZERO_INTEGER.equals(request.getAuditResult())) { shopAuditInfoDO.setResultType(Constants.ONE_INTEGER); shopAuditInfoDO.setRejectReason(request.getCause()); - shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_32; + shopSubStageStatusEnum = null; } else if (Constants.ONE_INTEGER.equals(request.getAuditResult())) { ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId); EnterpriseUserDO supervisor = userAuthMappingService.hierarchicalSearch(UserRoleEnum.SUPERVISION, shopInfoDO.getRegionId()); @@ -474,7 +474,7 @@ public class SysStoreAppServiceImpl implements SysStoreAppService, AuditResultSe shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO); shopAuditInfoDO.setResultType(Constants.ZERO_INTEGER); shopAuditInfoDO.setPassReason(request.getCause()); - shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_33; + shopSubStageStatusEnum = null; //校验建店与加盟签约合同是否完成 并初始化后续流程数据 preparationService.contractAndBuildStoreCompletion(shopId); LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId()); diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java index 247b9228e..93c5334b1 100644 --- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webc/TestController.java @@ -179,7 +179,7 @@ public class TestController { } @GetMapping("/updateFirstOrder") public ResponseResult updateFirstOrder(){ - xxlJobHandler.updateFirstOrder(); +// xxlJobHandler.updateFirstOrder(); return ResponseResult.success(); } @GetMapping("updateEntryTime") diff --git a/coolstore-partner-web/src/main/java/com/cool/store/job/XxlJobHandler.java b/coolstore-partner-web/src/main/java/com/cool/store/job/XxlJobHandler.java index 49576f39a..89379c31c 100644 --- a/coolstore-partner-web/src/main/java/com/cool/store/job/XxlJobHandler.java +++ b/coolstore-partner-web/src/main/java/com/cool/store/job/XxlJobHandler.java @@ -95,51 +95,6 @@ public class XxlJobHandler { - /** - * @Auther: wangshuo - * @Date: 2024/4/25 - * @description:每天查询更新订货金 - */ - @XxlJob("updateFirstOrder") - public void updateFirstOrder() { - log.info("----定时任务查询更新订货金----"); - boolean hasNext = true; - int pageNum = 1; - int pageSize = 50; - while (hasNext) { - PageHelper.startPage(pageNum, pageSize); - List shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_152.getShopSubStageStatus()); - if (CollectionUtils.isEmpty(shopIdListByStageStatus)) { - log.info("------定时任务结束调用鲜丰更新订货金结束------"); - return; - } - List shopIds = shopIdListByStageStatus.stream().filter(o -> o.getShopId() != null).map(ShopStageInfoDO::getShopId).collect(Collectors.toList()); - try { - List openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIds); - Map map = openPlanShopInfoDTOS.stream().filter(OpenPlanShopInfoDTO -> StringUtils.isNoneBlank(OpenPlanShopInfoDTO.getStoreNum())). - collect(Collectors.toMap(OpenPlanShopInfoDTO::getStoreNum, OpenPlanShopInfoDTO::getShopId)); - List 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.updateShopStageInfo(map.get(o.getStoreCode()), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151); - preparationService.whetherToOpenForAcceptance(map.get(o.getStoreCode())); - } - } - } - } catch (Exception e) { - log.error("定时任务更新订货金失败 shopIds:{},e:{}", shopIds, e.getMessage()); - } - hasNext = shopIdListByStageStatus.size() >= pageSize; - pageNum++; - } - log.info("------定时任务结束调用鲜丰更新订货金结束------"); - XxlJobHelper.handleSuccess(); - } - /** * @Auther: wangshuo * @Date: 2024/4/29