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
1d37edd7
Commit
1d37edd7
authored
Oct 16, 2020
by
竹天卫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改bug 校核计算是 如果是平行样检测,把每个人的计算结果返回展示 用于比较误差值
parent
64168ce1
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
13 deletions
+34
-13
SampleCheck.java
...n/java/cn/wise/sc/cement/business/entity/SampleCheck.java
+6
-0
SampleMapper.xml
...va/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
+1
-1
SampleCheckTeamQuery.java
.../sc/cement/business/model/query/SampleCheckTeamQuery.java
+6
-2
IEntrustService.java
...a/cn/wise/sc/cement/business/service/IEntrustService.java
+1
-1
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+13
-2
CheckCountUtil.java
.../java/cn/wise/sc/cement/business/util/CheckCountUtil.java
+7
-7
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/entity/SampleCheck.java
View file @
1d37edd7
...
@@ -43,6 +43,12 @@ public class SampleCheck implements Serializable {
...
@@ -43,6 +43,12 @@ public class SampleCheck implements Serializable {
@ApiModelProperty
(
"检测组名称"
)
@ApiModelProperty
(
"检测组名称"
)
private
String
teamGroupName
;
private
String
teamGroupName
;
@ApiModelProperty
(
"主样校核计算结果json串"
)
private
String
mainMap
;
@ApiModelProperty
(
"次样校核计算结果json串"
)
private
String
secondaryMap
;
@ApiModelProperty
(
"最终校核计算结果json串"
)
@ApiModelProperty
(
"最终校核计算结果json串"
)
private
String
countResult
;
private
String
countResult
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/SampleMapper.xml
View file @
1d37edd7
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
from sample s
from sample s
left join entrust e on e.id = s.entrust_id
left join entrust e on e.id = s.entrust_id
<include
refid=
"where"
/>
<include
refid=
"where"
/>
order by s.
create_time desc
order by s.
name
</select>
</select>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
<select
id=
"exportList"
resultType=
"java.util.HashMap"
>
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/model/query/SampleCheckTeamQuery.java
View file @
1d37edd7
...
@@ -75,11 +75,15 @@ public class SampleCheckTeamQuery {
...
@@ -75,11 +75,15 @@ public class SampleCheckTeamQuery {
@ApiModelProperty
(
"主样检测结果 Map集合"
)
@ApiModelProperty
(
"主样检测结果 Map集合"
)
private
Map
<
String
,
Object
>
mainResult
;
private
Map
<
String
,
Object
>
mainResult
;
@ApiModelProperty
(
"次样检测结果 Map集合"
)
@ApiModelProperty
(
"次样检测结果 Map集合"
)
private
Map
<
String
,
Object
>
secondaryResult
;
private
Map
<
String
,
Object
>
secondaryResult
;
@ApiModelProperty
(
"主样校核计算结果 Map集合"
)
private
Map
<
String
,
Object
>
mainMap
;
@ApiModelProperty
(
"次样校核计算结果 Map集合"
)
private
Map
<
String
,
Object
>
secondaryMap
;
@ApiModelProperty
(
"最终校核计算结果 Map集合"
)
@ApiModelProperty
(
"最终校核计算结果 Map集合"
)
private
Map
<
String
,
Object
>
endResult
;
private
Map
<
String
,
Object
>
endResult
;
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/IEntrustService.java
View file @
1d37edd7
...
@@ -79,7 +79,7 @@ public interface IEntrustService extends IService<Entrust> {
...
@@ -79,7 +79,7 @@ public interface IEntrustService extends IService<Entrust> {
BaseResponse
<
List
<
SampleDistribution
>>
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
);
BaseResponse
<
List
<
SampleDistribution
>>
getEnclosureList
(
Integer
sampleId
,
Integer
teamGroupId
,
Integer
userId
);
BaseResponse
<
Map
<
String
,
String
>>
checkCount
(
CheckCountQuery
query
);
BaseResponse
<
Map
<
String
,
Map
<
String
,
String
>
>>
checkCount
(
CheckCountQuery
query
);
BaseResponse
<
String
>
check
(
CheckQuery
query
);
BaseResponse
<
String
>
check
(
CheckQuery
query
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
1d37edd7
...
@@ -1807,14 +1807,20 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1807,14 +1807,20 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
* @param query
* @param query
* @return
* @return
*/
*/
public
BaseResponse
<
Map
<
String
,
String
>>
checkCount
(
CheckCountQuery
query
)
{
@Override
public
BaseResponse
<
Map
<
String
,
Map
<
String
,
String
>>>
checkCount
(
CheckCountQuery
query
)
{
if
(
query
==
null
)
{
if
(
query
==
null
)
{
return
BaseResponse
.
errorMsg
(
"参数错误"
);
return
BaseResponse
.
errorMsg
(
"参数错误"
);
}
}
Map
<
String
,
Map
<
String
,
String
>>
map
=
new
HashMap
<>();
List
<
String
>
checkResutlList
=
teamMapper
.
getByGroup
(
query
.
getTeamGroupId
());
List
<
String
>
checkResutlList
=
teamMapper
.
getByGroup
(
query
.
getTeamGroupId
());
Map
<
String
,
String
>
countMap
=
new
HashMap
<>();
Map
<
String
,
String
>
countMap
=
new
HashMap
<>();
if
(
query
.
getIsParallel
()
==
0
)
{
if
(
query
.
getIsParallel
()
==
0
)
{
Map
<
String
,
String
>
mainMap
=
commonService
.
checkCount
(
checkResutlList
,
query
.
getMainResult
());
Map
<
String
,
String
>
mainMap
=
commonService
.
checkCount
(
checkResutlList
,
query
.
getMainResult
());
map
.
put
(
"mainMap"
,
mainMap
);
map
.
put
(
"secondaryMap"
,
null
);
map
.
put
(
"countMap"
,
mainMap
);
countMap
=
mainMap
;
countMap
=
mainMap
;
}
else
if
(
query
.
getIsParallel
()
==
1
)
{
}
else
if
(
query
.
getIsParallel
()
==
1
)
{
Map
<
String
,
String
>
mainMap
=
commonService
.
checkCount
(
checkResutlList
,
query
.
getMainResult
());
Map
<
String
,
String
>
mainMap
=
commonService
.
checkCount
(
checkResutlList
,
query
.
getMainResult
());
...
@@ -1888,8 +1894,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1888,8 +1894,11 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
countMap
.
put
(
name
,
mainMap
.
get
(
name
));
countMap
.
put
(
name
,
mainMap
.
get
(
name
));
}
}
}
}
map
.
put
(
"mainMap"
,
mainMap
);
map
.
put
(
"secondaryMap"
,
secondaryMap
);
map
.
put
(
"countMap"
,
countMap
);
}
}
return
BaseResponse
.
okData
(
countM
ap
);
return
BaseResponse
.
okData
(
m
ap
);
}
}
...
@@ -1935,6 +1944,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -1935,6 +1944,8 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
.
setTeamGroupId
(
sctQuery
.
getTeamGroupId
())
.
setTeamGroupId
(
sctQuery
.
getTeamGroupId
())
.
setTeamGroupName
(
sctQuery
.
getTeamGroupName
())
.
setTeamGroupName
(
sctQuery
.
getTeamGroupName
())
.
setCountResult
(
JSON
.
toJSONString
(
sctQuery
.
getEndResult
()))
.
setCountResult
(
JSON
.
toJSONString
(
sctQuery
.
getEndResult
()))
.
setMainMap
(
JSON
.
toJSONString
(
sctQuery
.
getMainMap
()))
.
setSecondaryMap
(
JSON
.
toJSONString
(
sctQuery
.
getSecondaryMap
()))
.
setIsParallel
(
sctQuery
.
getIsParallel
())
.
setIsParallel
(
sctQuery
.
getIsParallel
())
.
setCreateTime
(
LocalDateTime
.
now
());
.
setCreateTime
(
LocalDateTime
.
now
());
sampleCheckMapper
.
insert
(
check
);
sampleCheckMapper
.
insert
(
check
);
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/util/CheckCountUtil.java
View file @
1d37edd7
...
@@ -663,13 +663,13 @@ public class CheckCountUtil {
...
@@ -663,13 +663,13 @@ public class CheckCountUtil {
public
static
String
countVdafXS
(
Map
<
String
,
String
>
countMap
)
{
public
static
String
countVdafXS
(
Map
<
String
,
String
>
countMap
)
{
BigDecimal
Ad
=
getBigDecimal
(
countMap
.
get
(
"Ad"
));
BigDecimal
Ad
=
getBigDecimal
(
countMap
.
get
(
"Ad"
));
BigDecimal
count
=
Double
count
=
Ad
.
compareTo
(
new
BigDecimal
(
30
))==
1
?
new
BigDecimal
(
0.8
)
:(
Ad
.
compareTo
(
new
BigDecimal
(
30
))==
1
?
0.8
:(
Ad
.
compareTo
(
new
BigDecimal
(
25
))==
1
?
new
BigDecimal
(
0.85
)
:(
Ad
.
compareTo
(
new
BigDecimal
(
25
))==
1
?
0.85
:(
Ad
.
compareTo
(
new
BigDecimal
(
20
))==
1
?
new
BigDecimal
(
0.95
)
:(
Ad
.
compareTo
(
new
BigDecimal
(
20
))==
1
?
0.95
:(
Ad
.
compareTo
(
new
BigDecimal
(
15
))==
1
?
new
BigDecimal
(
0.8
)
:(
Ad
.
compareTo
(
new
BigDecimal
(
15
))==
1
?
0.8
:(
Ad
.
compareTo
(
new
BigDecimal
(
10
))==
1
?
new
BigDecimal
(
0.9
)
:
Ad
.
compareTo
(
new
BigDecimal
(
10
))==
1
?
0.9
:
new
BigDecimal
(
0.95
)
0.95
))));
))));
return
count
.
toString
();
return
count
.
toString
();
}
}
...
...
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