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
e9ac31c4
Commit
e9ac31c4
authored
Jan 28, 2026
by
huyuchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
huych-跨库查档案的合同表,因为需要查询合同的最新状态,合同表只用到身份证和项目编码和id三个字段,跨库查效率较高,如果后期改库需要调整这块代码
parent
6ef82d29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
TDispatchInfoPreMapper.xml
...-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
+8
-7
No files found.
yifu-social/yifu-social-biz/src/main/resources/mapper/TDispatchInfoPreMapper.xml
View file @
e9ac31c4
...
...
@@ -456,7 +456,8 @@
<include
refid=
"Base_Column_List"
/>
,if(b.id is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
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
<!--huych:跨库查档案的合同表,因为需要查询合同的最新状态,合同表只用到身份证和项目编码和id三个字段,跨库查效率较高,如果后期改库需要调整这块代码-->
left join mvp_archives.t_employee_contract_info b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0'
<include
refid=
"tDispatchInfoPre_where"
/>
...
...
@@ -470,7 +471,7 @@
count(a.id)
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '0'
<include
refid=
"tDispatchInfoPre_where"
/>
...
...
@@ -480,7 +481,7 @@
SELECT
count(a.id)
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
...
...
@@ -492,7 +493,7 @@
SELECT
count(a.id)
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
1=1 and a.type_sub = '1'
and a.DELETE_FLAG = '0'
...
...
@@ -530,7 +531,7 @@
a.BIRTH_START,
a.BIGAILMENT_START
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0' and a.type_sub = '0'
<include
refid=
"tDispatchInfoPre_where"
/>
...
...
@@ -568,7 +569,7 @@
a.customer_username,
a.FUND_START_DATE
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0' and a.type_sub = '1'
<include
refid=
"tDispatchInfoPre_where"
/>
...
...
@@ -585,7 +586,7 @@
<include
refid=
"Base_Column_List"
/>
,if(b.id is not null,'0','1') as CONTRACT_STATUS,a.FUND_START_DATE
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
left join
mvp_archives.t_employee_contract_info
b on a.EMP_IDCARD = b.EMP_IDCARD and a.DEPT_NO = b.DEPT_NO
<where>
a.DELETE_FLAG = '0'
<include
refid=
"tDispatchInfoPre_other_where"
/>
...
...
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