|
@@ -161,14 +161,14 @@ public class BiInfoController {
|
|
|
private List<BiViewInfo> getCostCount(List<BiViewInfo> biViewInfos,String seachMoth) {
|
|
|
EntityWrapper<CostManagementInfo> costManagementInfoEntityWrapper = new EntityWrapper<CostManagementInfo>();
|
|
|
costManagementInfoEntityWrapper.eq("comp_id", companyId);
|
|
|
- if(seachMoth != null) {
|
|
|
- if (!seachMoth.contains("-")) {
|
|
|
- costManagementInfoEntityWrapper.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
- } else {
|
|
|
- costManagementInfoEntityWrapper.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+// if(seachMoth != null) {
|
|
|
+// if (!seachMoth.contains("-")) {
|
|
|
+// costManagementInfoEntityWrapper.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
+// } else {
|
|
|
+// costManagementInfoEntityWrapper.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
List<CostManagementInfo> costManagementInfos = costManagementInfoService.selectList(costManagementInfoEntityWrapper);
|
|
|
Float sumTotal = 0f;
|
|
|
Float sumCost = 0f;
|
|
@@ -198,14 +198,14 @@ public class BiInfoController {
|
|
|
EntityWrapper<CostManagementInfo> costManagementInfoEntityWrapper1 = new EntityWrapper<CostManagementInfo>();
|
|
|
costManagementInfoEntityWrapper1.eq("comp_id", companyId);
|
|
|
costManagementInfoEntityWrapper1.groupBy("goods_name_key");
|
|
|
- if(seachMoth != null) {
|
|
|
- if (!seachMoth.contains("-")) {
|
|
|
- costManagementInfoEntityWrapper1.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
- } else {
|
|
|
- costManagementInfoEntityWrapper1.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+// if(seachMoth != null) {
|
|
|
+// if (!seachMoth.contains("-")) {
|
|
|
+// costManagementInfoEntityWrapper1.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
+// } else {
|
|
|
+// costManagementInfoEntityWrapper1.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
List<CostManagementInfo> costManagementInfoList = costManagementInfoService.selectList(costManagementInfoEntityWrapper1);
|
|
|
BiViewInfo biViewInfo4 = new BiViewInfo();
|
|
|
List<BiViewInfo> biViewInfos1 = new ArrayList<>();
|
|
@@ -216,18 +216,18 @@ public class BiInfoController {
|
|
|
EntityWrapper<CostManagementInfo> costManagementInfoEntityWrapper2 = new EntityWrapper<CostManagementInfo>();
|
|
|
costManagementInfoEntityWrapper2.eq("comp_id", companyId);
|
|
|
costManagementInfoEntityWrapper2.eq("goods_name_key", costManagementInfo.getGoodsNameKey());
|
|
|
- if(seachMoth != null) {
|
|
|
- if (!seachMoth.contains("-")) {
|
|
|
- costManagementInfoEntityWrapper1.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
- } else {
|
|
|
- costManagementInfoEntityWrapper1.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
-
|
|
|
- }
|
|
|
- }
|
|
|
+// if(seachMoth != null) {
|
|
|
+// if (!seachMoth.contains("-")) {
|
|
|
+// costManagementInfoEntityWrapper1.and("YEAR(create_date)='" + seachMoth + "'");
|
|
|
+// } else {
|
|
|
+// costManagementInfoEntityWrapper1.and("(YEAR(create_date)+\"-\"+MONTH(create_date))='" + seachMoth + "'");
|
|
|
+//
|
|
|
+// }
|
|
|
+// }
|
|
|
List<CostManagementInfo> costManagementInfoList1 = costManagementInfoService.selectList(costManagementInfoEntityWrapper2);
|
|
|
Float weight = 0f;
|
|
|
for (int j = 0; j < costManagementInfoList1.size(); j++) {
|
|
|
- CostManagementInfo costManagementInfo1 = costManagementInfoList.get(i);
|
|
|
+ CostManagementInfo costManagementInfo1 = costManagementInfoList1.get(j);
|
|
|
weight = weight + costManagementInfo1.getStorage();
|
|
|
}
|
|
|
biViewInfo3.setName(costManagementInfo.getGoodsName());
|