add 企微通知
This commit is contained in:
@@ -83,9 +83,12 @@ public class BankServiceImpl extends LineFlowService implements BankService {
|
||||
lineInfoDAO.updateWorkflowStage(lineInfo.getId(), nextStage, nextStage.getInitStatus(), userId);
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
redisUtilPool.delKey(key);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
QWMessageEnum.MESSAGE_1,
|
||||
new HashMap<>());
|
||||
MessageEnum.MESSAGE_6,
|
||||
map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,10 @@ package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.dao.*;
|
||||
import com.cool.store.entity.BuildInformationDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.QualificationsInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
@@ -15,13 +14,14 @@ import com.cool.store.response.BuildInformationResponse;
|
||||
import com.cool.store.service.BuildInformationService;
|
||||
import com.cool.store.mapper.BuildInformationMapper;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author EDY
|
||||
@@ -43,7 +43,12 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
PreparationService preparationService;
|
||||
@Autowired
|
||||
private QualificationsInfoDAO qualificationsInfoDAO;
|
||||
|
||||
@Resource
|
||||
private LineInfoDAO lineInfoDAO;
|
||||
@Resource
|
||||
private CommonService commonService;
|
||||
@Autowired
|
||||
private UserAuthMappingService userAuthMappingService;
|
||||
@Override
|
||||
public BuildInformationResponse getBuildInformation(Long shopId) {
|
||||
BuildInformationResponse response = new BuildInformationResponse();
|
||||
@@ -101,6 +106,30 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
//初始化数据
|
||||
preparationService.licenseCompleted(request.getShopId());
|
||||
preparationService.sysStoreCompleted(request.getShopId());
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> itUsers = itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
commonService.sendQWMessage(itUsers,
|
||||
MessageEnum.MESSAGE_39,
|
||||
map);
|
||||
commonService.sendQWMessage(itUsers,
|
||||
MessageEnum.MESSAGE_40,
|
||||
map);
|
||||
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> posUsers = posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
commonService.sendQWMessage(posUsers,
|
||||
MessageEnum.MESSAGE_38,
|
||||
map);
|
||||
List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId());
|
||||
List<String> xfUsers = xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
commonService.sendQWMessage(xfUsers,
|
||||
MessageEnum.MESSAGE_40,
|
||||
map);
|
||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||
}else {
|
||||
buildInformationDO.setUpdateTime(new Date());
|
||||
|
||||
@@ -185,7 +185,7 @@ public class CommonService {
|
||||
* @param message 消息内容
|
||||
* @param requestMap 参数
|
||||
*/
|
||||
public void sendQWMessage(List<String> userIds, QWMessageEnum message, Map<String, String> requestMap){
|
||||
public void sendQWMessage(List<String> userIds, MessageEnum message, Map<String, String> requestMap){
|
||||
log.info("message:{}, request:{}, userIds:{}", message.getTitle(), JSONObject.toJSONString(requestMap), JSONObject.toJSONString(userIds));
|
||||
if(CollectionUtils.isEmpty(userIds)){
|
||||
return;
|
||||
|
||||
@@ -361,6 +361,17 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//更新阶段状态验收中
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_122);
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId());
|
||||
List<String> userIds = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
commonService.sendQWMessage(userIds,
|
||||
MessageEnum.MESSAGE_37,
|
||||
map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -634,6 +645,15 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
}
|
||||
//更新装修设计状态
|
||||
shopStageInfoDAO.batchUpdateShopStageStatus(request.getShopId(), Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_91, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_110));
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfo.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfo.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_36,
|
||||
map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -124,15 +124,15 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73;
|
||||
//更新阶段信息
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_80);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
||||
requestMap.put("partnerName", lineInfo.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||
commonService.sendMessage(Collections.singletonList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_19, requestMap);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_19,
|
||||
map);
|
||||
} else if (Constants.ONE_INTEGER.equals(request.getStatus())) {
|
||||
shopAuditInfoDO.setRejectReason(request.getResult());
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74;
|
||||
|
||||
@@ -85,6 +85,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public boolean submit(IntentAgreementSubmitRequest request) {
|
||||
@@ -150,12 +151,27 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
lineInfoDAO.updateLineInfo(lineInfo);
|
||||
//初始化店铺
|
||||
shopService.initShop(lineInfo);
|
||||
// 批量获取线索下门店的选址未开始的数据
|
||||
// 批量获取线索下门店的选址未开始的数据
|
||||
List<ShopStageInfoDO> stages = shopStageInfoDAO.getByLineIdAndSubStage(lineInfo.getId());
|
||||
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||
List<ShopInfoDO> shopListByIds = shopInfoDAO.getShopListByIds(shopIds);
|
||||
Set<String> userSet = shopListByIds.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||
MessageEnum.MESSAGE_14,
|
||||
map);
|
||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||
MessageEnum.MESSAGE_23,
|
||||
map);
|
||||
commonService.sendQWMessage(new ArrayList<>(userSet),
|
||||
MessageEnum.MESSAGE_21,
|
||||
map);
|
||||
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -167,7 +183,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
public Boolean initiating(IntentAgreementSubmitRequest request, LoginUserInfo user) {
|
||||
log.info("initiating request:{}",JSONObject.toJSONString(request));
|
||||
log.info("initiating request:{}", JSONObject.toJSONString(request));
|
||||
SigningBaseInfoDO signingBaseInfoDO = request.toSigningBaseInfoDO();
|
||||
boolean submitStatus = intentAgreementMapper.insert(signingBaseInfoDO);
|
||||
if (submitStatus) {
|
||||
@@ -201,14 +217,14 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean skipIntentAgreement(Long lineId,LoginUserInfo user) {
|
||||
log.info("skipIntentAgreement lineId:{},操作人:{}",lineId,user.getName());
|
||||
public Boolean skipIntentAgreement(Long lineId, LoginUserInfo user) {
|
||||
log.info("skipIntentAgreement lineId:{},操作人:{}", lineId, user.getName());
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(lineId);
|
||||
if (lineInfo == null){
|
||||
if (lineInfo == null) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
}
|
||||
if ( !WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
if (!WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_70.getCode().equals(lineInfo.getWorkflowSubStageStatus())) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
|
||||
lineInfo.setWorkflowStage(WorkflowStageEnum.STORE.getCode());
|
||||
@@ -223,7 +239,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
List<Long> shopIds = stages.stream().map(ShopStageInfoDO::getShopId).collect(Collectors.toList());
|
||||
shopStageInfoDAO.batchUpdateByShopIdsAndSubStageStatus(shopIds,
|
||||
Arrays.asList(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_10,
|
||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50,ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_50, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_70));
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -239,7 +255,7 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
@Override
|
||||
public InitiatingRequest getOaDetail(String mobile, String idCardNo) {
|
||||
SigningBaseInfoDO signingBaseInfoDO = intentAgreementMapper.selectByMobile(mobile, idCardNo);
|
||||
if (signingBaseInfoDO==null){
|
||||
if (signingBaseInfoDO == null) {
|
||||
return null;
|
||||
}
|
||||
String redisKey = "OA:" + mobile + idCardNo;
|
||||
|
||||
@@ -98,16 +98,12 @@ public class JoinIntentionServiceImpl extends LineFlowService implements JoinInt
|
||||
QualificationsInfoDO qualificationsInfoDO = request.toQualificationsInfoDO();
|
||||
qualificationsInfoDAO.insertOrUpdate(qualificationsInfoDO);
|
||||
|
||||
// Map<String, String> requestMap = new HashMap<>();
|
||||
// requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||
// requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||
// requestMap.put("lineId", String.valueOf(lineInfoParam.getId()));
|
||||
// HyOpenAreaInfoDO openAreaInfoDO = openAreaInfoMapper.selectById(lineInfoParam.getWantShopAreaId());
|
||||
// requestMap.put("regionName", openAreaInfoDO.getAreaName());
|
||||
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
requestMap.put("partnerUsername", lineInfoParam.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfoParam.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfoDO.getInvestmentManager()),
|
||||
QWMessageEnum.MESSAGE_1,
|
||||
new HashMap<>());
|
||||
MessageEnum.MESSAGE_1,
|
||||
requestMap);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -119,9 +119,12 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
lineInfoDAO.insertOrUpdate(lineInfo);
|
||||
String key = MessageFormat.format(CommonConstants.AMOUNT_KEY, eid, lineInfo.getId());
|
||||
redisUtilPool.delKey(key);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
QWMessageEnum.MESSAGE_1,
|
||||
new HashMap<>());
|
||||
MessageEnum.MESSAGE_6,
|
||||
map);
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
|
||||
@@ -147,22 +150,25 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
franchiseFeeDO.setPayId(payId);
|
||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72);
|
||||
Map<String, String> requestMap = new HashMap<>();
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
requestMap.put("storeName", shopInfoDO.getShopName());
|
||||
requestMap.put("partnerName", lineInfo.getUsername());
|
||||
requestMap.put("partnerMobile", lineInfo.getMobile());
|
||||
requestMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
requestMap.put("shopId", String.valueOf(shopInfoDO.getId()));
|
||||
//commonService.sendMessage(Arrays.asList(lineInfo.getInvestmentManager()), MessageEnum.MESSAGE_18,requestMap);
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_18,
|
||||
map);
|
||||
}
|
||||
if (PayBusinessTypeEnum.INTENT_MONEY.getCode().equals(request.getPayBusinessType())) {
|
||||
lineInfo.setWorkflowSubStage(WorkflowSubStageEnum.PAY_DEPOSIT.getCode());
|
||||
lineInfo.setWorkflowSubStageStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||
lineInfoDAO.insertOrUpdate(lineInfo);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
QWMessageEnum.MESSAGE_1,
|
||||
new HashMap<>());
|
||||
MessageEnum.MESSAGE_5,
|
||||
map);
|
||||
}
|
||||
return payId == null ? null : payId;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.cool.store.dto.openPreparation.UserNameDTO;
|
||||
import com.cool.store.entity.*;
|
||||
import com.cool.store.enums.AuditStatusEnum;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
@@ -51,7 +52,7 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
@Resource
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Resource
|
||||
private PreparationService preparationService;
|
||||
private CommonService commonService;
|
||||
@Resource
|
||||
private RegionService regionService;
|
||||
@Resource
|
||||
@@ -102,6 +103,15 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
planId = openingOperationPlanDAO.insertSelective(openingOperationPlanDO);
|
||||
}
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_141);
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.getShopInfo(request.getShopId());
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_38,
|
||||
map);
|
||||
return planId;
|
||||
|
||||
}
|
||||
|
||||
@@ -887,11 +887,12 @@ public class PointServiceImpl implements PointService {
|
||||
shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||
}
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
|
||||
commonService.sendMessage(Arrays.asList(lineInfo.getDevelopmentManager()), MessageEnum.MESSAGE_15, messageMap);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_15,
|
||||
map);
|
||||
return shopStageInfoDAO.updateShopStageInfo(shopId, ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21);
|
||||
}
|
||||
|
||||
@@ -983,11 +984,12 @@ public class PointServiceImpl implements PointService {
|
||||
if(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_22.getShopSubStageStatus().equals(shopSubStageInfo.getShopSubStageStatus())){
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopRentInfo.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_21, null);
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(shopSubStageInfo.getLineId());
|
||||
Map<String, String> messageMap = new HashMap<>();
|
||||
messageMap.put("lineId", String.valueOf(lineInfo.getId()));
|
||||
messageMap.put("partnerUsername", lineInfo.getUsername());
|
||||
messageMap.put("submitTime", DateUtils.parseDateToStr(DateUtils.NOTICE_DATE, new Date()));
|
||||
commonService.sendMessage(Arrays.asList(lineInfo.getDevelopmentManager()), MessageEnum.MESSAGE_15, messageMap);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_15,
|
||||
map);
|
||||
}
|
||||
return shopRentInfoDAO.updateRentContract(shopRentInfo);
|
||||
}
|
||||
|
||||
@@ -118,10 +118,19 @@ public class ShopServiceImpl implements ShopService {
|
||||
shopInfoDAO.batchAddShop(addShopList);
|
||||
List<Long> shopIds = addShopList.stream().map(ShopInfoDO::getId).collect(Collectors.toList());
|
||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds,true);
|
||||
//todo 确认数量
|
||||
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
QWMessageEnum.MESSAGE_1,
|
||||
new HashMap<>());
|
||||
MessageEnum.MESSAGE_14,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_23,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_21,
|
||||
map);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -277,9 +286,22 @@ public class ShopServiceImpl implements ShopService {
|
||||
Long shopId = shopInfoDAO.addShopInfo(shopInfoDO);
|
||||
if (lineInfo.getWorkflowSubStageStatus().equals(WorkflowSubStageStatusEnum.SIGN_INTENT_AGREEMENT_125.getCode())) {
|
||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), true);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||
MessageEnum.MESSAGE_14,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||
MessageEnum.MESSAGE_23,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(request.getInvestmentManagerUserId()),
|
||||
MessageEnum.MESSAGE_21,
|
||||
map);
|
||||
} else {
|
||||
shopStageInfoDAO.initShopStageInfo(request.getLineId(), Collections.singletonList(shopId), false);
|
||||
}
|
||||
|
||||
return shopId;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.CoolStoreStartFlowService;
|
||||
import com.cool.store.service.PreparationService;
|
||||
import com.cool.store.service.SignFranchiseService;
|
||||
import com.cool.store.service.UserAuthMappingService;
|
||||
import com.cool.store.utils.GeoMapUtil;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
@@ -32,6 +33,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
@Slf4j
|
||||
@@ -40,7 +42,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
SignFranchiseMapper signFranchiseMapper;
|
||||
|
||||
@Resource
|
||||
CoolStoreStartFlowService coolStoreStartFlowService;
|
||||
UserAuthMappingService userAuthMappingService;
|
||||
|
||||
@Resource
|
||||
FranchiseFeeMapper franchiseFeeMapper;
|
||||
@@ -174,6 +176,22 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
//初始化数据
|
||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfoDO.getUsername());
|
||||
map.put("partnerMobile",lineInfoDO.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList());
|
||||
commonService.sendQWMessage(finances,
|
||||
MessageEnum.MESSAGE_34,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_35,
|
||||
map);
|
||||
commonService.sendQWMessage(Collections.singletonList(shopInfoDO.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_26,
|
||||
map);
|
||||
|
||||
} else {
|
||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user