|
@@ -1304,6 +1304,8 @@ public class BiInfoController {
|
|
|
}
|
|
|
List<BiViewInfo> biViewInfoList1 = warehousePositionStorageInfoMapper.selectSumWareNewByGoods(companyId, null, "2", seachMonth, jointVentureParties);
|
|
|
List<BiViewInfo> biViewInfoList2 = warehousePositionStorageInfoMapper.selectSumWareNewByGoods(companyId, null, "1", seachMonth, jointVentureParties);
|
|
|
+ List<BiViewInfo> biViewInfochaoList1 = warehousePositionStorageInfoMapper.selectSumWareChaoByGoods(companyId, null, "2", seachMonth, jointVentureParties);
|
|
|
+ List<BiViewInfo> biViewInfochaoList2 = warehousePositionStorageInfoMapper.selectSumWareChaoByGoods(companyId, null, "1", seachMonth, jointVentureParties);
|
|
|
List<BiViewInfo> biViewInfos = new ArrayList<>();
|
|
|
if (CollectionUtils.isNotEmpty(biViewInfoList1)) {
|
|
|
for (int i = 0; i < biViewInfoList1.size(); i++) {
|
|
@@ -1330,9 +1332,63 @@ public class BiInfoController {
|
|
|
biViewInfos.add(biViewInfo);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ // 计算潮粮折干后的剩余量
|
|
|
+ List<BiViewInfo> biViewInfos1 = new ArrayList<>();
|
|
|
+ if (CollectionUtils.isNotEmpty(biViewInfochaoList1)) {
|
|
|
+ for (int i = 0; i < biViewInfochaoList1.size(); i++) {
|
|
|
+ BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
+ biViewInfo.setName(biViewInfochaoList1.get(i).getName());
|
|
|
+ biViewInfo.setWeight(biViewInfochaoList1.get(i).getWeight());
|
|
|
+ if (CollectionUtils.isNotEmpty(biViewInfochaoList2)) {
|
|
|
+ for (int j = 0; j < biViewInfochaoList2.size(); j++) {
|
|
|
+ if (biViewInfochaoList1.get(i).getName().equals(biViewInfochaoList2.get(j).getName())) {
|
|
|
+ if(biViewInfochaoList1.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0) <= 0){
|
|
|
+ biViewInfo.setWeight(0d);
|
|
|
+ }else{
|
|
|
+ biViewInfo.setWeight(biViewInfochaoList1.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0));
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ if(biViewInfo.getWeight() == 0){
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ biViewInfos1.add(biViewInfo);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ List<BiViewInfo> biViewInfos2 = new ArrayList<>(biViewInfos);
|
|
|
BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
biViewInfo.setName("库存储量");
|
|
|
- biViewInfo.setBiViewInfoList(biViewInfos);
|
|
|
+ biViewInfo.setBiViewInfoList(biViewInfos2);
|
|
|
+
|
|
|
+
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfos)){
|
|
|
+ for(int i=0;i<biViewInfos.size();i++){
|
|
|
+ if(biViewInfos.get(i).getName().contains("潮粮")){
|
|
|
+ biViewInfos.remove(i);
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfos1)){
|
|
|
+ for(int j=0;j<biViewInfos1.size();j++){
|
|
|
+ if(biViewInfos1.get(j).getName().contains(biViewInfos.get(i).getName())){
|
|
|
+ biViewInfos.get(i).setWeight(biViewInfos.get(i).getWeight()+biViewInfos1.get(j).getWeight());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ BiViewInfo biViewInfo1 = new BiViewInfo();
|
|
|
+ biViewInfo1.setName("折算存重");
|
|
|
+ biViewInfo1.setBiViewInfoList(biViewInfos);
|
|
|
+ biViewInfo.setBiViewInfo(biViewInfo1);
|
|
|
biViewInfoList.add(biViewInfo);
|
|
|
return biViewInfoList;
|
|
|
}
|