Commit ee4dab8a authored by kongfm's avatar kongfm

更新结案冻结接口

parent 4bc65f7c
...@@ -373,43 +373,39 @@ public class AlertCalledController extends BaseController { ...@@ -373,43 +373,39 @@ public class AlertCalledController extends BaseController {
/** /**
* 冻结工单-维修 * 冻结工单-维修
* @param forzenResult
* @param alertId
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveForzen") @PostMapping(value = "/saveForzen")
@ApiOperation(httpMethod = "POST", value = "冻结工单-维修", notes = "冻结工单-维修") @ApiOperation(httpMethod = "POST", value = "冻结工单-维修", notes = "冻结工单-维修")
public ResponseModel<Boolean> forzenAlertById(@ApiParam(value = "冻结原因", required = true) @RequestParam String forzenResult, @ApiParam(value = "警情id", required = true) @RequestParam Long alertId) { public ResponseModel<Boolean> forzenAlertById(@RequestBody AlertCalledDto alertCalledDto) {
if (ValidationUtil.isEmpty(alertId) if (ValidationUtil.isEmpty(alertCalledDto.getSequenceNbr())
|| ValidationUtil.isEmpty(forzenResult)){ || ValidationUtil.isEmpty(alertCalledDto.getForzenResult())){
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(AlertCalled::getForzenResult,forzenResult); updateWrapper.set(AlertCalled::getForzenResult,alertCalledDto.getForzenResult());
updateWrapper.set(AlertCalled::getAlertStage,1); updateWrapper.set(AlertCalled::getAlertStage,1);
updateWrapper.eq(AlertCalled::getSequenceNbr,alertId); updateWrapper.eq(AlertCalled::getSequenceNbr,alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
} }
/** /**
* 工单结案-投诉 * 工单结案-投诉
* @param finalReason
* @param alertId
* @return * @return
*/ */
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@PostMapping(value = "/saveFinalReason") @PostMapping(value = "/saveFinalReason")
@ApiOperation(httpMethod = "POST", value = "工单结案-投诉", notes = "工单结案-投诉") @ApiOperation(httpMethod = "POST", value = "工单结案-投诉", notes = "工单结案-投诉")
public ResponseModel<Boolean> finishAlertById(@ApiParam(value = "结案说明", required = true) @RequestParam String finalReason, @ApiParam(value = "警情id", required = true) @RequestParam Long alertId) { public ResponseModel<Boolean> finishAlertById(@RequestBody AlertCalledDto alertCalledDto) {
if (ValidationUtil.isEmpty(finalReason) if (ValidationUtil.isEmpty(alertCalledDto.getFinalReason())
|| ValidationUtil.isEmpty(alertId)){ || ValidationUtil.isEmpty(alertCalledDto.getSequenceNbr())){
throw new BadRequest("参数校验失败."); throw new BadRequest("参数校验失败.");
} }
LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>(); LambdaUpdateWrapper<AlertCalled> updateWrapper = new LambdaUpdateWrapper<>();
updateWrapper.set(AlertCalled::getFinalReason,finalReason); updateWrapper.set(AlertCalled::getFinalReason,alertCalledDto.getFinalReason());
updateWrapper.set(AlertCalled::getAlertStage,1); updateWrapper.set(AlertCalled::getAlertStage,1);
updateWrapper.eq(AlertCalled::getSequenceNbr,alertId); updateWrapper.eq(AlertCalled::getSequenceNbr,alertCalledDto.getSequenceNbr());
return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper)); return ResponseHelper.buildResponse(iAlertCalledService.update(updateWrapper));
} }
......
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