三方验收
This commit is contained in:
@@ -188,8 +188,9 @@ public enum ErrorCodeEnum {
|
||||
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),
|
||||
|
||||
YLF_ERROR(110001, "云立方接口异常!", null),
|
||||
|
||||
|
||||
//装修
|
||||
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
|
||||
CHECK_ITEM(12002,"插入检查项失败",null)
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.entity.AcceptanceInfoDO;
|
||||
import com.cool.store.mapper.AcceptanceInfoMapper;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -27,12 +28,12 @@ public class AcceptanceInfoDAO {
|
||||
acceptanceInfoMapper.insert(acceptanceInfoDO);
|
||||
return acceptanceInfoDO.getId();
|
||||
}
|
||||
public List<AcceptanceInfoDO> selectAcceptanceInfo(){
|
||||
return acceptanceInfoMapper.selectShopIdListBySignatures();
|
||||
public List<AcceptanceInfoDO> selectAcceptanceInfoBySignatures(Integer status){
|
||||
return acceptanceInfoMapper.selectShopIdListBySignatures(status);
|
||||
}
|
||||
public Integer updateAcceptanceInfo(AcceptanceInfoDO acceptanceInfoDO){
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return 0;
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return acceptanceInfoMapper.updateByShopIDSelective(acceptanceInfoDO);
|
||||
}
|
||||
|
||||
@@ -22,9 +22,9 @@ public class AssessmentDataDAO {
|
||||
private AssessmentDataMapper assessmentDataMapper;
|
||||
|
||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
if (CollectionUtils.isNotEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
||||
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
||||
assessmentDataMapper.insert(assessmentDataDO);
|
||||
assessmentDataMapper.insertSelective(assessmentDataDO);
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Lists;
|
||||
import io.swagger.models.auth.In;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -92,7 +93,17 @@ public class ShopStageInfoDAO {
|
||||
}
|
||||
return shopStageInfoMapper.getAllCompletionCount(shopId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:更新完成时间byshopId
|
||||
*/
|
||||
public Integer updateByShopId( ShopStageInfoDO shopStageInfoDO){
|
||||
if (Objects.isNull(shopStageInfoDO)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return shopStageInfoMapper.updateByShopId(shopStageInfoDO);
|
||||
}
|
||||
/**
|
||||
* 获取子阶段信息
|
||||
* @param shopId
|
||||
@@ -204,4 +215,13 @@ public class ShopStageInfoDAO {
|
||||
}
|
||||
return shopStageInfoMapper.getCanSubmitRentContractShopIds(shopIds);
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/5
|
||||
* @description:获取施工阶段未完成的店铺
|
||||
*/
|
||||
public List<Long> getShopContractIncompletion(){
|
||||
return shopStageInfoMapper.getShopContractIncompletion();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,9 +10,9 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:根据shopid查询
|
||||
* @description:三方验收g根据阶段状态
|
||||
*/
|
||||
List<AcceptanceInfoDO> selectShopIdListBySignatures();
|
||||
List<AcceptanceInfoDO> selectShopIdListBySignatures(Integer status);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
@@ -21,4 +21,10 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
||||
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
|
||||
|
||||
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:查询进场时间为空的数据
|
||||
*/
|
||||
List<AcceptanceInfoDO> selectListByActualEntryTime();
|
||||
}
|
||||
@@ -17,7 +17,7 @@ public interface LineInfoMapper extends Mapper<LineInfoDO> {
|
||||
LineInfoDO getByPartnerId(@Param("partnerId") String partnerId);
|
||||
|
||||
LineInfoDO getByLineId(@Param("lineId") Long lineId);
|
||||
|
||||
List<LineInfoDO> getByLineIds(@Param("lineIds") List<Long> lineIds);
|
||||
/**
|
||||
* 查询招商经理待处理数据
|
||||
* @param investmentManagerUserId
|
||||
|
||||
@@ -19,6 +19,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 批量新增
|
||||
*
|
||||
* @param shopInfoList
|
||||
* @return
|
||||
*/
|
||||
@@ -26,6 +27,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 获取加盟商的店铺列表
|
||||
*
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
@@ -33,6 +35,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 门店占铺位
|
||||
*
|
||||
* @param unSelectShopIds
|
||||
* @param pointId
|
||||
* @return
|
||||
@@ -41,6 +44,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 店铺信息
|
||||
*
|
||||
* @param lineId
|
||||
* @param pointId
|
||||
* @return
|
||||
@@ -49,6 +53,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 获取各个阶段店铺数量
|
||||
*
|
||||
* @param lineId
|
||||
* @return
|
||||
*/
|
||||
@@ -56,6 +61,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 解绑店铺
|
||||
*
|
||||
* @param shopId
|
||||
* @return
|
||||
*/
|
||||
@@ -63,10 +69,11 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
/**
|
||||
* 批量获取铺位
|
||||
*
|
||||
* @param shopIds
|
||||
* @return
|
||||
*/
|
||||
List<ShopInfoDO> getShopListByIds(@Param("shopIds")List<Long> shopIds);
|
||||
List<ShopInfoDO> getShopListByIds(@Param("shopIds") List<Long> shopIds);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
@@ -82,4 +89,11 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
|
||||
Long getRegionIdByid(@Param("shopId") Long shopId);
|
||||
|
||||
ShopInfoDO selectByStoreNum(@Param("storeNum") String storeNum);}
|
||||
ShopInfoDO selectByStoreNum(@Param("storeNum") String storeNum);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:根据区域id查询所有处于装修验收阶段的店铺
|
||||
*/
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("status")Integer status);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,12 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
ShopStageInfoDO getShopSubStageInfo(@Param("shopId") Long shopId, @Param("shopSubStage") Integer shopSubStage);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:更新完成时间byshopId
|
||||
*/
|
||||
Integer updateByShopId(@Param("shopStageInfoDO") ShopStageInfoDO shopStageInfoDO);
|
||||
/**
|
||||
* 更新阶段到未开始状态
|
||||
* @param shopId
|
||||
@@ -112,4 +117,11 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
* @return
|
||||
*/
|
||||
List<Long> getCanSubmitRentContractShopIds(@Param("shopIds") List<Long> shopIds);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/5
|
||||
* @description:获取施工阶段未完成的店铺
|
||||
*/
|
||||
List<Long> getShopContractIncompletion();
|
||||
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
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
|
||||
where b.shop_sub_stage_status = #{status} and a.deleted = 0
|
||||
</select>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select
|
||||
@@ -77,5 +77,11 @@
|
||||
from xfsg_acceptance_info
|
||||
where shop_id = #{shopId}
|
||||
</select>
|
||||
<select id="selectListByActualEntryTime" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select
|
||||
<include refid="baseColumn"/>
|
||||
from xfsg_acceptance_info
|
||||
where actual_entry_time is null
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -492,6 +492,17 @@
|
||||
</if>
|
||||
|
||||
</select>
|
||||
<select id="getByLineIds" resultType="com.cool.store.entity.LineInfoDO">
|
||||
select *
|
||||
from xfsg_line_info
|
||||
where deleted = 0
|
||||
<if test="lineIds !=null and lineIds.size()>0">
|
||||
and id in
|
||||
<foreach collection="lineIds" item="lineId" open="(" separator="," close=")" >
|
||||
#{lineId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -155,6 +155,25 @@
|
||||
from xfsg_shop_info
|
||||
where store_num = #{storeNum}
|
||||
</select>
|
||||
<select id="selectShopListByRegionId" resultType="com.cool.store.entity.ShopInfoDO">
|
||||
select
|
||||
xsi.id,xsi.line_id as lineId,xsi.region_id as regionId,xsi.shop_name as shopName,xsi.store_num as storeNum
|
||||
from xfsg_shop_info xsi
|
||||
join xfsg_shop_stage_info xssi on xssi.shop_id = xsi.id
|
||||
where
|
||||
xsi.deleted = 0
|
||||
<if test="regionIds != null and regionIds.size() > 0">
|
||||
and xsi.region_id in
|
||||
<foreach collection="regionIds" item="regionId" index="index" open="(" separator="," close=")">
|
||||
#{regionId}
|
||||
</foreach>
|
||||
</if>
|
||||
AND xssi.shop_sub_stage_status != -100
|
||||
and xssi.shop_sub_stage in (120,130)
|
||||
<if test="status != null">
|
||||
and xssi.shop_sub_stage_status = #{status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -135,7 +135,20 @@
|
||||
where
|
||||
shop_id = #{shopId} and shop_sub_stage = #{shopSubStage}
|
||||
</update>
|
||||
|
||||
<update id="updateByShopId">
|
||||
update xfsg_shop_stage_info
|
||||
<set>
|
||||
<if test="shopStageInfoDO.planCompleteTime">
|
||||
plan_complete_time = #{shopStageInfoDO.planCompleteTime},
|
||||
</if>
|
||||
<if test="shopStageInfoDO.actualCompleteTime">
|
||||
actual_complete_time = #{shopStageInfoDO.actualCompleteTime},
|
||||
</if>
|
||||
</set>
|
||||
where shop_id = #{shopStageInfoDO.shopId}
|
||||
|
||||
</update>
|
||||
|
||||
<select id="getRentContractToDoPage" resultType="com.cool.store.vo.shop.RentInfoToDoVO">
|
||||
select
|
||||
b.id as lineId,
|
||||
@@ -193,5 +206,15 @@
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</select>
|
||||
<select id="getShopContractIncompletion" resultType="java.lang.Long">
|
||||
SELECT
|
||||
shop_id
|
||||
FROM
|
||||
xfsg_shop_stage_info
|
||||
WHERE
|
||||
shop_sub_stage = 110
|
||||
AND (shop_sub_stage_status = 1100 OR shop_sub_stage_status = 1110)
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -19,10 +19,10 @@ public class ShopAuditInfoDO {
|
||||
private Long shopId;
|
||||
|
||||
/**
|
||||
* 0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批
|
||||
* '0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批 4-系统建店5-三方验收
|
||||
*/
|
||||
@Column(name = "audit_type")
|
||||
@ApiModelProperty("0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批")
|
||||
@ApiModelProperty("'0-视觉验收 1-培训登记审批 2-开业运营方案 3-证照审批 4-系统建店5-三方验收")
|
||||
private Integer auditType;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/03/下午7:30
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BookingAcceptanceRequest {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("预约验收实际")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date bookingAcceptanceTime;
|
||||
}
|
||||
@@ -1,8 +1,11 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.AssessmentDataDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/29/下午11:35
|
||||
@@ -14,8 +17,22 @@ public class ThreeAcceptanceRequest {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("工程部验收签名 {pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String engineeringAcceptanceSignatures;
|
||||
@ApiModelProperty("工程部验收评语")
|
||||
private String engineeringComments;
|
||||
@ApiModelProperty("0通过,1不通过")
|
||||
private Integer engineeringResultType;
|
||||
@ApiModelProperty("营运部验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":1}")
|
||||
private String operationsAcceptanceSignatures;
|
||||
@ApiModelProperty("加密商验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":0}")
|
||||
@ApiModelProperty("营运部验收评语")
|
||||
private String operationsComments;
|
||||
@ApiModelProperty("0通过,1不通过")
|
||||
private Integer operationsResultType;
|
||||
@ApiModelProperty("加盟商验收签名 {\"pic\":\"\",\"acceptanceTime\":\"\",\"result\":\"\",\"remark\":\"\",\"status\":0}")
|
||||
private String partnerAcceptanceSignatures;
|
||||
@ApiModelProperty("加盟商验收评语")
|
||||
private String partnerComments;
|
||||
@ApiModelProperty("0通过,1不通过")
|
||||
private Integer partnerResultType;
|
||||
@ApiModelProperty("检查项")
|
||||
private List<AssessmentDataDO> assessmentDataDOS;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.shop.ShopStageInfoVO;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/03/下午1:03
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class FitmentResponse {
|
||||
private Long shopId;
|
||||
private List<DecorationStageVO> stageInfoList;
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import java.util.Date;
|
||||
@Data
|
||||
public class DecorationModelVO {
|
||||
@ApiModelProperty("支付状态 45:待缴费 50:已缴费 55缴费失败")
|
||||
private Integer payStatus;
|
||||
private Byte payStatus;
|
||||
@ApiModelProperty("付款人姓名/加盟商姓名")
|
||||
private String payUserName;
|
||||
@ApiModelProperty("付款账号")
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.cool.store.vo.Fitment;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
import java.util.Date;
|
||||
|
||||
@@ -12,10 +13,20 @@ import java.util.Date;
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class DecorationModeStageVO {
|
||||
public class DecorationStageVO {
|
||||
@ApiModelProperty("阶段name")
|
||||
private String shopSubStageName;
|
||||
@ApiModelProperty("店铺子阶段")
|
||||
private Integer shopSubStage;
|
||||
@ApiModelProperty("装修阶段状态")
|
||||
private Integer shopSubStageStatus;
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date creatTime;
|
||||
@ApiModelProperty("计划开始时间")
|
||||
private String planBeginTime;
|
||||
@ApiModelProperty("计划结束时间")
|
||||
private String planEndTime;
|
||||
@ApiModelProperty("实际完成时间")
|
||||
private String actualCompleteTime;
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
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/05/03/下午3:21
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class fitmentCheckVO {
|
||||
private Long shopId;
|
||||
private Long lineId;
|
||||
private String shopName;
|
||||
private String storeNum;
|
||||
@ApiModelProperty("加盟商姓名")
|
||||
private String partnerName;
|
||||
@ApiModelProperty("所属战区id")
|
||||
private Long regionId;
|
||||
@ApiModelProperty("所属战区")
|
||||
private String region;
|
||||
@ApiModelProperty("招商经理id")
|
||||
private String investmentManagerId;
|
||||
@ApiModelProperty("招商经理")
|
||||
private String investmentManager;
|
||||
@ApiModelProperty("门店选址人id")
|
||||
private String sitterId;
|
||||
@ApiModelProperty("门店选址人姓名")
|
||||
private String sitterName;
|
||||
@ApiModelProperty("战区经理id")
|
||||
private String fightManagerId;
|
||||
@ApiModelProperty("战区经理")
|
||||
private String fightManager;
|
||||
@ApiModelProperty("计划完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planEndTime;
|
||||
@ApiModelProperty("实际完成时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date actualEndTime;
|
||||
@ApiModelProperty("计划验收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date planAcceptanceTime;
|
||||
@ApiModelProperty("实际验收时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date acceptanceTime;
|
||||
@ApiModelProperty("验收状态:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
||||
private Integer shopSubStageStatus;
|
||||
}
|
||||
@@ -1,14 +1,19 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.vo.Fitment.DecorationModeStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.fitmentCheckVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -26,10 +31,17 @@ public interface DecorationService {
|
||||
* @description:刷新
|
||||
*/
|
||||
Boolean flush(Long shopId );
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:获取新店装修下阶段的数据
|
||||
*/
|
||||
FitmentResponse getFitmentSub(Long shopId);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
* @description:设计阶段信息
|
||||
* @description:获取设计阶段子阶段信息
|
||||
*/
|
||||
DesignInfoVo DesignInfo(Long shopId);
|
||||
/**
|
||||
@@ -37,7 +49,7 @@ public interface DecorationService {
|
||||
* @Date: 2024/4/30
|
||||
* @description:获取装修款阶段信息
|
||||
*/
|
||||
DecorationModeStageVO getDecorationModeStage(Long shopId);
|
||||
DecorationStageVO getDecorationGoldStage(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
@@ -60,7 +72,7 @@ public interface DecorationService {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/28
|
||||
* @description:施工阶段下信息
|
||||
* @description:施工阶段下的信息
|
||||
*/
|
||||
List<ConstructionScheduleDTO> getConstruction(Long shopId);
|
||||
/**
|
||||
@@ -74,11 +86,24 @@ public interface DecorationService {
|
||||
* @Date: 2024/4/29
|
||||
* @description:提交三方验收
|
||||
*/
|
||||
Integer submitAcceptance(ThreeAcceptanceRequest request);
|
||||
Boolean submitAcceptance(ThreeAcceptanceRequest request,PartnerUserInfoVO minUser, LoginUserInfo pcUser );
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:预约验收
|
||||
*/
|
||||
Boolean bookingAcceptance(BookingAcceptanceRequest response);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/4/29
|
||||
* @description:查看三方验收
|
||||
*/
|
||||
ThreeAcceptanceResponse getThreeAcceptance(Long shopId);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:获取验收列表
|
||||
*/
|
||||
PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user,Integer pageNum,Integer pageSize);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,42 +1,46 @@
|
||||
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.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
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.ShopInfoDO;
|
||||
import com.cool.store.entity.ShopStageInfoDO;
|
||||
import com.cool.store.enums.ConstructionPhaseEnum;
|
||||
import com.cool.store.enums.DesignPhaseEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||
import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.*;
|
||||
import com.cool.store.enums.point.ShopStageEnum;
|
||||
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.ShopInfoMapper;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
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.service.*;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
import com.cool.store.vo.Fitment.DecorationModeStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
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 com.cool.store.vo.fitmentCheckVO;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.atomic.AtomicInteger;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -53,8 +57,16 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(DecorationServiceImpl.class);
|
||||
@Resource
|
||||
private ShopAuditInfoDAO shopAuditInfoDAO;
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
private YlfService ylfService;
|
||||
@Resource
|
||||
private LineInfoMapper lineInfoMapper;
|
||||
@Resource
|
||||
private RegionQrcodeConfigDao regionQrcodeConfigDao;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@@ -66,6 +78,12 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
private LinePayService linePayService;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private AssessmentDataService assessmentDataService;
|
||||
@Resource
|
||||
private UserAuthMappingService userAuthMappingService;
|
||||
@Resource
|
||||
private ShopInfoMapper shopInfoMapper;
|
||||
|
||||
@Override
|
||||
public Boolean flush(Long shopId) {
|
||||
@@ -73,6 +91,34 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public FitmentResponse getFitmentSub(Long shopId) {
|
||||
FitmentResponse fitmentResponse = new FitmentResponse();
|
||||
List<DecorationStageVO> stageInfoList = new ArrayList<>();
|
||||
//设计
|
||||
stageInfoList.add(getDecorationStageVOS(shopId, ShopSubStageEnum.SHOP_STAGE_9));
|
||||
//装修款
|
||||
stageInfoList.add(getDecorationStageVOS(shopId, ShopSubStageEnum.SHOP_STAGE_10));
|
||||
//施工阶段计划时间
|
||||
stageInfoList.add(getDecorationStageVOS(shopId, ShopSubStageEnum.SHOP_STAGE_11));
|
||||
//三方验收
|
||||
stageInfoList.add(getDecorationStageVOS(shopId, ShopSubStageEnum.SHOP_STAGE_12));
|
||||
//视觉验收
|
||||
stageInfoList.add(getDecorationStageVOS(shopId, ShopSubStageEnum.SHOP_STAGE_13));
|
||||
fitmentResponse.setStageInfoList(stageInfoList);
|
||||
return fitmentResponse;
|
||||
}
|
||||
|
||||
private @NotNull DecorationStageVO getDecorationStageVOS(Long shopId, ShopSubStageEnum shopSubStageEnum) {
|
||||
ShopStageInfoDO ShopStage = shopStageInfoDAO.getShopSubStageInfo(shopId, shopSubStageEnum);
|
||||
DecorationStageVO decorationStageVO = new DecorationStageVO();
|
||||
decorationStageVO.setShopSubStageStatus(ShopStage.getShopSubStageStatus());
|
||||
decorationStageVO.setShopSubStage(ShopStage.getShopSubStage());
|
||||
decorationStageVO.setShopSubStageName(shopSubStageEnum.getShopSubStageName());
|
||||
decorationStageVO.setCreatTime(ShopStage.getCreateTime());
|
||||
return decorationStageVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DesignInfoVo DesignInfo(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
@@ -84,7 +130,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
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));
|
||||
Map<String, DesignSchemeDTO> designSchemeMap = designScheme.stream().collect(Collectors.toMap(DesignSchemeDTO::getName, dto -> dto));
|
||||
List<DesignSchemeDTO> designSchemeDTOS = new ArrayList<>();
|
||||
//平面图
|
||||
DesignSchemeDTO planeGraph = designSchemeMap.get(CommonConstants.FLOOR_PLAN);
|
||||
@@ -130,7 +176,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
if (flag.get() == CommonConstants.FOUR) {
|
||||
//如果设计阶段未完成
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91.getShopSubStageStatus().
|
||||
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91.getShopSubStageStatus().
|
||||
equals(shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9).getShopSubStageStatus())) {
|
||||
//更新设计阶段状态完成
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91);
|
||||
@@ -149,17 +195,17 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DecorationModeStageVO getDecorationModeStage(Long shopId) {
|
||||
public DecorationStageVO getDecorationGoldStage(Long shopId) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_10);
|
||||
if (Objects.isNull(shopSubStageInfo)) {
|
||||
log.error("getDecorationModeStage , shopSubStageInfo is null");
|
||||
return null;
|
||||
}
|
||||
DecorationModeStageVO decorationModeStageVO = new DecorationModeStageVO();
|
||||
decorationModeStageVO.setShopSubStageStatus(shopSubStageInfo.getShopSubStageStatus());
|
||||
LinePayVO linePayInfo = linePayService.getLinePayInfo(shopSubStageInfo.getLineId());
|
||||
decorationModeStageVO.setCreatTime(linePayInfo.getCreateTime());
|
||||
return decorationModeStageVO;
|
||||
DecorationStageVO decorationStageVO = new DecorationStageVO();
|
||||
decorationStageVO.setShopSubStageStatus(shopSubStageInfo.getShopSubStageStatus());
|
||||
decorationStageVO.setPlanBeginTime(shopSubStageInfo.getPlanCompleteTime());
|
||||
decorationStageVO.setActualCompleteTime(shopSubStageInfo.getActualCompleteTime());
|
||||
return decorationStageVO;
|
||||
}
|
||||
|
||||
|
||||
@@ -197,14 +243,19 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
if (!decoration.getPayment().isEmpty()) {
|
||||
request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||
//更新阶段状态
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102);
|
||||
} else {
|
||||
request.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_45.getCode());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_101);
|
||||
|
||||
}
|
||||
Long payId = linePayService.submitPayInfo(request, partnerUserInfoVO);
|
||||
return payId.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public DecorationModelVO getDecorationModel(Long shopId, PartnerUserInfoVO partnerUserInfoVO) {
|
||||
//获取支付信息
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
@@ -249,6 +300,9 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
LinePaySubmitRequest submitRequest = new LinePaySubmitRequest();
|
||||
BeanUtil.copyProperties(linePayInfo, submitRequest);
|
||||
linePayService.submitPayInfo(submitRequest, partnerUserInfoVO);
|
||||
//更新阶段状态
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102);
|
||||
|
||||
}
|
||||
DecorationModelVO decorationModelVO = new DecorationModelVO();
|
||||
BeanUtil.copyProperties(linePayInfo, decorationModelVO);
|
||||
@@ -263,54 +317,52 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
log.error("DecorationModel storeNum is null");
|
||||
return null;
|
||||
}
|
||||
AtomicInteger flag = new AtomicInteger(0);
|
||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
||||
dto -> dto));
|
||||
List<ConstructionScheduleDTO> collect = new ArrayList<>();
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.APPROACH).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.APPROACH));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.ONE_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.ONE_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.TWO_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.TWO_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.THREE_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.THREE_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.FOUR_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.FOUR_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.FIVE_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.FIVE_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.SIX_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.SIX_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.SEVEN_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.SEVEN_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.EIGHT_DAY).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.EIGHT_DAY));
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.WITHDRAWAL).getState())) {
|
||||
flag.incrementAndGet();
|
||||
}
|
||||
collect.add(constructionScheduleMap.get(CommonConstants.WITHDRAWAL));
|
||||
collect.sort(Comparator.comparing(ConstructionScheduleDTO::getId));
|
||||
//更新施工阶段状态
|
||||
if (flag.get() == CommonConstants.TEN) {
|
||||
//设置进场时间xfsg_acceptance_info
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionScheduleMap.get(CommonConstants.APPROACH).getActualBeginDate())) {
|
||||
if (StringUtils.isNotEmpty(constructionScheduleMap.get(CommonConstants.APPROACH).getActualBeginDate())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date date = sdf.parse(constructionScheduleMap.get(CommonConstants.APPROACH).getActualBeginDate());
|
||||
acceptanceInfoDO.setActualEntryTime(date);
|
||||
} catch (ParseException e) {
|
||||
log.error("转化进场时间类型异常");
|
||||
}
|
||||
}
|
||||
}
|
||||
//施工完成时间,计划开始和完成时间
|
||||
if (StringUtils.isNotEmpty(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getActualEndDate())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date constructionEndTime = sdf.parse(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getActualEndDate());
|
||||
acceptanceInfoDO.setConstructionCompletionTime(constructionEndTime);
|
||||
Date PlanBegin = sdf.parse(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getPlanBeginDate());
|
||||
Date PlanEnd = sdf.parse(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getPlanEndDate());
|
||||
acceptanceInfoDO.setDecorationPlannedStartTime(PlanBegin);
|
||||
acceptanceInfoDO.setDecorationPlannedCompletionTime(PlanEnd);
|
||||
} catch (ParseException e) {
|
||||
log.error("鲜丰服务施工完成时间日期转化异常");
|
||||
}
|
||||
}
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
//如果完成更新施工阶段状态
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getState())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111);
|
||||
@@ -318,6 +370,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
return collect;
|
||||
}
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public ConstructionScheduleDTO getConstructionInfo(Long shopId) {
|
||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||
@@ -329,20 +382,222 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
||||
dto -> dto));
|
||||
ConstructionScheduleDTO constructionScheduleDTO = constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE);
|
||||
//如果完成更新阶段状态
|
||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getState())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_11);
|
||||
shopSubStageInfo.setPlanCompleteTime(constructionScheduleDTO.getPlanEndDate());
|
||||
shopSubStageInfo.setActualCompleteTime(constructionScheduleDTO.getActualEndDate());
|
||||
shopStageInfoDAO.updateByShopId(shopSubStageInfo);
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_11);
|
||||
shopSubStageInfo.setPlanCompleteTime(constructionScheduleDTO.getPlanEndDate());
|
||||
shopSubStageInfo.setActualCompleteTime(constructionScheduleDTO.getActualEndDate());
|
||||
shopStageInfoDAO.updateByShopId(shopSubStageInfo);
|
||||
}
|
||||
return constructionScheduleDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user, Integer pageNum, Integer pageSize) {
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||
List<Long> regions = new ArrayList<>();
|
||||
for (String authRegionId : authRegionIds) {
|
||||
regions.add(Long.parseLong(authRegionId));
|
||||
}
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, subStageStatus);
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
Map<Long, ShopInfoDO> ShopIdmap = shopInfoDOS.stream().collect(Collectors.toMap(ShopInfoDO::getId, dto1 -> dto1));
|
||||
//招商经理,选址人员(拓展经理)id
|
||||
List<Long> lineIds = shopInfoDOS.stream().map(ShopInfoDO::getLineId).collect(Collectors.toList());
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, LineInfoDO> lineInfoDOMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, dto -> dto));
|
||||
//招商name
|
||||
List<String> InvestmentManagerIds = lineInfos.stream().map(LineInfoDO::getInvestmentManager).collect(Collectors.toList());
|
||||
List<UserNameDTO> nameByUserId = enterpriseUserDAO.getNameByUserId(InvestmentManagerIds);
|
||||
Map<String, UserNameDTO> vonameMap = nameByUserId.stream()
|
||||
.collect(Collectors.toMap(UserNameDTO::getUserId, vo -> vo));
|
||||
//选址人员name
|
||||
List<String> setterIds = lineInfos.stream().map(LineInfoDO::getDevelopmentManager).collect(Collectors.toList());
|
||||
List<UserNameDTO> setterName = enterpriseUserDAO.getNameByUserId(setterIds);
|
||||
Map<String, UserNameDTO> setterNameMap = setterName.stream()
|
||||
.collect(Collectors.toMap(UserNameDTO::getUserId, vo -> vo));
|
||||
//所属战区
|
||||
List<Long> regionIds = shopInfoDOS.stream().map(ShopInfoDO::getRegionId).collect(Collectors.toList());
|
||||
Map<Long, String> regionNameMap = regionService.getBelongWarRegionNameMap(regionIds);
|
||||
//施工计划完成时间 //施工实际完成实际//验收状态//计划验收时间//验收实际时间
|
||||
Map<Long, ConstructionScheduleDTO> ConstructionScheduleMap = new HashMap<>();
|
||||
Map<Long, ShopStageInfoDO> ShopStageInfoDOMap = new HashMap<>();
|
||||
for (Long shopId : ShopIdmap.keySet()) {
|
||||
ConstructionScheduleDTO constructionInfo = this.getConstructionInfo(shopId);
|
||||
ConstructionScheduleMap.put(shopId, constructionInfo);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_12);
|
||||
ShopStageInfoDOMap.put(shopId, shopSubStageInfo);
|
||||
}
|
||||
//战区经理 TODO
|
||||
|
||||
for (ShopInfoDO shopInfoDO : shopInfoDOS) {
|
||||
fitmentCheckVO fitmentCheckVO = new fitmentCheckVO();
|
||||
fitmentCheckVO.setShopId(shopInfoDO.getId());
|
||||
fitmentCheckVO.setShopName(shopInfoDO.getShopName());
|
||||
fitmentCheckVO.setStoreNum(shopInfoDO.getStoreNum());
|
||||
fitmentCheckVO.setLineId(shopInfoDO.getLineId());
|
||||
fitmentCheckVO.setRegionId(shopInfoDO.getRegionId());
|
||||
fitmentCheckVO.setRegion(regionNameMap.get(shopInfoDO.getRegionId()));
|
||||
if (shopInfoDO.getLineId() != null) {
|
||||
fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
.getInvestmentManager());
|
||||
fitmentCheckVO.setInvestmentManager(vonameMap.get(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
.getInvestmentManager()).getName());
|
||||
fitmentCheckVO.setSitterId(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
.getDevelopmentManager());
|
||||
fitmentCheckVO.setSitterName(setterNameMap.get(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
.getDevelopmentManager()).getName());
|
||||
fitmentCheckVO.setPartnerName(lineInfoDOMap.get(shopInfoDO.getLineId()).getUsername());
|
||||
}
|
||||
if (shopInfoDO.getId() != null) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
if (StringUtils.isNotEmpty(ConstructionScheduleMap.get(shopInfoDO.getId()).getPlanEndDate())) {
|
||||
Date PlanEndTime = sdf.parse(ConstructionScheduleMap.get(shopInfoDO.getId()).getPlanEndDate());
|
||||
fitmentCheckVO.setPlanEndTime(PlanEndTime);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(ConstructionScheduleMap.get(shopInfoDO.getId()).getActualEndDate())) {
|
||||
Date actualEndDate = sdf.parse(ConstructionScheduleMap.get(shopInfoDO.getId()).getActualEndDate());
|
||||
fitmentCheckVO.setActualEndTime(actualEndDate);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(ShopStageInfoDOMap.get(shopInfoDO.getId()).getPlanCompleteTime())) {
|
||||
Date PlanAcceptanceTime = sdf.parse(ShopStageInfoDOMap.get(shopInfoDO.getId()).getPlanCompleteTime());
|
||||
fitmentCheckVO.setPlanAcceptanceTime(PlanAcceptanceTime);
|
||||
}
|
||||
if (StringUtils.isNotEmpty(ShopStageInfoDOMap.get(shopInfoDO.getId()).getActualCompleteTime())) {
|
||||
Date ActualCompleteTime = sdf.parse(ShopStageInfoDOMap.get(shopInfoDO.getId()).getActualCompleteTime());
|
||||
fitmentCheckVO.setAcceptanceTime(ActualCompleteTime);
|
||||
}
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopInfoDO.getId()).getShopSubStageStatus());
|
||||
} catch (ParseException e) {
|
||||
log.error("日期转化异常");
|
||||
}
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
pageInfo.setList(fitmentCheckVOList);
|
||||
return pageInfo;
|
||||
}
|
||||
|
||||
@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());
|
||||
public Boolean submitAcceptance(ThreeAcceptanceRequest request, PartnerUserInfoVO minUser, LoginUserInfo pcUser) {
|
||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||
if (Objects.nonNull(minUser)) {
|
||||
try {
|
||||
//插入检查项
|
||||
for (AssessmentDataDO assessmentDataDO : request.getAssessmentDataDOS()) {
|
||||
//TODO 考核人是谁?
|
||||
assessmentDataDO.setAssessmentUserId(minUser.getPartnerId());
|
||||
}
|
||||
Boolean assessment = assessmentDataService.batchInsert(request.getAssessmentDataDOS());
|
||||
if (assessment == Boolean.FALSE) {
|
||||
log.error("三方验收插入检查项失败");
|
||||
throw new ServiceException(ErrorCodeEnum.CHECK_ITEM);
|
||||
}
|
||||
//工程部验收签名
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setAuditType(CommonConstants.FIVE);
|
||||
shopAuditInfoDO.setShopId(request.getShopId());
|
||||
shopAuditInfoDO.setSubmittedUserId(minUser.getPartnerId());
|
||||
shopAuditInfoDO.setSubmittedUserName(minUser.getUsername());
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getEngineeringResultType())) {
|
||||
shopAuditInfoDO.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||
shopAuditInfoDO.setPassReason(request.getEngineeringComments());
|
||||
} else {
|
||||
shopAuditInfoDO.setResultType(AuditResultTypeEnum.REJECT.getCode());
|
||||
shopAuditInfoDO.setPassReason(request.getEngineeringComments());
|
||||
}
|
||||
shopAuditInfoDO.setCreateTime(new Date());
|
||||
shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
//加盟商
|
||||
ShopAuditInfoDO shopAuditInfoDO1 = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO1.setAuditType(CommonConstants.FIVE);
|
||||
shopAuditInfoDO1.setShopId(request.getShopId());
|
||||
shopAuditInfoDO1.setSubmittedUserId(minUser.getPartnerId());
|
||||
shopAuditInfoDO1.setSubmittedUserName(minUser.getUsername());
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getPartnerResultType())) {
|
||||
shopAuditInfoDO1.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||
shopAuditInfoDO1.setPassReason(request.getPartnerComments());
|
||||
} else {
|
||||
shopAuditInfoDO1.setResultType(AuditResultTypeEnum.REJECT.getCode());
|
||||
shopAuditInfoDO1.setPassReason(request.getPartnerComments());
|
||||
}
|
||||
shopAuditInfoDO1.setCreateTime(new Date());
|
||||
shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO1);
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(request.getPartnerAcceptanceSignatures());
|
||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(request.getEngineeringAcceptanceSignatures());
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
|
||||
List<AcceptanceInfoDO> assessmentDataDOS = new ArrayList<>();
|
||||
BeanUtil.copyProperties(request, assessmentDataDOS);
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
} catch (Exception e) {
|
||||
log.error("mini提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
} else {
|
||||
//运营部验收签名
|
||||
try {
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setAuditType(CommonConstants.FIVE);
|
||||
shopAuditInfoDO.setShopId(request.getShopId());
|
||||
shopAuditInfoDO.setSubmittedUserId(pcUser.getUserId());
|
||||
shopAuditInfoDO.setSubmittedUserName(pcUser.getName());
|
||||
if (AuditResultTypeEnum.PASS.getCode().equals(request.getOperationsResultType())) {
|
||||
shopAuditInfoDO.setResultType(AuditResultTypeEnum.PASS.getCode());
|
||||
} else {
|
||||
shopAuditInfoDO.setResultType(AuditResultTypeEnum.REJECT.getCode());
|
||||
}
|
||||
shopAuditInfoDO.setPassReason(request.getOperationsComments());
|
||||
shopAuditInfoDO.setCreateTime(new Date());
|
||||
shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
if (CommonConstants.ZERO==request.getOperationsResultType()) {
|
||||
//更新阶段状态验收完毕
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
|
||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
||||
}
|
||||
else {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setOperationsAcceptanceSignatures(request.getOperationsAcceptanceSignatures());
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}catch (Exception e) {
|
||||
log.error("PC提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
}
|
||||
|
||||
}
|
||||
return flag;
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
||||
ShopStageInfoDO newShopStageInfoDO = new ShopStageInfoDO();
|
||||
newShopStageInfoDO.setPlanCompleteTime(request.getBookingAcceptanceTime().toString());
|
||||
newShopStageInfoDO.setShopId(request.getShopId());
|
||||
shopStageInfoDAO.updateByShopId(newShopStageInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,14 +50,8 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
@Resource
|
||||
private EnterpriseUserDAO enterpriseUserDAO;
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private ShopService shopService;
|
||||
@Resource
|
||||
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
|
||||
@@ -53,6 +53,8 @@ public class SignValidateFilter implements Filter {
|
||||
"/xfsg/favicon.ico",
|
||||
"/xfsg/v2/api-docs","/**/test/**",
|
||||
"/xfsg/mini/program/oss/getUploadFileConfig",
|
||||
//
|
||||
"/xfsg/mini/**",
|
||||
"/xfsg/mini/program/v1/partnerManage/partner/getIdentityCardInfo",
|
||||
"/**/swagger*/**",
|
||||
"/**/webjars/**",
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.cool.store.vo.fitmentCheckVO;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -30,18 +39,23 @@ public class PCDecorationController {
|
||||
private DecorationService decorationService;
|
||||
@ApiOperation("刷新")
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
public ResponseResult<Boolean> flush(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(decorationService.flush(shopId));
|
||||
}
|
||||
@ApiOperation("获取设计阶段信息")
|
||||
@GetMapping("/design")
|
||||
public ResponseResult<DesignInfoVo> get(@RequestParam Long shopId){
|
||||
@ApiOperation("获取新店装修下阶段的数据")
|
||||
@GetMapping("/getFitmentSub")
|
||||
public ResponseResult<FitmentResponse> getFitmentSub(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(decorationService.getFitmentSub(shopId));
|
||||
}
|
||||
@ApiOperation("获取设计子阶段信息")
|
||||
@GetMapping("/designSub")
|
||||
public ResponseResult<DesignInfoVo> getDesignSub(@RequestParam Long shopId){
|
||||
return ResponseResult.success( decorationService.DesignInfo(shopId)) ;
|
||||
}
|
||||
|
||||
@ApiOperation("获取施工阶段信息")
|
||||
@GetMapping("/getConstruction")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstruction(@RequestParam Long shopId){
|
||||
@ApiOperation("获取施工子阶段信息")
|
||||
@GetMapping("/getConstructionSub")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstructionSub(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
||||
}
|
||||
@ApiOperation("获取装修款信息")
|
||||
@@ -49,9 +63,25 @@ public class PCDecorationController {
|
||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
|
||||
}
|
||||
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
||||
@GetMapping("/getAcceptanceList")
|
||||
public ResponseResult<PageInfo<fitmentCheckVO>> getAcceptanceList(@RequestParam Integer status, @RequestParam Integer pageNum,@RequestParam Integer pageSize){
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getFitmentAcceptanceList(status,user,pageNum,pageSize));
|
||||
}
|
||||
@ApiOperation("预约验收")
|
||||
@PostMapping("/bookingAcceptance")
|
||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response){
|
||||
return ResponseResult.success(decorationService.bookingAcceptance(response));
|
||||
}
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
}
|
||||
@ApiOperation("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request,null, CurrentUserHolder.getUser()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,10 +5,13 @@ import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.service.AssessmentTemplateService;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.vo.Fitment.DecorationModeStageVO;
|
||||
import com.cool.store.vo.AssessmentTemplateVO;
|
||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
@@ -33,15 +36,21 @@ import java.util.List;
|
||||
public class MiniDecorationController {
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
|
||||
@ApiOperation("获取设计阶段信息")
|
||||
@GetMapping("/design")
|
||||
public ResponseResult<DesignInfoVo> get(@RequestParam Long shopId){
|
||||
@Resource
|
||||
private AssessmentTemplateService assessmentTemplateService;
|
||||
@ApiOperation("获取新店装修下阶段的数据")
|
||||
@GetMapping("/getFitmentSub")
|
||||
public ResponseResult<FitmentResponse> getFitmentSub(@RequestParam Long shopId) {
|
||||
return ResponseResult.success(decorationService.getFitmentSub(shopId));
|
||||
}
|
||||
@ApiOperation("获取设计阶段子阶段信息")
|
||||
@GetMapping("/designSub")
|
||||
public ResponseResult<DesignInfoVo> getDesign(@RequestParam Long shopId){
|
||||
return ResponseResult.success( decorationService.DesignInfo(shopId)) ;
|
||||
}
|
||||
@ApiOperation("获取施工阶段信息")
|
||||
@GetMapping("/getConstruction")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstruction(@RequestParam Long shopId){
|
||||
@ApiOperation("获取施工阶段子阶段信息")
|
||||
@GetMapping("/getConstructionSub")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstructionSub(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
||||
}
|
||||
@PostMapping("/submitDecorationModel")
|
||||
@@ -56,8 +65,8 @@ public class MiniDecorationController {
|
||||
}
|
||||
@ApiOperation("获取装修款阶段信息")
|
||||
@GetMapping("/getDecorationModeStage")
|
||||
public ResponseResult<DecorationModeStageVO> getDecorationModeStage(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getDecorationModeStage(shopId)) ;
|
||||
public ResponseResult<DecorationStageVO> getDecorationModeStage(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getDecorationGoldStage(shopId)) ;
|
||||
}
|
||||
|
||||
@ApiOperation("获取装修款详情信息")
|
||||
@@ -66,10 +75,16 @@ public class MiniDecorationController {
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiOperation("获取三方验收检查项")
|
||||
@GetMapping("/getChecks")
|
||||
public ResponseResult<List<AssessmentTemplateVO>> getChecks(@RequestParam Integer type){
|
||||
return ResponseResult.success(assessmentTemplateService.listByType(type));
|
||||
}
|
||||
@ApiOperation("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Integer> submitThreeAcceptance(@RequestParam ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request));
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request,user,null));
|
||||
}
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.job;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||
@@ -161,66 +162,61 @@ public class XxlJobHandler {
|
||||
int PageSize = 50;
|
||||
|
||||
while (hasNext) {
|
||||
log.info("----每天更新装修阶段进场时间等,至预约状态----");
|
||||
log.info("----每天更新装修阶段进场时间,施工完成时间等,至预约状态----");
|
||||
PageHelper.startPage(PageNum, PageSize);
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = acceptanceInfoDAO.selectAcceptanceInfo();
|
||||
if (CollectionUtils.isEmpty(acceptanceInfoDOS)) {
|
||||
//获取施工阶段未完成shopID
|
||||
List<Long> shops = shopStageInfoDAO.getShopContractIncompletion();
|
||||
if (CollectionUtils.isEmpty(shops)) {
|
||||
log.info("------今日没有待更新数据------");
|
||||
return;
|
||||
}
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = new ArrayList<>();
|
||||
for (Long shopId : shops) {
|
||||
acceptanceInfoDOS.add(acceptanceInfoDAO.selectByShopId(shopId));
|
||||
}
|
||||
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");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date constructionEndTime = sdf.parse(constructionInfo.getPlanEndDate());
|
||||
Date constructionEndTime = sdf.parse(constructionInfo.getActualEndDate());
|
||||
acceptanceInfoDO.setConstructionCompletionTime(constructionEndTime);
|
||||
Date PlanBegin = sdf.parse(constructionInfo.getPlanBeginDate());
|
||||
Date PlanEnd = sdf.parse(constructionInfo.getPlanEndDate());
|
||||
acceptanceInfoDO.setDecorationPlannedStartTime(PlanBegin);
|
||||
acceptanceInfoDO.setDecorationPlannedCompletionTime(PlanEnd);
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
} catch (ParseException e) {
|
||||
log.error("初始化acceptanceInfo,鲜丰服务施工完成时间日期转化异常");
|
||||
}
|
||||
}
|
||||
//进场时间
|
||||
if (Objects.nonNull(construction) && !StringUtils.isNull(construction.get(0).getActualBeginDate())
|
||||
if (Objects.nonNull(construction) && !StringUtils.isNull(construction.get(CommonConstants.ZERO).getActualBeginDate())
|
||||
&& Objects.isNull(acceptanceInfoDO.getActualEntryTime())) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
try {
|
||||
Date constructionBeginTime = sdf.parse(construction.get(0).getActualBeginDate());
|
||||
Date constructionBeginTime = sdf.parse(construction.get(CommonConstants.ZERO).getActualBeginDate());
|
||||
acceptanceInfoDO.setActualEntryTime(constructionBeginTime);
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
//+5tian
|
||||
Instant instant = acceptanceInfoDO.getActualEntryTime().toInstant();
|
||||
ZoneId zone = ZoneId.systemDefault();
|
||||
LocalDate localDate = instant.atZone(zone).toLocalDate();
|
||||
LocalDate datePlusFiveDays = localDate.plusDays(CommonConstants.FOUR); // 添加5天
|
||||
LocalDate now = LocalDate.now();
|
||||
if (datePlusFiveDays.equals(now)) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
||||
}
|
||||
//TODO 短信通知
|
||||
} catch (ParseException e) {
|
||||
log.error("初始化acceptanceInfo,鲜丰服务进场时间日期转化异常");
|
||||
}
|
||||
}
|
||||
//进场时间+5
|
||||
if (Objects.nonNull(construction) && !StringUtils.isNull(construction.get(0).getActualBeginDate())
|
||||
&& Objects.nonNull(acceptanceInfoDO.getActualEntryTime())) {
|
||||
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 短信通知
|
||||
}
|
||||
}
|
||||
hasNext = acceptanceInfoDOS.size() >= PageSize;
|
||||
PageNum++;
|
||||
|
||||
Reference in New Issue
Block a user