|
@@ -161,6 +161,26 @@ public class BiInfoController {
|
|
|
// 在途
|
|
|
getTranProess(biViewInfos, seachMoth);
|
|
|
|
|
|
+ // 销售合同 执行中的合同
|
|
|
+ EntityWrapper<ContractManagementInfo> contractManagementInfoEntityWrapper = new EntityWrapper<ContractManagementInfo>();
|
|
|
+ contractManagementInfoEntityWrapper.eq("status_flag", "1");
|
|
|
+ contractManagementInfoEntityWrapper.eq("comp_id", compId);
|
|
|
+ if (seachMoth != null) {
|
|
|
+ if (!seachMoth.contains("-")) {
|
|
|
+ contractManagementInfoEntityWrapper.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
+ } else {
|
|
|
+ contractManagementInfoEntityWrapper.like("create_date", seachMoth + "%");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ContractManagementInfo> contractManagementInfos = contractManagementInfoService.selectList(contractManagementInfoEntityWrapper);
|
|
|
+ // 执行中的所有合同-已完成量、待完成量 2 执行中的合同额 -已开票、待开票 3 已付款 未付款
|
|
|
+ getCompletedAndNotQuantity(contractManagementInfos, biViewInfos);
|
|
|
+ // 采购
|
|
|
+ getBuyInfo(contractManagementInfos, biViewInfos);
|
|
|
+ // 收入支出毛利润
|
|
|
+ getMoney(biViewInfos, seachMoth);
|
|
|
+
|
|
|
cacheComponent.putRaw(Const.ADMIN_BI_INFO, JSONObject.toJSONString(biViewInfos), 60 * 20);
|
|
|
return biViewInfos;
|
|
|
}
|
|
@@ -675,11 +695,11 @@ public class BiInfoController {
|
|
|
BiViewInfo biViewInfo1 = new BiViewInfo();
|
|
|
biViewInfo1.setName("已完成量");
|
|
|
biViewInfo1.setCount(String.valueOf(completedQuantity));
|
|
|
- biViewInfo1.setPercentage(completedQuantity / sumTotal * 100 + "%");
|
|
|
+ biViewInfo1.setPercentage(completedQuantity / sumTotal * 100 + "");
|
|
|
BiViewInfo biViewInfo2 = new BiViewInfo();
|
|
|
biViewInfo2.setName("待完成量");
|
|
|
biViewInfo2.setCount(String.valueOf(sumTotal - completedQuantity));
|
|
|
- biViewInfo2.setPercentage((sumTotal - completedQuantity) / sumTotal * 100 + "%");
|
|
|
+ biViewInfo2.setPercentage((sumTotal - completedQuantity) / sumTotal * 100 + "");
|
|
|
biViewInfos1.add(biViewInfo1);
|
|
|
biViewInfos1.add(biViewInfo2);
|
|
|
biViewInfo.setBiViewInfoList(biViewInfos1);
|
|
@@ -695,12 +715,12 @@ public class BiInfoController {
|
|
|
biViewInfoa1.setName("已开票");
|
|
|
BigDecimal bg12 = new BigDecimal(invoicingTotal);
|
|
|
biViewInfoa1.setCount(String.valueOf(bg12));
|
|
|
- biViewInfoa1.setPercentage(invoicingTotal != 0 ? invoicingTotal / moneyTotal * 100 + "%" : 0 + "%");
|
|
|
+ biViewInfoa1.setPercentage(invoicingTotal != 0 ? invoicingTotal / moneyTotal * 100 + "" : 0 + "");
|
|
|
BiViewInfo biViewInfoa2 = new BiViewInfo();
|
|
|
biViewInfoa2.setName("待开票");
|
|
|
BigDecimal bg00 = new BigDecimal(moneyTotal - (invoicingTotal != null ? invoicingTotal : 0));
|
|
|
biViewInfoa2.setCount(String.valueOf(bg00));
|
|
|
- biViewInfoa2.setPercentage((moneyTotal - (invoicingTotal != null ? invoicingTotal : 0)) / moneyTotal * 100 + "%");
|
|
|
+ biViewInfoa2.setPercentage((moneyTotal - (invoicingTotal != null ? invoicingTotal : 0)) / moneyTotal * 100 + "");
|
|
|
biViewInfosa1.add(biViewInfoa1);
|
|
|
biViewInfosa1.add(biViewInfoa2);
|
|
|
biViewInfoa.setBiViewInfoList(biViewInfosa1);
|
|
@@ -716,12 +736,12 @@ public class BiInfoController {
|
|
|
biViewInfob1.setName("已付款");
|
|
|
BigDecimal bg45 = new BigDecimal(payTotal);
|
|
|
biViewInfob1.setCount(String.valueOf(bg45));
|
|
|
- biViewInfob1.setPercentage(payTotal != 0 ? payTotal / moneyTotal * 100 + "%" : 0 + "%");
|
|
|
+ biViewInfob1.setPercentage(payTotal != 0 ? payTotal / moneyTotal * 100 + "" : 0 + "");
|
|
|
BiViewInfo biViewInfob2 = new BiViewInfo();
|
|
|
biViewInfob2.setName("待付款");
|
|
|
BigDecimal bg4 = new BigDecimal(moneyTotal - (payTotal != null ? payTotal : 0));
|
|
|
biViewInfob2.setCount(String.valueOf(bg4));
|
|
|
- biViewInfob2.setPercentage((moneyTotal - (payTotal != null ? payTotal : 0)) / moneyTotal * 100 + "%");
|
|
|
+ biViewInfob2.setPercentage((moneyTotal - (payTotal != null ? payTotal : 0)) / moneyTotal * 100 + "");
|
|
|
biViewInfosb1.add(biViewInfob1);
|
|
|
biViewInfosb1.add(biViewInfob2);
|
|
|
biViewInfob.setBiViewInfoList(biViewInfosb1);
|
|
@@ -797,11 +817,11 @@ public class BiInfoController {
|
|
|
BiViewInfo biViewInfo1 = new BiViewInfo();
|
|
|
biViewInfo1.setName("已完成量");
|
|
|
biViewInfo1.setCount(String.valueOf(completedQuantity));
|
|
|
- biViewInfo1.setPercentage(completedQuantity / sumTotal * 100 + "%");
|
|
|
+ biViewInfo1.setPercentage(completedQuantity / sumTotal * 100 + "");
|
|
|
BiViewInfo biViewInfo2 = new BiViewInfo();
|
|
|
biViewInfo2.setName("待完成量");
|
|
|
biViewInfo2.setCount(String.valueOf(sumTotal - completedQuantity));
|
|
|
- biViewInfo2.setPercentage((sumTotal - completedQuantity) / sumTotal * 100 + "%");
|
|
|
+ biViewInfo2.setPercentage((sumTotal - completedQuantity) / sumTotal * 100 + "");
|
|
|
biViewInfos1.add(biViewInfo1);
|
|
|
biViewInfos1.add(biViewInfo2);
|
|
|
biViewInfo.setBiViewInfoList(biViewInfos1);
|
|
@@ -817,12 +837,12 @@ public class BiInfoController {
|
|
|
biViewInfoa1.setName("已开票");
|
|
|
BigDecimal bg45 = new BigDecimal(invoicingTotal);
|
|
|
biViewInfoa1.setCount(String.valueOf(bg45));
|
|
|
- biViewInfoa1.setPercentage(invoicingTotal != 0 ? invoicingTotal / moneyTotal * 100 + "%" : 0 + "%");
|
|
|
+ biViewInfoa1.setPercentage(invoicingTotal != 0 ? invoicingTotal / moneyTotal * 100 + "" : 0 + "");
|
|
|
BiViewInfo biViewInfoa2 = new BiViewInfo();
|
|
|
biViewInfoa2.setName("待开票");
|
|
|
BigDecimal bg4 = new BigDecimal(moneyTotal - (invoicingTotal != null ? invoicingTotal : 0));
|
|
|
biViewInfoa2.setCount(String.valueOf(bg4));
|
|
|
- biViewInfoa2.setPercentage((moneyTotal - (invoicingTotal != null ? invoicingTotal : 0)) / moneyTotal * 100 + "%");
|
|
|
+ biViewInfoa2.setPercentage((moneyTotal - (invoicingTotal != null ? invoicingTotal : 0)) / moneyTotal * 100 + "");
|
|
|
biViewInfosa1.add(biViewInfoa1);
|
|
|
biViewInfosa1.add(biViewInfoa2);
|
|
|
biViewInfoa.setBiViewInfoList(biViewInfosa1);
|
|
@@ -838,12 +858,12 @@ public class BiInfoController {
|
|
|
biViewInfob1.setName("已付款");
|
|
|
BigDecimal bg9 = new BigDecimal(payTotal);
|
|
|
biViewInfob1.setCount(String.valueOf(bg9));
|
|
|
- biViewInfob1.setPercentage(payTotal != 0 ? payTotal / moneyTotal * 100 + "%" : 0 + "%");
|
|
|
+ biViewInfob1.setPercentage(payTotal != 0 ? payTotal / moneyTotal * 100 + "" : 0 + "");
|
|
|
BiViewInfo biViewInfob2 = new BiViewInfo();
|
|
|
biViewInfob2.setName("待付款");
|
|
|
BigDecimal bg6 = new BigDecimal(moneyTotal - (payTotal != null ? payTotal : 0));
|
|
|
biViewInfob2.setCount(String.valueOf(bg6));
|
|
|
- biViewInfob2.setPercentage((moneyTotal - (payTotal != null ? payTotal : 0)) / moneyTotal * 100 + "%");
|
|
|
+ biViewInfob2.setPercentage((moneyTotal - (payTotal != null ? payTotal : 0)) / moneyTotal * 100 + "");
|
|
|
biViewInfosb1.add(biViewInfob1);
|
|
|
biViewInfosb1.add(biViewInfob2);
|
|
|
biViewInfob.setBiViewInfoList(biViewInfosb1);
|