liujie
2023-05-24 0c9e25aff0133d05bdaca55d1369eb90342b0b05
src/main/java/com/stylefeng/guns/modular/system/service/impl/TOrderServiceImpl.java
@@ -248,8 +248,12 @@
            }
            // 获取卡车公司收入
            Double companyIncome = this.baseMapper.getCompanyIncome(id, sTime, eTime);
            if(companyIncome==null){
                indexInfo.setAccountsReceivable(new BigDecimal(0));
            }else {
            indexInfo.setAccountsReceivable(new BigDecimal(companyIncome));
                indexInfo.setAccountsReceivable(new BigDecimal(companyIncome));
            }
            // 获取卡车公司支出-》 是否存在承运商  -》算价格
            EntityWrapper<TOrder> wrapper = new EntityWrapper<>();
            wrapper.eq("company_id",id);
@@ -299,7 +303,7 @@
            for (int i = 0; i <12; i++) {
                if(i==0){
                    IndexMonth indexMonth = new IndexMonth();
                    int month = DateUtil.thisMonth();
                    int month = DateUtil.thisMonth()+1;
                    indexMonth.setMonth(month);
                    indexMonth.setOrderNumber(this.baseMapper.selectCount(new EntityWrapper<TOrder>().eq("company_id",id).between("pay_time",DateUtil.beginOfMonth(new Date()),DateUtil.endOfMonth(new Date()))));
                    indexMonths.add(indexMonth);
@@ -307,7 +311,7 @@
                    IndexMonth indexMonth = new IndexMonth();
                    instance.add(Calendar.MONTH, -1);
                    Date time1 = instance.getTime();
                    int month = DateUtil.month(time1);
                    int month = DateUtil.month(time1)+1;
                    indexMonth.setMonth(month);
                    indexMonth.setOrderNumber(this.baseMapper.selectCount(new EntityWrapper<TOrder>().eq("company_id",id).between("pay_time",DateUtil.beginOfMonth(time1),DateUtil.endOfMonth(time1))));
                    indexMonths.add(indexMonth);
@@ -364,7 +368,7 @@
            }
            // 根据订单id 获取价格
            List<TPrice> prices = priceMapper.selectList(new EntityWrapper<TPrice>().eq("order_id", tOrder.getId()));
            List<TPrice> prices = priceMapper.selectList(new EntityWrapper<TPrice>().eq("order_id", tOrder.getId()).eq("status",1));
            ArrayList<TPriceVo> priceVos = new ArrayList<TPriceVo>();
            for (TPrice price : prices) {
@@ -485,9 +489,11 @@
            if(!"0".equals(warehouse)){
                TWarehouse tWarehouse = wareHouseMapper.selectList(new EntityWrapper<TWarehouse>().eq("company_id", tOrder.getCompanyId()).eq("code", warehouse)).get(0);
                orderInfo.setWareHouse(tWarehouse.getAddress());
                orderInfo.setEndAddress(tWarehouse.getAddress());
            }else {
                // destination信息
                orderInfo.setEndAddress(tOrder.geteAddress());
            }
            // destination信息
            orderInfo.setEndAddress(tOrder.geteAddress());
            orderInfo.setECompanyName(tOrder.geteCompanyName());
            orderInfo.setEContactName(tOrder.geteName());
            orderInfo.setEContactPhone(tOrder.getePhone());
@@ -501,6 +507,7 @@
            ArrayList<String> strings = new ArrayList<>();
            goods.forEach(e->{
                strings.add(e.getContainerNumber());
                orderInfo.setGoodsId(e.getId());
                orderInfo.setBl(e.getBillNumber());
            });
            orderInfo.setContainer(strings);