修改sql getLines

This commit is contained in:
shuo.wang
2024-05-15 18:56:08 +08:00
parent 342d52a9f5
commit d766a0546f
3 changed files with 58 additions and 67 deletions

View File

@@ -199,7 +199,8 @@ public enum ErrorCodeEnum {
YLF_ERROR(110001, "云立方接口异常!异常信息:{0}", null),
//装修
THREE_ACCEPTANCE(121001,"提交三方验收失败",null),
CHECK_ITEM(12002,"插入检查项失败",null)
CHECK_ITEM(12002,"插入检查项失败",null),
FITMENT_FAIL(12003,"装修款阶段未完成",null),
;

View File

@@ -16,8 +16,8 @@ public enum WorkflowSubStageEnum{
PAY_DEPOSIT(15, "缴纳意向金", WorkflowSubStageStatusEnum.PAY_DEPOSIT_45, "bankServiceImpl",4),
SIGN_INTENT_AGREEMENT(20, "签署意向协议", WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_60, "intentAgreementServiceImpl",6),
STORE_EXPERIENCE(25, "门店体验", WorkflowSubStageStatusEnum.STORE_EXPERIENCE_85, "trainingExperienceServiceImpl",9),
SECOND_INTERVIEWS(30, "二审面试", WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, "lineInterviewServiceImpl",10);
SECOND_INTERVIEWS(30, "二审面试", WorkflowSubStageStatusEnum.SECOND_INTERVIEWS_100, "lineInterviewServiceImpl",10),
DECORATION_MODEL(35,"装修款",WorkflowSubStageStatusEnum.PAY_DEPOSIT_45,"DecorationServiceImpl",11);
private Integer code;

View File

@@ -417,41 +417,37 @@ public class DecorationServiceImpl implements DecorationService {
}
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean miniSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
try {
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_10);
if (ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
//工程部验收签名
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())) {
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
request.getPartnerAcceptance().setAcceptanceTime(new Date());
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
acceptanceInfoDO.setShopId(request.getShopId());
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
acceptanceInfoDO.setUpdateTime(new Date());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
}
//更新阶段状态验收中
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
return Boolean.TRUE;
}
return Boolean.FALSE;
} catch (Exception e) {
log.error("mini提交三方验收失败");
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(request.getShopId(), ShopSubStageEnum.SHOP_STAGE_10);
if (!ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_102.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())) {
throw new ServiceException(ErrorCodeEnum.FITMENT_FAIL);
}
//工程部验收签名
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())) {
request.getPartnerAcceptance().setStatus(CommonConstants.ONE);
request.getPartnerAcceptance().setAcceptanceTime(new Date());
String jsonString = JSONObject.toJSONString(request.getPartnerAcceptance());
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
acceptanceInfoDO.setShopId(request.getShopId());
acceptanceInfoDO.setPartnerAcceptanceSignatures(jsonString);
acceptanceInfoDO.setUpdateTime(new Date());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
}
//更新阶段状态验收中
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
return Boolean.TRUE;
}
@Override
@@ -608,39 +604,33 @@ public class DecorationServiceImpl implements DecorationService {
public Boolean pcSubmitAcceptanceSign(ThreeAcceptanceRequest request) {
log.info("submitAcceptance, request:{} ", JSONObject.toJSONString(request));
//营运部 验收签名
try {
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
&& StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
&& Objects.nonNull(request.getOperationsAcceptance())) {
ThreeAcceptanceDTO engineering = JSONObject.parseObject(acceptanceInfoDO1.getEngineeringAcceptanceSignatures(), ThreeAcceptanceDTO.class);
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
request.getOperationsAcceptance().setStatus(CommonConstants.ONE);
request.getOperationsAcceptance().setAcceptanceTime(new Date());
String jsonString = JSONObject.toJSONString(request.getOperationsAcceptance());
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
acceptanceInfoDO.setShopId(request.getShopId());
acceptanceInfoDO.setOperationsAcceptanceSignatures(jsonString);
acceptanceInfoDO.setUpdateTime(new Date());
acceptanceInfoDO.setActualAcceptanceTime(new Date());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
&& CommonConstants.ONE == partner.getResult()
&& CommonConstants.ONE == engineering.getResult()) {
//更新阶段状态验收完毕
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
preparationService.whetherToOpenForAcceptance(request.getShopId());
} else {
//未通过至为带预约
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120, null);
}
AcceptanceInfoDO acceptanceInfoDO1 = acceptanceInfoDAO.selectByShopId(request.getShopId());
if (StringUtils.isNotEmpty(acceptanceInfoDO1.getEngineeringAcceptanceSignatures())
&& StringUtils.isNotEmpty(acceptanceInfoDO1.getPartnerAcceptanceSignatures())
&& Objects.nonNull(request.getOperationsAcceptance())) {
ThreeAcceptanceDTO engineering = JSONObject.parseObject(acceptanceInfoDO1.getEngineeringAcceptanceSignatures(), ThreeAcceptanceDTO.class);
ThreeAcceptanceDTO partner = JSONObject.parseObject(acceptanceInfoDO1.getPartnerAcceptanceSignatures(), ThreeAcceptanceDTO.class);
request.getOperationsAcceptance().setStatus(CommonConstants.ONE);
request.getOperationsAcceptance().setAcceptanceTime(new Date());
String jsonString = JSONObject.toJSONString(request.getOperationsAcceptance());
AcceptanceInfoDO acceptanceInfoDO = new AcceptanceInfoDO();
acceptanceInfoDO.setShopId(request.getShopId());
acceptanceInfoDO.setOperationsAcceptanceSignatures(jsonString);
acceptanceInfoDO.setUpdateTime(new Date());
acceptanceInfoDO.setActualAcceptanceTime(new Date());
acceptanceInfoDAO.updateAcceptanceInfo(acceptanceInfoDO);
if (CommonConstants.ONE == request.getOperationsAcceptance().getResult()
&& CommonConstants.ONE == partner.getResult()
&& CommonConstants.ONE == engineering.getResult()) {
//更新阶段状态验收完毕
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_123, null);
preparationService.whetherToOpenForAcceptance(request.getShopId());
} else {
//未通过至为带预约
shopStageInfoDAO.updateShopStageAndAuditInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_120, null);
}
return Boolean.TRUE;
} catch (Exception e) {
log.error("PC提交三方验收失败");
throw new ServiceException(ErrorCodeEnum.THREE_ACCEPTANCE);
}
return Boolean.TRUE;
}
@Override