|
@@ -21,6 +21,7 @@ import com.liang.service.*;
|
21
|
import com.liang.vo.PrjAnnualbudgetNfVo;
|
21
|
import com.liang.vo.PrjAnnualbudgetNfVo;
|
22
|
import com.liang.vo.PrjAnnualbudgetYzxqkVo;
|
22
|
import com.liang.vo.PrjAnnualbudgetYzxqkVo;
|
23
|
import io.swagger.annotations.ApiOperation;
|
23
|
import io.swagger.annotations.ApiOperation;
|
|
|
24
|
+import lombok.extern.slf4j.Slf4j;
|
24
|
import org.springframework.data.domain.Page;
|
25
|
import org.springframework.data.domain.Page;
|
25
|
import org.springframework.data.domain.PageRequest;
|
26
|
import org.springframework.data.domain.PageRequest;
|
26
|
import org.springframework.http.ResponseEntity;
|
27
|
import org.springframework.http.ResponseEntity;
|
|
@@ -43,6 +44,7 @@ import java.util.stream.Collectors;
|
43
|
* @since 2023-05-17 08:56:49
|
44
|
* @since 2023-05-17 08:56:49
|
44
|
*/
|
45
|
*/
|
45
|
@Controller
|
46
|
@Controller
|
|
|
47
|
+@Slf4j
|
46
|
@RequestMapping("prjAnnualbudget")
|
48
|
@RequestMapping("prjAnnualbudget")
|
47
|
public class PrjAnnualbudgetController extends BaseController {
|
49
|
public class PrjAnnualbudgetController extends BaseController {
|
48
|
/**
|
50
|
/**
|
|
@@ -306,7 +308,7 @@ public class PrjAnnualbudgetController extends BaseController {
|
306
|
|
308
|
|
307
|
Set<String> nf = yzxqkVos.stream().map(PrjAnnualbudgetYzxqkVo::getNf).collect(Collectors.toSet());
|
309
|
Set<String> nf = yzxqkVos.stream().map(PrjAnnualbudgetYzxqkVo::getNf).collect(Collectors.toSet());
|
308
|
//后端对已执行情况的父级求和
|
310
|
//后端对已执行情况的父级求和
|
309
|
- sumYzxqk(readValue, nf,yzxqkVos.get(0).getXmlx());
|
|
|
|
|
311
|
+ sumYzxqk(readValue, nf, yzxqkVos.get(0).getXmlx());
|
310
|
nf.forEach(nfItem -> {
|
312
|
nf.forEach(nfItem -> {
|
311
|
readValue.stream().forEach(item -> {
|
313
|
readValue.stream().forEach(item -> {
|
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();
|
314
|
Double ysje = allBudgetDetails.stream().filter(allBudgetDetailItem -> allBudgetDetailItem.getFymc().equals(item.get("fymc")) && nfItem.equals(String.valueOf(allBudgetDetailItem.getNf()))).collect(Collectors.toList()).get(0).getYsje();
|
|
@@ -331,26 +333,51 @@ public class PrjAnnualbudgetController extends BaseController {
|
331
|
private void sumYzxqk(List<Map<String, Object>> readValue, Set<String> nf, String xmlx) {
|
333
|
private void sumYzxqk(List<Map<String, Object>> readValue, Set<String> nf, String xmlx) {
|
332
|
for (String n : nf) {
|
334
|
for (String n : nf) {
|
333
|
//更新人工费
|
335
|
//更新人工费
|
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)));
|
|
|
|
|
336
|
+ List<Map<String, Object>> rgfs = readValue.stream().filter(item -> {
|
|
|
337
|
+ String ndysbm = SFTYProperties.getNDYSBM(xmlx, CommonConstant.RGF);
|
|
|
338
|
+ log.info("ndysbm"+ndysbm);
|
|
|
339
|
+ return ndysbm.equals(item.get("fj")) && item.get("yzxqk" + n) != null;
|
|
|
340
|
+ }).collect(Collectors.toList());
|
|
|
341
|
+ if (Tools.notEmpty(rgfs)) {
|
|
|
342
|
+ BigDecimal rgf = rgfs.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
343
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.RGF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, rgf.setScale(2, 4)));
|
|
|
344
|
+ }
|
336
|
//更新设备使用费
|
345
|
//更新设备使用费
|
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)));
|
|
|
|
|
346
|
+ List<Map<String, Object>> sbsyfs = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.SBSYF).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
347
|
+ if (Tools.notEmpty(sbsyfs)) {
|
|
|
348
|
+ BigDecimal sbsyf = sbsyfs.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
349
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.SBSYF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(sbsyf)));
|
|
|
350
|
+ }
|
339
|
//更新业务费
|
351
|
//更新业务费
|
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)));
|
|
|
|
|
352
|
+ List<Map<String, Object>> yfws = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.YWF).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
353
|
+ if (Tools.notEmpty(yfws)) {
|
|
|
354
|
+ BigDecimal ywf = yfws.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
355
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.YWF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(ywf)));
|
|
|
356
|
+ }
|
342
|
//更新场地使用费
|
357
|
//更新场地使用费
|
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)));
|
|
|
|
|
358
|
+ List<Map<String, Object>> cdsyfs = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.CDSYF).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
359
|
+ if (Tools.notEmpty(cdsyfs)) {
|
|
|
360
|
+ BigDecimal cdsyf = yfws.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
361
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.CDSYF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(cdsyf)));
|
|
|
362
|
+ }
|
345
|
//更新外委支出费
|
363
|
//更新外委支出费
|
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)));
|
|
|
|
|
364
|
+ List<Map<String, Object>> wwzcfs = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.WWZCF).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
365
|
+ if (Tools.notEmpty(wwzcfs)) {
|
|
|
366
|
+ BigDecimal wwzcf = yfws.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
367
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.WWZCF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(wwzcf)));
|
|
|
368
|
+ }
|
348
|
//更新直接费
|
369
|
//更新直接费
|
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)));
|
|
|
|
|
370
|
+ List<Map<String, Object>> zjfs = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.ZJF).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
371
|
+ if (Tools.notEmpty(zjfs)) {
|
|
|
372
|
+ BigDecimal zjf = yfws.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
373
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.ZJF).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zjf)));
|
|
|
374
|
+ }
|
351
|
//更新总计
|
375
|
//更新总计
|
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)));
|
|
|
|
|
376
|
+ List<Map<String, Object>> zjs = readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.ZJ).equals(item.get("fj")) && item.get("yzxqk" + n) != null).collect(Collectors.toList());
|
|
|
377
|
+ if (Tools.notEmpty(zjs)) {
|
|
|
378
|
+ BigDecimal zj = yfws.stream().map(item -> new BigDecimal(String.valueOf(item.get("yzxqk" + n)))).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
379
|
+ readValue.stream().filter(item -> SFTYProperties.getNDYSBM(xmlx, CommonConstant.ZJ).equals(item.get("bm"))).forEach(item -> item.put("yzxqk" + n, String.valueOf(zj)));
|
|
|
380
|
+ }
|
354
|
}
|
381
|
}
|
355
|
}
|
382
|
}
|
356
|
|
383
|
|