增加查询获取验收列表详情接口

This commit is contained in:
shuo.wang
2024-05-11 19:37:47 +08:00
parent be7d3481ea
commit d1fcdf8ec0
10 changed files with 140 additions and 76 deletions

View File

@@ -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

View File

@@ -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;
}
}