...
|
...
|
@@ -7,6 +7,7 @@ import com.xkl.authorization.annotation.Authorization; |
|
|
import com.xkl.authorization.annotation.CurrentUser;
|
|
|
import com.xkl.authorization.annotation.Sign;
|
|
|
import com.xkl.config.Constants;
|
|
|
import com.xkl.config.ResultStatus;
|
|
|
import com.xkl.domain.*;
|
|
|
import com.xkl.model.ReportDetailModel;
|
|
|
import com.xkl.model.ReportItemGraphModel;
|
...
|
...
|
@@ -54,6 +55,9 @@ public class ReportController { |
|
|
})
|
|
|
public ResponseEntity<ResultModel> getReportList(HttpServletRequest request, @CurrentUser User user,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
if(!(boolean)request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
|
|
|
|
|
|
long member_id=user.getMemberId();
|
|
|
List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberId(member_id);
|
|
|
return new ResponseEntity<>(ResultModel.ok(xklAmpReportEntity), HttpStatus.OK);
|
...
|
...
|
@@ -68,6 +72,9 @@ public class ReportController { |
|
|
})
|
|
|
public ResponseEntity<ResultModel> getReportDetail(HttpServletRequest request, @CurrentUser User user,@RequestParam long report_id,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
if(!(boolean)request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
|
|
|
|
|
|
XklAmpReportEntity report=xklAmpReportRespository.findOne(report_id);
|
|
|
List<ReportDetailModel> reportDetailModelList = new ArrayList<>();
|
|
|
if(report != null ){
|
...
|
...
|
@@ -99,7 +106,7 @@ public class ReportController { |
|
|
return new ResponseEntity<>(ResultModel.ok(reportModel), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value="/score",method = RequestMethod.GET)
|
|
|
/*@RequestMapping(value="/score",method = RequestMethod.GET)
|
|
|
@Authorization
|
|
|
@Sign
|
|
|
@ApiOperation(value = "健康评分接口(测试service用,后续可以注释掉)")
|
...
|
...
|
@@ -108,10 +115,13 @@ public class ReportController { |
|
|
})
|
|
|
public ResponseEntity<ResultModel> getReportScore(HttpServletRequest request, @CurrentUser User user,@RequestParam long report_id,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
if(!(boolean)request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
|
|
|
|
|
|
//单独测试需要删除xkl_amp_report_health_scroe表中数据
|
|
|
scoreService.getScore(report_id);
|
|
|
return new ResponseEntity<>(ResultModel.ok(), HttpStatus.OK);
|
|
|
}
|
|
|
}*/
|
|
|
|
|
|
@RequestMapping(value="/itemInfo",method = RequestMethod.GET)
|
|
|
@Authorization
|
...
|
...
|
@@ -122,6 +132,9 @@ public class ReportController { |
|
|
})
|
|
|
public ResponseEntity<ResultModel> getReportItemInfo(HttpServletRequest request, @CurrentUser User user,@RequestParam int itemId,@RequestParam int status,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
if(!(boolean)request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
|
|
|
|
|
|
XklAmpReportMetaItemsEntity metaItems = Constants.itemMetaMap.get(itemId);
|
|
|
String result="";
|
|
|
//0, normal,1, lower,2, higher
|
...
|
...
|
@@ -146,6 +159,9 @@ public class ReportController { |
|
|
})
|
|
|
public ResponseEntity<ResultModel> getReportItemGraph(HttpServletRequest request, @CurrentUser User user,@RequestParam int itemId,@RequestParam String stime,@RequestParam String etime,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
if(!(boolean)request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(ResultStatus.SIGN_ERROR), HttpStatus.OK);
|
|
|
|
|
|
long member_id=user.getMemberId();
|
|
|
List<XklAmpReportEntity> xklAmpReportEntity=xklAmpReportRespository.findByMemberId(member_id);
|
|
|
List<ReportItemGraphModel> reportItemGraphModelList =new ArrayList<>();
|
...
|
...
|
|