Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
bianyadong
2024-05-22 19:34:30 +08:00
15 changed files with 64 additions and 32 deletions

View File

@@ -152,7 +152,9 @@ public class CommonConstants {
public static final String DEAULT_INVESTMENT_JOBNUMBER = "020125244825417786";
// public static final String DEAULT_SELECT_SITE_MANAGER = "09080211";
public static final String DEAULT_SELECT_SITE_MANAGER = "020125244825417786";
// 【铺位1】所属战区没有战区经理、营运经理和大区经理开店负责人展示【王磊】
// public static final String DEAULT_SHOP_MANAGER_USER_ID = "19060164";
public static final String DEAULT_SHOP_MANAGER_USER_ID = "23483622251259165";
public static final int MAX_LENGTH_ONE_HUNDRED = 100;
public static final String YUN_XUE_TANG_SUC_CODE = "10000";

View File

@@ -188,6 +188,9 @@ public enum ErrorCodeEnum {
AUDIT_RESULT_FALSE(109012, "意向加盟合同API本次调用结果与上一次不一致", null),
TIME_NULL_FALSE(109013, "有时间为空", null),
INSERT_OPENING_OPERATION_PLAN_AUDIT_FALSE(103001,"插入运营方案审核信息失败",null),
INSERT_OPENING_OPERATION_PLAN_FALSE(103002,"插入运营方案失败",null),
SHOP_ID_IS_NULL(103003,"验参shopId失败为空",null),

View File

@@ -27,7 +27,7 @@ public enum WorkflowSubStageStatusEnum {
//缴纳意向金,装修款
PAY_DEPOSIT_45(45,"待缴费"),
PAY_DEPOSIT_50(50,"已缴费"),
PAY_FAIL_55(55,"缴费失败"),
PAY_FAIL_55(55,"审核未通过"),
//签署意向协议
SIGN_INTENT_AGREEMENT_60(60,"待补充"),

View File

@@ -50,7 +50,7 @@ public enum ShopSubStageStatusEnum {
SHOP_SUB_STAGE_STATUS_71(ShopSubStageEnum.SHOP_STAGE_7, 710, "待缴费", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_72(ShopSubStageEnum.SHOP_STAGE_7, 720, "待审核", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_73(ShopSubStageEnum.SHOP_STAGE_7, 730, "已缴费", Boolean.TRUE),
SHOP_SUB_STAGE_STATUS_74(ShopSubStageEnum.SHOP_STAGE_7, 740, "缴费失败", Boolean.FALSE),
SHOP_SUB_STAGE_STATUS_74(ShopSubStageEnum.SHOP_STAGE_7, 740, "审核不通过", Boolean.FALSE),
//加盟合同签约
SHOP_SUB_STAGE_STATUS_80(ShopSubStageEnum.SHOP_STAGE_8, 800, "待提交", Boolean.FALSE),

View File

@@ -435,4 +435,9 @@ public class FranchiseAgreementRequest {
* 装修合同业务分类默认3121375929356587766
*/
private String zxhtywfl;
/**
* 法定代表人或负责人
*/
private String fddbr;
}

View File

@@ -7,6 +7,7 @@ import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
@Data
public class InitiatingRequest {
@@ -105,6 +106,10 @@ public class InitiatingRequest {
private String csfzName;
private Date signStartTime;
private Date signEndTime;
public InitiatingDO toInitiatingDO() {
InitiatingDO initiatingDO = new InitiatingDO();
@@ -115,14 +120,14 @@ public class InitiatingRequest {
initiatingDO.setTitle("加盟意向协议-" + this.signName + "-" + dateTime);
initiatingDO.setApply_date(this.apply_date);
initiatingDO.setJms_id_card(this.idCardNo);
if (StringUtil.isNotBlank(this.businessLicenseAddress)){
if (StringUtil.isNotBlank(this.businessLicenseAddress)) {
initiatingDO.setJms_id_card_address(this.businessLicenseAddress);
}else if (StringUtil.isNotBlank(this.idCardAddress)){
} else if (StringUtil.isNotBlank(this.idCardAddress)) {
initiatingDO.setJms_id_card_address(this.idCardAddress);
}
if (StringUtil.isNotBlank(this.businessLicenseCode)){
if (StringUtil.isNotBlank(this.businessLicenseCode)) {
initiatingDO.setJms_id_card(this.businessLicenseCode);
}else if (StringUtil.isNotBlank(this.idCardNo)){
} else if (StringUtil.isNotBlank(this.idCardNo)) {
initiatingDO.setJms_id_card(this.idCardNo);
}
initiatingDO.setJms_name(this.signName);
@@ -133,12 +138,12 @@ public class InitiatingRequest {
initiatingDO.setAnnex1(this.annex1);
initiatingDO.setAnnex2(this.annex2);
initiatingDO.setAnnex3(this.annex3);
initiatingDO.setQy_year(this.qy_year);
initiatingDO.setQy_month(this.qy_month);
initiatingDO.setQy_day(this.qy_day);
initiatingDO.setJy_year(this.jy_year);
initiatingDO.setJy_month(this.jy_month);
initiatingDO.setJy_day(this.jy_day);
initiatingDO.setQy_year(this.signStartTime.getYear());
initiatingDO.setQy_month(this.signStartTime.getMonth());
initiatingDO.setQy_day(this.signStartTime.getDay());
initiatingDO.setJy_year(this.signEndTime.getYear());
initiatingDO.setJy_month(this.signEndTime.getMonth());
initiatingDO.setJy_day(this.signEndTime.getDay());
initiatingDO.setYxjzz(this.yxjzz);
initiatingDO.setXyqx_month(this.xyqx_month);
initiatingDO.setJmf(this.jmf);

View File

@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Date;
@Data
@@ -15,8 +16,10 @@ public class TrainingExperienceDistributionRequest {
@ApiModelProperty("用户信息表partnerId")
private String partnerId;
@ApiModelProperty("体验门店id")
@NotNull(message = "门店id为空")
private String storeId;
@ApiModelProperty("门店名")
@NotNull(message = "门店名为空")
private String storeName;
@ApiModelProperty("开始体验时间")
private Date experienceStartTime;

View File

@@ -115,7 +115,7 @@ public class FranchiseFeeResponse {
@ApiModelProperty("审核原因")
private String result;
@ApiModelProperty("审核状态")
@ApiModelProperty("审核状态 0通过,1拒绝")
private Integer status;
public static LinePay from(LinePayDO linePayDO) {

View File

@@ -119,7 +119,9 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
List<UserAuthMappingDO> userAuthByMappingIds = userAuthMappingMapper.getUserAuthByMappingIds(Collections.singletonList(String.valueOf(regionId)));
if (CollectionUtils.isNotEmpty(userAuthByMappingIds)) {
List<String> sendUserIds = userAuthByMappingIds.stream().map(UserAuthMappingDO::getUserId).collect(Collectors.toList());
sendUsers.addAll(sendUserIds);
if (CollectionUtils.isNotEmpty(sendUserIds)){
sendUsers = enterpriseUserRoleMapper.getUserIdsByRoleIds(Collections.singletonList("130000000"), sendUserIds);
}
}
} else {
sendUsers.add(shopInfoDO.getSupervisorUserId());

View File

@@ -131,15 +131,14 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByPrimaryKey(request.getId());
franchiseFeeDO.setAuditId(shopAuditInfoDO.getId());
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
Map<String, String> requestMap = new HashMap<>();
requestMap.put("storeName", shopInfoDO.getShopName());
requestMap.put("partnerName", lineInfoDO.getUsername());
requestMap.put("partnerMobile", lineInfoDO.getMobile());
requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
// ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
// LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
// Map<String, String> requestMap = new HashMap<>();
// requestMap.put("storeName", shopInfoDO.getShopName());
// requestMap.put("partnerName", lineInfoDO.getUsername());
// requestMap.put("partnerMobile", lineInfoDO.getMobile());
// requestMap.put("lineId", String.valueOf(lineInfoDO.getId()));
// commonService.sendMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()), MessageEnum.MESSAGE_18, requestMap);
return true;
}
}

View File

@@ -188,6 +188,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
if (Objects.isNull(request)) {
throw new ServiceException(ErrorCodeEnum.PARAMS_VALIDATE_ERROR);
}
verifyDate(request);
Map<String, Object> requestMap = new HashMap<>();
fillSignatureInfo(requestMap);
String url = xfsgUrl + Constants.INTENTION_CONTRACT_URL + "?timestamp=" + requestMap.get("timestamp") + "&signature=" + requestMap.get("signature");
@@ -211,6 +212,15 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
}
}
private void verifyDate(InitiatingRequest request) {
if (request.getSignStartTime() == null || request.getSignEndTime() == null) {
throw new ServiceException(ErrorCodeEnum.TIME_NULL_FALSE);
}
if (request.getSignStartTime().after(request.getSignEndTime())) {
throw new ServiceException(ErrorCodeEnum.TIME_FALSE);
}
}
@Override
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
String redisKey = "OA:" + mobile + idCardNo;

View File

@@ -103,7 +103,7 @@ public class LinePayServiceImpl implements LinePayService {
requestMap.put("partnerName",lineInfo.getUsername());
requestMap.put("partnerMobile",lineInfo.getMobile());
requestMap.put("lineId",String.valueOf(lineInfo.getId()));
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_20,requestMap);
commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
}
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());

View File

@@ -953,7 +953,11 @@ public class PointServiceImpl implements PointService {
updateShop.setId(shopId);
updateShop.setShopStage(ShopStageEnum.SHOP_STAGE_2.getShopStage());
List<UserRoleEnum> roleList = Arrays.asList(UserRoleEnum.THEATER_MANAGER, UserRoleEnum.OPERATIONS_MANAGER, UserRoleEnum.REGION_MANAGER);
updateShop.setShopManagerUserId(sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList));
String shopManagerUserId = sysRoleService.getUserIdByRegionIdWithRolePriority(shopInfo.getRegionId(), roleList);
if(StringUtils.isBlank(shopManagerUserId)){
shopManagerUserId = CommonConstants.DEAULT_SHOP_MANAGER_USER_ID;
}
updateShop.setShopManagerUserId(shopManagerUserId);
shopInfoDAO.updateShopInfo(updateShop);
//发送验证码
commonService.sendSms(lineInfo.getMobile(),SMSMsgEnum.LICENSE_SUBMITTED);

View File

@@ -291,6 +291,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
.yyzzfyj(temp)
.zhihang(linePayDO.getBranchBankName())
.zqyty(SignTypeEnum.getWorkflowStageByCode(request.getSignType()).getSap())
.fddbr(licenseTransactDO.getLicenseLegalPerson())
.build();
}
@@ -420,8 +421,8 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
@Override
@Transactional(rollbackFor = Exception.class)
public Boolean rePay(Long shopId) {
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_7);
shopStageInfoDAO.updateShopStageInfo(shopId,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74);
shopStageInfoDAO.updateShopStageToNotStarted(shopId, ShopSubStageEnum.SHOP_STAGE_8);
return true;
}
}

View File

@@ -1,18 +1,16 @@
package com.cool.store.controller.webb;
import com.cool.store.entity.LeaseBaseInfoDO;
import com.cool.store.enums.ExperienceStatusEnum;
import com.cool.store.request.TrainingExperienceDistributionRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.TrainingExperienceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.websocket.server.PathParam;
@RestController
@RequestMapping("/pc/training/experience/")
@@ -25,7 +23,7 @@ public class PCTrainingExperienceController {
@ApiOperation("实训体验分配或更新")
@PostMapping("/distribution")
public ResponseResult<Boolean> distribution(@RequestBody TrainingExperienceDistributionRequest request) {
public ResponseResult<Boolean> distribution(@RequestBody @Validated TrainingExperienceDistributionRequest request) {
return ResponseResult.success(trainingExperienceService.distribution(request));
}