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
afab3096
Commit
afab3096
authored
Sep 15, 2025
by
刘林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(jg):添加批量删除设备接口
parent
c025c2e1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
0 deletions
+46
-0
DataHandlerController.java
.../boot/module/jg/biz/controller/DataHandlerController.java
+15
-0
DataHandlerServiceImpl.java
...ot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
+17
-0
IdxBizJgRegisterInfoMapper.java
...oot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
+4
-0
IdxBizJgRegisterInfoMapper.xml
.../src/main/resources/mapper/IdxBizJgRegisterInfoMapper.xml
+10
-0
No files found.
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/controller/DataHandlerController.java
View file @
afab3096
...
...
@@ -361,4 +361,18 @@ public class DataHandlerController extends BaseController {
public
ResponseModel
<
String
>
refreshXianData2ES
(
@RequestParam
(
value
=
"isUpdate"
,
defaultValue
=
"false"
)
boolean
isUpdate
)
throws
IOException
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
refreshXianData2ES
(
isUpdate
));
}
/**
* @return
* @apiNote 删除不等于已认领的设备
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"删除不等于已认领的设备"
,
notes
=
"删除不等于已认领的设备"
)
@PutMapping
(
value
=
"/equip/deleteEquipIsNotClaimed"
)
public
ResponseModel
<
Integer
>
deleteEquip
(
@RequestParam
(
value
=
"useUnitCreditCode"
)
String
useUnitCreditCode
,
@RequestParam
(
value
=
"equList"
)
String
equList
,
@RequestParam
(
value
=
"dataSource"
,
defaultValue
=
"jg_pl"
)
String
dataSource
,
@RequestParam
(
value
=
"isDelete"
,
defaultValue
=
"false"
)
boolean
isDelete
)
{
return
ResponseHelper
.
buildResponse
(
dataHandlerService
.
deleteEquipIsNotClaimed
(
useUnitCreditCode
,
equList
,
dataSource
,
isDelete
));
}
}
\ No newline at end of file
amos-boot-system-tzs/amos-boot-module-jg/amos-boot-module-jg-biz/src/main/java/com/yeejoin/amos/boot/module/jg/biz/service/impl/DataHandlerServiceImpl.java
View file @
afab3096
...
...
@@ -2279,4 +2279,21 @@ public class DataHandlerServiceImpl {
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
());
}
public
Integer
deleteEquipIsNotClaimed
(
String
useUnitCreditCode
,
String
equList
,
String
dataSource
,
boolean
isDelete
)
{
List
<
IdxBizJgRegisterInfo
>
jgRegisterInfoList
=
registerInfoMapper
.
selectDeleteEquipIsNotClaimed
(
useUnitCreditCode
,
equList
,
dataSource
);
List
<
String
>
records
=
Optional
.
ofNullable
(
jgRegisterInfoList
)
.
orElse
(
Collections
.
emptyList
())
.
stream
()
.
filter
(
Objects:
:
nonNull
)
.
map
(
IdxBizJgRegisterInfo:
:
getRecord
)
.
filter
(
Objects:
:
nonNull
)
.
collect
(
Collectors
.
toList
());
if
(!
records
.
isEmpty
()
&&
isDelete
)
{
superviseInfoMapper
.
deleteDataAll
(
records
);
this
.
deleteFromEs
(
records
);
}
return
records
.
size
();
}
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/java/com/yeejoin/amos/boot/module/ymt/api/mapper/IdxBizJgRegisterInfoMapper.java
View file @
afab3096
...
...
@@ -78,4 +78,8 @@ public interface IdxBizJgRegisterInfoMapper extends CustomBaseMapper<IdxBizJgReg
" AND (jri.car_number = CAST(#{carNumber} AS VARCHAR) OR CAST(#{carNumber} AS VARCHAR) IS NULL)\n"
+
" AND (jri.use_org_code <> CAST(#{useOrgCode} AS VARCHAR) OR CAST(#{useOrgCode} AS VARCHAR) IS NULL)"
)
Integer
checkCarNumberUniqueness
(
@Param
(
"carNumber"
)
String
carNumber
,
@Param
(
"useOrgCode"
)
String
useOrgCode
);
List
<
IdxBizJgRegisterInfo
>
selectDeleteEquipIsNotClaimed
(
@Param
(
"useUnitCreditCode"
)
String
useUnitCreditCode
,
@Param
(
"equList"
)
String
equList
,
@Param
(
"dataSource"
)
String
dataSource
);
}
amos-boot-system-tzs/amos-boot-module-ymt/amos-boot-module-ymt-api/src/main/resources/mapper/IdxBizJgRegisterInfoMapper.xml
View file @
afab3096
...
...
@@ -67,6 +67,16 @@
#{equCode}
</foreach>
</update>
<select
id=
"selectDeleteEquipIsNotClaimed"
resultType=
"com.yeejoin.amos.boot.module.ymt.api.entity.IdxBizJgRegisterInfo"
>
SELECT jri.RECORD
FROM idx_biz_jg_register_info jri
JOIN idx_biz_jg_use_info jui ON jri.record = jui.record
WHERE jui.STATUS = '待删除'
AND jri.EQU_LIST = #{equList}
AND jui.DATA_SOURCE = #{dataSource}
AND jui.USE_UNIT_CREDIT_CODE = #{useUnitCreditCode}
</select>
</mapper>
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