Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
fd189a67
Commit
fd189a67
authored
Jan 28, 2026
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-跨库查档案的合同表,因为需要查询合同的最新状态,合同表只用到身份证和项目编码和id三个字段,跨库查效率较高,如果后期改库需要调整这块代码
parent
c3f85d4f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
TDispatchInfoPreMapper.xml
...-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
+2
-3
No files found.
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
View file @
fd189a67
...
@@ -403,7 +403,7 @@
...
@@ -403,7 +403,7 @@
AND a.IS_CREATE_DATE = #{tDispatchInfoPre.isCreateDate}
AND a.IS_CREATE_DATE = #{tDispatchInfoPre.isCreateDate}
</if>
</if>
<if
test=
"tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''"
>
<if
test=
"tDispatchInfoPre.contractStatus != null and tDispatchInfoPre.contractStatus.trim() != ''"
>
AND if(b.
id
is not null,'0','1') = #{tDispatchInfoPre.contractStatus}
AND if(b.
EMP_IDCARD
is not null,'0','1') = #{tDispatchInfoPre.contractStatus}
</if>
</if>
<if
test=
"tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''"
>
<if
test=
"tDispatchInfoPre.failType != null and tDispatchInfoPre.failType.trim() != ''"
>
AND a.error_info is not null
AND a.error_info is not null
...
@@ -456,7 +456,7 @@
...
@@ -456,7 +456,7 @@
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
,if(b.EMP_IDCARD is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
,if(b.EMP_IDCARD is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
FROM t_dispatch_info_pre a
FROM t_dispatch_info_pre a
<!--huych:跨库
查档案的合同表,因为需要查询合同的最新状态,合同表只用到身份证和项目编码和id三个字段,跨库查效率较高,如果后期改库
需要调整这块代码-->
<!--huych:跨库
建档案的合同视图,因为需要查询合同的最新状态,合同表只用到身份证和项目编码两个字段,跨库查效率较高,如果后期档案改库名
需要调整这块代码-->
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
<where>
a.DELETE_FLAG = '0'
a.DELETE_FLAG = '0'
...
@@ -493,7 +493,6 @@
...
@@ -493,7 +493,6 @@
SELECT
SELECT
count(a.id)
count(a.id)
FROM t_dispatch_info_pre a
FROM t_dispatch_info_pre a
left join view_contract b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
<where>
1=1 and a.type_sub = '1'
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
and a.DELETE_FLAG = '0'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment