From 380cf05a92b4482031be420ee4d87ad150821fa6 Mon Sep 17 00:00:00 2001 From: XLR_asd <xueyawei@seaskysh.com> Date: Tue, 15 Jun 2021 09:22:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=20=20=E6=BB=A1=E8=B6=B3=E8=81=94?= =?UTF-8?q?=E8=B0=83=E6=9A=82=E6=97=B6=E6=B3=A8=E9=87=8A=E9=83=A8=E5=88=86?= =?UTF-8?q?RPC=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../db/mapper/xml/ProjectPlanBookMapper.xml | 2 +- .../ProjectPlanQueryServiceImpl.java | 76 +++++++++---------- 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/db/mapper/xml/ProjectPlanBookMapper.xml b/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/db/mapper/xml/ProjectPlanBookMapper.xml index c032e1664..315f6210a 100644 --- a/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/db/mapper/xml/ProjectPlanBookMapper.xml +++ b/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/db/mapper/xml/ProjectPlanBookMapper.xml @@ -875,7 +875,7 @@ d.other_json subjectDetailOtherJson from project_plan_book as a - left join plan_book_target8 as b on a.id = b.plan_book_id + left join plan_book_target as b on a.id = b.plan_book_id left join plan_book_subject as c on a.id = c.plan_book_id left join plan_book_subject_detail as d on c.id = d.parent_id <where> diff --git a/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/reader/projectplan/ProjectPlanQueryServiceImpl.java b/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/reader/projectplan/ProjectPlanQueryServiceImpl.java index 336c839ae..afae2deb5 100644 --- a/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/reader/projectplan/ProjectPlanQueryServiceImpl.java +++ b/ServiceSite/src/main/java/com/seasky/projectplan/infrastructure/reader/projectplan/ProjectPlanQueryServiceImpl.java @@ -62,8 +62,8 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook public ProjectPlanBookOut queryProjectInfoPlanById(Long id) { ProjectInfoPlanDo infoPlanDo = mapper.queryProjectInfoPlanById(id); ProjectPlanBookOut projectPlanBookOut = ProjectPlanQueryConvert.infoDoToOut(infoPlanDo); - FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(infoPlanDo.getProcessId()); - projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); +// FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(infoPlanDo.getProcessId()); +// projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); return projectPlanBookOut; } @@ -77,8 +77,8 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook public ProjectPlanBookOut queryProjectDailyPlanById(Long id) { ProjectDailyPlanDo dailyPlanDo = mapper.queryProjectDailyPlanById(id); ProjectPlanBookOut projectPlanBookOut = ProjectPlanQueryConvert.dailyDoToOut(dailyPlanDo); - FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(dailyPlanDo.getProcessId()); - projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); +// FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(dailyPlanDo.getProcessId()); +// projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); return projectPlanBookOut; } @@ -92,8 +92,8 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook public ProjectPlanBookOut queryProjectPersonPlanById(Long id) { ProjectPersonPlanDo personPlanDo = mapper.queryProjectPersonPlanById(id); ProjectPlanBookOut projectPlanBookOut = ProjectPlanQueryConvert.personDoToOut(personPlanDo); - FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(personPlanDo.getProcessId()); - projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); +// FlowCanShowOut flowCanShowOut = flowRpc.queryFlowInfoByProcessId(personPlanDo.getProcessId()); +// projectPlanBookOut.setFlowCanShowOut(flowCanShowOut); return projectPlanBookOut; } @@ -106,7 +106,7 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook @Override public Pagination<ProjectPlanBookOut> queryProjectInfoPlanPageByCurrentUserDept(ProjectPlanBookQry projectPlanBookQry) { Page<ProjectPlanBookOut> page = new Page<>(projectPlanBookQry.getPageIndex(), projectPlanBookQry.getPageSize()); - makeCurrentUserDeptCodeList(projectPlanBookQry); +// makeCurrentUserDeptCodeList(projectPlanBookQry); Page<ProjectInfoPlanDo> doList = mapper.queryProjectInfoPlanPageByCurrentUserDept(page, projectPlanBookQry); List<ProjectPlanBookOut> projectPlanBookOuts = ProjectPlanQueryConvert.infoDoToOutList(doList.getRecords()); page.setRecords(projectPlanBookOuts); @@ -122,7 +122,7 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook @Override public Pagination<ProjectPlanBookOut> queryProjectDailyPlanByCurrentUserDept(ProjectPlanBookQry projectPlanBookQry) { Page<ProjectPlanBookOut> page = new Page<>(projectPlanBookQry.getPageIndex(), projectPlanBookQry.getPageSize()); - makeCurrentUserDeptCodeList(projectPlanBookQry); +// makeCurrentUserDeptCodeList(projectPlanBookQry); Page<ProjectDailyPlanDo> doList = mapper.queryProjectDailyPlanByCurrentUserDept(page, projectPlanBookQry); List<ProjectPlanBookOut> projectPlanBookOuts = ProjectPlanQueryConvert.dailyDoToOutList(doList.getRecords()); page.setRecords(projectPlanBookOuts); @@ -138,7 +138,7 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook @Override public Pagination<ProjectPlanBookOut> queryProjectPersonPlanByCurrentUserDept(ProjectPlanBookQry projectPlanBookQry) { Page<ProjectPlanBookOut> page = new Page<>(projectPlanBookQry.getPageIndex(), projectPlanBookQry.getPageSize()); - makeCurrentUserDeptCodeList(projectPlanBookQry); +// makeCurrentUserDeptCodeList(projectPlanBookQry); Page<ProjectPersonPlanDo> doList = mapper.queryProjectPersonPlanByCurrentUserDept(page, projectPlanBookQry); List<ProjectPlanBookOut> projectPlanBookOuts = ProjectPlanQueryConvert.personDoToOutList(doList.getRecords()); page.setRecords(projectPlanBookOuts); @@ -169,35 +169,35 @@ public class ProjectPlanQueryServiceImpl extends AbstractService<ProjectPlanBook */ @Override public Pagination<ProjectPlanBookOut> queryProjectInfoPlanPageByOwnCurrentUserDept(ProjectPlanBookQry projectPlanBookQry) { - //鑾峰彇褰撳墠鐧诲綍浜烘墍鍦ㄩ儴闂� 鍘� budget_info 鏍规嵁 鎵€鍦ㄩ儴闂╢unction_dept_json瀛楁 鑾峰彇褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨� - List<OrganizationDTO> organizationList = iUser.getCurrent("").getData().get(0).getOrganizationList(); - List<BudgetInfoPo> budgetInfoPos = budgetInfoMapper.qryBudgetInfoList(BudgetInfoQry.builder().year(projectPlanBookQry.getYear()).build()); - //寰幆 budgetInfoPos 鍒ゆ柇鎵€鍦ㄩ儴闂╢unction_dept_json瀛楁 鏄惁鍦� organizationList涓�,鑻ュ湪鍒欎负 褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨� - //褰撳墠鐧诲綍浜哄彲鏌ョ湅椤圭洰绫诲瀷闆嗗悎 - ArrayList<String> projectTypeList = new ArrayList<>(); - for (OrganizationDTO organizationDTO : organizationList) { - for (BudgetInfoPo budgetPo :budgetInfoPos) { - JSONArray jsonArray = JSON.parseArray(budgetPo.getFunctionDeptJson()); - for (Object o : jsonArray) { - JSONObject jsonObject = JSON.parseObject(o.toString()); - if (jsonObject.get("code").equals(organizationDTO.getCode())){ - projectTypeList.add(budgetPo.getBudgetName()); - break; - } - } - } - } - //鑻ry 鐨� 椤圭洰绫诲瀷projectType 涓嶄负绌� 鍒ゆ柇 鍏舵槸鍚﹀湪 褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨嬮泦鍚堜腑 鑻ヤ笉鍦ㄥ垯 杩斿洖寮傚父 鑻ュ湪鍒欏彧杩斿洖璇ョ被鍨嬬殑椤圭洰缁忚垂鐢虫姤涔� - if (projectPlanBookQry.getProjectType() != null) { - if (projectTypeList.contains(projectPlanBookQry.getProjectType())){ - projectPlanBookQry.getProjectTypeList().add(projectPlanBookQry.getProjectType()); - projectPlanBookQry.setProjectType(null); - }else { - throw new DataAccessException(new Error(ResponseCode.SERVER_INTERNAL_EXCEPTION, null, "鎵€閫夐」鐩被鍨嬮潪褰撳墠鐢ㄦ埛鍙煡鐪嬬殑椤圭洰绫诲瀷", "")); - } - }else { - projectPlanBookQry.setProjectTypeList(projectTypeList); - } +// //鑾峰彇褰撳墠鐧诲綍浜烘墍鍦ㄩ儴闂� 鍘� budget_info 鏍规嵁 鎵€鍦ㄩ儴闂╢unction_dept_json瀛楁 鑾峰彇褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨� +// List<OrganizationDTO> organizationList = iUser.getCurrent("").getData().get(0).getOrganizationList(); +// List<BudgetInfoPo> budgetInfoPos = budgetInfoMapper.qryBudgetInfoList(BudgetInfoQry.builder().year(projectPlanBookQry.getYear()).build()); +// //寰幆 budgetInfoPos 鍒ゆ柇鎵€鍦ㄩ儴闂╢unction_dept_json瀛楁 鏄惁鍦� organizationList涓�,鑻ュ湪鍒欎负 褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨� +// //褰撳墠鐧诲綍浜哄彲鏌ョ湅椤圭洰绫诲瀷闆嗗悎 +// ArrayList<String> projectTypeList = new ArrayList<>(); +// for (OrganizationDTO organizationDTO : organizationList) { +// for (BudgetInfoPo budgetPo :budgetInfoPos) { +// JSONArray jsonArray = JSON.parseArray(budgetPo.getFunctionDeptJson()); +// for (Object o : jsonArray) { +// JSONObject jsonObject = JSON.parseObject(o.toString()); +// if (jsonObject.get("code").equals(organizationDTO.getCode())){ +// projectTypeList.add(budgetPo.getBudgetName()); +// break; +// } +// } +// } +// } +// //鑻ry 鐨� 椤圭洰绫诲瀷projectType 涓嶄负绌� 鍒ゆ柇 鍏舵槸鍚﹀湪 褰撳墠鐧诲綍浜哄彲鏌ョ湅鐨勯」鐩被鍨嬮泦鍚堜腑 鑻ヤ笉鍦ㄥ垯 杩斿洖寮傚父 鑻ュ湪鍒欏彧杩斿洖璇ョ被鍨嬬殑椤圭洰缁忚垂鐢虫姤涔� +// if (projectPlanBookQry.getProjectType() != null) { +// if (projectTypeList.contains(projectPlanBookQry.getProjectType())){ +// projectPlanBookQry.getProjectTypeList().add(projectPlanBookQry.getProjectType()); +// projectPlanBookQry.setProjectType(null); +// }else { +// throw new DataAccessException(new Error(ResponseCode.SERVER_INTERNAL_EXCEPTION, null, "鎵€閫夐」鐩被鍨嬮潪褰撳墠鐢ㄦ埛鍙煡鐪嬬殑椤圭洰绫诲瀷", "")); +// } +// }else { +// projectPlanBookQry.setProjectTypeList(projectTypeList); +// } Page<ProjectPlanBookOut> page = new Page<>(projectPlanBookQry.getPageIndex(), projectPlanBookQry.getPageSize()); Page<ProjectInfoPlanDo> doList = mapper.queryProjectInfoPlanPageByOwnCurrentUserDept(page, projectPlanBookQry); List<ProjectPlanBookOut> projectPlanBookOuts = ProjectPlanQueryConvert.infoDoToOutList(doList.getRecords()); -- GitLab