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
7a4f80b2
Commit
7a4f80b2
authored
Oct 12, 2023
by
tianyiming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
两员配备- 设备绑定、解绑保存接口
parent
5861ad4f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
1 deletion
+41
-1
TzsEquipListDto.java
...yeejoin/amos/boot/module/tcm/api/dto/TzsEquipListDto.java
+1
-1
ITzsUserInfoService.java
...amos/boot/module/tcm/api/service/ITzsUserInfoService.java
+2
-0
TzsUserInfoController.java
...boot/module/tcm/biz/controller/TzsUserInfoController.java
+9
-0
TzsUserInfoServiceImpl.java
...t/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
+29
-0
No files found.
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/dto/TzsEquipListDto.java
View file @
7a4f80b2
...
...
@@ -13,7 +13,7 @@ import java.util.Date;
@ApiModel
(
value
=
"TzsEquipLis"
,
description
=
"设备列表(可绑定、可解绑)"
)
public
class
TzsEquipListDto
{
@ApiModelProperty
(
value
=
"
id
"
)
@ApiModelProperty
(
value
=
"
设备id(userInfo表中的id)
"
)
private
String
id
;
@ApiModelProperty
(
value
=
"内部编号"
)
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/ITzsUserInfoService.java
View file @
7a4f80b2
...
...
@@ -33,4 +33,6 @@ public interface ITzsUserInfoService extends IService<TzsUserInfo> {
Map
<
String
,
Object
>
getCompanyType
();
Page
<
TzsEquipListDto
>
getEquipList
(
String
type
,
String
userSeq
,
TzsEquipListDto
dto
,
Page
<
TzsEquipListDto
>
page
);
Boolean
equipBind
(
String
type
,
String
userSeq
,
Map
<
String
,
Object
>
map
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/TzsUserInfoController.java
View file @
7a4f80b2
...
...
@@ -205,4 +205,13 @@ public class TzsUserInfoController extends BaseController {
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
getEquipList
(
type
,
userSeq
,
dto
,
page
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equipBind"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"设备绑定解绑"
,
notes
=
"设备绑定解绑"
)
public
ResponseModel
<
Boolean
>
equipBind
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"userSeq"
)
String
userSeq
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
return
ResponseHelper
.
buildResponse
(
tzsUserInfoService
.
equipBind
(
type
,
userSeq
,
map
));
}
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/service/impl/TzsUserInfoServiceImpl.java
View file @
7a4f80b2
...
...
@@ -10,10 +10,12 @@ import com.yeejoin.amos.boot.biz.common.entity.DataDictionary;
import
com.yeejoin.amos.boot.biz.common.service.impl.DataDictionaryServiceImpl
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.ESEquipmentCategoryDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsEquipListDto
;
import
com.yeejoin.amos.boot.module.tcm.api.dto.TzsUserInfoDto
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.*
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.EquipmentClassifityEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserEquipMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.TzsUserInfoMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.ITzsUserInfoService
;
import
com.yeejoin.amos.boot.module.tcm.api.vo.TzsUserInfoVo
;
...
...
@@ -44,6 +46,12 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
private
TzsUserInfoMapper
tzsUserInfoMapper
;
@Autowired
private
TzsUserEquipMapper
tzsUserEquipMapper
;
@Autowired
private
TzsUserEquipServiceImpl
tzsUserEquipService
;
@Autowired
DataDictionaryServiceImpl
iDataDictionaryService
;
@Autowired
...
...
@@ -348,4 +356,25 @@ public class TzsUserInfoServiceImpl extends BaseService<TzsUserInfoDto, TzsUserI
tzsUserInfoDtoPage
=
tzsUserInfoMapper
.
getAllEquipList
(
page
,
type
,
companyCode
,
userSeq
,
dto
);
return
tzsUserInfoDtoPage
;
}
@Override
public
Boolean
equipBind
(
String
type
,
String
userSeq
,
Map
<
String
,
Object
>
map
)
{
Object
recordList
=
map
.
get
(
"ids"
);
List
<
String
>
ids
=
(
List
<
String
>)
recordList
;
List
<
TzsUserEquip
>
tzsUserEquipList
=
new
ArrayList
<>();
boolean
flag
=
false
;
if
(
"bind"
.
equals
(
type
))
{
for
(
String
equipId
:
ids
)
{
TzsUserEquip
tzsUserEquip
=
new
TzsUserEquip
();
tzsUserEquip
.
setEquipId
(
equipId
);
tzsUserEquip
.
setUserSeq
(
userSeq
);
tzsUserEquipList
.
add
(
tzsUserEquip
);
}
flag
=
tzsUserEquipService
.
saveBatch
(
tzsUserEquipList
);
}
else
{
int
num
=
tzsUserEquipMapper
.
delete
(
new
QueryWrapper
<
TzsUserEquip
>().
eq
(
"user_seq"
,
userSeq
).
in
(
"equip_id"
,
ids
));
flag
=
num
>
0
?
true
:
flag
;
}
return
flag
;
}
}
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