|
@@ -132,11 +132,11 @@ public class IncidentController {
|
|
|
String MessageContent = "";
|
|
|
//发送跟踪专班短信
|
|
|
templateId = "2431012137069";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, null, incident.getSpecialClassId(), "");
|
|
|
//发送交办单位短信
|
|
|
templateId = "2431012137069";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, incident.getOrgId(), null, "");
|
|
|
|
|
|
msgResult.setResult(true);
|
|
@@ -309,11 +309,11 @@ public class IncidentController {
|
|
|
String MessageContent = "";
|
|
|
//发送跟踪专班短信
|
|
|
templateId = "2431012152806";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, null, incident.getSpecialClassId(), "");
|
|
|
//发送交办单位短信
|
|
|
templateId = "2431012152806";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, incident.getOrgId(), null, "");
|
|
|
|
|
|
msgResult.setResult(true);
|
|
@@ -388,7 +388,7 @@ public class IncidentController {
|
|
|
String MessageContent = "";
|
|
|
//发送跟踪专班短信
|
|
|
templateId = "2431012153083";
|
|
|
- MessageContent = organization.getName() + "责任单位已上传文档,请查阅。";
|
|
|
+ MessageContent = String.format("%s责任单位已上传文档(批次:%s,序号:%s),请查阅。",organization.getName(),incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, null, incident.getSpecialClassId(), "");
|
|
|
}
|
|
|
|
|
@@ -528,9 +528,6 @@ public class IncidentController {
|
|
|
|
|
|
Page<Incident> page = incidentService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
for(Incident incident : page.getResult()){
|
|
|
- List<IncidentStep> incidentStepList = incidentStepService.findListByIncidentId(incident.getId());
|
|
|
-// incident.setIncidentStepList(incidentStepList);
|
|
|
-
|
|
|
if(StringUtils.isNotEmpty(incident.getSpecialClassId())){
|
|
|
List<String> nameList = new ArrayList<>();
|
|
|
String[] ids = incident.getSpecialClassId().split(",");
|
|
@@ -560,10 +557,10 @@ public class IncidentController {
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
searchParams.put("isFinished", "1");
|
|
|
if(StringUtils.isNotEmpty(user.getSpecialClassId())) {
|
|
|
- searchParams.put("orSpecialClassId", user.getSpecialClassId());
|
|
|
+ searchParams.put("orSpecialClassId", "%"+user.getSpecialClassId()+"%");
|
|
|
}
|
|
|
if(StringUtils.isNotEmpty(user.getOrgId())) {
|
|
|
- searchParams.put("orOrgId", user.getOrgId());
|
|
|
+ searchParams.put("orOrgId", "%"+user.getOrgId()+"%");
|
|
|
}
|
|
|
// searchParams.put("createBy", subject);
|
|
|
|
|
@@ -719,6 +716,66 @@ public class IncidentController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value="列表")
|
|
|
+ @RequestMapping(value = "pageListTracking",method = RequestMethod.POST)
|
|
|
+ public MessageResult<Map> pageListTracking(
|
|
|
+ String batch, String serialNo, String complainant, String complainantPhone, String areaId,
|
|
|
+ @RequestParam(value="pageIndex",defaultValue="1") int pageIndex,
|
|
|
+ @RequestParam(value="pageSize",defaultValue="20") int pageSize,
|
|
|
+ @RequestAttribute String subject){
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+ User user = userService.get(subject);
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+ searchParams.put("isFinished","1");
|
|
|
+ searchParams.put("specialClassId","%"+user.getSpecialClassId()+"%");
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("batch_","asc"));
|
|
|
+ sortList.add(new Sort("serial_no","asc"));
|
|
|
+
|
|
|
+ //当角色为高级用户时,查看所有案件
|
|
|
+ List<Role> roleList = userRoleService.findRoleByUserId(subject);
|
|
|
+ for(Role role : roleList) {
|
|
|
+ if("8d4dd9ac-dcf4-4178-885c-fd309f4be8f6".equals(role.getId()))
|
|
|
+ searchParams.put("createBy", null);
|
|
|
+ }
|
|
|
+
|
|
|
+ //搜索条件
|
|
|
+ if (StringUtils.isNotEmpty(batch)) {
|
|
|
+ searchParams.put("batch","%" + batch + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(serialNo)) {
|
|
|
+ searchParams.put("serialNo","%" + serialNo + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(complainant)) {
|
|
|
+ searchParams.put("complainant","%" + complainant + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(complainantPhone)) {
|
|
|
+ searchParams.put("complainantPhone","%" + complainantPhone + "%");
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(areaId)) {
|
|
|
+ searchParams.put("areaId",areaId);
|
|
|
+ }
|
|
|
+
|
|
|
+ Page<Incident> page = incidentService.pageSearch(searchParams,pageIndex,pageSize,true,sortList);
|
|
|
+ for(Incident incident : page.getResult()){
|
|
|
+ if(StringUtils.isNotEmpty(incident.getSpecialClassId())){
|
|
|
+ List<String> nameList = new ArrayList<>();
|
|
|
+ String[] ids = incident.getSpecialClassId().split(",");
|
|
|
+ for(String id : ids){
|
|
|
+ nameList.add(dataDictionaryService.getName(id));
|
|
|
+ }
|
|
|
+ incident.setSpecialClassName(String.join(",", nameList));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+ msgResult.setData(PojoUtils.pageWrapper(page));
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
+
|
|
|
@ApiOperation(value="区域类型数量")
|
|
|
@RequestMapping(value = "countByArea",method = RequestMethod.POST)
|
|
|
public MessageResult<List> countByArea(@RequestAttribute String subject){
|
|
@@ -754,7 +811,7 @@ public class IncidentController {
|
|
|
return msgResult;
|
|
|
}
|
|
|
|
|
|
- @ApiOperation(value="区域类型数量")
|
|
|
+ @ApiOperation(value="专班类型数量")
|
|
|
@RequestMapping(value = "countBySpecialClass",method = RequestMethod.POST)
|
|
|
public MessageResult<List> countBySpecialClass(@RequestAttribute String subject){
|
|
|
MessageResult<List> msgResult = new MessageResult<>();
|
|
@@ -794,6 +851,7 @@ public class IncidentController {
|
|
|
public MessageResult<Map> countByWarningLight(@RequestAttribute String subject){
|
|
|
MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
+ User user = userService.get(subject);
|
|
|
int intDanger = 0;
|
|
|
int intWarning = 0;
|
|
|
int intSafety = 0;
|
|
@@ -801,21 +859,24 @@ public class IncidentController {
|
|
|
|
|
|
Map<String,Object> searchParams = new HashMap<>();
|
|
|
searchParams.put("isFinished", "1");
|
|
|
- searchParams.put("createBy", subject);
|
|
|
-
|
|
|
- List<Role> roleList = userRoleService.findRoleByUserId(subject);
|
|
|
- for(Role role : roleList) {
|
|
|
- if("8d4dd9ac-dcf4-4178-885c-fd309f4be8f6".equals(role.getId()))
|
|
|
- searchParams.put("createBy", null);
|
|
|
+ if(StringUtils.isNotEmpty(user.getSpecialClassId())) {
|
|
|
+ searchParams.put("orSpecialClassId", "%"+user.getSpecialClassId()+"%");
|
|
|
}
|
|
|
+ if(StringUtils.isNotEmpty(user.getOrgId())) {
|
|
|
+ searchParams.put("orOrgId", "%"+user.getOrgId()+"%");
|
|
|
+ }
|
|
|
+
|
|
|
+// List<Role> roleList = userRoleService.findRoleByUserId(subject);
|
|
|
+// for(Role role : roleList) {
|
|
|
+// if("8d4dd9ac-dcf4-4178-885c-fd309f4be8f6".equals(role.getId()))
|
|
|
+// searchParams.put("createBy", null);
|
|
|
+// }
|
|
|
List<Sort> sortList = new ArrayList<>();
|
|
|
sortList.add(new Sort("create_time","desc"));
|
|
|
|
|
|
Page<Incident> page = incidentService.pageSearch(searchParams,1,10000,false,sortList);
|
|
|
total = page.size();
|
|
|
for(Incident incident : page.getResult()){
|
|
|
- List<IncidentStep> incidentStepList = incidentStepService.findListByIncidentId(incident.getId());
|
|
|
-// incident.setLastStep(incidentStepList.get(incidentStepList.size()-1));
|
|
|
//报警灯
|
|
|
Date currentTime = new Date();
|
|
|
Date warnTime = incident.getWarnDate1();
|
|
@@ -1234,11 +1295,11 @@ public class IncidentController {
|
|
|
String MessageContent = "";
|
|
|
//发送跟踪专班短信
|
|
|
templateId = "2431012137069";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台手机端查看。(http://39.104.144.104/excellent-mobile)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, null, incident.getSpecialClassId(), "");
|
|
|
//发送交办单位短信
|
|
|
templateId = "2431012137069";
|
|
|
- MessageContent = "您有一条待办提醒,请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)";
|
|
|
+ MessageContent = String.format("您有一条待办提醒(批次:%s,序号:%s),请登录双优督办平台电脑端查看。(http://39.104.144.104/excellent-portal)",incident.getBatch(),incident.getSerialNo());
|
|
|
sendSMSing(MessageContent, templateId, incident.getOrgId(), null, "");
|
|
|
|
|
|
affectCount++;
|