|
|
@@ -41,10 +41,15 @@ import com.goafanti.common.constant.ErrorConstants;
|
|
|
import com.goafanti.common.controller.CertifyApiController;
|
|
|
import com.goafanti.common.enums.AttachmentType;
|
|
|
import com.goafanti.common.enums.DeleteStatus;
|
|
|
+import com.goafanti.common.enums.PatentAnnualFeeStatus;
|
|
|
+import com.goafanti.common.enums.PatentApplicationFeeStatus;
|
|
|
+import com.goafanti.common.enums.PatentCategoryStatus;
|
|
|
import com.goafanti.common.enums.PatentCostFields;
|
|
|
+import com.goafanti.common.enums.PatentFundsStatus;
|
|
|
import com.goafanti.common.enums.PatentInfoFields;
|
|
|
import com.goafanti.common.enums.PatentInfoStatus;
|
|
|
import com.goafanti.common.enums.PatentRegistrationFields;
|
|
|
+import com.goafanti.common.enums.PatentReimbursementStatus;
|
|
|
import com.goafanti.common.model.Admin;
|
|
|
import com.goafanti.common.model.AftFile;
|
|
|
import com.goafanti.common.model.OrgRatepay;
|
|
|
@@ -59,6 +64,7 @@ import com.goafanti.common.utils.LoggerUtils;
|
|
|
import com.goafanti.common.utils.StringUtils;
|
|
|
import com.goafanti.core.mybatis.page.Pagination;
|
|
|
import com.goafanti.core.shiro.token.TokenManager;
|
|
|
+import com.goafanti.dataGlossory.service.DistrictGlossoryService;
|
|
|
import com.goafanti.patent.bo.InputPatentCost;
|
|
|
import com.goafanti.patent.bo.InputPatentInfo;
|
|
|
import com.goafanti.patent.bo.InputPatentRegistration;
|
|
|
@@ -97,6 +103,8 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
private OrgRatepayService orgRatepayService;
|
|
|
@Resource
|
|
|
private OrganizationIdentityService organizationIdentityService;
|
|
|
+ @Resource
|
|
|
+ private DistrictGlossoryService districtGlossoryService;
|
|
|
|
|
|
@Value(value = "${aesSecretKey}")
|
|
|
private String secretKey = null;
|
|
|
@@ -861,8 +869,6 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
|
|
|
/**
|
|
|
* 专利申请费用管理报表导出
|
|
|
- *
|
|
|
- * @throws ParseException
|
|
|
*/
|
|
|
@SuppressWarnings("unchecked")
|
|
|
@RequestMapping(value = "/exportApplicationFee", method = RequestMethod.GET)
|
|
|
@@ -918,66 +924,43 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
// 专利申请费用管理报表
|
|
|
private void exportFees(HttpServletResponse response, List<PatentApplicationFeeBo> fees) {
|
|
|
String sheetName = "专利申请费用管理报表";
|
|
|
- HSSFWorkbook workbook = createWorkbook(sheetName, new String[] { "编号", "申请号/专利号", "省份", "公司名称", "专利名称", "缴费状态",
|
|
|
- "申请费", "实审费", "文印费", "是否请款", "是否报销", "申请日", "缴费截止时间" });
|
|
|
+ HSSFWorkbook workbook = createWorkbook(sheetName,
|
|
|
+ new String[] { "编号", "申请号/专利号", "省份", "公司名称", "专利名称", "缴费状态", "申请费", "是否请款", "是否报销", "申请日", "缴费截止时间" });
|
|
|
|
|
|
HSSFSheet sheet = workbook.getSheet(sheetName);
|
|
|
|
|
|
for (int i = 0; i < fees.size(); i++) {
|
|
|
PatentApplicationFeeBo obj = fees.get(i);
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
- if (null == obj.getSerialNumber()) {
|
|
|
- row.createCell(0).setCellValue("");
|
|
|
- } else {
|
|
|
- row.createCell(0).setCellValue(obj.getSerialNumber());
|
|
|
- }
|
|
|
+ row.createCell(0).setCellValue(null == obj.getSerialNumber() ? "" : obj.getSerialNumber().toString());
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
- row.createCell(2).setCellValue(obj.getLocationProvince());
|
|
|
+ Integer locationProvince = obj.getLocationProvince();
|
|
|
+ row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
row.createCell(3).setCellValue(obj.getUnitName());
|
|
|
row.createCell(4).setCellValue(obj.getPatentName());
|
|
|
- if (null != obj.getPaymentState()) {
|
|
|
- switch (obj.getPaymentState()) {
|
|
|
- case 0:
|
|
|
- row.createCell(5).setCellValue("未缴费");
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- row.createCell(5).setCellValue("已缴费");
|
|
|
- }
|
|
|
+ Integer paymentState = obj.getPaymentState();
|
|
|
+ if (null != paymentState && PatentApplicationFeeStatus.PAID.getCode().equals(paymentState)) {
|
|
|
+ row.createCell(5).setCellValue(PatentApplicationFeeStatus.PAID.getDesc());
|
|
|
} else {
|
|
|
- row.createCell(5).setCellValue("未缴费");
|
|
|
+ row.createCell(5).setCellValue(PatentApplicationFeeStatus.UNPAID.getDesc());
|
|
|
}
|
|
|
row.createCell(6).setCellValue(null == obj.getApplicationFee() ? 0 : obj.getApplicationFee());
|
|
|
- row.createCell(7).setCellValue(null == obj.getTrialFee() ? 0 : obj.getTrialFee());
|
|
|
- row.createCell(8).setCellValue(null == obj.getPrintingFee() ? 0 : obj.getPrintingFee());
|
|
|
-
|
|
|
- if (null != obj.getFunds()) {
|
|
|
- switch (obj.getFunds()) {
|
|
|
- case 0:
|
|
|
- row.createCell(9).setCellValue("否");
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- row.createCell(9).setCellValue("是");
|
|
|
- }
|
|
|
+ Integer funds = obj.getFunds();
|
|
|
+ if (null != funds && PatentFundsStatus.YES.getCode().equals(funds)) {
|
|
|
+ row.createCell(7).setCellValue(PatentFundsStatus.YES.getDesc());
|
|
|
} else {
|
|
|
- row.createCell(9).setCellValue("否");
|
|
|
+ row.createCell(7).setCellValue(PatentFundsStatus.NO.getDesc());
|
|
|
}
|
|
|
-
|
|
|
- if (null != obj.getReimbursement()) {
|
|
|
- switch (obj.getReimbursement()) {
|
|
|
- case 0:
|
|
|
- row.createCell(10).setCellValue("否");
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- row.createCell(10).setCellValue("是");
|
|
|
- }
|
|
|
+ Integer reimbursement = obj.getReimbursement();
|
|
|
+ if (null != reimbursement && PatentReimbursementStatus.YES.getCode().equals(reimbursement)) {
|
|
|
+ row.createCell(8).setCellValue(PatentReimbursementStatus.YES.getDesc());
|
|
|
} else {
|
|
|
- row.createCell(10).setCellValue("否");
|
|
|
+ row.createCell(8).setCellValue(PatentReimbursementStatus.NO.getDesc());
|
|
|
}
|
|
|
|
|
|
- row.createCell(11).setCellValue(obj.getPatentApplicationDateFormattedDate());
|
|
|
- row.createCell(12).setCellValue(null == obj.getPatentApplicationDateFormattedDate() ? ""
|
|
|
+ row.createCell(9).setCellValue(obj.getPatentApplicationDateFormattedDate());
|
|
|
+ row.createCell(10).setCellValue(null == obj.getPatentApplicationDateFormattedDate() ? ""
|
|
|
: calDeadline(obj.getPatentApplicationDateFormattedDate()));
|
|
|
-
|
|
|
}
|
|
|
FileUtils.downloadExcel(response, sheetName + Calendar.getInstance().getTimeInMillis() + ".xls", workbook);
|
|
|
}
|
|
|
@@ -993,47 +976,38 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
for (int i = 0; i < pendings.size(); i++) {
|
|
|
PatentPendingBo obj = pendings.get(i);
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
- if (null == obj.getSerialNumber()) {
|
|
|
- row.createCell(0).setCellValue("");
|
|
|
- } else {
|
|
|
- row.createCell(0).setCellValue(obj.getSerialNumber());
|
|
|
- }
|
|
|
+ row.createCell(0).setCellValue(null == obj.getSerialNumber() ? "" : obj.getSerialNumber().toString());
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
- row.createCell(2).setCellValue(obj.getLocationProvince());
|
|
|
+ Integer locationProvince = obj.getLocationProvince();
|
|
|
+ row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
row.createCell(3).setCellValue(obj.getUnitName());
|
|
|
- if (null != obj.getPatentCatagory()) {
|
|
|
- switch (obj.getPatentCatagory()) {
|
|
|
- case 0:
|
|
|
- row.createCell(4).setCellValue("发明型专利");
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- row.createCell(4).setCellValue("科技型专利");
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- row.createCell(4).setCellValue("外观型专利");
|
|
|
- break;
|
|
|
+ Integer patentCatagory = obj.getPatentCatagory();
|
|
|
+ if (null != patentCatagory) {
|
|
|
+ if (PatentCategoryStatus.OTHER.getCode().equals(patentCatagory)) {
|
|
|
+ row.createCell(4).setCellValue(PatentCategoryStatus.OTHER.getDesc());
|
|
|
+ } else if (PatentCategoryStatus.UTILITY.getCode().equals(patentCatagory)) {
|
|
|
+ row.createCell(4).setCellValue(PatentCategoryStatus.UTILITY.getDesc());
|
|
|
+ } else if (PatentCategoryStatus.DESIGN.getCode().equals(patentCatagory)) {
|
|
|
+ row.createCell(4).setCellValue(PatentCategoryStatus.DESIGN.getDesc());
|
|
|
+ } else if (PatentCategoryStatus.INVENTION.getCode().equals(patentCatagory)) {
|
|
|
+ row.createCell(4).setCellValue(PatentCategoryStatus.INVENTION.getDesc());
|
|
|
}
|
|
|
} else {
|
|
|
row.createCell(4).setCellValue("");
|
|
|
}
|
|
|
row.createCell(5).setCellValue(obj.getPatentName());
|
|
|
row.createCell(6).setCellValue(null == obj.getPatentState() ? "" : switchPatState(obj.getPatentState()));
|
|
|
- if (null != obj.getAnnualFeeState()) {
|
|
|
- switch (obj.getAnnualFeeState()) {
|
|
|
- case 0:
|
|
|
- row.createCell(7).setCellValue("未缴费");
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- row.createCell(7).setCellValue("已缴费");
|
|
|
- break;
|
|
|
- }
|
|
|
+ Integer annualFeeState = obj.getAnnualFeeState();
|
|
|
+ if (null != annualFeeState && PatentAnnualFeeStatus.PAID.getCode().equals(annualFeeState)) {
|
|
|
+ row.createCell(7).setCellValue(PatentAnnualFeeStatus.PAID.getDesc());
|
|
|
} else {
|
|
|
- row.createCell(7).setCellValue("未缴费");
|
|
|
+ row.createCell(7).setCellValue(PatentAnnualFeeStatus.UNPAID.getDesc());
|
|
|
}
|
|
|
row.createCell(8).setCellValue(null == obj.getAuthorizedDateFormattedDate() ? ""
|
|
|
: calDeadline(obj.getAuthorizedDateFormattedDate()));
|
|
|
|
|
|
}
|
|
|
+
|
|
|
FileUtils.downloadExcel(response, sheetName + Calendar.getInstance().getTimeInMillis() + ".xls", workbook);
|
|
|
}
|
|
|
|
|
|
@@ -1047,22 +1021,18 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
for (int i = 0; i < composites.size(); i++) {
|
|
|
PatentManageListBo obj = composites.get(i);// 遍历每个对象
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
- if (null == obj.getSerialNumber()) {
|
|
|
- row.createCell(0).setCellValue("");
|
|
|
- } else {
|
|
|
- row.createCell(0).setCellValue(obj.getSerialNumber());
|
|
|
- }
|
|
|
+ row.createCell(0).setCellValue(null == obj.getSerialNumber() ? "" : obj.getSerialNumber().toString());
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
row.createCell(2).setCellValue(obj.getOffice());
|
|
|
- row.createCell(3).setCellValue(obj.getLocationProvince());
|
|
|
+ Integer locationProvince = obj.getLocationProvince();
|
|
|
+ row.createCell(3).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
row.createCell(4).setCellValue(obj.getUnitName());
|
|
|
row.createCell(5).setCellValue(obj.getPatentName());
|
|
|
row.createCell(6).setCellValue(null == obj.getPatentState() ? "" : switchPatState(obj.getPatentState()));
|
|
|
- row.createCell(7).setCellValue(null == obj.getPatentState() ? "" : switchPatState(obj.getPatentState()));
|
|
|
- row.createCell(8).setCellValue(obj.getCreateTimeFormattedDate());
|
|
|
+ row.createCell(7).setCellValue(obj.getCreateTimeFormattedDate());
|
|
|
+ row.createCell(8).setCellValue(obj.getPatentApplicationFormattedDate());
|
|
|
row.createCell(9).setCellValue(obj.getPatentApplicationFormattedDate());
|
|
|
- row.createCell(10).setCellValue(obj.getPatentApplicationFormattedDate());
|
|
|
- row.createCell(11).setCellValue(obj.getAuthor());
|
|
|
+ row.createCell(10).setCellValue(obj.getAuthor());
|
|
|
}
|
|
|
FileUtils.downloadExcel(response, sheetName + Calendar.getInstance().getTimeInMillis() + ".xls", workbook);
|
|
|
|
|
|
@@ -1169,52 +1139,38 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
// 专利状态
|
|
|
private String switchPatState(Integer s) {
|
|
|
String state = "";
|
|
|
- switch (s) {
|
|
|
- case 0:
|
|
|
- state = "申请";
|
|
|
- break;
|
|
|
- case 1:
|
|
|
- state = "签单";
|
|
|
- break;
|
|
|
- case 2:
|
|
|
- state = "派单";
|
|
|
- break;
|
|
|
- case 3:
|
|
|
- state = "流转";
|
|
|
- break;
|
|
|
- case 4:
|
|
|
- state = "撰写";
|
|
|
- break;
|
|
|
- case 5:
|
|
|
- state = "受理";
|
|
|
- break;
|
|
|
- case 6:
|
|
|
- state = "审查意见通知";
|
|
|
- break;
|
|
|
- case 7:
|
|
|
- state = "审查意见已答复";
|
|
|
- break;
|
|
|
- case 8:
|
|
|
- state = "补正通知";
|
|
|
- break;
|
|
|
- case 9:
|
|
|
- state = "补正已答复";
|
|
|
- break;
|
|
|
- case 10:
|
|
|
- state = "授权";
|
|
|
- break;
|
|
|
- case 11:
|
|
|
- state = "驳回";
|
|
|
- break;
|
|
|
- case 12:
|
|
|
- state = "发证";
|
|
|
- break;
|
|
|
- case 13:
|
|
|
- state = "已结款";
|
|
|
- break;
|
|
|
- case 14:
|
|
|
- state = "退单";
|
|
|
- break;
|
|
|
+ if (PatentInfoStatus.CREATE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CREATE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.SIGN.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.SIGN.getDesc();
|
|
|
+ } else if (PatentInfoStatus.DELIVERD.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.DELIVERD.getDesc();
|
|
|
+ } else if (PatentInfoStatus.CIRCULATION.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CIRCULATION.getDesc();
|
|
|
+ } else if (PatentInfoStatus.COMPOSE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.COMPOSE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.ACCEPT.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.ACCEPT.getDesc();
|
|
|
+ } else if (PatentInfoStatus.REVIEWNOTICE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.REVIEWNOTICE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.REVIEWREPLY.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.REVIEWREPLY.getDesc();
|
|
|
+ } else if (PatentInfoStatus.CORRECTIONNOTICE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CORRECTIONNOTICE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.CORRECTIONREPLY.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CORRECTIONREPLY.getDesc();
|
|
|
+ } else if (PatentInfoStatus.AUTHORIZE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.AUTHORIZE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.REJECT.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.REJECT.getDesc();
|
|
|
+ } else if (PatentInfoStatus.LICENSE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.LICENSE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.SETTLEMENT.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.SETTLEMENT.getDesc();
|
|
|
+ } else if (PatentInfoStatus.CREATE.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CREATE.getDesc();
|
|
|
+ } else if (PatentInfoStatus.CALLBACK.getCode().equals(s)) {
|
|
|
+ state = PatentInfoStatus.CALLBACK.getDesc();
|
|
|
}
|
|
|
return state;
|
|
|
}
|
|
|
@@ -1295,5 +1251,9 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
}
|
|
|
return status;
|
|
|
}
|
|
|
+
|
|
|
+ private String getProvince(Integer province){
|
|
|
+ return districtGlossoryService.selectByPrimaryKey(province).getName();
|
|
|
+ }
|
|
|
|
|
|
}
|