Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-service-hmhj
Overview
Overview
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
wangweidong
patzn-cloud-service-hmhj
Commits
b2682797
Commit
b2682797
authored
Jan 25, 2022
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改验收台账查询;
parent
ddef03e8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
37 deletions
+40
-37
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+40
-37
No files found.
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
b2682797
...
...
@@ -127,45 +127,48 @@
<select
id=
"selectVOList"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
with sample as (
SELECT
s.company_id,s.entrust_id,max(s.sample_from) "sample_from"
from entrust_sample s where s.deleted = 0
<if
test=
"null != vo.sampleCode"
>
and s.code like concat('%',#{vo.sampleCode},'%')
</if>
<if
test=
"null != vo.sampleStatus"
>
and s.status = #{vo.sampleStatus}
</if>
<if
test=
"null != vo.judgeStatus"
>
and s.judge_status = #{vo.judgeStatus}
</if>
<if
test=
"null == vo.sampleType"
>
and s.type = 0
</if>
<if
test=
"null != vo.sampleType"
>
and s.type = #{vo.sampleType}
</if>
<if
test=
"null != vo.judgeStatusList"
>
and s.judge_status IN
<foreach
collection=
"vo.judgeStatusList"
index=
"index"
item=
"judgeStatus"
open=
"("
separator=
","
close=
")"
>
#{judgeStatus}
</foreach>
</if>
<if
test=
"null != vo.notSampleStatus"
>
and s.status != #{vo.notSampleStatus}
</if>
<if
test=
"null != vo.itemStatus || null != vo.testerId"
>
AND exists (
select 1 from entrust_sample_item i where i.deleted = 0
<if
test=
"null != vo.itemStatus"
>
and i.entrust_sample_id = s.id and i.status = #{vo.itemStatus}
SELECT
s.company_id,s.entrust_id,max(s.sample_from) "sample_from"
from entrust_sample s where s.deleted = 0
<if
test=
"null != vo.sampleCode"
>
and s.code like concat('%',#{vo.sampleCode},'%')
</if>
<if
test=
"null != vo.
testerId
"
>
and
i.entrust_sample_id = s.id and i.tester_id = #{vo.testerId}
<if
test=
"null != vo.
sampleName
"
>
and
s.name like concat('%',#{vo.sampleName},'%')
</if>
)
</if>
GROUP BY s.company_id,s.entrust_id
<if
test=
"null != vo.sampleStatus"
>
and s.status = #{vo.sampleStatus}
</if>
<if
test=
"null != vo.judgeStatus"
>
and s.judge_status = #{vo.judgeStatus}
</if>
<if
test=
"null == vo.sampleType"
>
and s.type = 0
</if>
<if
test=
"null != vo.sampleType"
>
and s.type = #{vo.sampleType}
</if>
<if
test=
"null != vo.judgeStatusList"
>
and s.judge_status IN
<foreach
collection=
"vo.judgeStatusList"
index=
"index"
item=
"judgeStatus"
open=
"("
separator=
","
close=
")"
>
#{judgeStatus}
</foreach>
</if>
<if
test=
"null != vo.notSampleStatus"
>
and s.status != #{vo.notSampleStatus}
</if>
<if
test=
"null != vo.itemStatus || null != vo.testerId"
>
AND exists (
select 1 from entrust_sample_item i where i.deleted = 0
<if
test=
"null != vo.itemStatus"
>
and i.entrust_sample_id = s.id and i.status = #{vo.itemStatus}
</if>
<if
test=
"null != vo.testerId"
>
and i.entrust_sample_id = s.id and i.tester_id = #{vo.testerId}
</if>
)
</if>
GROUP BY s.company_id,s.entrust_id
)
SELECT e.*,s.sample_from,r.report_send_time
FROM entrust e
...
...
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