Commit ee4dab8a authored by kongfm's avatar kongfm

更新结案冻结接口

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