| | |
| | | private ShjdjwApi1403 copyApi1403(Api1403 api1403) { |
| | | ShjdjwApi1403 shjdjwApi1403 = new ShjdjwApi1403(); |
| | | BeanUtils.copyProperties(api1403, shjdjwApi1403); |
| | | |
| | | List<Double> lhsl = getLhsl(api1403); |
| | | shjdjwApi1403.setLrsl(lhsl.get(1)); |
| | | shjdjwApi1403.setLrsl(lhsl.get(0)); |
| | | if (null != lhsl && lhsl.size() > 0) { |
| | | shjdjwApi1403.setLrsl(lhsl.get(1)); |
| | | shjdjwApi1403.setLrsl(lhsl.get(0)); |
| | | } |
| | | |
| | | shjdjwApi1403.setJhbm(api1403.getLhjhdh()); |
| | | shjdjwApi1403.setPch("0"); |
| | | return shjdjwApi1403; |
| | |
| | | |
| | | /** |
| | | * 获取轮入和轮出重量 |
| | | * |
| | | * @param api1403 |
| | | * @return |
| | | */ |
| | | private List<Double> getLhsl(Api1403 api1403) { |
| | | List<Api1404> api1404List = api1404Rep.getDataByLhjhdh(api1403.getLhjhdh()); |
| | | List<Double> lhsl = new ArrayList<>(); |
| | | if(null != api1404List && api1404List.size() > 0){ |
| | | if (null != api1404List && api1404List.size() > 0) { |
| | | // double sum = api1404List.stream().mapToDouble(Api1404::getLhsl).summaryStatistics().getSum(); |
| | | double lcSum = api1404List.stream() |
| | | .filter(x->x.getLhlx().equals("1")) |
| | | .filter(x -> x.getLhlx().equals("1")) |
| | | .mapToDouble(Api1404::getLhsl) |
| | | .summaryStatistics().getSum(); |
| | | double lrSum = api1404List.stream() |
| | | .filter(x->x.getLhlx().equals("2")) |
| | | .filter(x -> x.getLhlx().equals("2")) |
| | | .mapToDouble(Api1404::getLhsl) |
| | | .summaryStatistics().getSum(); |
| | | lhsl.add(lcSum); |
| | |
| | | |
| | | // 计划数量 |
| | | List<Double> lhsl = getLhsl(api1403); |
| | | Double sum = lhsl.stream().reduce(0d, Double::sum); |
| | | Double sum = 0.0; |
| | | if (null != lhsl && lhsl.size() > 0) { |
| | | sum = lhsl.stream().reduce(0d, Double::sum); |
| | | } |
| | | // 已执行数量 |
| | | List<Api1202> api1202List = api1202Rep.getDataByTime(api1403.getKszxrq(), api1403.getJzzxrq()); |
| | | // DateUtils.format("yyyy-MM-dd HH:mm:ss", api1403.getKszxrq()), |
| | |
| | | shjdjw1502.setJhsl(sum.toString()); |
| | | shjdjw1502.setYzxsl(yzxsl.toString()); |
| | | //执行比例 |
| | | shjdjw1502.setZxbl(String.valueOf((yzxsl/sum*100))); |
| | | shjdjw1502.setZxbl(String.valueOf((yzxsl / sum * 100))); |
| | | |
| | | // 招标/竞价比例 |
| | | shjdjw1502.setZbjjbl("100"); |
| | |
| | | shjdjwApi1310.setPznm(api1310.getLspzdm()); |
| | | shjdjwApi1310.setSkdjbm(api1310.getLsdjdm()); |
| | | shjdjwApi1310.setJylbbm(api1310.getJylb()); |
| | | if(StringUtils.isNotEmpty(shjdjwApi1310.getJyxm())){ |
| | | if (StringUtils.isNotEmpty(shjdjwApi1310.getJyxm())) { |
| | | String[] split = shjdjwApi1310.getJyxm().split(","); |
| | | StringBuilder jyjl = new StringBuilder(); |
| | | for (String s : split) { |