|
@ -24,6 +24,8 @@ import com.epmet.commons.tools.scan.param.TextScanParamDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.param.TextTaskDTO; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
import com.epmet.commons.tools.scan.result.SyncScanResult; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
import com.epmet.commons.tools.utils.*; |
|
|
|
|
|
import com.epmet.constant.ReadFlagConstant; |
|
|
|
|
|
import com.epmet.constant.UserMessageTypeConstant; |
|
|
import com.epmet.dao.IcEventDao; |
|
|
import com.epmet.dao.IcEventDao; |
|
|
import com.epmet.dto.*; |
|
|
import com.epmet.dto.*; |
|
|
import com.epmet.dto.form.*; |
|
|
import com.epmet.dto.form.*; |
|
@ -47,6 +49,7 @@ import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
|
import java.math.BigDecimal; |
|
|
import java.math.BigDecimal; |
|
|
import java.util.*; |
|
|
import java.util.*; |
|
|
|
|
|
import java.util.concurrent.atomic.AtomicReference; |
|
|
import java.util.function.Function; |
|
|
import java.util.function.Function; |
|
|
import java.util.stream.Collectors; |
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
@ -91,6 +94,8 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
private OperCrmOpenFeignClient crmOpenFeignClient; |
|
|
private OperCrmOpenFeignClient crmOpenFeignClient; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private ResiEventServiceImpl resiEventService; |
|
|
private ResiEventServiceImpl resiEventService; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private EpmetMessageOpenFeignClient messageOpenFeignClient; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -1077,11 +1082,13 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
throw new EpmetException("查询用户信息失败"+formDTO.getUserId()); |
|
|
throw new EpmetException("查询用户信息失败"+formDTO.getUserId()); |
|
|
} |
|
|
} |
|
|
entity.setReportUserId(formDTO.getUserId()); |
|
|
entity.setReportUserId(formDTO.getUserId()); |
|
|
|
|
|
AtomicReference<String> userShowName = new AtomicReference<>(""); |
|
|
userResult.getData().forEach(u -> { |
|
|
userResult.getData().forEach(u -> { |
|
|
if (u.getUserId().equals(formDTO.getUserId())){ |
|
|
if (u.getUserId().equals(formDTO.getUserId())){ |
|
|
entity.setName(u.getRealName()); |
|
|
entity.setName(u.getRealName()); |
|
|
entity.setMobile(u.getMobile()); |
|
|
entity.setMobile(u.getMobile()); |
|
|
entity.setIdCard(u.getIdNum()); |
|
|
entity.setIdCard(u.getIdNum()); |
|
|
|
|
|
userShowName.set(u.getUserShowName()); |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
// 0代表 随手拍和随时讲
|
|
|
// 0代表 随手拍和随时讲
|
|
@ -1106,9 +1113,55 @@ public class IcEventServiceImpl extends BaseServiceImpl<IcEventDao, IcEventEntit |
|
|
icEventAttachmentService.insertBatch(attachmentEntityList); |
|
|
icEventAttachmentService.insertBatch(attachmentEntityList); |
|
|
} |
|
|
} |
|
|
// 站内信发送给社区每个工作人员
|
|
|
// 站内信发送给社区每个工作人员
|
|
|
|
|
|
disposeMessage(gridInfo.getPid(), formDTO.getCustomerId(), userShowName.get(), entity.getId()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 给工作人员发送站内信 |
|
|
|
|
|
* @param agencyId |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param showName |
|
|
|
|
|
* @param icEventId |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/5/20 10:22 |
|
|
|
|
|
*/ |
|
|
|
|
|
public void disposeMessage(String agencyId,String customerId,String showName,String icEventId){ |
|
|
|
|
|
// 查询组织下的所有工作人员
|
|
|
|
|
|
AgencyIdFormDTO formDTO = new AgencyIdFormDTO(); |
|
|
|
|
|
formDTO.setAgencyId(agencyId); |
|
|
|
|
|
Result<List<String>> agencyStaffsResult = govOrgOpenFeignClient.getAgencyStaffs(formDTO); |
|
|
|
|
|
if (!agencyStaffsResult.success()){ |
|
|
|
|
|
throw new EpmetException("查询组织下工作人员失败..."); |
|
|
|
|
|
} |
|
|
|
|
|
if (!CollectionUtils.isEmpty(agencyStaffsResult.getData())){ |
|
|
|
|
|
List<UserMessageFormDTO> msgList = new ArrayList<>(); |
|
|
|
|
|
agencyStaffsResult.getData().forEach(u -> { |
|
|
|
|
|
UserMessageFormDTO msg = new UserMessageFormDTO(); |
|
|
|
|
|
msg.setUserId(u); |
|
|
|
|
|
msg.setCustomerId(customerId); |
|
|
|
|
|
msg.setTargetId(icEventId); |
|
|
|
|
|
msg.setGridId("*"); |
|
|
|
|
|
msg.setApp(AppClientConstant.APP_GOV); |
|
|
|
|
|
msg.setMessageType(UserMessageTypeConstant.IC_EVENT); |
|
|
|
|
|
msg.setReadFlag(ReadFlagConstant.UN_READ); |
|
|
|
|
|
msg.setTitle("您有一条事件消息"); |
|
|
|
|
|
msg.setMessageContent(showName+"上报一条事件,请查看。"); |
|
|
|
|
|
msgList.add(msg); |
|
|
|
|
|
}); |
|
|
|
|
|
messageOpenFeignClient.saveUserMessageList(msgList); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Desc: 附件处理 |
|
|
|
|
|
* @param list |
|
|
|
|
|
* @param attachmentEntityList |
|
|
|
|
|
* @param id |
|
|
|
|
|
* @param customerId |
|
|
|
|
|
* @param userId |
|
|
|
|
|
* @author zxc |
|
|
|
|
|
* @date 2022/5/20 09:50 |
|
|
|
|
|
*/ |
|
|
public void disposeAttachment(List<FileCommonDTO> list,List<IcEventAttachmentEntity> attachmentEntityList,String id,String customerId,String userId){ |
|
|
public void disposeAttachment(List<FileCommonDTO> list,List<IcEventAttachmentEntity> attachmentEntityList,String id,String customerId,String userId){ |
|
|
int sort = NumConstant.ZERO; |
|
|
int sort = NumConstant.ZERO; |
|
|
for (FileCommonDTO a : list) { |
|
|
for (FileCommonDTO a : list) { |
|
|