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
f2c126fa
Commit
f2c126fa
authored
Jul 02, 2021
by
李成龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除无用代码
parent
49427201
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
64 deletions
+70
-64
AircraftController.java
...os/boot/module/jcs/biz/controller/AircraftController.java
+21
-13
EquipmentController.java
...s/boot/module/jcs/biz/controller/EquipmentController.java
+8
-7
ExcelController.java
.../amos/boot/module/jcs/biz/controller/ExcelController.java
+14
-19
OrgPersonController.java
...s/boot/module/jcs/biz/controller/OrgPersonController.java
+15
-16
OrgUsrController.java
...amos/boot/module/jcs/biz/controller/OrgUsrController.java
+12
-9
No files found.
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/AircraftController.java
View file @
f2c126fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.DeleteMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PutMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.AircraftDto
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AircraftServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/EquipmentController.java
View file @
f2c126fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.FireSystemDto
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.EquipmentServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
java.util.List
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -15,7 +11,12 @@ 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.List
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.utils.MenuFrom
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.EquipmentServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
* 装备服务接口
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/ExcelController.java
View file @
f2c126fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
org.apache.commons.beanutils.BeanUtils
;
import
org.bouncycastle.crypto.RuntimeCryptoException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
java.lang.reflect.InvocationTargetException
;
import
java.util.ArrayList
;
import
java.util.List
;
import
javax.servlet.http.HttpServletResponse
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.ExcelDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.FireChemicalDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.FireChemical
;
import
com.yeejoin.amos.boot.module.jcs.api.excel.ExcelUtil
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.DataDictionaryMapper
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireChemicalServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.FireStationServiceImpl
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
/**
...
...
@@ -55,7 +50,7 @@ public class ExcelController extends BaseController {
public
void
template
(
HttpServletResponse
response
,
ExcelDto
excelDto
)
{
try
{
String
url
=
packageUrl
+
excelDto
.
getClassUrl
();
Class
clz
=
Class
.
forName
(
url
);
Class
<?>
clz
=
Class
.
forName
(
url
);
ExcelUtil
.
createTemplate
(
response
,
excelDto
.
getFileName
(),
excelDto
.
getSheetName
(),
null
,
clz
,
dataDictionaryMapper
,
true
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrgPersonController.java
View file @
f2c126fa
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
java.io.UnsupportedEncodingException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.Collection
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -25,8 +23,9 @@ import org.typroject.tyboot.core.restful.utils.ResponseModel;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.yeejoin.amos.boot.biz.common.constants.CommonConstant
;
import
com.yeejoin.amos.boot.
biz.common.utils.ExcelUtils
;
import
com.yeejoin.amos.boot.
module.jcs.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgPersonDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgPersonFormDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
...
...
@@ -55,7 +54,7 @@ public class OrgPersonController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增人员信息"
,
notes
=
"新增人员信息"
)
public
ResponseModel
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
public
ResponseModel
<?>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
)
throws
Exception
{
OrgPersonVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
iOrgUsrService
.
saveOrgPerson
(
OrgPersonVo
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -70,7 +69,7 @@ public class OrgPersonController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
<?>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
// 删除时,只作逻辑删除
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -84,7 +83,7 @@ public class OrgPersonController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新单位数据"
,
notes
=
"更新单位数据"
)
public
ResponseModel
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<?>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgPersonDto
OrgPersonVo
,
@PathVariable
Long
id
)
throws
Exception
{
OrgPersonVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_PERSON
);
iOrgUsrService
.
updateByIdOrgPerson
(
OrgPersonVo
,
id
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -102,7 +101,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
OrgPersonFormDto
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectPersonById
(
id
));
}
...
...
@@ -116,7 +115,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}/detail"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectByIdDetail
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
OrgPersonFormDto
>
selectByIdDetail
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectPersonByIdDetail
(
id
));
}
...
...
@@ -129,7 +128,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/show/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员详情(map类型)"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectForShowById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
Map
<
String
,
Object
>>
selectForShowById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
OrgUsr
orgUsr
=
iOrgUsrService
.
getById
(
id
);
Map
<
String
,
Object
>
result
=
iOrgUsrService
.
selectForShowById
(
orgUsr
,
id
);
return
ResponseHelper
.
buildResponse
(
result
);
...
...
@@ -145,7 +144,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyTree"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员树"
,
notes
=
"获取人员树"
)
public
ResponseModel
selectPersonTree
()
throws
Exception
{
public
ResponseModel
<
List
<
OrgMenuDto
>
>
selectPersonTree
()
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectPersonTree
());
}
...
...
@@ -170,7 +169,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{orgCode}/users"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据orgCode查询"
,
notes
=
"根据orgCode查询"
)
public
ResponseModel
selectUsersByOrgCode
(
HttpServletRequest
request
,
String
pageNum
,
String
pageSize
,
@PathVariable
Long
orgCode
)
{
public
ResponseModel
<
Collection
<
OrgUsr
>>
selectUsersByOrgCode
(
HttpServletRequest
request
,
String
pageNum
,
String
pageSize
,
@PathVariable
Long
orgCode
)
{
Map
<
String
,
Object
>
columnMap
=
new
HashMap
<>();
columnMap
.
put
(
"is_delete"
,
CommonConstant
.
IS_DELETE_00
);
columnMap
.
put
(
"biz_org_code"
,
orgCode
);
...
...
@@ -188,8 +187,8 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/download-template"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"导出人员模板"
,
notes
=
"导出人员模板"
)
public
ResponseModel
downloadTemplate
(
HttpServletResponse
response
)
throws
UnsupportedEncodingException
{
SimpleDateFormat
simpleDateFormat
=
new
SimpleDateFormat
(
"yyyyMMddhhmmss"
);
public
ResponseModel
<?>
downloadTemplate
(
HttpServletResponse
response
)
throws
UnsupportedEncodingException
{
//
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMddhhmmss");
// List<OrgUsrDownloadTemplateVO> OrgUsrDownloadTemplateVO = new ArrayList<OrgUsrDownloadTemplateVO>();
// ExcelUtils.exportExcel(OrgUsrDownloadTemplateVO, "人员信息", "人员信息", OrgUsrDownloadTemplateVO.class, simpleDateFormat.format(new Date()) + ".xls", response);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -203,7 +202,7 @@ public class OrgPersonController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/savePerson"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入人员信息"
,
notes
=
"导入人员信息"
)
public
ResponseModel
savePerson
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgPersonDto
>
OrgPersonVo
)
throws
Exception
{
public
ResponseModel
<?>
savePerson
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgPersonDto
>
OrgPersonVo
)
throws
Exception
{
iOrgUsrService
.
savePersonList
(
OrgPersonVo
);
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
@@ -217,7 +216,7 @@ public class OrgPersonController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/showPersonList/{ids}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取人员列表详情(map类型)"
,
notes
=
"获取人员详情"
)
public
ResponseModel
selectForShowByListId
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>
>
selectForShowByListId
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectForShowByListId
(
ids
)
);
}
...
...
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrgUsrController.java
View file @
f2c126fa
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.biz.controller;
import
java.util.Arrays
;
import
java.util.List
;
import
java.util.Map
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -28,6 +29,7 @@ import com.yeejoin.amos.boot.biz.common.utils.NameUtils;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgDepartmentDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgMenuDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrgUsrFormDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.AlertFormValueServiceImpl
;
import
com.yeejoin.amos.boot.module.jcs.biz.service.impl.OrgUsrServiceImpl
;
...
...
@@ -60,7 +62,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/save"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增单位信息"
,
notes
=
"新增单位信息"
)
public
ResponseModel
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
public
ResponseModel
<?>
saveOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
)
throws
Exception
{
OrgUsrVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
saveOrgUsr
(
OrgUsrVo
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -75,7 +77,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
DELETE
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据id删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
public
ResponseModel
<?>
deleteById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
{
// 删除时,只作逻辑删除
iOrgUsrService
.
update
(
new
UpdateWrapper
<
OrgUsr
>().
eq
(
"sequence_nbr"
,
id
).
set
(
"is_delete"
,
CommonConstant
.
IS_DELETE_01
));
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -90,7 +92,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"更新单位数据"
,
notes
=
"更新单位数据"
)
public
ResponseModel
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<?>
updateByIdOrgUsr
(
HttpServletRequest
request
,
@RequestBody
OrgUsrDto
OrgUsrVo
,
@PathVariable
Long
id
)
throws
Exception
{
OrgUsrVo
.
setBizOrgType
(
CommonConstant
.
BIZ_ORG_TYPE_COMPANY
);
iOrgUsrService
.
updateByIdOrgUsr
(
OrgUsrVo
,
id
);
return
ResponseHelper
.
buildResponse
(
null
);
...
...
@@ -106,7 +108,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{id}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位详情"
,
notes
=
"获取单位详情"
)
public
ResponseModel
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<
OrgUsrFormDto
>
selectById
(
HttpServletRequest
request
,
@PathVariable
Long
id
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
selectCompanyById
(
id
));
}
...
...
@@ -120,7 +122,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/selectByBizOrgType/{bizOrgType}"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据bizOrgType分页查询"
,
notes
=
"根据bizOrgType分页查询"
)
public
ResponseModel
bizOrgTypeListPage
(
String
pageNum
,
String
pageSize
,
@PathVariable
String
bizOrgType
)
throws
Exception
{
public
ResponseModel
<
IPage
<
OrgUsr
>>
bizOrgTypeListPage
(
String
pageNum
,
String
pageSize
,
@PathVariable
String
bizOrgType
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
page
(
iOrgUsrService
.
bizOrgTypeListPage
(
pageNum
,
pageSize
,
bizOrgType
)));
}
...
...
@@ -149,7 +151,7 @@ public class OrgUsrController extends BaseController {
@RequestMapping
(
value
=
"/orgTree"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取单位部门树(bizOrgCode为物理主键)"
,
notes
=
"获取单位部门树(bizOrgCode为物理主键)\""
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
selectCompanyTreeCode
()
throws
Exception
{
List
<
OrgMenuDto
>
menus
=
iOrgUsrService
.
buildTreeParallel
(
iOrgUsrService
.
selectCompanyDepartmentMsg
());
List
<
OrgMenuDto
>
menus
=
OrgUsrServiceImpl
.
buildTreeParallel
(
iOrgUsrService
.
selectCompanyDepartmentMsg
());
return
ResponseHelper
.
buildResponse
(
menus
);
}
...
...
@@ -209,7 +211,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/saveDepartment"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入部门信息"
,
notes
=
"导入部门信息"
)
public
ResponseModel
saveDepartment
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgDepartmentDto
>
OrgDepartmentVo
,
@PathVariable
Long
id
)
throws
Exception
{
public
ResponseModel
<?>
saveDepartment
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgDepartmentDto
>
OrgDepartmentVo
,
@PathVariable
Long
id
)
throws
Exception
{
iOrgUsrService
.
saveDepartment
(
OrgDepartmentVo
,
id
);
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
@@ -222,7 +224,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/saveCompany"
,
method
=
RequestMethod
.
POST
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"导入单位信息"
,
notes
=
"导入单位信息"
)
public
ResponseModel
saveCompany
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgUsrDto
>
OrgUsrVo
)
throws
Exception
{
public
ResponseModel
<?>
saveCompany
(
HttpServletRequest
request
,
@RequestBody
List
<
OrgUsrDto
>
OrgUsrVo
)
throws
Exception
{
iOrgUsrService
.
saveCompany
(
OrgUsrVo
);
return
ResponseHelper
.
buildResponse
(
null
);
}
...
...
@@ -236,7 +238,7 @@ public class OrgUsrController extends BaseController {
@TycloudOperation
(
needAuth
=
false
,
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/{ids}/users"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id获取单位人员列表"
,
notes
=
"根据id获取单位人员列表"
)
public
ResponseModel
selectUsersByOrgCode
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
public
ResponseModel
<
List
<
Map
<
String
,
Object
>>
>
selectUsersByOrgCode
(
HttpServletRequest
request
,
@PathVariable
List
<
Long
>
ids
)
throws
Exception
{
return
ResponseHelper
.
buildResponse
(
iOrgUsrService
.
returnCompanyPersonMsg
(
ids
))
;
}
}
\ 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