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
59f89f21
Commit
59f89f21
authored
May 26, 2022
by
zhangsen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix- bug6094
bug5228
parent
b4ee0983
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
1 deletion
+26
-1
EquipmentStandardController.java
...n/equipmanage/controller/EquipmentStandardController.java
+9
-0
MaintenanceResourceServiceImpl.java
...ipmanage/service/impl/MaintenanceResourceServiceImpl.java
+5
-1
wl-3.0.1.xml
...ot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
+12
-0
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/controller/EquipmentStandardController.java
View file @
59f89f21
package
com
.
yeejoin
.
equipmanage
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.equipmanage.common.datasync.enums.EquipmentStandardEnum
;
...
...
@@ -58,6 +59,14 @@ public class EquipmentStandardController extends AbstractBaseController {
equipmentStandard
.
setOrgCode
(
getOrgCode
());
equipmentStandard
.
setCreateId
(
RequestContext
.
getExeUserId
());
this
.
checkEquipAndSengPatrol
(
equipmentStandard
);
QueryWrapper
<
EquipmentStandard
>
qw
=
new
QueryWrapper
<>();
qw
.
lambda
().
eq
(
EquipmentStandard:
:
getEquipmentId
,
equipmentStandard
.
getEquipmentId
())
.
eq
(
EquipmentStandard:
:
getType
,
equipmentStandard
.
getType
())
.
eq
(
EquipmentStandard:
:
getOrgCode
,
equipmentStandard
.
getOrgCode
());
int
count
=
iEquipmentStandardService
.
count
(
qw
);
if
(
count
>
0
)
{
throw
new
BaseException
(
"该单位下该装备的规范已存在"
);
}
return
iEquipmentStandardService
.
save
(
equipmentStandard
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-equip-biz/src/main/java/com/yeejoin/equipmanage/service/impl/MaintenanceResourceServiceImpl.java
View file @
59f89f21
...
...
@@ -191,9 +191,13 @@ public class MaintenanceResourceServiceImpl extends ServiceImpl<MaintenanceResou
List
<
Map
<
String
,
Object
>>
result
=
companyList
.
getResult
();
if
(!
CollectionUtils
.
isEmpty
(
result
))
{
List
<
MaintenanceResourceDto
>
resourceDtoList
=
new
ArrayList
<>();
HashMap
<
String
,
Integer
>
stringStringHashMap
=
new
HashMap
<>();
result
.
stream
().
forEach
(
x
->
{
MaintenanceResourceDto
dto
=
JSONObject
.
parseObject
(
JSONObject
.
toJSONString
(
x
),
MaintenanceResourceDto
.
class
);
resourceDtoList
.
add
(
dto
);
if
(!
stringStringHashMap
.
containsKey
(
dto
.
getName
()
+
dto
.
getCode
()
+
dto
.
getType
()
+
dto
.
getId
()
+
dto
.
getParentId
()))
{
resourceDtoList
.
add
(
dto
);
stringStringHashMap
.
put
(
dto
.
getName
()
+
dto
.
getCode
()
+
dto
.
getType
()
+
dto
.
getId
()
+
dto
.
getParentId
(),
1
);
}
});
return
resourceDtoList
;
}
...
...
amos-boot-system-equip/src/main/resources/changelog/wl-3.0.1.xml
View file @
59f89f21
...
...
@@ -2849,4 +2849,15 @@
wesi.equipment_specific_id = wes.id AND wesi.equipment_index_id = wes.realtime_iot_index_id );
</sql>
</changeSet>
<changeSet
author=
"zs"
id=
"20220526-1"
>
<preConditions
onFail=
"MARK_RAN"
>
<tableExists
tableName=
"wl_equipment_standard"
/>
</preConditions>
<comment>
修改表wl_equipment_standard唯一索引
</comment>
<sql>
DROP INDEX uni ON wl_equipment_standard;
create unique index uni on wl_equipment_standard (`type`, `equipment_id`, `org_code`);
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
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