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
9d81f9ad
Commit
9d81f9ad
authored
Jul 06, 2021
by
lijingjing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加各个模块模糊查询;
parent
8f180ad8
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
67 additions
and
7 deletions
+67
-7
EntrustController.java
...cloud/service/lims/hmhj/controller/EntrustController.java
+2
-0
OriginalRecordController.java
...ervice/lims/hmhj/controller/OriginalRecordController.java
+5
-0
ContractSampleItemServiceImpl.java
...lims/hmhj/service/impl/ContractSampleItemServiceImpl.java
+6
-1
ContractSampleServiceImpl.java
...ice/lims/hmhj/service/impl/ContractSampleServiceImpl.java
+10
-0
EntrustSampleItemServiceImpl.java
.../lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
+5
-1
EntrustSamplePrepareServiceImpl.java
...ms/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
+13
-3
EntrustServiceImpl.java
...ud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
+16
-2
EntrustMapper.xml
src/main/resources/mapper/hmhj/EntrustMapper.xml
+3
-0
OriginalRecordMapper.xml
src/main/resources/mapper/hmhj/OriginalRecordMapper.xml
+7
-0
No files found.
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/EntrustController.java
View file @
9d81f9ad
...
...
@@ -416,6 +416,8 @@ public class EntrustController extends ServiceController {
@PostMapping
(
"/page_entrust_test_data"
)
public
RestResult
<
Page
<
EntrustVO
>>
getPageTaskTestData
(
EntrustVO
entrust
)
{
entrust
.
setItemStatus
(
EntrustSampleItemStatusEnum
.
TEST
);
// 过滤当前人为检测人的委托数据
entrust
.
setTesterId
(
getAccount
().
getUserId
());
// 获取当前用户分组
entrust
.
setGroupNameList
(
userInfoService
.
getCurGroupNameList
());
return
success
(
entrustService
.
pageEntrustByItemData
(
getPage
(),
entrust
));
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/controller/OriginalRecordController.java
View file @
9d81f9ad
...
...
@@ -2,6 +2,7 @@ package com.patzn.cloud.service.lims.hmhj.controller;
import
com.patzn.cloud.service.hmhj.entity.OriginalRecord
;
import
com.patzn.cloud.service.hmhj.vo.OriginalRecordVO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
...
...
@@ -56,6 +57,10 @@ public class OriginalRecordController extends ServiceController {
})
@PostMapping
(
"/pageVO"
)
public
RestResult
<
Page
<
OriginalRecordVO
>>
getPageVO
(
OriginalRecordVO
originalRecordVO
)
{
// 数据检测只能当前人看
if
(
StringUtils
.
isNotBlank
(
originalRecordVO
.
getSource
())
&&
"test"
.
equalsIgnoreCase
(
originalRecordVO
.
getSource
()))
{
originalRecordVO
.
setTesterId
(
getAccount
().
getUserId
());
}
return
success
(
originalRecordService
.
pageVO
(
getPage
(),
originalRecordVO
));
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/ContractSampleItemServiceImpl.java
View file @
9d81f9ad
...
...
@@ -5,6 +5,7 @@ import com.patzn.cloud.service.hmhj.entity.ContractSampleItem;
import
com.patzn.cloud.service.lims.hmhj.mapper.ContractSampleItemMapper
;
import
com.patzn.cloud.service.lims.hmhj.service.IContractSampleItemService
;
import
com.patzn.cloud.commons.service.impl.BaseServiceImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.mapper.EntityWrapper
;
import
com.baomidou.mybatisplus.mapper.Wrapper
;
...
...
@@ -23,8 +24,12 @@ public class ContractSampleItemServiceImpl extends BaseServiceImpl<ContractSampl
@Override
public
Page
<
ContractSampleItem
>
page
(
Page
<
ContractSampleItem
>
page
,
ContractSampleItem
contractSampleItem
)
{
String
name
=
contractSampleItem
.
getName
();
contractSampleItem
.
setName
(
null
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
contractSampleItem
);
if
(
StringUtils
.
isNotBlank
(
name
)){
wrapper
.
like
(
"name"
,
name
);
}
return
this
.
page
(
page
,
wrapper
);
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/ContractSampleServiceImpl.java
View file @
9d81f9ad
...
...
@@ -59,7 +59,17 @@ public class ContractSampleServiceImpl extends BaseServiceImpl<ContractSampleMap
@Override
public
Page
<
ContractSample
>
page
(
Page
<
ContractSample
>
page
,
ContractSample
contractSample
)
{
String
code
=
contractSample
.
getCode
();
String
materialName
=
contractSample
.
getMaterialName
();
contractSample
.
setCode
(
null
).
setMaterialName
(
null
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
contractSample
);
if
(
StringUtils
.
isNotBlank
(
code
)){
wrapper
.
like
(
"code"
,
code
);
}
if
(
StringUtils
.
isNotBlank
(
materialName
)){
wrapper
.
like
(
"material_name"
,
materialName
);
}
wrapper
.
orderBy
(
"ctime"
,
false
);
return
this
.
page
(
page
,
wrapper
);
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSampleItemServiceImpl.java
View file @
9d81f9ad
...
...
@@ -92,8 +92,12 @@ public class EntrustSampleItemServiceImpl extends BaseServiceImpl<EntrustSampleI
@Override
public
Page
<
EntrustSampleItem
>
page
(
Page
<
EntrustSampleItem
>
page
,
EntrustSampleItem
entrustSampleItem
)
{
String
name
=
entrustSampleItem
.
getName
();
entrustSampleItem
.
setName
(
null
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrustSampleItem
);
if
(
StringUtils
.
isNotBlank
(
name
)){
wrapper
.
like
(
"name"
,
name
);
}
return
this
.
page
(
page
,
wrapper
);
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustSamplePrepareServiceImpl.java
View file @
9d81f9ad
...
...
@@ -133,7 +133,7 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
saveBatch
(
savePrepare
);
List
<
EntrustSample
>
checkMakeList
=
entrustSampleService
.
list
(
Condition
.
create
().
eq
(
"entrust_id"
,
entrust
.
getId
()).
eq
(
"status"
,
EntrustSampleStatusEnum
.
DRAFT
));
if
(
CollectionUtils
.
isEmpty
(
checkMakeList
)
&&
StringUtils
.
isNotEmpty
(
entrust
.
getStatusPath
())
)
{
if
(
CollectionUtils
.
isEmpty
(
checkMakeList
))
{
// String flowStatus = entrust.getFlowStatus();
// String statusPath = entrust.getStatusPath();
// // 获取委托的状态
...
...
@@ -148,7 +148,17 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
// updateEntrust.setId(entrust.getId());
// entrustService.updateById(updateEntrust);
// 根据流程状态提交
entrustService
.
submitToNextNode
(
entrust
,
account
);
if
(
StringUtils
.
isNotEmpty
(
entrust
.
getStatusPath
()))
{
entrustService
.
submitToNextNode
(
entrust
,
account
);
}
else
{
Entrust
updateEntrust
=
new
Entrust
();
updateEntrust
.
setStatus
(
EntrustStatusEnum
.
TEST
);
updateEntrust
.
setProgress
(
EntrustStatusEnum
.
TEST
);
updateEntrust
.
setId
(
entrust
.
getId
());
entrustService
.
updateById
(
updateEntrust
);
// String remark = "提交至样品接收", title = "新的样品接收任务!";
// entrustRecordService.record(new Long[]{entrust.getId()}, status.getDisplay(), nextStatus.getDisplay(), 0, account, remark);
}
}
...
...
@@ -241,7 +251,7 @@ public class EntrustSamplePrepareServiceImpl extends BaseServiceImpl<EntrustSamp
}
else
{
EntrustSamplePrepare
prepare
=
new
EntrustSamplePrepare
();
prepare
.
setStatus
(
statusEnum
).
setStatus
(
statusEnum
);
update
(
prepare
,
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIds
).
eq
(
"deleted"
,
0
));
update
(
prepare
,
Condition
.
create
().
in
(
"entrust_sample_id"
,
sampleIds
).
eq
(
"deleted"
,
0
));
}
return
false
;
}
...
...
src/main/java/com/patzn/cloud/service/lims/hmhj/service/impl/EntrustServiceImpl.java
View file @
9d81f9ad
...
...
@@ -80,8 +80,16 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
@Override
public
Page
<
Entrust
>
page
(
Page
<
Entrust
>
page
,
Entrust
entrust
)
{
String
code
=
entrust
.
getCode
();
String
client
=
entrust
.
getClient
();
entrust
.
setCode
(
null
).
setClient
(
null
);
Wrapper
wrapper
=
new
EntityWrapper
<>(
entrust
);
wrapper
.
orderBy
(
"entrust_time"
,
false
);
if
(
StringUtils
.
isNotBlank
(
code
))
{
wrapper
.
like
(
"code"
,
code
);
}
if
(
StringUtils
.
isNotBlank
(
client
))
{
wrapper
.
like
(
"client"
,
client
);
}
wrapper
.
orderBy
(
"code"
,
false
);
return
this
.
page
(
page
,
wrapper
);
}
...
...
@@ -141,6 +149,7 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
String
replaceStr
=
"XX"
,
inspectNo
=
""
,
secondCode
=
""
,
thirdCode
=
""
;
if
(
"已有编码物资"
.
equals
(
parentCategory
))
{
sampleCode
=
sample
.
getCode
();
RestAssert
.
fail
(
StringUtils
.
isBlank
(
sampleCode
),
"样品编码不能为空"
);
}
else
{
sampleCode
=
codeRuleService
.
getKey
((
Integer
)
codeType
.
getValue
(),
codeType
.
getName
(),
sample
);
// 若为外委检测和三级编码,则查询质检编号
...
...
@@ -422,7 +431,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
Entrust
entrust
=
getById
(
id
);
if
(
null
!=
entrust
)
{
EntrustDTO
vo
=
entrust
.
convert
(
EntrustDTO
.
class
);
List
<
EntrustSampleDTO
>
sampleList
=
baseMapper
.
listByContractId
(
id
);
// 只查询正常样品,不查询标样
List
<
EntrustSampleDTO
>
sampleList
=
listSampleDTOByType
(
id
,
0
);
if
(
CollectionUtils
.
isNotEmpty
(
sampleList
))
{
List
<
Long
>
sampleIdList
=
sampleList
.
stream
().
map
(
s
->
{
return
s
.
getId
();
...
...
@@ -968,4 +978,8 @@ public class EntrustServiceImpl extends BaseServiceImpl<EntrustMapper, Entrust>
return
true
;
}
private
List
<
EntrustSampleDTO
>
listSampleDTOByType
(
Long
entrustId
,
int
type
)
{
List
<
EntrustSampleDTO
>
sampleDTOList
=
baseMapper
.
listByContractId
(
entrustId
);
return
sampleDTOList
.
stream
().
filter
(
t
->
(
null
==
t
.
getType
()
?
0
:
t
.
getType
().
intValue
())
==
type
).
collect
(
Collectors
.
toList
());
}
}
src/main/resources/mapper/hmhj/EntrustMapper.xml
View file @
9d81f9ad
...
...
@@ -87,6 +87,9 @@
<if
test=
"null!=vo.testSide"
>
AND e.test_side LIKE CONCAT('%',#{vo.testSide},'%')
</if>
<if
test=
"null!=vo.testerId"
>
AND i.tester_id = #{vo.testerId}
</if>
order by e.entrust_time desc,e.code desc
</select>
...
...
src/main/resources/mapper/hmhj/OriginalRecordMapper.xml
View file @
9d81f9ad
...
...
@@ -16,6 +16,13 @@
<if
test=
"null != vo.entrustCode"
>
AND e.code LIKE CONCAT('%',#{vo.entrustCode},'%')
</if>
<if
test=
"null != vo.testerId"
>
AND exists (
select 1 from entrust_sample_item i,item_rel_original_record rr
where i.deleted = 0 and rr.deleted = 0 and rr.item_id = i.id
and r.id = rr.record_id and i.tester_id = #{vo.testerId}
)
</if>
order by r.id desc
</select>
...
...
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