Commit bc16c4c4 authored by tangwei's avatar tangwei

修改bug

parent 4e6d24fe
......@@ -188,7 +188,7 @@ public class PowerTransferController extends BaseController {
List<PowerTransferCompanyDto> powerTransferCompanyDotList = powerTransferDto.getPowerTransferCompanyDotList();
StringBuilder content = new StringBuilder();
powerTransferCompanyDotList.forEach(e->{
if (e.getPowerTransferCompanyResourcesDtoList()!=null){
if (e.getPowerTransferCompanyResourcesDtoList()!=null&&e.getPowerTransferCompanyResourcesDtoList().size()>0){
e.getPowerTransferCompanyResourcesDtoList().forEach(
c->
{
......
......@@ -1623,9 +1623,10 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
});
sendUserIds.addAll(userIdList);
smsCode = AlertBusinessTypeEnum.力量调派.getSms_code();
//人员去重
Set<Map<String, Object>> sendUser=getwone(sendUserIds);
// 组装人员信息
for (Map<String, Object> orgUser : sendUserIds) {
for (Map<String, Object> orgUser : sendUser) {
AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject();
alertSubmittedObject.setAlertSubmittedId(Long.parseLong(alertSubmittedId));
alertSubmittedObject.setType(false);
......@@ -1733,7 +1734,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
String resourcesNumStr = resourcesNum.toString();
List<String> userList= new ArrayList<String>();
ArrayList<String> taskUserIds = new ArrayList<>();
sendUserIds.stream().forEach(i -> {
sendUser.stream().forEach(i -> {
if (i.containsKey("mobilePhone")) {
mobiles.add(i.get("mobilePhone").toString());
}
......@@ -1779,6 +1780,28 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
public Set<Map<String, Object>> getwone(Set<Map<String, Object>> sendUserIds){
Map<String,Map<String, Object>> map =new HashMap<>();
if(sendUserIds!=null&&sendUserIds.size()>0){
for (Map<String, Object> sendUserId : sendUserIds) {
map.put(sendUserId.get("amosId").toString(),sendUserId);
}
}
Set<Map<String, Object>> set = new HashSet<>(map.values());
return set;
}
@SuppressWarnings("unchecked")
public void ruleCallbackActionForPowerTransferForSurvBrigade(String smsCode, List sendIds, Object object, List<String> pList) throws MqttPersistenceException, MqttException {
......@@ -1834,9 +1857,12 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
sendUserIds.addAll(userIds);
smsCode = AlertBusinessTypeEnum.力量调派.getSms_code();
//人员去重
Set<Map<String, Object>> sendUser=getwone(sendUserIds);
// 组装人员信息
for (Map<String, Object> orgUser : sendUserIds) {
for (Map<String, Object> orgUser : sendUser) {
AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject();
alertSubmittedObject.setAlertSubmittedId(Long.parseLong(alertSubmittedId));
alertSubmittedObject.setType(false);
......@@ -1865,7 +1891,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
List<String> userList= new ArrayList<String>();
ArrayList<String> taskUserIds = new ArrayList<>();
sendUserIds.stream().forEach(i -> {
sendUser.stream().forEach(i -> {
if (i.containsKey("mobilePhone")) {
mobiles.add(i.get("mobilePhone").toString());
}
......@@ -1974,9 +2000,13 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
}
sendUserIds.addAll(userIds);
smsCode = AlertBusinessTypeEnum.力量调派.getSms_code();
// 组装人员信息
for (Map<String, Object> orgUser : sendUserIds) {
//人员去重
Set<Map<String, Object>> sendUser=getwone(sendUserIds);
// 组装人员信息
for (Map<String, Object> orgUser : sendUser) {
AlertSubmittedObject alertSubmittedObject = new AlertSubmittedObject();
alertSubmittedObject.setAlertSubmittedId(Long.parseLong(alertSubmittedId));
alertSubmittedObject.setCompanyId(companyId);
......@@ -2003,7 +2033,7 @@ public class AlertSubmittedServiceImpl extends BaseService<AlertSubmittedDto, Al
smsParams.put("alertType", calledRo.getAlertType());
List<String> userList= new ArrayList<String>();
List<String> taskUserIds= new ArrayList<String>();
sendUserIds.stream().forEach(i -> {
sendUser.stream().forEach(i -> {
if (i.containsKey("mobilePhone")) {
mobiles.add(i.get("mobilePhone").toString());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment