Merge remote-tracking branch 'origin/cc_20250211_v2.6' into cc_20250211_v2.6
This commit is contained in:
@@ -32,11 +32,11 @@ public enum MessageEnum {
|
||||
MESSAGE_9("您有一位加盟商已放弃门店体验,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_10("您收到一份二次面审预约,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||
MESSAGE_10_1("您的线索已预约二次面审,请关注", "##### 加盟商姓名:${partnerUsername}\n面审官:${interviewUsername}\n##### 预约时间:${appointmentTime}\n"),
|
||||
MESSAGE_11("您的一个铺位已审核通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
||||
MESSAGE_12("您的一个铺位审核未通过,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n##### 未通过原因:${reason}\n"),
|
||||
MESSAGE_13("您有一个铺位需要审核,请查收", "##### 铺位名称:${pointName}\n##### 铺位地址:${pointAddress}\n"),
|
||||
MESSAGE_11("您的一个铺位已审核通过,请查收", "铺位名称:${pointName}\n铺位地址:${pointAddress}\n"),
|
||||
MESSAGE_12("您的一个铺位审核未通过,请查收", "铺位名称:${pointName}\n铺位地址:${pointAddress}\n未通过原因:${reason}\n"),
|
||||
MESSAGE_13("您有一个铺位需要审核,请查收", "铺位名称:${pointName}\n铺位地址:${pointAddress}"),
|
||||
MESSAGE_14("已为您分配一位加盟商,待推送铺位,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", " 加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_15("您有一份加盟商上传的租赁合同待审核,请查收", "加盟商姓名:${partnerUsername}\n手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_16("您有一家门店待提交系统建店申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_16_1("您有一家门店待提交系统建店申请,请查收", "##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_17("您收到一份证照信息审核申请,请查收", "##### 门店名称:${storeName}\n##### 加盟商姓名:${partnerUsername}\n##### 加盟商手机号码:${partnerMobile}\n"),
|
||||
@@ -76,6 +76,7 @@ public enum MessageEnum {
|
||||
MESSAGE_48("您有一个门店饿了么初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_49("您有一个门店美团外卖初审已通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_50("您有一个门店开业运营方案审核未通过,请查收","门店名称:${storeName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
MESSAGE_51("您有一个加盟商提交了铺位,请查收","铺位名称:${pointName}\n加盟商姓名:${partnerUsername}\n加盟商手机号码:${partnerMobile}\n"),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
private RegionMapper regionMapper;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
|
||||
@Override
|
||||
public String juridicalIdCard(Long shopId) {
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
@@ -100,9 +101,9 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
Long regionId = shopInfo.getRegionId();
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfo.getShopName());
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
//抖音
|
||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||
@@ -111,8 +112,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId);
|
||||
List<String> dyCustomerUserIds =new ArrayList<>();
|
||||
if(!dyCustomerUser.isEmpty()){
|
||||
List<String> dyCustomerUserIds = new ArrayList<>();
|
||||
if (!dyCustomerUser.isEmpty()) {
|
||||
dyCustomerUserIds.addAll(dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(dyCustomerUserIds,
|
||||
@@ -135,8 +136,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId);
|
||||
List<String> ksUserIds =new ArrayList<>();
|
||||
if(!ksUser.isEmpty()){
|
||||
List<String> ksUserIds = new ArrayList<>();
|
||||
if (!ksUser.isEmpty()) {
|
||||
ksUserIds.addAll(ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(ksUserIds,
|
||||
@@ -159,8 +160,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId);
|
||||
List<String> mtbcUserIds =new ArrayList<>();
|
||||
if(!mtbcUser.isEmpty()){
|
||||
List<String> mtbcUserIds = new ArrayList<>();
|
||||
if (!mtbcUser.isEmpty()) {
|
||||
mtbcUserIds.addAll(mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtbcUserIds,
|
||||
@@ -183,8 +184,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> elmUserIds =new ArrayList<>();
|
||||
if(!elmUser.isEmpty()){
|
||||
List<String> elmUserIds = new ArrayList<>();
|
||||
if (!elmUser.isEmpty()) {
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
@@ -207,8 +208,8 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> mtocUserIds =new ArrayList<>();
|
||||
if(!mtocUser.isEmpty()){
|
||||
List<String> mtocUserIds = new ArrayList<>();
|
||||
if (!mtocUser.isEmpty()) {
|
||||
mtocUserIds.addAll(mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtocUserIds,
|
||||
@@ -254,10 +255,12 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
platformBuildInfoVO.setShopName(shopInfo.getShopName());
|
||||
platformBuildInfoVO.setShopCode(shopInfo.getShopCode());
|
||||
platformBuildInfoVO.setRegionName(regionNameMap.get(shopInfo.getRegionId()));
|
||||
platformBuildInfoVO.setProvince(pointInfoDO.getProvince());
|
||||
platformBuildInfoVO.setCity(pointInfoDO.getCity());
|
||||
platformBuildInfoVO.setDistrict(pointInfoDO.getDistrict());
|
||||
platformBuildInfoVO.setAddress(pointInfoDO.getAddress());
|
||||
if (Objects.nonNull(pointInfoDO)) {
|
||||
platformBuildInfoVO.setProvince(pointInfoDO.getProvince());
|
||||
platformBuildInfoVO.setCity(pointInfoDO.getCity());
|
||||
platformBuildInfoVO.setDistrict(pointInfoDO.getDistrict());
|
||||
platformBuildInfoVO.setAddress(pointInfoDO.getAddress());
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(shopContractActualCompletionTime)) {
|
||||
ScheduleDTO scheduleDTO = shopContractActualCompletionTime.get(CommonConstants.ZERO);
|
||||
platformBuildInfoVO.setCompletionColumn(scheduleDTO.getCompletionColumn());
|
||||
@@ -334,20 +337,20 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
||||
doSomething(platformBuildResponse, trial, auditInfo);
|
||||
|
||||
} else{
|
||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
||||
if (Objects.nonNull(auditInfo)) {
|
||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
platformBuildResponse.setReason(auditInfo.getPassReason());
|
||||
} else {
|
||||
platformBuildResponse.setReason(auditInfo.getRejectReason());
|
||||
} else {
|
||||
ShopAuditInfoDO auditInfo = shopAuditInfoDAO.getAuditInfo(platformBuildDO.getAuditId());
|
||||
if (Objects.nonNull(auditInfo)) {
|
||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
platformBuildResponse.setReason(auditInfo.getPassReason());
|
||||
} else {
|
||||
platformBuildResponse.setReason(auditInfo.getRejectReason());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return platformBuildResponse;
|
||||
}
|
||||
}
|
||||
|
||||
private void doSomething(PlatformBuildResponse platformBuildResponse, OperationLogDO trial, ShopAuditInfoDO auditInfo ) {
|
||||
private void doSomething(PlatformBuildResponse platformBuildResponse, OperationLogDO trial, ShopAuditInfoDO auditInfo) {
|
||||
if (Objects.nonNull(trial)) {
|
||||
ShopAuditInfoDO atrialAuditInfo = shopAuditInfoDAO.getAuditInfo(trial.getAuditResultId());
|
||||
if (Objects.nonNull(atrialAuditInfo)) {
|
||||
@@ -359,144 +362,144 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
}
|
||||
if (Objects.nonNull(auditInfo)) {
|
||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
platformBuildResponse.setNewReason(auditInfo.getPassReason());
|
||||
} else {
|
||||
platformBuildResponse.setNewReason(auditInfo.getRejectReason());
|
||||
}
|
||||
if (auditInfo.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
platformBuildResponse.setNewReason(auditInfo.getPassReason());
|
||||
} else {
|
||||
platformBuildResponse.setNewReason(auditInfo.getRejectReason());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer firstAudit(PlatformBuildAuditRequest request) {
|
||||
Integer type = request.getType();
|
||||
Long shopId = request.getShopId();
|
||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Integer firstAudit(PlatformBuildAuditRequest request) {
|
||||
Integer type = request.getType();
|
||||
Long shopId = request.getShopId();
|
||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfo.getLineId());
|
||||
Long regionId = shopInfo.getRegionId();
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfo.getShopName());
|
||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.DOU_YIN);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_183, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182);
|
||||
}
|
||||
|
||||
if (type.equals(PlatformBuildEnum.KUAI_SHOU.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_22);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.KUAI_SHOU);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_223, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222);
|
||||
|
||||
}
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_TUAN_GOU.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_20);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_TUAN_GOU);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_203, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202);
|
||||
|
||||
}
|
||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> elmUserIds = new ArrayList<>();
|
||||
if(!elmUser.isEmpty()){
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
map.put("partnerUsername", lineInfoDO.getUsername());
|
||||
map.put("partnerMobile", lineInfoDO.getMobile());
|
||||
map.put("storeName", shopInfo.getShopName());
|
||||
if (type.equals(PlatformBuildEnum.DOU_YIN.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_18);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
||||
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
MessageEnum.MESSAGE_48,
|
||||
map);
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.DOU_YIN);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_181, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_183, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_182);
|
||||
}
|
||||
return CommonConstants.ONE;
|
||||
}
|
||||
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> mtwmUserIds = new ArrayList<>();
|
||||
if (!mtwmUser.isEmpty()){
|
||||
mtwmUserIds.addAll( mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
if (type.equals(PlatformBuildEnum.KUAI_SHOU.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_22);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
commonService.sendQWMessage(mtwmUserIds,
|
||||
MessageEnum.MESSAGE_49,
|
||||
map);
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
||||
mtwmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.KUAI_SHOU);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_221, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_223, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_222);
|
||||
|
||||
}
|
||||
return CommonConstants.ONE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_TUAN_GOU.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_20);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_TUAN_GOU);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_201, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_203, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_202);
|
||||
|
||||
@Override
|
||||
public Integer secondAudit(PlatformBuildAuditRequest request) {
|
||||
Integer type = request.getType();
|
||||
Long shopId = request.getShopId();
|
||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_215, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||
}
|
||||
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_211, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> elmUserIds = new ArrayList<>();
|
||||
if (!elmUser.isEmpty()) {
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
||||
elmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
MessageEnum.MESSAGE_48,
|
||||
map);
|
||||
}
|
||||
return CommonConstants.ONE;
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_195, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_191.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||
doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_191, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
List<EnterpriseUserDO> mtwmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_HEADQUARTERS_BUILD_CUSTOMER, regionId);
|
||||
List<String> mtwmUserIds = new ArrayList<>();
|
||||
if (!mtwmUser.isEmpty()) {
|
||||
mtwmUserIds.addAll(mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtwmUserIds,
|
||||
MessageEnum.MESSAGE_49,
|
||||
map);
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_193, request.getOperateUserId(),
|
||||
mtwmUser, OperationTypeEnum.OPERATION_TYPE_1, null, OperationStatusEnum.NOT_PROCESSED);
|
||||
}
|
||||
return CommonConstants.ONE;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private Integer doThing(PlatformBuildDO platformBuildDO, PlatformBuildAuditRequest request, ShopAuditInfoDO shopAuditInfoDO, Long shopId, ShopSubStageStatusEnum nowStatus, ShopSubStageStatusEnum passStatus, ShopSubStageStatusEnum rejectStatus) {
|
||||
Long auditId = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, passStatus);
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, rejectStatus);
|
||||
@Override
|
||||
public Integer secondAudit(PlatformBuildAuditRequest request) {
|
||||
Integer type = request.getType();
|
||||
Long shopId = request.getShopId();
|
||||
PlatformBuildDO platformBuildDO = platformBuildDAO.selectOneByShopId(shopId, type);
|
||||
if (type.equals(PlatformBuildEnum.E_LE_ME.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_21);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_213.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.E_LE_ME);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_213, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_215, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_214);
|
||||
}
|
||||
|
||||
if (type.equals(PlatformBuildEnum.MEI_TUAN_WAI_MAI.getCode())) {
|
||||
ShopStageInfoDO shopSubStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_19);
|
||||
if (!shopSubStageInfo.getShopSubStageStatus().equals(SHOP_SUB_STAGE_STATUS_193.getShopSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.NOT_ALLOW_OPERATE);
|
||||
}
|
||||
ShopAuditInfoDO shopAuditInfoDO = PlatformBuildAuditRequest.convert(request, AuditTypeEnum.MEI_TUAN_WAI_MAI);
|
||||
return doThing(platformBuildDO, request, shopAuditInfoDO, shopId, SHOP_SUB_STAGE_STATUS_193, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_195, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_194);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private Integer doThing(PlatformBuildDO platformBuildDO, PlatformBuildAuditRequest request, ShopAuditInfoDO shopAuditInfoDO, Long shopId, ShopSubStageStatusEnum nowStatus, ShopSubStageStatusEnum passStatus, ShopSubStageStatusEnum rejectStatus) {
|
||||
Long auditId = shopAuditInfoDAO.addAuditInfo(shopAuditInfoDO);
|
||||
if (request.getResultType().equals(AuditResultTypeEnum.PASS.getCode())) {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, passStatus);
|
||||
} else {
|
||||
shopStageInfoDAO.updateShopStageInfo(shopId, rejectStatus);
|
||||
}
|
||||
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, nowStatus, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||
operationLogService.batchUpdateProcessed(operationLogs, auditId, request.getOperateUserId(), request.getReason());
|
||||
platformBuildDO.setAuditId(auditId);
|
||||
platformBuildDO.setAccount(request.getAccount());
|
||||
platformBuildDO.setPassword(request.getPassword());
|
||||
platformBuildDO.setUpdateTime(new Date());
|
||||
platformBuildDO.setUpdateUser(request.getOperateUserId());
|
||||
platformBuildDO.setPoi(request.getPoi());
|
||||
platformBuildDO.setStoreId(request.getStoreId());
|
||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuildDO);
|
||||
}
|
||||
List<OperationLogDO> operationLogs = operationLogDAO.getBySubStageStatusEnumAndsStatus(shopId, nowStatus, OperationTypeEnum.OPERATION_TYPE_1.getCode());
|
||||
operationLogService.batchUpdateProcessed(operationLogs, auditId, request.getOperateUserId(), request.getReason());
|
||||
platformBuildDO.setAuditId(auditId);
|
||||
platformBuildDO.setAccount(request.getAccount());
|
||||
platformBuildDO.setPassword(request.getPassword());
|
||||
platformBuildDO.setUpdateTime(new Date());
|
||||
platformBuildDO.setUpdateUser(request.getOperateUserId());
|
||||
platformBuildDO.setPoi(request.getPoi());
|
||||
platformBuildDO.setStoreId(request.getStoreId());
|
||||
return platformBuildDAO.updateByShopIdAndTypeSelective(platformBuildDO);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -344,11 +344,10 @@ public class PointServiceImpl implements PointService {
|
||||
//审批通过的情况下 生成下一个节点的待办数据
|
||||
pointTodoInfoDAO.addPointTodoInfo(PointAuditRecordDO.convertTODO(nextAuditRecord));
|
||||
List<String> sendMessageUserIds = JSONObject.parseArray(nextAuditRecord.getHandlerUserIds(), String.class);
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
commonService.sendMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, messageMap);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("pointName",pointInfo.getPointName()) ;
|
||||
map.put("pointAddress",pointInfo.getAddress()) ;
|
||||
commonService.sendQWMessage(sendMessageUserIds, MessageEnum.MESSAGE_13, map);
|
||||
}else{
|
||||
PointInfoDO updatePoint = new PointInfoDO();
|
||||
updatePoint.setId(pointInfo.getId());
|
||||
@@ -362,7 +361,7 @@ public class PointServiceImpl implements PointService {
|
||||
messageMap.put("pointId", String.valueOf(pointInfo.getId()));
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, messageMap);
|
||||
commonService.sendQWMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_11, messageMap);
|
||||
result = pointInfoDAO.updatePointInfo(updatePoint);
|
||||
}
|
||||
return result;
|
||||
@@ -387,7 +386,7 @@ public class PointServiceImpl implements PointService {
|
||||
messageMap.put("pointName", pointInfo.getPointName());
|
||||
messageMap.put("pointAddress", pointInfo.getAddress());
|
||||
messageMap.put("reason", reason);
|
||||
commonService.sendMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, messageMap);
|
||||
commonService.sendQWMessage(Arrays.asList(pointInfo.getDevelopmentManager()), MessageEnum.MESSAGE_12, messageMap);
|
||||
return pointInfoDAO.updatePointInfo(pointInfoUpdate);
|
||||
}
|
||||
|
||||
@@ -795,6 +794,15 @@ public class PointServiceImpl implements PointService {
|
||||
}
|
||||
updateStatusList.add(selectStatus);
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(shopId, updateStatusList);
|
||||
if (selectStatus.equals( ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_11)){
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("pointName",pointInfo.getPointName()) ;
|
||||
map.put("pointAddress",pointInfo.getAddress());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_13,
|
||||
map);
|
||||
}
|
||||
return pointRecommendDAO.updateStatusByPointIdAndLineId(pointId, shopId);
|
||||
} catch (ServiceException e) {
|
||||
throw e;
|
||||
@@ -853,6 +861,13 @@ public class PointServiceImpl implements PointService {
|
||||
updatePoint.setId(pointId);
|
||||
updatePoint.setShopId(shopInfo.getId());
|
||||
pointInfoDAO.updatePointInfo(updatePoint);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
map.put("pointName",pointInfo.getPointName()) ;
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_51,
|
||||
map);
|
||||
return pointId;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user