Commit 6ed43119 authored by tianyiming's avatar tianyiming

96333回访的保存按钮置灰修改

parent 215add61
......@@ -61,7 +61,7 @@ public interface IAlertCalledService {
* @param stage
* @return
*/
Boolean updateAlertStage(AlertCalledDto alertCalledVo, DispatchPaperEnums stage);
Boolean updateAlertStage(AlertCalledDto alertCalledVo, DispatchPaperEnums stage,Long alertId);
......
......@@ -27,13 +27,7 @@ import com.yeejoin.amos.boot.module.elevator.api.dto.FormValue;
import com.yeejoin.amos.boot.module.elevator.api.dto.TzsCitInfoDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.WechatMyBusinessListDto;
import com.yeejoin.amos.boot.module.elevator.api.dto.WechatMyBussinessDto;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertCalled;
import com.yeejoin.amos.boot.module.elevator.api.entity.AlertFormValue;
import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchPaper;
import com.yeejoin.amos.boot.module.elevator.api.entity.DispatchTask;
import com.yeejoin.amos.boot.module.elevator.api.entity.Elevator;
import com.yeejoin.amos.boot.module.elevator.api.entity.TzsCitInfo;
import com.yeejoin.amos.boot.module.elevator.api.entity.VoiceRecordFile;
import com.yeejoin.amos.boot.module.elevator.api.entity.*;
import com.yeejoin.amos.boot.module.elevator.api.enums.AlertStageEnums;
import com.yeejoin.amos.boot.module.elevator.api.enums.DispatchPaperEnums;
import com.yeejoin.amos.boot.module.elevator.api.enums.EquipmentClassifityEnum;
......@@ -137,7 +131,8 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
@Value("${duty.seats.role.ids}")
private String dutySeatsRoleIds;
@Autowired
RepairConsultServiceImpl repairConsultService;
private RedissonClient redissonClient;
......@@ -322,7 +317,7 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
}
@Override
public Boolean updateAlertStage(AlertCalledDto alertCalledVo, DispatchPaperEnums stage) {
public Boolean updateAlertStage(AlertCalledDto alertCalledVo, DispatchPaperEnums stage,Long alertId) {
LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.eq(AlertCalled::getSequenceNbr,alertCalledVo.getSequenceNbr());
updateWrapper.set(AlertCalled::getAlertStageCode,stage.getId());
......@@ -332,9 +327,15 @@ public class AlertCalledServiceImpl extends BaseService<AlertCalledDto,AlertCall
if(stage == DispatchPaperEnums.reportorBack || stage == DispatchPaperEnums.complainantBack) {
updateWrapper.set(AlertCalled::getAlertStatus,true);
alertCalledVo.setAlertStatus(true);
} else if(stage == DispatchPaperEnums.repaired && alertCalledVo.getAlarmTypeCode().equals(AlertStageEnums.KRJY.getId())) {
updateWrapper.set(AlertCalled::getAlertStatus,true);
alertCalledVo.setAlertStatus(true);
} else if(alertCalledVo.getAlarmTypeCode().equals(AlertStageEnums.KRJY.getId())) {
LambdaQueryWrapper<RepairConsult> queryWrapper = new LambdaQueryWrapper<RepairConsult>();
queryWrapper.eq(RepairConsult::getParentId, alertId).orderByDesc(RepairConsult::getRecDate);
List<RepairConsult> list = repairConsultService.list(queryWrapper);
List<RepairConsult> collect = list.stream().filter(item -> item.getType().length() > 3).collect(Collectors.toList());
if(collect.size()>1){
updateWrapper.set(AlertCalled::getAlertStatus,true);
alertCalledVo.setAlertStatus(true);
}
}
Boolean flag = this.update(updateWrapper);
if(flag) { //更新redis 和 es 信息
......
......@@ -38,6 +38,7 @@ import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* 警情填报业务数据项服务实现类
......@@ -327,15 +328,21 @@ public class RepairConsultServiceImpl extends BaseService<RepairConsultDto,Repai
flag = this.save(repairConsult);
if(flag) {
// 记录处置记录后修改 案件状态
alertCalledServiceImpl.updateAlertStage(alertCalledVo,CZHJ);
alertCalledServiceImpl.updateAlertStage(alertCalledVo,CZHJ,alertId);
// 警情伤亡消息 矩阵 消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("alertId",String.valueOf(alertCalledVo.getSequenceNbr()));
// KRJY 的 repaired complainantBack 和 reportorBack 警情完成
if(CZHJ == DispatchPaperEnums.reportorBack || CZHJ == DispatchPaperEnums.complainantBack) {
jsonObject.put("finished",true);
} else if(CZHJ == DispatchPaperEnums.repaired && alertCalledVo.getAlarmTypeCode().equals(AlertStageEnums.KRJY.getId())) {
jsonObject.put("finished",true);
} else if(alertCalledVo.getAlarmTypeCode().equals(AlertStageEnums.KRJY.getId())) {
LambdaQueryWrapper<RepairConsult> queryWrapper = new LambdaQueryWrapper<RepairConsult>();
queryWrapper.eq(RepairConsult::getParentId, alertId).orderByDesc(RepairConsult::getRecDate);
List<RepairConsult> list = this.list(queryWrapper);
List<RepairConsult> collect = list.stream().filter(item -> item.getType().length() > 3).collect(Collectors.toList());
if(collect.size()>1){
jsonObject.put("finished",true);
}
}
try {
emqKeeper.getMqttClient().publish(alertHeartpushTopic, jsonObject.toString().getBytes("UTF-8"), 1, false);
......
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