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
52a8ea71
Commit
52a8ea71
authored
Mar 31, 2021
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
委托人修改委托时 不用放入委托编号
parent
c722ee41
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+35
-2
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
52a8ea71
...
...
@@ -518,8 +518,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setProjectName
(
project
.
getName
());
}
String
entrustCode
=
entrust
.
getProjectCode
()
+
"-"
+
query
.
getSampleList
().
get
(
0
).
getCementCode
();
entrust
.
setEntrustCode
(
entrustCode
);
//消息推送 和 判断是否符合修改权限 会用到
List
<
Integer
>
approvalIdList
=
sysApprovalMapper
.
getApprovalId
(
"委托评审"
);
...
...
@@ -529,6 +528,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
if
(!
approvalIdList
.
contains
(
loginUser
.
getId
())
&&
entrust
.
getUserId
()
!=
loginUser
.
getId
())
{
return
BaseResponse
.
errorMsg
(
"没有修改权限"
);
}
//如果时评审人员修改 存入委托编号
if
(
approvalIdList
.
contains
(
loginUser
.
getId
()))
{
String
entrustCode
=
entrust
.
getProjectCode
()
+
"-"
+
query
.
getSampleList
().
get
(
0
).
getCementCode
();
entrust
.
setEntrustCode
(
entrustCode
);
}
BeanUtils
.
copyProperties
(
query
,
entrust
);
//生成委托编号
...
...
@@ -1678,6 +1682,35 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
*/
private
BaseResponse
<
String
>
saveSampleList
(
List
<
SampleQuery
>
sampleQueryList
,
String
redisMaxCementCode
)
{
if
(
sampleQueryList
!=
null
&&
sampleQueryList
.
size
()
>
0
)
{
//对样品信息进行判断
for
(
SampleQuery
sampleQuery
:
sampleQueryList
)
{
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"请填写样品名"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getSampleCode
()))
{
return
BaseResponse
.
errorMsg
(
"请填写来样编号"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getSampleForm
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品状态"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getTeamIds
()))
{
return
BaseResponse
.
errorMsg
(
"请选择检测项目"
);
}
if
(
sampleQuery
.
getWeight
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请填写样品重量"
);
}
if
(
sampleQuery
.
getWeight
().
toString
().
length
()>
10
)
{
return
BaseResponse
.
errorMsg
(
"样品重量输入过长"
);
}
if
(
sampleQuery
.
getWeightType
()
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请选择重量单位"
);
}
if
(
StringUtils
.
isEmpty
(
sampleQuery
.
getOrigin
()))
{
return
BaseResponse
.
errorMsg
(
"请选择样品产地"
);
}
}
List
<
Sample
>
sampleList
=
new
ArrayList
<>();
String
maxCementCode
=
""
;
//最大本所编号对应的平行样编号
Integer
integerMaxCode
=
commonService
.
getIntegerCode
(
redisMaxCementCode
);
...
...
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