Merge #135 into master from cc_20260511_isTrainComplete
feat:培训完成 修改 * cc_20260511_isTrainComplete: (3 commits squashed) - feat:getData - feat:培训完成 - feat:培训完成 修改 Signed-off-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com> CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/135
This commit is contained in:
@@ -216,14 +216,12 @@ public class ZxjpApiRequest {
|
|||||||
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
@ApiModelProperty("店铺类型:0-无展示门店、1-餐厅店、2-普通门店")
|
||||||
private Integer storeType;
|
private Integer storeType;
|
||||||
|
|
||||||
|
|
||||||
private Long shopId;
|
private Long shopId;
|
||||||
|
|
||||||
@ApiModelProperty("合同编号")
|
@ApiModelProperty("合同编号")
|
||||||
private String contractCode;
|
private String contractCode;
|
||||||
|
|
||||||
|
@ApiModelProperty("培训是否完成")
|
||||||
|
private Integer isTrainComplete;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.cool.store.request.xgj;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Auther zx_szh
|
||||||
|
* @Date 2026/5/11 17:04
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class UpdateTrainCompleteRequest {
|
||||||
|
|
||||||
|
@ApiModelProperty("门店编码")
|
||||||
|
private String code ;
|
||||||
|
@ApiModelProperty("培训完成 1-完成 0-未完成")
|
||||||
|
private Integer isTrainComplete;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ import com.cool.store.request.AuditRequest;
|
|||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
||||||
import com.cool.store.request.xgj.ReceiptRequest;
|
import com.cool.store.request.xgj.ReceiptRequest;
|
||||||
|
import com.cool.store.request.xgj.UpdateTrainCompleteRequest;
|
||||||
import com.cool.store.response.XgjAccessTokenDTO;
|
import com.cool.store.response.XgjAccessTokenDTO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -32,6 +33,8 @@ public interface PushService {
|
|||||||
*/
|
*/
|
||||||
Boolean pushFranchiseFeeToXGJ(PushFranchiseFeeRequest request);
|
Boolean pushFranchiseFeeToXGJ(PushFranchiseFeeRequest request);
|
||||||
|
|
||||||
|
Boolean updateTrainComplete(UpdateTrainCompleteRequest updateTrainCompleteRequest);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推送收款单到新管家
|
* 推送收款单到新管家
|
||||||
* @param receiptRequest
|
* @param receiptRequest
|
||||||
|
|||||||
@@ -13,10 +13,12 @@ import com.cool.store.enums.point.ShopSubStageEnum;
|
|||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.PostAndOrderRequest;
|
import com.cool.store.request.PostAndOrderRequest;
|
||||||
|
import com.cool.store.request.xgj.UpdateTrainCompleteRequest;
|
||||||
import com.cool.store.response.PosAndOrderResponse;
|
import com.cool.store.response.PosAndOrderResponse;
|
||||||
import com.cool.store.service.PosAndOrderInfoService;
|
import com.cool.store.service.PosAndOrderInfoService;
|
||||||
import com.cool.store.mapper.PosAndOrderInfoMapper;
|
import com.cool.store.mapper.PosAndOrderInfoMapper;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
|
import com.cool.store.service.PushService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
@@ -46,6 +48,8 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
|||||||
private EnterpriseUserDAO enterpriseUserDAO;
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
@Autowired
|
@Autowired
|
||||||
private PreparationService preparationService;
|
private PreparationService preparationService;
|
||||||
|
@Resource
|
||||||
|
PushService pushService;
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Integer submitOrUpdate(PostAndOrderRequest request, String user) {
|
public Integer submitOrUpdate(PostAndOrderRequest request, String user) {
|
||||||
@@ -63,6 +67,16 @@ public class PosAndOrderInfoServiceImpl implements PosAndOrderInfoService {
|
|||||||
ShopSubStageStatusEnum subStageStatus = null;
|
ShopSubStageStatusEnum subStageStatus = null;
|
||||||
if (shopSubStageInfo.getIsTerminated()){
|
if (shopSubStageInfo.getIsTerminated()){
|
||||||
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_172;
|
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_172;
|
||||||
|
//直接开通培训权限
|
||||||
|
//调用开通云流水权限接口
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||||
|
UpdateTrainCompleteRequest updateTrainCompleteRequest = new UpdateTrainCompleteRequest();
|
||||||
|
updateTrainCompleteRequest.setCode(shopInfo.getShopCode());
|
||||||
|
updateTrainCompleteRequest.setIsTrainComplete(1);
|
||||||
|
Boolean flag = pushService.updateTrainComplete(updateTrainCompleteRequest);
|
||||||
|
if (flag){
|
||||||
|
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_173;
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171;
|
subStageStatus = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import com.cool.store.exception.ServiceException;
|
|||||||
import com.cool.store.request.ZxjpApiRequest;
|
import com.cool.store.request.ZxjpApiRequest;
|
||||||
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
||||||
import com.cool.store.request.xgj.ReceiptRequest;
|
import com.cool.store.request.xgj.ReceiptRequest;
|
||||||
|
import com.cool.store.request.xgj.UpdateTrainCompleteRequest;
|
||||||
import com.cool.store.response.XgjAccessTokenDTO;
|
import com.cool.store.response.XgjAccessTokenDTO;
|
||||||
import com.cool.store.response.XgjBaseResponse;
|
import com.cool.store.response.XgjBaseResponse;
|
||||||
import com.cool.store.response.XgjOrganizationResponse;
|
import com.cool.store.response.XgjOrganizationResponse;
|
||||||
@@ -141,6 +142,13 @@ public class PushServiceImpl implements PushService {
|
|||||||
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseeBill";
|
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseeBill";
|
||||||
return executePostApiCall(apiUrl, request, Boolean.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
return executePostApiCall(apiUrl, request, Boolean.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean updateTrainComplete(UpdateTrainCompleteRequest request) {
|
||||||
|
String apiUrl = xgjUrl + "/dmp/one-id/open/updateTrainComplete";
|
||||||
|
return executePostApiCall(apiUrl, request, Boolean.class, xgjUsername, xgjSecret,getXgjAccessToken().getAccess_token());
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ContractCallbackDTO pushContract(ContractInformationDTO contractInformationDTO) {
|
public ContractCallbackDTO pushContract(ContractInformationDTO contractInformationDTO) {
|
||||||
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseContract";
|
String apiUrl = xgjUrl + "/dmp/dmp-join/open/franchiseContract";
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import com.cool.store.enums.DownSystemTypeEnum;
|
|||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.FranchiseBrandEnum;
|
import com.cool.store.enums.FranchiseBrandEnum;
|
||||||
import com.cool.store.enums.PlatformBuildEnum;
|
import com.cool.store.enums.PlatformBuildEnum;
|
||||||
|
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.mapper.ApplyLicenseMapper;
|
import com.cool.store.mapper.ApplyLicenseMapper;
|
||||||
import com.cool.store.mapper.SignFranchiseMapper;
|
import com.cool.store.mapper.SignFranchiseMapper;
|
||||||
@@ -22,6 +23,7 @@ import com.cool.store.utils.poi.StringUtils;
|
|||||||
import com.cool.store.utils.poi.constant.Constants;
|
import com.cool.store.utils.poi.constant.Constants;
|
||||||
import com.fasterxml.jackson.core.type.TypeReference;
|
import com.fasterxml.jackson.core.type.TypeReference;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -31,6 +33,9 @@ import java.util.List;
|
|||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_172;
|
||||||
|
import static com.cool.store.enums.point.ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_173;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Author: WangShuo
|
* @Author: WangShuo
|
||||||
* @Date: 2025/04/07/15:12
|
* @Date: 2025/04/07/15:12
|
||||||
@@ -67,6 +72,8 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
private EnterpriseUserDAO enterpriseUserDAO;
|
private EnterpriseUserDAO enterpriseUserDAO;
|
||||||
@Resource
|
@Resource
|
||||||
private PlatformBuildDAO platformBuildDAO;
|
private PlatformBuildDAO platformBuildDAO;
|
||||||
|
@Autowired
|
||||||
|
private ShopStageInfoDAO shopStageInfoDAO;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType) {
|
public ZxjpApiRequest getData(Long shopId, DownSystemTypeEnum systemType) {
|
||||||
@@ -85,6 +92,15 @@ public class SyncDataServiceImpl implements SyncDataService {
|
|||||||
if (hyPartnerUserInfoDO == null) {
|
if (hyPartnerUserInfoDO == null) {
|
||||||
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
throw new ServiceException(ErrorCodeEnum.PARTNER_USER_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
Integer isTrainComplete = 0;
|
||||||
|
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_5);
|
||||||
|
log.info("apiRequest_getData:{}",JSONObject.toJSONString(shopSubStageInfo));
|
||||||
|
if (shopSubStageInfo!=null&&(SHOP_SUB_STAGE_STATUS_172.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())||
|
||||||
|
SHOP_SUB_STAGE_STATUS_173.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus()))){
|
||||||
|
//培训完成
|
||||||
|
isTrainComplete = 1;
|
||||||
|
}
|
||||||
|
request.setIsTrainComplete(isTrainComplete);
|
||||||
//加盟合同
|
//加盟合同
|
||||||
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
SignFranchiseDO signFranchiseDO = signFranchiseMapper.selectByShopId(shopId);
|
||||||
//加盟商所有门店的门店编码
|
//加盟商所有门店的门店编码
|
||||||
|
|||||||
@@ -10,7 +10,9 @@ import com.cool.store.enums.point.ShopSubStageEnum;
|
|||||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||||
import com.cool.store.exception.ServiceException;
|
import com.cool.store.exception.ServiceException;
|
||||||
import com.cool.store.request.TempUserDetailRequest;
|
import com.cool.store.request.TempUserDetailRequest;
|
||||||
|
import com.cool.store.request.xgj.UpdateTrainCompleteRequest;
|
||||||
import com.cool.store.service.PreparationService;
|
import com.cool.store.service.PreparationService;
|
||||||
|
import com.cool.store.service.PushService;
|
||||||
import com.cool.store.service.TempUserDetailService;
|
import com.cool.store.service.TempUserDetailService;
|
||||||
import com.cool.store.service.XfsgEhrService;
|
import com.cool.store.service.XfsgEhrService;
|
||||||
import com.cool.store.utils.StringUtil;
|
import com.cool.store.utils.StringUtil;
|
||||||
@@ -21,6 +23,7 @@ import com.cool.store.vo.TempUserDetailVO;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
@@ -59,6 +62,9 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private RegionDao regionDao;
|
private RegionDao regionDao;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
PushService pushService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TempUserDetailListVO userList(Long shopId) {
|
public TempUserDetailListVO userList(Long shopId) {
|
||||||
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
List<TempUserDetailDO> tempUserDetailDOList = tempUserDetailDAO.userList(shopId);
|
||||||
@@ -171,6 +177,7 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public void registrationCompleted(Long shopId) {
|
public void registrationCompleted(Long shopId) {
|
||||||
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_5);
|
ShopStageInfoDO shopStageInfoDO = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_5);
|
||||||
if (shopStageInfoDO == null) {
|
if (shopStageInfoDO == null) {
|
||||||
@@ -186,7 +193,16 @@ public class TempUserDetailServiceImpl implements TempUserDetailService {
|
|||||||
//培训完成,将订货状态为等待培训中的切为待授权
|
//培训完成,将订货状态为等待培训中的切为待授权
|
||||||
ShopStageInfoDO shopStage = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage());
|
ShopStageInfoDO shopStage = shopStageInfoDAO.getByShopIdAndSubStage(shopId, ShopSubStageEnum.SHOP_STAGE_17.getShopSubStage());
|
||||||
if (shopStage!=null&&shopStage.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171.getShopSubStageStatus())){
|
if (shopStage!=null&&shopStage.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_171.getShopSubStageStatus())){
|
||||||
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_172);
|
//调用开通云流水权限接口
|
||||||
|
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopStage.getShopId());
|
||||||
|
UpdateTrainCompleteRequest updateTrainCompleteRequest = new UpdateTrainCompleteRequest();
|
||||||
|
updateTrainCompleteRequest.setCode(shopInfo.getShopCode());
|
||||||
|
updateTrainCompleteRequest.setIsTrainComplete(1);
|
||||||
|
Boolean flag = pushService.updateTrainComplete(updateTrainCompleteRequest);
|
||||||
|
if (flag){
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_173);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user