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
904a33e6
Commit
904a33e6
authored
Nov 14, 2022
by
fenghuazhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
根据登录信息获取单位
parent
be4daecb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
AttachmentController.java
.../boot/module/ugp/biz/controller/AttachmentController.java
+13
-0
AttachmentServiceImpl.java
...ot/module/ugp/biz/service/impl/AttachmentServiceImpl.java
+31
-0
No files found.
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/controller/AttachmentController.java
View file @
904a33e6
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
ugp
.
biz
.
controller
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -113,4 +114,16 @@ public class AttachmentController extends BaseController {
...
@@ -113,4 +114,16 @@ public class AttachmentController extends BaseController {
public
ResponseModel
<
List
<
AttachmentDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
AttachmentDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
attachmentServiceImpl
.
queryForAttachmentList
());
return
ResponseHelper
.
buildResponse
(
attachmentServiceImpl
.
queryForAttachmentList
());
}
}
/**
* 根据当前登录人获取单位
*
*/
@BusinessIdentify
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/unit"
)
@ApiOperation
(
httpMethod
=
"Get"
,
value
=
"单位选择查询"
,
notes
=
"单位选择查询"
)
public
ResponseModel
<
String
>
selectUnit
(){
return
ResponseHelper
.
buildResponse
(
attachmentServiceImpl
.
selectUnit
());
}
}
}
amos-boot-system-ugp/amos-boot-module-ugp-biz/src/main/java/com/yeejoin/amos/boot/module/ugp/biz/service/impl/AttachmentServiceImpl.java
View file @
904a33e6
...
@@ -3,15 +3,23 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
...
@@ -3,15 +3,23 @@ package com.yeejoin.amos.boot.module.ugp.biz.service.impl;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.module.common.api.entity.OrgUsr
;
import
com.yeejoin.amos.boot.module.common.biz.service.impl.OrgUsrServiceImpl
;
import
com.yeejoin.amos.boot.module.ugp.api.Enum.OrgEnum
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.entity.Attachment
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.mapper.AttachmentMapper
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.service.IAttachmentService
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.api.dto.AttachmentDto
;
import
com.yeejoin.amos.boot.module.ugp.biz.framework.BusinessIdentify
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.foundation.utils.ValidationUtil
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
java.util.List
;
import
java.util.List
;
import
com.yeejoin.amos.boot.module.ugp.biz.controller.ProjectController
;
/**
/**
* 附件表服务实现类
* 附件表服务实现类
...
@@ -21,6 +29,11 @@ import java.util.List;
...
@@ -21,6 +29,11 @@ import java.util.List;
*/
*/
@Service
@Service
public
class
AttachmentServiceImpl
extends
BaseService
<
AttachmentDto
,
Attachment
,
AttachmentMapper
>
implements
IAttachmentService
{
public
class
AttachmentServiceImpl
extends
BaseService
<
AttachmentDto
,
Attachment
,
AttachmentMapper
>
implements
IAttachmentService
{
@Autowired
OrgServiceImpl
orgServiceImpl
;
@Autowired
OrgUsrServiceImpl
orgUsrService
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -61,4 +74,21 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
...
@@ -61,4 +74,21 @@ public class AttachmentServiceImpl extends BaseService<AttachmentDto,Attachment,
}
}
this
.
save
(
attachment
);
this
.
save
(
attachment
);
}
}
/**
*获取登录人的单位
*
*/
@BusinessIdentify
public
String
selectUnit
(){
//获取登录人的redis信息
ReginParams
reginParams
=
orgServiceImpl
.
getReginParams
();
//根据redis信息去获取登录人信息后再获取到登录人的sequenceNbr
Long
companyId
=
reginParams
.
getBusinessInfo
().
getCompanySequenceNbr
();
OrgUsr
orgUsr
=
orgUsrService
.
getById
(
companyId
);
String
key
=
orgUsr
.
getOrgExpandAttr1
();
return
OrgEnum
.
map
.
get
(
key
);
}
}
}
\ 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