|
@@ -1,8 +1,10 @@
|
|
|
package com.fdkankan.fusion.controller;
|
|
|
|
|
|
|
|
|
+import com.fdkankan.fusion.common.ResultCode;
|
|
|
import com.fdkankan.fusion.common.ResultData;
|
|
|
import com.fdkankan.fusion.entity.CaseTabulation;
|
|
|
+import com.fdkankan.fusion.exception.BusinessException;
|
|
|
import com.fdkankan.fusion.service.ICaseTabulationService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
@@ -34,8 +36,11 @@ public class CaseTabulationController {
|
|
|
|
|
|
@GetMapping("/info")
|
|
|
public ResultData info (@RequestParam (required = false) String tabulationId){
|
|
|
-
|
|
|
- return ResultData.ok(caseTabulationService.getById(tabulationId));
|
|
|
+ CaseTabulation caseTabulation = caseTabulationService.getById(tabulationId);
|
|
|
+ if(caseTabulation == null){
|
|
|
+ throw new BusinessException(ResultCode.RECORD_NOT_EXITS);
|
|
|
+ }
|
|
|
+ return ResultData.ok(caseTabulation);
|
|
|
}
|
|
|
|
|
|
@GetMapping("/getByOverviewId")
|