|
|
@ -17,12 +17,12 @@ |
|
|
|
|
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
|
import com.epmet.commons.tools.constant.AppClientConstant; |
|
|
|
import com.epmet.commons.tools.constant.NumConstant; |
|
|
|
import com.epmet.commons.tools.constant.StrConstant; |
|
|
|
import com.epmet.commons.tools.dto.form.FileCommonDTO; |
|
|
|
import com.epmet.commons.tools.enums.OrgTypeEnum; |
|
|
|
import com.epmet.commons.tools.exception.EpmetErrorCode; |
|
|
|
import com.epmet.commons.tools.exception.RenException; |
|
|
|
import com.epmet.commons.tools.utils.Result; |
|
|
@ -99,7 +99,7 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem |
|
|
|
Set<String> orgStaffIds=queryOrgStaffIds(formDTO.getCustomerId(),formDTO.getOrgList()); |
|
|
|
Set<String> roleStaffIds=queryRoleStaffIds(formDTO.getRoleIdList(),formDTO.getCustomerId()); |
|
|
|
Set<String> groupStaffIds = CollectionUtils.isNotEmpty(formDTO.getGroupIdList()) ? infoGroupReceiversDao.selectStaffIds(formDTO.getGroupIdList()) : Collections.EMPTY_SET; |
|
|
|
log.info("群组选择的人:"+JSON.toJSONString(groupStaffIds,true)); |
|
|
|
//log.info("群组选择的人:"+JSON.toJSONString(groupStaffIds,true));
|
|
|
|
|
|
|
|
//3、计算接收人:
|
|
|
|
Set<String> totalReceiver=new LinkedHashSet<String>(); |
|
|
@ -222,10 +222,14 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem |
|
|
|
@Override |
|
|
|
public ReplyInfoResultDTO replyInfo(ReplyInfoFormDTO formDTO) { |
|
|
|
//1、插入回复记录、回复附件
|
|
|
|
//内容和附件 2选一
|
|
|
|
// 2、内容和附件 2选一
|
|
|
|
if(StringUtils.isBlank(formDTO.getContent())&&CollectionUtils.isEmpty(formDTO.getAttachmentList())){ |
|
|
|
throw new RenException(EpmetErrorCode.REPLY_INFO_CONTENT_NOT_NULL.getCode(), EpmetErrorCode.REPLY_INFO_CONTENT_NOT_NULL.getMsg()); |
|
|
|
} |
|
|
|
// 3、回复内容不能超过500字
|
|
|
|
if(StringUtils.isNotBlank(formDTO.getContent())&&formDTO.getContent().length()>500){ |
|
|
|
throw new RenException(EpmetErrorCode.INFO_REPLY_CONTENT_LENGTH_LIMIT.getCode(), EpmetErrorCode.INFO_REPLY_CONTENT_LENGTH_LIMIT.getMsg()); |
|
|
|
} |
|
|
|
InfoReplyEntity infoReplyEntity=new InfoReplyEntity(); |
|
|
|
infoReplyEntity.setInfoId(formDTO.getInfoId()); |
|
|
|
infoReplyEntity.setCustomerId(formDTO.getCustomerId()); |
|
|
@ -353,11 +357,11 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem |
|
|
|
OrgStaffFormDTO orgStaffFormDTO=new OrgStaffFormDTO(); |
|
|
|
orgStaffFormDTO.setCustomerId(customerId); |
|
|
|
for(OrgCommonDTO org:orgList){ |
|
|
|
if("grid".equals(org.getOrgType())){ |
|
|
|
if(OrgTypeEnum.GRID.getCode().equals(org.getOrgType())){ |
|
|
|
orgStaffFormDTO.getGridIds().add(org.getOrgId()); |
|
|
|
}else if("agency".equals(org.getOrgType())){ |
|
|
|
}else if(OrgTypeEnum.AGENCY.getCode().equals(org.getOrgType())){ |
|
|
|
orgStaffFormDTO.getAgencyIds().add(org.getOrgId()); |
|
|
|
}else if("dept".equals(org.getOrgType())){ |
|
|
|
}else if(OrgTypeEnum.DEPT.getCode().equals(org.getOrgType())){ |
|
|
|
orgStaffFormDTO.getDeptIds().add(org.getOrgId()); |
|
|
|
} |
|
|
|
} |
|
|
@ -366,7 +370,7 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem |
|
|
|
throw new RenException("根据组织查询工作人员异常"); |
|
|
|
} |
|
|
|
if(CollectionUtils.isEmpty(result.getData())){ |
|
|
|
log.info("已选择的架构里没有工作人员"); |
|
|
|
log.warn("已选择的架构里没有工作人员"); |
|
|
|
return Collections.EMPTY_SET; |
|
|
|
} |
|
|
|
return result.getData(); |
|
|
@ -393,7 +397,7 @@ public class InfoServiceImpl extends BaseServiceImpl<InfoDao, InfoEntity> implem |
|
|
|
throw new RenException("根据角色查询工作人员异常"); |
|
|
|
} |
|
|
|
if(CollectionUtils.isEmpty(result.getData())){ |
|
|
|
log.info("角色下没有工作人员"); |
|
|
|
log.warn("角色下没有工作人员"); |
|
|
|
return Collections.EMPTY_SET; |
|
|
|
} |
|
|
|
return result.getData(); |
|
|
|