三方验收
This commit is contained in:
@@ -20,7 +20,7 @@ public class CommonConstants {
|
||||
|
||||
public static final int ACCESS_TOKEN_EXPIRE = 14400;
|
||||
|
||||
public static final int THREE_DAY_SECONDS = 60*60*24*3;
|
||||
public static final int THREE_DAY_SECONDS = 60 * 60 * 24 * 3;
|
||||
|
||||
public static final int NORMAL_LOCK_TIMES = 60 * 1000;
|
||||
|
||||
@@ -108,8 +108,8 @@ public class CommonConstants {
|
||||
public static final int ONE_THOUSAND = 1000;
|
||||
public static final int FIFTY_FIVE = 55;
|
||||
public static final int SIXTY_FIVE = 65;
|
||||
public static final int MIN_CODE = 10000000;
|
||||
public static final int MAX_CODE = 89999999;
|
||||
public static final int MIN_CODE = 10000000;
|
||||
public static final int MAX_CODE = 89999999;
|
||||
|
||||
|
||||
public static final String ONE_STR = "1";
|
||||
@@ -123,23 +123,22 @@ public class CommonConstants {
|
||||
public static final String NINE_STR = "9";
|
||||
public static final String TEN_STR = "10";
|
||||
|
||||
public static final String FOLLOW = "follow";
|
||||
public static final String PENDING = "pending";
|
||||
public static final String FOLLOW = "follow";
|
||||
public static final String PENDING = "pending";
|
||||
|
||||
|
||||
public static final String CLOSE = "close";
|
||||
public static final String OPEN = "open";
|
||||
public static final String CLOSE = "close";
|
||||
public static final String OPEN = "open";
|
||||
|
||||
|
||||
public static final String ALLOCATION = "allocation";
|
||||
|
||||
public static final String ALLOCATION = "allocation";
|
||||
|
||||
public static final String TRANSFER = "transfer";
|
||||
public static final String TRANSFER = "transfer";
|
||||
|
||||
// 短信模版-意向申请审批通过
|
||||
public static final String SMS_TEMPLATE_CODE_INTENT = "SMS_461990823";
|
||||
public static final String SMS_TEMPLATE_CODE_INTENT = "SMS_461990823";
|
||||
// 短信模版-资质审核通过
|
||||
public static final String SMS_TEMPLATE_CODE_VERIFY = "SMS_461980876";
|
||||
public static final String SMS_TEMPLATE_CODE_VERIFY = "SMS_461980876";
|
||||
|
||||
public static final String DAY_END_TIME_SUFFIX = " 23:59:59";
|
||||
|
||||
@@ -157,4 +156,21 @@ public class CommonConstants {
|
||||
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
|
||||
|
||||
public static final String YUN_XUE_TANG_SUC_CODE = "10000";
|
||||
//鲜丰
|
||||
//设计阶段+施工阶段
|
||||
public static final String CONSTRUCTION_PHASE = "施工阶段";
|
||||
public static final String MEASURING_THE_ROOM = "量房";
|
||||
public static final String CONSTRUCTION_DRAWING = "施工图+预算";
|
||||
public static final String FLOOR_PLAN = "平面图+门头效果图";
|
||||
public static final String APPROACH="进场";
|
||||
public static final String ONE_DAY="第一天-进场拆除、基础材料下单、物料设备下单";
|
||||
public static final String TWO_DAY="第二天-水电预埋、地砖铺贴";
|
||||
public static final String THREE_DAY="第三天-橱窗隔断、木工包柱、电工布线";
|
||||
public static final String FOUR_DAY="第四天-护墙板安装、空调安装";
|
||||
public static final String FIVE_DAY="第五天-吊顶隔断、木工铝塑板";
|
||||
public static final String SIX_DAY="第六天-灯具安装、室内广告安装、冷柜安装、道具卸货";
|
||||
public static final String SEVEN_DAY="第七天-道具安装、室外招牌安装";
|
||||
public static final String EIGHT_DAY="第八天-卫生保洁、网络及收银设备安装、撤场交接";
|
||||
public static final String WITHDRAWAL="撤场";
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import com.cool.store.mapper.AcceptanceInfoMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午7:47
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Repository
|
||||
public class AcceptanceInfoDAO {
|
||||
@Resource
|
||||
private AcceptanceInfoMapper acceptanceInfoMapper;
|
||||
|
||||
public Long insertAcceptanceInfo(AcceptanceInfoDO acceptanceInfoDO){
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return null;
|
||||
}
|
||||
acceptanceInfoMapper.insert(acceptanceInfoDO);
|
||||
return acceptanceInfoDO.getId();
|
||||
}
|
||||
public List<AcceptanceInfoDO> selectAcceptanceInfo(){
|
||||
return acceptanceInfoMapper.selectShopIdListBySignatures();
|
||||
}
|
||||
public Integer updateAcceptanceInfo(AcceptanceInfoDO acceptanceInfoDO){
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return 0;
|
||||
}
|
||||
return acceptanceInfoMapper.updateByShopIDSelective(acceptanceInfoDO);
|
||||
}
|
||||
public AcceptanceInfoDO selectByShopId (Long shopId){
|
||||
if (Objects.isNull(shopId)){
|
||||
return null;
|
||||
}
|
||||
return acceptanceInfoMapper.selectByShopId(shopId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.mapper.AssessmentDataMapper;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午10:38
|
||||
* @Version 1.0
|
||||
* @注释: AssessmentDataDO
|
||||
*/
|
||||
@Repository
|
||||
public class AssessmentDataDAO {
|
||||
@Resource
|
||||
private AssessmentDataMapper assessmentDataMapper;
|
||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
||||
assessmentDataMapper.insert(assessmentDataDO);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
|
||||
return assessmentDataMapper.batchUpdate(assessmentDataDOS);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,24 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:根据shopid查询
|
||||
*/
|
||||
List<AcceptanceInfoDO> selectShopIdListBySignatures();
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:根据shopID修改
|
||||
*/
|
||||
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
|
||||
|
||||
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
|
||||
}
|
||||
@@ -1,7 +1,12 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
||||
Integer batchUpdate( List<AssessmentDataDO> AssessmentDataDOS);
|
||||
}
|
||||
@@ -68,12 +68,6 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
*/
|
||||
List<ShopInfoDO> getShopListByIds(@Param("shopIds")List<Long> shopIds);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
* @description:获取筹建阶段shopid
|
||||
*/
|
||||
List<Long> queryShopIdListByStage();
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
|
||||
@@ -20,4 +20,62 @@
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
<sql id="baseColumn">
|
||||
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
|
||||
</sql>
|
||||
<update id="updateByShopIDSelective">
|
||||
update xfsg_acceptance_info
|
||||
<set>
|
||||
<if test="actualEntryTime != null">
|
||||
actual_entry_time = #{actualEntryTime} ,
|
||||
</if>
|
||||
<if test="plannedCompletionTime != null">
|
||||
planned_completion_time = #{plannedCompletionTime} ,
|
||||
</if>
|
||||
<if test="plannedStartTime != null">
|
||||
planned_start_time = #{plannedStartTime} ,
|
||||
</if>
|
||||
<if test="decorationPlannedCompletionTime != null">
|
||||
decoration_planned_completion_time = #{decorationPlannedCompletionTime} ,
|
||||
</if>
|
||||
<if test="decorationPlannedStartTime != null">
|
||||
decoration_planned_start_time = #{decorationPlannedStartTime} ,
|
||||
</if>
|
||||
<if test="constructionCompletionTime != null">
|
||||
construction_completion_time = #{constructionCompletionTime} ,
|
||||
</if>
|
||||
<if test="engineeringAcceptanceSignatures != null">
|
||||
engineering_acceptance_signatures = #{engineeringAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="operationsAcceptanceSignatures != null">
|
||||
operations_acceptance_signatures = #{operationsAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="partnerAcceptanceSignatures != null">
|
||||
partner_acceptance_signatures = #{partnerAcceptanceSignatures} ,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime} ,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted} ,
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopId}
|
||||
</update>
|
||||
<select id="selectShopIdListBySignatures" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select <include refid="baseColumn"/>
|
||||
from xfsg_acceptance_info a
|
||||
left join join xfsg_shop_stage_info b on a.shop_id = b.shop_id
|
||||
where b.shop_sub_stage_status = 1200 and a.deleted = 0
|
||||
</select>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select
|
||||
<include refid="baseColumn"/>
|
||||
from xfsg_acceptance_info
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -14,4 +14,31 @@
|
||||
<result column="reason" jdbcType="VARCHAR" property="reason" />
|
||||
<result column="comments" jdbcType="VARCHAR" property="comments" />
|
||||
</resultMap>
|
||||
<update id="batchUpdate">
|
||||
update xfsg_assessment_data
|
||||
<set>
|
||||
qualified = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.qualified}
|
||||
</foreach>,
|
||||
score = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.score}
|
||||
</foreach>,
|
||||
reason = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.reason}
|
||||
</foreach>,
|
||||
comments = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.comments}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="addShopStageList" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
)
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -73,12 +73,7 @@
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<select id="queryShopIdListByStage" resultType="java.lang.Long">
|
||||
select id
|
||||
from xfsg_shop_info
|
||||
where shop_stage = 2
|
||||
and deleted = 0
|
||||
</select>
|
||||
|
||||
<select id="queryStoreNumeListByid" resultType="com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO">
|
||||
select id as shopId,store_num as storeNum
|
||||
from xfsg_shop_info
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dto.openPreparation;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
@@ -19,6 +20,7 @@ public class FirstOrderDTO {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("首批订货金总额")
|
||||
private String totalOrderDeposit;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("最晚打款时间")
|
||||
private Date latestPaymentDate;
|
||||
|
||||
@@ -34,7 +36,7 @@ public class FirstOrderDTO {
|
||||
@ApiModelProperty("更新人")
|
||||
private String updateUserId;
|
||||
|
||||
@ApiModelProperty("结果")
|
||||
private Integer resultType;
|
||||
@ApiModelProperty("订货金阶段状态,1500 待上传, 1505 带缴纳,1510 已完成")
|
||||
private Integer firstOrderSubStage;
|
||||
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ public class LinePaySubmitRequest {
|
||||
@ApiModelProperty("支付方式 1微信 2银行转账")
|
||||
private Integer payType;
|
||||
|
||||
@ApiModelProperty("付款人姓名")
|
||||
@ApiModelProperty("付款人姓名/加盟商姓名")
|
||||
private String payUserName;
|
||||
|
||||
@ApiModelProperty("付款账号")
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午11:35
|
||||
* @Version 1.0
|
||||
* @注释:三方验收
|
||||
*/
|
||||
@Data
|
||||
public class ThreeAcceptanceRequest {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("工程部验收签名 {pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String engineeringAcceptanceSignatures;
|
||||
@ApiModelProperty("营运部验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String operationsAcceptanceSignatures;
|
||||
@ApiModelProperty("加密商验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":0}")
|
||||
private String partnerAcceptanceSignatures;
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午11:51
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class ThreeAcceptanceResponse {
|
||||
|
||||
@ApiModelProperty("工程部验收签名 {pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String engineeringAcceptanceSignatures;
|
||||
@ApiModelProperty("营运部验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String operationsAcceptanceSignatures;
|
||||
@ApiModelProperty("加密商验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":0}")
|
||||
private String partnerAcceptanceSignatures;
|
||||
@ApiModelProperty("验收日期")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date acceptanceTime;
|
||||
@ApiModelProperty("验收结果")
|
||||
private Byte resultType;
|
||||
@ApiModelProperty("验收评语")
|
||||
private String acceptanceComments;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.cool.store.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午4:24
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class DecorationModelVO {
|
||||
@ApiModelProperty("支付状态 45:待缴费 50:已缴费 55缴费失败")
|
||||
private Integer payStatus;
|
||||
@ApiModelProperty("付款人姓名/加盟商姓名")
|
||||
private String payUserName;
|
||||
@ApiModelProperty("付款账号")
|
||||
private String payAccount;
|
||||
@ApiModelProperty("付款截图")
|
||||
private String payPic;
|
||||
@ApiModelProperty("支行名称")
|
||||
private String branchBankName;
|
||||
@ApiModelProperty("开户行名称")
|
||||
private String bankName;
|
||||
@ApiModelProperty("缴纳金额")
|
||||
private String amount;
|
||||
@ApiModelProperty("缴纳时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date payTime;
|
||||
@ApiModelProperty("上传时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
||||
@@ -4,7 +4,7 @@ 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 com.cool.store.vo.log.DesignLogVo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -42,6 +42,8 @@ public class OpeningOperationPlanVO {
|
||||
|
||||
@ApiModelProperty("提交人")
|
||||
private String submittedUserId;
|
||||
@ApiModelProperty("提交人名字")
|
||||
private String submittedUserName;
|
||||
|
||||
@ApiModelProperty("通过原因")
|
||||
private String passReason;
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.cool.store.vo.log;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/28/下午4:02
|
||||
* @Version 1.0
|
||||
* @注释:设计阶段跟踪日志
|
||||
*/
|
||||
@Data
|
||||
public class DesignLogVo {
|
||||
|
||||
private String logTime;
|
||||
private String name;
|
||||
private String description;
|
||||
private List<String> attachmentUrl;
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import io.swagger.models.auth.In;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午10:46
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface AssessmentDataService {
|
||||
Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS);
|
||||
|
||||
Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS);
|
||||
}
|
||||
@@ -2,8 +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.PartnerUserInfoVO;
|
||||
|
||||
@@ -16,12 +20,13 @@ import java.util.List;
|
||||
* @注释:
|
||||
*/
|
||||
public interface DecorationService {
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
* @description:获取装修阶段子阶段信息
|
||||
* @Date: 2024/4/29
|
||||
* @description:刷新
|
||||
*/
|
||||
List<DesignInfoVo> decorations();
|
||||
Boolean flush(Long shopId );
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
@@ -40,10 +45,35 @@ public interface DecorationService {
|
||||
* @description:提交装修款付款凭证
|
||||
*/
|
||||
String submitDecorationModel(LinePaySubmitRequest LinePaySubmitRequest, PartnerUserInfoVO partnerUserInfoVO);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:获得装修款信息
|
||||
*/
|
||||
DecorationModelVO getDecorationModel(Long shopId,PartnerUserInfoVO partnerUserInfoVO);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
* @description:施工阶段
|
||||
* @description:施工阶段下信息
|
||||
*/
|
||||
List<ConstructionScheduleDTO> getConstruction(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:获取施工阶段信息
|
||||
*/
|
||||
ConstructionScheduleDTO getConstructionInfo(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:提交三方验收
|
||||
*/
|
||||
Integer submitAcceptance(ThreeAcceptanceRequest request);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:查看三方验收
|
||||
*/
|
||||
ThreeAcceptanceResponse getThreeAcceptance(Long shopId);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,6 @@ public interface YlfService {
|
||||
* @Date: 2024/4/25
|
||||
* @description:项目列表
|
||||
*/
|
||||
ProjectDTO getProjectList(String shopCode);
|
||||
ProjectDTO getProjectList(String storeNum);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
import com.cool.store.dao.AssessmentDataDAO;
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import com.cool.store.service.AssessmentDataService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午10:47
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Service
|
||||
public class AssessmentDataServiceImpl implements AssessmentDataService {
|
||||
@Resource
|
||||
private AssessmentDataDAO assessmentDataDAO;
|
||||
@Override
|
||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
return assessmentDataDAO.batchInsert(assessmentDataDOS);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
return assessmentDataDAO.batchUpdate(assessmentDataDOS);
|
||||
}
|
||||
}
|
||||
@@ -2,15 +2,15 @@ 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.LineInfoDAO;
|
||||
import com.cool.store.dao.LinePayDAO;
|
||||
import com.cool.store.dao.RegionQrcodeConfigDao;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
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.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||
@@ -18,14 +18,19 @@ import com.cool.store.enums.point.PayTypeEnum;
|
||||
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;
|
||||
import com.cool.store.service.DecorationService;
|
||||
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.LinePayVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.log.DesignLogVo;
|
||||
|
||||
import org.apache.poi.ss.formula.functions.T;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
@@ -54,32 +59,37 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private LinePayService linePayService;
|
||||
private static String MEASURING_THE_ROOM = "量房";
|
||||
private static String CONSTRUCTION_DRAWING = "施工图+预算";
|
||||
|
||||
@Override
|
||||
public List<DesignInfoVo> decorations() {
|
||||
return Collections.emptyList();
|
||||
public Boolean flush(Long shopId) {
|
||||
//TODO
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesignInfoVo DesignInfo(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
List<DesignSchemeDTO> designScheme = decoration.getDesignScheme();
|
||||
|
||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
||||
dto -> dto));
|
||||
//量房
|
||||
ConstructionScheduleDTO measuringRoom = constructionScheduleMap.get(MEASURING_THE_ROOM);
|
||||
//施工图
|
||||
ConstructionScheduleDTO ConstructionDrawings = constructionScheduleMap.get(CONSTRUCTION_DRAWING);
|
||||
ConstructionScheduleDTO measuringRoom = constructionScheduleMap.get(CommonConstants.MEASURING_THE_ROOM);
|
||||
//施工图
|
||||
ConstructionScheduleDTO ConstructionDrawings = constructionScheduleMap.get(CommonConstants.CONSTRUCTION_DRAWING);
|
||||
//预算
|
||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
||||
Collections.sort(decoration.getProposedBookBudget(),(x1,x2)->x2.getId().compareTo(x1.getId()));
|
||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
||||
|
||||
DesignInfoVo designInfoVo = new DesignInfoVo();
|
||||
designInfoVo.setMeasuringRoom(measuringRoom);
|
||||
@@ -91,16 +101,19 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
|
||||
@Override
|
||||
public DecorationModelDTO DecorationModel(Long shopId) {
|
||||
if (shopId == null){
|
||||
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);
|
||||
//TODO 验证
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
//预算
|
||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
||||
Collections.sort(decoration.getProposedBookBudget(),(x1,x2)->x2.getId().compareTo(x1.getId()));
|
||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
||||
String totalAmount = proposedBookBudget.get(0).getTotalAmount();
|
||||
//支付二维码url
|
||||
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
||||
@@ -110,33 +123,119 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
decorationModelDTO.setTotalAmount(totalAmount);
|
||||
return decorationModelDTO;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String submitDecorationModel(LinePaySubmitRequest request, PartnerUserInfoVO partnerUserInfoVO) {
|
||||
DecorationDTO decoration = getDecorationDTO(request.getShopId());
|
||||
if ( decoration.getPayment() != null && decoration.getPayment().size()>0){
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
if (decoration.getPayment() != null && decoration.getPayment().size() > 0) {
|
||||
request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||
}else {
|
||||
} else {
|
||||
request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode());
|
||||
}
|
||||
|
||||
Long payId = linePayService.submitPayInfo(request, partnerUserInfoVO);
|
||||
return payId.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecorationModelVO getDecorationModel(Long shopId, PartnerUserInfoVO partnerUserInfoVO) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
Long lineId = shopInfo.getLineId();
|
||||
LinePayVO linePayInfo = linePayService.getLinePayInfo(lineId);
|
||||
if (Objects.isNull(linePayInfo)) {
|
||||
return null;
|
||||
}
|
||||
if (Objects.isNull(partnerUserInfoVO)) {
|
||||
partnerUserInfoVO = new PartnerUserInfoVO();
|
||||
BeanUtil.copyProperties(shopInfo, partnerUserInfoVO);
|
||||
}
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
||||
String totalAmount = proposedBookBudget.get(0).getTotalAmount();
|
||||
if (decoration.getPayment() != null && decoration.getPayment().size() > 0
|
||||
&& (byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue() == linePayInfo.getPayStatus()) {
|
||||
linePayInfo.setPayStatus((byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue());
|
||||
LinePaySubmitRequest submitRequest = new LinePaySubmitRequest();
|
||||
BeanUtil.copyProperties(linePayInfo, submitRequest);
|
||||
linePayService.submitPayInfo(submitRequest, partnerUserInfoVO);
|
||||
}
|
||||
DecorationModelVO decorationModelVO = new DecorationModelVO();
|
||||
BeanUtil.copyProperties(linePayInfo, decorationModelVO);
|
||||
decorationModelVO.setAmount(totalAmount);
|
||||
return decorationModelVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ConstructionScheduleDTO> getConstruction(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
||||
dto -> dto));
|
||||
constructionScheduleMap.remove(MEASURING_THE_ROOM);
|
||||
constructionScheduleMap.remove(CONSTRUCTION_DRAWING);
|
||||
List<ConstructionScheduleDTO> collect = constructionScheduleMap.values().stream().collect(Collectors.toList());
|
||||
collect.sort(Comparator.comparing(ConstructionScheduleDTO::getId));
|
||||
List<ConstructionScheduleDTO> collect = new ArrayList<>();
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.APPROACH));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.ONE_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.TWO_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.THREE_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.FOUR_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.FIVE_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.SIX_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.SEVEN_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.EIGHT_DAY));
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.WITHDRAWAL));
|
||||
collect.sort(Comparator.comparing(ConstructionScheduleDTO::getId));
|
||||
return collect;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConstructionScheduleDTO getConstructionInfo(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
if (decoration == null) {
|
||||
log.error("DecorationModel shopCode is null");
|
||||
return null;
|
||||
}
|
||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
||||
dto -> dto));
|
||||
ConstructionScheduleDTO constructionScheduleDTO = constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE);
|
||||
return constructionScheduleDTO;
|
||||
}
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public Integer submitAcceptance(ThreeAcceptanceRequest request) {
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
BeanUtil.copyProperties(request, acceptanceInfoDO);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
Integer flag = acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
if (flag != null && flag > 0) {
|
||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
||||
}
|
||||
return flag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ThreeAcceptanceResponse getThreeAcceptance(Long shopId) {
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
ThreeAcceptanceResponse response = new ThreeAcceptanceResponse();
|
||||
BeanUtil.copyProperties(acceptanceInfoDO, response);
|
||||
response.setAcceptanceTime(acceptanceInfoDO.getUpdateTime());
|
||||
return response;
|
||||
}
|
||||
|
||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||
List<Long> shopIds =new ArrayList<>();
|
||||
List<Long> shopIds = new ArrayList<>();
|
||||
shopIds.add(shopId);
|
||||
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIds);
|
||||
String storeNum = openPlanShopInfoDTOS.get(0).getStoreNum();
|
||||
|
||||
@@ -111,7 +111,7 @@ public class FirstOrderServiceImp implements FirstOrderService {
|
||||
FirstOrderDTO order = firstOrderDAO.selectFirstOrderByShopId(shopId);
|
||||
ShopStageInfoDO firstOrderStageInfo = shopStageInfoDAO.
|
||||
getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
|
||||
order.setResultType(firstOrderStageInfo.getShopSubStageStatus());
|
||||
order.setFirstOrderSubStage(firstOrderStageInfo.getShopSubStageStatus());
|
||||
return order;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.dto.openPreparation.OpeningOperationPlanDTO;
|
||||
import com.cool.store.dto.openPreparation.PlanLineDTO;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.EnterpriseUserDO;
|
||||
import com.cool.store.entity.OpeningOperationPlanDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
@@ -123,6 +124,8 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
String preparationUserIds = openingOperationPlanDO.getPreparationUserIds();
|
||||
List<String> stream = Arrays.stream(preparationUserIds.split(CommonConstants.COMMA)).collect(Collectors.toList());
|
||||
List<UserNameDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(stream);
|
||||
EnterpriseUserDO username = enterpriseUserDAO.getUserInfoById(openingOperationPlanDO.getSubmittedUserId());
|
||||
openingOperationPlanVO.setSubmittedUserName(username.getName());
|
||||
openingOperationPlanVO.setPreparationUsers(nameByUserId);
|
||||
return openingOperationPlanVO;
|
||||
}
|
||||
|
||||
@@ -4,6 +4,10 @@ import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.Preparation.PreparationDTO;
|
||||
import com.cool.store.dto.Preparation.ScheduleDTO;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationDTO;
|
||||
import com.cool.store.dto.decoration.ProjectDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
@@ -11,10 +15,7 @@ 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.PreparationRequest;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.RegionService;
|
||||
import com.cool.store.service.SysRoleService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
@@ -24,9 +25,13 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -36,8 +41,9 @@ import java.util.stream.Collectors;
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Service
|
||||
public class PreparationServiceImpl implements PreparationService {
|
||||
public class PreparationServiceImpl implements PreparationService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(PreparationServiceImpl.class);
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
@@ -53,18 +59,23 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
@Resource
|
||||
EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
LineInfoDAO lineInfoDAO;
|
||||
|
||||
LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Resource
|
||||
private YlfService ylfService;
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
|
||||
@Override
|
||||
public PageInfo<PreparationScheduleVO> getPreparationSchedule(PreparationRequest request) {
|
||||
if(!sysRoleService.checkIsAdmin(request.getCurUserId())){
|
||||
if (!sysRoleService.checkIsAdmin(request.getCurUserId())) {
|
||||
request.setAuthRegionIds(userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(request.getCurUserId()));
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(request.getRegionIds())){
|
||||
if(request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)){
|
||||
if (CollectionUtils.isNotEmpty(request.getRegionIds())) {
|
||||
if (request.getRegionIds().contains(CommonConstants.ROOT_DEPT_ID_STR)) {
|
||||
request.setRegionIds(null);
|
||||
}else{
|
||||
} else {
|
||||
request.setRegionIds(regionService.getSubRegionIdsByRegionIds(request.getRegionIds()));
|
||||
}
|
||||
}
|
||||
@@ -79,13 +90,13 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
Map<Long, ShopStageInfoDO> shopStageInfoDOMap = shopContractActualCompletionTime.stream().collect(Collectors.toMap(ShopStageInfoDO::getShopId, x -> x));
|
||||
List<Long> regionIds = preparationDTOS.stream().map(PreparationDTO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
Set<String> userIds = preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getShopManagerUserId())).map(PreparationDTO::getShopManagerUserId).collect(Collectors.toSet());
|
||||
userIds.addAll(preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getInvestmentManager())).map(PreparationDTO::getInvestmentManager).collect(Collectors.toSet()));
|
||||
userIds.addAll(preparationDTOS.stream().filter(x->StringUtils.isNotEmpty(x.getSupervisorUserId())).map(PreparationDTO::getSupervisorUserId).collect(Collectors.toSet()));
|
||||
Set<String> userIds = preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getShopManagerUserId())).map(PreparationDTO::getShopManagerUserId).collect(Collectors.toSet());
|
||||
userIds.addAll(preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getInvestmentManager())).map(PreparationDTO::getInvestmentManager).collect(Collectors.toSet()));
|
||||
userIds.addAll(preparationDTOS.stream().filter(x -> StringUtils.isNotEmpty(x.getSupervisorUserId())).map(PreparationDTO::getSupervisorUserId).collect(Collectors.toSet()));
|
||||
Map<String, EnterpriseUserDO> userInfoMap = enterpriseUserDAO.getUserInfoMap(new ArrayList<>(userIds));
|
||||
|
||||
List<PreparationScheduleVO> preparationScheduleVOS = new ArrayList<>();
|
||||
preparationDTOS.forEach(x->{
|
||||
preparationDTOS.forEach(x -> {
|
||||
PreparationScheduleVO preparationScheduleVO = new PreparationScheduleVO();
|
||||
preparationScheduleVO.setMobile(x.getMobile());
|
||||
preparationScheduleVO.setUsername(x.getUsername());
|
||||
@@ -102,7 +113,7 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
preparationScheduleVO.setCompletionColumn(dto.getCompletionColumn());
|
||||
preparationScheduleVO.setTotalColumn(dto.getTotalColumn());
|
||||
ShopStageInfoDO stageInfoDO = shopStageInfoDOMap.getOrDefault(x.getId(), new ShopStageInfoDO());
|
||||
if (StringUtils.isNotEmpty(stageInfoDO.getActualCompleteTime())){
|
||||
if (StringUtils.isNotEmpty(stageInfoDO.getActualCompleteTime())) {
|
||||
preparationScheduleVO.setContractCompletionTime(DateUtils.strToDate(stageInfoDO.getActualCompleteTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
}
|
||||
preparationScheduleVO.setDays();
|
||||
@@ -115,7 +126,7 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
@Override
|
||||
public PreparationScheduleDetailVO getPreparationDetail(Long shopId) {
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (shopInfo == null){
|
||||
if (shopInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_IS_NULL);
|
||||
}
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
@@ -124,10 +135,10 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
PreparationScheduleDetailVO preparationScheduleDetailVO = new PreparationScheduleDetailVO();
|
||||
List<ShopStageInfoDO> shop = shopStageInfoDAO.getShopContractActualCompletionTime(Collections.singletonList(shopId));
|
||||
Set<Object> userSet = new HashSet<>();
|
||||
if (StringUtils.isNotEmpty(lineInfo.getInvestmentManager())){
|
||||
if (StringUtils.isNotEmpty(lineInfo.getInvestmentManager())) {
|
||||
userSet.add(lineInfo.getInvestmentManager());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(lineInfo.getDevelopmentManager())){
|
||||
if (StringUtils.isNotEmpty(lineInfo.getDevelopmentManager())) {
|
||||
userSet.add(lineInfo.getDevelopmentManager());
|
||||
}
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(Collections.singletonList(shopInfo.getRegionId()));
|
||||
@@ -140,13 +151,13 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
preparationScheduleDetailVO.setPlanOpenTime(shopInfo.getPlanOpenTime());
|
||||
preparationScheduleDetailVO.setStoreNum(shopInfo.getStoreNum());
|
||||
preparationScheduleDetailVO.setJoinStatus(lineInfo.getJoinStatus());
|
||||
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)){
|
||||
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)) {
|
||||
ScheduleDTO scheduleDTO = shopContractActualCompletionTime.get(CommonConstants.ZERO);
|
||||
preparationScheduleDetailVO.setCompletionColumn(scheduleDTO.getCompletionColumn());
|
||||
preparationScheduleDetailVO.setTotalColumn(scheduleDTO.getTotalColumn());
|
||||
preparationScheduleDetailVO.setPlanCompletionTime(scheduleDTO.getPlanCompleteTime());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(shop)){
|
||||
if (CollectionUtils.isNotEmpty(shop)) {
|
||||
ShopStageInfoDO shopStageInfoDO = shop.get(CommonConstants.ZERO);
|
||||
preparationScheduleDetailVO.setContractCompletionTime(DateUtils.strToDate(shopStageInfoDO.getActualCompleteTime(), DateUtils.YYYY_MM_DD_HH_MM_SS));
|
||||
}
|
||||
@@ -164,13 +175,13 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
@Override
|
||||
public void contractAndBuildStoreCompletion(Long shopId) {
|
||||
List<ShopStageInfoDO> shopStageInfo = shopStageInfoDAO.getShopStageInfo(shopId, null);
|
||||
if (CollectionUtils.isNotEmpty(shopStageInfo)){
|
||||
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());
|
||||
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){
|
||||
if (buildStoreCompletionFlag && contractCompletionFlag) {
|
||||
//初始化后续流程数据 设计阶段 装修阶段 开业运营方案 首批订货清单
|
||||
List<ShopStageInfoDO> list = new ArrayList<>();
|
||||
ShopStageInfoDO data1 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
||||
@@ -179,6 +190,11 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
ShopStageInfoDO data2 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||
data2.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus());
|
||||
list.add(data2);
|
||||
//初始化xfsg_acceptance_info表
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(shopId);
|
||||
acceptanceInfoDO.setCreateTime(new Date());
|
||||
acceptanceInfoDAO.insertAcceptanceInfo(acceptanceInfoDO);
|
||||
ShopStageInfoDO data3 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_14.getShopSubStage());
|
||||
data3.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_140.getShopSubStageStatus());
|
||||
list.add(data3);
|
||||
@@ -190,12 +206,11 @@ public class PreparationServiceImpl implements PreparationService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void whetherToOpenForAcceptance(Long shopId) {
|
||||
Integer allCompletionCount = shopStageInfoDAO.getAllCompletionCount(shopId);
|
||||
//如果等于6 表示前面阶段都已经完成 初始化开业验收数据
|
||||
if (allCompletionCount.equals(CommonConstants.SIX)){
|
||||
if (allCompletionCount.equals(CommonConstants.SIX)) {
|
||||
OpenAcceptanceInfoDO openAcceptanceInfoDO = new OpenAcceptanceInfoDO();
|
||||
openAcceptanceInfoDO.setShopId(shopId);
|
||||
openAcceptanceInfoDO.setAcceptanceStatus(CommonConstants.ZERO);
|
||||
|
||||
@@ -60,12 +60,12 @@ public class YlfServiceImpl implements YlfService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProjectDTO getProjectList(String shopCode) {
|
||||
log.info("getProjectList param:{}", shopCode);
|
||||
if (Objects.isNull(shopCode)) {
|
||||
public ProjectDTO getProjectList(String storeNum) {
|
||||
log.info("getProjectList param:{}", storeNum);
|
||||
if (Objects.isNull(storeNum)) {
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||
}
|
||||
String url = String.format(Constants.GET_PROJECT_LIST, shopCode);
|
||||
String url = String.format(Constants.GET_PROJECT_LIST, storeNum);
|
||||
log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}", url);
|
||||
try {
|
||||
String jsonString = httpRestTemplateService.getForObject(url, String.class, new HashMap<>());
|
||||
@@ -82,7 +82,7 @@ public class YlfServiceImpl implements YlfService {
|
||||
return rows.get(0);
|
||||
}
|
||||
} else {
|
||||
log.info("获取云立方装修公司信息失败,shopCode:{}", shopCode);
|
||||
log.info("获取云立方装修公司信息失败,shopCode:{}", storeNum);
|
||||
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,13 @@ 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.PartnerUserInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
@@ -34,6 +37,10 @@ import java.util.List;
|
||||
public class PCDecorationController {
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(decorationService.flush(shopId));
|
||||
}
|
||||
@ApiModelProperty("获取设计阶段信息")
|
||||
@GetMapping("/design")
|
||||
public ResponseResult<DesignInfoVo> get(@RequestParam Long shopId){
|
||||
@@ -45,4 +52,15 @@ public class PCDecorationController {
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstruction(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息")
|
||||
@GetMapping("/getDecorationModelInfo")
|
||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||
PartnerUserInfoVO user = null;
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiModelProperty("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,9 +3,13 @@ package com.cool.store.controller.webc;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
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.DecorationService;
|
||||
import com.cool.store.vo.DecorationModelVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.sun.xml.bind.v2.TODO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -29,13 +33,30 @@ public class MiniDecorationController {
|
||||
@PostMapping("/submitDecorationModel")
|
||||
public ResponseResult submitDecorationModel(@RequestBody LinePaySubmitRequest linePaySubmitRequest){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
//TODO
|
||||
user.setPartnerId("61bf57dc65334885802a278835f499d0");
|
||||
decorationService.submitDecorationModel(linePaySubmitRequest, user);
|
||||
return ResponseResult.success();
|
||||
return ResponseResult.success(decorationService.submitDecorationModel(linePaySubmitRequest, user));
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息,和二维码")
|
||||
@GetMapping("/getDecorationModel")
|
||||
public ResponseResult<DecorationModelDTO> getDecorationModel(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.DecorationModel(shopId)) ;
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息")
|
||||
@GetMapping("/getDecorationModelInfo")
|
||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
user.setPartnerId("61bf57dc65334885802a278835f499d0");
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiModelProperty("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Integer> submitThreeAcceptance(@RequestParam ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request));
|
||||
}
|
||||
@ApiModelProperty("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.*;
|
||||
import com.cool.store.vo.OpeningOperationPlanVO;
|
||||
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.GetMapping;
|
||||
@@ -30,7 +31,7 @@ import javax.annotation.Resource;
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/OpenPreparation")
|
||||
@RequestMapping("/mini/openPreparation")
|
||||
@Api(tags = "mini开业筹备")
|
||||
@Slf4j
|
||||
public class MiniOpenPreparationController {
|
||||
@@ -65,6 +66,7 @@ public class MiniOpenPreparationController {
|
||||
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(firstOrderService.getOrder(shopId));
|
||||
}
|
||||
@ApiModelProperty("刷新")
|
||||
@GetMapping("/firstOrder/flush")
|
||||
public ResponseResult<FirstOrderDTO> flush(@RequestParam Long shopId) {
|
||||
return ResponseResult.success( firstOrderService.flush(shopId));
|
||||
|
||||
@@ -2,19 +2,26 @@ package com.cool.store.job;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||
import com.cool.store.entity.LineInterviewDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.utils.poi.constant.Constants;
|
||||
import com.github.pagehelper.Page;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.xxl.job.core.context.XxlJobHelper;
|
||||
import com.xxl.job.core.handler.annotation.XxlJob;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -23,10 +30,9 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
@@ -54,6 +60,11 @@ public class XxlJobHandler {
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
@Resource
|
||||
private AcceptanceInfoDAO acceptanceInfoDAO;
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
|
||||
/**
|
||||
* 每天都将待体验门店信息变更到体验中
|
||||
*/
|
||||
@@ -90,6 +101,7 @@ public class XxlJobHandler {
|
||||
lineInterviewDAO.batchUpdateInterviewStatus(interviewIds, InterviewStatusEnum.WAIT_AUDIT);
|
||||
XxlJobHelper.handleSuccess();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/25
|
||||
@@ -97,13 +109,13 @@ public class XxlJobHandler {
|
||||
*/
|
||||
@XxlJob("updateFirstOrder")
|
||||
public void updateFirstOrder() {
|
||||
boolean hasNext =true;
|
||||
boolean hasNext = true;
|
||||
int PageNum = 1;
|
||||
int PageSize = 50;
|
||||
|
||||
while(hasNext){
|
||||
while (hasNext) {
|
||||
log.info("----查询更新订货金----");
|
||||
Page<Long> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(PageNum,PageSize);
|
||||
Page<Long> shopIdListByStageStatus = shopStageInfoDAO.getShopIdListByStageStatus(PageNum, PageSize);
|
||||
if (CollectionUtils.isEmpty(shopIdListByStageStatus)) {
|
||||
log.info("------今日没有待更新数据------");
|
||||
return;
|
||||
@@ -111,20 +123,20 @@ public class XxlJobHandler {
|
||||
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIdListByStageStatus);
|
||||
Map<Long, String> map = openPlanShopInfoDTOS.stream().
|
||||
collect(Collectors.toMap(OpenPlanShopInfoDTO::getShopId, OpenPlanShopInfoDTO::getStoreNum));
|
||||
for (Long shopId : map.keySet()){
|
||||
for (Long shopId : map.keySet()) {
|
||||
String shopCode = map.get(shopId);
|
||||
try {
|
||||
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
||||
|
||||
if (firstOrder == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||
}
|
||||
if (firstOrder.equals(Boolean.TRUE)) {
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
|
||||
preparationService.whetherToOpenForAcceptance(shopId);
|
||||
}
|
||||
}catch (Exception e) {
|
||||
log.error("获取鲜丰订货金异常",e);
|
||||
} catch (Exception e) {
|
||||
log.error("获取鲜丰订货金异常", e);
|
||||
}
|
||||
}
|
||||
hasNext = shopIdListByStageStatus.size() >= PageSize;
|
||||
@@ -134,4 +146,81 @@ public class XxlJobHandler {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description: 每天更新装修阶段进场时间等,至预约状态
|
||||
*/
|
||||
@XxlJob("acceptanceInfo")
|
||||
public void AcceptanceInfoDO() {
|
||||
boolean hasNext = true;
|
||||
int PageNum = 1;
|
||||
int PageSize = 50;
|
||||
|
||||
while (hasNext) {
|
||||
log.info("----每天更新装修阶段进场时间等,至预约状态----");
|
||||
PageHelper.startPage(PageNum, PageSize);
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = acceptanceInfoDAO.selectAcceptanceInfo();
|
||||
if (CollectionUtils.isEmpty(acceptanceInfoDOS)) {
|
||||
log.info("------今日没有待更新数据------");
|
||||
return;
|
||||
}
|
||||
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOS) {
|
||||
Long shopId = acceptanceInfoDO.getShopId();
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
ConstructionScheduleDTO constructionInfo = decorationService.getConstructionInfo(shopId);
|
||||
List<ConstructionScheduleDTO> construction = decorationService.getConstruction(shopId);
|
||||
//施工完成时间
|
||||
if (Objects.nonNull(constructionInfo) && !StringUtils.isNull(constructionInfo.getPlanEndDate())
|
||||
&& Objects.isNull(acceptanceInfoDO.getConstructionCompletionTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date constructionEndTime = sdf.parse(constructionInfo.getPlanEndDate());
|
||||
acceptanceInfoDO.setConstructionCompletionTime(constructionEndTime);
|
||||
} catch (ParseException e) {
|
||||
log.error("初始化acceptanceInfo,鲜丰服务施工完成时间日期转化异常");
|
||||
}
|
||||
}
|
||||
//进场时间
|
||||
if (Objects.nonNull(construction) && !StringUtils.isNull(construction.get(0).getActualBeginDate())
|
||||
&& Objects.isNull(acceptanceInfoDO.getActualEntryTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
try {
|
||||
Date constructionBeginTime = sdf.parse(construction.get(0).getActualBeginDate());
|
||||
acceptanceInfoDO.setActualEntryTime(constructionBeginTime);
|
||||
} catch (ParseException e) {
|
||||
log.error("初始化acceptanceInfo,鲜丰服务进场时间日期转化异常");
|
||||
}
|
||||
}
|
||||
//进场时间+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);
|
||||
}
|
||||
}
|
||||
}
|
||||
acceptanceInfoDAO.insertAcceptanceInfo(acceptanceInfoDO);
|
||||
//TODO 短信通知
|
||||
}
|
||||
hasNext = acceptanceInfoDOS.size() >= PageSize;
|
||||
PageNum++;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user