...
|
...
|
@@ -2,12 +2,14 @@ package com.xkl.controller; |
|
|
|
|
|
import com.wordnik.swagger.annotations.ApiOperation;
|
|
|
import com.xkl.authorization.annotation.LogAnnotation;
|
|
|
import com.xkl.authorization.annotation.Sign;
|
|
|
import com.xkl.config.Constants;
|
|
|
import com.xkl.domain.*;
|
|
|
import com.xkl.model.ReportDetailModel;
|
|
|
import com.xkl.model.ReportModel;
|
|
|
import com.xkl.model.ResultModel;
|
|
|
import com.xkl.repository.*;
|
|
|
import com.xkl.security.AntiXSS;
|
|
|
import com.xkl.service.IScoreService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
...
|
...
|
@@ -43,22 +45,19 @@ public class DataShareController { |
|
|
private IScoreService scoreService;
|
|
|
|
|
|
@LogAnnotation
|
|
|
//@AntiXSS
|
|
|
//@Sign
|
|
|
@AntiXSS
|
|
|
@Sign
|
|
|
@RequestMapping(value = "/list", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "体检报告列表共享接口")
|
|
|
public ResponseEntity<ResultModel> getReportList(HttpServletRequest request,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
//if (!(boolean) request.getAttribute("signAspect"))
|
|
|
//return new ResponseEntity<>(ResultModel.error(SIGN_ERROR), HttpStatus.OK);
|
|
|
if (!(boolean) request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_ERROR), HttpStatus.OK);
|
|
|
XklApiKeyEntity xklApiKey = xklApiKeyRespository.findOne((long)type);
|
|
|
List<XklAmpReportEntity> xklAmpReportResult = new ArrayList<>();
|
|
|
if(xklApiKey.getActiveStatus()!=1){
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_NO_ACTIVE), HttpStatus.OK);
|
|
|
}
|
|
|
if(xklApiKey.getAccessStatus()!=3){
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_NO_ACCESS), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
long companyId = xklApiKey.getCompanyId();
|
|
|
XklCompanyEntity xklCompany = xklCompanyRespository.findOne(companyId);
|
...
|
...
|
@@ -87,23 +86,20 @@ public class DataShareController { |
|
|
}
|
|
|
|
|
|
@LogAnnotation
|
|
|
//@AntiXSS
|
|
|
//@Sign
|
|
|
@AntiXSS
|
|
|
@Sign
|
|
|
@RequestMapping(value = "/detail", method = RequestMethod.GET)
|
|
|
@ApiOperation(value = "体检报告详情共享接口")
|
|
|
public ResponseEntity<ResultModel> getReportDetail(HttpServletRequest request, @RequestParam long report_id,
|
|
|
@RequestParam String sign, @RequestParam long t, @RequestParam int type) {
|
|
|
//if (!(boolean) request.getAttribute("signAspect"))
|
|
|
// return new ResponseEntity<>(ResultModel.error(SIGN_ERROR), HttpStatus.OK);
|
|
|
if (!(boolean) request.getAttribute("signAspect"))
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_ERROR), HttpStatus.OK);
|
|
|
XklAmpReportEntity report = xklAmpReportRespository.findOne(report_id);
|
|
|
|
|
|
XklApiKeyEntity xklApiKey = xklApiKeyRespository.findOne((long)type);
|
|
|
if(xklApiKey.getActiveStatus()!=1){
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_NO_ACTIVE), HttpStatus.OK);
|
|
|
}
|
|
|
if(xklApiKey.getAccessStatus()!=3){
|
|
|
return new ResponseEntity<>(ResultModel.error(SIGN_NO_ACCESS), HttpStatus.OK);
|
|
|
}
|
|
|
|
|
|
long companyId = xklApiKey.getCompanyId();
|
|
|
XklCompanyEntity company = xklCompanyRespository.findOne(companyId);
|
...
|
...
|
|