Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
3dc80e2e
Commit
3dc80e2e
authored
May 16, 2023
by
chenzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改巡检代码
parent
4e060184
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
InputItemMapper.java
...join/amos/patrol/business/dao/mapper/InputItemMapper.java
+2
-1
PointServiceImpl.java
...n/amos/patrol/business/service/impl/PointServiceImpl.java
+12
-4
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/dao/mapper/InputItemMapper.java
View file @
3dc80e2e
...
...
@@ -14,6 +14,7 @@ import org.springframework.stereotype.Repository;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
@Repository
@Mapper
...
...
@@ -61,7 +62,7 @@ public interface InputItemMapper extends BaseMapper<InputItem> {
public
List
<
PointInputItemVo
>
queryCustomInputItem
(
HashMap
<
String
,
Object
>
param
);
List
<
PointInputItemVo
>
queryCustomInputItemByCodes
(
@Param
(
"inputItemNos"
)
Lis
t
<
String
>
inputItemNos
);
List
<
PointInputItemVo
>
queryCustomInputItemByCodes
(
@Param
(
"inputItemNos"
)
Se
t
<
String
>
inputItemNos
);
public
List
<
InputItemVo
>
getInputItemListByitemNos
(
@Param
(
"itemNos"
)
String
[]
itemNos
);
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-patrol-biz/src/main/java/com/yeejoin/amos/patrol/business/service/impl/PointServiceImpl.java
View file @
3dc80e2e
...
...
@@ -47,6 +47,7 @@ import org.springframework.transaction.support.TransactionSynchronization;
import
org.springframework.transaction.support.TransactionSynchronizationManager
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
...
...
@@ -282,11 +283,14 @@ public class PointServiceImpl implements IPointService {
ids
.
add
(
point
.
getId
());
if
(
StringUtil
.
isNotEmpty
(
param
.
getEquipInputInfo
()))
{
String
[]
infos
=
param
.
getEquipInputInfo
().
split
(
"\\|"
);
for
(
int
i
=
0
;
i
<
infos
.
length
;
i
++)
{
String
[]
split
=
infos
[
i
].
split
(
":"
);
String
[]
info
=
param
.
getEquipInputInfo
().
split
(
"\\|"
);
Set
<
String
>
infos
=
new
HashSet
<>();
Collections
.
addAll
(
infos
,
info
);
for
(
String
e
:
infos
)
{
String
[]
split
=
e
.
split
(
":"
);
String
equipCode
=
split
[
0
];
List
<
String
>
inputItemCodes
=
Arrays
.
asList
(
split
[
1
].
split
(
","
));
Set
<
String
>
inputItemCodes
=
new
HashSet
<>(
Arrays
.
asList
(
split
[
1
].
split
(
","
)));
// List<String> inputItemCodes = Arrays.asList(split[1].split(","));
List
<
RoutePoint
>
routePointList
=
iRoutePointDao
.
queryByPointId
(
point
.
getId
());
HashMap
<
String
,
String
>
equipByCode
=
routePointItemMapper
.
getEquipByCode
(
equipCode
);
if
(
ObjectUtils
.
isEmpty
(
equipByCode
))
{
...
...
@@ -315,6 +319,9 @@ public class PointServiceImpl implements IPointService {
}
this
.
addPointClassifyByPointId
(
newPointClassify
);
List
<
PointInputItemVo
>
customInputList
=
inputItemMapper
.
queryCustomInputItemByCodes
(
inputItemCodes
);
if
(
ValidationUtil
.
isEmpty
(
customInputList
)
||
customInputList
.
size
()
<
inputItemCodes
.
size
())
{
throw
new
BadRequest
(
split
[
1
]+
"中存在不正确的检查项编号"
);
}
for
(
PointInputItemVo
pItemVo
:
customInputList
)
{
PointInputItem
pointInputItem
=
new
PointInputItem
();
pointInputItem
.
setPointId
(
newPointClassify
.
getPointId
());
...
...
@@ -336,6 +343,7 @@ public class PointServiceImpl implements IPointService {
}
}
}
}
String
inputItems
=
param
.
getInputItems
();
...
...
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