|
@@ -1896,97 +1896,65 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
public AjaxResult procurementOfficeWillManipulateTotalNum() {
|
|
|
List<StatisticalChartsResVo> result = new ArrayList<>();
|
|
|
// 采购需求对接,专家意见反馈,采购文件编制审核,采购公告发布,标前质疑投诉,待开标,评标结果公告,流废标处置,标后质疑
|
|
|
- List<PmDemandResVo> listByStatus = getListByStatus(PmProjectStatus.PURCHASE_DEMAND_DOCKING.getCode());
|
|
|
+ Integer numByStatus = getNumByStatus(PmProjectStatus.PURCHASE_DEMAND_DOCKING.getCode());
|
|
|
StatisticalChartsResVo chartsResVo = new StatisticalChartsResVo();
|
|
|
+ chartsResVo.setNum(numByStatus);
|
|
|
chartsResVo.setColumnName("采购需求对接");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus)) {
|
|
|
- chartsResVo.setNum(listByStatus.size());
|
|
|
- } else {
|
|
|
- chartsResVo.setNum(0);
|
|
|
- }
|
|
|
result.add(chartsResVo);
|
|
|
|
|
|
- List<PmDemandResVo> listByStatus1 = getListByStatus(PmProjectStatus.EXPERT_FEEDBACK.getCode());
|
|
|
+ Integer numByStatus1 = getNumByStatus(PmProjectStatus.EXPERT_FEEDBACK.getCode());
|
|
|
StatisticalChartsResVo chartsResVo1 = new StatisticalChartsResVo();
|
|
|
chartsResVo1.setColumnName("专家意见反馈");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus1)) {
|
|
|
- chartsResVo1.setNum(listByStatus1.size());
|
|
|
- } else {
|
|
|
- chartsResVo1.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo1.setNum(numByStatus1);
|
|
|
result.add(chartsResVo1);
|
|
|
|
|
|
- List<PmDemandResVo> listByStatus2 = getListByStatus(PmProjectStatus.PROCUREMENT_DOCUMENTS_REVIEW.getCode());
|
|
|
+ Integer numByStatus2 = getNumByStatus(PmProjectStatus.PROCUREMENT_DOCUMENTS_REVIEW.getCode());
|
|
|
StatisticalChartsResVo chartsResVo2 = new StatisticalChartsResVo();
|
|
|
chartsResVo2.setColumnName("采购文件编制审核");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus2)) {
|
|
|
- chartsResVo2.setNum(listByStatus2.size());
|
|
|
- } else {
|
|
|
- chartsResVo2.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo2.setNum(numByStatus2);
|
|
|
result.add(chartsResVo2);
|
|
|
- List<PmDemandResVo> listByStatus3 = getListByStatus(PmProjectStatus.PROCUREMENT_ANNOUNCEMENT.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus3 = getNumByStatus(PmProjectStatus.PROCUREMENT_ANNOUNCEMENT.getCode());
|
|
|
StatisticalChartsResVo chartsResVo3 = new StatisticalChartsResVo();
|
|
|
chartsResVo3.setColumnName("采购公告发布");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus3)) {
|
|
|
- chartsResVo3.setNum(listByStatus3.size());
|
|
|
- } else {
|
|
|
- chartsResVo3.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo3.setNum(numByStatus3);
|
|
|
result.add(chartsResVo3);
|
|
|
- List<PmDemandResVo> listByStatus4 = getListByStatus(PmProjectStatus.PRE_BID_QUERY.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus4 = getNumByStatus(PmProjectStatus.PRE_BID_QUERY.getCode());
|
|
|
StatisticalChartsResVo chartsResVo4 = new StatisticalChartsResVo();
|
|
|
chartsResVo4.setColumnName("标前质疑投诉");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus4)) {
|
|
|
- chartsResVo4.setNum(listByStatus4.size());
|
|
|
- } else {
|
|
|
- chartsResVo4.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo4.setNum(numByStatus4);
|
|
|
result.add(chartsResVo4);
|
|
|
- List<PmDemandResVo> listByStatus5 = getListByStatus(PmProjectStatus.WAIT_OPEN_BID.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus5 = getNumByStatus(PmProjectStatus.WAIT_OPEN_BID.getCode());
|
|
|
StatisticalChartsResVo chartsResVo5 = new StatisticalChartsResVo();
|
|
|
chartsResVo5.setColumnName("待开标");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus5)) {
|
|
|
- chartsResVo5.setNum(listByStatus5.size());
|
|
|
- } else {
|
|
|
- chartsResVo5.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo5.setNum(numByStatus5);
|
|
|
result.add(chartsResVo5);
|
|
|
- List<PmDemandResVo> listByStatus6 = getListByStatus(PmProjectStatus.BID_RESULT_ANNOUNCEMENT.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus6 = getNumByStatus(PmProjectStatus.BID_RESULT_ANNOUNCEMENT.getCode());
|
|
|
StatisticalChartsResVo chartsResVo6 = new StatisticalChartsResVo();
|
|
|
chartsResVo6.setColumnName("评标结果公告");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus6)) {
|
|
|
- chartsResVo6.setNum(listByStatus6.size());
|
|
|
- } else {
|
|
|
- chartsResVo6.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo6.setNum(numByStatus6);
|
|
|
result.add(chartsResVo6);
|
|
|
- List<PmDemandResVo> listByStatus7 = getListByStatus(PmProjectStatus.WASTE_BID_HANDLE.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus7 = getNumByStatus(PmProjectStatus.WASTE_BID_HANDLE.getCode());
|
|
|
StatisticalChartsResVo chartsResVo7 = new StatisticalChartsResVo();
|
|
|
chartsResVo7.setColumnName("流废标处置");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus7)) {
|
|
|
- chartsResVo7.setNum(listByStatus7.size());
|
|
|
- } else {
|
|
|
- chartsResVo7.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo7.setNum(numByStatus7);
|
|
|
result.add(chartsResVo7);
|
|
|
- List<PmDemandResVo> listByStatus8 = getListByStatus(PmProjectStatus.POST_BID_QUERY.getCode());
|
|
|
+
|
|
|
+ Integer numByStatus8 = getNumByStatus(PmProjectStatus.POST_BID_QUERY.getCode());
|
|
|
StatisticalChartsResVo chartsResVo8 = new StatisticalChartsResVo();
|
|
|
chartsResVo8.setColumnName("标后质疑");
|
|
|
- if (!ObjectUtils.isEmpty(listByStatus8)) {
|
|
|
- chartsResVo8.setNum(listByStatus8.size());
|
|
|
- } else {
|
|
|
- chartsResVo8.setNum(0);
|
|
|
- }
|
|
|
- result.add(chartsResVo8); //计划数据--发函催告
|
|
|
- List<PlanQuarterResponseVo> planRes = planYearsService.willSendLetter();
|
|
|
+ chartsResVo8.setNum(numByStatus8);
|
|
|
+ result.add(chartsResVo8);
|
|
|
+
|
|
|
+ //计划数据--发函催告
|
|
|
+ Integer letterNum = planYearsService.willSendLetterNum();
|
|
|
StatisticalChartsResVo chartsResVo9 = new StatisticalChartsResVo();
|
|
|
chartsResVo9.setColumnName("发函催告");
|
|
|
- if (!ObjectUtils.isEmpty(planRes)) {
|
|
|
- chartsResVo9.setNum(planRes.size());
|
|
|
- } else {
|
|
|
- chartsResVo9.setNum(0);
|
|
|
- }
|
|
|
+ chartsResVo9.setNum(letterNum);
|
|
|
result.add(chartsResVo9);
|
|
|
|
|
|
StatisticalChartsResVo chartsResVoT = new StatisticalChartsResVo();
|
|
@@ -3903,7 +3871,7 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
if (!ObjectUtils.isEmpty(list) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
lw.in(PmDemand::getDemandId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
|
}
|
|
|
-
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, projectStatus);
|
|
|
lw.eq(PmDemand::getPurchaseDeptId, SecurityUtils.getDeptId());
|
|
|
lw.last(" order by project_status, plan_demand_sub_time");
|
|
|
List<PmDemand> demandList = this.baseMapper.selectList(lw);
|
|
@@ -3915,6 +3883,27 @@ public class PmDemandServiceImpl extends ServiceImpl<PmDemandMapper, PmDemand> i
|
|
|
return pmDemandResponseVoList;
|
|
|
}
|
|
|
|
|
|
+ //查询不同状态下的项目数据的数量
|
|
|
+ public Integer getNumByStatus(String projectStatus) {
|
|
|
+ LambdaQueryWrapper<PmDemand> lw = new LambdaQueryWrapper<PmDemand>();
|
|
|
+ // 4 (合同信息管理)、 0(需求单位管理) 、 5(项目建设管理) 需求单位
|
|
|
+ // 1(需求需求审核) 、2 (任务下达管理) 采购管理部门
|
|
|
+ // 3(采购执行管理) 采购办
|
|
|
+ List<PmAuditDeptRef> list = new ArrayList<>();
|
|
|
+ LambdaQueryWrapper<PmAuditDeptRef> l = new LambdaQueryWrapper<>();
|
|
|
+ l.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
+ l.eq(PmAuditDeptRef::getRefType, "2");
|
|
|
+ list = pmAuditDeptRefService.list(l);
|
|
|
+ if (!ObjectUtils.isEmpty(list) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
+ lw.in(PmDemand::getDemandId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
|
+ }
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, projectStatus);
|
|
|
+ lw.eq(PmDemand::getPurchaseDeptId, SecurityUtils.getDeptId());
|
|
|
+ lw.last(" order by project_status, plan_demand_sub_time");
|
|
|
+ Long count = this.baseMapper.selectCount(lw);
|
|
|
+ return Math.toIntExact(count);
|
|
|
+ }
|
|
|
+
|
|
|
//字段转换and赋值
|
|
|
public List<PmDemandResVo> demandChangeTo(List<PmDemand> pmDemandList) {
|
|
|
List<PmDemandResVo> pmDemandResponseVoList = new ArrayList<>();
|