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
d5322f40
Commit
d5322f40
authored
Aug 24, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试问题修改
parent
1fc0b93f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
38 deletions
+57
-38
ContractSampleController.java
...ervice/lims/hmhj/controller/ContractSampleController.java
+20
-0
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+5
-2
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+32
-36
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/ContractSampleController.java
View file @
d5322f40
...
@@ -366,6 +366,26 @@ public class ContractSampleController extends ServiceController {
...
@@ -366,6 +366,26 @@ public class ContractSampleController extends ServiceController {
ContractSampleStatusEnum
.
OUT_DRIFT
,
ContractSampleStatusEnum
.
OUT_DRIFT
,
ContractSampleStatusEnum
.
OUT_INPUT
,
ContractSampleStatusEnum
.
OUT_INPUT
,
ContractSampleStatusEnum
.
ENTRUST_REG
,
ContractSampleStatusEnum
.
ENTRUST_REG
,
ContractSampleStatusEnum
.
STORAGE_REGISTER
,
ContractSampleStatusEnum
.
ACCEPTANCE_CHECK_PUBLISH
));
contractSample
.
setUserOrgName
(
userInfoService
.
getOrgNameByUserPeriod
(
getAccount
(),
"二期验收室"
,
"三期验收室"
));
return
success
(
contractSampleService
.
pageVO
(
getPage
(),
contractSample
));
}
@ApiOperation
(
"储运入库登记历史分页列表"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_PAGE
,
value
=
"请求数据的页码"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_ROWS
,
value
=
"每页条数"
,
required
=
true
,
paramType
=
"query"
,
dataTypeClass
=
Integer
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SIDX
,
value
=
"排序字段"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
@ApiImplicitParam
(
name
=
RestConstants
.
PAGE_SORD
,
value
=
"排序方式"
,
paramType
=
"query"
,
dataTypeClass
=
String
.
class
),
})
@PostMapping
(
"/page_storage_register_his"
)
public
RestResult
<
Page
<
ContractSampleVO
>>
getPageStorageRegisterHis
(
ContractSampleVO
contractSample
)
{
contractSample
.
setStatusList
(
Lists
.
newArrayList
(
ContractSampleStatusEnum
.
OUT_DRIFT
,
ContractSampleStatusEnum
.
OUT_INPUT
,
ContractSampleStatusEnum
.
ENTRUST_REG
,
ContractSampleStatusEnum
.
ACCEPTANCE_CHECK_PUBLISH
ContractSampleStatusEnum
.
ACCEPTANCE_CHECK_PUBLISH
));
));
contractSample
.
setUserOrgName
(
userInfoService
.
getOrgNameByUserPeriod
(
getAccount
(),
"二期验收室"
,
"三期验收室"
));
contractSample
.
setUserOrgName
(
userInfoService
.
getOrgNameByUserPeriod
(
getAccount
(),
"二期验收室"
,
"三期验收室"
));
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
d5322f40
...
@@ -1014,7 +1014,9 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
...
@@ -1014,7 +1014,9 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
int
composeJudge
=
null
==
t
.
getComposeJudge
()
?
0
:
t
.
getComposeJudge
().
intValue
();
int
composeJudge
=
null
==
t
.
getComposeJudge
()
?
0
:
t
.
getComposeJudge
().
intValue
();
// 符合此条件,需要判断是否此标准且为稀有元素且值小于0.01即可忽略为0
// 符合此条件,需要判断是否此标准且为稀有元素且值小于0.01即可忽略为0
RestAssert
.
fail
(!
isNumber
(
testValue
),
String
.
format
(
"样品编号【%s】存在错误检测值【%s】"
,
sample
.
getCode
(),
testValue
));
RestAssert
.
fail
(!
isNumber
(
testValue
),
String
.
format
(
"样品编号【%s】存在错误检测值【%s】"
,
sample
.
getCode
(),
testValue
));
if
(
1
==
composeJudge
||
(
isSpecStandard
&&
otherYsList
.
contains
(
t
.
getName
())
&&
Double
.
parseDouble
(
testValue
)
>=
0.01
))
{
// 判定包含稀有元素
boolean
incSpecElement
=
otherYsList
.
stream
().
anyMatch
(
x
->
t
.
getName
().
contains
(
x
));
if
(
1
==
composeJudge
||
(
isSpecStandard
&&
incSpecElement
&&
Double
.
parseDouble
(
testValue
)
>=
0.01
))
{
return
new
BigDecimal
(
testValue
);
return
new
BigDecimal
(
testValue
);
}
}
return
BigDecimal
.
ZERO
;
return
BigDecimal
.
ZERO
;
...
@@ -1530,7 +1532,8 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
...
@@ -1530,7 +1532,8 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
List
<
EntrustSampleItemIndexVO
>
itemIndexVOList
=
entrustSampleItemIndexService
.
listVOBySampleIds
(
Collections
.
singletonList
(
vo
.
getId
()));
List
<
EntrustSampleItemIndexVO
>
itemIndexVOList
=
entrustSampleItemIndexService
.
listVOBySampleIds
(
Collections
.
singletonList
(
vo
.
getId
()));
for
(
EntrustSampleItemIndexVO
indexVO
:
itemIndexVOList
)
{
for
(
EntrustSampleItemIndexVO
indexVO
:
itemIndexVOList
)
{
if
(
StringUtils
.
isBlank
(
indexVO
.
getTestValue
())
||
!
otherYsList
.
contains
(
indexVO
.
getName
()))
{
boolean
incSpecElement
=
otherYsList
.
stream
().
anyMatch
(
t
->
indexVO
.
getName
().
contains
(
t
));
if
(
StringUtils
.
isBlank
(
indexVO
.
getTestValue
())
||
!
incSpecElement
)
{
continue
;
continue
;
}
}
if
(
Double
.
parseDouble
(
indexVO
.
getTestValue
())
>=
0.01d
)
{
if
(
Double
.
parseDouble
(
indexVO
.
getTestValue
())
>=
0.01d
)
{
...
...
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
d5322f40
...
@@ -124,24 +124,38 @@
...
@@ -124,24 +124,38 @@
<select
id=
"selectVOList"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
<select
id=
"selectVOList"
resultType=
"com.patzn.cloud.service.hmhj.vo.EntrustVO"
>
with sample as (
with sample as (
select s.* from (
SELECT
select s.*,row_number() over(partition by s.entrust_id order by s.id asc) "rn" from entrust_sample s where s.deleted = 0 and s.type = 0
s.company_id,s.entrust_id,max(s.sample_from) "sample_from"
<if
test=
"null != vo.sampleStatus"
>
from entrust_sample s where s.deleted = 0 and s.type = 0
and s.status = #{vo.sampleStatus}
<if
test=
"null != vo.sampleStatus"
>
</if>
and s.status = #{vo.sampleStatus}
<if
test=
"null != vo.judgeStatus"
>
</if>
and s.judge_status = #{vo.judgeStatus}
<if
test=
"null != vo.judgeStatus"
>
</if>
and s.judge_status = #{vo.judgeStatus}
<if
test=
"null != vo.judgeStatusList"
>
</if>
and s.judge_status IN
<if
test=
"null != vo.judgeStatusList"
>
<foreach
collection=
"vo.judgeStatusList"
index=
"index"
item=
"judgeStatus"
open=
"("
separator=
","
close=
")"
>
and s.judge_status IN
#{judgeStatus}
<foreach
collection=
"vo.judgeStatusList"
index=
"index"
item=
"judgeStatus"
open=
"("
separator=
","
close=
")"
>
</foreach>
#{judgeStatus}
</if>
</foreach>
<if
test=
"null != vo.notSampleStatus"
>
</if>
and s.status != #{vo.notSampleStatus}
<if
test=
"null != vo.notSampleStatus"
>
</if>
and s.status != #{vo.notSampleStatus}
) s where s.rn = 1
</if>
<if
test=
"null != vo.itemStatus"
>
AND exists (
select 1 from entrust_sample_item i where i.deleted = 0
and i.entrust_sample_id = s.id and i.status = #{vo.itemStatus}
)
</if>
<if
test=
"null!=vo.testerId"
>
and exists (
select 1 from entrust_sample_item i where i.deleted = 0
and i.entrust_sample_id = s.id and i.tester_id = #{vo.testerId}
)
</if>
GROUP BY s.company_id,s.entrust_id
)
)
SELECT e.*,s.sample_from
SELECT e.*,s.sample_from
FROM entrust e
FROM entrust e
...
@@ -159,24 +173,6 @@
...
@@ -159,24 +173,6 @@
)
)
</if>
</if>
<if
test=
"null != vo.itemStatus"
>
AND exists (
select 1 from entrust_sample_item i
join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0
and s.entrust_id = e.id and i.status = #{vo.itemStatus}
)
</if>
<if
test=
"null!=vo.testerId"
>
and exists (
select 1 from entrust_sample_item i
join entrust_sample s on i.entrust_sample_id = s.id
where s.deleted = 0 and i.deleted = 0
and s.entrust_id = e.id and i.tester_id = #{vo.testerId}
)
</if>
<if
test=
"null != vo.reportStatus"
>
<if
test=
"null != vo.reportStatus"
>
AND exists (
AND exists (
select 1 from entrust_report r where r.deleted = 0 and r.entrust_id = e.id
select 1 from entrust_report r where r.deleted = 0 and r.entrust_id = e.id
...
...
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