This commit is contained in:
shuo.wang
2025-07-25 14:07:20 +08:00
parent 55c102ed96
commit 1776f3a262
8 changed files with 59 additions and 11 deletions

View File

@@ -16,6 +16,7 @@ import javax.annotation.Resource;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@@ -43,8 +44,11 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean assignDesigner(AssignDesignerRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_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(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
@@ -73,6 +77,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean submitDesignDrawing(SubmitDesignDrawingRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -96,6 +103,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean assignQuotation(AssignQuotationRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -116,6 +126,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean submitQuotationSheet(SubmitQuotationSheetRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
@@ -140,6 +153,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean submitConstructionOrder(ConstructionOrderRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -159,6 +175,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean entryConfirmation(EntryConfirmationRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -177,6 +196,9 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean constructionCompleted(ConstructionCompletedRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationDesignInfoDO designInfoDO = decorationDesignInfoDAO.getByShopId(shopInfoDO.getId());
if (designInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -186,6 +208,7 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_11);
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_111.getShopSubStageStatus())) {
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_112);
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_121);
}
return true;
}
@@ -194,12 +217,19 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
@Transactional(rollbackFor = Exception.class)
public Boolean decorationAcceptance(HqtDecorationAcceptanceRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_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();
acceptanceInfoDO.setShopId(shopInfoDO.getId());
}
acceptanceInfoDO.setDeliveryOrderId(request.getDeliveryOrderId());
acceptanceInfoDO.setActualAcceptanceTime(request.getActualAcceptanceTime());
acceptanceInfoDO.setAcceptanceAttachment(String.join(",", request.getAcceptanceAttachmentUrl()));
@@ -207,7 +237,11 @@ public class DecorationDesignInfoServiceImpl implements DecorationDesignInfoServ
acceptanceInfoDO.setShopInteriorPhoto(request.getShopInteriorPhotoUrl());
acceptanceInfoDO.setBackKitchenPhoto(request.getBackKitchenPhotoUrl());
acceptanceInfoDO.setAddReduceAmount(request.getAddReduceAmount());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
if (acceptanceInfoDO.getId() == null) {
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
} else {
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
}
if (shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122.getShopSubStageStatus())) {
shopStageInfoDAO.updateShopStageInfo(shopInfoDO.getId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123);
}

View File

@@ -180,6 +180,9 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
@Override
public Boolean assignSurveyors(AssignSurveyorsRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null){
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
ShopStageInfoDO shopStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopInfoDO.getId(), ShopSubStageEnum.SHOP_STAGE_8_6);
if (shopStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_00.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);
@@ -223,6 +226,9 @@ public class DecorationMeasureServiceImpl implements DecorationMeasureService {
@Override
public Boolean submitMeasurementDiagram(SubmitMeasurementRequest request) {
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfoByShopCode(request.getShopCode());
if (shopInfoDO == null){
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
}
DecorationMeasureDO measureDAOByShopId = decorationMeasureDAO.getByShopId(shopInfoDO.getId());
if (measureDAOByShopId == null) {
throw new ServiceException(ErrorCodeEnum.SHOP_STAGE_NOT_OPERATE);

View File

@@ -355,7 +355,10 @@ public class DecorationServiceImpl implements DecorationService {
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
request.getPartnerAcceptance().setAcceptanceTime(new Date());
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(request.getShopId());
if (acceptanceInfoDO == null) {
acceptanceInfoDO = new AcceptanceInfoDO();
}
acceptanceInfoDO.setShopId(request.getShopId());
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
acceptanceInfoDO.setUpdateTime(new Date());
@@ -364,7 +367,11 @@ public class DecorationServiceImpl implements DecorationService {
acceptanceInfoDO.setShopLocationScreenshots(request.getShopLocationScreenshots());
acceptanceInfoDO.setSatisfaction(request.getSatisfaction());
acceptanceInfoDO.setIsNetworkCable(request.getIsNetworkCable());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
if (acceptanceInfoDO.getId() == null) {
acceptanceInfoDAO.insertSelectiveAcceptanceInfo(acceptanceInfoDO);
} else {
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
}
//更新阶段状态验收中
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
@@ -718,7 +725,7 @@ public class DecorationServiceImpl implements DecorationService {
return constructionDataVO;
}
constructionDataVO.setConstructionAnnex(decoration.getConstructionAnnex());
constructionDataVO.setConstructionPlanStartTime( decoration.getConstructionPlanStartTime());
constructionDataVO.setConstructionPlanStartTime(decoration.getConstructionPlanStartTime());
constructionDataVO.setConstructionPlanEndTime(decoration.getConstructionPlanEndTime());
constructionDataVO.setConstructionOrderId(decoration.getConstructionOrderId());
constructionDataVO.setActualEntryTime(decoration.getActualEntryTime());

View File

@@ -277,7 +277,6 @@ public class PushServiceImpl implements PushService {
.post(RequestBody.create(MediaType.parse("application/json"),jsonString))
.header("Authorization", "Basic " + encodedAuth)
.addHeader("Content-Type", "application/json")
.addHeader("Host", "tc.cloud.hecom.cn")
.build();
try (Response response = okHttpClient.newCall(request).execute()) {
if (!response.isSuccessful()) {