|
@@ -3,6 +3,7 @@ package com.huimv.produce.controller;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.huimv.common.utils.DataUill;
|
|
import com.huimv.common.utils.DataUill;
|
|
|
|
+import com.huimv.common.utils.NumberUtils;
|
|
import com.huimv.common.utils.Result;
|
|
import com.huimv.common.utils.Result;
|
|
import com.huimv.common.utils.ResultCode;
|
|
import com.huimv.common.utils.ResultCode;
|
|
import com.huimv.produce.entity.ProdCostStatistics;
|
|
import com.huimv.produce.entity.ProdCostStatistics;
|
|
@@ -36,6 +37,8 @@ public class ProdCostStatisticsController {
|
|
CostDto costDto3 = new CostDto("育肥猪群","0","0","0");
|
|
CostDto costDto3 = new CostDto("育肥猪群","0","0","0");
|
|
CostDto costDto4 = new CostDto("后备猪群","0","0","0");
|
|
CostDto costDto4 = new CostDto("后备猪群","0","0","0");
|
|
CostDto costDto5 = new CostDto("总成本","0","0","0");
|
|
CostDto costDto5 = new CostDto("总成本","0","0","0");
|
|
|
|
+ Map map = new HashMap<>();
|
|
|
|
+
|
|
for (ProdCostStatistics prodCostStatistics : list) {
|
|
for (ProdCostStatistics prodCostStatistics : list) {
|
|
String projectName = prodCostStatistics.getProjectName();
|
|
String projectName = prodCostStatistics.getProjectName();
|
|
|
|
|
|
@@ -45,6 +48,8 @@ public class ProdCostStatisticsController {
|
|
costDto3.setGtValue(prodCostStatistics.getFattenPig());
|
|
costDto3.setGtValue(prodCostStatistics.getFattenPig());
|
|
costDto4.setGtValue(prodCostStatistics.getReplaceGilt());
|
|
costDto4.setGtValue(prodCostStatistics.getReplaceGilt());
|
|
costDto5.setGtValue(prodCostStatistics.getTotal());
|
|
costDto5.setGtValue(prodCostStatistics.getTotal());
|
|
|
|
+
|
|
|
|
+ map.put("gt", NumberUtils.format(prodCostStatistics.getTotal()));
|
|
}
|
|
}
|
|
if ("兽药".equals(projectName)){
|
|
if ("兽药".equals(projectName)){
|
|
costDto1.setSyValue(prodCostStatistics.getBaseGroup());
|
|
costDto1.setSyValue(prodCostStatistics.getBaseGroup());
|
|
@@ -52,6 +57,7 @@ public class ProdCostStatisticsController {
|
|
costDto3.setSyValue(prodCostStatistics.getFattenPig());
|
|
costDto3.setSyValue(prodCostStatistics.getFattenPig());
|
|
costDto4.setSyValue(prodCostStatistics.getReplaceGilt());
|
|
costDto4.setSyValue(prodCostStatistics.getReplaceGilt());
|
|
costDto5.setSyValue(prodCostStatistics.getTotal());
|
|
costDto5.setSyValue(prodCostStatistics.getTotal());
|
|
|
|
+ map.put("sy", NumberUtils.format(prodCostStatistics.getTotal()));
|
|
|
|
|
|
}
|
|
}
|
|
if ("饲料".equals(projectName)){
|
|
if ("饲料".equals(projectName)){
|
|
@@ -60,10 +66,11 @@ public class ProdCostStatisticsController {
|
|
costDto3.setSlValue(prodCostStatistics.getFattenPig());
|
|
costDto3.setSlValue(prodCostStatistics.getFattenPig());
|
|
costDto4.setSlValue(prodCostStatistics.getReplaceGilt());
|
|
costDto4.setSlValue(prodCostStatistics.getReplaceGilt());
|
|
costDto5.setSlValue(prodCostStatistics.getTotal());
|
|
costDto5.setSlValue(prodCostStatistics.getTotal());
|
|
|
|
+ map.put("sl", NumberUtils.format(prodCostStatistics.getTotal()));
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- Map map = new HashMap<>();
|
|
|
|
|
|
+
|
|
|
|
|
|
map.put("baseGroup",costDto1);
|
|
map.put("baseGroup",costDto1);
|
|
map.put("pigletGroup",costDto2);
|
|
map.put("pigletGroup",costDto2);
|
|
@@ -71,6 +78,9 @@ public class ProdCostStatisticsController {
|
|
map.put("replaceGilt",costDto4);
|
|
map.put("replaceGilt",costDto4);
|
|
map.put("total",costDto5);
|
|
map.put("total",costDto5);
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
return new Result(ResultCode.SUCCESS,map);
|
|
return new Result(ResultCode.SUCCESS,map);
|
|
}
|
|
}
|
|
|
|
|