|
|
@@ -347,7 +347,6 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
|
|
|
d30++;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
if (Func.notNull(shouquanRq) && shouquanRq.before(dateMax) && shouquanRq.after(dateMin)) {
|
|
|
d32++;
|
|
|
}
|
|
|
@@ -1143,62 +1142,74 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
|
|
|
//(一)自主知识产权情况
|
|
|
List<CgZlEntity> zlList = zlMapper.selectList(Wrappers.<CgZlEntity>lambdaQuery().eq(CgZlEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
|
|
|
- int qj55 = 0, qj56 = 0, qj56_1 = 0, qj55_1 = 0, qj55_2 = 0, qj74 = 0, qj57 = 0, qj57_1 = 0, qj75 = 0, qj83=0;
|
|
|
- Date dateMin = DateUtil.parse(year + "-01-01", DateUtil.PATTERN_DATE);
|
|
|
+ Date dateMin = DateUtil.parse(year + "-01-01", DateUtil.PATTERN_DATE);
|
|
|
Date dateMax = DateUtil.parse(year + "-12-31", DateUtil.PATTERN_DATE);
|
|
|
- for (CgZlEntity zl : zlList) {
|
|
|
- Date shenqingRq = zl.getShenqingRq();
|
|
|
- Date shouquanRq = zl.getShouquanRq();
|
|
|
- if (Func.notNull(shenqingRq)) {
|
|
|
- if (Func.equals(year, DateUtil.format(shenqingRq, DateUtil.PATTERN_YYYY))) {
|
|
|
- if (Func.equals("发明专利", zl.getZllx())) {
|
|
|
- qj56++;
|
|
|
- if (Func.equals("国内", zl.getGb())) {
|
|
|
- qj56_1++;
|
|
|
- }
|
|
|
- }
|
|
|
- if (Func.equals("境外(欧美日)", zl.getGb())) {
|
|
|
- qj55_1++;
|
|
|
- }
|
|
|
- if (Func.equals("PCT国际专利", zl.getGb())) {
|
|
|
- qj55_2++;
|
|
|
- }
|
|
|
- qj55++;
|
|
|
- }
|
|
|
- }
|
|
|
- if (Func.notNull(shouquanRq)) {
|
|
|
- if (Func.equals(year, DateUtil.format(shouquanRq, DateUtil.PATTERN_YYYY))) {
|
|
|
- if (Func.equals("发明专利", zl.getZllx())) {
|
|
|
- qj57++;
|
|
|
- if (Func.equals("国内", zl.getGb())) {
|
|
|
- qj57_1++;
|
|
|
- }
|
|
|
- }
|
|
|
- if (Func.equals("境外(欧美日)", zl.getGb())) {
|
|
|
- qj75++;
|
|
|
- }
|
|
|
- qj74++;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if (Func.notNull(shouquanRq) && shouquanRq.before(dateMax) && shouquanRq.after(dateMin)) {
|
|
|
- qj83++;
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
- vo.setQj55(qj55);
|
|
|
- vo.setQj56(qj56);
|
|
|
- vo.setQj56_1(qj56_1);
|
|
|
- vo.setQj55_1(qj55_1);
|
|
|
- vo.setQj55_2(qj55_2);
|
|
|
-
|
|
|
- vo.setQj74(qj74);
|
|
|
- vo.setQj57(qj57);
|
|
|
- vo.setQj57_1(qj57_1);
|
|
|
- vo.setQj75(qj75);
|
|
|
-
|
|
|
|
|
|
+ vo.setQj55(zlList.stream().filter(zl -> Func.notNull(zl.getShenqingRq()) && zl.getShenqingRq().before(dateMax) && zl.getShenqingRq().after(dateMin)).count());
|
|
|
+ vo.setQj56(zlList.stream().filter(zl -> Func.notNull(zl.getShenqingRq()) && zl.getShenqingRq().before(dateMax) && zl.getShenqingRq().after(dateMin) && Func.equals("发明专利", zl.getZllx())).count());
|
|
|
+ vo.setQj56_1(zlList.stream().filter(zl -> Func.notNull(zl.getShenqingRq()) && zl.getShenqingRq().before(dateMax) && zl.getShenqingRq().after(dateMin) && Func.equals("发明专利", zl.getZllx()) && Func.equals("国内", zl.getGb())).count());
|
|
|
+ vo.setQj55_1(zlList.stream().filter(zl -> Func.notNull(zl.getShenqingRq()) && zl.getShenqingRq().before(dateMax) && zl.getShenqingRq().after(dateMin) && Func.equals("境外(欧美日)", zl.getGb())).count());
|
|
|
+ vo.setQj55_2(zlList.stream().filter(zl -> Func.notNull(zl.getShenqingRq()) && zl.getShenqingRq().before(dateMax) && zl.getShenqingRq().after(dateMin) && Func.equals("PCT国际专利", zl.getGb())).count());
|
|
|
+
|
|
|
+ vo.setQj74(zlList.stream().filter(zl -> Func.notNull(zl.getShouquanRq()) && zl.getShouquanRq().before(dateMax) && zl.getShouquanRq().after(dateMin)).count());
|
|
|
+ vo.setQj57(zlList.stream().filter(zl -> Func.notNull(zl.getShouquanRq()) && zl.getShouquanRq().before(dateMax) && zl.getShouquanRq().after(dateMin) && Func.equals("发明专利", zl.getZllx())).count());
|
|
|
+ vo.setQj57_1(zlList.stream().filter(zl -> Func.notNull(zl.getShouquanRq()) && zl.getShouquanRq().before(dateMax) && zl.getShouquanRq().after(dateMin) && Func.equals("发明专利", zl.getZllx()) && Func.equals("国内", zl.getGb())).count());
|
|
|
+ vo.setQj75(zlList.stream().filter(zl -> Func.notNull(zl.getShouquanRq()) && zl.getShouquanRq().before(dateMax) && zl.getShouquanRq().after(dateMin) && Func.equals("境外(欧美日)", zl.getGb())).count());
|
|
|
+
|
|
|
+ vo.setQj83(zlList.stream().filter(zl -> Func.notNull(zl.getShouquanRq()) && zl.getShouquanRq().before(dateMax) && zl.getShouquanRq().after(dateMin)).count());
|
|
|
+
|
|
|
+ //(三)其他情况
|
|
|
+ //发表科技论文
|
|
|
+ List<CgKylwEntity> kylwList = kylwMapper.selectList(Wrappers.<CgKylwEntity>lambdaQuery().eq(CgKylwEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
+ vo.setQi25(Func.isEmpty(kylwList)?0:kylwList.size());
|
|
|
+ //拥有软件著作权
|
|
|
+ List<CgRjzzqEntity> rjzzqList = rjzzqMapper.selectList(Wrappers.<CgRjzzqEntity>lambdaQuery().eq(CgRjzzqEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
+ vo.setQj85(Func.isEmpty(rjzzqList)?0:rjzzqList.size());
|
|
|
+ //其中:当年获得软件著作权
|
|
|
+ vo.setQj85_1(rjzzqList.stream().filter(item -> Func.notNull(item.getDjpzrq()) && item.getDjpzrq().before(dateMax) && item.getDjpzrq().after(dateMin)).count());
|
|
|
+ //拥有集成电路布图
|
|
|
+ List<CgQtEntity> qtList = qtMapper.selectList(Wrappers.<CgQtEntity>lambdaQuery().eq(CgQtEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
+ vo.setQj86(qtList.stream().filter(item -> Func.notNull(item.getShouquanRq()) && Func.equals(item.getCmlx(), "集成电路布图设计专有权")).count());
|
|
|
+ //其中:当年获得集成电路布图
|
|
|
+ vo.setQj86_1(qtList.stream().filter(item -> Func.notNull(item.getShouquanRq()) && Func.equals(item.getCmlx(), "集成电路布图设计专有权") && item.getShouquanRq().before(dateMax) && item.getShouquanRq().after(dateMin)).count());
|
|
|
+ //拥有植物新品种
|
|
|
+ vo.setQj87(qtList.stream().filter(item -> Func.equals(item.getCmlx(), "植物新品种")).count());
|
|
|
+ vo.setQj87_1(qtList.stream().filter(item -> Func.notNull(item.getShouquanRq()) && Func.equals(item.getCmlx(), "植物新品种") && item.getShouquanRq().before(dateMax) && item.getShouquanRq().after(dateMin)).count());
|
|
|
+ //拥有国家一类新药品种
|
|
|
+ vo.setQj101(qtList.stream().filter(item -> Func.equals(item.getCmlx(), "国家新药")).count());
|
|
|
+ vo.setQj101_1(qtList.stream().filter(item -> Func.notNull(item.getShouquanRq()) && Func.equals(item.getCmlx(), "国家新药") && item.getShouquanRq().before(dateMax) && item.getShouquanRq().after(dateMin)).count());
|
|
|
+ //拥有国家一级中药保护品种
|
|
|
+ vo.setQj100(qtList.stream().filter(item -> Func.equals(item.getCmlx(), "国家一级中药保护品种")).count());
|
|
|
+ vo.setQj100_1(qtList.stream().filter(item -> Func.notNull(item.getShouquanRq()) && Func.equals(item.getCmlx(), "国家一级中药保护品种") && item.getShouquanRq().before(dateMax) && item.getShouquanRq().after(dateMin)).count());
|
|
|
+ //累计形成国际标准
|
|
|
+ List<CgJsbzEntity> jsbzList = jsbzMapper.selectList(Wrappers.<CgJsbzEntity>lambdaQuery().eq(CgJsbzEntity::getTenantId, SecureUtil.getTenantId()));
|
|
|
+ vo.setQj98(jsbzList.stream().filter(item -> Func.equals(item.getBzlb(), "国际标准")).count());
|
|
|
+ vo.setQj98_1(jsbzList.stream().filter(item -> Func.notNull(item.getSsrq()) && Func.equals(item.getBzlb(), "国际标准") && Func.equals(item.getState(), "现行有效") && item.getSsrq().before(dateMax) && item.getSsrq().after(dateMin)).count());
|
|
|
+ //累计形成国家或行业标准
|
|
|
+ vo.setQi27(jsbzList.stream().filter(item -> Func.equals(item.getBzlb(), "国家标准") || Func.equals(item.getBzlb(), "行业标准")).count());
|
|
|
+ vo.setQi27_1(jsbzList.stream().filter(item -> Func.notNull(item.getSsrq()) && Func.equals(item.getBzlb(), "国家标准") || Func.equals(item.getBzlb(), "行业标准") && Func.equals(item.getState(), "现行有效") && item.getSsrq().before(dateMax) && item.getSsrq().after(dateMin)).count());
|
|
|
return vo;
|
|
|
}
|
|
|
|
|
|
+ @SneakyThrows
|
|
|
+ @Override
|
|
|
+ public void exportTorchDevYB(HttpServletResponse response, String year) {
|
|
|
+ InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/对外报表管理/火炬发展年报.xlsx");
|
|
|
+ response.setContentType("application/vnd.ms-excel");
|
|
|
+ response.setCharacterEncoding("utf-8");
|
|
|
+ response.addHeader("Content-Disposition", "attachment;filename=" + URLEncoder.encode("火炬发展年报.xlsx", Charsets.UTF_8));
|
|
|
+ ExcelWriter excelWriter = EasyExcel.write(response.getOutputStream())
|
|
|
+ .withTemplate((templateFileName))
|
|
|
+ .excelType(ExcelTypeEnum.XLSX)
|
|
|
+ .build();
|
|
|
+ TorchDevYBVO torchDevYBVO = this.torchDevYB(year);
|
|
|
+ WriteSheet writeSheet = EasyExcel.writerSheet().build();
|
|
|
+ FillConfig fillConfig = FillConfig.builder().forceNewRow(Boolean.TRUE).build();
|
|
|
+ //设置list集合数据
|
|
|
+ excelWriter.fill(torchDevYBVO, fillConfig, writeSheet);
|
|
|
+ excelWriter.finish();
|
|
|
+ if (templateFileName != null) {
|
|
|
+ templateFileName.close();
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|