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