|
@@ -1,23 +1,21 @@
|
|
|
package com.fjhx.form.service.impl;
|
|
|
|
|
|
-import com.fjhx.account.entity.account.po.AccountRunningWater;
|
|
|
import com.fjhx.account.service.account.AccountRunningWaterService;
|
|
|
-import com.fjhx.common.enums.FlowStatusEnum1;
|
|
|
-import com.fjhx.flow.entity.flow.po.FlowExampleCurrent;
|
|
|
-import com.fjhx.flow.service.flow.FlowExampleCurrentService;
|
|
|
+import com.fjhx.common.entity.claim.dto.ClaimSelectDto;
|
|
|
+import com.fjhx.flow.entity.flow.dto.FlowExampleSelectDto;
|
|
|
import com.fjhx.flow.service.flow.FlowExampleService;
|
|
|
import com.fjhx.form.mapper.StatisticsMapper;
|
|
|
import com.fjhx.form.service.StatisticsService;
|
|
|
-import com.fjhx.mes.entity.production.po.ProductionOrder;
|
|
|
+import com.fjhx.mes.entity.production.dto.ProduceOrderSelectDto;
|
|
|
import com.fjhx.mes.service.production.ProduceOrderService;
|
|
|
import com.fjhx.sale.entity.contract.vo.ContractVo;
|
|
|
import com.fjhx.sale.entity.purchase.vo.EhsdPurchaseVo;
|
|
|
-import com.fjhx.sale.entity.sale.po.SaleQuotation;
|
|
|
+import com.fjhx.sale.entity.sale.dto.SaleQuotationSelectDto;
|
|
|
+import com.fjhx.sale.service.claim.ClaimService;
|
|
|
import com.fjhx.sale.service.sale.SaleQuotationService;
|
|
|
import com.fjhx.wms.entity.stock.dto.StockSelectDto;
|
|
|
import com.fjhx.wms.entity.stock.dto.StockWaitSelectDto;
|
|
|
import com.fjhx.wms.service.stock.StockService;
|
|
|
-import com.fjhx.wms.service.stock.StockWaitDetailsService;
|
|
|
import com.fjhx.wms.service.stock.StockWaitService;
|
|
|
import com.ruoyi.common.utils.SecurityUtils;
|
|
|
import com.ruoyi.common.utils.wrapper.IWrapper;
|
|
@@ -43,11 +41,9 @@ public class StatisticsServiceImpl implements StatisticsService {
|
|
|
@Autowired
|
|
|
private StockService stockService;
|
|
|
@Autowired
|
|
|
- private StockWaitDetailsService stockWaitDetailsService;
|
|
|
- @Autowired
|
|
|
private StockWaitService stockWaitService;
|
|
|
@Autowired
|
|
|
- private FlowExampleCurrentService flowExampleCurrentService;
|
|
|
+ private ClaimService claimService;
|
|
|
|
|
|
/**
|
|
|
* 工作统计
|
|
@@ -63,35 +59,36 @@ public class StatisticsServiceImpl implements StatisticsService {
|
|
|
boolean isHeadOffice = companyIds.contains(100L);
|
|
|
|
|
|
//统计待审批数据
|
|
|
- long waitFlowCount = flowExampleCurrentService.count(q -> q.eq(FlowExampleCurrent::getHandleUserId, userId));
|
|
|
+ FlowExampleSelectDto flowExampleSelectDto = new FlowExampleSelectDto();
|
|
|
+ flowExampleSelectDto.setStatus(1);
|
|
|
+ long waitFlowCount = flowExampleService.getToBeProcessedPage(flowExampleSelectDto).getTotal();
|
|
|
+
|
|
|
//待报价 总公司对内报价单 子公司 报价评估
|
|
|
- long waitQuotationCount = saleQuotationService.count(q -> q
|
|
|
- //总公司
|
|
|
- .in(SaleQuotation::getCompanyId, companyIds)
|
|
|
- .ne(SaleQuotation::getStatus, FlowStatusEnum1.UPDATE.getKey())
|
|
|
- //子公司
|
|
|
- .ne(!isHeadOffice, SaleQuotation::getStatus, FlowStatusEnum1.DRAFT.getKey())
|
|
|
- .ne(SaleQuotation::getQuotationStatus, 2)
|
|
|
- );
|
|
|
+ SaleQuotationSelectDto saleQuotationSelectDto = new SaleQuotationSelectDto();
|
|
|
+ saleQuotationSelectDto.setIsEstimate(1);
|
|
|
+ saleQuotationSelectDto.setQuotationStatus("0,1");
|
|
|
+ long waitQuotationCount = saleQuotationService.getPage(saleQuotationSelectDto).getTotal();
|
|
|
+
|
|
|
//待投产
|
|
|
- long waitProduceCount = produceOrderService.count(q -> q
|
|
|
- .isNull(ProductionOrder::getProduceTime)
|
|
|
- .in(!isHeadOffice, ProductionOrder::getCompanyId, companyIds)
|
|
|
- );
|
|
|
+ ProduceOrderSelectDto produceOrderSelectDto = new ProduceOrderSelectDto();
|
|
|
+ produceOrderSelectDto.setIsProduce(0);
|
|
|
+ long waitProduceCount = produceOrderService.getPage(produceOrderSelectDto).getTotal();
|
|
|
+
|
|
|
//待入库
|
|
|
StockWaitSelectDto stockWaitSelectDto = new StockWaitSelectDto();
|
|
|
stockWaitSelectDto.setType(1);
|
|
|
long waitInStockCount = stockWaitService.getPage(stockWaitSelectDto).getTotal();
|
|
|
+
|
|
|
//待出库
|
|
|
StockWaitSelectDto stockWaitSelectDto1 = new StockWaitSelectDto();
|
|
|
stockWaitSelectDto1.setType(2);
|
|
|
long waitOutStockCount = stockWaitService.getPage(stockWaitSelectDto1).getTotal();
|
|
|
+
|
|
|
//到账认领待认领计数-总公司
|
|
|
- long waitClaimCount = accountRunningWaterService.count(q -> q
|
|
|
- .eq(AccountRunningWater::getReceived, 10)
|
|
|
- .eq(AccountRunningWater::getIsClaim, 0)
|
|
|
- .in(!isHeadOffice, AccountRunningWater::getCompanyId, companyIds)
|
|
|
- );
|
|
|
+ ClaimSelectDto claimSelectDto = new ClaimSelectDto();
|
|
|
+ claimSelectDto.setConfirmStatus(0);
|
|
|
+ long waitClaimCount = claimService.claimInfoConfirmPage(claimSelectDto).getTotal();
|
|
|
+
|
|
|
//库存预警-子公司看
|
|
|
long stockWarnCount = stockService.stockWarningPage(new StockSelectDto()).getTotal();
|
|
|
|