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
42aa1c3e
Commit
42aa1c3e
authored
Oct 16, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
d089079d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
6 deletions
+22
-6
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+13
-0
StandardServiceImpl.java
.../sc/cement/business/service/impl/StandardServiceImpl.java
+4
-1
CheckCountUtil.java
.../java/cn/wise/sc/cement/business/util/CheckCountUtil.java
+5
-5
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
42aa1c3e
...
...
@@ -253,10 +253,23 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
BigDecimal
charge
=
new
BigDecimal
(
"0.00"
);
if
(
teamIds
!=
null
)
{
String
[]
teamIdS
=
teamIds
.
split
(
"、"
);
List
<
String
>
teamNameList
=
new
ArrayList
<>();
for
(
String
teamId
:
teamIdS
)
{
Team
team
=
teamMapper
.
selectById
(
Integer
.
valueOf
(
teamId
));
if
(
team
!=
null
)
{
charge
=
charge
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
?
team
.
getCharge
()
:
(
charge
.
add
(
team
.
getCharge
()));
teamNameList
.
add
(
team
.
getName
());
}
}
//选择Mg必须选择Ca;选择Al必须选择Fe
if
(
teamNameList
.
contains
(
"MgO"
)){
if
(!
teamNameList
.
contains
(
"CaO"
)){
return
BaseResponse
.
errorMsg
(
"选择MgO必须要选择CaO"
);
}
}
if
(
teamNameList
.
contains
(
"Al2O3"
)){
if
(!
teamNameList
.
contains
(
"Fe2o3"
)){
return
BaseResponse
.
errorMsg
(
"选择Al2O3必须要选择Fe2o3"
);
}
}
}
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/StandardServiceImpl.java
View file @
42aa1c3e
...
...
@@ -141,6 +141,10 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
if
(
StringUtils
.
isEmpty
(
query
.
getName
()))
{
return
BaseResponse
.
errorMsg
(
"标样名称不能为空!"
);
}
LoginUser
loginUser
=
userService
.
getLoginUser
();
if
(
loginUser
==
null
)
{
return
BaseResponse
.
errorMsg
(
"请登录账号"
);
}
QueryWrapper
<
Standard
>
qw
=
new
QueryWrapper
<>();
qw
.
eq
(
"name"
,
query
.
getName
());
int
count
=
standardMapper
.
selectCount
(
qw
);
...
...
@@ -173,7 +177,6 @@ public class StandardServiceImpl extends ServiceImpl<StandardMapper, Standard> i
standardValueService
.
saveBatch
(
standardValueList
);
}
//标样入库记录添加
LoginUser
loginUser
=
userService
.
getLoginUser
();
StandardEnter
enter
=
new
StandardEnter
();
enter
.
setStandardId
(
standard
.
getId
())
.
setUserId
(
loginUser
.
getId
())
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/CheckCountUtil.java
View file @
42aa1c3e
...
...
@@ -237,28 +237,28 @@ public class CheckCountUtil {
}
}
else
if
(
name
.
equals
(
"Mad1"
)){
BigDecimal
YZ_M1
=
getBigDecimal
(
resultMap
.
get
(
"样重M1"
));
BigDecimal
MZ_M1
=
getBigDecimal
(
resultMap
.
get
(
"
⽫
重M1"
));
BigDecimal
MZ_M1
=
getBigDecimal
(
resultMap
.
get
(
"
皿
重M1"
));
BigDecimal
SZ_M1
=
getBigDecimal
(
resultMap
.
get
(
"烧重M1"
));
//计算的核心公式结果
BigDecimal
countResult
=
YZ_M1
.
add
(
MZ_M1
).
subtract
(
SZ_M1
).
divide
(
YZ_M1
,
4
);
endResult
=
countResult
.
multiply
(
param100
);
}
else
if
(
name
.
equals
(
"Mad2"
)){
BigDecimal
YZ_M2
=
getBigDecimal
(
resultMap
.
get
(
"样重M2"
));
BigDecimal
MZ_M2
=
getBigDecimal
(
resultMap
.
get
(
"
⽫
重M2"
));
BigDecimal
MZ_M2
=
getBigDecimal
(
resultMap
.
get
(
"
皿
重M2"
));
BigDecimal
SZ_M2
=
getBigDecimal
(
resultMap
.
get
(
"烧重M2"
));
//计算的核心公式结果
BigDecimal
countResult
=
YZ_M2
.
add
(
MZ_M2
).
subtract
(
SZ_M2
).
divide
(
YZ_M2
,
4
);
endResult
=
countResult
.
multiply
(
param100
);
}
else
if
(
name
.
equals
(
"Aad1"
)){
BigDecimal
SZ_A1
=
getBigDecimal
(
resultMap
.
get
(
"烧重A1"
));
BigDecimal
MZ_A1
=
getBigDecimal
(
resultMap
.
get
(
"
⽫
重A1"
));
BigDecimal
MZ_A1
=
getBigDecimal
(
resultMap
.
get
(
"
皿
重A1"
));
BigDecimal
YZ_A1
=
getBigDecimal
(
resultMap
.
get
(
"样重A1"
));
//计算的核心公式结果
BigDecimal
countResult
=
SZ_A1
.
subtract
(
MZ_A1
).
divide
(
YZ_A1
,
4
);
endResult
=
countResult
.
multiply
(
param100
);
}
else
if
(
name
.
equals
(
"Aad2"
)){
BigDecimal
SZ_A2
=
getBigDecimal
(
resultMap
.
get
(
"烧重A2"
));
BigDecimal
MZ_A2
=
getBigDecimal
(
resultMap
.
get
(
"
⽫
重A2"
));
BigDecimal
MZ_A2
=
getBigDecimal
(
resultMap
.
get
(
"
皿
重A2"
));
BigDecimal
YZ_A2
=
getBigDecimal
(
resultMap
.
get
(
"样重A2"
));
//计算的核心公式结果
BigDecimal
countResult
=
SZ_A2
.
subtract
(
MZ_A2
).
divide
(
YZ_A2
,
4
);
...
...
@@ -638,7 +638,7 @@ public class CheckCountUtil {
}
/**
* 求40Mad 0或1
Vdaf判断* Mad判断
* 求40Mad 0或1
* @param countMap
* @return
*/
...
...
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