Merge remote-tracking branch 'origin/dev/feat/partner1.3_20230828' into dev/feat/partner1.3_20230828
This commit is contained in:
@@ -10,10 +10,10 @@ import com.alibaba.fastjson.JSONObject;
|
||||
public enum FeiShuNoticeMsgEnum {
|
||||
|
||||
common_notice("工作台通知", "{0}", "img_v2_45d7a901-1eab-498b-a760-b38d287f0c1g"),
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索 于 {0} 分配给您,线索信息{1}手机号{2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索 于 {0} 转让给您,线索信息{1}手机号{2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索 于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人{0}手机号{1}于 {2} 提交加盟意向申请,请及时处理", "img_v2_69eb6e5f-bf12-4a02-a47f-b17ce24fcfeg"),
|
||||
ALLOCATION_INVESTMENT_MANAGER("分配招商经理", "有新的线索于 {0} 分配给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
TRANS_INVESTMENT_MANAGER("转让招商经理", "有新的线索于 {0} 转让给您,线索信息 {1} 手机号 {2},请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
BATCH_TRANS_INVESTMENT_MANAGER("收到新线索", "有{0}条新线索于 {1} 转让给您,请及时跟进", "img_v2_33296002-829e-490e-bd11-0d9ae763a67g"),
|
||||
INTENTION_APPLY("加盟意向申请", "您有一个【加盟意向申请】待审核,申请人 {0} 手机号 {1} 于 {2} 提交加盟意向申请,请及时处理", "img_v2_69eb6e5f-bf12-4a02-a47f-b17ce24fcfeg"),
|
||||
FOLLOW_TASK("线索跟进任务", "{0}", "img_v2_1960b7ef-8c4e-4c3d-8b67-3d918a85578g"),
|
||||
INTERVIEW_APPOINTMENT("面试预约申请", "{0}","img_v2_107bb06b-2a7a-43e1-a6ae-e5d2f2dae17g"),
|
||||
;
|
||||
|
||||
@@ -12,6 +12,8 @@ public enum FollowTaskStatusEnum {
|
||||
FINISHED(1, "已完成"),
|
||||
OVERDUE(2, "已逾期"),
|
||||
CANCELLED(3, "作废"),
|
||||
OVERDUE_FINISH(4, "逾期完成"),
|
||||
OVERDUE_CANCELLED(5, "逾期作废"),
|
||||
;
|
||||
//任务状态:0:待完成、1:已完成、2:已逾期、3:作废
|
||||
|
||||
|
||||
@@ -86,10 +86,10 @@ public class HyFollowTaskDAO {
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
public Integer finishFollowTask(Long followTaskId){
|
||||
public Integer finishFollowTask(Long followTaskId, FollowTaskStatusEnum followTaskStatus){
|
||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
||||
update.setId(followTaskId);
|
||||
update.setTaskStatus(FollowTaskStatusEnum.FINISHED.getCode());
|
||||
update.setTaskStatus(followTaskStatus.getCode());
|
||||
update.setFinishTime(new Date());
|
||||
return updateFollowTask(update);
|
||||
}
|
||||
@@ -99,10 +99,10 @@ public class HyFollowTaskDAO {
|
||||
* @param followTaskId
|
||||
* @return
|
||||
*/
|
||||
public Integer cancelFollowTask(Long followTaskId){
|
||||
public Integer cancelFollowTask(Long followTaskId, FollowTaskStatusEnum followTaskStatus){
|
||||
HyFollowTaskDO update = new HyFollowTaskDO();
|
||||
update.setId(followTaskId);
|
||||
update.setTaskStatus(FollowTaskStatusEnum.CANCELLED.getCode());
|
||||
update.setTaskStatus(followTaskStatus.getCode());
|
||||
return updateFollowTask(update);
|
||||
}
|
||||
|
||||
@@ -207,6 +207,18 @@ public class HyFollowTaskDAO {
|
||||
return hyFollowTaskMapper.updateUndoTaskStatusToOverdue();
|
||||
}
|
||||
|
||||
/**
|
||||
* 更改线索id
|
||||
* @param oldLineId
|
||||
* @param newLineId
|
||||
*/
|
||||
public Integer changeLineId(Long oldLineId, Long newLineId){
|
||||
if(Objects.isNull(oldLineId) || Objects.isNull(newLineId)){
|
||||
return CommonConstants.ZERO;
|
||||
}
|
||||
return hyFollowTaskMapper.changeLineId(oldLineId, newLineId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -100,4 +100,12 @@ public interface HyFollowTaskMapper {
|
||||
* @return
|
||||
*/
|
||||
List<HyFollowTaskDO> getFollowTaskList(@Param("followTaskIds") List<Long> followTaskIds);
|
||||
|
||||
/**
|
||||
* 更改线索id
|
||||
* @param oldLineId
|
||||
* @param newLineId
|
||||
* @return
|
||||
*/
|
||||
Integer changeLineId(@Param("oldLineId") Long oldLineId, @Param("newLineId") Long newLineId);
|
||||
}
|
||||
@@ -157,7 +157,7 @@
|
||||
a.update_time
|
||||
from
|
||||
hy_follow_task a
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0'
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
||||
where
|
||||
a.deleted = '0' and a.follow_user_id = #{followUserId}
|
||||
<if test="taskStatus != null">
|
||||
@@ -169,7 +169,7 @@
|
||||
<if test="deadlineEndTime != null">
|
||||
<![CDATA[ and a.deadline <= #{deadlineEndTime}]]>
|
||||
</if>
|
||||
order by a.deadline desc
|
||||
order by a.deadline desc, a.id desc
|
||||
</select>
|
||||
|
||||
<select id="getFollowTask" resultMap="BaseResultMap">
|
||||
@@ -194,7 +194,7 @@
|
||||
a.follow_user_id
|
||||
from
|
||||
hy_follow_task a
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0'
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
||||
where
|
||||
a.deleted = '0' and (a.task_status in ('2') or (a.task_status in ('0') and a.deadline >= #{startTime} and #{endTime} >= a.deadline))
|
||||
</select>
|
||||
@@ -206,7 +206,7 @@
|
||||
sum(if(a.task_status=0 and #{endTime} > a.deadline, 1, 0)) as todoNum
|
||||
from
|
||||
hy_follow_task a
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0'
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
||||
where
|
||||
a.follow_user_id in <foreach collection="followUserIds" item="followUserId" separator="," open="(" close=")">#{followUserId}</foreach>
|
||||
group by a.follow_user_id
|
||||
@@ -228,7 +228,7 @@
|
||||
a.update_time
|
||||
from
|
||||
hy_follow_task a
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0'
|
||||
inner join hy_partner_line_info b on a.partner_line_id = b.id and b.deleted = '0' and b.line_status in ('1', '2')
|
||||
where
|
||||
a.deleted = '0' and a.task_status in ('0') and a.deadline > #{startTime} and #{endTime} > a.deadline
|
||||
</select>
|
||||
@@ -245,5 +245,9 @@
|
||||
where
|
||||
deleted = '0' and id in <foreach collection="followTaskIds" item="followTaskId" separator="," open="(" close=")">#{followTaskId}</foreach>
|
||||
</select>
|
||||
|
||||
<update id="changeLineId">
|
||||
update hy_follow_task set partner_line_id = #{newLineId} where partner_line_id = #{oldLineId}
|
||||
</update>
|
||||
|
||||
</mapper>
|
||||
@@ -27,7 +27,7 @@
|
||||
from hy_outbound_mobile
|
||||
where deleted = 0
|
||||
<if test="id != null">
|
||||
id = #{id}
|
||||
and id = #{id}
|
||||
</if>
|
||||
<if test="mobile != null and mobile != ''">
|
||||
and mobile = #{mobile}
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
update_user_id = #{updateUserId},
|
||||
</if>
|
||||
<if test="remark != null">
|
||||
remark = #{remark},
|
||||
remark = #{remark}
|
||||
</if>
|
||||
</set>
|
||||
where deleted = 0
|
||||
|
||||
@@ -40,7 +40,7 @@ public class HyFollowTaskDO implements Serializable {
|
||||
@ApiModelProperty("计划沟通内容")
|
||||
private String communicationContent;
|
||||
|
||||
@ApiModelProperty("任务状态:0:待完成、1:已完成、2:已逾期、3:作废")
|
||||
@ApiModelProperty("任务状态:0:待完成、1:已完成、2:已逾期、3:作废、4逾期完成、5逾期作废")
|
||||
private Integer taskStatus;
|
||||
|
||||
@ApiModelProperty("任务截止时间")
|
||||
|
||||
@@ -6,9 +6,7 @@ import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author Fun Li
|
||||
@@ -41,8 +39,8 @@ public class HyOutboundMobileDO {
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty("创建时间")
|
||||
private LocalDateTime createTime;
|
||||
private Date createTime;
|
||||
|
||||
@ApiModelProperty("更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
private Date updateTime;
|
||||
}
|
||||
@@ -53,6 +53,11 @@ public class UpdateFollowTaskRequest {
|
||||
result.setCommunicationType(request.getCommunicationType());
|
||||
result.setDeadline(request.getDeadline());
|
||||
result.setCommunicationContent(request.getCommunicationContent());
|
||||
if(request.getDeadline().getTime() > System.currentTimeMillis()){
|
||||
result.setTaskStatus(FollowTaskStatusEnum.TODO.getCode());
|
||||
}else{
|
||||
result.setTaskStatus(FollowTaskStatusEnum.OVERDUE.getCode());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -114,7 +114,9 @@ public class PartnerIntentApplyInfoVO {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
@@ -145,7 +145,9 @@ public class PrivateSeaLineListVo {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.cool.store.vo.follow;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cool.store.dto.log.LogFieldDTO;
|
||||
import com.cool.store.entity.CallRecordDO;
|
||||
import com.cool.store.entity.HyFollowTaskDO;
|
||||
import com.cool.store.entity.HyPartnerTaskInfoLogDO;
|
||||
|
||||
@@ -149,7 +149,7 @@ public class FollowTaskServiceImpl implements FollowTaskService {
|
||||
@Override
|
||||
public Integer updateFollowTask(UpdateFollowTaskRequest request, String userId) {
|
||||
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
|
||||
if(!FollowTaskStatusEnum.TODO.getCode().equals(followTask.getTaskStatus())){
|
||||
if(FollowTaskStatusEnum.FINISHED.getCode().equals(followTask.getTaskStatus()) || FollowTaskStatusEnum.CANCELLED.getCode().equals(followTask.getTaskStatus())|| FollowTaskStatusEnum.OVERDUE_CANCELLED.getCode().equals(followTask.getTaskStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
if(Objects.nonNull(request.getDeadline()) && request.getDeadline().getTime() < System.currentTimeMillis()){
|
||||
@@ -171,17 +171,25 @@ public class FollowTaskServiceImpl implements FollowTaskService {
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
checkLine(followTask.getPartnerLineId());
|
||||
return hyFollowTaskDAO.finishFollowTask(request.getFollowTaskId());
|
||||
FollowTaskStatusEnum followTaskStatus = FollowTaskStatusEnum.FINISHED;
|
||||
if(followTask.getDeadline().getTime() < System.currentTimeMillis()){
|
||||
followTaskStatus = FollowTaskStatusEnum.OVERDUE_FINISH;
|
||||
}
|
||||
return hyFollowTaskDAO.finishFollowTask(request.getFollowTaskId(), followTaskStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer cancelFollowTask(FollowTaskIdRequest request, String userId) {
|
||||
HyFollowTaskDO followTask = hyFollowTaskDAO.getFollowTask(request.getFollowTaskId());
|
||||
if(FollowTaskStatusEnum.FINISHED.getCode().equals(followTask.getTaskStatus())){
|
||||
if(FollowTaskStatusEnum.FINISHED.getCode().equals(followTask.getTaskStatus()) || FollowTaskStatusEnum.OVERDUE_FINISH.getCode().equals(followTask.getTaskStatus())){
|
||||
throw new ServiceException(ErrorCodeEnum.TASK_STATUS_NOT_ALLOW_OPERATE);
|
||||
}
|
||||
checkLine(followTask.getPartnerLineId());
|
||||
return hyFollowTaskDAO.cancelFollowTask(request.getFollowTaskId());
|
||||
FollowTaskStatusEnum followTaskStatus = FollowTaskStatusEnum.CANCELLED;
|
||||
if(followTask.getDeadline().getTime() < System.currentTimeMillis()){
|
||||
followTaskStatus = FollowTaskStatusEnum.OVERDUE_CANCELLED;
|
||||
}
|
||||
return hyFollowTaskDAO.cancelFollowTask(request.getFollowTaskId(), followTaskStatus);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.cool.store.dto.outbound.DeleteNumberDTO;
|
||||
import com.cool.store.dto.outbound.OutboundListDTO;
|
||||
import com.cool.store.dto.outbound.UpdateNumberDTO;
|
||||
import com.cool.store.entity.HyOutboundMobileDO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
import com.cool.store.mapper.HyOutboundMobileMapper;
|
||||
@@ -14,6 +15,7 @@ import com.cool.store.vo.HyOutboundVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -41,12 +43,12 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
*/
|
||||
@Override
|
||||
public void addOutboundNumber(AddNumberDTO dto) throws ApiException {
|
||||
if (whetherRepeat(dto.getOutboundNumber())) {
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setMobile(dto.getOutboundNumber());
|
||||
if (whetherRepeat(hyOutboundMobile)) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setMobile(dto.getOutboundNumber());
|
||||
hyOutboundMobile.setEditUserId(userId);
|
||||
hyOutboundMobile.setCreateUserId(userId);
|
||||
hyOutboundMobile.setUpdateUserId(userId);
|
||||
@@ -59,15 +61,16 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
*/
|
||||
@Override
|
||||
public void updateOutboundNumber(UpdateNumberDTO dto) throws ApiException {
|
||||
if (whetherRepeat(dto.getNewOutboundNumber())) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
HyOutboundMobileDO hyOutboundMobile = new HyOutboundMobileDO();
|
||||
hyOutboundMobile.setId(dto.getId());
|
||||
hyOutboundMobile.setMobile(dto.getNewOutboundNumber());
|
||||
if (whetherRepeat(hyOutboundMobile)) {
|
||||
throw new ApiException(ErrorCodeEnum.OUTBOUND_NUMBER_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
hyOutboundMobile.setEditUserId(userId);
|
||||
hyOutboundMobile.setUpdateUserId(userId);
|
||||
hyOutboundMobile.setUpdateTime(new Date());
|
||||
outboundMobileMapper.updateByPrimaryKeySelective(hyOutboundMobile);
|
||||
}
|
||||
|
||||
@@ -87,14 +90,23 @@ public class HyOutboundServiceImpl implements HyOutboundService {
|
||||
|
||||
/**
|
||||
* 查询某个手机号是否重复
|
||||
* @param number 手机号
|
||||
* @param hyOutboundMobileDO 手机号信息
|
||||
* @return 是否重复
|
||||
*/
|
||||
public boolean whetherRepeat(String number) {
|
||||
HyOutboundMobileDO hyOutboundMobileDO = new HyOutboundMobileDO();
|
||||
hyOutboundMobileDO.setMobile(number);
|
||||
public boolean whetherRepeat(HyOutboundMobileDO hyOutboundMobileDO) {
|
||||
Long id = hyOutboundMobileDO.getId();
|
||||
hyOutboundMobileDO.setId(null);
|
||||
List<HyOutboundMobileDO> outboundMobileList = outboundMobileMapper.selectByPrimarySelective(hyOutboundMobileDO);
|
||||
return outboundMobileList != null && outboundMobileList.size() != 0;
|
||||
hyOutboundMobileDO.setId(id);
|
||||
//如果修改后的号码与原号码一致也不算重复,但是要记录更新人
|
||||
if (outboundMobileList != null && outboundMobileList.size() > 0) {
|
||||
//更新操作还要检查是否与原号码信息相同,相同的话也不算重复
|
||||
if (outboundMobileList.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -80,6 +80,8 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
private LogService logService;
|
||||
@Resource
|
||||
private LabelService labelService;
|
||||
@Resource
|
||||
private HyFollowTaskDAO hyFollowTaskDAO;
|
||||
|
||||
|
||||
@Override
|
||||
@@ -109,6 +111,9 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
List<String> removeLabels = new ArrayList<>(oldLabels);
|
||||
addLabels.removeAll(oldLabels);
|
||||
removeLabels.removeAll(newLabels);
|
||||
if(CollectionUtils.isEmpty(addLabels) && CollectionUtils.isEmpty(removeLabels)){
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
LineLogInfo lineLogInfo = new LineLogInfo(line.getPartnerId(), line.getId(), user.getUserId(),
|
||||
user.getName(), OperateTypeEnum.ADD_TAGS,
|
||||
WorkflowStageEnum.getWorkflowStageByCode(line.getWorkflowStage()),
|
||||
@@ -264,6 +269,7 @@ public class HyPartnerBaseInfoServiceImpl implements HyPartnerBaseInfoService {
|
||||
hyInterviewDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerCertificationInfoMapper.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyPartnerTaskInfoLogDAO.updateLineId(newPartnerId,newLindId,oldLineInfo.getId());
|
||||
hyFollowTaskDAO.changeLineId(oldLineInfo.getId(), newLindId);
|
||||
String cacheKeyBaseInfo = MessageFormat.format(RedisConstant.PARTNER_BASEINFO_CACHE_KEY, newPartnerId, newLindId);
|
||||
String cacheKeyClerkInfo = MessageFormat.format(RedisConstant.PARTNER_CLERKINFO_CACHE_KEY,newPartnerId, newLindId);
|
||||
String cacheKeyIntentInfo = MessageFormat.format(RedisConstant.PARTNER_INTENTINFO_CACHE_KEY, newPartnerId, newLindId);
|
||||
|
||||
@@ -222,6 +222,7 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
if (CollectionUtils.isEmpty(request.getLineIds())||StringUtils.isEmpty(request.getUserId())){
|
||||
throw new ServiceException(ErrorCodeEnum.PARAMS_REQUIRED);
|
||||
}
|
||||
int num = request.getLineIds().size();
|
||||
List<HyPartnerLineInfoDO> hyPartnerLineInfoList = hyPartnerLineInfoDAO.getHyPartnerLineInfoList(request.getLineIds(), request.getUserId());
|
||||
//如果选中的线索中有线索招商经理已经是被装让的招商经理,则不允许批量操作
|
||||
if (CollectionUtils.isNotEmpty(hyPartnerLineInfoList)){
|
||||
@@ -232,13 +233,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
transferInvestmentManagerRequest.setUserId(request.getUserId());
|
||||
transferInvestmentManagerRequest.setLineId(lineId);
|
||||
try {
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest,Boolean.FALSE);
|
||||
this.transferInvestmentManager(user,transferInvestmentManagerRequest,num<=1?true:false);
|
||||
} catch (ApiException e) {
|
||||
log.info("transferInvestmentManager_success Transfer_interview_management_failed,lineId:{}",lineId);
|
||||
}
|
||||
}
|
||||
if (request.getLineIds().size()!=0){
|
||||
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER,Arrays.asList(request.getUserId()),request.getLineIds().size(),DateUtil.format(new Date(),CoolDateUtils.DATE_FORMAT_SEC_7));
|
||||
if (num>1){
|
||||
noticeService.sendFeiShuNotice(FeiShuNoticeMsgEnum.BATCH_TRANS_INVESTMENT_MANAGER,Arrays.asList(request.getUserId()),num,DateUtil.format(new Date(),CoolDateUtils.DATE_FORMAT_SEC_7));
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
@@ -722,12 +723,13 @@ public class HyPartnerLineInfoServiceImpl implements HyPartnerLineInfoService {
|
||||
}
|
||||
//省内调剂 有重点或者开放的 分配
|
||||
if (AcceptAdjustTypeEnum.PROVINCIAL_ADJUSTMENT.getCode().equals(acceptAdjustType)){
|
||||
|
||||
List<HyOpenAreaInfoDO> hyOpenAreaInfoDOList= new ArrayList<>();
|
||||
if(hyOpenAreaInfoDO != null){
|
||||
String areaPath = hyOpenAreaInfoDO.getAreaPath();
|
||||
String province = areaPath.substring(0, areaPath.indexOf("/", areaPath.indexOf("/") + 1));
|
||||
hyOpenAreaInfoDOList = hyOpenAreaInfoDAO.queryByKeyword(province, true, null, true);
|
||||
//过滤一级目录
|
||||
hyOpenAreaInfoDOList = hyOpenAreaInfoDOList.stream().filter(x->x.getParentId()!=null).collect(Collectors.toList());
|
||||
}
|
||||
if (hyOpenAreaInfoDOList.size()>CommonConstants.ZERO){
|
||||
return Boolean.TRUE;
|
||||
|
||||
@@ -5,6 +5,7 @@ import com.cool.store.dto.label.LabelGroupAddDTO;
|
||||
import com.cool.store.dto.label.LabelGroupDeleteDTO;
|
||||
import com.cool.store.dto.label.LabelGroupListDTO;
|
||||
import com.cool.store.dto.label.LabelGroupUpdateDTO;
|
||||
import com.cool.store.entity.HyPartnerLabelDO;
|
||||
import com.cool.store.entity.HyPartnerLabelGroupDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ApiException;
|
||||
@@ -70,6 +71,7 @@ public class LabelGroupServiceImpl implements LabelGroupService {
|
||||
public void updateLabelGroup(LabelGroupUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelGroupDO labelGroupDO = new HyPartnerLabelGroupDO();
|
||||
labelGroupDO.setLabelGroupName(dto.getLabelGroupName());
|
||||
labelGroupDO.setId(dto.getId());
|
||||
if (whetherGroupDuplicated(labelGroupDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_GROUP_EXIST);
|
||||
}
|
||||
@@ -117,8 +119,19 @@ public class LabelGroupServiceImpl implements LabelGroupService {
|
||||
}
|
||||
|
||||
private Boolean whetherGroupDuplicated(HyPartnerLabelGroupDO labelGroupDO) {
|
||||
Long id = labelGroupDO.getId();
|
||||
labelGroupDO.setId(null);
|
||||
List<HyPartnerLabelGroupDO> hyPartnerLabelGroupDOS = labelGroupMapper.selectSelective(labelGroupDO);
|
||||
return hyPartnerLabelGroupDOS != null && hyPartnerLabelGroupDOS.size() > 0;
|
||||
labelGroupDO.setId(id);
|
||||
//如果修改后的标签组名与原标签组名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelGroupDOS != null && hyPartnerLabelGroupDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签组信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelGroupDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -69,12 +69,12 @@ public class LabelServiceImpl implements LabelService {
|
||||
@Override
|
||||
public void updateLabel(LabelUpdateDTO dto) throws ApiException {
|
||||
HyPartnerLabelDO labelDO = new HyPartnerLabelDO();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setLabelName(dto.getLabelName());
|
||||
if (whetherLabelRepeat(labelDO)) {
|
||||
throw new ApiException(ErrorCodeEnum.LABEL_EXIST);
|
||||
}
|
||||
String userId = CurrentUserHolder.getUserId();
|
||||
labelDO.setId(dto.getId());
|
||||
labelDO.setLabelGroupId(dto.getLabelGroupId());
|
||||
labelDO.setEditUserId(userId);
|
||||
labelDO.setEditDate(new Date());
|
||||
@@ -99,8 +99,16 @@ public class LabelServiceImpl implements LabelService {
|
||||
}
|
||||
|
||||
private Boolean whetherLabelRepeat(HyPartnerLabelDO label) throws ApiException {
|
||||
Long id = label.getId();
|
||||
label.setId(null);
|
||||
List<HyPartnerLabelDO> hyPartnerLabelDOS = labelMapper.selectSelective(label);
|
||||
label.setId(id);
|
||||
//如果修改后的标签名与原标签名一致也不算重复,但是要记录更新人
|
||||
if (hyPartnerLabelDOS != null && hyPartnerLabelDOS.size() > 0) {
|
||||
//更新操作还要检查是否与原标签信息相同,相同的话也不算重复
|
||||
if (hyPartnerLabelDOS.get(0).getId().equals(id)) {
|
||||
return Boolean.FALSE;
|
||||
}
|
||||
return Boolean.TRUE;
|
||||
}
|
||||
return Boolean.FALSE;
|
||||
@@ -139,7 +147,9 @@ public class LabelServiceImpl implements LabelService {
|
||||
String trimmedPart = part.trim();
|
||||
if (!trimmedPart.isEmpty()) {
|
||||
try {
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
if (userPortraitMap.get(Long.valueOf(part)) != null){
|
||||
userPortraitList.add(userPortraitMap.get(Long.valueOf(part)));
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
log.info("Invalid format: {}" , trimmedPart);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user