Browse Source

000000004

zhoulisky 7 months ago
parent
commit
0b8ebd46d7

+ 6 - 0
kd-ops-api/kd-resource-api/src/main/java/org/sky/resource/pojo/entity/Attach.java

@@ -21,6 +21,9 @@ public class Attach extends TenantEntity {
 	@Serial
 	@Serial
 	private static final long serialVersionUID = 1L;
 	private static final long serialVersionUID = 1L;
 
 
+	@Schema(description = "附件标题,根据该字段查询附件信息")
+	private String title;
+
 	/**
 	/**
 	 * 附件地址
 	 * 附件地址
 	 */
 	 */
@@ -52,5 +55,8 @@ public class Attach extends TenantEntity {
 	@Schema(description = "附件大小")
 	@Schema(description = "附件大小")
 	private Long attachSize;
 	private Long attachSize;
 
 
+	@Schema(description = "备注")
+	private String remark;
+
 
 
 }
 }

+ 34 - 6
kd-ops/kd-resource/src/main/java/org/sky/resource/endpoint/OssEndpoint.java

@@ -17,7 +17,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 
 /**
 /**
  * 对象存储端点
  * 对象存储端点
- *
  */
  */
 @NonDS
 @NonDS
 @RestController
 @RestController
@@ -160,6 +159,22 @@ public class OssEndpoint {
 	}
 	}
 
 
 	/**
 	/**
+	 * 上传文件并关联至已有附件
+	 *
+	 * @param file 文件
+	 * @return ObjectStat
+	 */
+	@SneakyThrows
+	@PostMapping("/put-file-attach-exist")
+	public R<KdFile> putFileAttach(@RequestParam MultipartFile file, @RequestParam Long attachId) {
+		String fileName = file.getOriginalFilename();
+		KdFile kdFile = ossBuilder.template().putFile(fileName, file.getInputStream());
+		buildAttach(attachId, fileName, file.getSize(), kdFile);
+		kdFile.setAttachId(attachId);
+		return R.data(kdFile);
+	}
+
+	/**
 	 * 上传文件并保存至附件表
 	 * 上传文件并保存至附件表
 	 *
 	 *
 	 * @param fileName 存储桶对象名称
 	 * @param fileName 存储桶对象名称
@@ -178,9 +193,9 @@ public class OssEndpoint {
 	/**
 	/**
 	 * 构建附件表
 	 * 构建附件表
 	 *
 	 *
-	 * @param fileName  文件名
-	 * @param fileSize  文件大小
-	 * @param kdFile 对象存储文件
+	 * @param fileName 文件名
+	 * @param fileSize 文件大小
+	 * @param kdFile   对象存储文件
 	 * @return attachId
 	 * @return attachId
 	 */
 	 */
 	private Long buildAttach(String fileName, Long fileSize, KdFile kdFile) {
 	private Long buildAttach(String fileName, Long fileSize, KdFile kdFile) {
@@ -196,6 +211,19 @@ public class OssEndpoint {
 		return attach.getId();
 		return attach.getId();
 	}
 	}
 
 
+	private boolean buildAttach(Long attachId, String fileName, Long fileSize, KdFile kdFile) {
+		String fileExtension = FileUtil.getFileExtension(fileName);
+		Attach attach = new Attach();
+		attach.setId(attachId);
+		attach.setDomainUrl(kdFile.getDomain());
+		attach.setLink(kdFile.getLink());
+		attach.setName(kdFile.getName());
+		attach.setOriginalName(kdFile.getOriginalName());
+		attach.setAttachSize(fileSize);
+		attach.setExtension(fileExtension);
+		return attachService.updateById(attach);
+	}
+
 	/**
 	/**
 	 * 删除文件
 	 * 删除文件
 	 *
 	 *
@@ -203,7 +231,7 @@ public class OssEndpoint {
 	 * @return R
 	 * @return R
 	 */
 	 */
 	@SneakyThrows
 	@SneakyThrows
- 	@PostMapping("/remove-file")
+	@PostMapping("/remove-file")
 	public R removeFile(@RequestParam String fileName) {
 	public R removeFile(@RequestParam String fileName) {
 		ossBuilder.template().removeFile(fileName);
 		ossBuilder.template().removeFile(fileName);
 		return R.success("操作成功");
 		return R.success("操作成功");
@@ -216,7 +244,7 @@ public class OssEndpoint {
 	 * @return R
 	 * @return R
 	 */
 	 */
 	@SneakyThrows
 	@SneakyThrows
- 	@PostMapping("/remove-files")
+	@PostMapping("/remove-files")
 	public R removeFiles(@RequestParam String fileNames) {
 	public R removeFiles(@RequestParam String fileNames) {
 		ossBuilder.template().removeFiles(Func.toStrList(fileNames));
 		ossBuilder.template().removeFiles(Func.toStrList(fileNames));
 		return R.success("操作成功");
 		return R.success("操作成功");

+ 2 - 0
kd-ops/kd-resource/src/main/java/org/sky/resource/mapper/AttachMapper.xml

@@ -18,6 +18,8 @@
         <result column="original_name" property="originalName"/>
         <result column="original_name" property="originalName"/>
         <result column="extension" property="extension"/>
         <result column="extension" property="extension"/>
         <result column="attach_size" property="attachSize"/>
         <result column="attach_size" property="attachSize"/>
+        <result column="title" property="title"/>
+        <result column="remark" property="remark"/>
     </resultMap>
     </resultMap>
 
 
 
 

+ 141 - 0
kd-service-api/kd-scientific-api/src/main/java/org/sky/scientific/pojo/vo/TorchDevYBVO.java

@@ -5,6 +5,7 @@ import lombok.Data;
 
 
 import java.io.Serializable;
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigDecimal;
+import java.util.List;
 
 
 @Data
 @Data
 public class TorchDevYBVO implements Serializable {
 public class TorchDevYBVO implements Serializable {
@@ -21,4 +22,144 @@ public class TorchDevYBVO implements Serializable {
 	@Schema(description = "享受高新技术企业所得税减免")
 	@Schema(description = "享受高新技术企业所得税减免")
 	private BigDecimal qc20_1;
 	private BigDecimal qc20_1;
 
 
+	@Schema(description = "研究开发项目概况")
+	private List<A107_1VO> a1071;
+
+ 	@Schema(description = "研究开发人员合计")
+	private Integer qj09 = 0;
+	@Schema(description = "其中:管理和服务人员")
+	private Integer qj68=0;
+	@Schema(description = "其中:全职人员")
+	private Integer qj09_1 = 0;
+	@Schema(description = "其中:本科毕业及以上人员")
+	private Integer qj09_2 = 0;
+	@Schema(description = "其中:外聘人员")
+	private Integer qj09_3 = 0;
+
+ 	@Schema(description = "研究开发费用合计")
+	private BigDecimal qj20 = BigDecimal.ZERO;
+	@Schema(description = "1.人员人工费用")
+	private BigDecimal qj23_1 = BigDecimal.ZERO;
+	@Schema(description = "2.直接投入费用")
+	private BigDecimal qj23_2 = BigDecimal.ZERO;
+	@Schema(description = "3.折旧费用与长期待摊费用")
+	private BigDecimal qj23_3 = BigDecimal.ZERO;
+	@Schema(description = "4.无形资产摊销费用")
+	private BigDecimal qj23_4 = BigDecimal.ZERO;
+	@Schema(description = "5.设计费用")
+	private BigDecimal qj23_6 = BigDecimal.ZERO;
+	@Schema(description = "6.装备调试费用与试验费用")
+	private BigDecimal qj23_7 = BigDecimal.ZERO;
+	@Schema(description = "7.委托外部研究开发费用")
+	private BigDecimal qj33= BigDecimal.ZERO;
+	@Schema(description = "①委托境内研究机构")
+	private BigDecimal qj33_1 = BigDecimal.ZERO;
+	@Schema(description = "②委托境内高等学校")
+	private BigDecimal qj33_2 = BigDecimal.ZERO;
+	@Schema(description = "③委托境内企业")
+	private BigDecimal qj33_3 = BigDecimal.ZERO;
+	@Schema(description = "④委托境外机构")
+	private BigDecimal qj33_4 = BigDecimal.ZERO;
+	@Schema(description = "8.其他费用")
+	private BigDecimal qj33_5 = BigDecimal.ZERO;
+
+	@Schema(description = "当年形成用于研发开发的固定资产")
+	private BigDecimal qj250 = BigDecimal.ZERO;
+	@Schema(description = "其中:仪器和设备")
+	private BigDecimal qj251 = BigDecimal.ZERO;
+
+	//研究开发支出资金来源情况
+	@Schema(description = "来自企业自筹")
+	private BigDecimal qj256 = BigDecimal.ZERO;
+	@Schema(description = "来自政府部门")
+	private BigDecimal qj252 = BigDecimal.ZERO;
+	@Schema(description = "来自银行贷款")
+	private BigDecimal qj253= BigDecimal.ZERO;
+	@Schema(description = "来自风险投资")
+	private BigDecimal qj254= BigDecimal.ZERO;
+	@Schema(description = "来自其他渠道")
+	private BigDecimal qj255= BigDecimal.ZERO;
+
+	//企业办研究开发机构(境内)情况
+	@Schema(description = "期末机构数")
+	private Integer qi01;
+
+	@Schema(description = "机构研究开发人员合计")
+	private Integer qi07_0;
+	@Schema(description = "其中:博士毕业")
+	private Integer qi07_1;
+	@Schema(description = "硕士毕业")
+	private Integer qi07_2;
+	@Schema(description = "机构研究开发费用")
+	private BigDecimal qi14_1= BigDecimal.ZERO;
+
+	//研究开发产出及相关情况
+	//自主知识产权情况
+	//当年专利申请数
+	@Schema(description = "当年专利申请数")
+	private Integer qj55 = 0;
+	@Schema(description = "其中:申请发明专利")
+	private Integer qj56 = 0;
+	@Schema(description = "其中:申请国内发明专利")
+	private Integer qj56_1 = 0;
+	@Schema(description = "其中:申请欧美日专利")
+	private Integer qj55_1 = 0;
+	@Schema(description = "其中:申请PCT国际专利")
+	private Integer qj55_2 = 0;
+
+	//当年专利授权数
+	@Schema(description = "当年专利授权数")
+	private Integer qj74 = 0;
+	@Schema(description = "其中:授权发明专利")
+	private Integer qj57 = 0;
+	@Schema(description = "其中:授权国内发明专利")
+	private Integer qj57_1 = 0;
+	@Schema(description = "其中:授权欧美日专利")
+	private Integer qj75 = 0;
+
+ 	@Schema(description = "期末拥有有效专利数")
+	private Integer qj83 = 0;
+	@Schema(description = "其中:拥有境外授权专利")
+	private Integer qj83_1 = 0;
+	@Schema(description = "其中:拥有欧美日专利")
+	private Integer qj82 = 0;
+	@Schema(description = "其中:拥有发明专利")
+	private Integer qj73 = 0;
+	@Schema(description = "其中:境外授权发明专利")
+	private Integer qj73_1 = 0;
+
+	//其他情况
+	@Schema(description = "发表科技论文")
+	private Integer qi25 = 0;
+	@Schema(description = "拥有软件著作权")
+	private Integer qj85 = 0;
+	@Schema(description = "其中:当年获得软件著作权")
+	private Integer qj85_1 = 0;
+	@Schema(description = "拥有集成电路布图")
+	private Integer qj86 = 0;
+	@Schema(description = "其中:当年获得集成电路布图")
+	private Integer qj86_1 = 0;
+
+	@Schema(description = "拥有植物新品种")
+	private Integer qj87 = 0;
+	@Schema(description = "其中:当年获得植物新品种")
+	private Integer qj87_1 = 0;
+	@Schema(description = "拥有国家一类新药品种")
+	private Integer qj101 = 0;
+	@Schema(description = "其中:当年获得国家一类新药证书")
+	private Integer qj101_1 = 0;
+	@Schema(description = "拥有国家一级中药保护品种")
+	private Integer qj100 = 0;
+	@Schema(description = "其中:当年获得国家一级中药保护品种证书")
+	private Integer qj100_1 = 0;
+	@Schema(description = "累计形成国际标准")
+	private Integer qj98 = 0;
+	@Schema(description = "其中:当年形成国际标准")
+	private Integer qj98_1 = 0;
+	@Schema(description = "累计形成国家或行业标准")
+	private Integer qi27 = 0;
+	@Schema(description = "其中:当年形成国家或行业标准")
+	private Integer qi27_1 = 0;
+
+
 }
 }

+ 180 - 60
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/EnterpriseInfoServiceImpl.java

@@ -268,23 +268,7 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		}
 		}
 
 
 		//一、研究开发人员情况
 		//一、研究开发人员情况
-		IPage<TechnicianVO> page = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
-		TechnicianDTO dto = new TechnicianDTO();
-		dto.setYearAndMonth(year);
-		dto.setTenantId(SecureUtil.getTenantId());
-		List<TechnicianVO> technicianVOList = technicianMapper.niandugaokejirenyuanhuizongbiao(page, dto);
-
-		int d1 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
-		if (Func.isNotEmpty(technicianVOList)) {
-			d1 = technicianVOList.size();
-			d3 = (int) technicianVOList.stream().filter(item -> item.getGender() == 2).count();
-			d5 = (int) technicianVOList.stream().filter(item -> List.of("本科", "硕士研究生", "博士研究生").contains(item.getEducation())).count();
-		}
-		vo.setD1(d1);
-		vo.setD3(d3);
-		vo.setD4(d4);
-		vo.setD5(d5);
-		vo.setD6(d6);
+		statisticsYanjiuKaifaRenyuanQingkuang(vo, year);
 
 
 		//二、研究开发费用情况
 		//二、研究开发费用情况
 		statisticsCost(vo, year);
 		statisticsCost(vo, year);
@@ -294,43 +278,12 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 
 
 		// 三、研究开发资产情况
 		// 三、研究开发资产情况
 		// d20 当年形成用于研发开发的固定资产
 		// d20 当年形成用于研发开发的固定资产
-		XmAssetQueryParam p = new XmAssetQueryParam();
-		p.setYearAndMonth(year);
-		List<XmFixedAsset> yiqishebeiList = xmFixedAssetMapper.selectXmFixedAssetPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), p, "仪器设备");
-		List<XmFixedAsset> fangwujianzhuwuList = xmFixedAssetMapper.selectXmFixedAssetPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), p, "房屋建筑物");
-
-		BigDecimal yiqishebeiTotal = BigDecimal.ZERO;
-		for (XmFixedAsset yiqishebei : yiqishebeiList) {
-			AssetEntity asset = yiqishebei.getAsset();
-			if (Func.equals(DateUtil.format(asset.getKssj(), DateUtil.PATTERN_YYYY), year)) {
-				yiqishebeiTotal = yiqishebeiTotal.add(asset.getZcyz());
-			}
-		}
-
-		BigDecimal fangwujianzhuwuTotal = BigDecimal.ZERO;
-		for (XmFixedAsset fangwujianzhuwu : fangwujianzhuwuList) {
-			AssetEntity asset = fangwujianzhuwu.getAsset();
-			if (Func.equals(DateUtil.format(asset.getKssj(), DateUtil.PATTERN_YYYY), year)) {
-				yiqishebeiTotal = fangwujianzhuwuTotal.add(asset.getZcyz());
-			}
-		}
-
-		vo.setD20(fangwujianzhuwuTotal.add(yiqishebeiTotal).multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
-		// d21 其中:仪器和设备
-		vo.setD21(yiqishebeiTotal.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		statisticsFixedAsset(vo, year);
 
 
 		//四、研究开发支出资金来源
 		//四、研究开发支出资金来源
-		//2.来自政府部门
-		List<A107_1> d43List = a107_1Mapper.selectList(Wrappers.<A107_1>lambdaQuery().eq(A107_1::getYearAndMonth, year));
-		for (A107_1 a1071 : d43List) {
-			vo.setD43(vo.getD43().add(a1071.getGovBonus()));
-		}
-		vo.setD43(vo.getD43().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
-		//1.来自企业自筹 =行7-行43-行58-行55-行56
-		vo.setD57(vo.getD7().subtract(vo.getD43()).subtract(vo.getD58()).subtract(vo.getD55()).subtract(vo.getD56()));
-
+		statisticsD43_D57(vo, year);
 
 
-//		todo 五、相关政策落实情况
+		//五、相关政策落实情况
 		XmCostDetailsDTO costDetailsDTO = new XmCostDetailsDTO();
 		XmCostDetailsDTO costDetailsDTO = new XmCostDetailsDTO();
 		costDetailsDTO.setYearAndMonth(year + "12");
 		costDetailsDTO.setYearAndMonth(year + "12");
 		DeductionCostSummary summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
 		DeductionCostSummary summary = xmCostDetailsService.deductionCostSummary(costDetailsDTO);
@@ -373,7 +326,7 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		IPage<XmFixedAsset> p2 = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
 		IPage<XmFixedAsset> p2 = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
 		XmAssetQueryParam param = new XmAssetQueryParam();
 		XmAssetQueryParam param = new XmAssetQueryParam();
 		param.setYearAndMonth(year + "12");
 		param.setYearAndMonth(year + "12");
-		yiqishebeiList = fixedAssetMapper.selectXmFixedAssetPageByYearAndMonth(p2, param, "仪器设备");
+		List<XmFixedAsset> yiqishebeiList = fixedAssetMapper.selectXmFixedAssetPageByYearAndMonth(p2, param, "仪器设备");
 		for (XmFixedAsset asset : yiqishebeiList) {
 		for (XmFixedAsset asset : yiqishebeiList) {
 			vo.setD27(vo.getD7().add(asset.getAsset().getZcyz()));
 			vo.setD27(vo.getD7().add(asset.getAsset().getZcyz()));
 		}
 		}
@@ -432,6 +385,64 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		return vo;
 		return vo;
 	}
 	}
 
 
+	private void statisticsD43_D57(A107_2VO vo, String year) {
+		//2.来自政府部门
+		List<A107_1> d43List = a107_1Mapper.selectList(Wrappers.<A107_1>lambdaQuery().eq(A107_1::getYearAndMonth, year));
+		for (A107_1 a1071 : d43List) {
+			vo.setD43(vo.getD43().add(a1071.getGovBonus()));
+		}
+		vo.setD43(vo.getD43().multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		//1.来自企业自筹 =行7-行43-行58-行55-行56
+		vo.setD57(vo.getD7().subtract(vo.getD43()).subtract(vo.getD58()).subtract(vo.getD55()).subtract(vo.getD56()));
+	}
+
+	private void statisticsFixedAsset(A107_2VO vo, String year) {
+		XmAssetQueryParam p = new XmAssetQueryParam();
+		p.setYearAndMonth(year);
+		List<XmFixedAsset> yiqishebeiList = xmFixedAssetMapper.selectXmFixedAssetPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), p, "仪器设备");
+		List<XmFixedAsset> fangwujianzhuwuList = xmFixedAssetMapper.selectXmFixedAssetPageByYear(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), p, "房屋建筑物");
+
+		BigDecimal yiqishebeiTotal = BigDecimal.ZERO;
+		for (XmFixedAsset yiqishebei : yiqishebeiList) {
+			AssetEntity asset = yiqishebei.getAsset();
+			if (Func.equals(DateUtil.format(asset.getKssj(), DateUtil.PATTERN_YYYY), year)) {
+				yiqishebeiTotal = yiqishebeiTotal.add(asset.getZcyz());
+			}
+		}
+
+		BigDecimal fangwujianzhuwuTotal = BigDecimal.ZERO;
+		for (XmFixedAsset fangwujianzhuwu : fangwujianzhuwuList) {
+			AssetEntity asset = fangwujianzhuwu.getAsset();
+			if (Func.equals(DateUtil.format(asset.getKssj(), DateUtil.PATTERN_YYYY), year)) {
+				yiqishebeiTotal = fangwujianzhuwuTotal.add(asset.getZcyz());
+			}
+		}
+
+		vo.setD20(fangwujianzhuwuTotal.add(yiqishebeiTotal).multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+		// d21 其中:仪器和设备
+		vo.setD21(yiqishebeiTotal.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
+	}
+
+	private void statisticsYanjiuKaifaRenyuanQingkuang(A107_2VO vo, String year) {
+		IPage<TechnicianVO> page = Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE));
+		TechnicianDTO dto = new TechnicianDTO();
+		dto.setYearAndMonth(year);
+		dto.setTenantId(SecureUtil.getTenantId());
+		List<TechnicianVO> technicianVOList = technicianMapper.niandugaokejirenyuanhuizongbiao(page, dto);
+
+		int d1 = 0, d3 = 0, d4 = 0, d5 = 0, d6 = 0;
+		if (Func.isNotEmpty(technicianVOList)) {
+			d1 = technicianVOList.size();
+			d3 = (int) technicianVOList.stream().filter(item -> item.getGender() == 2).count();
+			d5 = (int) technicianVOList.stream().filter(item -> List.of("本科", "硕士研究生", "博士研究生").contains(item.getEducation())).count();
+		}
+		vo.setD1(d1);
+		vo.setD3(d3);
+		vo.setD4(d4);
+		vo.setD5(d5);
+		vo.setD6(d6);
+	}
+
 	private void statisticsCost(A107_2VO vo, String year) {
 	private void statisticsCost(A107_2VO vo, String year) {
 		CostSummaryDTO costSummaryDTO = new CostSummaryDTO();
 		CostSummaryDTO costSummaryDTO = new CostSummaryDTO();
 		costSummaryDTO.setStartYearMonth(year + "01");
 		costSummaryDTO.setStartYearMonth(year + "01");
@@ -487,7 +498,6 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		vo.setD18(d18.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
 		vo.setD18(d18.multiply(new BigDecimal("0.001")).setScale(2, RoundingMode.HALF_UP));
 
 
 		vo.setD7(vo.getD8().add(vo.getD9()).add(vo.getD10()).add(vo.getD11()).add(vo.getD12()).add(vo.getD13()).add(vo.getD14()).add(vo.getD19()));
 		vo.setD7(vo.getD8().add(vo.getD9()).add(vo.getD10()).add(vo.getD11()).add(vo.getD12()).add(vo.getD13()).add(vo.getD14()).add(vo.getD19()));
-
 	}
 	}
 
 
 	@Override
 	@Override
@@ -1050,8 +1060,8 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		templateService.processTemplate("年度高新技术企业发展情况报表.ftl", techYBVO, new OutputStreamWriter(os));
 		templateService.processTemplate("年度高新技术企业发展情况报表.ftl", techYBVO, new OutputStreamWriter(os));
 	}
 	}
 
 
-    @Override
-    public TorchDevYBVO torchDevYB(String year) {
+	@Override
+	public TorchDevYBVO torchDevYB(String year) {
 		TorchDevYBVO vo = new TorchDevYBVO();
 		TorchDevYBVO vo = new TorchDevYBVO();
 
 
 		//企业概况
 		//企业概况
@@ -1059,26 +1069,136 @@ public class EnterpriseInfoServiceImpl extends BaseServiceImpl<EnterpriseInfoMap
 		if (Func.notNull(enterpriseInfo)) {
 		if (Func.notNull(enterpriseInfo)) {
 			vo.setQb13(enterpriseInfo.getHighTechNumber());
 			vo.setQb13(enterpriseInfo.getHighTechNumber());
 			vo.setQb11("是");
 			vo.setQb11("是");
-		}else {
+		} else {
 			vo.setQb11("否");
 			vo.setQb11("否");
 		}
 		}
 
 
 		//经济概况
 		//经济概况
 		//研发费用
 		//研发费用
 		XmCostDetailsDTO dto = new XmCostDetailsDTO();
 		XmCostDetailsDTO dto = new XmCostDetailsDTO();
-		dto.setYearAndMonth(year+"12");
+		dto.setYearAndMonth(year + "12");
 		List<HighTechCostSummary> list = xmCostDetailsService.highTechCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), dto).getRecords();
 		List<HighTechCostSummary> list = xmCostDetailsService.highTechCostSummary(Condition.getPage(new Query().setCurrent(1).setSize(Integer.MAX_VALUE)), dto).getRecords();
 		list.forEach(item -> {
 		list.forEach(item -> {
- 			item.setTotal(item.getRyrgTotal().add(item.getZjtrTotal()).add(item.getZjfyycqdtfyTotal()).add(item.getSjfTotal()).add(item.getWxzctxTotal()).add(item.getZbtsfyysyfyTotal()).add(item.getQtfyAdjust()).add(item.getWwyfTotal()));
+			item.setTotal(item.getRyrgTotal().add(item.getZjtrTotal()).add(item.getZjfyycqdtfyTotal()).add(item.getSjfTotal()).add(item.getWxzctxTotal()).add(item.getZbtsfyysyfyTotal()).add(item.getQtfyAdjust()).add(item.getWwyfTotal()));
 		});
 		});
 		vo.setQc236(list.stream().map(HighTechCostSummary::getTotal).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(new BigDecimal("0.001")));
 		vo.setQc236(list.stream().map(HighTechCostSummary::getTotal).reduce(BigDecimal.ZERO, BigDecimal::add).multiply(new BigDecimal("0.001")));
 
 
 		//享受高新技术企业所得税减免
 		//享受高新技术企业所得税减免
 		A107041 a107041 = a107041Mapper.selectOne(Wrappers.<A107041>lambdaQuery().eq(A107041::getYearAndMonth, year));
 		A107041 a107041 = a107041Mapper.selectOne(Wrappers.<A107041>lambdaQuery().eq(A107041::getYearAndMonth, year));
-		if(Func.notNull(a107041)){
+		if (Func.notNull(a107041)) {
 			vo.setQc20_1(a107041.getD31());
 			vo.setQc20_1(a107041.getD31());
 		}
 		}
+
+		vo.setA1071(this.qyyjkfxmqk107_1(year));
+
+		//一、研究开发人员情况
+		A107_2VO a107_2VO = new A107_2VO();
+		this.statisticsYanjiuKaifaRenyuanQingkuang(a107_2VO, year);
+		vo.setQj09(a107_2VO.getD1());
+		vo.setQj68(a107_2VO.getD2());
+		vo.setQj09_1(a107_2VO.getD4());
+		vo.setQj09_2(a107_2VO.getD5());
+		vo.setQj09_3(a107_2VO.getD6());
+
+		//二、研究开发费用情况
+		statisticsCost(a107_2VO, year);
+		vo.setQj20(a107_2VO.getD7());
+		vo.setQj23_1(a107_2VO.getD8());
+		vo.setQj23_2(a107_2VO.getD9());
+		vo.setQj23_3(a107_2VO.getD10());
+		vo.setQj23_4(a107_2VO.getD11());
+		vo.setQj23_6(a107_2VO.getD12());
+		vo.setQj23_7(a107_2VO.getD13());
+		vo.setQj33(a107_2VO.getD14());
+		vo.setQj33_1(a107_2VO.getD15());
+		vo.setQj33_2(a107_2VO.getD16());
+		vo.setQj33_3(a107_2VO.getD17());
+		vo.setQj33_4(a107_2VO.getD18());
+		vo.setQj33_5(a107_2VO.getD19());
+
+		//三、研究开发资产情况
+		statisticsFixedAsset(a107_2VO, year);
+		vo.setQj250(a107_2VO.getD20());
+		vo.setQj251(a107_2VO.getD21());
+
+		//四、研究开发支出资金来源情况
+		A107_2 db107_2 = a107_2Mapper.selectOne(Wrappers.<A107_2>lambdaQuery().eq(A107_2::getYearAndMonth, year).eq(A107_2::getTenantId, SecureUtil.getTenantId()));
+		if (Func.notNull(db107_2)) {
+			vo.setQj253(db107_2.getD58());
+			vo.setQj254(db107_2.getD55());
+			vo.setQj255(db107_2.getD56());
+		}
+		statisticsD43_D57(a107_2VO, year);
+		vo.setQj256(a107_2VO.getD57());
+		vo.setQj252(a107_2VO.getD43());
+
+		//五、企业办研究开发机构(境内)情况
+		vo.setQi01(a107_2VO.getD22());
+		vo.setQi07_0(a107_2VO.getD23());
+		vo.setQi07_1(a107_2VO.getD24());
+		vo.setQi07_2(a107_2VO.getD25());
+		vo.setQi14_1(a107_2VO.getD26());
+
+		//六、研究开发产出及相关情况
+		//(一)自主知识产权情况
+		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 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);
+
+
 		return vo;
 		return vo;
-    }
+	}
 
 
 }
 }