|
|
@ -78,7 +78,7 @@ |
|
|
|
|
|
|
|
|
<insert id="saveProjectInfoTracking"> |
|
|
<insert id="saveProjectInfoTracking"> |
|
|
<selectKey keyProperty="projectId" resultType="int" order="BEFORE"> |
|
|
<selectKey keyProperty="projectId" resultType="int" order="BEFORE"> |
|
|
SELECT ISNULL(MAX(id), 10000) + 1 |
|
|
|
|
|
|
|
|
SELECT ISNULL(MAX(CASE WHEN id >= 100000 THEN id END), 100000) + 1 |
|
|
FROM plm_project_info_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
FROM plm_project_info_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
</selectKey> |
|
|
</selectKey> |
|
|
INSERT INTO plm_project_info_tracking |
|
|
INSERT INTO plm_project_info_tracking |
|
|
@ -255,7 +255,7 @@ |
|
|
|
|
|
|
|
|
<insert id="saveProjectPartTracking"> |
|
|
<insert id="saveProjectPartTracking"> |
|
|
<selectKey keyProperty="projectPartId" resultType="int" order="BEFORE"> |
|
|
<selectKey keyProperty="projectPartId" resultType="int" order="BEFORE"> |
|
|
SELECT ISNULL(MAX(id), 10000) + 1 |
|
|
|
|
|
|
|
|
SELECT ISNULL(MAX(CASE WHEN id >= 100000 THEN id END), 100000) + 1 |
|
|
FROM plm_project_part_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
FROM plm_project_part_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
</selectKey> |
|
|
</selectKey> |
|
|
INSERT INTO plm_project_part_tracking |
|
|
INSERT INTO plm_project_part_tracking |
|
|
@ -411,7 +411,7 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectNextProjectInfoTrackingId" resultType="java.lang.Integer"> |
|
|
<select id="selectNextProjectInfoTrackingId" resultType="java.lang.Integer"> |
|
|
SELECT ISNULL(MAX(id), 10000) + 1 |
|
|
|
|
|
|
|
|
SELECT ISNULL(MAX(CASE WHEN id >= 100000 THEN id END), 100000) + 1 |
|
|
FROM plm_project_info_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
FROM plm_project_info_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
@ -528,7 +528,7 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectNextProjectPartTrackingId" resultType="java.lang.Integer"> |
|
|
<select id="selectNextProjectPartTrackingId" resultType="java.lang.Integer"> |
|
|
SELECT ISNULL(MAX(id), 10000) + 1 |
|
|
|
|
|
|
|
|
SELECT ISNULL(MAX(CASE WHEN id >= 100000 THEN id END), 100000) + 1 |
|
|
FROM plm_project_part_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
FROM plm_project_part_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
@ -655,7 +655,7 @@ |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
<select id="selectNextProofTrackingId" resultType="java.lang.Integer"> |
|
|
<select id="selectNextProofTrackingId" resultType="java.lang.Integer"> |
|
|
SELECT ISNULL(MAX(id), 10000) + 1 |
|
|
|
|
|
|
|
|
SELECT ISNULL(MAX(CASE WHEN id >= 100000 THEN id END), 100000) + 1 |
|
|
FROM plm_proofing_information_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
FROM plm_proofing_information_tracking WITH (TABLOCKX, HOLDLOCK) |
|
|
</select> |
|
|
</select> |
|
|
|
|
|
|
|
|
|