|
|
@@ -5,6 +5,7 @@ import java.text.ParseException;
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Calendar;
|
|
|
import java.util.Date;
|
|
|
+import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
|
import java.util.TreeMap;
|
|
|
@@ -52,6 +53,7 @@ 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.DistrictGlossory;
|
|
|
import com.goafanti.common.model.OrgRatepay;
|
|
|
import com.goafanti.common.model.OrganizationIdentity;
|
|
|
import com.goafanti.common.model.PatentCost;
|
|
|
@@ -928,14 +930,14 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
new String[] { "编号", "申请号/专利号", "省份", "公司名称", "专利名称", "缴费状态", "申请费", "是否请款", "是否报销", "申请日", "缴费截止时间" });
|
|
|
|
|
|
HSSFSheet sheet = workbook.getSheet(sheetName);
|
|
|
-
|
|
|
+ Map<Integer, DistrictGlossory> districtMap = getProvinces();
|
|
|
for (int i = 0; i < fees.size(); i++) {
|
|
|
PatentApplicationFeeBo obj = fees.get(i);
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
row.createCell(0).setCellValue(null == obj.getSerialNumber() ? "" : obj.getSerialNumber().toString());
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
Integer locationProvince = obj.getLocationProvince();
|
|
|
- row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
+ row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(districtMap, locationProvince));
|
|
|
row.createCell(3).setCellValue(obj.getUnitName());
|
|
|
row.createCell(4).setCellValue(obj.getPatentName());
|
|
|
Integer paymentState = obj.getPaymentState();
|
|
|
@@ -972,14 +974,14 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
new String[] { "编号", "申请号/专利号", "省份", "公司名称", "专利类型", "专利名称", "专利状态", "缴费状态", "缴费截止日期" });
|
|
|
|
|
|
HSSFSheet sheet = workbook.getSheet(sheetName);
|
|
|
-
|
|
|
+ Map<Integer, DistrictGlossory> districtMap = getProvinces();
|
|
|
for (int i = 0; i < pendings.size(); i++) {
|
|
|
PatentPendingBo obj = pendings.get(i);
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
row.createCell(0).setCellValue(null == obj.getSerialNumber() ? "" : obj.getSerialNumber().toString());
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
Integer locationProvince = obj.getLocationProvince();
|
|
|
- row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
+ row.createCell(2).setCellValue(null == locationProvince ? "" : getProvince(districtMap, locationProvince));
|
|
|
row.createCell(3).setCellValue(obj.getUnitName());
|
|
|
Integer patentCatagory = obj.getPatentCatagory();
|
|
|
if (null != patentCatagory) {
|
|
|
@@ -1018,6 +1020,7 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
HSSFSheet sheet = workbook.getSheet(sheetName);
|
|
|
|
|
|
// 将查询出的数据设置到sheet对应的单元格中
|
|
|
+ Map<Integer, DistrictGlossory> districtMap = getProvinces();
|
|
|
for (int i = 0; i < composites.size(); i++) {
|
|
|
PatentManageListBo obj = composites.get(i);// 遍历每个对象
|
|
|
HSSFRow row = sheet.createRow(i + 2);// 创建所需的行数
|
|
|
@@ -1025,7 +1028,7 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
row.createCell(1).setCellValue(obj.getPatentNumber());
|
|
|
row.createCell(2).setCellValue(obj.getOffice());
|
|
|
Integer locationProvince = obj.getLocationProvince();
|
|
|
- row.createCell(3).setCellValue(null == locationProvince ? "" : getProvince(locationProvince));
|
|
|
+ row.createCell(3).setCellValue(null == locationProvince ? "" : getProvince(districtMap, locationProvince));
|
|
|
row.createCell(4).setCellValue(obj.getUnitName());
|
|
|
row.createCell(5).setCellValue(obj.getPatentName());
|
|
|
row.createCell(6).setCellValue(null == obj.getPatentState() ? "" : switchPatState(obj.getPatentState()));
|
|
|
@@ -1251,9 +1254,18 @@ public class AdminPatentApiController extends CertifyApiController {
|
|
|
}
|
|
|
return status;
|
|
|
}
|
|
|
-
|
|
|
- private String getProvince(Integer province){
|
|
|
- return districtGlossoryService.selectByPrimaryKey(province).getName();
|
|
|
+
|
|
|
+ private String getProvince(Map<Integer, DistrictGlossory> districtMap, Integer province) {
|
|
|
+ DistrictGlossory dg = districtMap.get(province);
|
|
|
+ return dg == null ? "未知地区" : dg.getName();
|
|
|
}
|
|
|
|
|
|
+ private Map<Integer, DistrictGlossory> getProvinces() {
|
|
|
+ List<DistrictGlossory> districts = districtGlossoryService.list(0);
|
|
|
+ Map<Integer, DistrictGlossory> districtMap = new HashMap<>();
|
|
|
+ for (DistrictGlossory dg : districts) {
|
|
|
+ districtMap.put(dg.getId(), dg);
|
|
|
+ }
|
|
|
+ return districtMap;
|
|
|
+ }
|
|
|
}
|