|
@@ -5,7 +5,6 @@ import cn.hutool.core.bean.BeanUtil;
|
|
|
import cn.hutool.core.convert.Convert;
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.gree.mall.miniapp.bean.order.MaterialOrderBuy;
|
|
|
import com.gree.mall.miniapp.bean.user.CurrentCompanyWechat;
|
|
@@ -33,7 +32,6 @@ import java.math.BigDecimal;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
@Service
|
|
|
@Slf4j
|
|
@@ -106,70 +104,81 @@ public class RpMaterialLogic {
|
|
|
public IPage<RpMaterialOrder> page(String examineStatus, Integer pageNum, Integer pageSize) {
|
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
|
|
|
- List<String> collect = rpProjectRepairByService.lambdaQuery().eq(RpProjectRepairBy::getMobile, currentCompanyWechat.getUser().getMobile())
|
|
|
- .select(RpProjectRepairBy::getProjectRepairId).list().stream().map(RpProjectRepairBy::getProjectRepairId).collect(Collectors.toList());
|
|
|
-
|
|
|
-
|
|
|
- Page<RpMaterialOrder> page = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(!StringUtil.isEmpty(examineStatus), RpMaterialOrder::getExamineStatus, examineStatus)
|
|
|
- .orderByDesc(RpMaterialOrder::getCreateTime)
|
|
|
- .page(new Page<>(pageNum, pageSize));
|
|
|
+// List<String> collect = rpProjectRepairByService.lambdaQuery().eq(RpProjectRepairBy::getMobile, currentCompanyWechat.getUser().getMobile())
|
|
|
+// .select(RpProjectRepairBy::getProjectRepairId).list().stream().map(RpProjectRepairBy::getProjectRepairId).collect(Collectors.toList());
|
|
|
+//
|
|
|
+//
|
|
|
+// Page<RpMaterialOrder> page = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(!StringUtil.isEmpty(examineStatus), RpMaterialOrder::getExamineStatus, examineStatus)
|
|
|
+// .orderByDesc(RpMaterialOrder::getCreateTime)
|
|
|
+// .page(new Page<>(pageNum, pageSize));
|
|
|
+ Page<RpMaterialOrder> page = new Page<>();
|
|
|
+ page.setRecords(new ArrayList<>());
|
|
|
+ page.setTotal(0);
|
|
|
+ page.setSize(pageSize);
|
|
|
+ page.setCurrent(pageNum);
|
|
|
return page;
|
|
|
}
|
|
|
|
|
|
public RpMaterialOrderCount pageCount() {
|
|
|
CurrentCompanyWechat currentCompanyWechat = commonLogic.getCurrentCompanyWechat();
|
|
|
|
|
|
- List<String> collect = rpProjectRepairByService.lambdaQuery().eq(RpProjectRepairBy::getMobile, currentCompanyWechat.getUser().getMobile())
|
|
|
- .select(RpProjectRepairBy::getProjectRepairId).list().stream().map(RpProjectRepairBy::getProjectRepairId).collect(Collectors.toList());
|
|
|
-
|
|
|
- Integer qb = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .count();
|
|
|
- Integer dsp = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.WAIT.getKey())
|
|
|
- .count();
|
|
|
-
|
|
|
- Integer shtg = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.OK.getKey())
|
|
|
-
|
|
|
- .count();
|
|
|
-
|
|
|
- Integer spbh = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.FAIL.getKey())
|
|
|
-
|
|
|
- .count();
|
|
|
-
|
|
|
- Integer yxczf = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(RpMaterialOrder::getExamineStatus, PayStatusEnum.PAID.getKey())
|
|
|
-
|
|
|
- .count();
|
|
|
-
|
|
|
- Integer yqx = rpMaterialOrderService.lambdaQuery()
|
|
|
- .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
- .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
- .eq(RpMaterialOrder::getExamineStatus, MaterialExamineStatusEnum.NO.getKey())
|
|
|
-
|
|
|
- .count();
|
|
|
+// List<String> collect = rpProjectRepairByService.lambdaQuery().eq(RpProjectRepairBy::getMobile, currentCompanyWechat.getUser().getMobile())
|
|
|
+// .select(RpProjectRepairBy::getProjectRepairId).list().stream().map(RpProjectRepairBy::getProjectRepairId).collect(Collectors.toList());
|
|
|
+//
|
|
|
+// Integer qb = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .count();
|
|
|
+// Integer dsp = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.WAIT.getKey())
|
|
|
+// .count();
|
|
|
+//
|
|
|
+// Integer shtg = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.OK.getKey())
|
|
|
+//
|
|
|
+// .count();
|
|
|
+//
|
|
|
+// Integer spbh = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(RpMaterialOrder::getExamineStatus, ExamineStatusEnum.FAIL.getKey())
|
|
|
+//
|
|
|
+// .count();
|
|
|
+//
|
|
|
+// Integer yxczf = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(RpMaterialOrder::getExamineStatus, PayStatusEnum.PAID.getKey())
|
|
|
+//
|
|
|
+// .count();
|
|
|
+//
|
|
|
+// Integer yqx = rpMaterialOrderService.lambdaQuery()
|
|
|
+// .and(item -> item.eq(RpMaterialOrder::getWorkerMobile, currentCompanyWechat.getUser().getMobile()).or()
|
|
|
+// .in(!CollectionUtils.isEmpty(collect), RpMaterialOrder::getRpProjectRepairId, collect))
|
|
|
+// .eq(RpMaterialOrder::getExamineStatus, MaterialExamineStatusEnum.NO.getKey())
|
|
|
+//
|
|
|
+// .count();
|
|
|
|
|
|
RpMaterialOrderCount rpMaterialOrderCount = new RpMaterialOrderCount();
|
|
|
- rpMaterialOrderCount.setQb(qb);
|
|
|
- rpMaterialOrderCount.setDsp(dsp);
|
|
|
- rpMaterialOrderCount.setSptg(shtg);
|
|
|
- rpMaterialOrderCount.setSpbh(spbh);
|
|
|
- rpMaterialOrderCount.setYxczf(yxczf);
|
|
|
- rpMaterialOrderCount.setYqx(yqx);
|
|
|
+// rpMaterialOrderCount.setQb(qb);
|
|
|
+// rpMaterialOrderCount.setDsp(dsp);
|
|
|
+// rpMaterialOrderCount.setSptg(shtg);
|
|
|
+// rpMaterialOrderCount.setSpbh(spbh);
|
|
|
+// rpMaterialOrderCount.setYxczf(yxczf);
|
|
|
+// rpMaterialOrderCount.setYqx(yqx);
|
|
|
+ rpMaterialOrderCount.setQb(0);
|
|
|
+ rpMaterialOrderCount.setDsp(0);
|
|
|
+ rpMaterialOrderCount.setSptg(0);
|
|
|
+ rpMaterialOrderCount.setSpbh(0);
|
|
|
+ rpMaterialOrderCount.setYxczf(0);
|
|
|
+ rpMaterialOrderCount.setYqx(0);
|
|
|
|
|
|
return rpMaterialOrderCount;
|
|
|
|