Merge remote-tracking branch 'origin/cc_20250211_v2.6' into cc_20250211_v2.6
This commit is contained in:
@@ -233,7 +233,8 @@ public enum ErrorCodeEnum {
|
||||
UPDATE_FAIL(131000,"修改失败,表单不存在!",null),
|
||||
LICENSE_LEGAL_STAGE_FAIL(131001,"营业执照阶段未上传!",null),
|
||||
GET_JURIDICAL_ID_CARD_NO_FAIL(131002,"获取法人身份证信息失败!",null),
|
||||
UPDATE_INVESTMENT_MANAGER_FAIL(131005,"当前用户已经为该门店招商经理",null)
|
||||
UPDATE_INVESTMENT_MANAGER_FAIL(131005,"当前用户已经为该门店招商经理",null),
|
||||
CONFIRM_THE_APPROVER(131006,"您提交的铺位暂时找不到选址审批人,请联系系统管理员配置选址审批权限后再提交铺位审批",null)
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -195,13 +195,13 @@ public enum MessageEnum {
|
||||
return null;
|
||||
}
|
||||
|
||||
public String getQWMessageUrl(String qywxUrl2, String corpId, Map<String, String> paramMap) {
|
||||
public String getQWMessageUrl(String qywxUrl2, String corpId, Map<String, String> paramMap,String target,String eid) {
|
||||
if (StringUtils.isAnyBlank(qywxUrl2, corpId) ) {
|
||||
return "";
|
||||
}
|
||||
String messageUrl = null;
|
||||
try {
|
||||
String noticeUrl = String.format(qywxUrl2, corpId, "qw_self_dkf","common");
|
||||
String noticeUrl = String.format(qywxUrl2, corpId,"qw_self_dkf",target,corpId,"qw_self_dkf",eid);
|
||||
String finalUrl = buildUrlWithParams(noticeUrl, paramMap);
|
||||
log.info("finalUrl:{}", finalUrl);
|
||||
messageUrl = URLEncoder.encode(finalUrl, "UTF-8");
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
<select id="getPayTimeByShopIds" resultType="com.cool.store.dto.FranchiseFeeDTO">
|
||||
select a.shop_id AS shopId ,
|
||||
b.pay_time as payTime,
|
||||
b.combined_field as combinedField,
|
||||
a.year_franchise_fee as yearFranchiseFee,
|
||||
a.first_year_manage_fee as firstYearManagementFee,
|
||||
a.loan_margin as loanMargin,
|
||||
a.first_year_start_time as firstYearStartTime,
|
||||
a.first_year_end_time as firstYearEndTime,
|
||||
|
||||
@@ -78,12 +78,9 @@
|
||||
<if test="branchBankName != null">
|
||||
branch_bank_name,
|
||||
</if>
|
||||
<if test="payTime != null">
|
||||
pay_time,
|
||||
</if>
|
||||
<if test="payPic != null">
|
||||
pay_pic,
|
||||
</if>
|
||||
|
||||
<if test="promisePic != null">
|
||||
promise_pic,
|
||||
</if>
|
||||
@@ -111,6 +108,9 @@
|
||||
<if test="amount != null">
|
||||
amount,
|
||||
</if>
|
||||
<if test="combinedField != null">
|
||||
combined_field,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="partnerId != null">
|
||||
@@ -143,12 +143,8 @@
|
||||
<if test="branchBankName != null">
|
||||
#{branchBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payTime != null">
|
||||
#{payTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="payPic != null">
|
||||
#{payPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="promisePic != null">
|
||||
#{promisePic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -176,6 +172,9 @@
|
||||
<if test="amount !=null">
|
||||
#{amount},
|
||||
</if>
|
||||
<if test="combinedField != null">
|
||||
#{combinedField,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="com.cool.store.entity.LinePayDO">
|
||||
@@ -211,12 +210,9 @@
|
||||
<if test="branchBankName != null">
|
||||
branch_bank_name = #{branchBankName,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="payTime != null">
|
||||
pay_time = #{payTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="payPic != null">
|
||||
pay_pic = #{payPic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
||||
<if test="promisePic != null">
|
||||
promise_pic = #{promisePic,jdbcType=VARCHAR},
|
||||
</if>
|
||||
@@ -238,6 +234,9 @@
|
||||
<if test="amount != null">
|
||||
amount = #{amount,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="combinedField != null">
|
||||
combined_field = #{combinedField,jdbcType=VARCHAR},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
@@ -4,6 +4,7 @@ import lombok.Data;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
@@ -15,18 +16,25 @@ import java.util.Date;
|
||||
@Data
|
||||
public class FranchiseFeeDTO {
|
||||
private Long shopId;
|
||||
|
||||
//缴费时间
|
||||
private Date payTime;
|
||||
|
||||
//每年加盟费
|
||||
private String yearFranchiseFee;
|
||||
|
||||
//保证金
|
||||
private String loanMargin;
|
||||
|
||||
private Date firstYearStartTime;
|
||||
|
||||
private Date firstYearEndTime;
|
||||
|
||||
//第一年度管理费
|
||||
private String firstYearManagementFee;
|
||||
//第一年度品牌使用费
|
||||
private String firstYearFee;
|
||||
|
||||
//履约保证金
|
||||
private String performanceBond;
|
||||
//组合字段
|
||||
private String combinedField;
|
||||
|
||||
private List<Date> payTimeList;
|
||||
|
||||
}
|
||||
|
||||
@@ -42,6 +42,7 @@ public class LinePaySubmitRequest {
|
||||
@ApiModelProperty("支行名称")
|
||||
private String branchBankName;
|
||||
|
||||
//正新缴纳加盟费后续:payTime,payPic废弃使用combinedField
|
||||
@ApiModelProperty("缴纳时间")
|
||||
private String payTime;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> itList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.IT_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> itUsers = new ArrayList<>();
|
||||
if (!itList.isEmpty()){
|
||||
if (Objects.nonNull(itList)){
|
||||
itUsers.addAll(itList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(itUsers,
|
||||
@@ -122,7 +122,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
map);
|
||||
List<EnterpriseUserDO> posList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.HUO_MA_EMPLOYEE, shopInfoDO.getRegionId());
|
||||
List<String> posUsers = new ArrayList<>();
|
||||
if (!posList.isEmpty()){
|
||||
if (Objects.nonNull(posList)){
|
||||
posUsers.addAll( posList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(posUsers,
|
||||
@@ -130,7 +130,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
map);
|
||||
List<EnterpriseUserDO> xfList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.XIN_FA_SYS_CUSTOMER, shopInfoDO.getRegionId());
|
||||
List<String> xfUsers = new ArrayList<>();
|
||||
if(!xfList.isEmpty()){
|
||||
if(Objects.nonNull(xfList)){
|
||||
xfUsers.addAll(xfList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(xfUsers,
|
||||
@@ -138,7 +138,7 @@ public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
map);
|
||||
List<EnterpriseUserDO> zxtList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.TENT_PASS_CUSTOMER, shopInfoDO.getRegionId());
|
||||
List<String> zxtUsers = new ArrayList<>();
|
||||
if(!zxtList.isEmpty()){
|
||||
if(Objects.nonNull(zxtList)){
|
||||
zxtUsers.addAll(zxtList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(zxtUsers,
|
||||
|
||||
@@ -198,7 +198,7 @@ public class CommonService {
|
||||
}
|
||||
try {
|
||||
// String pcMessageUrl = message.getQWMessageUrl(qywxUrl1, dingCorpId, requestMap);
|
||||
String messageUrl = message.getQWMessageUrl(qywxUrl2, dingCorpId, requestMap);
|
||||
String messageUrl = message.getQWMessageUrl(qywxUrl2, dingCorpId, requestMap,"todo",enterpriseId);
|
||||
log.info("messageUrl:{}", messageUrl);
|
||||
if(StringUtils.isBlank(messageUrl)){
|
||||
log.info("获取通知url为空");
|
||||
|
||||
@@ -371,7 +371,7 @@ public class DecorationServiceImpl implements DecorationService {
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.ENGINEER_DEP_SUPERVISOR, shopInfoDO.getRegionId());
|
||||
List<String> userIds = new ArrayList<>();
|
||||
if (!userDOList.isEmpty()) {
|
||||
if (Objects.nonNull(userDOList)) {
|
||||
userIds.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(userIds,
|
||||
|
||||
@@ -25,6 +25,9 @@ import com.cool.store.utils.easyExcel.EasyExcelUtil;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import com.cool.store.utils.poi.StringUtils;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@@ -37,6 +40,7 @@ import org.springframework.stereotype.Service;
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigInteger;
|
||||
import java.text.MessageFormat;
|
||||
import java.text.ParseException;
|
||||
import java.time.temporal.ChronoUnit;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
@@ -95,6 +99,7 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
|
||||
@Resource
|
||||
private InvoicingDAO invoicingDAO;
|
||||
|
||||
@Override
|
||||
@Async
|
||||
public void branchShopList(List<BranchShopResponse> list, ImportTaskDO importTaskDO) {
|
||||
@@ -105,9 +110,16 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
List<Long> shopIds = list.stream().map(BranchShopResponse::getShopId).collect(Collectors.toList());
|
||||
List<SignFranchiseDO> signFranchises = signFranchiseMapper.selectByShopIds(shopIds);
|
||||
List<FranchiseFeeDTO> franchiseFees = franchiseFeeMapper.getPayTimeByShopIds(shopIds);
|
||||
Map<Long, Date> payTimeMap = franchiseFees.stream().filter(o -> o.getPayTime() != null)
|
||||
.filter(o -> o.getShopId() != null)
|
||||
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, FranchiseFeeDTO::getPayTime));
|
||||
Map<Long, List<Date>> payTimeMap = new HashMap<>();
|
||||
for (FranchiseFeeDTO dto : franchiseFees) {
|
||||
List<Date> payTimeList = JsonToDate(dto.getCombinedField());
|
||||
if (dto.getPayTime() != null) {
|
||||
payTimeList.add(dto.getPayTime());
|
||||
}
|
||||
Collections.sort(payTimeList);
|
||||
payTimeMap.put(dto.getShopId(), payTimeList);
|
||||
}
|
||||
|
||||
Map<Long, FranchiseFeeDTO> franchiseFeeDTOMap = franchiseFees.stream().filter(o -> o.getShopId() != null)
|
||||
.collect(Collectors.toMap(FranchiseFeeDTO::getShopId, Function.identity()));
|
||||
Map<Long, SignFranchiseDO> signFranchiseMap = new HashMap<>();
|
||||
@@ -131,6 +143,8 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
dto.setFranchiseFeeBill(franchiseFeeDTO.getYearFranchiseFee());
|
||||
dto.setLoanMargin(franchiseFeeDTO.getLoanMargin());
|
||||
dto.setPerformanceBondBill(franchiseFeeDTO.getPerformanceBond());
|
||||
dto.setFirstYearManagementFeeBill(franchiseFeeDTO.getFirstYearManagementFee());
|
||||
dto.setFirstYearBrandingFeeBill(franchiseFeeDTO.getFirstYearFee());
|
||||
}
|
||||
dto.setUserName(response.getUsername());
|
||||
dto.setMobile(response.getMobile());
|
||||
@@ -146,9 +160,22 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
dto.setContractStartTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractStartTime()));
|
||||
dto.setContractEndTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, signFranchiseDO.getContractEndTime()));
|
||||
}
|
||||
Date payTime = payTimeMap.get(response.getShopId());
|
||||
if (Objects.nonNull(payTime)) {
|
||||
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime));
|
||||
List<Date> payTime = payTimeMap.getOrDefault(response.getShopId(), new ArrayList<>());
|
||||
for (int i = 0; i < payTime.size() && i <= 3; i++) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
dto.setFirstPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||
break;
|
||||
case 1:
|
||||
dto.setSecondPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||
break;
|
||||
case 2:
|
||||
dto.setThirdPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||
break;
|
||||
case 3:
|
||||
dto.setFourthPayTime(DateUtils.parseDateToStr(SPECIAL_DATE_START_1, payTime.get(i)));
|
||||
break;
|
||||
}
|
||||
}
|
||||
InvoicingDO invoicingDO = InvoicingMap.get(response.getShopId());
|
||||
if (invoicingDO != null) {
|
||||
@@ -192,5 +219,26 @@ public class ExportRealizeServiceImpl implements ExportRealizeService {
|
||||
}
|
||||
return o.toString();
|
||||
}
|
||||
|
||||
private List<Date> JsonToDate(String json) {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
// 解析JSON字符串为JsonNode对象
|
||||
JsonNode jsonNode = null;
|
||||
try {
|
||||
jsonNode = mapper.readTree(json);
|
||||
List<Date> payTimeList = new ArrayList<>();
|
||||
// 遍历数组节点
|
||||
for (JsonNode node : jsonNode) {
|
||||
long payTime = node.get("payTime").asLong();
|
||||
// 将时间戳转换为Date对象
|
||||
Date date = new Date(payTime);
|
||||
payTimeList.add(date);
|
||||
}
|
||||
return payTimeList;
|
||||
} catch (Exception e) {
|
||||
log.info("解析加盟费缴纳时间json失败");
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -129,12 +129,12 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
LineInfoDO lineInfo = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||
Set<String> franchiseContractUser = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, shopInfoDO.getRegionId());
|
||||
if (!joinUser.isEmpty()) {
|
||||
if (Objects.nonNull(joinUser)) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
franchiseContractUser.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||
if (!regionUser.isEmpty()) {
|
||||
if (Objects.nonNull(regionUser)) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
franchiseContractUser.addAll(regionUserIds);
|
||||
}
|
||||
|
||||
@@ -163,12 +163,12 @@ public class IntentAgreementServiceImpl extends LineFlowService implements Inten
|
||||
Set<String>publishFranchiseFeeUsers = new HashSet<>();
|
||||
for (Long regionId : regionIds){
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, regionId);
|
||||
if (!joinUser.isEmpty()){
|
||||
if (Objects.nonNull(joinUser)){
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, regionId);
|
||||
if (!regionUser.isEmpty()){
|
||||
if (Objects.nonNull(regionUser)){
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
|
||||
@@ -124,8 +124,8 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
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());
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_6,
|
||||
map);
|
||||
@@ -157,19 +157,19 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(franchiseFeeDO.getShopId());
|
||||
Set<String> auditFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> branchUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.BRANCH_OFFICE, shopInfoDO.getRegionId());
|
||||
if (!branchUser.isEmpty()) {
|
||||
if (Objects.nonNull(branchUser)) {
|
||||
Set<String> branchUserIds = branchUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(branchUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, shopInfoDO.getRegionId());
|
||||
if (!regionUser.isEmpty()) {
|
||||
if (Objects.nonNull(regionUser)) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
auditFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
HashMap<String, String> map = new HashMap<>();
|
||||
map.put("partnerUsername",lineInfo.getUsername());
|
||||
map.put("partnerMobile",lineInfo.getMobile());
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
map.put("storeName", shopInfoDO.getShopName());
|
||||
commonService.sendQWMessage(new ArrayList<>(auditFranchiseFeeUsers),
|
||||
MessageEnum.MESSAGE_18,
|
||||
map);
|
||||
@@ -179,8 +179,8 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
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());
|
||||
map.put("partnerUsername", lineInfo.getUsername());
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
commonService.sendQWMessage(Collections.singletonList(lineInfo.getInvestmentManager()),
|
||||
MessageEnum.MESSAGE_5,
|
||||
map);
|
||||
@@ -212,7 +212,11 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
linePayDO.setBankName(request.getBankName());
|
||||
linePayDO.setBranchBankCode(request.getBranchBankCode());
|
||||
linePayDO.setBranchBankName(request.getBranchBankName());
|
||||
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", request.getPayTime()));
|
||||
if (Objects.nonNull(request.getPayTime())) {
|
||||
linePayDO.setPayTime(DateUtils.dateTime("yyyy-MM-dd HH:mm:ss", request.getPayTime()));
|
||||
}else {
|
||||
linePayDO.setPayTime(null);
|
||||
}
|
||||
linePayDO.setPayPic(request.getPayPic());
|
||||
linePayDO.setPromisePic(request.getPromisePic());
|
||||
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
|
||||
|
||||
@@ -103,13 +103,15 @@ public class LineServiceImpl implements LineService {
|
||||
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(Collections.singletonList(lineInfo.getId()));
|
||||
Set<String> userIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||
Set<String> developmentMserIds = shopInfoDOS.stream().map(ShopInfoDO::getDevelopmentManager).collect(Collectors.toSet());
|
||||
userIds.add(lineInfo.getInvestmentManager());
|
||||
userIds.addAll(developmentMserIds);
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
StringBuilder investmentManagerName = new StringBuilder();
|
||||
for (String userId : userNameMap.keySet()) {
|
||||
for (String userId : userIds) {
|
||||
investmentManagerName.append(userNameMap.get(userId)).append(",");
|
||||
}
|
||||
result.setInvestmentManagerName(investmentManagerName.toString().substring(0, investmentManagerName.length() - 1));
|
||||
result.setInvestmentManagerName(investmentManagerName.substring(0, investmentManagerName.length() - 1));
|
||||
// if (StringUtil.isNotEmpty(lineInfo.getInvestmentManager())){
|
||||
// EnterpriseUserDO user = enterpriseUserDAO.getUserInfoById(lineInfo.getInvestmentManager());
|
||||
// result.setInvestmentManagerName(user.getName());
|
||||
@@ -140,6 +142,11 @@ public class LineServiceImpl implements LineService {
|
||||
result.setJoinType(qualificationsInfoDO.getJoinType());
|
||||
}
|
||||
BeanUtil.copyProperties(lineInfo, result);
|
||||
StringBuilder developmentManagerName = new StringBuilder();
|
||||
for (String userId : developmentMserIds) {
|
||||
developmentManagerName.append(userNameMap.get(userId)).append(",");
|
||||
}
|
||||
result.setDevelopmentManager(investmentManagerName.substring(0, investmentManagerName.length() - 1));
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -261,7 +268,10 @@ public class LineServiceImpl implements LineService {
|
||||
List<Long> lineIds = lineInfoDOS.stream().map(LineInfoDO::getId).collect(Collectors.toList());
|
||||
List<ShopInfoDO> shopInfoDOS = shopInfoDAO.selectInvestmentByLines(lineIds);
|
||||
Map<Long, Set<String>> investmentManagerIdMapByLineId = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getInvestmentManager, Collectors.toSet())));
|
||||
Map<Long, Set<String>> developmentManagerMap = shopInfoDOS.stream().collect(Collectors.groupingBy(ShopInfoDO::getLineId, Collectors.mapping(ShopInfoDO::getDevelopmentManager, Collectors.toSet())));
|
||||
|
||||
Set<String> investmentManagerIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||
Set<String> developmentManagerIds = shopInfoDOS.stream().map(ShopInfoDO::getInvestmentManager).collect(Collectors.toSet());
|
||||
Map<Long, HyPartnerLabelDO> userPortraitMap = deskService.getUserPortraitMap(lineInfoDOS);
|
||||
List<Long> wantShopAreaIdList = lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getWantShopAreaId() != null).map(LineInfoDO::getWantShopAreaId).collect(Collectors.toList());
|
||||
Map<Long, String> wantShopAreaMap = hyOpenAreaInfoDAO.selectNameMapByIds(wantShopAreaIdList);
|
||||
@@ -272,6 +282,7 @@ public class LineServiceImpl implements LineService {
|
||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getDevelopmentManager() != null).map(LineInfoDO::getDevelopmentManager).collect(Collectors.toList()));
|
||||
userIds.addAll(lineInfoDOS.stream().filter(lineInfoDO -> lineInfoDO.getUpdateUserId() != null).map(LineInfoDO::getUpdateUserId).collect(Collectors.toList()));
|
||||
userIds.addAll(investmentManagerIds);
|
||||
userIds.addAll(developmentManagerIds);
|
||||
Map<String, String> userNameMap = enterpriseUserDAO.getUserNameMap(new ArrayList<>(userIds));
|
||||
|
||||
List<SigningBaseInfoDO> signingBaseInfoDOS = intentAgreementMapper.selectByLineIds(lineIds);
|
||||
@@ -296,14 +307,20 @@ public class LineServiceImpl implements LineService {
|
||||
for (String s : userIdSet) {
|
||||
investmentManagerUserName.append(userNameMap.get(s)).append(",");
|
||||
}
|
||||
StringBuilder developmentManagerUserName = new StringBuilder();
|
||||
Set<String> developmentManagerIdsSet = developmentManagerMap.getOrDefault(x.getId(), new HashSet<>());
|
||||
developmentManagerIdsSet.add(x.getDevelopmentManager());
|
||||
for (String s : developmentManagerIdsSet) {
|
||||
developmentManagerUserName.append(userNameMap.get(s)).append(",");
|
||||
}
|
||||
partnerListVO.setUpdateTime(DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, x.getUpdateTime()));
|
||||
partnerListVO.setLineSourceName(channelMapByIds.get(x.getLineSource()));
|
||||
partnerListVO.setJoinStatus(x.getJoinStatus());
|
||||
partnerListVO.setJoinMode(x.getJoinMode());
|
||||
partnerListVO.setPartnerNum(x.getPartnerNum());
|
||||
partnerListVO.setInvestmentManagerUserName(investmentManagerUserName.toString().substring(0, investmentManagerUserName.length() - 1));
|
||||
partnerListVO.setInvestmentManagerUserName(investmentManagerUserName.substring(0, investmentManagerUserName.length() - 1));
|
||||
partnerListVO.setUpdateUserName(userNameMap.get(x.getUpdateUserId()));
|
||||
partnerListVO.setDevelopmentManagerUserName(userNameMap.get(x.getDevelopmentManager()));
|
||||
partnerListVO.setDevelopmentManagerUserName(developmentManagerUserName.substring(0, developmentManagerUserName.length() - 1));
|
||||
partnerListVO.setWantShopNum(x.getWantShopNum());
|
||||
result.add(partnerListVO);
|
||||
});
|
||||
|
||||
@@ -107,12 +107,12 @@ public class OpeningOperationPlanImpl implements OpeningOperationPlanService {
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
Set<String> planAuditUser = new HashSet<>();
|
||||
List<EnterpriseUserDO> regionManagerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_MANAGER, shopInfoDO.getRegionId());
|
||||
if (!regionManagerUser.isEmpty()){
|
||||
if (Objects.nonNull(regionManagerUser)){
|
||||
Set<String> regionManagerUserIds = regionManagerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
planAuditUser.addAll(regionManagerUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionalManager = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGIONAL_MANAGER, shopInfoDO.getRegionId());
|
||||
if (!regionalManager.isEmpty()){
|
||||
if (Objects.nonNull(regionalManager)){
|
||||
Set<String> regionalManagerUserIds = regionalManager.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
planAuditUser.addAll(regionalManagerUserIds);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
List<EnterpriseUserDO> dyCustomerUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.DOU_YIN_CUSTOMER, regionId);
|
||||
List<String> dyCustomerUserIds = new ArrayList<>();
|
||||
if (!dyCustomerUser.isEmpty()) {
|
||||
if (Objects.nonNull(dyCustomerUser)) {
|
||||
dyCustomerUserIds.addAll(dyCustomerUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(dyCustomerUserIds,
|
||||
@@ -137,7 +137,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
List<EnterpriseUserDO> ksUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.KUAI_SHOU_CUSTOMER, regionId);
|
||||
List<String> ksUserIds = new ArrayList<>();
|
||||
if (!ksUser.isEmpty()) {
|
||||
if (Objects.nonNull(ksUser)) {
|
||||
ksUserIds.addAll(ksUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(ksUserIds,
|
||||
@@ -161,7 +161,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
List<EnterpriseUserDO> mtbcUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_BUY_CUSTOMER, regionId);
|
||||
List<String> mtbcUserIds = new ArrayList<>();
|
||||
if (!mtbcUser.isEmpty()) {
|
||||
if (Objects.nonNull(mtbcUser)) {
|
||||
mtbcUserIds.addAll(mtbcUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtbcUserIds,
|
||||
@@ -185,7 +185,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
List<EnterpriseUserDO> elmUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.E_L_ME_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> elmUserIds = new ArrayList<>();
|
||||
if (!elmUser.isEmpty()) {
|
||||
if (Objects.nonNull(elmUser)) {
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(elmUserIds,
|
||||
@@ -209,7 +209,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
}
|
||||
List<EnterpriseUserDO> mtocUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.MEI_TUAN_OPERATIONS_CUSTOMER, regionId);
|
||||
List<String> mtocUserIds = new ArrayList<>();
|
||||
if (!mtocUser.isEmpty()) {
|
||||
if (Objects.nonNull(mtocUser)) {
|
||||
mtocUserIds.addAll(mtocUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtocUserIds,
|
||||
@@ -421,7 +421,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
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()) {
|
||||
if (Objects.nonNull(elmUser)) {
|
||||
elmUserIds.addAll(elmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
operationLogService.addOperationLog(shopId, SHOP_SUB_STAGE_STATUS_213, request.getOperateUserId(),
|
||||
@@ -443,7 +443,7 @@ public class PlatformBuildServiceImpl implements PlatformBuildService {
|
||||
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()) {
|
||||
if (Objects.nonNull(mtwmUser)) {
|
||||
mtwmUserIds.addAll(mtwmUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList()));
|
||||
}
|
||||
commonService.sendQWMessage(mtwmUserIds,
|
||||
|
||||
@@ -274,7 +274,7 @@ public class PointServiceImpl implements PointService {
|
||||
}
|
||||
List<AuditNodeDTO> auditNode = dealAuditNode(auditSetting, pointInfo.getRegionId(), pointInfo.getDevelopmentManager());
|
||||
if(auditNode.size()==CommonConstants.ONE){
|
||||
updatePoint.setPointStatus(PointStatusEnum.POINT_STATUS_5.getCode());
|
||||
throw new ServiceException(ErrorCodeEnum.CONFIRM_THE_APPROVER);
|
||||
}
|
||||
//获取审批节点上的数据
|
||||
List<PointAuditRecordDO> recordList = AuditNodeDTO.convertDO(pointId, submitAuditCount, auditNode);
|
||||
@@ -834,10 +834,11 @@ public class PointServiceImpl implements PointService {
|
||||
}
|
||||
PointDetailInfoDO pointDetailInfo = MiniAddPointRequest.convertDO(request);
|
||||
PointInfoDO pointInfo = MiniAddPointRequest.convertPointDO(request);
|
||||
pointInfo.setRegionId(lineInfo.getRegionId());
|
||||
pointInfo.setRegionId(shopInfo.getRegionId());
|
||||
pointInfo.setLineId(lineId);
|
||||
pointInfo.setShopId(shopInfo.getId());
|
||||
pointInfo.setSelectStatus(SelectStatusEnum.SELECT_STATUS_1.getCode());
|
||||
pointInfo.setDevelopmentManager(lineInfo.getDevelopmentManager());
|
||||
pointInfo.setDevelopmentManager(shopInfo.getInvestmentManager());
|
||||
pointInfo.setDevelopmentTime(new Date());
|
||||
pointInfo.setPointSource(PointSourceEnum.POINT_SOURCE_2.getCode());
|
||||
pointInfo.setPointCode(generateCode());
|
||||
@@ -850,7 +851,7 @@ public class PointServiceImpl implements PointService {
|
||||
PointRecommendDO pointRecommendDO = new PointRecommendDO();
|
||||
pointRecommendDO.setLineId(lineId);
|
||||
pointRecommendDO.setShopId(request.getShopId());
|
||||
pointRecommendDO.setDevelopmentManager(lineInfo.getDevelopmentManager());
|
||||
pointRecommendDO.setDevelopmentManager(shopInfo.getInvestmentManager());
|
||||
pointRecommendDO.setPointId(pointId);
|
||||
pointRecommendDO.setStatus(PointRecommendStatusEnum.POINT_RECOMMEND_STATUS_2.getCode());
|
||||
//推荐列表新增
|
||||
@@ -1127,6 +1128,7 @@ public class PointServiceImpl implements PointService {
|
||||
Map<String, List<String>> userIdsMap = userAuthMappingService.getUserIdByRoleIdAndRegionId(roleIds, regionId);
|
||||
List<String> firstApprovalUserIds = getUserIdsByPositionIds(firstApproval, userIdsMap);
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_0.getCode(), PointAuditRecordDO.SUBMIT_TASK, Boolean.FALSE, Arrays.asList(developmentManager)));
|
||||
//todo 缺少兜底人
|
||||
if(CollectionUtils.isNotEmpty(firstApprovalUserIds)){
|
||||
resultList.add(new AuditNodeDTO(NodeNoEnum.NODE_NO_1.getCode(), PointAuditRecordDO.RECEIVE_TASK, Boolean.TRUE, firstApprovalUserIds));
|
||||
}
|
||||
|
||||
@@ -120,12 +120,12 @@ public class ShopServiceImpl implements ShopService {
|
||||
Integer result = shopStageInfoDAO.initShopStageInfo(lineInfo.getId(), shopIds, true);
|
||||
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, lineInfo.getRegionId());
|
||||
if (!joinUser.isEmpty()) {
|
||||
if (Objects.nonNull(joinUser)) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, lineInfo.getRegionId());
|
||||
if (!regionUser.isEmpty()) {
|
||||
if (Objects.nonNull(regionUser)) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
@@ -301,12 +301,12 @@ public class ShopServiceImpl implements ShopService {
|
||||
map.put("partnerMobile", lineInfo.getMobile());
|
||||
Set<String> publishFranchiseFeeUsers = new HashSet<>();
|
||||
List<EnterpriseUserDO> joinUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.JOIN_OFFICE, request.getRegionId());
|
||||
if (!joinUser.isEmpty()) {
|
||||
if (Objects.nonNull(joinUser)) {
|
||||
Set<String> joinUserIds = joinUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(joinUserIds);
|
||||
}
|
||||
List<EnterpriseUserDO> regionUser = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.REGION_OFFICE, request.getRegionId());
|
||||
if (!regionUser.isEmpty()) {
|
||||
if (Objects.nonNull(regionUser)) {
|
||||
Set<String> regionUserIds = regionUser.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toSet());
|
||||
publishFranchiseFeeUsers.addAll(regionUserIds);
|
||||
}
|
||||
|
||||
@@ -182,7 +182,7 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
||||
map.put("storeName",shopInfoDO.getShopName());
|
||||
List<EnterpriseUserDO> userDOList = userAuthMappingService.getAllUserByRoleEnumAndRegionId(UserRoleEnum.FINANCE, shopInfoDO.getRegionId());
|
||||
List<String> finances = new ArrayList<>();
|
||||
if (!userDOList.isEmpty()){
|
||||
if (Objects.nonNull(userDOList)){
|
||||
finances.addAll(userDOList.stream().map(EnterpriseUserDO::getUserId).collect(Collectors.toList())) ;
|
||||
}
|
||||
commonService.sendQWMessage(finances,
|
||||
|
||||
@@ -81,4 +81,4 @@ mybatis.configuration.variables.enterpriseId=5558ce7a3aa84e3590392fcaa8697ffb
|
||||
enterprise.dingCorpId=wpayJeDAAAhGIFgUJpJN-zg39JuNbYhg
|
||||
|
||||
##qywx.task.notice.url1=https://tstore-api.coolstore.cn/notice?corpId=%s&appType=%s&target=%s
|
||||
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s
|
||||
qywx.task.notice.url2=https://tstore-h5.coolstore.cn/?corpId=%s&appType=%s#/notice?target=%s¬iceType=zx&corpId=%s&appType=%s&eid=%s
|
||||
|
||||
Reference in New Issue
Block a user