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
363932a7
Commit
363932a7
authored
Nov 03, 2020
by
qinhu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备获取bug修改
parent
e9233d0b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
PrecipriceController.java
...e/sc/cement/business/controller/PrecipriceController.java
+1
-3
EquipmentUseMapper.java
...cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
+8
-0
EquipmentUseMapper.xml
...wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
+8
-0
EntrustServiceImpl.java
...e/sc/cement/business/service/impl/EntrustServiceImpl.java
+4
-1
No files found.
cement-business/src/main/java/cn/wise/sc/cement/business/controller/PrecipriceController.java
View file @
363932a7
...
@@ -58,9 +58,7 @@ public class PrecipriceController {
...
@@ -58,9 +58,7 @@ public class PrecipriceController {
@ApiOperation
(
"aaa"
)
@ApiOperation
(
"aaa"
)
public
void
add
(){
public
void
add
(){
iNormProductionService
.
createPreciprice
(
1
,
1
,
1
,
1
,
1
);
iNormProductionService
.
createPreciprice
(
1
,
1
,
1
,
1
,
1
);
iNormProductionService
.
createPreciprice
(
1
,
1
,
20
,
0
,
1
);
iNormProductionService
.
createPreciprice
(
1
,
1
,
1
,
1
,
1
);
iNormProductionService
.
createPreciprice
(
1
,
1
,
1
,
1
,
1
);
}
}
@GetMapping
(
"/statistics"
)
@GetMapping
(
"/statistics"
)
...
...
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/EquipmentUseMapper.java
View file @
363932a7
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Param;
...
@@ -10,6 +10,7 @@ import org.apache.ibatis.annotations.Param;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Set
;
/**
/**
* <p>
* <p>
...
@@ -32,4 +33,11 @@ public interface EquipmentUseMapper extends BaseMapper<EquipmentUse> {
...
@@ -32,4 +33,11 @@ public interface EquipmentUseMapper extends BaseMapper<EquipmentUse> {
* @return list
* @return list
*/
*/
List
<
String
>
getEquipmentNamesByProjectId
(
@Param
(
"param"
)
Integer
entrustId
);
List
<
String
>
getEquipmentNamesByProjectId
(
@Param
(
"param"
)
Integer
entrustId
);
/**
* 根据设备ids获取使用到的设备名字
* @param ids 设备id
* @return list
*/
List
<
String
>
getEquipmentNamesByEquipmentIds
(
@Param
(
"params"
)
Set
<
Integer
>
ids
);
}
}
cement-business/src/main/java/cn/wise/sc/cement/business/mapper/xml/EquipmentUseMapper.xml
View file @
363932a7
...
@@ -52,5 +52,13 @@
...
@@ -52,5 +52,13 @@
WHERE eu.id IS NOT NULL
WHERE eu.id IS NOT NULL
</select>
</select>
<select
id=
"getEquipmentNamesByEquipmentIds"
resultType=
"java.lang.String"
>
SELECT CONCAT(`name`,' (',`code`,')') FROM equipment
where id in
<foreach
collection=
"params"
open=
"("
close=
")"
item=
"id"
separator=
","
>
#{id}
</foreach>
</select>
</mapper>
</mapper>
cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/EntrustServiceImpl.java
View file @
363932a7
...
@@ -2642,7 +2642,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -2642,7 +2642,10 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
rts
.
setSampleNames
(
new
HashSet
<>(
source
.
size
()));
rts
.
setSampleNames
(
new
HashSet
<>(
source
.
size
()));
rts
.
setMethodNames
(
new
HashSet
<>(
source
.
size
()));
rts
.
setMethodNames
(
new
HashSet
<>(
source
.
size
()));
rts
.
setTeamNames
(
new
HashSet
<>(
source
.
size
()));
rts
.
setTeamNames
(
new
HashSet
<>(
source
.
size
()));
Set
<
Integer
>
equipmentIds
=
new
HashSet
<>(
source
.
size
());
source
.
forEach
(
arg
->
{
source
.
forEach
(
arg
->
{
equipmentIds
.
add
(
arg
.
getEquipmentId
());
//获取使用的设备id
//关联检测项目
//关联检测项目
if
(
StrUtil
.
isNotBlank
(
arg
.
getTeamName
()))
{
if
(
StrUtil
.
isNotBlank
(
arg
.
getTeamName
()))
{
String
[]
teamSplits
=
arg
.
getTeamName
().
split
(
"、"
);
String
[]
teamSplits
=
arg
.
getTeamName
().
split
(
"、"
);
...
@@ -2666,7 +2669,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
...
@@ -2666,7 +2669,7 @@ public class EntrustServiceImpl extends ServiceImpl<EntrustMapper, Entrust> impl
rts
.
setSampleNum
(
rts
.
getSampleNames
().
size
());
rts
.
setSampleNum
(
rts
.
getSampleNames
().
size
());
//关联仪器名字 去重
//关联仪器名字 去重
List
<
String
>
equipmentNames
=
equipmentUseMapper
.
getEquipmentNamesBy
ProjectId
(
firstReportDetail
.
getEntrustId
()
);
List
<
String
>
equipmentNames
=
equipmentUseMapper
.
getEquipmentNamesBy
EquipmentIds
(
equipmentIds
);
equipmentNames
.
forEach
(
arg
->
rts
.
getEquipmentNames
().
add
(
arg
));
equipmentNames
.
forEach
(
arg
->
rts
.
getEquipmentNames
().
add
(
arg
));
//关联送样单位名字
//关联送样单位名字
...
...
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