|
|
@@ -94,12 +94,20 @@ public class AdminPreviewApiController extends CertifyApiController {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利ID"));
|
|
|
return res;
|
|
|
}
|
|
|
- PatentInfo pi = patentInfoService.selectByPrimaryKey(id);
|
|
|
- if (null == pi) {
|
|
|
- res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利ID"));
|
|
|
- return res;
|
|
|
- }
|
|
|
AttachmentType attachmentType = AttachmentType.getField(sign);
|
|
|
+ if (attachmentType == AttachmentType.LAST_YEAR_RATEPAY) {
|
|
|
+ OrgRatepay ratepay = orgRatepayService.selectByPrimaryKey(id);
|
|
|
+ if (null == ratepay) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "纳税报表ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ PatentInfo pi = patentInfoService.selectByPrimaryKey(id);
|
|
|
+ if (null == pi) {
|
|
|
+ res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "专利ID"));
|
|
|
+ return res;
|
|
|
+ }
|
|
|
+ }
|
|
|
if (attachmentType == AttachmentType.PATENT_PRORY_STATEMENT || attachmentType == AttachmentType.PATENT_WRITING
|
|
|
|| attachmentType == AttachmentType.AUTHORIZATION_NOTICE
|
|
|
|| attachmentType == AttachmentType.LAST_YEAR_RATEPAY
|
|
|
@@ -500,7 +508,7 @@ public class AdminPreviewApiController extends CertifyApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
/**
|
|
|
* 标准制定情况附件预览授权
|
|
|
* @param id
|
|
|
@@ -508,15 +516,15 @@ public class AdminPreviewApiController extends CertifyApiController {
|
|
|
* @return
|
|
|
*/
|
|
|
@RequestMapping(value = "/standard", method = RequestMethod.GET)
|
|
|
- public Result previewStandard(String id, String sign){
|
|
|
- Result res = new Result();
|
|
|
+ public Result previewStandard(String id, String sign) {
|
|
|
+ Result res = new Result();
|
|
|
if (StringUtils.isEmpty(id)) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准制定情况ID"));
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
OrgStandard os = orgStandardService.selectByPrimaryKey(id);
|
|
|
- if (null == os){
|
|
|
+ if (null == os) {
|
|
|
res.getError().add(buildError(ErrorConstants.PARAM_ERROR, "", "标准制定情况ID"));
|
|
|
return res;
|
|
|
}
|
|
|
@@ -530,6 +538,5 @@ public class AdminPreviewApiController extends CertifyApiController {
|
|
|
}
|
|
|
return res;
|
|
|
}
|
|
|
-
|
|
|
|
|
|
}
|