完成部分TODO
This commit is contained in:
@@ -3,6 +3,7 @@ package com.cool.store.dao;
|
|||||||
import com.cool.store.constants.CommonConstants;
|
import com.cool.store.constants.CommonConstants;
|
||||||
import com.cool.store.entity.AcceptanceInfoDO;
|
import com.cool.store.entity.AcceptanceInfoDO;
|
||||||
import com.cool.store.mapper.AcceptanceInfoMapper;
|
import com.cool.store.mapper.AcceptanceInfoMapper;
|
||||||
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.jdbc.core.JdbcTemplate;
|
import org.springframework.jdbc.core.JdbcTemplate;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@@ -43,4 +44,10 @@ public class AcceptanceInfoDAO {
|
|||||||
}
|
}
|
||||||
return acceptanceInfoMapper.selectByShopId(shopId);
|
return acceptanceInfoMapper.selectByShopId(shopId);
|
||||||
}
|
}
|
||||||
|
public List<AcceptanceInfoDO> selectByShopIds (List<Long> shopIds){
|
||||||
|
if (CollectionUtils.isEmpty(shopIds)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return acceptanceInfoMapper.selectByShopIds(shopIds);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ public class AssessmentDataDAO {
|
|||||||
private AssessmentDataMapper assessmentDataMapper;
|
private AssessmentDataMapper assessmentDataMapper;
|
||||||
|
|
||||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
||||||
if (CollectionUtils.isNotEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
if (CollectionUtils.isNotEmpty(assessmentDataDOS)) {
|
||||||
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
for (AssessmentDataDO assessmentDataDO : assessmentDataDOS) {
|
||||||
assessmentDataMapper.insertSelective(assessmentDataDO);
|
assessmentDataMapper.insertSelective(assessmentDataDO);
|
||||||
}
|
}
|
||||||
@@ -31,8 +31,7 @@ public class AssessmentDataDAO {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
|
public Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS) {
|
||||||
if (CollectionUtils.isEmpty(assessmentDataDOS) && assessmentDataDOS.size() > 0) {
|
if (CollectionUtils.isNotEmpty(assessmentDataDOS)) {
|
||||||
|
|
||||||
return assessmentDataMapper.batchUpdate(assessmentDataDOS);
|
return assessmentDataMapper.batchUpdate(assessmentDataDOS);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -69,13 +68,7 @@ public class AssessmentDataDAO {
|
|||||||
public List<AssessmentDataDO> selectListByShopId(Long shopId) {
|
public List<AssessmentDataDO> selectListByShopId(Long shopId) {
|
||||||
return assessmentDataMapper.selectListByShopId(shopId);
|
return assessmentDataMapper.selectListByShopId(shopId);
|
||||||
}
|
}
|
||||||
public Boolean deleteByShopId(Long shopId){
|
|
||||||
if (shopId == null){
|
|
||||||
return Boolean.FALSE;
|
|
||||||
}
|
|
||||||
assessmentDataMapper.deleteByShopId(shopId);
|
|
||||||
return Boolean.TRUE;
|
|
||||||
}
|
|
||||||
public void batchInsertDO(List<AssessmentDataDO> assessmentDataDOList) {
|
public void batchInsertDO(List<AssessmentDataDO> assessmentDataDOList) {
|
||||||
assessmentDataMapper.batchInsert(assessmentDataDOList);
|
assessmentDataMapper.batchInsert(assessmentDataDOList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
|||||||
* @description:三方验收g根据阶段状态
|
* @description:三方验收g根据阶段状态
|
||||||
*/
|
*/
|
||||||
List<AcceptanceInfoDO> selectShopIdListBySignatures(Integer status);
|
List<AcceptanceInfoDO> selectShopIdListBySignatures(Integer status);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Auther: wangshuo
|
* @Auther: wangshuo
|
||||||
* @Date: 2024/4/29
|
* @Date: 2024/4/29
|
||||||
@@ -21,6 +22,9 @@ public interface AcceptanceInfoMapper extends Mapper<AcceptanceInfoDO> {
|
|||||||
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
|
Integer updateByShopIDSelective(AcceptanceInfoDO acceptanceInfoDO);
|
||||||
|
|
||||||
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
|
AcceptanceInfoDO selectByShopId(@Param("shopId") Long shopId);
|
||||||
|
|
||||||
|
List<AcceptanceInfoDO> selectByShopIds(@Param("shopIds") List<Long> shopIds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Auther: wangshuo
|
* @Auther: wangshuo
|
||||||
* @Date: 2024/5/3
|
* @Date: 2024/5/3
|
||||||
|
|||||||
@@ -8,10 +8,18 @@ import tk.mybatis.mapper.common.Mapper;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
public interface AssessmentDataMapper extends Mapper<AssessmentDataDO> {
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2024/5/8
|
||||||
|
* @description:三方验收
|
||||||
|
*/
|
||||||
Integer batchUpdate(List<AssessmentDataDO> AssessmentDataDOS);
|
Integer batchUpdate(List<AssessmentDataDO> AssessmentDataDOS);
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2024/5/8
|
||||||
|
* @description:三方验收
|
||||||
|
*/
|
||||||
List<AssessmentDataDO> selectListByShopId(@Param("shopId") Long shopId);
|
List<AssessmentDataDO> selectListByShopId(@Param("shopId") Long shopId);
|
||||||
Boolean deleteByShopId(@Param("shopId") Long shopId);
|
|
||||||
|
|
||||||
Integer batchInsert(@Param("assessmentDataList") List<AssessmentDataDO> assessmentDataList);
|
Integer batchInsert(@Param("assessmentDataList") List<AssessmentDataDO> assessmentDataList);
|
||||||
|
|
||||||
|
|||||||
@@ -75,7 +75,7 @@
|
|||||||
select
|
select
|
||||||
<include refid="baseColumn"/>
|
<include refid="baseColumn"/>
|
||||||
from xfsg_acceptance_info
|
from xfsg_acceptance_info
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId} and deleted = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectListByActualEntryTime" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
<select id="selectListByActualEntryTime" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||||
select
|
select
|
||||||
@@ -83,5 +83,17 @@
|
|||||||
from xfsg_acceptance_info
|
from xfsg_acceptance_info
|
||||||
where actual_entry_time is null
|
where actual_entry_time is null
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByShopIds" resultType="com.cool.store.entity.AcceptanceInfoDO">
|
||||||
|
select
|
||||||
|
<include refid="baseColumn"/>
|
||||||
|
from xfsg_acceptance_info
|
||||||
|
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>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -58,10 +58,6 @@
|
|||||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||||
WHEN #{item.id} THEN #{item.qualified}
|
WHEN #{item.id} THEN #{item.qualified}
|
||||||
</foreach>,
|
</foreach>,
|
||||||
score = CASE id
|
|
||||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
|
||||||
WHEN #{item.id} THEN #{item.score}
|
|
||||||
</foreach>,
|
|
||||||
reason = CASE id
|
reason = CASE id
|
||||||
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
<foreach collection="AssessmentDataDOS" separator=" " item="item">
|
||||||
WHEN #{item.id} THEN #{item.reason}
|
WHEN #{item.id} THEN #{item.reason}
|
||||||
@@ -78,12 +74,10 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
)
|
)
|
||||||
</update>
|
</update>
|
||||||
<delete id="deleteByShopId">
|
|
||||||
DELETE FROM xfsg_assessment_data WHERE shop_id = #{shopId}
|
|
||||||
</delete>
|
|
||||||
<select id="selectListByShopId" resultType="com.cool.store.entity.AssessmentDataDO">
|
<select id="selectListByShopId" resultType="com.cool.store.entity.AssessmentDataDO">
|
||||||
select *
|
select *
|
||||||
from xfsg_assessment_data
|
from xfsg_assessment_data
|
||||||
where shop_id = #{shopId}
|
where shop_id = #{shopId} and template_id >=75 and template_id <= 108
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -23,11 +23,12 @@
|
|||||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
|
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId"/>
|
||||||
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
<result column="deleted" jdbcType="BIT" property="deleted"/>
|
||||||
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
|
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
|
||||||
|
<result column="amount" jdbcType="VARCHAR" property="amount"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
|
||||||
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
|
||||||
update_time, create_user_id, update_user_id, deleted,pay_business_type
|
update_time, create_user_id, update_user_id, deleted,pay_business_type,amount
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
@@ -106,6 +107,9 @@
|
|||||||
<if test="shopId !=null">
|
<if test="shopId !=null">
|
||||||
shop_id,
|
shop_id,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="amount != null">
|
||||||
|
amount,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="partnerId != null">
|
<if test="partnerId != null">
|
||||||
@@ -168,6 +172,9 @@
|
|||||||
<if test="shopId !=null">
|
<if test="shopId !=null">
|
||||||
#{shopId},
|
#{shopId},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="amount !=null">
|
||||||
|
#{amount},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
|
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
|
||||||
@@ -227,6 +234,9 @@
|
|||||||
<if test="deleted != null">
|
<if test="deleted != null">
|
||||||
deleted = #{deleted,jdbcType=BIT},
|
deleted = #{deleted,jdbcType=BIT},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="amount != null">
|
||||||
|
amount = #{amount,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=BIGINT}
|
where id = #{id,jdbcType=BIGINT}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import javax.persistence.Id;
|
|||||||
@Data
|
@Data
|
||||||
public class AssessmentDataDTO {
|
public class AssessmentDataDTO {
|
||||||
|
|
||||||
|
private Long id;
|
||||||
@ApiModelProperty("模板id")
|
@ApiModelProperty("模板id")
|
||||||
private Long templateId;
|
private Long templateId;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import lombok.Data;
|
|||||||
@Data
|
@Data
|
||||||
public class ProjectDTO {
|
public class ProjectDTO {
|
||||||
@ApiModelProperty("项目主键")
|
@ApiModelProperty("项目主键")
|
||||||
private String projectId;
|
private Long projectId;
|
||||||
@ApiModelProperty("客户编号")
|
@ApiModelProperty("客户编号")
|
||||||
private String clientCode;
|
private String clientCode;
|
||||||
@ApiModelProperty("客户名称")
|
@ApiModelProperty("客户名称")
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: WangShuo
|
||||||
|
* @Date: 2024/05/08/下午7:30
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class xfsgFirstOderDTO {
|
||||||
|
private String storeCode;
|
||||||
|
private Boolean balance;
|
||||||
|
}
|
||||||
@@ -1,17 +1,18 @@
|
|||||||
package com.cool.store.entity;
|
package com.cool.store.entity;
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Builder;
|
import lombok.Builder;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* @author wxp
|
||||||
* @author wxp
|
* @date 2024-03-27 09:25
|
||||||
* @date 2024-03-27 09:25
|
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@@ -80,4 +81,6 @@ public class LinePayDO implements Serializable {
|
|||||||
|
|
||||||
@ApiModelProperty("支付类型 0-缴纳意向金 1-缴纳加盟费 2-装修款")
|
@ApiModelProperty("支付类型 0-缴纳意向金 1-缴纳加盟费 2-装修款")
|
||||||
private Integer payBusinessType;
|
private Integer payBusinessType;
|
||||||
|
@ApiModelProperty("缴费金额")
|
||||||
|
private String amount;
|
||||||
}
|
}
|
||||||
@@ -55,4 +55,6 @@ public class LinePaySubmitRequest {
|
|||||||
private Integer payBusinessType;
|
private Integer payBusinessType;
|
||||||
@ApiModelProperty("铺位id")
|
@ApiModelProperty("铺位id")
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
@ApiModelProperty("缴费金额")
|
||||||
|
private String amount;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ public class PlanListRequest {
|
|||||||
private Date planEndDate;
|
private Date planEndDate;
|
||||||
@ApiModelProperty("选择区域")
|
@ApiModelProperty("选择区域")
|
||||||
private List<String> regionIds;
|
private List<String> regionIds;
|
||||||
@ApiModelProperty("审核状态")
|
@ApiModelProperty("审核结果状态:0.待审核 1. 通过 2. 拒绝")
|
||||||
private Integer resultType;
|
private Integer resultType;
|
||||||
@ApiModelProperty ("页码")
|
@ApiModelProperty ("页码")
|
||||||
private Integer pageNumber;
|
private Integer pageNumber;
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: WangShuo
|
||||||
|
* @Date: 2024/05/08/下午7:48
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class xfsgFirstOrderListRequest {
|
||||||
|
private List<String> storeCodeList;
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
package com.cool.store.response;
|
||||||
|
|
||||||
|
import com.cool.store.dto.xfsgFirstOderDTO;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther: WangShuo
|
||||||
|
* @Date: 2024/05/08/下午7:38
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class xfsgFirstOderListResponse {
|
||||||
|
/**
|
||||||
|
* 返回结果代码
|
||||||
|
*/
|
||||||
|
private long code;
|
||||||
|
|
||||||
|
private List<xfsgFirstOderDTO> data;
|
||||||
|
/**
|
||||||
|
* 提示信息
|
||||||
|
*/
|
||||||
|
private String msg;
|
||||||
|
}
|
||||||
@@ -75,5 +75,7 @@ public class LinePayVO {
|
|||||||
|
|
||||||
@ApiModelProperty("更新人")
|
@ApiModelProperty("更新人")
|
||||||
private String updateUserId;
|
private String updateUserId;
|
||||||
|
@ApiModelProperty("缴费金额")
|
||||||
|
private String amount;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
* @注释:
|
* @注释:
|
||||||
*/
|
*/
|
||||||
public interface AssessmentDataService {
|
public interface AssessmentDataService {
|
||||||
Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS);
|
Boolean batchInsertSelective(List<AssessmentDataDO> assessmentDataDOS);
|
||||||
|
|
||||||
Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS);
|
Integer batchUpdate(List<AssessmentDataDO> assessmentDataDOS);
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,14 @@
|
|||||||
package com.cool.store.service;
|
package com.cool.store.service;
|
||||||
|
|
||||||
|
import com.cool.store.dto.xfsgFirstOderDTO;
|
||||||
import com.cool.store.request.FranchiseAgreementRequest;
|
import com.cool.store.request.FranchiseAgreementRequest;
|
||||||
import com.cool.store.request.NewStoreRequest;
|
import com.cool.store.request.NewStoreRequest;
|
||||||
|
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||||
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 鲜丰水果API(筹备相关)
|
* 鲜丰水果API(筹备相关)
|
||||||
@@ -33,7 +38,12 @@ public interface CoolStoreStartFlowService {
|
|||||||
* @description:获取订货金
|
* @description:获取订货金
|
||||||
*/
|
*/
|
||||||
Boolean getFirstOrder(String shopCode);
|
Boolean getFirstOrder(String shopCode);
|
||||||
|
/**
|
||||||
|
* @Auther: wangshuo
|
||||||
|
* @Date: 2024/5/8
|
||||||
|
* @description:批量获取订货金
|
||||||
|
*/
|
||||||
|
xfsgFirstOderListResponse getFirstOrderList(xfsgFirstOrderListRequest storeCodeList);
|
||||||
/**
|
/**
|
||||||
* 获取证照信息
|
* 获取证照信息
|
||||||
* @param storeNum
|
* @param storeNum
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import com.cool.store.response.ThreeSignResponse;
|
|||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||||
|
import com.cool.store.vo.LinePayVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
import com.cool.store.vo.fitmentCheckVO;
|
import com.cool.store.vo.fitmentCheckVO;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
@@ -66,7 +67,7 @@ public interface DecorationService {
|
|||||||
* @Date: 2024/4/29
|
* @Date: 2024/4/29
|
||||||
* @description:获得装修款信息
|
* @description:获得装修款信息
|
||||||
*/
|
*/
|
||||||
DecorationModelVO getDecorationModel(Long shopId,PartnerUserInfoVO partnerUserInfoVO);
|
LinePayVO getDecorationModel(Long shopId, PartnerUserInfoVO partnerUserInfoVO);
|
||||||
/**
|
/**
|
||||||
* @Auther: wangshuo
|
* @Auther: wangshuo
|
||||||
* @Date: 2024/4/28
|
* @Date: 2024/4/28
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class AssessmentDataServiceImpl implements AssessmentDataService {
|
|||||||
@Resource
|
@Resource
|
||||||
private AssessmentDataDAO assessmentDataDAO;
|
private AssessmentDataDAO assessmentDataDAO;
|
||||||
@Override
|
@Override
|
||||||
public Boolean batchInsert(List<AssessmentDataDO> assessmentDataDOS) {
|
public Boolean batchInsertSelective(List<AssessmentDataDO> assessmentDataDOS) {
|
||||||
if (assessmentDataDOS.isEmpty()) {
|
if (assessmentDataDOS.isEmpty()) {
|
||||||
return Boolean.FALSE;
|
return Boolean.FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.service.impl;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
|
import com.cool.store.dto.xfsgFirstOderDTO;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
import com.cool.store.enums.WorkflowSubStageStatusEnum;
|
||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
@@ -9,9 +10,11 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
import com.cool.store.request.FranchiseAgreementRequest;
|
import com.cool.store.request.FranchiseAgreementRequest;
|
||||||
import com.cool.store.request.NewStoreRequest;
|
import com.cool.store.request.NewStoreRequest;
|
||||||
|
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||||
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
import com.cool.store.response.GetStoreInfoByCodeResponse;
|
||||||
import com.cool.store.response.InitiatingResponse;
|
import com.cool.store.response.InitiatingResponse;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.utils.SecureUtil;
|
import com.cool.store.utils.SecureUtil;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
@@ -21,9 +24,7 @@ import org.springframework.beans.factory.annotation.Value;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@@ -40,7 +41,7 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
private HttpRestTemplateService httpRestTemplateService;
|
private HttpRestTemplateService httpRestTemplateService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResponseResult newStore(NewStoreRequest request,Long shopId) {
|
public ResponseResult newStore(NewStoreRequest request, Long shopId) {
|
||||||
log.info("newStore param:{}", JSONObject.toJSONString(request));
|
log.info("newStore param:{}", JSONObject.toJSONString(request));
|
||||||
if (Objects.isNull(request)) {
|
if (Objects.isNull(request)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
@@ -49,13 +50,13 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
fillSignatureInfo(requestMap);
|
fillSignatureInfo(requestMap);
|
||||||
String url = xfsgUrl + Constants.NEW_STORE_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
String url = xfsgUrl + Constants.NEW_STORE_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||||
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
InitiatingResponse initiatingResponse = httpRestTemplateService.postForObject(url, request, InitiatingResponse.class);
|
||||||
log.info("newStore API response:{}",JSONObject.toJSONString(initiatingResponse));
|
log.info("newStore API response:{}", JSONObject.toJSONString(initiatingResponse));
|
||||||
if (initiatingResponse.getCode() != 0L){
|
if (initiatingResponse.getCode() != 0L) {
|
||||||
return new ResponseResult(500,initiatingResponse.getMsg(),initiatingResponse.getData());
|
return new ResponseResult(500, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||||
}else {
|
} else {
|
||||||
//更新阶段信息
|
//更新阶段信息
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31,null);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_31, null);
|
||||||
return new ResponseResult(200000,initiatingResponse.getMsg(),initiatingResponse.getData());
|
return new ResponseResult(200000, initiatingResponse.getMsg(), initiatingResponse.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,7 +94,7 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
fillSignatureInfo(requestMap);
|
fillSignatureInfo(requestMap);
|
||||||
try {
|
try {
|
||||||
String url = xfsgUrl + Constants.FIRST_ORDER +
|
String url = xfsgUrl + Constants.FIRST_ORDER +
|
||||||
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature")+
|
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature") +
|
||||||
"&storeCode=" + shopCode;
|
"&storeCode=" + shopCode;
|
||||||
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
JSONObject jsonObject = httpRestTemplateService.getForObject(url, JSONObject.class, new HashMap<>());
|
||||||
log.info("get url:{},jsonObject:{}", url, jsonObject);
|
log.info("get url:{},jsonObject:{}", url, jsonObject);
|
||||||
@@ -101,27 +102,45 @@ public class CoolStoreStartFlowServiceImpl implements CoolStoreStartFlowService
|
|||||||
return flag;
|
return flag;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("获取鲜丰订货金异常", e);
|
log.error("获取鲜丰订货金异常", e);
|
||||||
throw new ServiceException(ErrorCodeEnum. GET_FIRST_ORDER);
|
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public xfsgFirstOderListResponse getFirstOrderList(xfsgFirstOrderListRequest storeCodeList) {
|
||||||
|
log.info("getFirstOrderList storeCodeList:{}", storeCodeList);
|
||||||
|
if (Objects.isNull(storeCodeList)) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
|
||||||
|
}
|
||||||
|
Map<String, Object> requestMap = new HashMap<>();
|
||||||
|
fillSignatureInfo(requestMap);
|
||||||
|
try {
|
||||||
|
String url = xfsgUrl + Constants.BATCH_FIRST_ORDER +
|
||||||
|
"?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||||
|
xfsgFirstOderListResponse xfsgFirstOderListResponse = httpRestTemplateService.postForObject(url, storeCodeList, xfsgFirstOderListResponse.class);
|
||||||
|
return xfsgFirstOderListResponse;
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("获取鲜丰订货金异常", e);
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public GetStoreInfoByCodeResponse getStoreInfoCode(String storeNum) {
|
public GetStoreInfoByCodeResponse getStoreInfoCode(String storeNum) {
|
||||||
log.info("getStoreInfoCode storeNum:{}",storeNum);
|
log.info("getStoreInfoCode storeNum:{}", storeNum);
|
||||||
if (StringUtils.isBlank(storeNum)){
|
if (StringUtils.isBlank(storeNum)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.STORE_NUM_NOT_FOUND);
|
throw new ServiceException(ErrorCodeEnum.STORE_NUM_NOT_FOUND);
|
||||||
}
|
}
|
||||||
Map<String, Object> requestMap = new HashMap<>();
|
Map<String, Object> requestMap = new HashMap<>();
|
||||||
fillSignatureInfo(requestMap);
|
fillSignatureInfo(requestMap);
|
||||||
requestMap.put("storeCode",storeNum);
|
requestMap.put("storeCode", storeNum);
|
||||||
String url = xfsgUrl + Constants.GET_STORE_INFO_BY_CODE + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
String url = xfsgUrl + Constants.GET_STORE_INFO_BY_CODE + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
|
||||||
GetStoreInfoByCodeResponse response = httpRestTemplateService.getForObject(url, GetStoreInfoByCodeResponse.class, requestMap);
|
GetStoreInfoByCodeResponse response = httpRestTemplateService.getForObject(url, GetStoreInfoByCodeResponse.class, requestMap);
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
private void fillSignatureInfo(Map<String, Object> requestMap) {
|
||||||
long timestamp = System.currentTimeMillis();
|
long timestamp = System.currentTimeMillis();
|
||||||
String signature = SecureUtil.getSignature(timestamp);
|
String signature = SecureUtil.getSignature(timestamp);
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import com.cool.store.response.FitmentResponse;
|
|||||||
|
|
||||||
import com.cool.store.response.ThreeSignResponse;
|
import com.cool.store.response.ThreeSignResponse;
|
||||||
import com.cool.store.service.*;
|
import com.cool.store.service.*;
|
||||||
|
import com.cool.store.utils.CoolDateUtils;
|
||||||
import com.cool.store.utils.poi.StringUtils;
|
import com.cool.store.utils.poi.StringUtils;
|
||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||||
@@ -37,6 +38,7 @@ import com.github.pagehelper.PageHelper;
|
|||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -129,7 +131,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
log.error("拉取云立方接口获取数据为空");
|
log.error("拉取云立方接口获取数据为空");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
Long flag ;
|
Long flag;
|
||||||
DesignInfoVo designInfoVo = new DesignInfoVo();
|
DesignInfoVo designInfoVo = new DesignInfoVo();
|
||||||
//平面图和施工
|
//平面图和施工
|
||||||
List<DesignSchemeDTO> designScheme = decoration.getDesignScheme();
|
List<DesignSchemeDTO> designScheme = decoration.getDesignScheme();
|
||||||
@@ -146,25 +148,22 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
if (Objects.nonNull(measuringRoom)) {
|
if (Objects.nonNull(measuringRoom)) {
|
||||||
designInfoVo.setMeasuringRoom(measuringRoom);
|
designInfoVo.setMeasuringRoom(measuringRoom);
|
||||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(measuringRoom.getState())) {
|
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(measuringRoom.getState())) {
|
||||||
flag++;
|
flag++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//预算 TODO 产品
|
//获取最新预算
|
||||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
if (Objects.nonNull(proposedBookBudget)) {
|
||||||
if (!proposedBookBudget.isEmpty()) {
|
designInfoVo.setProposedBookBudget(proposedBookBudget);
|
||||||
BudgetDTO budgetDTO = proposedBookBudget.get(CommonConstants.ZERO);
|
|
||||||
designInfoVo.setProposedBookBudget(budgetDTO);
|
|
||||||
flag++;
|
flag++;
|
||||||
}
|
}
|
||||||
if (flag == CommonConstants.FOUR) {
|
if (flag == 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())) {
|
equals(shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_9).getShopSubStageStatus())) {
|
||||||
//更新设计阶段状态完成
|
//更新设计阶段状态完成//初始化装修款阶段
|
||||||
//初始化装修款阶段
|
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91,
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91,
|
||||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_100));
|
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_100));
|
||||||
}
|
}
|
||||||
@@ -196,24 +195,29 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//预算
|
//预算
|
||||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||||
if (CollectionUtils.isEmpty(proposedBookBudget)) {
|
if (proposedBookBudget == null) return null;
|
||||||
log.error("云立方获取预算 is null");
|
String vzHj = proposedBookBudget.getVzHj();
|
||||||
return null;
|
|
||||||
}
|
|
||||||
//TODO 抽出
|
|
||||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
|
||||||
//TODO 产品是否 最新
|
|
||||||
String totalAmount = proposedBookBudget.get(0).getTotalAmount();
|
|
||||||
//支付二维码url
|
//支付二维码url
|
||||||
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
Long regionId = shopInfoDAO.getRegionIdByid(shopId);
|
||||||
String payPic = regionQrcodeConfigDao.getPayPicByRegionId(regionId);
|
String payPic = regionQrcodeConfigDao.getPayPicByRegionId(regionId);
|
||||||
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
DecorationModelDTO decorationModelDTO = new DecorationModelDTO();
|
||||||
decorationModelDTO.setPayUrl(payPic);
|
decorationModelDTO.setPayUrl(payPic);
|
||||||
decorationModelDTO.setTotalAmount(totalAmount);
|
decorationModelDTO.setTotalAmount(vzHj);
|
||||||
return decorationModelDTO;
|
return decorationModelDTO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static @Nullable BudgetDTO getBudgetDTOS(DecorationDTO decoration) {
|
||||||
|
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
||||||
|
if (CollectionUtils.isEmpty(proposedBookBudget)) {
|
||||||
|
log.error("云立方获取预算 is null");
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
||||||
|
BudgetDTO budgetDTO = proposedBookBudget.get(CommonConstants.ZERO);
|
||||||
|
return budgetDTO;
|
||||||
|
}
|
||||||
|
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
@Override
|
@Override
|
||||||
public String submitDecorationModel(LinePaySubmitRequest request, PartnerUserInfoVO partnerUserInfoVO) {
|
public String submitDecorationModel(LinePaySubmitRequest request, PartnerUserInfoVO partnerUserInfoVO) {
|
||||||
@@ -237,32 +241,16 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public DecorationModelVO getDecorationModel(Long shopId, PartnerUserInfoVO partnerUserInfoVO) {
|
public LinePayVO getDecorationModel(Long shopId, PartnerUserInfoVO partnerUserInfoVO) {
|
||||||
//获取支付信息
|
//获取支付信息
|
||||||
//Todo getLinePayInfo
|
LinePayVO linePayInfo = linePayService.getLinePayInfo(partnerUserInfoVO.getLineId(), PayBusinessTypeEnum.DECORATION_MODEL.getCode(), shopId);
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
|
||||||
Long lineId = shopInfo.getLineId();
|
|
||||||
LinePayVO linePayInfo = linePayService.getLinePayInfo(lineId, PayBusinessTypeEnum.DECORATION_MODEL.getCode(), shopId);
|
|
||||||
if (Objects.isNull(linePayInfo)) {
|
if (Objects.isNull(linePayInfo)) {
|
||||||
log.error("LinePayInfo is null");
|
log.error("LinePayInfo is null");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
//获取装修款阶段状态
|
|
||||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_10);
|
|
||||||
if (Objects.isNull(shopSubStageInfo)) {
|
|
||||||
log.error("getDecorationModel , shopSubStageInfo is null");
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
//已缴费直接返回支付信息
|
//已缴费直接返回支付信息
|
||||||
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
|
if (((byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue() == linePayInfo.getPayType())) {
|
||||||
DecorationModelVO decorationModelVO = new DecorationModelVO();
|
return linePayInfo;
|
||||||
BeanUtil.copyProperties(linePayInfo, decorationModelVO);
|
|
||||||
return decorationModelVO;
|
|
||||||
}
|
|
||||||
//PC端不传partnerUserInfoVO,直接取region
|
|
||||||
if (Objects.isNull(partnerUserInfoVO)) {
|
|
||||||
partnerUserInfoVO = new PartnerUserInfoVO();
|
|
||||||
BeanUtil.copyProperties(shopInfo, partnerUserInfoVO);
|
|
||||||
}
|
}
|
||||||
//云立方
|
//云立方
|
||||||
DecorationDTO decoration = getDecorationDTO(shopId);
|
DecorationDTO decoration = getDecorationDTO(shopId);
|
||||||
@@ -270,28 +258,23 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
log.error("拉取云立方接口获取数据为空");
|
log.error("拉取云立方接口获取数据为空");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<BudgetDTO> proposedBookBudget = decoration.getProposedBookBudget();
|
BudgetDTO proposedBookBudget = getBudgetDTOS(decoration);
|
||||||
Collections.sort(decoration.getProposedBookBudget(), (x1, x2) -> x2.getId().compareTo(x1.getId()));
|
if (Objects.isNull(proposedBookBudget)) {
|
||||||
if (proposedBookBudget.isEmpty()) {
|
|
||||||
log.error("拉取云立方接口获取缴费信息为空");
|
log.error("拉取云立方接口获取缴费信息为空");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
String totalAmount = proposedBookBudget.get(0).getTotalAmount();
|
String totalAmount = proposedBookBudget.getTotalAmount();
|
||||||
//已完成 TODO 改状态是否能单独提出
|
//已完成
|
||||||
if (!decoration.getPayment().isEmpty()) {
|
if (CollectionUtils.isNotEmpty(decoration.getPayment())) {
|
||||||
linePayInfo.setPayStatus((byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue());
|
linePayInfo.setPayStatus((byte) WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue());
|
||||||
LinePaySubmitRequest submitRequest = new LinePaySubmitRequest();
|
LinePaySubmitRequest submitRequest = new LinePaySubmitRequest();
|
||||||
BeanUtil.copyProperties(linePayInfo, submitRequest);
|
submitRequest.setLineId(linePayInfo.getLineId());
|
||||||
|
submitRequest.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode().intValue());
|
||||||
linePayService.submitPayInfo(submitRequest, partnerUserInfoVO);
|
linePayService.submitPayInfo(submitRequest, partnerUserInfoVO);
|
||||||
//更新阶段状态
|
//更新阶段状态
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102);
|
||||||
|
|
||||||
}
|
}
|
||||||
DecorationModelVO decorationModelVO = new DecorationModelVO();
|
return linePayInfo;
|
||||||
BeanUtil.copyProperties(linePayInfo, decorationModelVO);
|
|
||||||
decorationModelVO.setAmount(totalAmount);
|
|
||||||
return decorationModelVO;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -302,51 +285,55 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
List<ConstructionScheduleDTO> constructionSchedule = decoration.getConstructionSchedule();
|
||||||
Map<String, ConstructionScheduleDTO> constructionScheduleMap = constructionSchedule.stream().collect(Collectors.toMap(ConstructionScheduleDTO::getName,
|
|
||||||
dto -> dto));
|
|
||||||
List<ConstructionScheduleDTO> collect = new ArrayList<>();
|
List<ConstructionScheduleDTO> collect = new ArrayList<>();
|
||||||
//TODO 把namefangjinlist 用collect.contains()
|
List<String> name = new ArrayList<>();
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.APPROACH));
|
name.add(CommonConstants.APPROACH);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.ONE_DAY));
|
name.add(CommonConstants.ONE_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.TWO_DAY));
|
name.add(CommonConstants.TWO_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.THREE_DAY));
|
name.add(CommonConstants.THREE_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.FOUR_DAY));
|
name.add(CommonConstants.FOUR_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.FIVE_DAY));
|
name.add(CommonConstants.FIVE_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.SIX_DAY));
|
name.add(CommonConstants.SIX_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.SEVEN_DAY));
|
name.add(CommonConstants.SEVEN_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.EIGHT_DAY));
|
name.add(CommonConstants.EIGHT_DAY);
|
||||||
collect.add(constructionScheduleMap.get(CommonConstants.WITHDRAWAL));
|
name.add(CommonConstants.WITHDRAWAL);
|
||||||
collect.sort(Comparator.comparing(ConstructionScheduleDTO::getId));
|
ConstructionScheduleDTO approach = new ConstructionScheduleDTO();
|
||||||
//设置进场时间xfsg_acceptance_info TODO 用工具类
|
ConstructionScheduleDTO constructionSage = new ConstructionScheduleDTO();
|
||||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
for (ConstructionScheduleDTO constructionScheduleDTO : constructionSchedule) {
|
||||||
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(constructionScheduleMap.get(CommonConstants.APPROACH).getActualBeginDate())) {
|
if (name.contains(constructionScheduleDTO.getName())) {
|
||||||
|
collect.add(constructionScheduleDTO);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
if (constructionScheduleDTO.getName().equals(CommonConstants.APPROACH)) {
|
||||||
try {
|
approach = constructionScheduleDTO;
|
||||||
Date date = sdf.parse(constructionScheduleMap.get(CommonConstants.APPROACH).getActualBeginDate());
|
}
|
||||||
acceptanceInfoDO.setActualEntryTime(date);
|
}
|
||||||
} catch (ParseException e) {
|
if (constructionScheduleDTO.getName().equals(CommonConstants.CONSTRUCTION_PHASE)) {
|
||||||
log.error("转化进场时间类型异常");
|
constructionSage = constructionScheduleDTO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//施工完成时间,计划开始和完成时间 //TODO 工具类处理为空
|
//设置进场时间xfsg_acceptance_info
|
||||||
if (StringUtils.isNotEmpty(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getActualEndDate())) {
|
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
if (Objects.nonNull(acceptanceInfoDO) && StringUtils.isNotEmpty(approach.getActualBeginDate())) {
|
||||||
try {
|
Date date = CoolDateUtils.parseDate(approach.getActualBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
Date constructionEndTime = sdf.parse(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getActualEndDate());
|
acceptanceInfoDO.setActualEntryTime(date);
|
||||||
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);
|
if (StringUtils.isNotEmpty(constructionSage.getActualEndDate())) {
|
||||||
acceptanceInfoDO.setDecorationPlannedCompletionTime(PlanEnd);
|
Date date = CoolDateUtils.parseDate(constructionSage.getActualEndDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
} catch (ParseException e) {
|
acceptanceInfoDO.setConstructionCompletionTime(date);
|
||||||
log.error("鲜丰服务施工完成时间日期转化异常");
|
}
|
||||||
}
|
if (StringUtils.isNotEmpty(constructionSage.getPlanBeginDate())) {
|
||||||
|
Date date = CoolDateUtils.parseDate(constructionSage.getPlanBeginDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
|
acceptanceInfoDO.setPlannedStartTime(date);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotEmpty(constructionSage.getPlanEndDate())) {
|
||||||
|
Date date = CoolDateUtils.parseDate(constructionSage.getPlanEndDate(), CoolDateUtils.DATE_FORMAT_DAY);
|
||||||
|
acceptanceInfoDO.setPlannedCompletionTime(date);
|
||||||
}
|
}
|
||||||
acceptanceInfoDO.setUpdateTime(new Date());
|
acceptanceInfoDO.setUpdateTime(new Date());
|
||||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||||
//如果完成更新施工阶段状态
|
//如果完成更新施工阶段状态
|
||||||
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionScheduleMap.get(CommonConstants.CONSTRUCTION_PHASE).getState())) {
|
if (ConstructionPhaseEnum.construction_FINSH.getCode().equals(constructionSage.getState())) {
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
|
||||||
} else {
|
} else {
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111);
|
||||||
@@ -387,30 +374,31 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean submitThreeCheck(ThreeAcceptanceCheckRequest request) {
|
public Boolean submitThreeCheck(ThreeAcceptanceCheckRequest request) {
|
||||||
log.info("submitThreeCheck, request:{} ", JSONObject.toJSONString(request));
|
log.info("submitThreeCheck, request:{} ", JSONObject.toJSONString(request));
|
||||||
//TODO 未确定
|
|
||||||
Boolean flag = assessmentDataDAO.deleteByShopId(request.getShopId());
|
List<AssessmentDataDO> assessmentDataDOList = assessmentDataDAO.selectListByShopId(request.getShopId());
|
||||||
if (Boolean.FALSE.equals(flag)) {
|
|
||||||
log.error("三方验收插入检查项失败");
|
|
||||||
throw new ServiceException(ErrorCodeEnum.CHECK_ITEM);
|
|
||||||
}
|
|
||||||
List<AssessmentDataDO> assessmentDataDOS = new ArrayList<>();
|
List<AssessmentDataDO> assessmentDataDOS = new ArrayList<>();
|
||||||
for (AssessmentDataDTO assessmentDataDTO : request.getAssessmentDataDTOS()) {
|
for (AssessmentDataDTO assessmentDataDTO : request.getAssessmentDataDTOS()) {
|
||||||
AssessmentDataDO assessmentDataDO = new AssessmentDataDO();
|
AssessmentDataDO assessmentDataDO = new AssessmentDataDO();
|
||||||
BeanUtil.copyProperties(assessmentDataDTO, assessmentDataDO);
|
assessmentDataDO.setId(assessmentDataDTO.getId());
|
||||||
|
assessmentDataDO.setTemplateId(assessmentDataDTO.getTemplateId());
|
||||||
|
assessmentDataDO.setQualified(assessmentDataDTO.getQualified());
|
||||||
|
assessmentDataDO.setReason(assessmentDataDTO.getReason());
|
||||||
|
assessmentDataDO.setComments(assessmentDataDTO.getComments());
|
||||||
assessmentDataDO.setShopId(request.getShopId());
|
assessmentDataDO.setShopId(request.getShopId());
|
||||||
assessmentDataDOS.add(assessmentDataDO);
|
assessmentDataDOS.add(assessmentDataDO);
|
||||||
}
|
}
|
||||||
Boolean assessment = assessmentDataService.batchInsert(assessmentDataDOS);
|
if (CollectionUtils.isNotEmpty(assessmentDataDOList)) {
|
||||||
if (assessment == Boolean.FALSE) {
|
assessmentDataService.batchUpdate(assessmentDataDOS);
|
||||||
log.error("三方验收插入检查项失败");
|
|
||||||
throw new ServiceException(ErrorCodeEnum.CHECK_ITEM);
|
} else {
|
||||||
|
assessmentDataService.batchInsertSelective(assessmentDataDOS);
|
||||||
}
|
}
|
||||||
return assessment;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThreeAcceptanceCheckRequest getThreeChecks(Long shopId) {
|
public ThreeAcceptanceCheckRequest getThreeChecks(Long shopId) {
|
||||||
//sql 确定范围
|
//todo sql 确定范围
|
||||||
List<AssessmentDataDO> assessmentDataDOS = assessmentDataDAO.selectListByShopId(shopId);
|
List<AssessmentDataDO> assessmentDataDOS = assessmentDataDAO.selectListByShopId(shopId);
|
||||||
if (CollectionUtils.isEmpty(assessmentDataDOS)) {
|
if (CollectionUtils.isEmpty(assessmentDataDOS)) {
|
||||||
log.error("该用户门店三方验收检查项为空");
|
log.error("该用户门店三方验收检查项为空");
|
||||||
@@ -463,7 +451,8 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user, Integer pageNum, Integer pageSize) {
|
public PageInfo<fitmentCheckVO> getFitmentAcceptanceList(Integer subStageStatus, LoginUserInfo user, Integer
|
||||||
|
pageNum, Integer pageSize) {
|
||||||
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
List<String> authRegionIds = userAuthMappingService.getAuthRegionIdAndSubRegionIdByUserId(user.getUserId());
|
||||||
List<Long> regions = new ArrayList<>();
|
List<Long> regions = new ArrayList<>();
|
||||||
for (String authRegionId : authRegionIds) {
|
for (String authRegionId : authRegionIds) {
|
||||||
@@ -572,7 +561,7 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||||
//营运部验收签名
|
//营运部 验收签名
|
||||||
try {
|
try {
|
||||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||||
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
|
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
|
||||||
@@ -646,8 +635,6 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
|
|
||||||
|
|
||||||
private DecorationDTO getDecorationDTO(Long shopId) {
|
private DecorationDTO getDecorationDTO(Long shopId) {
|
||||||
|
|
||||||
//TODO
|
|
||||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||||
if (Objects.isNull(shopInfo)) {
|
if (Objects.isNull(shopInfo)) {
|
||||||
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.SHOP_ID_NOT_EXIST);
|
||||||
@@ -655,8 +642,8 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
String storeNum = shopInfo.getStoreNum();
|
String storeNum = shopInfo.getStoreNum();
|
||||||
if (StringUtils.isNotEmpty(storeNum)) {
|
if (StringUtils.isNotEmpty(storeNum)) {
|
||||||
ProjectDTO projectList = ylfService.getProjectList(storeNum);
|
ProjectDTO projectList = ylfService.getProjectList(storeNum);
|
||||||
String projectId = projectList.getProjectId();
|
Long projectId = projectList.getProjectId();
|
||||||
DecorationDTO decoration = ylfService.getDecoration(Long.parseLong(projectId));
|
DecorationDTO decoration = ylfService.getDecoration(projectId);
|
||||||
return decoration;
|
return decoration;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -137,6 +137,7 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
linePayDO.setUpdateTime(new Date());
|
linePayDO.setUpdateTime(new Date());
|
||||||
linePayDO.setUpdateUserId(partnerUser.getPartnerId());
|
linePayDO.setUpdateUserId(partnerUser.getPartnerId());
|
||||||
}
|
}
|
||||||
|
linePayDO.setAmount(request.getAmount());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,9 +16,7 @@ import org.springframework.stereotype.Service;
|
|||||||
import springfox.documentation.spring.web.json.Json;
|
import springfox.documentation.spring.web.json.Json;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.HashMap;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author suzhuhong
|
* @Author suzhuhong
|
||||||
@@ -48,7 +46,7 @@ public class YlfServiceImpl implements YlfService {
|
|||||||
if (data == null) {
|
if (data == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
RowsDTO rowsDTOS = JSONObject.parseObject(JSONObject.toJSONString( data), RowsDTO.class);
|
RowsDTO rowsDTOS = JSONObject.parseObject(JSONObject.toJSONString(data), RowsDTO.class);
|
||||||
List<DecorationDTO> list = rowsDTOS.getRows();
|
List<DecorationDTO> list = rowsDTOS.getRows();
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
return list.get(0);
|
return list.get(0);
|
||||||
@@ -69,20 +67,24 @@ public class YlfServiceImpl implements YlfService {
|
|||||||
log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}", url);
|
log.info("CoolStoreStartFlowServiceImpl#getOrder, url:{}", url);
|
||||||
try {
|
try {
|
||||||
String jsonString = httpRestTemplateService.getForObject(url, String.class, new HashMap<>());
|
String jsonString = httpRestTemplateService.getForObject(url, String.class, new HashMap<>());
|
||||||
//TODO
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(jsonString);
|
JSONObject jsonObject = JSONObject.parseObject(jsonString);
|
||||||
Object data = JSONObject.parseObject(jsonString, JSONObject.class).get("data");
|
Integer status = (Integer) JSONObject.parseObject(jsonString, JSONObject.class).get("status");
|
||||||
|
if (status != 200) {
|
||||||
|
log.info("获取云立方装修公司信息失败,storeNum:{}", storeNum);
|
||||||
|
throw new ServiceException(ErrorCodeEnum.YLF_ERROR);
|
||||||
|
}
|
||||||
|
JSONObject data = jsonObject.getJSONObject("data");
|
||||||
log.info("CoolStoreStartFlowServiceImpl#getOrder,jsonObject:{}", jsonObject);
|
log.info("CoolStoreStartFlowServiceImpl#getOrder,jsonObject:{}", jsonObject);
|
||||||
//TODO
|
if (Objects.nonNull(data)) {
|
||||||
if (jsonObject.get("status").equals(Constants.SUCCESS)) {
|
|
||||||
if (Objects.isNull(data)) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
DesignRowsDTO designRowsDTO = JSONObject.parseObject(JSONObject.toJSONString(data), DesignRowsDTO.class);
|
DesignRowsDTO designRowsDTO = JSONObject.parseObject(JSONObject.toJSONString(data), DesignRowsDTO.class);
|
||||||
List<ProjectDTO> rows = designRowsDTO.getRows();
|
List<ProjectDTO> rows = designRowsDTO.getRows();
|
||||||
if (CollectionUtils.isNotEmpty(rows)) {
|
if (CollectionUtils.isNotEmpty(rows)) {
|
||||||
//TODO 排序
|
Collections.sort(rows, new Comparator<ProjectDTO>() {
|
||||||
|
@Override
|
||||||
|
public int compare(ProjectDTO p1, ProjectDTO p2) {
|
||||||
|
return Long.compare(p2.getProjectId(), p1.getProjectId()); // 降序排序
|
||||||
|
}
|
||||||
|
}); // 降序排序
|
||||||
return rows.get(0);
|
return rows.get(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -94,7 +96,8 @@ public class YlfServiceImpl implements YlfService {
|
|||||||
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
|
throw new ServiceException(ErrorCodeEnum.XFSG_SERVICE_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;}
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -203,6 +203,7 @@ public class Constants
|
|||||||
public static final String GET_PROJECT_DETAIL= "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails";
|
public static final String GET_PROJECT_DETAIL= "https://hzly.cloudcubic.net/ajaxHandle/synchronization/JCallBackSynchronizationHandler.ashx?action=app&controller=GetProjectDetails";
|
||||||
|
|
||||||
public static final String FIRST_ORDER = "/api/kdz/get-store-balance";
|
public static final String FIRST_ORDER = "/api/kdz/get-store-balance";
|
||||||
|
public static final String BATCH_FIRST_ORDER = "/api/kdz/list-store-balance";
|
||||||
|
|
||||||
public static String AVATAR_DEFAULT = "https://oss-store.coolcollege.cn/eid/e17cd2dc350541df8a8b0af9bd27f77d/2404/53308197437354940.png";
|
public static String AVATAR_DEFAULT = "https://oss-store.coolcollege.cn/eid/e17cd2dc350541df8a8b0af9bd27f77d/2404/53308197437354940.png";
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ import com.cool.store.response.ThreeSignResponse;
|
|||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||||
|
import com.cool.store.vo.LinePayVO;
|
||||||
import com.cool.store.vo.OpeningOperationPlanListVO;
|
import com.cool.store.vo.OpeningOperationPlanListVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
import com.cool.store.vo.fitmentCheckVO;
|
import com.cool.store.vo.fitmentCheckVO;
|
||||||
@@ -56,7 +57,7 @@ public class PCDecorationController {
|
|||||||
}
|
}
|
||||||
@ApiOperation("获取装修款信息")
|
@ApiOperation("获取装修款信息")
|
||||||
@GetMapping("/getDecorationModelInfo")
|
@GetMapping("/getDecorationModelInfo")
|
||||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
|
return ResponseResult.success(decorationService.getDecorationModel(shopId,null));
|
||||||
}
|
}
|
||||||
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
@ApiOperation("获取验收列表:三方验收1200待预约,1210 待验收,1220验收中,1230已验收;视觉验收:1300待验收,1310验收不通过,1320验收通过")
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import com.cool.store.vo.AssessmentTemplateVO;
|
|||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
import com.cool.store.vo.Fitment.DecorationModelVO;
|
import com.cool.store.vo.Fitment.DecorationModelVO;
|
||||||
import com.cool.store.vo.Fitment.DesignInfoVo;
|
import com.cool.store.vo.Fitment.DesignInfoVo;
|
||||||
|
import com.cool.store.vo.LinePayVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -74,7 +75,7 @@ public class MiniDecorationController {
|
|||||||
|
|
||||||
@ApiOperation("获取装修款详情信息")
|
@ApiOperation("获取装修款详情信息")
|
||||||
@GetMapping("/getDecorationModelInfo")
|
@GetMapping("/getDecorationModelInfo")
|
||||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
public ResponseResult<LinePayVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,10 @@ import com.cool.store.dao.*;
|
|||||||
import com.cool.store.dto.OpenCityDTO;
|
import com.cool.store.dto.OpenCityDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
import com.cool.store.mapper.HyOpenAreaInfoMapper;
|
||||||
|
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
|
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||||
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.RegionService;
|
import com.cool.store.service.RegionService;
|
||||||
import com.cool.store.utils.poi.ExcelUtil;
|
import com.cool.store.utils.poi.ExcelUtil;
|
||||||
import com.cool.store.vo.RegionPathNameVO;
|
import com.cool.store.vo.RegionPathNameVO;
|
||||||
@@ -24,7 +27,8 @@ import java.util.concurrent.Future;
|
|||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/test")
|
@RequestMapping("/test")
|
||||||
public class TestController {
|
public class TestController {
|
||||||
|
@Resource
|
||||||
|
private CoolStoreStartFlowService coolStoreStartFlowService;
|
||||||
@Resource
|
@Resource
|
||||||
private EnterpriseUserDAO enterpriseUserDAO;
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
|
|
||||||
@@ -46,7 +50,11 @@ public class TestController {
|
|||||||
@Resource
|
@Resource
|
||||||
private RegionService regionService;
|
private RegionService regionService;
|
||||||
|
|
||||||
|
@PostMapping("/getFirstOrders")
|
||||||
|
public ResponseResult<xfsgFirstOderListResponse> getFirstOrders(@RequestBody xfsgFirstOrderListRequest storeCodeList) {
|
||||||
|
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(storeCodeList);
|
||||||
|
return ResponseResult.success(firstOrderList);
|
||||||
|
}
|
||||||
@PostMapping("/importCity")
|
@PostMapping("/importCity")
|
||||||
public ResponseResult<Integer> importCity(MultipartFile file){
|
public ResponseResult<Integer> importCity(MultipartFile file){
|
||||||
ExcelUtil<OpenCityDTO> util = new ExcelUtil<>(OpenCityDTO.class);
|
ExcelUtil<OpenCityDTO> util = new ExcelUtil<>(OpenCityDTO.class);
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import com.cool.store.constants.CommonConstants;
|
|||||||
import com.cool.store.dao.*;
|
import com.cool.store.dao.*;
|
||||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||||
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
import com.cool.store.dto.openPreparation.OpenPlanShopInfoDTO;
|
||||||
|
import com.cool.store.dto.xfsgFirstOderDTO;
|
||||||
import com.cool.store.entity.AcceptanceInfoDO;
|
import com.cool.store.entity.AcceptanceInfoDO;
|
||||||
import com.cool.store.entity.LeaseBaseInfoDO;
|
import com.cool.store.entity.LeaseBaseInfoDO;
|
||||||
import com.cool.store.entity.LineInterviewDO;
|
import com.cool.store.entity.LineInterviewDO;
|
||||||
@@ -17,6 +18,8 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.mapper.LineInfoMapper;
|
import com.cool.store.mapper.LineInfoMapper;
|
||||||
import com.cool.store.mapper.TrainingExperienceMapper;
|
import com.cool.store.mapper.TrainingExperienceMapper;
|
||||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||||
|
import com.cool.store.request.xfsgFirstOrderListRequest;
|
||||||
|
import com.cool.store.response.xfsgFirstOderListResponse;
|
||||||
import com.cool.store.service.CoolStoreStartFlowService;
|
import com.cool.store.service.CoolStoreStartFlowService;
|
||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
@@ -131,23 +134,18 @@ public class XxlJobHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIdListByStageStatus);
|
List<OpenPlanShopInfoDTO> openPlanShopInfoDTOS = shopInfoDAO.queryStoreNumeListByid(shopIdListByStageStatus);
|
||||||
Map<Long, String> map = openPlanShopInfoDTOS.stream().
|
Map<String, Long> map = openPlanShopInfoDTOS.stream().filter(OpenPlanShopInfoDTO -> OpenPlanShopInfoDTO.getStoreNum() != null).
|
||||||
collect(Collectors.toMap(OpenPlanShopInfoDTO::getShopId, OpenPlanShopInfoDTO::getStoreNum));
|
collect(Collectors.toMap(OpenPlanShopInfoDTO::getStoreNum, OpenPlanShopInfoDTO::getShopId));
|
||||||
for (Long shopId : map.keySet()) {
|
List<String> storeCodes = new ArrayList<>(map.keySet());
|
||||||
String shopCode = map.get(shopId);
|
xfsgFirstOrderListRequest request = new xfsgFirstOrderListRequest();
|
||||||
try {
|
request.setStoreCodeList(storeCodes);
|
||||||
// TOdo 能不能一次调用
|
xfsgFirstOderListResponse firstOrderList = coolStoreStartFlowService.getFirstOrderList(request);
|
||||||
Boolean firstOrder = coolStoreStartFlowService.getFirstOrder(shopCode);
|
if (Objects.nonNull(firstOrderList) && CollectionUtils.isNotEmpty(firstOrderList.getData())) {
|
||||||
|
for (xfsgFirstOderDTO o : firstOrderList.getData()) {
|
||||||
if (firstOrder == null) {
|
if (o.getBalance()) {
|
||||||
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(map.get(o.getStoreCode()), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
|
||||||
|
preparationService.whetherToOpenForAcceptance(map.get(o.getStoreCode()));
|
||||||
}
|
}
|
||||||
if (firstOrder) {
|
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
|
|
||||||
preparationService.whetherToOpenForAcceptance(shopId);
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
log.error("获取鲜丰订货金异常", e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
hasNext = shopIdListByStageStatus.size() >= PageSize;
|
hasNext = shopIdListByStageStatus.size() >= PageSize;
|
||||||
@@ -178,10 +176,7 @@ public class XxlJobHandler {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
List<AcceptanceInfoDO> acceptanceInfoDOS = new ArrayList<>();
|
List<AcceptanceInfoDO> acceptanceInfoDOS = new ArrayList<>();
|
||||||
for (Long shopId : shops) {
|
acceptanceInfoDOS.addAll(acceptanceInfoDAO.selectByShopIds(shops));
|
||||||
//TODO ids查
|
|
||||||
acceptanceInfoDOS.add(acceptanceInfoDAO.selectByShopId(shopId));
|
|
||||||
}
|
|
||||||
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOS) {
|
for (AcceptanceInfoDO acceptanceInfoDO : acceptanceInfoDOS) {
|
||||||
Long shopId = acceptanceInfoDO.getShopId();
|
Long shopId = acceptanceInfoDO.getShopId();
|
||||||
acceptanceInfoDO.setUpdateTime(new Date());
|
acceptanceInfoDO.setUpdateTime(new Date());
|
||||||
@@ -219,7 +214,7 @@ public class XxlJobHandler {
|
|||||||
LocalDate now = LocalDate.now();
|
LocalDate now = LocalDate.now();
|
||||||
//TODO 时间问题
|
//TODO 时间问题
|
||||||
if (datePlusFiveDays.equals(now)) {
|
if (datePlusFiveDays.equals(now)) {
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120);
|
||||||
}
|
}
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
log.error("初始化acceptanceInfo,鲜丰服务进场时间日期转化异常");
|
log.error("初始化acceptanceInfo,鲜丰服务进场时间日期转化异常");
|
||||||
@@ -231,24 +226,26 @@ public class XxlJobHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Auther: wangshuo
|
* @Auther: wangshuo
|
||||||
* @Date: 2024/5/7
|
* @Date: 2024/5/7
|
||||||
* @description:三方验收预约短信通知
|
* @description:三方验收预约短信通知
|
||||||
*/
|
*/
|
||||||
@XxlJob("ThreeAcceptanceMessage")
|
@XxlJob("ThreeAcceptanceMessage")
|
||||||
public void ThreeAcceptanceMessage(){
|
public void ThreeAcceptanceMessage() {
|
||||||
log.info("------三方验收预约短信通知-----");
|
log.info("------三方验收预约短信通知-----");
|
||||||
boolean hasNext = true;
|
boolean hasNext = true;
|
||||||
int PageNum = 1;
|
int PageNum = 1;
|
||||||
int PageSize = 50;
|
int PageSize = 50;
|
||||||
while (hasNext) {
|
while (hasNext) {
|
||||||
|
|
||||||
// hasNext = ;
|
// hasNext = ;
|
||||||
PageNum++;
|
PageNum++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@XxlJob("interviewRemind")
|
@XxlJob("interviewRemind")
|
||||||
public void interviewRemind() {
|
public void interviewRemind() {
|
||||||
log.info("------面试提醒------");
|
log.info("------面试提醒------");
|
||||||
@@ -260,10 +257,10 @@ public class XxlJobHandler {
|
|||||||
for (LineInterviewDO interview : interviewList) {
|
for (LineInterviewDO interview : interviewList) {
|
||||||
Map<String, String> templateParamMap = new HashMap<>();
|
Map<String, String> templateParamMap = new HashMap<>();
|
||||||
templateParamMap.put("interviewTime", DateUtil.format(interview.getStartTime(), "HH:mm"));
|
templateParamMap.put("interviewTime", DateUtil.format(interview.getStartTime(), "HH:mm"));
|
||||||
if(InterviewTypeEnum.INTERVIEW.getCode().equals(interview.getInterviewType())){
|
if (InterviewTypeEnum.INTERVIEW.getCode().equals(interview.getInterviewType())) {
|
||||||
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.FIRST_INTERVIEW_REMIND, templateParamMap);
|
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.FIRST_INTERVIEW_REMIND, templateParamMap);
|
||||||
}
|
}
|
||||||
if(InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interview.getInterviewType())){
|
if (InterviewTypeEnum.SECOND_INTERVIEW.getCode().equals(interview.getInterviewType())) {
|
||||||
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.SECOND_INTERVIEW_REMIND, templateParamMap);
|
commonService.sendSms(interview.getInterviewerUserId(), SMSMsgEnum.SECOND_INTERVIEW_REMIND, templateParamMap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user