Commit 8b3ac7a7 by dupengfei

分派时给联络员警务终端发送消息

parent 0ab862ca
......@@ -8,8 +8,11 @@ import com.founder.util.*;
import com.founder.zczl.service.IZczlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
......@@ -2343,13 +2346,24 @@ public class ZczlController {
if(llys!=null&llys.size()>0){
List<String> usersIdentitycard = new ArrayList<>();
List<String> usersPolicemanId = new ArrayList<>();
TbYwZczl zczlXX = zczlService.getZczlxxByZczlbh(tbYwZczlFp.getZczlbh());
String xxnr = "有指令文号为"+zczlXX.getZlwh()+"的侦查指令下发到您单位,请尽快签收";
for(int i=0;i<llys.size();i++){
usersIdentitycard.add(llys.get(i).getSfzh());
usersPolicemanId.add(llys.get(i).getPolicemanid());
}
messageService.sendMessage(usersIdentitycard,user.getIdentitycard(),xxnr,zczlXX.getZczlbh(),"000000");
//对接移动警务app 分派后给联络员警务终端发送消息
RestTemplate restTemplate = new RestTemplate();
String join = String.join(",", usersPolicemanId);
HttpHeaders httpHeaders = new HttpHeaders();
HttpEntity<Object> httpEntity = new HttpEntity<>(httpHeaders);
String url = "http://26.3.13.120:8088";
String s = restTemplate.postForObject(url + "seedMessage/seedMessageToApp?policeManId=" + join + "&content=" + xxnr, httpEntity, String.class);
System.out.println(s);
}
}else{
flag = "0";
......
......@@ -872,21 +872,6 @@ public class ZczlService implements IZczlService {
file.transferTo(serverFile);
}
}
//如果可以新增侦查指令 说明有联络员
List<String> ids = new ArrayList<>();
RestTemplate restTemplate = new RestTemplate();
List<TbYwZczlLly> llysPolicemanId = zczlDao.getLlysPolicemanId(tbYwZczl.getUnitcode());
for (TbYwZczlLly lly: llysPolicemanId){
ids.add(lly.getPolicemanid());
}
String join = String.join(",", ids);
String content = "您有一条侦查指令需要反馈,请登录刑专系统进行反馈!";
//给联络员警务终端发消息
HttpHeaders httpHeaders = new HttpHeaders();
HttpEntity<Object> httpEntity = new HttpEntity<>(httpHeaders);
String url = "http://26.3.13.120:8088";
String s = restTemplate.postForObject(url + "seedMessage/seedMessageToApp?policeManId=" + join + "&content=" + content, httpEntity, String.class);
System.out.println(s);
bool = true;
} catch (Exception e) {
throw new BaseException("新增侦查指令信息出错!",e);
......
......@@ -837,6 +837,7 @@
XXZJBH xxzjbh,
SFZH sfzh,
UNITCODE unitcode,
POLICEMANID policemanid,
(select name from sys_dictitem where groupid='CODE_XZUNIT' and code=UNITCODE) as unitname,
TRUENAME truename,
TELEPHONE telephone,
......
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