项目清单 查询修改
This commit is contained in:
+3
@@ -89,6 +89,9 @@ public class SarStandProjectLibrary extends BaseEntity {
|
|||||||
@ApiModelProperty(value = "项目细分类名称")
|
@ApiModelProperty(value = "项目细分类名称")
|
||||||
private String categoryName;
|
private String categoryName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "项目清单维护情况 ( 1:已维护 其他未维护)")
|
||||||
|
private String flag;
|
||||||
|
|
||||||
|
|
||||||
//标准编号
|
//标准编号
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
|
|||||||
+73
-51
@@ -57,14 +57,24 @@
|
|||||||
) AS total
|
) AS total
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library as library
|
sar_stand_project_library as library
|
||||||
LEFT JOIN sar_stand_project_team as team ON team.project_code = library.project_number
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
|
|
||||||
<if test="flag == 1">
|
<if test="flag == 1">
|
||||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
(library.flag != '1' or library.flag IS NULL)
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 2">
|
<if test="flag == 2">
|
||||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
library.flag = '1'
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 4">
|
<if test="flag == 4">
|
||||||
1=1
|
1=1
|
||||||
@@ -116,14 +126,24 @@
|
|||||||
team.`name` as uName
|
team.`name` as uName
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library as library
|
sar_stand_project_library as library
|
||||||
LEFT JOIN sar_stand_project_team as team
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team
|
||||||
ON team.project_code = library.project_number
|
ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
<if test="flag == 1">
|
<if test="flag == 1">
|
||||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
(library.flag != '1' or library.flag IS NULL)
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 2">
|
<if test="flag == 2">
|
||||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
library.flag = '1'
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 4">
|
<if test="flag == 4">
|
||||||
1=1
|
1=1
|
||||||
@@ -181,14 +201,24 @@
|
|||||||
</if>
|
</if>
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library as library
|
sar_stand_project_library as library
|
||||||
LEFT JOIN sar_stand_project_team as team
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team
|
||||||
ON team.project_code = library.project_number
|
ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
<if test="flag == 1">
|
<if test="flag == 1">
|
||||||
library.id NOT IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
(library.flag != '1' or library.flag IS NULL)
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 2">
|
<if test="flag == 2">
|
||||||
library.id IN ( SELECT DISTINCT project_id FROM sar_stand_project_relation WHERE project_id is NOT NULL )
|
library.flag = '1'
|
||||||
</if>
|
</if>
|
||||||
<if test="flag == 4">
|
<if test="flag == 4">
|
||||||
1=1
|
1=1
|
||||||
@@ -201,22 +231,20 @@
|
|||||||
library.*, team.`name` AS uName
|
library.*, team.`name` AS uName
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library as library
|
sar_stand_project_library as library
|
||||||
LEFT JOIN sar_stand_project_team as team ON team.project_code = library.project_number
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
)
|
||||||
|
as team ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
library.id IN (
|
library.flag = '1'
|
||||||
SELECT DISTINCT
|
|
||||||
project_id
|
|
||||||
FROM
|
|
||||||
sar_stand_project_relation
|
|
||||||
WHERE
|
|
||||||
project_id NOT IN (
|
|
||||||
SELECT DISTINCT
|
|
||||||
STAND_ID
|
|
||||||
FROM
|
|
||||||
sar_stand_items
|
|
||||||
)
|
|
||||||
)
|
|
||||||
<if test="qu != null">
|
<if test="qu != null">
|
||||||
<if test="qu.projectNumber != null">
|
<if test="qu.projectNumber != null">
|
||||||
AND library.project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
|
AND library.project_number LIKE concat(concat('%',#{qu.projectNumber}),'%')
|
||||||
@@ -280,22 +308,19 @@
|
|||||||
</if>
|
</if>
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library as library
|
sar_stand_project_library as library
|
||||||
LEFT JOIN sar_stand_project_team as team ON team.project_code = library.project_number
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
) as team ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
library.id IN (
|
library.flag = '1'
|
||||||
SELECT DISTINCT
|
|
||||||
project_id
|
|
||||||
FROM
|
|
||||||
sar_stand_project_relation
|
|
||||||
WHERE
|
|
||||||
project_id NOT IN (
|
|
||||||
SELECT DISTINCT
|
|
||||||
STAND_ID
|
|
||||||
FROM
|
|
||||||
sar_stand_items
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
</select>
|
</select>
|
||||||
<select id="selectCountWorkFlow" resultType="java.lang.Integer">
|
<select id="selectCountWorkFlow" resultType="java.lang.Integer">
|
||||||
@@ -305,22 +330,19 @@
|
|||||||
) AS total
|
) AS total
|
||||||
FROM
|
FROM
|
||||||
sar_stand_project_library AS library
|
sar_stand_project_library AS library
|
||||||
LEFT JOIN sar_stand_project_team AS team ON team.project_code = library.project_number
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
GROUP_CONCAT(sar_stand_project_team.name) as name ,sar_stand_project_team.project_code
|
||||||
|
FROM
|
||||||
|
sar_stand_project_team
|
||||||
|
LEFT JOIN sar_stand_project_team AS a ON a.project_code = sar_stand_project_team.project_code
|
||||||
|
AND a.id != sar_stand_project_team.id
|
||||||
|
group by
|
||||||
|
sar_stand_project_team.project_code
|
||||||
|
) AS team ON team.project_code = library.project_number
|
||||||
WHERE
|
WHERE
|
||||||
(
|
(
|
||||||
library.id IN (
|
library.flag = '1'
|
||||||
SELECT DISTINCT
|
|
||||||
project_id
|
|
||||||
FROM
|
|
||||||
sar_stand_project_relation
|
|
||||||
WHERE
|
|
||||||
project_id NOT IN (
|
|
||||||
SELECT DISTINCT
|
|
||||||
STAND_ID
|
|
||||||
FROM
|
|
||||||
sar_stand_items
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
<if test="qu != null">
|
<if test="qu != null">
|
||||||
<if test="qu.projectNumber != null">
|
<if test="qu.projectNumber != null">
|
||||||
|
|||||||
Reference in New Issue
Block a user