修改查询除了非改项目下标准的数据
This commit is contained in:
+13
-5
@@ -460,9 +460,13 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
//cars传回值为1时判断是从车型项目库中调取
|
//cars传回值为1时判断是从车型项目库中调取
|
||||||
|
|
||||||
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
QueryWrapper<SarStandardsInfo> wrapper1 = new QueryWrapper<>();
|
||||||
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","TEXT_STATUS","STAND_TYPE","ISSUE_TIME","(select count(*) from sar_stand_unqualified " +
|
wrapper1.select("ID","STAND_NUMBER","STAND_SORT","STAND_YEAR","STAND_NAME","STAND_EN_NAME","TEXT_STATUS","STAND_TYPE","ISSUE_TIME",
|
||||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '1' ) as unCount ","(select count(*) from sar_stand_unqualified" +
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
" where STAND_ID = r.stand_id and CLOSE_STATE = '2' ) as counts ",
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + standId + "') as unCount ",
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts ",
|
||||||
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
"(select GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) from sar_stand_unqualified where " +
|
||||||
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
" STAND_ID = r.stand_id and CLOSE_STATE = '1' AND PLAN_CLOSE_TIME is NOT NULL ) as endTimes ");
|
||||||
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
|
wrapper1.last("INNER JOIN sar_stand_project_relation r ON r.stand_id = sar_standards_info.ID WHERE r.project_id ='" + standId + "'" +
|
||||||
@@ -477,8 +481,12 @@ public class SarStandProjectLibraryServiceImpl extends ServiceImpl<SarStandProje
|
|||||||
"TEXT_STATUS_BUSS as TEXT_STATUS," +
|
"TEXT_STATUS_BUSS as TEXT_STATUS," +
|
||||||
"'BUSINESS_STAND' as STAND_TYPE," +
|
"'BUSINESS_STAND' as STAND_TYPE," +
|
||||||
"ISSUE_TIME,"+
|
"ISSUE_TIME,"+
|
||||||
"( SELECT count( * ) FROM sar_stand_unqualified WHERE STAND_ID = r.stand_id AND CLOSE_STATE = '1' ) AS unCount," +
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
"( SELECT count( * ) FROM sar_stand_unqualified WHERE STAND_ID = r.stand_id AND CLOSE_STATE = '2' ) AS counts," +
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '1' and pn.id = '" + standId + "') as unCount, "+
|
||||||
|
"(select count(*) from sar_stand_unqualified ssu " +
|
||||||
|
"inner join sar_stand_project_library pn on pn.project_number = ssu.product_id" +
|
||||||
|
" where ssu.STAND_ID = r.stand_id and ssu.CLOSE_STATE = '2' and pn.id = '" + standId + "') as counts, "+
|
||||||
"(" +
|
"(" +
|
||||||
"SELECT " +
|
"SELECT " +
|
||||||
"GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) " +
|
"GROUP_CONCAT( DISTINCT DATE_FORMAT( PLAN_CLOSE_TIME, '%Y-%m-%d' ) ORDER BY PLAN_CLOSE_TIME ) " +
|
||||||
|
|||||||
Reference in New Issue
Block a user