Merge remote-tracking branch 'origin/cc_20241008_sysBuildAndAdjust' into cc_20241008_sysBuildAndAdjust
This commit is contained in:
@@ -61,6 +61,9 @@ public class GeoMapUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static AddressInfo extractAddressInfo(JSONObject geoJson) {
|
private static AddressInfo extractAddressInfo(JSONObject geoJson) {
|
||||||
|
if (geoJson==null){
|
||||||
|
return new AddressInfo();
|
||||||
|
}
|
||||||
JSONObject addressComponent = geoJson.getJSONObject("addressComponent");
|
JSONObject addressComponent = geoJson.getJSONObject("addressComponent");
|
||||||
// 根据实际响应结构解析省市区街道信息,此处仅为示例
|
// 根据实际响应结构解析省市区街道信息,此处仅为示例
|
||||||
String province = (String) addressComponent.get("province");
|
String province = (String) addressComponent.get("province");
|
||||||
@@ -78,6 +81,8 @@ public class GeoMapUtil {
|
|||||||
private String district;
|
private String district;
|
||||||
private String township;
|
private String township;
|
||||||
private String address;
|
private String address;
|
||||||
|
public AddressInfo(){
|
||||||
|
}
|
||||||
|
|
||||||
public AddressInfo(String province, String city, String district, String township, String address) {
|
public AddressInfo(String province, String city, String district, String township, String address) {
|
||||||
this.province = province;
|
this.province = province;
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package com.cool.store.request;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/10/10 10:37
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ConstructionRequest {
|
||||||
|
|
||||||
|
|
||||||
|
private Long shopId;
|
||||||
|
|
||||||
|
@ApiModelProperty("装修计划开始时间")
|
||||||
|
private Long constructionPlanStartTime;
|
||||||
|
@ApiModelProperty("装修计划结束时间")
|
||||||
|
private Long constructionPlanEndTime;
|
||||||
|
@ApiModelProperty("装修附件")
|
||||||
|
private String constructionAnnex;
|
||||||
|
@ApiModelProperty("装修备注")
|
||||||
|
private String constructionRemark;
|
||||||
|
}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.cool.store.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author suzhuhong
|
||||||
|
* @Date 2024/10/10 11:13
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ConstructionDataVO {
|
||||||
|
|
||||||
|
@ApiModelProperty("预计开工时间")
|
||||||
|
private Long constructionPlanStartTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 预计完工时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("预计完工时间")
|
||||||
|
private Long constructionPlanEndTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("附件")
|
||||||
|
private String constructionAnnex;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("备注")
|
||||||
|
private String constructionRemark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建时间")
|
||||||
|
private Long constructionCreateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String constructionCreateUser;
|
||||||
|
|
||||||
|
@ApiModelProperty("创建人")
|
||||||
|
private String constructionCreateUserName;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -8,12 +8,9 @@ import com.cool.store.request.*;
|
|||||||
|
|
||||||
|
|
||||||
import com.cool.store.response.ThreeSignResponse;
|
import com.cool.store.response.ThreeSignResponse;
|
||||||
import com.cool.store.vo.DecorationDesignVO;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
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.fitmentCheckVO;
|
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -135,6 +132,22 @@ public interface DecorationService {
|
|||||||
*/
|
*/
|
||||||
DecorationDesignVO getDecorationDesign(Long shopId);
|
DecorationDesignVO getDecorationDesign(Long shopId);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交装修数据
|
||||||
|
* @param request
|
||||||
|
* @param user
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean submitConstructionData(ConstructionRequest request,LoginUserInfo user);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询装修数据
|
||||||
|
* @param shopId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
ConstructionDataVO getConstructionData(Long shopId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 确认设计数据方案
|
* 确认设计数据方案
|
||||||
* @param request
|
* @param request
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public interface PreparationService {
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 证照办理完成 初始化平台建店数据
|
* 证照办理+建店资料 都完成 初始化平台建店数据
|
||||||
* @param shopId
|
* @param shopId
|
||||||
*/
|
*/
|
||||||
void licenseCompleted(Long shopId);
|
void licenseCompleted(Long shopId);
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ import com.cool.store.request.BuildInformationRequest;
|
|||||||
import com.cool.store.response.BuildInformationResponse;
|
import com.cool.store.response.BuildInformationResponse;
|
||||||
import com.cool.store.service.BuildInformationService;
|
import com.cool.store.service.BuildInformationService;
|
||||||
import com.cool.store.mapper.BuildInformationMapper;
|
import com.cool.store.mapper.BuildInformationMapper;
|
||||||
|
import com.cool.store.service.PreparationService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
@@ -40,6 +41,8 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
private PointInfoDAO pointInfoDAO;
|
private PointInfoDAO pointInfoDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ShopInfoDAO shopInfoDAO;
|
private ShopInfoDAO shopInfoDAO;
|
||||||
|
@Resource
|
||||||
|
PreparationService preparationService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BuildInformationResponse getBuildInformation(Long shopId) {
|
public BuildInformationResponse getBuildInformation(Long shopId) {
|
||||||
@@ -91,6 +94,8 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
|||||||
buildInformationDO.setCreateTime(new Date());
|
buildInformationDO.setCreateTime(new Date());
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153);
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153);
|
||||||
|
//初始化数据
|
||||||
|
preparationService.licenseCompleted(request.getShopId());
|
||||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||||
}else {
|
}else {
|
||||||
buildInformationDO.setUpdateTime(new Date());
|
buildInformationDO.setUpdateTime(new Date());
|
||||||
|
|||||||
@@ -345,17 +345,6 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
|
||||||
//工程部验收签名
|
|
||||||
if (Objects.nonNull(request.getEngineeringAcceptance())) {
|
|
||||||
request.getEngineeringAcceptance().setAcceptanceTime(new Date());
|
|
||||||
request.getEngineeringAcceptance().setStatus(CommonConstants.ONE);
|
|
||||||
String jsonString = JSONObject.toJSONString(request.getEngineeringAcceptance());
|
|
||||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
|
||||||
acceptanceInfoDO.setShopId(request.getShopId());
|
|
||||||
acceptanceInfoDO.setEngineeringAcceptanceSignatures(jsonString);
|
|
||||||
acceptanceInfoDO.setUpdateTime(new Date());
|
|
||||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
|
||||||
}
|
|
||||||
//加盟商
|
//加盟商
|
||||||
if (Objects.nonNull(request.getPartnerAcceptance())) {
|
if (Objects.nonNull(request.getPartnerAcceptance())) {
|
||||||
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
|
||||||
@@ -567,6 +556,56 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean submitConstructionData(ConstructionRequest request, LoginUserInfo user) {
|
||||||
|
String lockKey = "submitConstructionData:" + request.getShopId();
|
||||||
|
String lockValue = UUID.randomUUID().toString();
|
||||||
|
boolean acquired = redisUtilPool.setNxExpire(lockKey, lockValue, CommonConstants.THREE*CommonConstants.ONE_SECONDS);
|
||||||
|
if (!acquired){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
|
}
|
||||||
|
//校验参数
|
||||||
|
if (Objects.isNull(request)||request.getShopId()==null){
|
||||||
|
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||||
|
}
|
||||||
|
//必须是待提交状态才能提交
|
||||||
|
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||||
|
if (shopStageInfo!=null&&!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||||
|
throw new ServiceException(ErrorCodeEnum.STATUS_NOT_SUPPORT_SUMMIT);
|
||||||
|
}
|
||||||
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(request.getShopId());
|
||||||
|
decoration.setConstructionAnnex(request.getConstructionAnnex());
|
||||||
|
decoration.setConstructionRemark(request.getConstructionRemark());
|
||||||
|
decoration.setConstructionPlanStartTime(new Date(request.getConstructionPlanStartTime()));
|
||||||
|
decoration.setConstructionPlanEndTime(new Date(request.getConstructionPlanEndTime()));
|
||||||
|
decoration.setConstructionCreateTime(new Date());
|
||||||
|
decoration.setConstructionCreateUser(user.getUserId());
|
||||||
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||||
|
//状态变为施工中
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111));
|
||||||
|
return Boolean.TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConstructionDataVO getConstructionData(Long shopId) {
|
||||||
|
ConstructionDataVO constructionDataVO = new ConstructionDataVO();
|
||||||
|
DecorationDesignInfoDO decoration = decorationDesignInfoDAO.getByShopId(shopId);
|
||||||
|
if (Objects.isNull(decoration)){
|
||||||
|
return constructionDataVO;
|
||||||
|
}
|
||||||
|
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
|
||||||
|
constructionDataVO.setConstructionRemark(decoration.getConstructionRemark());
|
||||||
|
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime()!=null?decoration.getConstructionPlanStartTime().getTime():null);
|
||||||
|
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime()!=null?decoration.getConstructionPlanEndTime().getTime():null);
|
||||||
|
constructionDataVO.setConstructionCreateTime(decoration.getConstructionCreateTime()!=null?decoration.getConstructionCreateTime().getTime():null);
|
||||||
|
constructionDataVO.setConstructionCreateUser(decoration.getConstructionCreateUser());
|
||||||
|
if (StringUtils.isNotEmpty(decoration.getConstructionCreateUser())){
|
||||||
|
EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(decoration.getConstructionCreateUser());
|
||||||
|
constructionDataVO.setConstructionCreateUserName(user.getName());
|
||||||
|
}
|
||||||
|
return constructionDataVO;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
public Boolean confirmDesign(DecorationDesignRequest request, LoginUserInfo user) {
|
||||||
//重复提交校验 3秒内不能重复提交
|
//重复提交校验 3秒内不能重复提交
|
||||||
@@ -583,24 +622,25 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
decorationDesignInfoDAO.updateByPrimaryKeySelective(decorationDesignInfoDO);
|
||||||
}
|
}
|
||||||
//更新装修设计状态
|
//更新装修设计状态
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111));
|
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
|
public Boolean confirmComplete(Long shopId, LoginUserInfo user) {
|
||||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_9.getShopSubStage());
|
//判断施工阶段是否时施工中 施工中才能施工完成
|
||||||
if (shopStageInfoDO!=null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())){
|
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||||
|
if (shopStageInfoDO!=null && !ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus().equals(shopStageInfoDO.getShopSubStageStatus())){
|
||||||
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
throw new ServiceException(ErrorCodeEnum.DESIGN_NO_COMPLETE);
|
||||||
}
|
}
|
||||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121));
|
|
||||||
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
AcceptanceInfoDO acceptance = acceptanceInfoDAO.selectByShopId(shopId);
|
||||||
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
|
||||||
acceptanceInfoDO.setShopId(shopId);
|
|
||||||
acceptanceInfoDO.setCreateTime(new Date());
|
|
||||||
if(Objects.isNull(acceptance)) {
|
if(Objects.isNull(acceptance)) {
|
||||||
|
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
|
||||||
|
acceptanceInfoDO.setShopId(shopId);
|
||||||
|
acceptanceInfoDO.setCreateTime(new Date());
|
||||||
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
|
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
|
||||||
}
|
}
|
||||||
|
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121));
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -610,10 +650,8 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
|
||||||
//营运部 验收签名
|
//营运部 验收签名
|
||||||
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
||||||
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
|
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
|
||||||
&& StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
|
|
||||||
&& Objects.nonNull(request.getOperationsAcceptance())) {
|
&& Objects.nonNull(request.getOperationsAcceptance())) {
|
||||||
ThreeAcceptanceDTO engineering = JSONObject.parseObject(acceptanceInfoDO1.getEngineeringAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
|
||||||
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
|
||||||
request.getOperationsAcceptance().setStatus(CommonConstants.ONE);
|
request.getOperationsAcceptance().setStatus(CommonConstants.ONE);
|
||||||
request.getOperationsAcceptance().setAcceptanceTime(new Date());
|
request.getOperationsAcceptance().setAcceptanceTime(new Date());
|
||||||
@@ -625,13 +663,11 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
acceptanceInfoDO.setActualAcceptanceTime(new Date());
|
acceptanceInfoDO.setActualAcceptanceTime(new Date());
|
||||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||||
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
|
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
|
||||||
&& CommonConstants.ONE == partner.getResult()
|
&& CommonConstants.ONE == partner.getResult()) {
|
||||||
&& CommonConstants.ONE == engineering.getResult()) {
|
|
||||||
//更新阶段状态验收完毕
|
//更新阶段状态验收完毕
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
|
||||||
preparationService.whetherToOpenForAcceptance(request.getShopId());
|
|
||||||
} else {
|
} else {
|
||||||
//未通过至为带预约
|
//未通过至为待验收
|
||||||
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121, null);
|
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -666,19 +702,6 @@ public class DecorationServiceImpl implements DecorationService {
|
|||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Boolean bookingAcceptance(BookingAcceptanceRequest request, LoginUserInfo user) {
|
public Boolean bookingAcceptance(BookingAcceptanceRequest request, LoginUserInfo user) {
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
|
|
||||||
ShopStageInfoDO newShopStageInfoDO = new ShopStageInfoDO();
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat(CoolDateUtils.DATE_FORMAT_SEC);
|
|
||||||
String date = sdf.format(request.getBookingAcceptanceTime());
|
|
||||||
newShopStageInfoDO.setPlanCompleteTime(date);
|
|
||||||
newShopStageInfoDO.setShopSubStage(ShopSubStageEnum.SHOP_STAGE_12.getShopSubStage());
|
|
||||||
newShopStageInfoDO.setShopId(request.getShopId());
|
|
||||||
shopStageInfoDAO.updateByShopId(newShopStageInfoDO);
|
|
||||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(request.getShopId());
|
|
||||||
acceptanceInfoDO.setBookingUser(user.getUserId());
|
|
||||||
acceptanceInfoDO.setUpdateTime(new Date());
|
|
||||||
acceptanceInfoDO.setPlanAcceptanceTime(request.getBookingAcceptanceTime());
|
|
||||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
|
||||||
return Boolean.TRUE;
|
return Boolean.TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -218,7 +218,7 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
ShopStageInfoDO data17 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage());
|
ShopStageInfoDO data17 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage());
|
||||||
data17.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus());
|
data17.setShopSubStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_170.getShopSubStageStatus());
|
||||||
|
|
||||||
list.addAll(Arrays.asList(data3,data4,data14,data15,data16,data17));
|
list.addAll(Arrays.asList(data3,data4,data9,data14,data15,data16,data17));
|
||||||
shopStageInfoDAO.batchUpdate(list);
|
shopStageInfoDAO.batchUpdate(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -233,8 +233,10 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
|
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_3.getShopSubStage()).getShopSubStageStatus());
|
||||||
Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus().
|
Boolean flag2 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43.getShopSubStageStatus().
|
||||||
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus());
|
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_4.getShopSubStage()).getShopSubStageStatus());
|
||||||
|
Boolean flag3 = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153.getShopSubStageStatus().
|
||||||
|
equals(shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_15.getShopSubStage()).getShopSubStageStatus());
|
||||||
//都完成了 初始化后续流程数据
|
//都完成了 初始化后续流程数据
|
||||||
if (flag1&&flag2) {
|
if (flag1&&flag2&&flag3) {
|
||||||
//初始化后续流程数据s
|
//初始化后续流程数据s
|
||||||
List<ShopStageInfoDO> list = new ArrayList<>();
|
List<ShopStageInfoDO> list = new ArrayList<>();
|
||||||
ShopStageInfoDO data18 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_18.getShopSubStage());
|
ShopStageInfoDO data18 = shopStageInfoDOMap.get(ShopSubStageEnum.SHOP_STAGE_18.getShopSubStage());
|
||||||
@@ -260,15 +262,7 @@ public class PreparationServiceImpl implements PreparationService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void whetherToOpenForAcceptance(Long shopId) {
|
public void whetherToOpenForAcceptance(Long shopId) {
|
||||||
Integer allCompletionCount = shopStageInfoDAO.getAllCompletionCount(shopId);
|
|
||||||
//如果等于6 表示前面阶段都已经完成 初始化开业验收数据
|
|
||||||
if (allCompletionCount.equals(CommonConstants.FIVE)) {
|
|
||||||
OpenAcceptanceInfoDO openAcceptanceInfoDO = new OpenAcceptanceInfoDO();
|
|
||||||
openAcceptanceInfoDO.setShopId(shopId);
|
|
||||||
openAcceptanceInfoDO.setAcceptanceStatus(CommonConstants.ZERO);
|
|
||||||
openAcceptanceInfoDAO.insertSelective(openAcceptanceInfoDO);
|
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_160);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import com.cool.store.response.ThreeSignResponse;
|
|||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
import com.cool.store.service.SeeAcceptanceService;
|
import com.cool.store.service.SeeAcceptanceService;
|
||||||
|
import com.cool.store.vo.ConstructionDataVO;
|
||||||
import com.cool.store.vo.DecorationDesignVO;
|
import com.cool.store.vo.DecorationDesignVO;
|
||||||
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.LinePayVO;
|
||||||
@@ -127,7 +128,7 @@ public class PCDecorationController {
|
|||||||
|
|
||||||
@ApiOperation("提交设计方案")
|
@ApiOperation("提交设计方案")
|
||||||
@PostMapping("/submitDecorationDesign")
|
@PostMapping("/submitDecorationDesign")
|
||||||
public ResponseResult<Boolean> submitBookingAcceptance(@RequestBody DecorationDesignRequest request){
|
public ResponseResult<Boolean> submitDecorationDesign(@RequestBody DecorationDesignRequest request){
|
||||||
return ResponseResult.success(decorationService.submitDecorationDesign(request,CurrentUserHolder.getUser()));
|
return ResponseResult.success(decorationService.submitDecorationDesign(request,CurrentUserHolder.getUser()));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,6 +138,18 @@ public class PCDecorationController {
|
|||||||
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("提交施工方案")
|
||||||
|
@PostMapping("/submitConstructionData")
|
||||||
|
public ResponseResult<Boolean> submitConstructionData(@RequestBody ConstructionRequest request){
|
||||||
|
return ResponseResult.success(decorationService.submitConstructionData(request,CurrentUserHolder.getUser()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询施工方案")
|
||||||
|
@GetMapping("/getConstructionData")
|
||||||
|
public ResponseResult<ConstructionDataVO> getConstructionData(@RequestParam Long shopId){
|
||||||
|
return ResponseResult.success(decorationService.getConstructionData(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("装修阶段完成")
|
@ApiOperation("装修阶段完成")
|
||||||
@PostMapping("/confirmComplete")
|
@PostMapping("/confirmComplete")
|
||||||
public ResponseResult<Boolean> confirmComplete(@RequestBody DecorationDesignRequest request){
|
public ResponseResult<Boolean> confirmComplete(@RequestBody DecorationDesignRequest request){
|
||||||
|
|||||||
@@ -16,13 +16,10 @@ import com.cool.store.response.ThreeSignResponse;
|
|||||||
import com.cool.store.service.AssessmentTemplateService;
|
import com.cool.store.service.AssessmentTemplateService;
|
||||||
import com.cool.store.service.DecorationService;
|
import com.cool.store.service.DecorationService;
|
||||||
import com.cool.store.service.SeeAcceptanceService;
|
import com.cool.store.service.SeeAcceptanceService;
|
||||||
import com.cool.store.vo.AssessmentTemplateVO;
|
import com.cool.store.vo.*;
|
||||||
import com.cool.store.vo.DecorationDesignVO;
|
|
||||||
import com.cool.store.vo.Fitment.DecorationStageVO;
|
import com.cool.store.vo.Fitment.DecorationStageVO;
|
||||||
|
|
||||||
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 io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
@@ -122,6 +119,12 @@ public class MiniDecorationController {
|
|||||||
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
return ResponseResult.success(decorationService.getDecorationDesign(shopId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询施工方案")
|
||||||
|
@GetMapping("/getConstructionData")
|
||||||
|
public ResponseResult<ConstructionDataVO> getConstructionData(@RequestParam Long shopId){
|
||||||
|
return ResponseResult.success(decorationService.getConstructionData(shopId));
|
||||||
|
}
|
||||||
|
|
||||||
@ApiOperation("加盟商确定设计方案")
|
@ApiOperation("加盟商确定设计方案")
|
||||||
@PostMapping("/confirmDesign")
|
@PostMapping("/confirmDesign")
|
||||||
public ResponseResult<Boolean> confirmDesign(@RequestBody DecorationDesignRequest request){
|
public ResponseResult<Boolean> confirmDesign(@RequestBody DecorationDesignRequest request){
|
||||||
|
|||||||
Reference in New Issue
Block a user