fix:装修 红圈通回调调整 解除强制限制
This commit is contained in:
@@ -21,6 +21,8 @@ import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.*;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2024/6/20 17:22
|
||||
@@ -58,7 +60,7 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_9);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
|
||||
@@ -191,7 +193,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
designInfoDO.setConstructionPlanEndTime(request.getConstructionPlanEndTime());
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(designInfoDO);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())) {
|
||||
//加盟商未确认的时候 但是红圈通已经开始进场 也可以开始该阶段
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_110.getShopSubStageStatus())||shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110_5);
|
||||
}
|
||||
return true;
|
||||
@@ -258,10 +261,6 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
throw new ServiceException(ErrorCodeEnum.HQT_SHOP_ID_NOT_EXIST);
|
||||
}
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_12);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())
|
||||
&& !shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
|
||||
}
|
||||
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopInfoDO.getId());
|
||||
if (Objects.isNull(acceptanceInfoDO)) {
|
||||
acceptanceInfoDO = new AcceptanceInfoDO();
|
||||
@@ -279,7 +278,8 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
|
||||
} else {
|
||||
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
|
||||
}
|
||||
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())) {
|
||||
//只要不是已完成状态 都可以操作
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopInfoDO.getId(),Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_270));
|
||||
preparationService.buildStoreAndDecorationComplete(shopInfoDO.getId());
|
||||
}
|
||||
|
||||
@@ -38,6 +38,8 @@ import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91;
|
||||
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
@@ -374,7 +376,11 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_12);
|
||||
//如果不是待加盟商验收 说明立规已经验收 只需要保存数据 不需要将阶段变为立规验收
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121.getShopSubStageStatus())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
}
|
||||
if (StringUtils.isNotBlank(shopInfoDO.getHqtShopId())) {
|
||||
HqtPartnerAcceptanceRequest hqtPartnerAcceptanceRequest = new HqtPartnerAcceptanceRequest();
|
||||
hqtPartnerAcceptanceRequest.setHqtShopId(shopInfoDO.getHqtShopId());
|
||||
@@ -780,7 +786,14 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
decoration.setPartnerAcceptanceSignatures(JSONObject.toJSONString(threeAcceptanceDTO));
|
||||
decorationDesignInfoDAO.updateByPrimaryKeySelective(decoration);
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
List<ShopSubStageStatusEnum> list = Arrays.asList(SHOP_SUB_STAGE_STATUS_91);
|
||||
|
||||
//装修阶段可以提前开始 如果已经进场的 阶段已经流程 不需要初始化为待提交
|
||||
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getByShopIdAndSubStage(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_11.getShopSubStage());
|
||||
if (shopStageInfo != null && ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus().equals(shopStageInfo.getShopSubStageStatus())) {
|
||||
list.add(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110);
|
||||
}
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(),list);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
if (StringUtils.isNotBlank(shopInfo.getHqtShopId())) {
|
||||
//推送给HQT
|
||||
|
||||
@@ -140,70 +140,70 @@ public class OpenApiController {
|
||||
@ApiOperation("分配测量员,设计组")
|
||||
@PostMapping("/assignSurveyors")
|
||||
public ApiResponse<Boolean> assignSurveyors(@RequestBody @Validated AssignSurveyorsRequest request) {
|
||||
log.info("assignSurveyors request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log assignSurveyors request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.assignSurveyors(request));
|
||||
}
|
||||
|
||||
@ApiOperation("门店测量、上传测量图")
|
||||
@PostMapping("/submitMeasurementDiagram")
|
||||
public ApiResponse<Boolean> submitMeasurementDiagram(@RequestBody @Validated SubmitMeasurementRequest request) {
|
||||
log.info("submitMeasurementDiagram request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log submitMeasurementDiagram request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationMeasureService.submitMeasurementDiagram(request));
|
||||
}
|
||||
|
||||
@ApiOperation(" 分配设计师")
|
||||
@PostMapping("/assignDesigner")
|
||||
public ApiResponse<Boolean> assignDesigner(@RequestBody @Validated AssignDesignerRequest request) {
|
||||
log.info("assignDesigner request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log assignDesigner request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignDesigner(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传设计图")
|
||||
@PostMapping("/submitDesignDrawing")
|
||||
public ApiResponse<Boolean> submitDesignDrawing(@RequestBody @Validated SubmitDesignDrawingRequest request) {
|
||||
log.info("submitDesignDrawing request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log submitDesignDrawing request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitDesignDrawing(request));
|
||||
}
|
||||
|
||||
@ApiOperation("分配报价员")
|
||||
@PostMapping("/assignQuotationStaff")
|
||||
public ApiResponse<Boolean> assignQuotation(@RequestBody @Validated AssignQuotationRequest request) {
|
||||
log.info("assignQuotation request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log assignQuotation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.assignQuotation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("上传报价单")
|
||||
@PostMapping("/submitQuotationSheet")
|
||||
public ApiResponse<Boolean> submitQuotationSheet(@RequestBody @Validated SubmitQuotationSheetRequest request) {
|
||||
log.info("submitQuotationSheet request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log submitQuotationSheet request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitQuotationSheet(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工派单")
|
||||
@PostMapping("/submitConstructionOrder")
|
||||
public ApiResponse<Boolean> submitConstructionOrder(@RequestBody @Validated ConstructionOrderRequest request) {
|
||||
log.info("submitConstructionOrder request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log submitConstructionOrder request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.submitConstructionOrder(request));
|
||||
}
|
||||
|
||||
@ApiOperation("实际进场确认")
|
||||
@PostMapping("/entryConfirmation")
|
||||
public ApiResponse<Boolean> entryConfirmation(@RequestBody @Validated EntryConfirmationRequest request) {
|
||||
log.info("entryConfirmation request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log entryConfirmation request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.entryConfirmation(request));
|
||||
}
|
||||
|
||||
@ApiOperation("施工完成")
|
||||
@PostMapping("/constructionCompleted")
|
||||
public ApiResponse<Boolean> constructionCompleted(@RequestBody @Validated ConstructionCompletedRequest request) {
|
||||
log.info("constructionCompleted request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log constructionCompleted request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.constructionCompleted(request));
|
||||
}
|
||||
|
||||
@ApiOperation("装修验收")
|
||||
@PostMapping("/hqtDecorationAcceptance")
|
||||
public ApiResponse<Boolean> decorationAcceptance(@RequestBody @Validated HqtDecorationAcceptanceRequest request) {
|
||||
log.info("decorationAcceptance request:{}", JSONObject.toJSONString(request));
|
||||
log.info("decoration_log decorationAcceptance request:{}", JSONObject.toJSONString(request));
|
||||
return ApiResponse.success(decorationDesignInfoService.decorationAcceptance(request));
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
@@ -100,6 +101,7 @@ public class MiniDecorationController {
|
||||
@ApiOperation("提交三方验收签字")
|
||||
@PostMapping("/submitThreeAcceptanceSign")
|
||||
public ResponseResult<Boolean> submitThreeAcceptance(@RequestBody ThreeAcceptanceRequest request){
|
||||
log.info("decoration_log {}", JSONObject.toJSONString(request));
|
||||
return ResponseResult.success(decorationService.miniSubmitAcceptanceSign(request));
|
||||
}
|
||||
@ApiOperation("查看三方验收签字")
|
||||
@@ -133,6 +135,7 @@ public class MiniDecorationController {
|
||||
@ApiOperation("加盟商确定设计方案")
|
||||
@PostMapping("/confirmDesign")
|
||||
public ResponseResult<Boolean> confirmDesign(@RequestBody DecorationDesignRequest request){
|
||||
log.info("decoration_log {}", JSONObject.toJSONString(request));
|
||||
return ResponseResult.success(decorationService.confirmDesign(request,CurrentUserHolder.getUser()));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user