Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-acquisition
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
竹天卫
data-acquisition
Commits
1132b511
Commit
1132b511
authored
May 24, 2021
by
renchao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产工序业务修改
parent
6ea72c1e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
TProcessesAuxiliaryServiceImpl.java
...business/service/impl/TProcessesAuxiliaryServiceImpl.java
+5
-6
No files found.
acquisition-business/src/main/java/cn/wise/sc/acquisition/business/service/impl/TProcessesAuxiliaryServiceImpl.java
View file @
1132b511
...
...
@@ -84,20 +84,19 @@ public class TProcessesAuxiliaryServiceImpl extends ServiceImpl<TProcessesAuxili
return
R
.
failed
(
"辅助工序中->当要同时修改当月累计油量和当月累计油量时, 当月累计油量Ljyl 不为0时,当月累计产量Dyljcl不能为0,因为dh 由当月累计油量/当月累计产量 计算而来,分母不能为0"
);
}
//条件封装
TProcessesAuxiliary
tSampleList
=
new
TProcessesAuxiliary
();
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
tSampleList
);
BeanUtilsNewCopy
.
copyPropertiesIgnoreNull
(
query
,
temp
);
QueryWrapper
<
TProcessesAuxiliary
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
eq
(
ProjectEnum
.
TProcessesAuxiliary
.
UID
.
getLabel
(),
query
.
getUid
());
//计算单耗 防止失去精度,先转成字符串
float
dh
=
t
SampleList
.
getLjyl
()
/
tSampleList
.
getDyljcl
();
t
SampleList
.
setDh
(
Double
.
valueOf
(
String
.
valueOf
(
dh
)));
float
dh
=
t
emp
.
getLjyl
()
/
temp
.
getDyljcl
();
t
emp
.
setDh
(
Double
.
valueOf
(
String
.
valueOf
(
dh
)));
//修改
int
update
=
baseMapper
.
update
(
t
SampleList
,
queryWrapper
);
int
update
=
baseMapper
.
update
(
t
emp
,
queryWrapper
);
if
(
update
>
0
)
{
return
R
.
ok
(
"辅助工序中->修改成功"
);
}
else
{
log
.
error
(
"辅助工序中->修改失败:{}"
,
JSON
.
toJSONString
(
t
SampleList
));
log
.
error
(
"辅助工序中->修改失败:{}"
,
JSON
.
toJSONString
(
t
emp
));
return
R
.
failed
(
"辅助工序中->修改失败"
);
}
...
...
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