完成部分TODO修改bug
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package com.cool.store.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.text.DateFormat;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
@@ -80,6 +82,9 @@ public class CoolDateUtils {
|
||||
|
||||
|
||||
public static final Date parseDate(String dateString ,String format){
|
||||
if (StringUtils.isBlank(dateString)){
|
||||
return null;
|
||||
}
|
||||
DateFormat dateFormat = new SimpleDateFormat(format);
|
||||
Date date = null;
|
||||
try {
|
||||
|
||||
@@ -230,5 +230,16 @@ public class ShopStageInfoDAO {
|
||||
List<Integer> shopSubStageStatusList,String investmentUserId,Integer queryUserType){
|
||||
return shopStageInfoMapper.getSpecialShopStageInfo( shopIds, shopSubStage, shopSubStageStatusList,investmentUserId,queryUserType);
|
||||
}
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/9
|
||||
* @description:获取处于XXXX阶段的列表
|
||||
*/
|
||||
public List<ShopStageInfoDO> getSubStageList(List<Long> shopIds, Integer shopSubStage){
|
||||
if(CollectionUtils.isEmpty(shopIds) || shopSubStage == null){
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return shopStageInfoMapper.getSubStageList(shopIds,shopSubStage);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
||||
* @Date: 2024/5/8
|
||||
* @description:三方验收
|
||||
*/
|
||||
Integer batchUpdate(List<AssessmentDataDO> AssessmentDataDOS);
|
||||
Integer batchUpdate(@Param("AssessmentDataDOS") List<AssessmentDataDO> AssessmentDataDOS);
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/8
|
||||
|
||||
@@ -84,7 +84,7 @@ public interface ShopInfoMapper extends Mapper<ShopInfoDO> {
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:根据区域id查询所有处于的店铺
|
||||
* @description:根据区域id查询所有处于XXX的店铺
|
||||
*/
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("status")Integer status);
|
||||
List<ShopInfoDO> selectShopListByRegionId(@Param("regionIds") List<Long> regionIds,@Param("subStageStatus")List<Integer> subStageStatus);
|
||||
}
|
||||
|
||||
@@ -130,5 +130,5 @@ public interface ShopStageInfoMapper extends Mapper<ShopStageInfoDO> {
|
||||
@Param("shopSubStageStatusList") List<Integer> shopSubStageStatusList,
|
||||
@Param("investmentUserId") String investmentUserId,
|
||||
@Param("queryUserType") Integer queryUserType);
|
||||
|
||||
List<ShopStageInfoDO> getSubStageList(@Param("shopIds") List<Long> shopIds,@Param("shopSubStage") Integer shopSubStage);
|
||||
}
|
||||
|
||||
@@ -1,76 +1,92 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cool.store.mapper.AcceptanceInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.AcceptanceInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId" />
|
||||
<result column="actual_entry_time" jdbcType="TIMESTAMP" property="actualEntryTime" />
|
||||
<result column="planned_completion_time" jdbcType="TIMESTAMP" property="plannedCompletionTime" />
|
||||
<result column="planned_start_time" jdbcType="TIMESTAMP" property="plannedStartTime" />
|
||||
<result column="decoration_planned_completion_time" jdbcType="TIMESTAMP" property="decorationPlannedCompletionTime" />
|
||||
<result column="decoration_planned_start_time" jdbcType="TIMESTAMP" property="decorationPlannedStartTime" />
|
||||
<result column="construction_completion_time" jdbcType="TIMESTAMP" property="constructionCompletionTime" />
|
||||
<result column="engineering_acceptance_signatures" jdbcType="VARCHAR" property="engineeringAcceptanceSignatures" />
|
||||
<result column="operations_acceptance_signatures" jdbcType="VARCHAR" property="operationsAcceptanceSignatures" />
|
||||
<result column="partner_acceptance_signatures" jdbcType="VARCHAR" property="partnerAcceptanceSignatures" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<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,
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.AcceptanceInfoDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
|
||||
<result column="actual_entry_time" jdbcType="TIMESTAMP" property="actualEntryTime"/>
|
||||
<result column="planned_completion_time" jdbcType="TIMESTAMP" property="plannedCompletionTime"/>
|
||||
<result column="planned_start_time" jdbcType="TIMESTAMP" property="plannedStartTime"/>
|
||||
<result column="decoration_planned_completion_time" jdbcType="TIMESTAMP"
|
||||
property="decorationPlannedCompletionTime"/>
|
||||
<result column="decoration_planned_start_time" jdbcType="TIMESTAMP" property="decorationPlannedStartTime"/>
|
||||
<result column="construction_completion_time" jdbcType="TIMESTAMP" property="constructionCompletionTime"/>
|
||||
<result column="engineering_acceptance_signatures" jdbcType="VARCHAR"
|
||||
property="engineeringAcceptanceSignatures"/>
|
||||
<result column="operations_acceptance_signatures" jdbcType="VARCHAR" property="operationsAcceptanceSignatures"/>
|
||||
<result column="partner_acceptance_signatures" jdbcType="VARCHAR" property="partnerAcceptanceSignatures"/>
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||
<result column="plan_acceptance_time" jdbcType="TIMESTAMP" property="planAcceptanceTime"/>
|
||||
<result column="actual_acceptance_time" jdbcType="TIMESTAMP" property="actualAcceptanceTime"/>
|
||||
<result column="booking_user" jdbcType="VARCHAR" property="bookingUser"/>
|
||||
</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 = #{status} and a.deleted = 0
|
||||
</select>
|
||||
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user
|
||||
</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>
|
||||
<if test="planAcceptanceTime !=null ">
|
||||
plan_acceptance_time =#{planAcceptanceTime},
|
||||
</if>
|
||||
<if test="actualAcceptanceTime !=null ">
|
||||
actual_acceptance_time =#{actualAcceptanceTime},
|
||||
</if>
|
||||
<if test="bookingUser !=null ">
|
||||
booking_user =#{bookingUser},
|
||||
</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 = #{status} and a.deleted = 0
|
||||
</select>
|
||||
<select id="selectByShopId" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||
select
|
||||
<include refid="baseColumn"/>
|
||||
@@ -90,9 +106,9 @@
|
||||
where deleted = 0
|
||||
<if test="shopIds != null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
<foreach collection="shopIds" item="shopId" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -52,27 +52,29 @@
|
||||
, comments=values(comments), picture=values(picture), video=values(video)
|
||||
</insert>
|
||||
<update id="batchUpdate">
|
||||
update xfsg_assessment_data
|
||||
<set>
|
||||
qualified = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.qualified}
|
||||
</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}
|
||||
update xfsg_assessment_data
|
||||
<set>
|
||||
qualified = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.qualified}
|
||||
</foreach>
|
||||
END,
|
||||
reason = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.reason}
|
||||
</foreach>
|
||||
END,
|
||||
comments = CASE id
|
||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||
WHEN #{item.id} THEN #{item.comments}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="AssessmentDataDOS" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
END
|
||||
</set>
|
||||
where id in (
|
||||
<foreach collection="addShopStageList" item="item" separator=",">
|
||||
#{item.id}
|
||||
</foreach>
|
||||
)
|
||||
)
|
||||
</update>
|
||||
|
||||
<select id="selectListByShopId" resultType="com.cool.store.entity.AssessmentDataDO">
|
||||
|
||||
@@ -162,8 +162,11 @@
|
||||
</if>
|
||||
AND xssi.shop_sub_stage_status != -100
|
||||
and xssi.shop_sub_stage = 120
|
||||
<if test="status != null">
|
||||
and xssi.shop_sub_stage_status = #{status}
|
||||
<if test="subStageStatus != null and subStageStatus.size()>0">
|
||||
and xssi.shop_sub_stage_status in
|
||||
<foreach collection="subStageStatus" item="item" index="index" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
@@ -252,4 +252,18 @@
|
||||
</where>
|
||||
|
||||
</select>
|
||||
<select id="getSubStageList" resultType="com.cool.store.entity.ShopStageInfoDO">
|
||||
select *
|
||||
from xfsg_shop_stage_info
|
||||
where 1=1
|
||||
<if test="shopIds !=null and shopIds.size()>0">
|
||||
and shop_id in
|
||||
<foreach collection="shopIds" item="shopId" index="index" open="(" separator="," close=")">
|
||||
#{shopId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="shopSubStage !=null">
|
||||
and shop_sub_stage =#{shopSubStage}
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,7 +1,4 @@
|
||||
package com.cool.store.entity;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
|
||||
import java.util.Date;
|
||||
import javax.persistence.*;
|
||||
|
||||
@@ -56,14 +53,12 @@ public class AcceptanceInfoDO {
|
||||
/**
|
||||
* 工程部验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":1}
|
||||
*/
|
||||
|
||||
@Column(name = "engineering_acceptance_signatures")
|
||||
private String engineeringAcceptanceSignatures;
|
||||
|
||||
/**
|
||||
* 营运部验收签名 {"pic":"","acceptanceTime":"","result":"","remark":"","status":1}
|
||||
*/
|
||||
|
||||
@Column(name = "operations_acceptance_signatures")
|
||||
private String operationsAcceptanceSignatures;
|
||||
/**
|
||||
@@ -88,6 +83,43 @@ public class AcceptanceInfoDO {
|
||||
* 是否删除:0.否 1.是
|
||||
*/
|
||||
private Boolean deleted;
|
||||
/**
|
||||
* 计划验收时间
|
||||
*/
|
||||
private Date planAcceptanceTime;
|
||||
|
||||
/**
|
||||
* 实际验收时间
|
||||
*/
|
||||
private Date actualAcceptanceTime;
|
||||
/**
|
||||
* 预约人
|
||||
*/
|
||||
private String bookingUser;
|
||||
|
||||
public Date getPlanAcceptanceTime() {
|
||||
return planAcceptanceTime;
|
||||
}
|
||||
|
||||
public void setPlanAcceptanceTime(Date planAcceptanceTime) {
|
||||
this.planAcceptanceTime = planAcceptanceTime;
|
||||
}
|
||||
|
||||
public Date getActualAcceptanceTime() {
|
||||
return actualAcceptanceTime;
|
||||
}
|
||||
|
||||
public void setActualAcceptanceTime(Date actualAcceptanceTime) {
|
||||
this.actualAcceptanceTime = actualAcceptanceTime;
|
||||
}
|
||||
|
||||
public String getBookingUser() {
|
||||
return bookingUser;
|
||||
}
|
||||
|
||||
public void setBookingUser(String bookingUser) {
|
||||
this.bookingUser = bookingUser;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return id
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/05/09/下午5:27
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class AcceptanceListRequest {
|
||||
|
||||
private List<Integer> subStageStatus;
|
||||
private Integer pageNum;
|
||||
private Integer pageSize;
|
||||
}
|
||||
@@ -15,7 +15,6 @@ import java.util.Date;
|
||||
@Data
|
||||
public class BookingAcceptanceRequest {
|
||||
private Long shopId;
|
||||
@ApiModelProperty("预约验收实际")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@ApiModelProperty("预约验收时间")
|
||||
private Date bookingAcceptanceTime;
|
||||
}
|
||||
|
||||
@@ -4,10 +4,7 @@ import com.cool.store.context.LoginUserInfo;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.dto.decoration.ThreeAcceptanceDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
@@ -107,13 +104,13 @@ public interface DecorationService {
|
||||
* @Date: 2024/5/3
|
||||
* @description:预约验收
|
||||
*/
|
||||
Boolean bookingAcceptance(BookingAcceptanceRequest response);
|
||||
Boolean bookingAcceptance(BookingAcceptanceRequest response,LoginUserInfo user);
|
||||
|
||||
/**
|
||||
* @Auther: wangshuo
|
||||
* @Date: 2024/5/3
|
||||
* @description:获取验收列表
|
||||
*/
|
||||
PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user,Integer pageNum,Integer pageSize);
|
||||
PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user);
|
||||
|
||||
}
|
||||
|
||||
@@ -17,10 +17,7 @@ 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.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.request.*;
|
||||
import com.cool.store.response.FitmentResponse;
|
||||
|
||||
import com.cool.store.response.ThreeSignResponse;
|
||||
@@ -403,31 +400,35 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
@Override
|
||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||
try {
|
||||
//工程部验收签名
|
||||
if (Objects.nonNull(request.getEngineeringAcceptance())) {
|
||||
request.getEngineeringAcceptance().setAcceptanceTime(new Date());
|
||||
request.getEngineeringAcceptance().setStatus(CommonConstants.ONE);
|
||||
String jsonString = JSONObject.toJSONString(request.getEngineeringAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_10);
|
||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
|
||||
//工程部验收签名
|
||||
if (Objects.nonNull(request.getEngineeringAcceptance())) {
|
||||
request.getEngineeringAcceptance().setAcceptanceTime(new Date());
|
||||
request.getEngineeringAcceptance().setStatus(CommonConstants.ONE);
|
||||
String jsonString = JSONObject.toJSONString(request.getEngineeringAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
//加盟商
|
||||
if (Objects.nonNull(request.getPartnerAcceptance())) {
|
||||
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
||||
request.getPartnerAcceptance().setAcceptanceTime(new Date());
|
||||
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
//加盟商
|
||||
if (Objects.nonNull(request.getPartnerAcceptance())) {
|
||||
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
||||
request.getPartnerAcceptance().setAcceptanceTime(new Date());
|
||||
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
|
||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
return Boolean.TRUE;
|
||||
return Boolean.FALSE;
|
||||
} catch (Exception e) {
|
||||
log.error("mini提交三方验收失败");
|
||||
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
|
||||
@@ -435,8 +436,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user, Integer
|
||||
pageNum, Integer pageSize) {
|
||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(AcceptanceListRequest request, LoginUserInfo user) {
|
||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||
List<Long> regions = new ArrayList<>();
|
||||
for (String authRegionId : authRegionIds) {
|
||||
@@ -448,8 +448,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
List<fitmentCheckVO> fitmentCheckVOList = new ArrayList<>();
|
||||
//shopId,lineid,regionid,shopname,storenum,
|
||||
PageHelper.startPage(pageNum, pageSize);
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, subStageStatus);
|
||||
PageHelper.startPage(request.getPageNum(), request.getPageSize());
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoMapper.selectShopListByRegionId(regions, request.getSubStageStatus());
|
||||
PageInfo pageInfo = new PageInfo<>(shopInfoDOS);
|
||||
if (shopInfoDOS.isEmpty()) {
|
||||
log.info("该工程部监理下门店为空");
|
||||
@@ -457,7 +457,8 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
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<Long> lineIds = shopInfoDOS.stream().filter(o->o.getLineId()!=null)
|
||||
.map(ShopInfoDO::getLineId).distinct().collect(Collectors.toList());
|
||||
List<LineInfoDO> lineInfos = lineInfoMapper.getByLineIds(lineIds);
|
||||
Map<Long, LineInfoDO> lineInfoDOMap = lineInfos.stream().collect(Collectors.toMap(LineInfoDO::getId, dto -> dto));
|
||||
//招商name
|
||||
@@ -479,43 +480,50 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
String userName = enterpriseUserDAO.getUserName(fightMangerUserId);
|
||||
fightManger.put(regionId, userName);
|
||||
}
|
||||
//施工计划完成时间 //施工实际完成实际//验收状态//计划验收时间//验收实际时间
|
||||
Map<Long, ShopStageInfoDO> ShopStageInfoDOMap = new HashMap<>();
|
||||
for (Long shopId : ShopIdmap.keySet()) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_12);
|
||||
ShopStageInfoDOMap.put(shopId, shopSubStageInfo);
|
||||
}
|
||||
//施工计划完成时间 //施工实际完成实际//计划验收时间//验收实际时间
|
||||
List<Long> shopIds = new ArrayList<>(ShopIdmap.keySet());
|
||||
List<AcceptanceInfoDO> acceptanceInfoDOS = acceptanceInfoDAO.selectByShopIds(shopIds);
|
||||
Map<Long, AcceptanceInfoDO> acceptanceInfoDOSMap = acceptanceInfoDOS.stream()
|
||||
.collect(Collectors.toMap(AcceptanceInfoDO::getShopId, dto1 -> dto1));
|
||||
//验收状态
|
||||
List<ShopStageInfoDO> subStageList = shopStageInfoDAO.getSubStageList(shopIds, ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage());
|
||||
Map<Long, ShopStageInfoDO> ShopStageInfoDOMap = subStageList.stream()
|
||||
.collect(Collectors.toMap(ShopStageInfoDO::getShopId, dto1 -> dto1));
|
||||
for (ShopInfoDO shopInfoDO : shopInfoDOS) {
|
||||
Long shopId = shopInfoDO.getId();
|
||||
Long lineId = shopInfoDO.getLineId();
|
||||
Long regionId = shopInfoDO.getRegionId();
|
||||
fitmentCheckVO fitmentCheckVO = new fitmentCheckVO();
|
||||
fitmentCheckVO.setShopId(shopInfoDO.getId());
|
||||
fitmentCheckVO.setShopId(shopId);
|
||||
fitmentCheckVO.setLineId(lineId);
|
||||
fitmentCheckVO.setShopName(shopInfoDO.getShopName());
|
||||
fitmentCheckVO.setStoreNum(shopInfoDO.getStoreNum());
|
||||
fitmentCheckVO.setLineId(shopInfoDO.getLineId());
|
||||
fitmentCheckVO.setRegionId(shopInfoDO.getRegionId());
|
||||
fitmentCheckVO.setRegion(regionNameMap.get(shopInfoDO.getRegionId()));
|
||||
fitmentCheckVO.setFightManager(fightManger.get(shopInfoDO.getRegionId()));
|
||||
if (shopInfoDO.getLineId() != null) {
|
||||
fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
fitmentCheckVO.setRegionId(regionId);
|
||||
fitmentCheckVO.setRegion(regionNameMap.get(regionId));
|
||||
fitmentCheckVO.setFightManager(fightManger.get(regionId));
|
||||
if (lineId != null) {
|
||||
fitmentCheckVO.setInvestmentManagerId(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager());
|
||||
fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
fitmentCheckVO.setInvestmentManager(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getInvestmentManager()));
|
||||
fitmentCheckVO.setSitterId(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
fitmentCheckVO.setSitterId(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager());
|
||||
fitmentCheckVO.setSitterName(userNameMap.get(lineInfoDOMap.get(shopInfoDO.getLineId())
|
||||
fitmentCheckVO.setSitterName(userNameMap.get(lineInfoDOMap.get(lineId)
|
||||
.getDevelopmentManager()));
|
||||
fitmentCheckVO.setPartnerName(lineInfoDOMap.get(shopInfoDO.getLineId()).getUsername());
|
||||
fitmentCheckVO.setPartnerName(lineInfoDOMap.get(lineId).getUsername());
|
||||
}
|
||||
if (shopInfoDO.getId() != null) {
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopInfoDO.getId()))) {
|
||||
Date PlanEndTime = CoolDateUtils.parseDate(ShopStageInfoDOMap.get(shopInfoDO.getId()).getPlanCompleteTime(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
fitmentCheckVO.setPlanEndTime(PlanEndTime);
|
||||
Date actualEndDate = CoolDateUtils.parseDate(ShopStageInfoDOMap.get(shopInfoDO.getId()).getActualCompleteTime(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
fitmentCheckVO.setActualEndTime(actualEndDate);
|
||||
Date PlanAcceptanceTime = CoolDateUtils.parseDate(ShopStageInfoDOMap.get(shopInfoDO.getId()).getPlanCompleteTime(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||
fitmentCheckVO.setPlanAcceptanceTime(PlanAcceptanceTime);
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopInfoDO.getId()).getShopSubStageStatus());
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDOSMap.get(shopId);
|
||||
if (shopId != null) {
|
||||
if (Objects.nonNull(acceptanceInfoDO)) {
|
||||
fitmentCheckVO.setPlanEndTime(acceptanceInfoDO.getDecorationPlannedCompletionTime());
|
||||
fitmentCheckVO.setActualEndTime(acceptanceInfoDO.getConstructionCompletionTime());
|
||||
fitmentCheckVO.setPlanAcceptanceTime(acceptanceInfoDO.getPlanAcceptanceTime());
|
||||
fitmentCheckVO.setAcceptanceTime(acceptanceInfoDO.getActualAcceptanceTime());
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(ShopStageInfoDOMap.get(shopId))) {
|
||||
fitmentCheckVO.setShopSubStageStatus(ShopStageInfoDOMap.get(shopId).getShopSubStageStatus());
|
||||
}
|
||||
fitmentCheckVOList.add(fitmentCheckVO);
|
||||
}
|
||||
pageInfo.setList(fitmentCheckVOList);
|
||||
@@ -541,10 +549,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
acceptanceInfoDO.setShopId(request.getShopId());
|
||||
acceptanceInfoDO.setOperationsAcceptanceSignatures(jsonString);
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDO.setActualAcceptanceTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
if (AuditResultTypeEnum.PASS.getCode() == request.getOperationsAcceptance().getResult()
|
||||
&& AuditResultTypeEnum.PASS.getCode() == partner.getResult()
|
||||
&& AuditResultTypeEnum.PASS.getCode() == engineering.getResult()) {
|
||||
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
|
||||
&& CommonConstants.ONE == partner.getResult()
|
||||
&& CommonConstants.ONE == engineering.getResult()) {
|
||||
//更新阶段状态验收完毕
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
|
||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
||||
@@ -588,15 +597,20 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request) {
|
||||
|
||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request,LoginUserInfo user) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
||||
ShopStageInfoDO newShopStageInfoDO = new ShopStageInfoDO();
|
||||
CoolDateUtils.parseDate(request.getBookingAcceptanceTime().toString(), CoolDateUtils.DATE_FORMAT_SEC);
|
||||
newShopStageInfoDO.setPlanCompleteTime(request.getBookingAcceptanceTime().toString());
|
||||
SimpleDateFormat sdf = new SimpleDateFormat(CoolDateUtils.DATE_FORMAT_SEC);
|
||||
String date = sdf.format(request.getBookingAcceptanceTime());
|
||||
newShopStageInfoDO.setPlanCompleteTime(date);
|
||||
newShopStageInfoDO.setShopSubStage(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage());
|
||||
newShopStageInfoDO.setShopId(request.getShopId());
|
||||
shopStageInfoDAO.updateByShopId(newShopStageInfoDO);
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||
acceptanceInfoDO.setBookingUser(user.getUserId());
|
||||
acceptanceInfoDO.setUpdateTime(new Date());
|
||||
acceptanceInfoDO.setPlanAcceptanceTime(new Date());
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@ 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.AcceptanceListRequest;
|
||||
import com.cool.store.request.BookingAcceptanceRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceCheckRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
@@ -64,15 +65,16 @@ public class PCDecorationController {
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
|
||||
}
|
||||
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
||||
@GetMapping("/getAcceptanceList")
|
||||
public ResponseResult<PageInfo<fitmentCheckVO>> getAcceptanceList(@RequestParam Integer subStageStatus, @RequestParam Integer pageNum,@RequestParam Integer pageSize){
|
||||
@PostMapping("/getAcceptanceList")
|
||||
public ResponseResult<PageInfo<fitmentCheckVO>> getAcceptanceList(@RequestBody AcceptanceListRequest request){
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.getFitmentAcceptanceList(subStageStatus,user,pageNum,pageSize));
|
||||
return ResponseResult.success(decorationService.getFitmentAcceptanceList(request,user));
|
||||
}
|
||||
@ApiOperation("预约验收")
|
||||
@PostMapping("/bookingAcceptance")
|
||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody BookingAcceptanceRequest response){
|
||||
return ResponseResult.success(decorationService.bookingAcceptance(response));
|
||||
LoginUserInfo user = CurrentUserHolder.getUser();
|
||||
return ResponseResult.success(decorationService.bookingAcceptance(response,user));
|
||||
}
|
||||
@ApiOperation("获取三方验收检查项")
|
||||
@GetMapping("/getAcceptanceChecks")
|
||||
|
||||
Reference in New Issue
Block a user