|
@@ -1123,6 +1123,8 @@ public class BiInfoController {
|
|
private CommonUserMapper commonUserMapper;
|
|
private CommonUserMapper commonUserMapper;
|
|
@Autowired
|
|
@Autowired
|
|
private SettledCompanyInfoMapper settledCompanyInfoMapper;
|
|
private SettledCompanyInfoMapper settledCompanyInfoMapper;
|
|
|
|
+ @Autowired
|
|
|
|
+ private DryWarehouseMapper dryWarehouseMapper;
|
|
|
|
|
|
|
|
|
|
@GetMapping("/selectPhoneBiInfo")
|
|
@GetMapping("/selectPhoneBiInfo")
|
|
@@ -1388,10 +1390,182 @@ public class BiInfoController {
|
|
biViewInfo1.setName("折算存重");
|
|
biViewInfo1.setName("折算存重");
|
|
biViewInfo1.setBiViewInfoList(biViewInfos);
|
|
biViewInfo1.setBiViewInfoList(biViewInfos);
|
|
biViewInfoList.add(biViewInfo1);
|
|
biViewInfoList.add(biViewInfo1);
|
|
|
|
+
|
|
|
|
+ //烘干 烘干入库量
|
|
|
|
+ List<BiViewInfo> biViewInfos2 = new ArrayList<>();
|
|
|
|
+ List<BiViewInfo> biViewInfohongganList = dryWarehouseMapper.selectSumWareHongByGoods(companyId, null, seachMonth, jointVentureParties);
|
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfohongganList)){
|
|
|
|
+ for(int i=0;i<biViewInfohongganList.size();i++){
|
|
|
|
+ BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
|
+ biViewInfo.setName(biViewInfohongganList.get(i).getName());
|
|
|
|
+ biViewInfo.setWeight(biViewInfohongganList.get(i).getWeight());
|
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfochaoList2)){
|
|
|
|
+ for (int j = 0; j < biViewInfochaoList2.size(); j++) {
|
|
|
|
+ if (biViewInfohongganList.get(i).getName().equals(biViewInfochaoList2.get(j).getName())) {
|
|
|
|
+ if(biViewInfohongganList.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0) <= 0){
|
|
|
|
+ biViewInfo.setWeight(0d);
|
|
|
|
+ }else{
|
|
|
|
+ biViewInfo.setWeight(biViewInfohongganList.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0));
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ biViewInfos2.add(biViewInfo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ BiViewInfo biViewInfo2 = new BiViewInfo();
|
|
|
|
+ biViewInfo2.setName("烘干");
|
|
|
|
+ biViewInfo2.setBiViewInfoList(biViewInfos2);
|
|
|
|
+ biViewInfoList.add(biViewInfo2);
|
|
|
|
+
|
|
|
|
+
|
|
return biViewInfoList;
|
|
return biViewInfoList;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 仓库 纯重 烘干
|
|
|
|
+ *
|
|
|
|
+ * @param compId
|
|
|
|
+ * @param biViewInfoList
|
|
|
|
+ * @return
|
|
|
|
+ */
|
|
|
|
+ @GetMapping("/quantityChunHong")
|
|
|
|
+ public List<BiViewInfo> quantityChunHong(String compId, String seachMonth, List<BiViewInfo> biViewInfoList) {
|
|
|
|
+ String userId = "";
|
|
|
|
+ if (AuthSecurityUtils.getCurrentUserInfo() != null && AuthSecurityUtils.getCurrentUserInfo().getUserId() != null) {
|
|
|
|
+ userId = AuthSecurityUtils.getCurrentUserInfo().getUserId();
|
|
|
|
+ }
|
|
|
|
+ String jointVentureParties = null;
|
|
|
|
+ if ("647b84ee01044e2a8d4fdc1943ce3d01,ec7024427b7347b98bcad422761e5bfc,23eff8bab2ed4af38a1be1315ce7046d,d958ef5aa62849039802356a63f6e7ca".contains(userId)) {
|
|
|
|
+ jointVentureParties = "洮南市鸿胜粮贸有限公司";
|
|
|
|
+ }
|
|
|
|
+ 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++) {
|
|
|
|
+ BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
|
+ biViewInfo.setName(biViewInfoList1.get(i).getName());
|
|
|
|
+ biViewInfo.setWeight(biViewInfoList1.get(i).getWeight());
|
|
|
|
+ if (CollectionUtils.isNotEmpty(biViewInfoList2)) {
|
|
|
|
+ for (int j = 0; j < biViewInfoList2.size(); j++) {
|
|
|
|
+ if (biViewInfoList1.get(i).getName().equals(biViewInfoList2.get(j).getName())) {
|
|
|
|
+ if(biViewInfoList1.get(i).getWeight() - biViewInfoList2.get(j).getWeight() <= 0){
|
|
|
|
+ biViewInfo.setWeight(0d);
|
|
|
|
+ }else{
|
|
|
|
+ biViewInfo.setWeight(biViewInfoList1.get(i).getWeight() - biViewInfoList2.get(j).getWeight());
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ if(biViewInfo.getWeight() == 0){
|
|
|
|
+ continue;
|
|
|
|
+ }
|
|
|
|
+ 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);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ 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);
|
|
|
|
+ biViewInfoList.add(biViewInfo1);
|
|
|
|
+
|
|
|
|
+ //烘干 烘干入库量
|
|
|
|
+ List<BiViewInfo> biViewInfos2 = new ArrayList<>();
|
|
|
|
+ List<BiViewInfo> biViewInfohongganList = dryWarehouseMapper.selectSumWareHongByGoods(companyId, null, seachMonth, jointVentureParties);
|
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfohongganList)){
|
|
|
|
+ for(int i=0;i<biViewInfohongganList.size();i++){
|
|
|
|
+ BiViewInfo biViewInfo = new BiViewInfo();
|
|
|
|
+ biViewInfo.setName(biViewInfohongganList.get(i).getName());
|
|
|
|
+ biViewInfo.setWeight(biViewInfohongganList.get(i).getWeight());
|
|
|
|
+ if(CollectionUtils.isNotEmpty(biViewInfochaoList2)){
|
|
|
|
+ for (int j = 0; j < biViewInfochaoList2.size(); j++) {
|
|
|
|
+ if (biViewInfohongganList.get(i).getName().equals(biViewInfochaoList2.get(j).getName())) {
|
|
|
|
+ if(biViewInfohongganList.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0) <= 0){
|
|
|
|
+ biViewInfo.setWeight(0d);
|
|
|
|
+ }else{
|
|
|
|
+ biViewInfo.setWeight(biViewInfohongganList.get(i).getWeight() - (biViewInfochaoList2.get(j).getWeight() != null?biViewInfochaoList2.get(j).getWeight():0));
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ biViewInfos2.add(biViewInfo);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ BiViewInfo biViewInfo2 = new BiViewInfo();
|
|
|
|
+ biViewInfo2.setName("烘干");
|
|
|
|
+ biViewInfo2.setBiViewInfoList(biViewInfos2);
|
|
|
|
+ biViewInfoList.add(biViewInfo2);
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ return biViewInfoList;
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 库存数量
|
|
* 库存数量
|
|
*
|
|
*
|