zhouli 4 months ago
parent
commit
dd438588d3

+ 16 - 5
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmCqdtfyServiceImpl.java

@@ -167,11 +167,19 @@ public class XmCqdtfyServiceImpl extends BaseServiceImpl<XmCqdtfyMapper, XmCqdtf
 	@Override
 	@Override
 	public void exportXmCqdtfy(OutputStream os, List<XmCqdtfyVO> list, String yearAndMonth) {
 	public void exportXmCqdtfy(OutputStream os, List<XmCqdtfyVO> list, String yearAndMonth) {
 		AtomicInteger index = new AtomicInteger(1);
 		AtomicInteger index = new AtomicInteger(1);
-		list.forEach(temp -> {
-			temp.setXh(index.getAndIncrement() + "");
-			temp.setYftxe(temp.getYtxe().multiply(temp.getSyzb()));
-			temp.setSyzb(temp.getSyzb().multiply(new BigDecimal("100")));
-		});
+
+		Integer sysmSum = 0, ysyysSum = 0;
+		BigDecimal zcyzSum = BigDecimal.ZERO;
+		for (XmCqdtfyVO vo : list) {
+			vo.setXh(index.getAndIncrement() + "");
+			vo.setYftxe(vo.getYtxe().multiply(vo.getSyzb()));
+			vo.setSyzb(vo.getSyzb().multiply(new BigDecimal("100")));
+
+			sysmSum += vo.getSysm();
+			ysyysSum += vo.getYsyys();
+			zcyzSum = zcyzSum.add(vo.getZcyz());
+		}
+
 		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/研发费用管理/折旧费用与长期待摊费用/每月长期待摊费用分配表.xls");
 		InputStream templateFileName = this.getClass().getClassLoader().getResourceAsStream("export-template/研发费用管理/折旧费用与长期待摊费用/每月长期待摊费用分配表.xls");
 		ExcelWriter excelWriter = EasyExcel.write(os)
 		ExcelWriter excelWriter = EasyExcel.write(os)
 			.withTemplate((templateFileName))
 			.withTemplate((templateFileName))
@@ -184,6 +192,9 @@ public class XmCqdtfyServiceImpl extends BaseServiceImpl<XmCqdtfyMapper, XmCqdtf
 		excelWriter.fill(list, fillConfig, writeSheet);
 		excelWriter.fill(list, fillConfig, writeSheet);
 		Map<String, Object> map = new HashMap<>();
 		Map<String, Object> map = new HashMap<>();
 		map.put("yearAndMonth", yearAndMonth);
 		map.put("yearAndMonth", yearAndMonth);
+		map.put("sysmSum", sysmSum);
+		map.put("ysyysSum", ysyysSum);
+		map.put("zcyzSum", zcyzSum);
 		excelWriter.fill(map, writeSheet);
 		excelWriter.fill(map, writeSheet);
 		excelWriter.finish();
 		excelWriter.finish();
 		if (templateFileName != null) {
 		if (templateFileName != null) {

+ 1 - 1
kd-service/kd-scientific/src/main/java/org/sky/scientific/service/impl/XmFixedAssetServiceImpl.java

@@ -309,10 +309,10 @@ public class XmFixedAssetServiceImpl extends BaseServiceImpl<XmFixedAssetMapper,
 			data.put("yzje", temp.getAsset().getYzje());
 			data.put("yzje", temp.getAsset().getYzje());
 			data.put("zgs", temp.getAsset().getZgs());
 			data.put("zgs", temp.getAsset().getZgs());
 			data.put("workHours", temp.getWorkHours());
 			data.put("workHours", temp.getWorkHours());
-			data.put("yanfaFenTanLv", temp.getYanfaFenTanLv());
 			if (Func.isNull(temp.getYanfaFenTanLv())) {
 			if (Func.isNull(temp.getYanfaFenTanLv())) {
 				temp.setYanfaFenTanLv(0.00);
 				temp.setYanfaFenTanLv(0.00);
 			}
 			}
+			data.put("yanfaFenTanLv", temp.getYanfaFenTanLv() * 100);
 			data.put("yanfazhejiu", BigDecimal.valueOf(temp.getYanfaFenTanLv()).multiply(temp.getAsset().getYzje()));
 			data.put("yanfazhejiu", BigDecimal.valueOf(temp.getYanfaFenTanLv()).multiply(temp.getAsset().getYzje()));
 			results.add(data);
 			results.add(data);
 		});
 		});

BIN
kd-service/kd-scientific/src/main/resources/export-template/研发费用管理/折旧费用与长期待摊费用/仪器设备折旧费用分配表.xls


BIN
kd-service/kd-scientific/src/main/resources/export-template/研发费用管理/折旧费用与长期待摊费用/每月长期待摊费用分配表.xls