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
c87b1f79
Commit
c87b1f79
authored
Feb 29, 2024
by
suhuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
监管新增接口:
1.工作台设备种类 2.工作套设备类型
parent
ee0e76d9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
310 additions
and
284 deletions
+310
-284
CommonController.java
.../amos/boot/module/jg/biz/controller/CommonController.java
+310
-284
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/CommonController.java
View file @
c87b1f79
...
...
@@ -8,6 +8,8 @@ import com.yeejoin.amos.boot.module.jg.biz.service.ICommonService;
import
com.yeejoin.amos.boot.module.jg.biz.service.IPdfService
;
import
com.yeejoin.amos.boot.module.ymt.api.entity.EquipmentCategory
;
import
com.yeejoin.amos.boot.module.ymt.api.enums.FlowStatusEnum
;
import
com.yeejoin.amos.feign.systemctl.Systemctl
;
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
;
...
...
@@ -18,119 +20,120 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
*
装备分类
*
监管公共Api
*
* @author system_generator
* @date 2021-10-20
*/
@RestController
@Api
(
tags
=
"
装备分类
Api"
)
@Api
(
tags
=
"
监管公共
Api"
)
@RequestMapping
(
value
=
"/common"
)
public
class
CommonController
extends
BaseController
{
@Autowired
ICommonService
commonService
;
@Autowired
IPdfService
pdfService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getChildren"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
public
ResponseModel
<
List
<
EquipmentCategory
>>
getChildren
(
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getEquipmentCategoryList
(
code
,
type
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政区划"
,
notes
=
"获取行政区划"
)
public
ResponseModel
<
Object
>
getRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegion
(
level
,
parentId
));
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getTree
(
getSelectedOrgInfo
()));
}
/**
* 工作台接收机构树
* @param bizType 业务类型:notice-告知类, register-登记类
* @return 树
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{bizType}/receive-unit/tree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"接收机构树"
,
notes
=
"接收机构树
"
)
public
ResponseModel
<
Object
>
getNoticeReceiveTree
(
@PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getReceiveUnitTree
(
bizType
));
}
/**
* 获取行政审批局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getApproveTree
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政审批局树"
,
notes
=
"获取行政审批局树"
)
public
ResponseModel
<
Object
>
getApproveTree
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
(
);
return
ResponseHelper
.
buildResponse
(
commonService
.
getApproveTree
(
reginParams
));
}
/**
* 通过单位类型获取单位列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUnitList
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表"
,
notes
=
"通过单位类型获取单位列表"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitList
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
));
}
/**
* 查找当前公司下所属的安全管理员
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getSecurityAdmin
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查找当前公司下所属的安全管理员"
,
notes
=
"查找当前公司下所属的安全管理员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"useUnitCode"
,
required
=
false
)
String
useUnitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
,
useUnitCode
));
}
/**
* 查询安全管理员的基本信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserPhone
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询用户对应联系方式"
,
notes
=
"查询用户对应联系方式"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
@Autowired
ICommonService
commonService
;
@Autowired
IPdfService
pdfService
;
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getChildren"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过设备种类code获取设备类别"
,
notes
=
"通过设备种类code获取设备类别"
)
public
ResponseModel
<
List
<
EquipmentCategory
>>
getChildren
(
@RequestParam
(
value
=
"code"
)
String
code
,
@RequestParam
(
value
=
"type"
,
required
=
false
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getEquipmentCategoryList
(
code
,
type
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getRegion"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政区划"
,
notes
=
"获取行政区划"
)
public
ResponseModel
<
Object
>
getRegion
(
@RequestParam
(
value
=
"level"
,
required
=
false
)
String
level
,
@RequestParam
(
value
=
"parentId"
,
required
=
false
)
String
parentId
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getRegion
(
level
,
parentId
));
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/creatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
creatTree
()
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getTree
(
getSelectedOrgInfo
()));
}
/**
* 工作台接收机构树
*
* @param bizType 业务类型:notice-告知类, register-登记类
* @return 树
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{bizType}/receive-unit/tree
"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"接收机构树"
,
notes
=
"接收机构树"
)
public
ResponseModel
<
Object
>
getNoticeReceiveTree
(
@PathVariable
String
bizType
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getReceiveUnitTree
(
bizType
));
}
/**
* 获取行政审批局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getApproveTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取行政审批局树"
,
notes
=
"获取行政审批局树
"
)
public
ResponseModel
<
Object
>
getApproveTree
()
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
return
ResponseHelper
.
buildResponse
(
commonService
.
getApproveTree
(
reginParams
)
);
}
/**
* 通过单位类型获取单位列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUnitList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"通过单位类型获取单位列表"
,
notes
=
"通过单位类型获取单位列表
"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getUnitList
(
@RequestParam
(
value
=
"type"
)
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUnitListByType
(
type
));
}
/**
* 查找当前公司下所属的安全管理员
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getSecurityAdmin"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查找当前公司下所属的安全管理员"
,
notes
=
"查找当前公司下所属的安全管理员
"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getSecurityAdmin
(
@RequestParam
(
value
=
"type"
)
String
type
,
@RequestParam
(
value
=
"useUnitCode"
,
required
=
false
)
String
useUnitCode
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getSecurityAdmin
(
type
,
useUnitCode
));
}
/**
* 查询安全管理员的基本信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserPhone"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询用户对应联系方式"
,
notes
=
"查询用户对应联系方式
"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getUserInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getUserInfoSplit"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询安全管理员的基本信息"
,
notes
=
"查询安全管理员的基本信息"
)
...
...
@@ -140,188 +143,211 @@ public class CommonController extends BaseController {
}
return
ResponseHelper
.
buildResponse
(
commonService
.
getUserInfo
(
sequenceNbr
));
}
/**
* 查询企业的基本信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEnterpriseInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的基本信息"
,
notes
=
"查询企业的基本信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getEnterpriseInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseInfo
(
sequenceNbr
));
}
/**
* 查询企业的下面的人员
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEnterpriseEmployee"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的下面的人员"
,
notes
=
"查询企业的下面的人员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getEnterpriseEmployee
(
@RequestParam
String
unitCode
)
{
String
companyCode
=
unitCode
.
split
(
"_"
)[
0
];
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
companyCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程状态枚举列表"
,
notes
=
"流程状态枚举列表"
)
@GetMapping
(
value
=
"/flow-status/list"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectForFlowStatusList
()
{
return
ResponseHelper
.
buildResponse
(
Arrays
.
stream
(
FlowStatusEnum
.
values
()).
map
(
this
::
mapPointTypeToMap
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
()));
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
()
||
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()
==
e
.
getCode
())
{
return
null
;
}
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
record
.
put
(
"key"
,
e
.
getCode
());
record
.
put
(
"label"
,
e
.
getName
());
return
record
;
}
/**
* 查询监管业务名称列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管业务名称列表"
,
notes
=
"查询监管业务名称列表"
)
@GetMapping
(
value
=
"/superviseBusinessCategory"
)
public
ResponseModel
<
Object
>
equipTree
(
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
superviseBusinessCategory
(
type
));
}
@Autowired
private
IJgInstallationNoticeService
iJgInstallationNoticeService
;
/**
* 业务发起公共接口
* /jg/jg-installation-notice/save
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveOrSubmit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"业务发起公共接口"
,
notes
=
"业务发起公共接口"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
(
value
=
"submitType"
,
required
=
false
)
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
Object
result
=
commonService
.
invokeBusinessProcess
(
submitType
,
map
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 根据公司id获取公司下人员
*
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyUser"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"根据公司id获取公司下人员"
,
notes
=
"根据公司id获取公司下人员"
)
public
ResponseModel
<
Object
>
getCompanyUser
(
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
Long
companyId
)
{
if
(
ObjectUtils
.
isEmpty
(
companyId
)){
return
null
;
}
Object
result
=
commonService
.
getCompanyUser
(
companyId
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 获取当前登录人企业类型
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人企业类型"
,
notes
=
"获取当前登录人企业类型"
)
public
ResponseModel
<
Object
>
getCompanyType
()
{
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
getCompanyType
());
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCreatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
getCreatTree
()
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getCreatTree
());
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCreatTreeByInstallation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树安装告知使用"
,
notes
=
"获取管辖分局树安装告知使用"
)
public
ResponseModel
<
Object
>
getCreatTreeByInstallation
(
String
county
)
{
List
<
LinkedHashMap
>
creatTree
=
commonService
.
getCreatTreeByInstallation
();
String
code
=
county
.
split
(
"_"
)[
0
];
List
<
LinkedHashMap
>
infoByCounty
=
getInfoByCounty
(
code
,
creatTree
);
return
ResponseHelper
.
buildResponse
(
infoByCounty
);
}
private
List
<
LinkedHashMap
>
getInfoByCounty
(
String
county
,
List
<
LinkedHashMap
>
children
)
{
for
(
LinkedHashMap
item
:
children
)
{
if
(
item
.
get
(
"companyCode"
).
toString
().
equals
(
county
))
{
return
(
List
<
LinkedHashMap
>)
item
.
get
(
"children"
);
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"children"
)))
{
List
<
LinkedHashMap
>
children1
=
getInfoByCounty
(
county
,
(
List
<
LinkedHashMap
>)
item
.
get
(
"children"
));
if
(!
CollectionUtils
.
isEmpty
(
children1
))
{
return
children1
;
}
}
}
}
return
new
ArrayList
<>();
}
/**
* 公共转办接口
* /jg/common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transfer
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
result
=
commonService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 校验EQUCODE的唯一性
* @param equCode EQUCODE
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/checkUniquenessOfEQUCODE"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"校验EQUCODE的唯一性"
,
notes
=
"校验EQUCODE的唯一性"
)
public
ResponseModel
<
Object
>
checkUniquenessOfEQUCODE
(
String
equCode
)
{
Boolean
bool
=
commonService
.
checkUniquenessOfEQUCODE
(
equCode
);
return
ResponseHelper
.
buildResponse
(
bool
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/test-file"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"文件测试"
,
notes
=
"文件测试"
)
public
ResponseModel
<
String
>
testFile
()
{
return
ResponseHelper
.
buildResponse
(
pdfService
.
signToPdf
(
"upload/tzs/pdf/1708911268708_temp.pdf"
,
"已作废"
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/water-print"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"文件测试"
,
notes
=
"文件测试"
)
public
ResponseModel
<
String
>
signToPdfWaterPrint
()
{
return
ResponseHelper
.
buildResponse
(
pdfService
.
signToPdfWaterPrint
(
"upload/tzs/pdf/1708911268708_temp.pdf"
,
"已作废"
));
}
/**
* 查询企业的基本信息
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEnterpriseInfo"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的基本信息"
,
notes
=
"查询企业的基本信息"
)
public
ResponseModel
<
Map
<
String
,
Object
>>
getEnterpriseInfo
(
@RequestParam
(
value
=
"sequenceNbr"
)
String
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseInfo
(
sequenceNbr
));
}
/**
* 查询企业的下面的人员
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getEnterpriseEmployee"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询企业的下面的人员"
,
notes
=
"查询企业的下面的人员"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
getEnterpriseEmployee
(
@RequestParam
String
unitCode
)
{
String
companyCode
=
unitCode
.
split
(
"_"
)[
0
];
return
ResponseHelper
.
buildResponse
(
commonService
.
getEnterpriseEmployee
(
companyCode
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"流程状态枚举列表"
,
notes
=
"流程状态枚举列表"
)
@GetMapping
(
value
=
"/flow-status/list"
)
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>>
selectForFlowStatusList
()
{
return
ResponseHelper
.
buildResponse
(
Arrays
.
stream
(
FlowStatusEnum
.
values
()).
map
(
this
::
mapPointTypeToMap
).
filter
(
Objects:
:
nonNull
).
collect
(
Collectors
.
toList
()));
}
private
Map
<
String
,
Object
>
mapPointTypeToMap
(
FlowStatusEnum
e
)
{
if
(
FlowStatusEnum
.
TO_SUBMITTED
.
getCode
()
==
e
.
getCode
()
||
FlowStatusEnum
.
TO_BE_DISCARD
.
getCode
()
==
e
.
getCode
())
{
return
null
;
}
Map
<
String
,
Object
>
record
=
new
HashMap
<>();
record
.
put
(
"key"
,
e
.
getCode
());
record
.
put
(
"label"
,
e
.
getName
());
return
record
;
}
/**
* 查询监管业务名称列表
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"查询监管业务名称列表"
,
notes
=
"查询监管业务名称列表"
)
@GetMapping
(
value
=
"/superviseBusinessCategory"
)
public
ResponseModel
<
Object
>
equipTree
(
String
type
)
{
return
ResponseHelper
.
buildResponse
(
commonService
.
superviseBusinessCategory
(
type
));
}
@Autowired
private
IJgInstallationNoticeService
iJgInstallationNoticeService
;
/**
* 业务发起公共接口
* /jg/jg-installation-notice/save
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/saveOrSubmit"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"业务发起公共接口"
,
notes
=
"业务发起公共接口"
)
public
ResponseModel
<
Object
>
save
(
@RequestParam
(
value
=
"submitType"
,
required
=
false
)
String
submitType
,
@RequestBody
Map
<
String
,
Object
>
map
)
{
ReginParams
reginParams
=
getSelectedOrgInfo
();
Object
result
=
commonService
.
invokeBusinessProcess
(
submitType
,
map
,
reginParams
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 根据公司id获取公司下人员
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyUser"
)
@ApiOperation
(
httpMethod
=
"get"
,
value
=
"根据公司id获取公司下人员"
,
notes
=
"根据公司id获取公司下人员"
)
public
ResponseModel
<
Object
>
getCompanyUser
(
@RequestParam
(
value
=
"companyId"
,
required
=
false
)
Long
companyId
)
{
if
(
ObjectUtils
.
isEmpty
(
companyId
))
{
return
null
;
}
Object
result
=
commonService
.
getCompanyUser
(
companyId
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 获取当前登录人企业类型
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCompanyType"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取当前登录人企业类型"
,
notes
=
"获取当前登录人企业类型"
)
public
ResponseModel
<
Object
>
getCompanyType
()
{
return
ResponseHelper
.
buildResponse
(
iJgInstallationNoticeService
.
getCompanyType
());
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCreatTree"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树"
,
notes
=
"获取管辖分局树"
)
public
ResponseModel
<
Object
>
getCreatTree
()
{
return
ResponseHelper
.
buildResponse
(
commonService
.
getCreatTree
());
}
/**
* 获取管辖分局树
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/getCreatTreeByInstallation"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取管辖分局树安装告知使用"
,
notes
=
"获取管辖分局树安装告知使用"
)
public
ResponseModel
<
Object
>
getCreatTreeByInstallation
(
String
county
)
{
List
<
LinkedHashMap
>
creatTree
=
commonService
.
getCreatTreeByInstallation
();
String
code
=
county
.
split
(
"_"
)[
0
];
List
<
LinkedHashMap
>
infoByCounty
=
getInfoByCounty
(
code
,
creatTree
);
return
ResponseHelper
.
buildResponse
(
infoByCounty
);
}
private
List
<
LinkedHashMap
>
getInfoByCounty
(
String
county
,
List
<
LinkedHashMap
>
children
)
{
for
(
LinkedHashMap
item
:
children
)
{
if
(
item
.
get
(
"companyCode"
).
toString
().
equals
(
county
))
{
return
(
List
<
LinkedHashMap
>)
item
.
get
(
"children"
);
}
else
{
if
(!
ObjectUtils
.
isEmpty
(
item
.
get
(
"children"
)))
{
List
<
LinkedHashMap
>
children1
=
getInfoByCounty
(
county
,
(
List
<
LinkedHashMap
>)
item
.
get
(
"children"
));
if
(!
CollectionUtils
.
isEmpty
(
children1
))
{
return
children1
;
}
}
}
}
return
new
ArrayList
<>();
}
/**
* 公共转办接口
* /jg/common/transfer
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/transfer"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"公共转办接口"
,
notes
=
"公共转办接口"
)
public
ResponseModel
<
Object
>
transfer
(
@RequestBody
Map
<
String
,
Object
>
map
)
{
Object
result
=
commonService
.
transfer
(
map
);
return
ResponseHelper
.
buildResponse
(
result
);
}
/**
* 校验EQUCODE的唯一性
*
* @param equCode EQUCODE
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/checkUniquenessOfEQUCODE"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"校验EQUCODE的唯一性"
,
notes
=
"校验EQUCODE的唯一性"
)
public
ResponseModel
<
Object
>
checkUniquenessOfEQUCODE
(
String
equCode
)
{
Boolean
bool
=
commonService
.
checkUniquenessOfEQUCODE
(
equCode
);
return
ResponseHelper
.
buildResponse
(
bool
);
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/test-file"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"文件测试"
,
notes
=
"文件测试"
)
public
ResponseModel
<
String
>
testFile
()
{
return
ResponseHelper
.
buildResponse
(
pdfService
.
signToPdf
(
"upload/tzs/pdf/1708911268708_temp.pdf"
,
"已作废"
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
,
needAuth
=
false
)
@GetMapping
(
value
=
"/water-print"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"文件测试"
,
notes
=
"文件测试"
)
public
ResponseModel
<
String
>
signToPdfWaterPrint
()
{
return
ResponseHelper
.
buildResponse
(
pdfService
.
signToPdfWaterPrint
(
"upload/tzs/pdf/1708911268708_temp.pdf"
,
"已作废"
));
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equList"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"按照业务类型查询设备种类,工作台使用"
,
notes
=
"按照业务类型查询设备种类,工作台使用"
)
public
ResponseModel
<
List
<
DictionarieValueModel
>>
equList
(
@RequestParam
(
value
=
"type"
)
String
bizType
)
{
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_SBZL,如BF_YZ_SBZL==》移装注销-设备种类
String
suffix
=
"_SBZL"
;
String
dictCode
=
bizType
+
suffix
;
return
ResponseHelper
.
buildResponse
(
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
());
}
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/equ-category/{categoryCode}/list"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"按照业务类型、设备种类查询设备类别"
,
notes
=
"按照业务类型、设备种类查询设备类别"
)
public
ResponseModel
<
List
<
DictionarieValueModel
>>
equCategoryList
(
@RequestParam
(
value
=
"type"
)
String
bizType
,
@PathVariable
String
categoryCode
)
{
// 在平台字典配置的自定义业务的设备种类:格式{bizType}_{categoryCode},如BF_YZ_1000==》移装注销-锅炉
String
dictCode
=
String
.
format
(
"%s_%s"
,
bizType
,
categoryCode
);
return
ResponseHelper
.
buildResponse
(
Systemctl
.
dictionarieClient
.
dictValues
(
dictCode
).
getResult
());
}
}
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