fix
This commit is contained in:
@@ -38,7 +38,7 @@ public class AcceptanceInfoDAO {
|
||||
if (Objects.isNull(acceptanceInfoDO)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return acceptanceInfoMapper.updateByShopIDSelective(acceptanceInfoDO);
|
||||
return acceptanceInfoMapper.updateByPrimaryKey(acceptanceInfoDO);
|
||||
}
|
||||
public List<AcceptanceInfoDO> selectListNotNullEntryTime(){
|
||||
return acceptanceInfoMapper.selectListNotNullEntryTime();
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
operations_acceptance_signatures,partner_acceptance_signatures,
|
||||
create_time,update_time,deleted,plan_acceptance_time,actual_acceptance_time,booking_user,plan_exit_time,
|
||||
ks_account,verification_mobile,shop_location_screenshots,shop_doorway_photo,shop_interior_photo,
|
||||
satisfaction,acceptance_attachment,is_network_cable,back_kitchen_photo
|
||||
satisfaction,acceptance_attachment,is_network_cable,back_kitchen_photo,add_reduce_amount,delivery_order_id
|
||||
</sql>
|
||||
<insert id="initAcceptanceInfo">
|
||||
<foreach collection="list" index="index" item="item" separator=";">
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -18,8 +19,8 @@ public class ConstructionOrderRequest {
|
||||
private String shopCode;
|
||||
@NotBlank(message = "施工派单ID(施工派单编号)不能为空")
|
||||
private String constructionOrderId;
|
||||
@NotBlank(message = "预计开工时间不能为空")
|
||||
@NotNull(message = "预计开工时间不能为空")
|
||||
private Date constructionPlanStartTime;
|
||||
@NotBlank(message = "预计完工时间不能为空")
|
||||
@NotNull(message = "预计完工时间不能为空")
|
||||
private Date constructionPlanEndTime;
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.cool.store.request;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -17,6 +18,6 @@ public class SubmitQuotationSheetRequest {
|
||||
private String shopCode;
|
||||
@NotBlank(message = "报价单ID(报价单编号)不能为空")
|
||||
private String quotationSheetId;
|
||||
@NotBlank(message = "报价单附件不能为空")
|
||||
@NotEmpty(message = "报价单附件不能为空")
|
||||
private List<String> quotationSheetUrl;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user