develop
hanrenchun 10 months ago
parent 58f3b8815e
commit a09b036dc3

@ -46,29 +46,31 @@ public class DisposalInfoController extends BaseController {
queryWrapper.orderByDesc("warning_time"); queryWrapper.orderByDesc("warning_time");
List<TransitHuntersUserModelRecord> list1 = transitHuntersUserModelRecordService.list(queryWrapper); List<TransitHuntersUserModelRecord> list1 = transitHuntersUserModelRecordService.list(queryWrapper);
ArrayList<TransitHuntersUserModelRecord> transitHuntersUserModelRecords = new ArrayList<>(); ArrayList<TransitHuntersUserModelRecord> transitHuntersUserModelRecords = new ArrayList<>();
for (TransitHuntersUserModelRecord transitHuntersUserModelRecord :list1){ for (TransitHuntersUserModelRecord transitHuntersUserModelRecord : list1) {
Long id = transitHuntersUserModelRecord.getId(); Long id = transitHuntersUserModelRecord.getId();
if (transitHuntersUserModelRecord.getWarningLevel() == 3) { if (transitHuntersUserModelRecord.getWarningLevel() == 3) {
transitHuntersUserModelRecord.setWarningLevelCn("二级"); transitHuntersUserModelRecord.setWarningLevelCn("二级");
} }
DisposalInfo one = disposalInfoService.lambdaQuery().eq(DisposalInfo::getHuntersModelRecordId, id).one(); DisposalInfo one = disposalInfoService.lambdaQuery().eq(DisposalInfo::getHuntersModelRecordId, id).one();
if (one != null){ if (one != null) {
transitHuntersUserModelRecord.setDisposalResultCn("已处置"); transitHuntersUserModelRecord.setSignStatus(one.getSignStatus());
if (one.getSignPoliceman() != null || one.getSignPoliceStation()!=null){
transitHuntersUserModelRecord.setSignStatusCn("已签收");
}else {
transitHuntersUserModelRecord.setSignStatusCn("未签收"); transitHuntersUserModelRecord.setSignStatusCn("未签收");
if (one.getSignStatus() == 2) {
transitHuntersUserModelRecord.setSignStatusCn("已签收未反馈");
} }
if (one.getRiskDesc()!=null){ if (one.getSignStatus() == 3) {
transitHuntersUserModelRecord.setRisk("有风险"); transitHuntersUserModelRecord.setSignStatusCn("已签收已反馈");
}else { }
transitHuntersUserModelRecord.setRisk("无风险"); transitHuntersUserModelRecord.setDisposalResult(one.getDisposalResult());
if (one.getDisposalResult() == 1){
transitHuntersUserModelRecord.setDisposalResultCn("无风险");
}
if (one.getDisposalResult() == 2){
transitHuntersUserModelRecord.setDisposalResultCn("有风险");
} }
} else { } else {
transitHuntersUserModelRecord.setDisposalResultCn("未处置");
transitHuntersUserModelRecord.setSignStatusCn("未签收"); transitHuntersUserModelRecord.setSignStatusCn("未签收");
transitHuntersUserModelRecord.setSignStatus(1); transitHuntersUserModelRecord.setSignStatus(1);
transitHuntersUserModelRecord.setDisposalResult(1);
} }
String warningTime = transitHuntersUserModelRecord.getWarningTime(); String warningTime = transitHuntersUserModelRecord.getWarningTime();
LocalDateTime localDateTime = LocalDateTime.parse(warningTime, inputFormatter); LocalDateTime localDateTime = LocalDateTime.parse(warningTime, inputFormatter);
@ -83,20 +85,29 @@ public class DisposalInfoController extends BaseController {
@PostMapping @PostMapping
@ApiOperation("修改或新增预警信息处置表") @ApiOperation("修改或新增预警信息处置表")
public AjaxResult insert(@RequestBody DisposalInfo disposalInfo) { public AjaxResult insert(@RequestBody DisposalInfo disposalInfo) {
if (disposalInfo != null){ if (disposalInfo != null) {
if ("无风险".equals(disposalInfo.getDisposalResultCn())) {
disposalInfo.setDisposalResult(1);
}
if ("有风险".equals(disposalInfo.getDisposalResultCn())) {
disposalInfo.setDisposalResult(2); disposalInfo.setDisposalResult(2);
}
disposalInfo.setSignStatus(1); disposalInfo.setSignStatus(1);
if (disposalInfo.getSignPoliceman() != null || disposalInfo.getSignPoliceStation() !=null){ if (disposalInfo.getSignPoliceman() != null && disposalInfo.getSignPoliceStation() != null) {
disposalInfo.setSignStatus(2); disposalInfo.setSignStatus(2);
} }
if (disposalInfo.getRiskFeedback() != null) {
disposalInfo.setSignStatus(3);
}
} }
DisposalInfo one = disposalInfoService.lambdaQuery().eq(DisposalInfo::getHuntersModelRecordId, disposalInfo.getHuntersModelRecordId()).one(); DisposalInfo one = disposalInfoService.lambdaQuery().eq(DisposalInfo::getHuntersModelRecordId, disposalInfo.getHuntersModelRecordId()).one();
if (one == null){ if (one == null) {
return toAjax(disposalInfoService.save(disposalInfo)); return toAjax(disposalInfoService.save(disposalInfo));
}else { } else {
UpdateWrapper<DisposalInfo> updateWrapper = new UpdateWrapper<>(); UpdateWrapper<DisposalInfo> updateWrapper = new UpdateWrapper<>();
updateWrapper.eq("hunters_model_record_id",disposalInfo.getHuntersModelRecordId()); updateWrapper.eq("hunters_model_record_id", disposalInfo.getHuntersModelRecordId());
return toAjax(disposalInfoService.update(disposalInfo,updateWrapper)); return toAjax(disposalInfoService.update(disposalInfo, updateWrapper));
} }
} }
@ -105,13 +116,8 @@ public class DisposalInfoController extends BaseController {
@ApiOperation("查找处置状态") @ApiOperation("查找处置状态")
public AjaxResult disposalInfo(DisposalInfo disposalInfo) { public AjaxResult disposalInfo(DisposalInfo disposalInfo) {
QueryWrapper<DisposalInfo> queryWrapper = new QueryWrapper<>(); QueryWrapper<DisposalInfo> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("hunters_model_record_id",disposalInfo.getHuntersModelRecordId()); queryWrapper.eq("hunters_model_record_id", disposalInfo.getHuntersModelRecordId());
DisposalInfo one = disposalInfoService.getOne(queryWrapper); DisposalInfo one = disposalInfoService.getOne(queryWrapper);
if (one.getRiskDesc() == null){
one.setRisk("无风险");
}else {
one.setRisk("有风险");
}
return AjaxResult.success(one); return AjaxResult.success(one);
} }
} }

Loading…
Cancel
Save