|
@@ -17,6 +17,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.google.common.collect.Lists; |
|
|
import com.hz.pm.api.common.enumeration.ProjectProcessType; |
|
|
import com.hz.pm.api.common.enumeration.ProjectProcessType; |
|
|
import com.hz.pm.api.common.helper.UserInfoHelper; |
|
|
import com.hz.pm.api.common.helper.UserInfoHelper; |
|
|
|
|
|
import com.hz.pm.api.common.model.constant.ExistsSqlConst; |
|
|
import com.hz.pm.api.common.statemachine.event.AbstractStateChangeEvent; |
|
|
import com.hz.pm.api.common.statemachine.event.AbstractStateChangeEvent; |
|
|
import com.hz.pm.api.common.statemachine.event.AdaptStateChangeEvent; |
|
|
import com.hz.pm.api.common.statemachine.event.AdaptStateChangeEvent; |
|
|
import com.hz.pm.api.common.statemachine.event.SelfTestStateChangeEvent; |
|
|
import com.hz.pm.api.common.statemachine.event.SelfTestStateChangeEvent; |
|
@@ -148,7 +149,7 @@ public class PurchaseManage { |
|
|
query.eq(Project::getNewest, Boolean.TRUE); |
|
|
query.eq(Project::getNewest, Boolean.TRUE); |
|
|
query.orderByAsc(Project::getApprovalDate); |
|
|
query.orderByAsc(Project::getApprovalDate); |
|
|
if (req.getBidStatus() != null) { |
|
|
if (req.getBidStatus() != null) { |
|
|
query.exists("select 1 from nd_purchase np where np.project_id = nd_project.id " + |
|
|
|
|
|
|
|
|
query.exists(ExistsSqlConst.PROJECT_EXISTS_PURCHASE + |
|
|
"and (np.status = {0} or np.adapt_status = {0} or np.self_test_status = {0} " + |
|
|
"and (np.status = {0} or np.adapt_status = {0} or np.self_test_status = {0} " + |
|
|
" or np.test_valid_status = {0} or np.xcfhx_apply_status = {0})", req.getBidStatus()); |
|
|
" or np.test_valid_status = {0} or np.xcfhx_apply_status = {0})", req.getBidStatus()); |
|
|
} |
|
|
} |
|
@@ -483,6 +484,8 @@ public class PurchaseManage { |
|
|
.le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) |
|
|
.le(req.getCreateOnMax() != null, Purchase::getCreateOn, req.getCreateOnMax()) |
|
|
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) |
|
|
.ge(req.getCreateOnMin() != null, Purchase::getCreateOn, req.getCreateOnMin()) |
|
|
.eq(req.getStatus() != null, function, req.getStatus()) |
|
|
.eq(req.getStatus() != null, function, req.getStatus()) |
|
|
|
|
|
.notExists(ExistsSqlConst.PURCHASE_EXISTS_PROJECT |
|
|
|
|
|
+ "and np.stage != {0}", ProjectStatus.STOPPED) |
|
|
.isNotNull(function) |
|
|
.isNotNull(function) |
|
|
.orderByDesc(Purchase::getCreateOn); |
|
|
.orderByDesc(Purchase::getCreateOn); |
|
|
boolean display = !Boolean.FALSE.equals(req.getDisplay()); |
|
|
boolean display = !Boolean.FALSE.equals(req.getDisplay()); |
|
|