From d1fcdf8ec0f307dd0d5ed3ccbf0919c20e9ac896 Mon Sep 17 00:00:00 2001 From: "shuo.wang" Date: Sat, 11 May 2024 19:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E9=AA=8C=E6=94=B6=E5=88=97=E8=A1=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cool/store/dao/ShopStageInfoDAO.java | 8 ++ .../store/mapper/ShopStageInfoMapper.java | 7 ++ .../resources/mapper/AcceptanceInfoMapper.xml | 6 +- .../resources/mapper/AssessmentDataMapper.xml | 16 +-- .../resources/mapper/ShopStageInfoMapper.xml | 14 +++ .../cool/store/entity/AcceptanceInfoDO.java | 18 +++ .../service/impl/DecorationServiceImpl.java | 25 +++-- .../com/cool/store/utils/poi/DateUtils.java | 14 +++ .../controller/webb/PCTestController.java | 2 + .../com/cool/store/job/XxlJobHandler.java | 106 ++++++++---------- 10 files changed, 140 insertions(+), 76 deletions(-) diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java index 116ea7686..77b0a0e6b 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/dao/ShopStageInfoDAO.java @@ -256,5 +256,13 @@ public class ShopStageInfoDAO { ShopSubStageEnum shopSubStageEnum = ShopSubStageEnum.SHOP_STAGE_16; return shopStageInfoMapper.getShopCountByLineIdAndStageStatus(lineId, shopSubStageEnum.getShopStageEnum().getShopStage(), shopSubStageEnum.getShopSubStage(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus()); } + /** + * @Auther: wangshuo + * @Date: 2024/5/11 + * @description:获取处于a阶段或b阶段,和c阶段的 + */ + public List getSubStageListBySubStageStatus(ShopSubStageStatusEnum a,ShopSubStageStatusEnum b, ShopSubStageStatusEnum c){ + return shopStageInfoMapper.getSubStageListBySubStageStatus(a.getShopSubStageStatus(),b.getShopSubStageStatus(),c.getShopSubStageStatus()); + } } diff --git a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java index c5408ca18..ba88175ee 100644 --- a/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java +++ b/coolstore-partner-dao/src/main/java/com/cool/store/mapper/ShopStageInfoMapper.java @@ -2,6 +2,7 @@ package com.cool.store.mapper; import com.cool.store.dto.Preparation.ScheduleDTO; import com.cool.store.entity.ShopStageInfoDO; +import com.cool.store.enums.point.ShopSubStageStatusEnum; import com.cool.store.vo.shop.RentInfoToDoVO; import com.github.pagehelper.Page; import org.apache.ibatis.annotations.Param; @@ -134,4 +135,10 @@ public interface ShopStageInfoMapper extends Mapper { * @return */ Integer getShopCountByLineIdAndStageStatus(@Param("lineId")Long lineId, @Param("shopStage") Integer shopStage, @Param("shopSubStage") Integer shopSubStage, @Param("shopSubStageStatus") Integer shopSubStageStatus); + /** + * @Auther: wangshuo + * @Date: 2024/5/11 + * @description:获取处于a阶段或b阶段,和c阶段的 + */ + List getSubStageListBySubStageStatus(@Param("subStageStatusA")Integer subStageStatusA,@Param("subStageStatusB")Integer subStageStatusB,@Param("subStageStatusC")Integer subStageStatusC ); } diff --git a/coolstore-partner-dao/src/main/resources/mapper/AcceptanceInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/AcceptanceInfoMapper.xml index 39dc25613..48f2b252c 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/AcceptanceInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/AcceptanceInfoMapper.xml @@ -24,13 +24,14 @@ + id ,shop_id,actual_entry_time,planned_completion_time,planned_start_time,decoration_planned_completion_time, decoration_planned_start_time,construction_completion_time,engineering_acceptance_signatures, operations_acceptance_signatures,partner_acceptance_signatures, - create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user + create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time update xfsg_acceptance_info @@ -77,6 +78,9 @@ booking_user =#{bookingUser}, + + plan_exit_time =#{planExitTime} + where shop_id = #{shopId} diff --git a/coolstore-partner-dao/src/main/resources/mapper/AssessmentDataMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/AssessmentDataMapper.xml index df2d381d7..e283d144d 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/AssessmentDataMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/AssessmentDataMapper.xml @@ -54,25 +54,25 @@ update xfsg_assessment_data - qualified = CASE id + qualified = CASE template_id - WHEN #{item.id} THEN #{item.qualified} + WHEN #{item.templateId} THEN #{item.qualified} END, - reason = CASE id + reason = CASE template_id - WHEN #{item.id} THEN #{item.reason} + WHEN #{item.templateId} THEN #{item.reason} END, - comments = CASE id + comments = CASE template_id - WHEN #{item.id} THEN #{item.comments} + WHEN #{item.templateId} THEN #{item.comments} END - where id in ( + where template_id in ( - #{item.id} + #{item.templateId} ) diff --git a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml index 2244782f4..5d1f8324c 100644 --- a/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml +++ b/coolstore-partner-dao/src/main/resources/mapper/ShopStageInfoMapper.xml @@ -265,4 +265,18 @@ + \ No newline at end of file diff --git a/coolstore-partner-model/src/main/java/com/cool/store/entity/AcceptanceInfoDO.java b/coolstore-partner-model/src/main/java/com/cool/store/entity/AcceptanceInfoDO.java index 687352320..81463c1de 100644 --- a/coolstore-partner-model/src/main/java/com/cool/store/entity/AcceptanceInfoDO.java +++ b/coolstore-partner-model/src/main/java/com/cool/store/entity/AcceptanceInfoDO.java @@ -1,4 +1,5 @@ package com.cool.store.entity; + import java.util.Date; import javax.persistence.*; @@ -82,20 +83,37 @@ public class AcceptanceInfoDO { /** * 是否删除:0.否 1.是 */ + @Column(name = "deleted") private Boolean deleted; /** * 计划验收时间 */ + @Column(name = "plan_acceptance_time") private Date planAcceptanceTime; /** * 实际验收时间 */ + @Column(name = "actual_acceptance_time") private Date actualAcceptanceTime; /** * 预约人 */ + @Column(name = "booking_user") private String bookingUser; + /** + *计划撤场时间 + */ + @Column(name = "plan_exit_time") + private Date planExitTime; + + public Date getPlanExitTime() { + return planExitTime; + } + + public void setPlanExitTime(Date planExitTime) { + this.planExitTime = planExitTime; + } public Date getPlanAcceptanceTime() { return planAcceptanceTime; 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 303a62c16..cbd32021d 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 @@ -285,6 +285,7 @@ public class DecorationServiceImpl implements DecorationService { name.add(CommonConstants.EIGHT_DAY); name.add(CommonConstants.WITHDRAWAL); ConstructionScheduleDTO approach = new ConstructionScheduleDTO(); + AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId); ConstructionScheduleDTO constructionSage = new ConstructionScheduleDTO(); for (ConstructionScheduleDTO constructionScheduleDTO : constructionSchedule) { if (name.contains(constructionScheduleDTO.getName())) { @@ -292,27 +293,35 @@ public class DecorationServiceImpl implements DecorationService { if (constructionScheduleDTO.getName().equals(CommonConstants.APPROACH)) { approach = constructionScheduleDTO; } + //计划撤场时间 + if (constructionScheduleDTO.getName().equals(CommonConstants.WITHDRAWAL)) { + 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; } } //设置进场时间xfsg_acceptance_info - AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId); if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(approach.getActualBeginDate())) { Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY); acceptanceInfoDO.setActualEntryTime(date); } + //施工完成时间,计划开始和完成时间 // - if (StringUtils.isNotEmpty(constructionSage.getActualEndDate())) { + if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getActualEndDate())) { Date date = CoolDateUtils.parseDate(constructionSage.getActualEndDate(), CoolDateUtils.DATE_FORMAT_DAY); acceptanceInfoDO.setConstructionCompletionTime(date); } - if (StringUtils.isNotEmpty(constructionSage.getPlanBeginDate())) { + if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getPlanBeginDate())) { Date date = CoolDateUtils.parseDate(constructionSage.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY); acceptanceInfoDO.setPlannedStartTime(date); } - if (StringUtils.isNotEmpty(constructionSage.getPlanEndDate())) { + if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionSage.getPlanEndDate())) { Date date = CoolDateUtils.parseDate(constructionSage.getPlanEndDate(), CoolDateUtils.DATE_FORMAT_DAY); acceptanceInfoDO.setPlannedCompletionTime(date); } @@ -545,15 +554,15 @@ public class DecorationServiceImpl implements DecorationService { public fitmentCheckVO getAcceptanceDetail(Long shopId, LoginUserInfo user) { fitmentCheckVO fitmentCheckVO = new fitmentCheckVO(); ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId); - if (Objects.isNull(shopInfo)){ - log.error("店铺信息不存在 shopId:{}",shopId); + if (Objects.isNull(shopInfo)) { + log.error("店铺信息不存在 shopId:{}", shopId); return null; } //招商经理,选址人员(拓展经理)id Long lineId = shopInfo.getLineId(); LineInfoDO lineInfo = lineInfoMapper.getByLineId(lineId); - if (Objects.isNull(lineInfo)){ - log.error("线索信息不存在 shopId:{}",shopId); + if (Objects.isNull(lineInfo)) { + log.error("线索信息不存在 shopId:{}", shopId); return null; } //招商name diff --git a/coolstore-partner-service/src/main/java/com/cool/store/utils/poi/DateUtils.java b/coolstore-partner-service/src/main/java/com/cool/store/utils/poi/DateUtils.java index d159232cf..0bb102b26 100644 --- a/coolstore-partner-service/src/main/java/com/cool/store/utils/poi/DateUtils.java +++ b/coolstore-partner-service/src/main/java/com/cool/store/utils/poi/DateUtils.java @@ -2,6 +2,7 @@ package com.cool.store.utils.poi; import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.time.DateFormatUtils; +import org.jetbrains.annotations.NotNull; import java.lang.management.ManagementFactory; import java.text.ParseException; @@ -223,4 +224,17 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { } return new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS).format(new Date(time)); } + /** + * + * @Date: 2024/5/11 + * @description:获取X天后的时间 LocalDate + */ + public static LocalDate getPlusFDays(Date date, Integer days) { + Instant instant = date.toInstant(); + ZoneId zone = ZoneId.systemDefault(); + LocalDate localDate = instant.atZone(zone).toLocalDate(); + LocalDate datePlusFDays = localDate.plusDays(days); + return datePlusFDays; + + } } diff --git a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java index d2b0c8c7e..39ebc3553 100644 --- a/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java +++ b/coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCTestController.java @@ -6,7 +6,9 @@ import com.cool.store.entity.*; import com.cool.store.enums.MessageEnum; import com.cool.store.enums.SMSMsgEnum; import com.cool.store.mq.util.HttpRestTemplateService; +import com.cool.store.request.xfsgFirstOrderListRequest; import com.cool.store.response.ResponseResult; +import com.cool.store.response.xfsgFirstOderListResponse; import com.cool.store.service.ShopService; import com.cool.store.service.impl.CommonService; import lombok.extern.slf4j.Slf4j; 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 2dfa90f37..3de428dc2 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 @@ -178,7 +178,6 @@ public class XxlJobHandler { * @description: 每天更新装修阶段进场时间等,至预约状态 */ @XxlJob("fitmentAcceptanceHandler") - @Transactional(rollbackFor = Exception.class) public void fitmentAcceptanceHandler() { log.info("----定时任务每天更新装修阶段进场时间,施工完成时间等,至预约状态----"); boolean hasNext = true; @@ -186,17 +185,18 @@ public class XxlJobHandler { int pageSize = 50; while (hasNext) { PageHelper.startPage(pageNum, pageSize); - //获取表中进场时间为空的店铺 - List acceptanceList = acceptanceInfoDAO.selectByEntryTimeNull(); - if (CollectionUtils.isEmpty(acceptanceList)) { + //获取表中处于施工中或施工完成阶段并且三方验收未预约的 + List subStageList = shopStageInfoDAO.getSubStageListBySubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111, + ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120); + if (CollectionUtils.isEmpty(subStageList)) { log.info("------定时任务结束调用鲜丰获取进场时间结束------"); return; } - int flag = CommonConstants.ZERO; - for (AcceptanceInfoDO acceptanceInfoDO : acceptanceList) { + for (ShopStageInfoDO shopStageInfoDO : subStageList) { + int flag = CommonConstants.ZERO; while (flag < CommonConstants.TWO) { try { - Long shopId = acceptanceInfoDO.getShopId(); + Long shopId = shopStageInfoDO.getShopId(); //施工子阶段 List construction = decorationService.getConstruction(shopId); Map constructionMap = construction.stream(). @@ -206,22 +206,22 @@ public class XxlJobHandler { if (Objects.nonNull(approach)) { Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY); if (Objects.nonNull(date)) { - Result result = getResult(date,CommonConstants.FOUR); - if (result.datePlusDays.equals(result.localDate)) { - //三方验收带预约 + LocalDate plusFDays = DateUtils.getPlusFDays(date, CommonConstants.FOUR); + //小于等于当前时间 + if (plusFDays.isEqual(LocalDate.now()) || plusFDays.isBefore(LocalDate.now())) { + //三方验收待预约 shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120); } } } break; } catch (Exception e) { - log.error("定时任务设置进场时间失败,shopId:{}", acceptanceInfoDO.getShopId()); + log.error("定时任务设置进场时间失败,shopId:{}", shopStageInfoDO.getShopId()); flag++; } } - flag = CommonConstants.ZERO; } - hasNext = acceptanceList.size() >= pageSize; + hasNext = subStageList.size() >= pageSize; pageNum++; } log.info("------定时任务结束调用鲜丰获取进场时间结束------"); @@ -257,17 +257,22 @@ public class XxlJobHandler { try { Date approach = acceptanceInfoDO.getActualEntryTime(); if (Objects.nonNull(approach)) { - Result result = getResult(approach,CommonConstants.FOUR); - if (result.datePlusDays.equals(result.localDate)) { + LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.FOUR); + if (plusFDays.equals(LocalDate.now())) { ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(acceptanceInfoDO.getShopId()); EnterpriseUserDO userByRoleEnumAndRegionId = userAuthMappingService .getUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfo.getRegionId()); + if (StringUtils.isBlank(userByRoleEnumAndRegionId.getUserId())) { + log.error("定时任务三方验收待预约钉钉通知,工程监理id为空,shopId:#{}", acceptanceInfoDO.getShopId()); + break; + } LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId()); Map messageMap = new HashMap<>(); messageMap.put("storeName", shopInfo.getShopName()); messageMap.put("partnerUsername", lineInfo.getUsername()); messageMap.put("partnerMobile", lineInfo.getMobile()); commonService.sendMessage(Arrays.asList(userByRoleEnumAndRegionId.getUserId()), MessageEnum.MESSAGE_24, messageMap); + } } break; @@ -284,24 +289,6 @@ public class XxlJobHandler { } - private static @NotNull Result getResult(Date date,Integer days) { - Instant instant = date.toInstant(); - ZoneId zone = ZoneId.systemDefault(); - LocalDate localDate = instant.atZone(zone).toLocalDate(); - LocalDate datePlusFiveDays = localDate.plusDays(days); // 5天 - Result result = new Result(localDate, datePlusFiveDays); - return result; - } - - private static class Result { - public final LocalDate localDate; - public final LocalDate datePlusDays; - - public Result(LocalDate localDate, LocalDate datePlusDays) { - this.localDate = localDate; - this.datePlusDays = datePlusDays; - } - } /** * @Auther: wangshuo @@ -334,42 +321,40 @@ public class XxlJobHandler { try { Date approach = acceptanceInfoDO.getActualEntryTime(); if (Objects.nonNull(approach)) { - Result result = getResult(approach,CommonConstants.SIX);//7 day - if (result.datePlusDays.equals(result.localDate)) { + LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.SIX);//7 day + if (plusFDays.equals(LocalDate.now())) { //三方验收带预约 ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(acceptanceInfoDO.getShopId()); + //加盟商手机号 + Long lineId = shopInfo.getLineId(); + LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId); + if (Objects.isNull(lineInfo) && StringUtils.isNull(lineInfo.getMobile())) { + log.error("定时任务三方验收预约短信通知:加盟商手机号为空,shopId:#{}", acceptanceInfoDO.getShopId()); + break; + } EnterpriseUserDO supervisor = userAuthMappingService .getUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfo.getRegionId()); - //获取撤场计划完成时间 - List construction = decorationService.getConstruction(acceptanceInfoDO.getShopId()); - Map map = construction.stream() - .filter(o -> StringUtils.isNoneBlank(o.getName())) - .collect(Collectors.toMap(ConstructionScheduleDTO::getName, dto -> dto)); - ConstructionScheduleDTO withdrawal = map.get(CommonConstants.WITHDRAWAL); + //获取计划撤场时间 + Date planExitTime = acceptanceInfoDO.getPlanExitTime(); //获取施工阶段计划完成时间 - ConstructionScheduleDTO constructionInfo = decorationService.getConstructionInfo(acceptanceInfoDO.getShopId()); + Date decorationEndTime = acceptanceInfoDO.getDecorationPlannedCompletionTime(); //获取计划验收时间 - String palnAcceptanceTime = CoolDateUtils.DateFormat(acceptanceInfoDO.getPlanAcceptanceTime(), CoolDateUtils.DATE_FORMAT_SEC); - //区域监理name - String supervisorName = enterpriseUserDAO.getUserName(supervisor.getUserId()); + String planAcceptanceTime = CoolDateUtils.DateFormat(acceptanceInfoDO.getPlanAcceptanceTime(), CoolDateUtils.DATE_FORMAT_SEC); //区域监理手机号 String mobile = supervisor.getMobile(); Map messageMap = new HashMap<>(); - if (Objects.nonNull(withdrawal) && withdrawal.getPlanEndDate() != null) { - messageMap.put("demolitionPlanTime", withdrawal.getPlanEndDate()); + if (Objects.nonNull(planExitTime)) { + String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, planExitTime); + messageMap.put("demolitionPlanTime", date); } else { - - if (Objects.nonNull(constructionInfo)) { - messageMap.put("demolitionPlanTime", constructionInfo.getPlanEndDate()); + if (Objects.nonNull(decorationEndTime)) { + String date = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD, decorationEndTime); + messageMap.put("demolitionPlanTime", date); } } - messageMap.put("palnAcceptanceTime", palnAcceptanceTime); - messageMap.put("supervisionName", supervisorName); + messageMap.put("palnAcceptanceTime", planAcceptanceTime); + messageMap.put("supervisionName", supervisor.getName()); messageMap.put("supervisionMobile", mobile); - //加盟商手机号 - ShopStageInfoDO stageInfoDO = lineIdMap.get(acceptanceInfoDO.getShopId()); - Long lineId = stageInfoDO.getLineId(); - LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId); commonService.sendSms(lineInfo.getMobile(), SMSMsgEnum.THREE_ACCEPTANCE_WAIT, messageMap); } } @@ -422,14 +407,17 @@ public class XxlJobHandler { Date approach = acceptance.getActualEntryTime(); Long shopId = acceptance.getShopId(); if (Objects.nonNull(approach)) { - Result result = getResult(approach,CommonConstants.SIX);//7天 - if (result.datePlusDays.equals(result.localDate)) { + LocalDate plusFDays = DateUtils.getPlusFDays(approach, CommonConstants.SIX);//7天 + if (plusFDays.equals(LocalDate.now())) { ShopStageInfoDO stageInfoDO = lineIdMap.get(shopId); ShopInfoDO shopInfoDO = shopIdMap.get(shopId); + if (StringUtils.isBlank(shopInfoDO.getSupervisorUserId())){ + log.error("定时任务三方待验收钉钉通知,督导id为空,shopId:{}", shopId); + } Long lineId = stageInfoDO.getLineId(); LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId); Map messageMap = new HashMap<>(); - messageMap.put("storeName",shopInfoDO.getShopName()); + messageMap.put("storeName", shopInfoDO.getShopName()); messageMap.put("partnerUsername", lineInfo.getUsername()); messageMap.put("partnerMobile", lineInfo.getMobile()); commonService.sendMessage(Arrays.asList(shopInfoDO.getSupervisorUserId()), MessageEnum.MESSAGE_25, messageMap);