Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
0a59ae29
Commit
0a59ae29
authored
Aug 01, 2019
by
Mccoy Z Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
机构权限设置 页面与接口
parent
576adcab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
496 additions
and
23 deletions
+496
-23
UserOrganizationHKController.java
...taxtech/atms/controller/UserOrganizationHKController.java
+40
-0
UserOrganizationHKServiceImpl.java
...tech/atms/service/impl/UserOrganizationHKServiceImpl.java
+53
-0
UserOrganizationHKMapper.java
...xtech/atms/organization/dao/UserOrganizationHKMapper.java
+100
-0
UserOrganizationHKExtMapper.java
...ganization/dao/extension/UserOrganizationHKExtMapper.java
+29
-0
UserOrganizationHKDto.java
.../taxtech/atms/organization/dpo/UserOrganizationHKDto.java
+27
-0
OrganizationShareholder.java
...ech/atms/organization/entity/OrganizationShareholder.java
+1
-2
UserOrganizationHK.java
.../taxtech/atms/organization/entity/UserOrganizationHK.java
+208
-0
UserOrganizationHKExample.java
...h/atms/organization/entity/UserOrganizationHKExample.java
+0
-0
UserOrganizationHKMapper.xml
...axtech/atms/organization/dao/UserOrganizationHKMapper.xml
+0
-0
user-detail-view.ctrl.js
.../admin/infrastructure/userDetail/user-detail-view.ctrl.js
+0
-0
user-detail-view.html
...app/admin/infrastructure/userDetail/user-detail-view.html
+21
-21
userOrg.svc.js
...web/src/main/webapp/app/common/webservices/userOrg.svc.js
+17
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/UserOrganizationHKController.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.service.impl.UserOrganizationHKServiceImpl
;
import
java.util.List
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-08-01 15:26
* @Version: 1.0
**/
@RestController
@RequestMapping
(
"api/v1/user_org/"
)
public
class
UserOrganizationHKController
{
@Autowired
private
UserOrganizationHKServiceImpl
userOrganizationHKServiceImpl
;
@GetMapping
(
"getUserOrgList"
)
public
OperationResultDto
getUserOrgList
(
@Param
(
"userId"
)
String
userId
){
return
OperationResultDto
.
success
(
userOrganizationHKServiceImpl
.
getUserOrgList
(
userId
));
}
@GetMapping
(
"deleteUserOrg"
)
public
OperationResultDto
deleteUserOrg
(
@Param
(
"userOrgId"
)
Long
userOrgId
){
return
OperationResultDto
.
success
(
userOrganizationHKServiceImpl
.
delete
(
userOrgId
));
}
@PostMapping
(
"addUserOrg"
)
public
OperationResultDto
addUserOrg
(
@RequestBody
List
<
Long
>
orgIdList
,
@RequestParam
(
"userId"
)
String
userId
){
return
OperationResultDto
.
success
(
userOrganizationHKServiceImpl
.
add
(
orgIdList
,
userId
));
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/UserOrganizationHKServiceImpl.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.organization.dao.UserOrganizationHKMapper
;
import
pwc.taxtech.atms.organization.dao.extension.UserOrganizationHKExtMapper
;
import
pwc.taxtech.atms.organization.dpo.UserOrganizationHKDto
;
import
pwc.taxtech.atms.organization.entity.UserOrganizationHK
;
import
javax.annotation.Resource
;
import
java.util.List
;
import
java.util.concurrent.atomic.AtomicInteger
;
/**
* <p> 用户与机构关系相关接口 </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-08-01 15:21
* @Version: 1.0
**/
@Service
public
class
UserOrganizationHKServiceImpl
extends
BaseService
{
private
static
final
Logger
log
=
LoggerFactory
.
getLogger
(
UserOrganizationHKServiceImpl
.
class
);
@Resource
private
UserOrganizationHKExtMapper
userOrganizationHKExtMapper
;
@Resource
private
UserOrganizationHKMapper
userOrganizationHKMapper
;
public
Integer
delete
(
Long
userOrgId
){
return
userOrganizationHKMapper
.
deleteByPrimaryKey
(
userOrgId
);
}
public
Integer
add
(
List
<
Long
>
orgIdList
,
String
userId
){
AtomicInteger
count
=
new
AtomicInteger
();
orgIdList
.
forEach
(
orgId
->
{
UserOrganizationHK
record
=
new
UserOrganizationHK
();
record
.
setId
(
idService
.
nextId
());
record
.
setOrganizationId
(
orgId
);
record
.
setUserId
(
userId
);
count
.
addAndGet
(
userOrganizationHKMapper
.
insertSelective
(
record
));
});
return
count
.
get
();
}
public
List
<
UserOrganizationHKDto
>
getUserOrgList
(
String
userId
)
{
return
userOrganizationHKExtMapper
.
getUserOrgList
(
userId
);
}
}
atms-dao/src/main/java/pwc/taxtech/atms/organization/dao/UserOrganizationHKMapper.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
organization
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.organization.entity.UserOrganizationHK
;
import
pwc.taxtech.atms.organization.entity.UserOrganizationHKExample
;
@Mapper
public
interface
UserOrganizationHKMapper
extends
MyMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
long
countByExample
(
UserOrganizationHKExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
deleteByExample
(
UserOrganizationHKExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
insert
(
UserOrganizationHK
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
insertSelective
(
UserOrganizationHK
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
List
<
UserOrganizationHK
>
selectByExample
(
UserOrganizationHKExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
UserOrganizationHK
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
UserOrganizationHK
record
,
@Param
(
"example"
)
UserOrganizationHKExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
UserOrganizationHK
record
,
@Param
(
"example"
)
UserOrganizationHKExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
UserOrganizationHK
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
UserOrganizationHK
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/organization/dao/extension/UserOrganizationHKExtMapper.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
organization
.
dao
.
extension
;
import
org.apache.ibatis.annotations.Select
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.organization.dpo.UserOrganizationHKDto
;
import
java.util.List
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-08-01 15:16
* @Version: 1.0
**/
public
interface
UserOrganizationHKExtMapper
extends
MyMapper
{
@Select
(
"SELECT\n"
+
"\tt1.id AS userOrgId,\n"
+
"\tt2.id AS orgId,\n"
+
"\tt2. NAME AS orgName\n"
+
"FROM\n"
+
"\tuser_organization t1\n"
+
"LEFT JOIN organization t2 ON t1.organization_id = t2.id\n"
+
"WHERE\n"
+
"\tt2.is_active = 1\n"
+
"AND t1.user_id = #{userId}"
)
List
<
UserOrganizationHKDto
>
getUserOrgList
(
String
userId
);
}
atms-dao/src/main/java/pwc/taxtech/atms/organization/dpo/UserOrganizationHKDto.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
organization
.
dpo
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.databind.ser.std.ToStringSerializer
;
import
lombok.Getter
;
import
lombok.Setter
;
/**
* <p> @Description </p>
*
* @Author: Mccoy Z Xia (Xia zhixin)
* @Date: 2019-08-01 16:43
* @Version: 1.0
**/
@Getter
@Setter
public
class
UserOrganizationHKDto
{
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
userOrgId
;
@JsonSerialize
(
using
=
ToStringSerializer
.
class
)
private
Long
orgId
;
private
String
orgName
;
}
atms-dao/src/main/java/pwc/taxtech/atms/organization/entity/OrganizationShareholder.java
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
organization
.
entity
;
import
pwc.taxtech.atms.entity.BaseEntity
;
import
java.io.Serializable
;
import
java.util.Date
;
import
pwc.taxtech.atms.entity.BaseEntity
;
/**
*
...
...
atms-dao/src/main/java/pwc/taxtech/atms/organization/entity/UserOrganizationHK.java
0 → 100644
View file @
0a59ae29
package
pwc
.
taxtech
.
atms
.
organization
.
entity
;
import
java.io.Serializable
;
import
pwc.taxtech.atms.entity.BaseEntity
;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table user_organization
*
* @mbg.generated do_not_delete_during_merge
*/
public
class
UserOrganizationHK
extends
BaseEntity
implements
Serializable
{
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_organization.id
*
* @mbg.generated
*/
private
Long
id
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_organization.user_id
*
* @mbg.generated
*/
private
String
userId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_organization.organization_id
*
* @mbg.generated
*/
private
Long
organizationId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_organization.is_accessible
*
* @mbg.generated
*/
private
Boolean
isAccessible
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column user_organization.has_original_role
*
* @mbg.generated
*/
private
Boolean
hasOriginalRole
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table user_organization
*
* @mbg.generated
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column user_organization.id
*
* @return the value of user_organization.id
*
* @mbg.generated
*/
public
Long
getId
()
{
return
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column user_organization.id
*
* @param id the value for user_organization.id
*
* @mbg.generated
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column user_organization.user_id
*
* @return the value of user_organization.user_id
*
* @mbg.generated
*/
public
String
getUserId
()
{
return
userId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column user_organization.user_id
*
* @param userId the value for user_organization.user_id
*
* @mbg.generated
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
==
null
?
null
:
userId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column user_organization.organization_id
*
* @return the value of user_organization.organization_id
*
* @mbg.generated
*/
public
Long
getOrganizationId
()
{
return
organizationId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column user_organization.organization_id
*
* @param organizationId the value for user_organization.organization_id
*
* @mbg.generated
*/
public
void
setOrganizationId
(
Long
organizationId
)
{
this
.
organizationId
=
organizationId
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column user_organization.is_accessible
*
* @return the value of user_organization.is_accessible
*
* @mbg.generated
*/
public
Boolean
getIsAccessible
()
{
return
isAccessible
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column user_organization.is_accessible
*
* @param isAccessible the value for user_organization.is_accessible
*
* @mbg.generated
*/
public
void
setIsAccessible
(
Boolean
isAccessible
)
{
this
.
isAccessible
=
isAccessible
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column user_organization.has_original_role
*
* @return the value of user_organization.has_original_role
*
* @mbg.generated
*/
public
Boolean
getHasOriginalRole
()
{
return
hasOriginalRole
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column user_organization.has_original_role
*
* @param hasOriginalRole the value for user_organization.has_original_role
*
* @mbg.generated
*/
public
void
setHasOriginalRole
(
Boolean
hasOriginalRole
)
{
this
.
hasOriginalRole
=
hasOriginalRole
;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_organization
*
* @mbg.generated
*/
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
", organizationId="
).
append
(
organizationId
);
sb
.
append
(
", isAccessible="
).
append
(
isAccessible
);
sb
.
append
(
", hasOriginalRole="
).
append
(
hasOriginalRole
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/organization/entity/UserOrganizationHKExample.java
0 → 100644
View file @
0a59ae29
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/organization/dao/UserOrganizationHKMapper.xml
0 → 100644
View file @
0a59ae29
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/admin/infrastructure/userDetail/user-detail-view.ctrl.js
View file @
0a59ae29
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/admin/infrastructure/userDetail/user-detail-view.html
View file @
0a59ae29
...
...
@@ -98,27 +98,27 @@
<!--总体设置-->
<div
style=
"margin: 10px 20px 0px 15px; display:block;"
>
<div
>
<div
>
<div
style=
"height: 36px; line-height: 36px; float: left;"
>
机构上层维度设置
</div
>
<div
style=
"float:right"
>
<button
class=
"btn btn-in-grid"
ng-class=
"{false:'no-permission'}[hasEditPermission]"
ng-disabled=
"!hasEditPermission"
ng-click=
"popupDimensionAddWin()"
style=
"margin-bottom: 5px;"
>
<i
class=
" material-icons"
>
add_circle_outline
</i>
<span
translate=
"AddDimensionTitle"
></span
>
</button
>
</div
>
</div
>
<div
class=
"clear"
></div
>
<div
id=
"generalSettingGrid"
style=
"width:99%;height:200px;border-radius: 5px;"
ui-grid=
"generalSettingList"
ui-grid-selection
ui-grid-auto-resize
ng-style=
"getGridHeight()"
>
</div
>
</div
>
</div
>
<!-- <div style="margin: 10px 20px 0px 15px; display:block;">--
>
<!-- <div>--
>
<!-- <div>--
>
<!-- <div style="height: 36px; line-height: 36px; float: left;">机构上层维度设置</div>--
>
<!-- <div style="float:right">--
>
<!-- <button class="btn btn-in-grid" ng-class="{false:'no-permission'}[hasEditPermission]" ng-disabled="!hasEditPermission" ng-click="popupDimensionAddWin()" style="margin-bottom: 5px;">--
>
<!-- <i class=" material-icons">add_circle_outline</i> <span translate="AddDimensionTitle"></span>--
>
<!-- </button>--
>
<!-- </div>--
>
<!-- </div>--
>
<!-- <div class="clear"></div>--
>
<!-- <div id="generalSettingGrid" style="width:99%;height:200px;border-radius: 5px;"-->
<!-- ui-grid="generalSettingList"-->
<!-- ui-grid-selection-->
<!-- ui-grid-auto-resize-->
<!-- ng-style="getGridHeight()">--
>
<!-- </div>--
>
<!-- </div>--
>
<!-- </div>--
>
<!--各机构设置-->
<div
style=
"margin: 30px 20px 0px 15px; display:block;"
id=
"orgSetting"
>
...
...
atms-web/src/main/webapp/app/common/webservices/userOrg.svc.js
0 → 100644
View file @
0a59ae29
webservices
.
factory
(
'userOrgService'
,
[
'$http'
,
'apiConfig'
,
'httpCacheService'
,
'loginContext'
,
'FileSaver'
,
function
(
$http
,
apiConfig
,
httpCacheService
,
loginContext
,
FileSaver
)
{
'use strict'
;
return
{
getUserOrgList
:
function
(
userId
)
{
return
$http
.
get
(
'/user_org/getUserOrgList?userId='
+
userId
,
apiConfig
.
create
());
},
deleteUserOrg
:
function
(
userOrgId
)
{
return
$http
.
get
(
'/user_org/deleteUserOrg?userOrgId='
+
userOrgId
,
apiConfig
.
create
());
},
addUserOrg
:
function
(
orgIdList
,
userId
)
{
return
$http
.
post
(
'/user_org/addUserOrg?userId='
+
userId
,
orgIdList
,
apiConfig
.
create
());
}
}
}
]);
\ 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