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

This commit is contained in:
zhangchenbiao
2024-04-30 16:38:29 +08:00
27 changed files with 290 additions and 133 deletions

View File

@@ -162,6 +162,7 @@ public class CommonConstants {
public static final String MEASURING_THE_ROOM = "量房";
public static final String CONSTRUCTION_DRAWING = "施工图+预算";
public static final String FLOOR_PLAN = "平面图+门头效果图";
public static final String BUDGET_BOOK = "工程预算";
public static final String APPROACH="进场";
public static final String ONE_DAY="第一天-进场拆除、基础材料下单、物料设备下单";
public static final String TWO_DAY="第二天-水电预埋、地砖铺贴";

View File

@@ -8,19 +8,19 @@ package com.cool.store.enums;
*/
public enum DesignPhaseEnum {
//设计阶段
ACCEPTANCE_FAILED(0,"验收未通过"),
ACCEPTANCE_NOT_START(1, "未开始"),
ACCEPTANCE_DESIGNING(2, "设计中"),
ACCEPTED_NOT(3, "未验收"),
ACCEPTANCE_FAILEDS(0,"验收未通过"),
AUDIT_WAIT(5,"待审批"),
AUDIT_FAIL(6,"审批驳回"),
AUDIT_ING(7,"审批中"),
AUDIT_DISCARD (8,"审批作废"),
AUDIT_PASS(9,"审批通过"),
ACCEPTANCE_FAIL(10,"审批验收未通过"),
ACCEPTANCE_PASS (11,"验收通过");
//设计阶段,平面图,施工图
DESIGN_PHASE_ACCEPTANCE_FAILED(0,"验收未通过"),
DESIGN_PHASE_NOT_START(1, "未开始"),
DESIGN_PHASE_ACCEPTANCE_DESIGNING(2, "设计中"),
DESIGN_PHASE_ACCEPTED_NOT(3, "未验收"),
DESIGN_PHASE_ACCEPTANCE_FAILEDS(0,"验收未通过"),
DESIGN_PHASE_AUDIT_WAIT(5,"待审批"),
DESIGN_PHASE_AUDIT_FAIL(6,"审批驳回"),
DESIGN_PHASE_AUDIT_ING(7,"审批中"),
DESIGN_PHASE_AUDIT_DISCARD (8,"审批作废"),
DESIGN_PHASE_AUDIT_PASS(9,"审批通过"),
DESIGN_PHASE_AUDIT_ACCEPTANCE_FAIL(10,"审批验收未通过"),
DESIGN_PHASE_ACCEPTANCE_PASS (11,"验收通过");
private Integer code;

View File

@@ -31,7 +31,7 @@
</sql>
<update id="updateByShopId">
update xfsg_opening_operation_plan
set audit_id = #{auditId},result_type = #{resultType}
set audit_id = #{auditId},result_type = #{resultType},update_time = NOW()
where shop_id = #{shopId}
</update>

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -9,15 +10,14 @@ import lombok.Data;
*/
@Data
public class AttachmentsDTO {
@ApiModelProperty("标题")
private String title;
private Long id;
@ApiModelProperty("路径")
private String path;
@ApiModelProperty("创建人")
private String create;
@ApiModelProperty("创建时间")
private String createDate;

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -11,13 +12,22 @@ import java.util.List;
*/
@Data
public class BudgetDTO {
@ApiModelProperty("预算主键")
private Long id;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("计价类型")
private String type;
@ApiModelProperty("合计")
private String vzHj;
@ApiModelProperty("取费合计")
private String totalAmount;
@ApiModelProperty("成本合计")
private String totalCost;
@ApiModelProperty("创建时间")
private String createDate;
@ApiModelProperty("创建人")
private String createBy;
@ApiModelProperty("预算详情")
private List<BudgetDetailDTO> details;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -11,25 +12,46 @@ import java.math.BigDecimal;
*/
@Data
public class BudgetDetailDTO {
@ApiModelProperty("预算详情主键")
private Long id;
@ApiModelProperty("类型")
private String nodeType;
@ApiModelProperty("项目编号")
private String number;
@ApiModelProperty("项目名称")
private String name;
@ApiModelProperty("单位")
private String unitName;
@ApiModelProperty("预算工程量")
private String amount;
@ApiModelProperty("单价")
private String unitPrice;
@ApiModelProperty("预算合计")
private String totalPrice;
@ApiModelProperty("人工单价")
private String labour;
@ApiModelProperty("材料单价")
private String material;
@ApiModelProperty("主材成本")
private String mainMaterialCostPrice;
@ApiModelProperty("辅材成本")
private String auxiliaryMaterialCostPrice;
@ApiModelProperty("人工成本")
private String labourCostPrice;
@ApiModelProperty("结算工程量")
private String remark;
@ApiModelProperty("结算合计")
private BigDecimal loss;
@ApiModelProperty("综合成本")
private BigDecimal totalCost;
@ApiModelProperty("成本单价")
private BigDecimal cost;
@ApiModelProperty("损耗单价")
private BigDecimal lossPrice;
@ApiModelProperty("计划利润")
private String planProfit;
@ApiModelProperty("利润率")
private BigDecimal profitRate;
@ApiModelProperty("唯一供应商")
private String supplierName;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
@@ -13,14 +14,23 @@ import java.util.List;
@Data
public class ConstructionScheduleDTO {
private String id;
@ApiModelProperty("施工名称")
private String name;
@ApiModelProperty("计划开始时间")
private String planBeginDate;
@ApiModelProperty("计划结束时间")
private String planEndDate;
@ApiModelProperty("实际开始时间")
private String actualBeginDate;
@ApiModelProperty("实际结束时间")
private String actualEndDate;
@ApiModelProperty("工期")
private Integer duration;
@ApiModelProperty("状态(-1.不显示 0.未开工 1.施工中 2.已完工)")
private Integer state;
@ApiModelProperty("施工进度附件")
private List<AttachmentsDTO> attachments;
@ApiModelProperty("跟进日志")
private List<TrackDataDTO> trackData;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -11,14 +12,24 @@ import java.util.List;
*/
@Data
public class DecorationDTO {
@ApiModelProperty("项目主键")
private String projectId;
@ApiModelProperty("客户编号")
private String clientCode;
@ApiModelProperty("项目编号")
private String clientName;
@ApiModelProperty("项目编码")
private String pCode;
@ApiModelProperty("客户编号")
private String clientContractCode;
@ApiModelProperty("项目地址")
private String address;
@ApiModelProperty("预算")
private List<BudgetDTO> proposedBookBudget;
@ApiModelProperty("设计进度")
private List<DesignSchemeDTO> designScheme;
@ApiModelProperty("收款单据")
private List<PaymentDTO> payment;
@ApiModelProperty("施工进度")
private List<ConstructionScheduleDTO> constructionSchedule;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -13,13 +14,22 @@ import java.util.List;
public class DesignSchemeDTO {
private String id;
@ApiModelProperty("名称")
private String name;
@ApiModelProperty("说明")
private String remark;
@ApiModelProperty("预计时间")
private String date;
@ApiModelProperty("计划开始")
private String planBeginDate;
@ApiModelProperty("计划结束")
private String planEndDate;
@ApiModelProperty("开始时间")
private String beginDate;
@ApiModelProperty("完成时间")
private String endDate;
@ApiModelProperty("状态(0.验收未通过 1.未开始 2.设计中 3.未验收 4.验收未通过 5.待审批 6.审批驳回 7.审批中 8.审批作废 9.审批通过 10.审批验收未通过 11.验收通过)")
private Integer status;
@ApiModelProperty("设计进度附件")
private List<AttachmentsDTO> attachments;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.time.LocalDate;
@@ -13,9 +14,13 @@ import java.time.LocalDate;
public class FileDTO {
private Long id;
@ApiModelProperty("路径")
private String path;
@ApiModelProperty("标题")
private String title;
@ApiModelProperty("创建人")
private String create;
@ApiModelProperty("创建时间")
private String createDate;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@@ -14,15 +15,26 @@ import java.util.List;
@Data
public class PaymentDTO {
private String id;
@ApiModelProperty("单据日期")
private String billDate;
@ApiModelProperty("单据编号")
private String billNo;
@ApiModelProperty("制单人")
private String userName;
@ApiModelProperty("应收金额")
private BigDecimal amount;
@ApiModelProperty("本次收款")
private BigDecimal bDeAmount;
@ApiModelProperty("业务类别")
private String typeCategory;
@ApiModelProperty("收款账户")
private String accountName;
@ApiModelProperty("状态(0.保存 2.审核 3.提交审批")
private Integer state;
@ApiModelProperty("审核日期")
private String auditTime;
@ApiModelProperty("审核人")
private String auditUser;
@ApiModelProperty("付款单附件")
private List<AttachmentsDTO> attachments;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
@@ -10,9 +11,14 @@ import lombok.Data;
*/
@Data
public class ProjectDTO {
@ApiModelProperty("项目主键")
private String projectId;
@ApiModelProperty("客户编号")
private String clientCode;
@ApiModelProperty("客户名称")
private String clientName;
@ApiModelProperty("项目编码")
private String pCode;
@ApiModelProperty("项目地址")
private String address;
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.dto.decoration;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -13,14 +14,14 @@ import java.util.List;
public class TrackDataDTO {
private Long id;
@ApiModelProperty("跟进人")
private String person;
@ApiModelProperty("备注(内容)")
private String remark;
@ApiModelProperty("日期")
private String date;
@ApiModelProperty("回复ID")
private Integer RepalyId;
@ApiModelProperty("跟进日志附件")
private List<FileDTO> file;
}

View File

@@ -20,7 +20,7 @@ public class OpeningOperationPlanAuditRequest {
@ApiModelProperty("店铺id")
private Long shopId;
@ApiModelProperty("结果类型 0通过,1拒绝")
@ApiModelProperty("审核结果状态0.待审核 1. 通过 2. 拒绝")
private Integer resultType;
@ApiModelProperty("通过原因")

View File

@@ -3,6 +3,10 @@ package com.cool.store.request;
import com.cool.store.entity.OpeningOperationPlanDO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
/**
* @Auther: WangShuo
@@ -24,16 +28,16 @@ public class OpeningOperationPlanRequest {
private String surveyResult;
@ApiModelProperty("调研结果url")
private String surveyResultUrl;
private List<String> surveyResultUrl;
@ApiModelProperty("活动主题")
private String activityTheme;
@ApiModelProperty("活动主题url")
private String activityThemeUrl;
private List<String> activityThemeUrl;
@ApiModelProperty("筹备人员ids")
private String preparationUserIds;
private List<String> preparationUserIds;
@ApiModelProperty("是否完成排车路线")
private Byte routeCompleted;
@@ -42,14 +46,20 @@ public class OpeningOperationPlanRequest {
public OpeningOperationPlanDO toOpeningOperationPlanDO() {
OpeningOperationPlanDO openingOperationPlanDO = new OpeningOperationPlanDO();
openingOperationPlanDO.setShopId(shopId);
openingOperationPlanDO.setPlanSource(planSource);
openingOperationPlanDO.setSurveyResult(surveyResult);
openingOperationPlanDO.setSurveyResultUrl(surveyResultUrl);
openingOperationPlanDO.setActivityTheme(activityTheme);
openingOperationPlanDO.setActivityThemeUrl(activityThemeUrl);
openingOperationPlanDO.setPreparationUserIds(preparationUserIds);
openingOperationPlanDO.setRouteCompleted(routeCompleted);
openingOperationPlanDO.setShopId(this.shopId);
openingOperationPlanDO.setPlanSource(this.planSource);
openingOperationPlanDO.setSurveyResult(this.surveyResult);
if (CollectionUtils.isNotEmpty(this.surveyResultUrl)) {
openingOperationPlanDO.setSurveyResultUrl(String.join(",", this.surveyResultUrl));
}
if (CollectionUtils.isNotEmpty(this.activityThemeUrl)) {
openingOperationPlanDO.setActivityThemeUrl(String.join(",", this.activityThemeUrl));
}
if (CollectionUtils.isNotEmpty(this.preparationUserIds)) {
openingOperationPlanDO.setPreparationUserIds(String.join(",", this.preparationUserIds));
}
openingOperationPlanDO.setActivityTheme(this.activityTheme);
openingOperationPlanDO.setRouteCompleted(this.routeCompleted);
return openingOperationPlanDO;
}
}

View File

@@ -0,0 +1,21 @@
package com.cool.store.vo.Fitment;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @Auther: WangShuo
* @Date: 2024/04/30/上午10:08
* @Version 1.0
* @注释:
*/
@Data
public class DecorationModeStageVO {
@ApiModelProperty("装修阶段状态")
private Integer shopSubStageStatus;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date creatTime;
}

View File

@@ -1,4 +1,4 @@
package com.cool.store.vo;
package com.cool.store.vo.Fitment;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;

View File

@@ -1,10 +1,10 @@
package com.cool.store.vo;
package com.cool.store.vo.Fitment;
import com.cool.store.dto.decoration.AttachmentsDTO;
import com.cool.store.dto.decoration.BudgetDTO;
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
import com.cool.store.dto.decoration.DesignSchemeDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.List;
@@ -17,9 +17,12 @@ import java.util.List;
*/
@Data
public class DesignInfoVo {
@ApiModelProperty("平面图+施工图")
private List<DesignSchemeDTO> designScheme;
@ApiModelProperty("量房")
private ConstructionScheduleDTO measuringRoom;
private ConstructionScheduleDTO ConstructionDrawings;
@ApiModelProperty("预算")
private BudgetDTO proposedBookBudget;
@ApiModelProperty("阶段状态")
private Integer shopSubStageStatus;
}

View File

@@ -5,7 +5,9 @@ import com.cool.store.entity.OpeningOperationPlanDO;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
@@ -22,13 +24,13 @@ public class OpeningOperationPlanVO {
private String surveyResult;
@ApiModelProperty("调研结果url")
private String surveyResultUrl;
private List<String> surveyResultUrl;
@ApiModelProperty("活动主题")
private String activityTheme;
@ApiModelProperty("活动主题url")
private String activityThemeUrl;
private List<String> activityThemeUrl;
@ApiModelProperty("筹备人员name")
private List<UserNameDTO> preparationUsers;
@@ -57,9 +59,13 @@ public class OpeningOperationPlanVO {
this.submittedUserId = openingOperationPlanDO.getSubmittedUserId();
this.submissionTime = openingOperationPlanDO.getSubmissionTime();
this.routeCompleted = openingOperationPlanDO.getRouteCompleted();
this.activityThemeUrl = openingOperationPlanDO.getActivityThemeUrl();
if (StringUtils.isNotBlank(openingOperationPlanDO.getActivityThemeUrl())) {
this.activityThemeUrl = Arrays.asList(openingOperationPlanDO.getActivityThemeUrl().split(",")) ;
}
if (StringUtils.isNotBlank(openingOperationPlanDO.getSurveyResultUrl())) {
this.surveyResultUrl = Arrays.asList(openingOperationPlanDO.getSurveyResultUrl().split(",")) ;
}
this.activityTheme = openingOperationPlanDO.getActivityTheme();
this.surveyResultUrl = openingOperationPlanDO.getSurveyResultUrl();
this.surveyResult = openingOperationPlanDO.getSurveyResult();
}
}

View File

@@ -2,13 +2,12 @@ package com.cool.store.service;
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
import com.cool.store.dto.decoration.DecorationModelDTO;
import com.cool.store.entity.AcceptanceInfoDO;
import com.cool.store.request.DecorationPayRequest;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.request.ThreeAcceptanceRequest;
import com.cool.store.response.ThreeAcceptanceResponse;
import com.cool.store.vo.DecorationModelVO;
import com.cool.store.vo.DesignInfoVo;
import com.cool.store.vo.Fitment.DecorationModeStageVO;
import com.cool.store.vo.Fitment.DecorationModelVO;
import com.cool.store.vo.Fitment.DesignInfoVo;
import com.cool.store.vo.PartnerUserInfoVO;
import java.util.List;
@@ -33,6 +32,12 @@ public interface DecorationService {
* @description:设计阶段信息
*/
DesignInfoVo DesignInfo(Long shopId);
/**
* @Auther: wangshuo
* @Date: 2024/4/30
* @description:获取装修款阶段信息
*/
DecorationModeStageVO getDecorationModeStage(Long shopId);
/**
* @Auther: wangshuo
* @Date: 2024/4/28

View File

@@ -1,22 +1,18 @@
package com.cool.store.service.impl;
import cn.hutool.core.bean.BeanUtil;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.constants.CommonConstants;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dao.*;
import com.cool.store.dto.decoration.*;
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
import com.cool.store.entity.AcceptanceInfoDO;
import com.cool.store.entity.LineInfoDO;
import com.cool.store.entity.LinePayDO;
import com.cool.store.entity.ShopInfoDO;
import com.cool.store.entity.ShopStageInfoDO;
import com.cool.store.enums.ErrorCodeEnum;
import com.cool.store.enums.WorkflowSubStageStatusEnum;
import com.cool.store.enums.point.PayBusinessTypeEnum;
import com.cool.store.enums.point.PayTypeEnum;
import com.cool.store.enums.point.ShopSubStageEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
import com.cool.store.exception.ServiceException;
import com.cool.store.request.DecorationPayRequest;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.request.ThreeAcceptanceRequest;
import com.cool.store.response.ThreeAcceptanceResponse;
@@ -25,13 +21,12 @@ import com.cool.store.service.LinePayService;
import com.cool.store.service.PreparationService;
import com.cool.store.service.YlfService;
import com.cool.store.utils.poi.StringUtils;
import com.cool.store.utils.poi.constant.Constants;
import com.cool.store.vo.DecorationModelVO;
import com.cool.store.vo.DesignInfoVo;
import com.cool.store.vo.Fitment.DecorationModeStageVO;
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 org.apache.poi.ss.formula.functions.T;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
@@ -64,6 +59,8 @@ public class DecorationServiceImpl implements DecorationService {
private PreparationService preparationService;
@Resource
private LinePayService linePayService;
@Resource
private ShopStageInfoDAO shopStageInfoDAO;
@Override
public Boolean flush(Long shopId) {
@@ -75,40 +72,66 @@ public class DecorationServiceImpl implements DecorationService {
public DesignInfoVo DesignInfo(Long shopId) {
DecorationDTO decoration = getDecorationDTO(shopId);
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
DesignInfoVo designInfoVo = new DesignInfoVo();
List<DesignSchemeDTO> designScheme = decoration.getDesignScheme();
if (designScheme != null && designScheme.size() > CommonConstants.ZERO) {
Map<String, DesignSchemeDTO> designSchemeMap = designScheme.stream().collect(Collectors.toMap(DesignSchemeDTO::getId, dto -> dto));
List<DesignSchemeDTO> designSchemeDTOS = new ArrayList<>();
//平面图
designSchemeDTOS.add(designSchemeMap.get(CommonConstants.FLOOR_PLAN));
//施工图
designSchemeDTOS.add(designSchemeMap.get(CommonConstants.CONSTRUCTION_DRAWING));
designInfoVo.setDesignScheme(designSchemeDTOS);
}
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
dto -> dto));
//量房
ConstructionScheduleDTO measuringRoom = constructionScheduleMap.get(CommonConstants.MEASURING_THE_ROOM);
//施工图
ConstructionScheduleDTO ConstructionDrawings = constructionScheduleMap.get(CommonConstants.CONSTRUCTION_DRAWING);
if (constructionSchedule != null && constructionSchedule.size() > CommonConstants.ZERO) {
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
dto -> dto));
if (constructionScheduleMap != null && constructionScheduleMap.size() > 0) {
//量房
designInfoVo.setMeasuringRoom(constructionScheduleMap.get(CommonConstants.MEASURING_THE_ROOM));
}
}
//预算
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
designInfoVo.setProposedBookBudget(proposedBookBudget.get(CommonConstants.ZERO));
if (Objects.nonNull(designInfoVo.getMeasuringRoom()) && Objects.nonNull(designInfoVo.getProposedBookBudget())
&& designInfoVo.getDesignScheme().size() == CommonConstants.TWO) {
//如果设计阶段未完成
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91.getShopSubStageStatus().
equals(shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9).getShopSubStageStatus()) )
//更新设计阶段状态
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91));
}
DesignInfoVo designInfoVo = new DesignInfoVo();
designInfoVo.setMeasuringRoom(measuringRoom);
designInfoVo.setConstructionDrawings(ConstructionDrawings);
designInfoVo.setDesignScheme(designScheme);
designInfoVo.setProposedBookBudget(proposedBookBudget.get(0));
return designInfoVo;
}
@Override
public DecorationModeStageVO getDecorationModeStage(Long shopId) {
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_10);
if (Objects.isNull(shopSubStageInfo)) {
return null;
}
DecorationModeStageVO decorationModeStageVO = new DecorationModeStageVO();
decorationModeStageVO.setShopSubStageStatus(shopSubStageInfo.getShopSubStageStatus());
LinePayVO linePayInfo = linePayService.getLinePayInfo(shopSubStageInfo.getLineId());
decorationModeStageVO.setCreatTime(linePayInfo.getCreateTime());
return decorationModeStageVO;
}
@Override
public DecorationModelDTO DecorationModel(Long shopId) {
if (shopId == null) {
log.error("DecorationModel shopCode is null");
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
DecorationDTO decoration = getDecorationDTO(shopId);
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
//预算
@@ -129,7 +152,7 @@ public class DecorationServiceImpl implements DecorationService {
public String submitDecorationModel(LinePaySubmitRequest request, PartnerUserInfoVO partnerUserInfoVO) {
DecorationDTO decoration = getDecorationDTO(request.getShopId());
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
if (decoration.getPayment() != null && decoration.getPayment().size() > 0) {
@@ -155,7 +178,7 @@ public class DecorationServiceImpl implements DecorationService {
}
DecorationDTO decoration = getDecorationDTO(shopId);
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
@@ -178,7 +201,7 @@ public class DecorationServiceImpl implements DecorationService {
public List<ConstructionScheduleDTO> getConstruction(Long shopId) {
DecorationDTO decoration = getDecorationDTO(shopId);
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
@@ -203,7 +226,7 @@ public class DecorationServiceImpl implements DecorationService {
public ConstructionScheduleDTO getConstructionInfo(Long shopId) {
DecorationDTO decoration = getDecorationDTO(shopId);
if (decoration == null) {
log.error("DecorationModel shopCode is null");
log.error("DecorationModel storeNum is null");
return null;
}
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
@@ -212,6 +235,7 @@ public class DecorationServiceImpl implements DecorationService {
ConstructionScheduleDTO constructionScheduleDTO = constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE);
return constructionScheduleDTO;
}
@Transactional(rollbackFor = Exception.class)
@Override
public Integer submitAcceptance(ThreeAcceptanceRequest request) {
@@ -239,10 +263,13 @@ public class DecorationServiceImpl implements DecorationService {
shopIds.add(shopId);
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIds);
String storeNum = openPlanShopInfoDTOS.get(0).getStoreNum();
ProjectDTO projectList = ylfService.getProjectList(storeNum);
String projectId = projectList.getProjectId();
DecorationDTO decoration = ylfService.getDecoration(Long.parseLong(projectId));
return decoration;
if (StringUtils.isNotEmpty(storeNum)) {
ProjectDTO projectList = ylfService.getProjectList(storeNum);
String projectId = projectList.getProjectId();
DecorationDTO decoration = ylfService.getDecoration(Long.parseLong(projectId));
return decoration;
}
return null;
}
}

View File

@@ -83,12 +83,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
OpeningOperationPlanDO selectByShopId = openingOperationPlanDAO.selectByShopId(request.getShopId());
Long planId;
OpeningOperationPlanDO openingOperationPlanDO = request.toOpeningOperationPlanDO();
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
openingOperationPlanDO.setResultType(AuditStatusEnum.TODO.getCode());
if (!Objects.isNull(selectByShopId)) {
//提交修改
openingOperationPlanDO.setId(selectByShopId.getId());
openingOperationPlanDO.setUpdateTime(new Date());
openingOperationPlanDO.setUpdateUserId(userId);
planId = openingOperationPlanDAO.updateSelective(openingOperationPlanDO);
} else {
//新增

View File

@@ -85,7 +85,6 @@ public class YlfServiceImpl implements YlfService {
log.info("获取云立方装修公司信息失败,shopCode:{}", storeNum);
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
}
} catch (Exception e) {
log.info("调用云立方获取项目列表异常,getProjectList error:{}", e);
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);

View File

@@ -64,18 +64,19 @@ public class OpenPreparationController {
public ResponseResult<OpeningOperationPlanVO> getPlan(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(openingOperationPlanService.getPlanByShopId(shopId));
}
@PostMapping("/openingOperationPlan/audit")
@ApiOperation("审核运营方案")
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request) {
return ResponseResult.success(auditOpeningOperationPlanService.auditPlan(request));
}
@PostMapping("/openingOperationPlan/planList")
@ApiOperation("查询运营方案列表")
public ResponseResult<PageInfo<OpeningOperationPlanListVO>> planList(@RequestBody PlanListRequest request) {
return ResponseResult.success(openingOperationPlanService.getPlanListPage(request));
}
@PostMapping("/openingOperationPlan/audit")
@ApiOperation("审核运营方案")
public ResponseResult auditPlan(@RequestBody OpeningOperationPlanAuditRequest request) {
return ResponseResult.success(auditOpeningOperationPlanService.auditPlan(request));
}
@GetMapping("/firstOrder/get")
@ApiOperation("查询订货金")

View File

@@ -1,23 +1,13 @@
package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
import com.cool.store.dto.decoration.DecorationDTO;
import com.cool.store.dto.decoration.DecorationModelDTO;
import com.cool.store.request.DecorationPayRequest;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.request.ThreeAcceptanceRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.ThreeAcceptanceResponse;
import com.cool.store.service.CoolStoreStartFlowService;
import com.cool.store.service.DecorationService;
import com.cool.store.service.YlfService;
import com.cool.store.vo.DecorationModelVO;
import com.cool.store.vo.DesignInfoVo;
import com.cool.store.vo.Fitment.DecorationModelVO;
import com.cool.store.vo.Fitment.DesignInfoVo;
import com.cool.store.vo.PartnerUserInfoVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

View File

@@ -8,12 +8,11 @@ import com.cool.store.request.ThreeAcceptanceRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.ThreeAcceptanceResponse;
import com.cool.store.service.DecorationService;
import com.cool.store.vo.DecorationModelVO;
import com.cool.store.vo.DesignInfoVo;
import com.cool.store.vo.Fitment.DecorationModeStageVO;
import com.cool.store.vo.Fitment.DecorationModelVO;
import com.cool.store.vo.Fitment.DesignInfoVo;
import com.cool.store.vo.PartnerUserInfoVO;
import com.sun.xml.bind.v2.TODO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
@@ -38,7 +37,6 @@ public class MiniDecorationController {
@ApiOperation("提交装修款")
public ResponseResult submitDecorationModel(@RequestBody LinePaySubmitRequest linePaySubmitRequest){
PartnerUserInfoVO user = PartnerUserHolder.getUser();
//TODO
return ResponseResult.success(decorationService.submitDecorationModel(linePaySubmitRequest, user));
}
@ApiOperation("获取设计阶段信息")
@@ -56,11 +54,16 @@ public class MiniDecorationController {
public ResponseResult<DecorationModelDTO> getDecorationModel(@RequestParam Long shopId){
return ResponseResult.success(decorationService.DecorationModel(shopId)) ;
}
@ApiOperation("获取装修款信息")
@ApiOperation("获取装修款阶段信息")
@GetMapping("/getDecorationModeStage")
public ResponseResult<DecorationModeStageVO> getDecorationModeStage(@RequestParam Long shopId){
return ResponseResult.success(decorationService.getDecorationModeStage(shopId)) ;
}
@ApiOperation("获取装修款详情信息")
@GetMapping("/getDecorationModelInfo")
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
PartnerUserInfoVO user = PartnerUserHolder.getUser();
user.setPartnerId("61bf57dc65334885802a278835f499d0");
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
}
@ApiOperation("提交三方验收")

View File

@@ -32,6 +32,9 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.time.Instant;
import java.time.LocalDate;
import java.time.ZoneId;
import java.util.*;
import java.util.stream.Collectors;
@@ -195,28 +198,29 @@ public class XxlJobHandler {
//进场时间+5
if (Objects.nonNull(construction) && !StringUtils.isNull(construction.get(0).getActualBeginDate())
&& Objects.nonNull(acceptanceInfoDO.getActualEntryTime())) {
Calendar calendar = Calendar.getInstance();
calendar.setTime(acceptanceInfoDO.getActualEntryTime());
calendar.add(Calendar.DAY_OF_MONTH, 5); // 添加5天
Date dateAfterFiveDays = calendar.getTime();
Date now =new Date();
//TODO
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.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) {
List<ShopStageInfoDO> list = new ArrayList<>();
ShopStageInfoDO data1 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage());
data1.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120.getShopSubStageStatus());
list.add(data1);
shopStageInfoDAO.batchUpdate(list);
Instant instant = acceptanceInfoDO.getActualEntryTime().toInstant();
ZoneId zone = ZoneId.systemDefault();
LocalDate localDate = instant.atZone(zone).toLocalDate();
LocalDate datePlusFiveDays = localDate.plusDays(5); // 添加5天
LocalDate now = LocalDate.now();
if (datePlusFiveDays.equals(now)) {
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.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) {
List<ShopStageInfoDO> list = new ArrayList<>();
ShopStageInfoDO data1 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage());
data1.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120.getShopSubStageStatus());
list.add(data1);
shopStageInfoDAO.batchUpdate(list);
}
}
}
acceptanceInfoDAO.insertAcceptanceInfo(acceptanceInfoDO);
//TODO 短信通知
}
acceptanceInfoDAO.insertAcceptanceInfo(acceptanceInfoDO);
//TODO 短信通知
}
hasNext = acceptanceInfoDOS.size() >= PageSize;
PageNum++;