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
5ee2448a
Commit
5ee2448a
authored
Aug 08, 2025
by
hcing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(tcm): 风险报送 接口开发
parent
a2ec695f
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
191 additions
and
22 deletions
+191
-22
RiskReportDto.java
...m/yeejoin/amos/boot/module/tcm/api/dto/RiskReportDto.java
+5
-1
RiskReport.java
...m/yeejoin/amos/boot/module/tcm/api/entity/RiskReport.java
+8
-1
RiskReportMapper.java
...oin/amos/boot/module/tcm/api/mapper/RiskReportMapper.java
+8
-1
IRiskReportService.java
.../amos/boot/module/tcm/api/service/IRiskReportService.java
+15
-1
RiskReportMapper.xml
...le-tcm-api/src/main/resources/mapper/RiskReportMapper.xml
+19
-0
RiskReportController.java
.../boot/module/tcm/biz/controller/RiskReportController.java
+53
-16
RiskReportServiceImpl.java
...ot/module/tcm/biz/service/impl/RiskReportServiceImpl.java
+83
-2
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/RiskReportDto.java
View file @
5ee2448a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
dto
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
...
...
@@ -63,6 +64,9 @@ public class RiskReportDto extends BaseDto {
@ApiModelProperty
(
value
=
"风险关联设备recod(目前没用到,冗余)"
)
private
String
riskEquipRecord
;
@ApiModelProperty
(
value
=
"操作人userId"
)
private
String
operationUserId
;
@ApiModelProperty
(
value
=
"风险正文-标题"
)
private
String
riskMainTitle
;
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/entity/RiskReport.java
View file @
5ee2448a
...
...
@@ -2,10 +2,11 @@ package com.yeejoin.amos.boot.module.tcm.api.entity;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.experimental.Accessors
;
import
org.typroject.tyboot.core.rdbms.orm.entity.BaseEntity
;
import
java.util.Date
;
/**
...
...
@@ -107,6 +108,12 @@ public class RiskReport extends BaseEntity {
private
String
riskEquipRecord
;
/**
* 操作人userId
*/
@TableField
(
"operation_user_id"
)
private
String
operationUserId
;
/**
* 风险正文-标题
*/
@TableField
(
"risk_main_title"
)
...
...
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/mapper/RiskReportMapper.java
View file @
5ee2448a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
mapper
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.RiskReport
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.RiskReport
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.Map
;
/**
* 风险报送表 Mapper 接口
...
...
@@ -11,4 +15,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
*/
public
interface
RiskReportMapper
extends
BaseMapper
<
RiskReport
>
{
Page
<
Map
<
String
,
String
>>
allAgencyWithPage
(
@Param
(
"page"
)
Page
<
Map
<
String
,
String
>>
page
,
@Param
(
"isAdmin"
)
boolean
isAdmin
,
@Param
(
"companyName"
)
String
companyName
);
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/java/com/yeejoin/amos/boot/module/tcm/api/service/IRiskReportService.java
View file @
5ee2448a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
api
.
service
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
java.util.List
;
import
java.util.Map
;
/**
* 风险报送表接口类
*
* @author system_generator
* @date 2025-08-08
*/
public
interface
IRiskReportService
{}
public
interface
IRiskReportService
{
Page
<
Map
<
String
,
String
>>
allAgencyWithPage
(
int
current
,
int
size
,
boolean
isAdmin
,
String
companyName
);
JSONObject
superviseOrgForEnter
(
String
enterSeq
);
List
<
DictionarieValueModel
>
riskTypeByPermission
();
}
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-api/src/main/resources/mapper/RiskReportMapper.xml
View file @
5ee2448a
...
...
@@ -2,4 +2,23 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.tcm.api.mapper.RiskReportMapper"
>
<select
id=
"allAgencyWithPage"
resultType=
"java.util.Map"
>
SELECT
sequence_nbr AS "key",
CONCAT(sequence_nbr, '_', company_name) AS "value",
company_name AS "label"
FROM
privilege_company
<where>
<if
test=
"companyName != null and companyName != ''"
>
AND company_name LIKE CONCAT('%', TRIM(#{companyName}), '%')
</if>
<if
test=
"isAdmin != null and isAdmin != '' and isAdmin == true"
>
AND company_type = '监管机构'
</if>
</where>
ORDER BY
sequence_nbr
</select>
</mapper>
amos-boot-system-tzs/amos-boot-module-tcm/amos-boot-module-tcm-biz/src/main/java/com/yeejoin/amos/boot/module/tcm/biz/controller/RiskReportController.java
View file @
5ee2448a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
controller
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.RiskReport
;
import
com.yeejoin.amos.boot.module.tcm.biz.service.impl.RiskReportServiceImpl
;
import
com.yeejoin.amos.boot.module.tcm.api.service.IRiskReportService
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
...
...
@@ -15,6 +17,7 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.List
;
import
java.util.Map
;
/**
*
...
...
@@ -23,11 +26,45 @@ import java.util.List;
*/
@RestController
@Api
(
tags
=
"Api"
)
@RequiredArgsConstructor
@RequestMapping
(
value
=
"/risk-report"
)
public
class
RiskReportController
extends
BaseController
{
@Autowired
RiskReportServiceImpl
riskReportServiceImpl
;
private
final
IRiskReportService
iRiskReportService
;
/**
* 包含全部监管机构及企业的分页列表
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/allAgency/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"包含全部监管机构及企业的分页列表"
,
notes
=
"包含全部监管机构及企业的分页列表"
)
public
ResponseModel
<
Page
<
Map
<
String
,
String
>>>
allAgencyWithPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
@RequestParam
(
value
=
"isAdmin"
,
required
=
false
)
String
isAdmin
,
@RequestParam
(
value
=
"companyName"
,
required
=
false
)
String
companyName
)
{
return
ResponseHelper
.
buildResponse
(
iRiskReportService
.
allAgencyWithPage
(
current
,
size
,
Boolean
.
parseBoolean
(
isAdmin
),
companyName
));
}
/**
* 查询企业的监管机构
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/superviseOrgForEnter"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的监管机构"
,
notes
=
"查询企业的监管机构"
)
public
ResponseModel
<
JSONObject
>
superviseOrgForEnter
(
@RequestParam
(
value
=
"enterSeq"
)
String
enterSeq
)
{
return
ResponseHelper
.
buildResponse
(
iRiskReportService
.
superviseOrgForEnter
(
enterSeq
));
}
/**
* 根据是否有权限返回风险类型列表
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/riskTypeByPermission"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据是否有权限返回风险类型列表"
,
notes
=
"根据是否有权限返回风险类型列表"
)
public
ResponseModel
<
List
<
DictionarieValueModel
>>
riskTypeByPermission
()
{
return
ResponseHelper
.
buildResponse
(
iRiskReportService
.
riskTypeByPermission
());
}
/**
* 新增
...
...
@@ -38,7 +75,7 @@ public class RiskReportController extends BaseController {
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增"
,
notes
=
"新增"
)
public
ResponseModel
<
RiskReport
>
save
(
@RequestBody
RiskReport
entity
)
{
entity
=
riskReportServiceImpl
.
createWithModel
(
entity
);
//
entity = riskReportServiceImpl.createWithModel(entity);
return
ResponseHelper
.
buildResponse
(
entity
);
}
...
...
@@ -51,9 +88,9 @@ public class RiskReportController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新"
,
notes
=
"根据sequenceNbr更新"
)
public
ResponseModel
<
RiskReport
>
updateBySequenceNbrRiskReport
(
@RequestBody
RiskReport
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
RiskReport
>
updateBySequenceNbrRiskReport
(
@RequestBody
RiskReport
entity
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
entity
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
riskReportServiceImpl
.
updateWithModel
(
entity
)
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
...
...
@@ -65,8 +102,8 @@ public class RiskReportController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除"
,
notes
=
"根据sequenceNbr删除"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
return
ResponseHelper
.
buildResponse
(
riskReportServiceImpl
.
removeById
(
sequenceNbr
)
);
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
...
...
@@ -77,9 +114,9 @@ public class RiskReportController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个"
,
notes
=
"根据sequenceNbr查询单个"
)
public
ResponseModel
<
RiskReport
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
riskReportServiceImpl
.
queryBySeq
(
sequenceNbr
)
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
...
...
@@ -91,13 +128,13 @@ public class RiskReportController extends BaseController {
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
RiskReport
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"分页查询"
,
notes
=
"分页查询"
)
public
ResponseModel
<
Page
<
RiskReport
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
)
{
Page
<
RiskReport
>
page
=
new
Page
<
RiskReport
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
ResponseHelper
.
buildResponse
(
riskReportServiceImpl
.
queryForRiskReportPage
(
page
)
);
return
ResponseHelper
.
buildResponse
(
null
);
}
/**
...
...
@@ -106,9 +143,9 @@ public class RiskReportController extends BaseController {
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"列表全部数据查询"
,
notes
=
"列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
RiskReport
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
riskReportServiceImpl
.
queryForRiskReportList
()
);
return
ResponseHelper
.
buildResponse
(
null
);
}
}
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/RiskReportServiceImpl.java
View file @
5ee2448a
package
com
.
yeejoin
.
amos
.
boot
.
module
.
tcm
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisUtils
;
import
com.yeejoin.amos.boot.module.tcm.api.entity.RiskReport
;
import
com.yeejoin.amos.boot.module.tcm.api.enums.PersonManageRoleEnum
;
import
com.yeejoin.amos.boot.module.tcm.api.mapper.RiskReportMapper
;
import
com.yeejoin.amos.boot.module.tcm.api.service.IRiskReportService
;
import
com.yeejoin.amos.feign.privilege.Privilege
;
import
com.yeejoin.amos.feign.privilege.model.AgencyUserModel
;
import
com.yeejoin.amos.feign.privilege.model.CompanyModel
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
import
com.yeejoin.amos.feign.systemctl.model.DictionarieValueModel
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.stereotype.Service
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicBoolean
;
/**
* 风险报送表服务实现类
...
...
@@ -16,7 +29,14 @@ import java.util.List;
* @date 2025-08-08
*/
@Service
public
class
RiskReportServiceImpl
extends
BaseService
<
RiskReport
,
RiskReport
,
RiskReportMapper
>
implements
IRiskReportService
{
@RequiredArgsConstructor
public
class
RiskReportServiceImpl
extends
BaseService
<
RiskReport
,
RiskReport
,
RiskReportMapper
>
implements
IRiskReportService
{
/**
* 风险类型
*/
public
static
final
String
RISK_TYPE
=
"RISK_TYPE"
;
/**
* 分页查询
*/
...
...
@@ -28,6 +48,66 @@ public class RiskReportServiceImpl extends BaseService<RiskReport,RiskReport,Ris
* 列表查询 示例
*/
public
List
<
RiskReport
>
queryForRiskReportList
()
{
return
this
.
queryForList
(
""
,
false
);
return
this
.
queryForList
(
""
,
false
);
}
private
final
RedisUtils
redisUtils
;
private
final
RiskReportMapper
riskReportMapper
;
/**
* 包含全部监管机构及企业的分页列表
*
* @param current 当前页
* @param size 每页数量
* @param isAdmin 是否是监管机构
* @param companyName 公司名称
* @return 列表
*/
@Override
public
Page
<
Map
<
String
,
String
>>
allAgencyWithPage
(
int
current
,
int
size
,
boolean
isAdmin
,
String
companyName
)
{
Page
<
Map
<
String
,
String
>>
page
=
new
Page
<>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
return
riskReportMapper
.
allAgencyWithPage
(
page
,
isAdmin
,
companyName
);
}
/**
* 查询企业的监管机构
*
* @param enterSeq 企业seq
* @return result
*/
@Override
public
JSONObject
superviseOrgForEnter
(
String
enterSeq
)
{
CompanyModel
enter
=
Privilege
.
companyClient
.
seleteOne
(
Long
.
valueOf
(
enterSeq
)).
getResult
();
CompanyModel
companyModel
=
Privilege
.
companyClient
.
seleteOne
(
enter
.
getParentId
()).
getResult
();
return
new
JSONObject
().
fluentPut
(
"key"
,
companyModel
.
getSequenceNbr
())
.
fluentPut
(
"value"
,
companyModel
.
getSequenceNbr
()
+
"_"
+
companyModel
.
getCompanyName
())
.
fluentPut
(
"label"
,
companyModel
.
getCompanyName
());
}
/**
* 根据是否有权限返回风险类型列表
*
* @return response
*/
@Override
public
List
<
DictionarieValueModel
>
riskTypeByPermission
()
{
List
<
DictionarieValueModel
>
result
=
new
ArrayList
<>();
AtomicBoolean
hasPermission
=
new
AtomicBoolean
(
false
);
AgencyUserModel
currentUserInfo
=
Privilege
.
agencyUserClient
.
getme
().
getResult
();
currentUserInfo
.
getOrgRoleSeqs
().
values
().
forEach
(
roleSeqs
->
{
roleSeqs
.
forEach
(
roleSeq
->
{
if
(
roleSeq
.
equals
(
PersonManageRoleEnum
.
fxbsy
.
getId
()))
{
hasPermission
.
set
(
true
);
}
});
});
// 有权限
if
(
hasPermission
.
get
())
{
return
Systemctl
.
dictionarieClient
.
dictValues
(
RISK_TYPE
).
getResult
();
}
// 无报送权限
return
Collections
.
emptyList
();
}
}
\ 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