|
@@ -801,7 +801,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
*/
|
|
|
@Override
|
|
|
public List<PlanQuarterResponseVo> planWaitCommit() {
|
|
|
- return getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
+ //是否是查询审核(要过滤掉本单位的超额计划)
|
|
|
+ String isAd = "false";
|
|
|
+ return getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode(), isAd);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -811,7 +813,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
*/
|
|
|
@Override
|
|
|
public List<PlanQuarterResponseVo> planWaitExamine() {
|
|
|
- return getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode());
|
|
|
+ //是否是查询审核(要过滤掉本单位的超额计划)
|
|
|
+ String isAd = "true";
|
|
|
+ return getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode(), isAd);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -820,7 +824,8 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
@Override
|
|
|
public AjaxResult demandUnitWillManipulateTotal() {
|
|
|
//计划待提交,需求待提交,合同待填制,项目建设待完成
|
|
|
- List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
+ String isAd = "false";
|
|
|
+ List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode(), isAd);
|
|
|
List<PmDemand> demandRes = demandService.demandWaitCommit();
|
|
|
demandRes.addAll(demandService.contractWaitFilled());
|
|
|
demandRes.addAll(demandService.projectWaitFinish());
|
|
@@ -835,7 +840,8 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
public AjaxResult demandUnitWillManipulateTotalNum() {
|
|
|
List<StatisticalChartsResVo> result = new ArrayList<>();
|
|
|
//计划待提交,需求待提交,合同待填制,项目建设待完成
|
|
|
- Integer numByProjectStatus = getNumByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode());
|
|
|
+ String isAd = "false";
|
|
|
+ Integer numByProjectStatus = getNumByProjectStatus(ProjectStatus.PLANWAITCOMMIT.getCode(), isAd);
|
|
|
Integer numByStatus = demandService.getNumByStatus(PmProjectStatus.DEMAND_WAIT_COMMIT.getCode());
|
|
|
Integer numByStatus1 = demandService.getNumByStatus(PmProjectStatus.CONTRACT_WAIT_FILL.getCode());
|
|
|
Integer numByStatus2 = demandService.getNumByStatus(PmProjectStatus.UNDER_CONSTRUCTION.getCode());
|
|
@@ -870,7 +876,8 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
@Override
|
|
|
public AjaxResult purchasingManagementWillManipulateTotal() {
|
|
|
//计划待审核,需求待审核,任务待下达
|
|
|
- List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode());
|
|
|
+ String isAd = "true";
|
|
|
+ List<PlanQuarterResponseVo> planRes = getListByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode(), isAd);
|
|
|
List<PmDemand> demandRes = demandService.demandWaitExamine();
|
|
|
demandRes.addAll(demandService.taskWaitRelease());
|
|
|
List<PmDemandResVo> resVos = demandService.listToVoList(demandRes);
|
|
@@ -907,7 +914,8 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
public AjaxResult purchasingManagementWillManipulateTotalNum() {
|
|
|
List<StatisticalChartsResVo> result = new ArrayList<>();
|
|
|
//计划待审核,需求待审核,任务待下达
|
|
|
- Integer status = getNumByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode());
|
|
|
+ String isAd = "true";
|
|
|
+ Integer status = getNumByProjectStatus(ProjectStatus.PLANWAIEXAMINE.getCode(), isAd);
|
|
|
Integer numByStatus = demandService.getNumByStatus(PmProjectStatus.DEMAND_WAIT_AUDIT.getCode());
|
|
|
Integer numByStatus1 = demandService.getNumByStatus(PmProjectStatus.TASK_WAIT_RELEASE.getCode());
|
|
|
|
|
@@ -1131,7 +1139,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
* @param projectStatus
|
|
|
* @return
|
|
|
*/
|
|
|
- public List<PlanQuarterResponseVo> getListByProjectStatus(String projectStatus) {
|
|
|
+ public List<PlanQuarterResponseVo> getListByProjectStatus(String projectStatus, String isAd) {
|
|
|
LoginUser user = SecurityUtils.getLoginUser();
|
|
|
LambdaQueryWrapper<PlanYears> yearsLp = new LambdaQueryWrapper<PlanYears>();
|
|
|
yearsLp.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
@@ -1141,6 +1149,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
LambdaQueryWrapper<PmAuditDeptRef> l = new LambdaQueryWrapper<>();
|
|
|
l.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
l.eq(PmAuditDeptRef::getRefType, "0");
|
|
|
+ if (isAd.equals("true")) {
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, "0");
|
|
|
+ }
|
|
|
list = pmAuditDeptRefService.list(l);
|
|
|
if (!ObjectUtils.isEmpty(list) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
yearsLp.in(PlanYears::getPlanYearId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
@@ -1155,6 +1166,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
LambdaQueryWrapper<PmAuditDeptRef> lq = new LambdaQueryWrapper<>();
|
|
|
lq.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
lq.eq(PmAuditDeptRef::getRefType, "1");
|
|
|
+ if (isAd.equals("true")) {
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, "0");
|
|
|
+ }
|
|
|
listF = pmAuditDeptRefService.list(lq);
|
|
|
if (!ObjectUtils.isEmpty(listF) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
yearsLp.in(PlanYears::getPlanYearId, listF.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
@@ -1166,7 +1180,7 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
}
|
|
|
|
|
|
//计划待提交、计划待审核的数量
|
|
|
- public Integer getNumByProjectStatus(String projectStatus) {
|
|
|
+ public Integer getNumByProjectStatus(String projectStatus, String isAd) {
|
|
|
LoginUser user = SecurityUtils.getLoginUser();
|
|
|
LambdaQueryWrapper<PlanYears> yearsLp = new LambdaQueryWrapper<PlanYears>();
|
|
|
yearsLp.eq(PlanYears::getDelFlay, DataIsDelete.DataNOTDelete.getCode());
|
|
@@ -1176,6 +1190,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
LambdaQueryWrapper<PmAuditDeptRef> l = new LambdaQueryWrapper<>();
|
|
|
l.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
l.eq(PmAuditDeptRef::getRefType, "0");
|
|
|
+ if (isAd.equals("true")) {
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, "0");
|
|
|
+ }
|
|
|
list = pmAuditDeptRefService.list(l);
|
|
|
if (!ObjectUtils.isEmpty(list) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
yearsLp.in(PlanYears::getPlanYearId, list.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|
|
@@ -1190,6 +1207,9 @@ public class PlanYearsServiceImpl extends ServiceImpl<PlanYearsMapper, PlanYears
|
|
|
LambdaQueryWrapper<PmAuditDeptRef> lq = new LambdaQueryWrapper<>();
|
|
|
lq.eq(PmAuditDeptRef::getDeptId, SecurityUtils.getDeptId());
|
|
|
lq.eq(PmAuditDeptRef::getRefType, "1");
|
|
|
+ if (isAd.equals("true")) {
|
|
|
+ l.eq(PmAuditDeptRef::getStatus, "0");
|
|
|
+ }
|
|
|
listF = pmAuditDeptRefService.list(lq);
|
|
|
if (!ObjectUtils.isEmpty(listF) && !SysUser.isAdmin(SecurityUtils.getUserId())) {
|
|
|
yearsLp.in(PlanYears::getPlanYearId, listF.stream().map(PmAuditDeptRef::getRefId).collect(Collectors.toList()));
|