|
@@ -8,6 +8,8 @@ import com.github.pagehelper.PageInfo;
|
8
|
8
|
import com.liang.common.JsonTool;
|
9
|
9
|
import com.liang.common.base.BaseController;
|
10
|
10
|
import com.liang.common.base.BaseResult;
|
|
11
|
+import com.liang.common.config.SFTYProperties;
|
|
12
|
+import com.liang.common.constants.CommonConstant;
|
11
|
13
|
import com.liang.common.enums.PostInfoEnum;
|
12
|
14
|
import com.liang.common.enums.ProjectTypeEnnum;
|
13
|
15
|
import com.liang.common.utils.ExcelPoiUtil;
|
|
@@ -304,7 +306,7 @@ public class PrjAnnualbudgetController extends BaseController {
|
304
|
306
|
|
305
|
307
|
Set<String> nf = yzxqkVos.stream().map(PrjAnnualbudgetYzxqkVo::getNf).collect(Collectors.toSet());
|
306
|
308
|
//后端对已执行情况的父级求和
|
307
|
|
- sumYzxqk(readValue, nf);
|
|
309
|
+ sumYzxqk(readValue, nf,yzxqkVos.get(0).getXmlx());
|
308
|
310
|
nf.forEach(nfItem -> {
|
309
|
311
|
readValue.stream().forEach(item -> {
|
310
|
312
|
Double ysje = allBudgetDetails.stream().filter(allBudgetDetailItem -> allBudgetDetailItem.getFymc().equals(item.get("fymc")) && nfItem.equals(String.valueOf(allBudgetDetailItem.getNf()))).collect(Collectors.toList()).get(0).getYsje();
|
|
@@ -326,29 +328,29 @@ public class PrjAnnualbudgetController extends BaseController {
|
326
|
328
|
|
327
|
329
|
}
|
328
|
330
|
|
329
|
|
- private void sumYzxqk(List<Map<String, Object>> readValue, Set<String> nf) {
|
|
331
|
+ private void sumYzxqk(List<Map<String, Object>> readValue, Set<String> nf, String xmlx) {
|
330
|
332
|
for (String n : nf) {
|
331
|
333
|
//更新人工费
|
332
|
|
- BigDecimal rgf = readValue.stream().filter(item -> "32".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
333
|
|
- readValue.stream().filter(item -> "32".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, rgf.setScale(2, 4)));
|
|
334
|
+ BigDecimal rgf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.RGF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
335
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.RGF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, rgf.setScale(2, 4)));
|
334
|
336
|
//更新设备使用费
|
335
|
|
- BigDecimal sbsyf = readValue.stream().filter(item -> "36".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
336
|
|
- readValue.stream().filter(item -> "36".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(sbsyf)));
|
|
337
|
+ BigDecimal sbsyf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.SBSYF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
338
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.SBSYF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(sbsyf)));
|
337
|
339
|
//更新业务费
|
338
|
|
- BigDecimal ywf = readValue.stream().filter(item -> "39".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
339
|
|
- readValue.stream().filter(item -> "39".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(ywf)));
|
|
340
|
+ BigDecimal ywf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.YWF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
341
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.YWF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(ywf)));
|
340
|
342
|
//更新场地使用费
|
341
|
|
- BigDecimal cdsyf = readValue.stream().filter(item -> "43".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
342
|
|
- readValue.stream().filter(item -> "43".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(cdsyf)));
|
|
343
|
+ BigDecimal cdsyf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.CDSYF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
344
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.CDSYF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(cdsyf)));
|
343
|
345
|
//更新外委支出费
|
344
|
|
- BigDecimal wwzcf = readValue.stream().filter(item -> "48".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
345
|
|
- readValue.stream().filter(item -> "48".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(wwzcf)));
|
|
346
|
+ BigDecimal wwzcf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.WWZCF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
347
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.WWZCF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(wwzcf)));
|
346
|
348
|
//更新直接费
|
347
|
|
- BigDecimal zjf = readValue.stream().filter(item -> "31".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
348
|
|
- readValue.stream().filter(item -> "31".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zjf)));
|
|
349
|
+ BigDecimal zjf = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.ZJF).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
350
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.ZJF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zjf)));
|
349
|
351
|
//更新总计
|
350
|
|
- BigDecimal zj = readValue.stream().filter(item -> "30".equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
351
|
|
- readValue.stream().filter(item -> "30".equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zj)));
|
|
352
|
+ BigDecimal zj = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.ZJ).equals(item.get("fj")) && Tools.notEmpty(item.get("yzxqk" + n))).map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
353
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx,CommonConstant.ZJ).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zj)));
|
352
|
354
|
}
|
353
|
355
|
}
|
354
|
356
|
|