develop
hanrenchun 10 months ago
parent 58f3b8815e
commit a09b036dc3

@ -53,22 +53,24 @@ public class DisposalInfoController extends BaseController {
} }
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);
@ -84,11 +86,20 @@ public class DisposalInfoController extends BaseController {
@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) {
@ -107,11 +118,6 @@ public class DisposalInfoController extends BaseController {
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