Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
tianjin-cement
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
竹天卫
tianjin-cement
Commits
d57ae145
Commit
d57ae145
authored
Sep 01, 2020
by
zhutianwei@hyzcservice.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
委托管理 样品处理对接完成
parent
458db7d3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
4 deletions
+21
-4
Entrust.java
.../main/java/cn/wise/sc/cement/business/entity/Entrust.java
+6
-0
EntrustVo.java
...n/java/cn/wise/sc/cement/business/model/vo/EntrustVo.java
+4
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+11
-4
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/entity/Entrust.java
View file @
d57ae145
...
@@ -76,6 +76,12 @@ public class Entrust implements Serializable {
...
@@ -76,6 +76,12 @@ public class Entrust implements Serializable {
@ApiModelProperty
(
"项目类型(常规项目,科研项目,质量控制项目)"
)
@ApiModelProperty
(
"项目类型(常规项目,科研项目,质量控制项目)"
)
private
String
projectType
;
private
String
projectType
;
@ApiModelProperty
(
"是否发送样品处理(1是,0否)"
)
private
Integer
isHandle
;
@ApiModelProperty
(
"是否派发样品检测(1是,0否)"
)
private
Integer
isDistribution
;
@ApiModelProperty
(
"(0删除,1正常)"
)
@ApiModelProperty
(
"(0删除,1正常)"
)
private
Integer
isDelete
;
private
Integer
isDelete
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/vo/EntrustVo.java
View file @
d57ae145
...
@@ -32,7 +32,11 @@ public class EntrustVo {
...
@@ -32,7 +32,11 @@ public class EntrustVo {
@ApiModelProperty
(
"项目类型(常规项目,科研项目,质量控制项目)"
)
@ApiModelProperty
(
"项目类型(常规项目,科研项目,质量控制项目)"
)
private
String
projectType
;
private
String
projectType
;
@ApiModelProperty
(
"是否发送样品处理(1是,0否)"
)
private
Integer
isHandle
;
@ApiModelProperty
(
"是否派发样品检测(1是,0否)"
)
private
Integer
isDistribution
;
@ApiModelProperty
(
"委托人id"
)
@ApiModelProperty
(
"委托人id"
)
private
Integer
userId
;
private
Integer
userId
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
d57ae145
...
@@ -143,6 +143,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -143,6 +143,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setUserId
(
userService
.
getLoginUser
()!=
null
?
userService
.
getLoginUser
().
getId
():
1
)
.
setUserId
(
userService
.
getLoginUser
()!=
null
?
userService
.
getLoginUser
().
getId
():
1
)
.
setStatus
(
0
)
.
setStatus
(
0
)
.
setIsDelete
(
1
)
.
setIsDelete
(
1
)
.
setIsHandle
(
0
)
.
setIsDistribution
(
0
)
.
setCreateTime
(
LocalDateTime
.
now
())
.
setCreateTime
(
LocalDateTime
.
now
())
.
setSampleNum
(
query
.
getSampleTmpList
().
size
());
.
setSampleNum
(
query
.
getSampleTmpList
().
size
());
entrustMapper
.
insert
(
entrust
);
entrustMapper
.
insert
(
entrust
);
...
@@ -263,6 +265,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -263,6 +265,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
if
(
query
.
getSampleList
()
!=
null
&&
query
.
getSampleList
().
size
()>
0
){
if
(
query
.
getSampleList
()
!=
null
&&
query
.
getSampleList
().
size
()>
0
){
List
<
Sample
>
sampleList
=
new
ArrayList
<>();
List
<
Sample
>
sampleList
=
new
ArrayList
<>();
QueryWrapper
<
Sample
>
sampleQueryWrapper
=
new
QueryWrapper
<>();
Integer
nums
=
sampleService
.
count
(
sampleQueryWrapper
);
for
(
SampleQuery
sampleQuery
:
query
.
getSampleList
()){
for
(
SampleQuery
sampleQuery
:
query
.
getSampleList
()){
Sample
sample
=
new
Sample
();
Sample
sample
=
new
Sample
();
BeanUtils
.
copyProperties
(
sampleQuery
,
sample
);
BeanUtils
.
copyProperties
(
sampleQuery
,
sample
);
...
@@ -270,8 +274,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -270,8 +274,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(
sampleQuery
.
getIsParallel
()
==
1
){
//平行样
if
(
sampleQuery
.
getIsParallel
()
==
1
){
//平行样
//生成本所编号
//生成本所编号
QueryWrapper
<
Sample
>
sampleQueryWrapper
=
new
QueryWrapper
<>();
Integer
nums
=
sampleService
.
count
(
sampleQueryWrapper
);
String
cementCode
=
commonService
.
createNo
(
"BS"
,
nums
);
String
cementCode
=
commonService
.
createNo
(
"BS"
,
nums
);
String
cementCode2
=
commonService
.
createNo
(
"BS"
,
nums
+
1
);
String
cementCode2
=
commonService
.
createNo
(
"BS"
,
nums
+
1
);
sample
.
setCementCode
(
cementCode
);
sample
.
setCementCode
(
cementCode
);
...
@@ -280,12 +283,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -280,12 +283,12 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
BeanUtils
.
copyProperties
(
sample
,
sample2
);
BeanUtils
.
copyProperties
(
sample
,
sample2
);
sample2
.
setCementCode
(
cementCode2
);
sample2
.
setCementCode
(
cementCode2
);
sampleList
.
add
(
sample2
);
sampleList
.
add
(
sample2
);
nums
=
nums
+
2
;
}
else
if
(
sampleQuery
.
getIsParallel
()
==
0
){
//非平行样
}
else
if
(
sampleQuery
.
getIsParallel
()
==
0
){
//非平行样
QueryWrapper
<
Sample
>
sampleQueryWrapper
=
new
QueryWrapper
<>();
Integer
nums
=
sampleService
.
count
(
sampleQueryWrapper
);
String
cementCode
=
commonService
.
createNo
(
"BS"
,
nums
);
String
cementCode
=
commonService
.
createNo
(
"BS"
,
nums
);
sample
.
setCementCode
(
cementCode
);
sample
.
setCementCode
(
cementCode
);
sampleList
.
add
(
sample
);
sampleList
.
add
(
sample
);
nums
=
nums
+
1
;
}
else
{
}
else
{
return
BaseResponse
.
errorMsg
(
"请选择是否需要平行样"
);
return
BaseResponse
.
errorMsg
(
"请选择是否需要平行样"
);
}
}
...
@@ -356,6 +359,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -356,6 +359,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
sampleHandleService
.
saveBatch
(
sampleHandleList
);
sampleHandleService
.
saveBatch
(
sampleHandleList
);
}
}
entrust
.
setIsHandle
(
1
);
entrustMapper
.
updateById
(
entrust
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"发送样品处理任务"
,
null
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"发送样品处理任务"
,
null
);
return
BaseResponse
.
okMsg
(
"已发送样品处理任务"
);
return
BaseResponse
.
okMsg
(
"已发送样品处理任务"
);
}
}
...
@@ -493,6 +498,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -493,6 +498,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
}
}
distributionService
.
saveBatch
(
sampleDistributionList
);
distributionService
.
saveBatch
(
sampleDistributionList
);
}
}
entrust
.
setIsDistribution
(
1
);
entrustMapper
.
updateById
(
entrust
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"派发检测项目任务"
,
null
);
logsService
.
saveLog
(
SysLogs
.
ObjType
.
ENTRUST_LOG
,
entrust
.
getId
(),
"派发检测项目任务"
,
null
);
return
BaseResponse
.
okMsg
(
"已派发检测项目任务"
);
return
BaseResponse
.
okMsg
(
"已派发检测项目任务"
);
}
}
...
...
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