未符合项整改 -新增和修改

This commit is contained in:
yuezhihang
2021-11-25 17:24:45 +08:00
parent 6178ba696c
commit 08853080db
@@ -56,6 +56,29 @@ public class SarStandUnqualifiedController extends BaseController<SarStandUnqual
}
}
@ApiOperation("未符合项整改新增")
@PostMapping("/addOne")
public ResponseMessage<Object> add(@RequestBody SarStandUnqualified sarStandUnqualified){
sarStandUnqualified.setCreateTime(new Date());
if (sarStandUnqualifiedService.save(sarStandUnqualified)) {
return Result.success("新增成功");
}
else{
return Result.error("新增失败");
}
}
@ApiOperation("未符合项整改新增")
@PostMapping("/updateOne")
public ResponseMessage<Object> update(@RequestBody SarStandUnqualified sarStandUnqualified){
if (sarStandUnqualifiedService.updateById(sarStandUnqualified)) {
return Result.success("新增成功");
}
else{
return Result.error("新增失败");
}
}
/**
* 分页查询未符合项
* @param sarStandUnqualifiedPage:筛选、分页信息