修改施工产值查询

This commit is contained in:
lcj
2025-08-29 14:55:23 +08:00
parent c9041df9b8
commit 3f5396e347
2 changed files with 11 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import org.dromara.out.service.IOutConstructionValueService;
import org.dromara.progress.domain.PgsProgressCategory;
import org.dromara.progress.domain.vo.progresscategory.PgsProgressCategoryVo;
import org.dromara.progress.service.IPgsProgressCategoryService;
import org.dromara.project.domain.BusProject;
import org.dromara.project.domain.vo.project.BusProjectVo;
import org.dromara.project.service.IBusProjectService;
import org.springframework.context.event.EventListener;
@ -54,6 +55,8 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
private final IPgsProgressCategoryService pgsProgressCategoryService;
private final IBusProjectService projectService;
/**
* 查询施工产值
*
@ -100,7 +103,14 @@ public class OutConstructionValueServiceImpl extends ServiceImpl<OutConstruction
Map<String, Object> params = bo.getParams();
LambdaQueryWrapper<OutConstructionValue> lqw = Wrappers.lambdaQuery();
lqw.orderByDesc(OutConstructionValue::getId);
lqw.eq(bo.getProjectId() != null, OutConstructionValue::getProjectId, bo.getProjectId());
Long projectId = bo.getProjectId();
if (projectId != null) {
// 获取子项目列表
List<BusProject> subProjectIds = projectService.lambdaQuery()
.eq(BusProject::getPId, projectId)
.list();
lqw.in(OutConstructionValue::getProjectId, projectId, subProjectIds);
}
lqw.eq(bo.getMatrixId() != null, OutConstructionValue::getMatrixId, bo.getMatrixId());
lqw.eq(bo.getProgressCategoryId() != null, OutConstructionValue::getProgressCategoryId, bo.getProgressCategoryId());
lqw.eq(bo.getArtificialNum() != null, OutConstructionValue::getArtificialNum, bo.getArtificialNum());

View File

@ -63,7 +63,6 @@ public class BusUserProjectRelevancyController extends BaseController {
/**
* 查询登录用户与项目关联分页
*/
@SaCheckPermission("project:projectRelevancy:loginPage")
@GetMapping("/login/page")
public TableDataInfo<BusUserProjectRelevancyVo> pageByLoginUser(BusUserProjectRelevancyQueryReq req, PageQuery pageQuery) {
Long userId = LoginHelper.getUserId();