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
f3a7aa52
Commit
f3a7aa52
authored
Jul 09, 2019
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed entity page backend-- frank
parent
fee7b123
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
331 additions
and
282 deletions
+331
-282
OrganizationController.java
...a/pwc/taxtech/atms/controller/OrganizationController.java
+8
-8
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+152
-141
RoleServiceImpl.java
...n/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
+67
-67
OrganizationHKDto.java
.../pwc/taxtech/atms/organization/dpo/OrganizationHKDto.java
+38
-0
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+58
-58
edit-organization-modal.ctrl.js
...s/edit-organization-modal/edit-organization-modal.ctrl.js
+8
-8
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OrganizationController.java
View file @
f3a7aa52
...
...
@@ -6,18 +6,18 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.dpo.*
;
import
pwc.taxtech.atms.dpo.OrgBasicDto
;
import
pwc.taxtech.atms.dpo.OrgInfoDto
;
import
pwc.taxtech.atms.dpo.OrgSelectDto
;
import
pwc.taxtech.atms.dpo.OrganizationDto
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.organization.OrganizationExtraDto
;
import
pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard
;
import
pwc.taxtech.atms.dto.dimension.OrgDashboardParams
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.dto.navtree.NavTreeDto
;
import
pwc.taxtech.atms.dto.organization.DimensionRoleDto
;
import
pwc.taxtech.atms.dto.organization.OrgDto
;
import
pwc.taxtech.atms.dto.organization.OrgGeneralInfoDto
;
import
pwc.taxtech.atms.dto.organization.UpdateOrgDimensionDto
;
import
pwc.taxtech.atms.dto.organization.*
;
import
pwc.taxtech.atms.dto.vatdto.JsonExportDto
;
import
pwc.taxtech.atms.organization.dpo.OrganizationHKDto
;
import
pwc.taxtech.atms.service.impl.OrganizationServiceImpl
;
import
pwc.taxtech.atms.service.impl.UserRoleServiceImpl
;
import
pwc.taxtech.atms.service.impl.UserServiceImpl
;
...
...
@@ -62,7 +62,7 @@ public class OrganizationController {
// @ApiOperation(value = "根据使用的方式获取机构的展示列表")
@RequestMapping
(
value
=
"display"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
OrganizationDto
>
getOrgList
(
@RequestParam
(
"useType"
)
Integer
useType
)
{
List
<
Organization
HK
Dto
>
getOrgList
(
@RequestParam
(
"useType"
)
Integer
useType
)
{
return
organizationService
.
getOrgList
(
useType
);
}
...
...
@@ -184,7 +184,7 @@ public class OrganizationController {
// @ApiOperation(value = "通过orgId获取一个组织的信息")
@RequestMapping
(
value
=
"displaySingle"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
Organization
Dto
getSingleOrgByOrgId
(
@RequestParam
(
"orgId"
)
Stri
ng
orgId
)
{
Organization
HKDto
getSingleOrgByOrgId
(
@RequestParam
(
"orgId"
)
Lo
ng
orgId
)
{
logger
.
info
(
"POST /api/v1/org/displaySingle"
);
return
organizationService
.
getSingleOrgByOrgId
(
orgId
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
f3a7aa52
...
...
@@ -44,6 +44,10 @@ import pwc.taxtech.atms.dto.vatdto.JsonExportDto;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.entity.OrganizationExample.Criteria
;
import
pwc.taxtech.atms.exception.ApplicationException
;
import
pwc.taxtech.atms.organization.dao.OrganizationHKMapper
;
import
pwc.taxtech.atms.organization.dpo.OrganizationHKDto
;
import
pwc.taxtech.atms.organization.entity.OrganizationHK
;
import
pwc.taxtech.atms.organization.entity.OrganizationHKExample
;
import
pwc.taxtech.atms.thirdparty.ExcelUtil
;
import
javax.annotation.Resource
;
...
...
@@ -64,11 +68,14 @@ import static pwc.taxtech.atms.common.message.LogMessage.AddOrganization;
* @author rzhou038
*/
@Service
public
class
OrganizationServiceImpl
extends
BaseService
{
public
class
OrganizationServiceImpl
extends
BaseService
{
@Autowired
private
OrganizationMapper
organizationMapper
;
@Resource
private
OrganizationHKMapper
organizationHKMapper
;
@Autowired
private
OrganizationExtraMapper
organizationExtraMapper
;
...
...
@@ -189,11 +196,11 @@ public class OrganizationServiceImpl extends BaseService{
}
public
List
<
NavTreeDto
>
getOrgListToJson
(
Integer
useType
)
{
List
<
OrganizationDto
>
orgList
=
getOrgList
(
useType
);
List
<
Organization
HK
Dto
>
orgList
=
getOrgList
(
useType
);
return
orgList
.
stream
().
map
(
this
::
rotateOrganizationDtoToNavTreeDto
).
collect
(
Collectors
.
toList
());
}
private
NavTreeDto
rotateOrganizationDtoToNavTreeDto
(
OrganizationDto
organizationDto
)
{
private
NavTreeDto
rotateOrganizationDtoToNavTreeDto
(
Organization
HK
Dto
organizationDto
)
{
NavTreeDto
navTreeDto
=
new
NavTreeDto
();
navTreeDto
.
setLabel
(
organizationDto
.
getName
());
navTreeDto
.
setData
(
organizationDto
);
...
...
@@ -202,39 +209,39 @@ public class OrganizationServiceImpl extends BaseService{
return
navTreeDto
;
}
public
List
<
OrganizationDto
>
getOrgList
(
Integer
useType
)
{
List
<
OrganizationDto
>
orgDtoList
=
new
ArrayList
<>();
List
<
Organization
>
orgList
=
findAllOrganizations
();
public
List
<
Organization
HK
Dto
>
getOrgList
(
Integer
useType
)
{
List
<
Organization
HK
Dto
>
orgDtoList
=
new
ArrayList
<>();
List
<
Organization
HK
>
orgList
=
findAllOrganizations
();
if
(!
orgList
.
isEmpty
())
{
// find rootOrg
List
<
Organization
>
rootOrgs
=
null
;
List
<
Organization
HK
>
rootOrgs
=
null
;
if
(
useType
==
1
)
{
rootOrgs
=
orgList
.
stream
().
filter
(
x
->
StringUtils
.
isEmpty
(
x
.
getParentId
())
).
collect
(
Collectors
.
toList
());
rootOrgs
=
orgList
.
stream
().
filter
(
x
->
x
.
getParentId
()
==
0
).
collect
(
Collectors
.
toList
());
}
else
{
rootOrgs
=
orgList
.
stream
()
.
filter
(
x
->
StringUtils
.
isEmpty
(
x
.
getParentId
())
&&
CommonConstants
.
ACTIVE_STATUS
.
equals
(
x
.
getIsActive
()))
.
filter
(
x
->
x
.
getParentId
()
==
0
&&
CommonConstants
.
ACTIVE_STATUS
.
equals
(
x
.
getIsActive
()))
.
collect
(
Collectors
.
toList
());
}
List
<
ServiceType
>
serviceList
=
new
ArrayList
<>();
for
(
Organization
rootOrg
:
rootOrgs
)
{
OrganizationDto
rootDto
=
rotateOrganizationToOrganizationDto
(
rootOrg
);
OrganizationDto
subOrgs
=
genarateSubOrgs
(
rootDto
,
orgList
,
serviceList
,
useType
);
for
(
Organization
HK
rootOrg
:
rootOrgs
)
{
Organization
HK
Dto
rootDto
=
rotateOrganizationToOrganizationDto
(
rootOrg
);
Organization
HK
Dto
subOrgs
=
genarateSubOrgs
(
rootDto
,
orgList
,
serviceList
,
useType
);
orgDtoList
.
add
(
subOrgs
);
}
}
orgDtoList
.
sort
((
Organization
Dto
o1
,
Organization
Dto
o2
)
->
o1
.
getName
().
compareTo
(
o2
.
getName
()));
orgDtoList
.
sort
((
Organization
HKDto
o1
,
OrganizationHK
Dto
o2
)
->
o1
.
getName
().
compareTo
(
o2
.
getName
()));
return
orgDtoList
;
}
private
Organization
Dto
genarateSubOrgs
(
OrganizationDto
parentOrg
,
List
<
Organization
>
orgs
,
private
Organization
HKDto
genarateSubOrgs
(
OrganizationHKDto
parentOrg
,
List
<
OrganizationHK
>
orgs
,
List
<
ServiceType
>
serviceList
,
Integer
useType
)
{
if
(
StringUtils
.
isNotEmpty
(
parentOrg
.
getParentId
())
)
{
Organization
organization
=
orgs
.
stream
().
filter
(
x
->
x
.
getId
().
equals
(
parentOrg
.
getParentId
()))
if
(
parentOrg
.
getParentId
()>
0
)
{
Organization
HK
organization
=
orgs
.
stream
().
filter
(
x
->
x
.
getId
().
equals
(
parentOrg
.
getParentId
()))
.
collect
(
Collectors
.
toList
()).
get
(
0
);
parentOrg
.
setParentName
(
organization
==
null
?
null
:
organization
.
getName
());
}
List
<
Organization
>
subOrgs
=
null
;
List
<
Organization
HK
>
subOrgs
=
null
;
if
(
useType
==
1
)
{
subOrgs
=
orgs
.
stream
().
filter
(
x
->
parentOrg
.
getId
().
equals
(
x
.
getParentId
())).
collect
(
Collectors
.
toList
());
}
else
{
...
...
@@ -244,16 +251,16 @@ public class OrganizationServiceImpl extends BaseService{
parentOrg
.
setSubOrgs
(
new
ArrayList
<>());
// create and add subtrees to the current node
for
(
Organization
subOrg
:
subOrgs
)
{
OrganizationDto
subDto
=
rotateOrganizationToOrganizationDto
(
subOrg
);
for
(
Organization
HK
subOrg
:
subOrgs
)
{
Organization
HK
Dto
subDto
=
rotateOrganizationToOrganizationDto
(
subOrg
);
subDto
.
setLevel
(
parentOrg
.
getLevel
()
==
null
?
1
:
parentOrg
.
getLevel
()
+
1
);
parentOrg
.
getSubOrgs
().
add
(
genarateSubOrgs
(
subDto
,
orgs
,
serviceList
,
useType
));
}
return
parentOrg
;
}
private
Organization
Dto
rotateOrganizationToOrganizationDto
(
Organization
organization
)
{
Organization
Dto
organizationDto
=
new
Organization
Dto
();
private
Organization
HKDto
rotateOrganizationToOrganizationDto
(
OrganizationHK
organization
)
{
Organization
HKDto
organizationDto
=
new
OrganizationHK
Dto
();
CommonUtils
.
copyProperties
(
organization
,
organizationDto
);
return
organizationDto
;
}
...
...
@@ -289,9 +296,9 @@ public class OrganizationServiceImpl extends BaseService{
return
organizationDtoList
;
}
public
List
<
Organization
>
findAllOrganizations
()
{
Organization
Example
organizationExample
=
new
Organization
Example
();
return
organizationMapper
.
selectByExample
(
organizationExample
);
public
List
<
Organization
HK
>
findAllOrganizations
()
{
Organization
HKExample
organizationExample
=
new
OrganizationHK
Example
();
return
organization
HK
Mapper
.
selectByExample
(
organizationExample
);
}
public
List
<
IndustryDto
>
getProjectIndustryList
()
{
...
...
@@ -327,21 +334,22 @@ public class OrganizationServiceImpl extends BaseService{
* 查询出所有机构信息及机构其他信息,合成dto[]返回。
* 无其他信息的机构亦返回基本信息。
* []
*
@author Gary J Li
*
* @return List<OrgInfoDto>
* @author Gary J Li
*/
public
List
<
OrgInfoDto
>
getOrgInfo
()
{
List
<
OrgInfoDto
>
orgInfoDtoList
=
new
ArrayList
<>();
List
<
OrgBasicDto
>
orgBasicDtoList
=
organizationMapper
.
selectIndBusiunitAreaOrgstrctReg
(
false
);
List
<
OrganizationExtra
>
organizationExtraList
=
organizationExtraMapper
.
selectByExample
(
null
);
if
(
orgBasicDtoList
!=
null
&&
!
orgBasicDtoList
.
isEmpty
())
{
for
(
OrgBasicDto
orgBasicDto:
orgBasicDtoList
)
{
for
(
OrgBasicDto
orgBasicDto
:
orgBasicDtoList
)
{
OrgInfoDto
orgInfoDto
=
new
OrgInfoDto
();
addBasicInfo
(
orgInfoDto
,
orgBasicDto
);
for
(
OrganizationExtra
organizationExtra:
organizationExtraList
)
{
addBasicInfo
(
orgInfoDto
,
orgBasicDto
);
for
(
OrganizationExtra
organizationExtra
:
organizationExtraList
)
{
// 机构没有其他信息时,也将机构基本信息拼入查询结果
if
(
StringUtils
.
equals
(
orgBasicDto
.
getId
(),
organizationExtra
.
getOrganizationId
()))
{
addExtraInfo
(
orgInfoDto
,
organizationExtra
);
if
(
StringUtils
.
equals
(
orgBasicDto
.
getId
(),
organizationExtra
.
getOrganizationId
()))
{
addExtraInfo
(
orgInfoDto
,
organizationExtra
);
break
;
}
}
...
...
@@ -362,12 +370,12 @@ public class OrganizationServiceImpl extends BaseService{
return
orgInfoDtoList
;
}
private
void
addBasicInfo
(
OrgInfoDto
orgInfoDto
,
OrgBasicDto
orgBasicDto
)
{
BeanUtils
.
copyProperties
(
orgBasicDto
,
orgInfoDto
);
private
void
addBasicInfo
(
OrgInfoDto
orgInfoDto
,
OrgBasicDto
orgBasicDto
)
{
BeanUtils
.
copyProperties
(
orgBasicDto
,
orgInfoDto
);
orgInfoDto
.
setIsActive
(
orgBasicDto
.
getIsActive
());
}
private
void
addExtraInfo
(
OrgInfoDto
orgInfoDto
,
OrganizationExtra
orgExtra
)
{
private
void
addExtraInfo
(
OrgInfoDto
orgInfoDto
,
OrganizationExtra
orgExtra
)
{
orgInfoDto
.
setUnifiedSocialCreditCode
(
orgExtra
.
getUnifiedSocialCreditCode
());
orgInfoDto
.
setTaxRegStatus
(
orgExtra
.
getTaxRegStatus
());
orgInfoDto
.
setApplicableAccountingRule
(
orgExtra
.
getApplicableAccountingRule
());
...
...
@@ -1903,12 +1911,13 @@ public class OrganizationServiceImpl extends BaseService{
}
}
public
OrganizationDto
getSingleOrgByOrgId
(
String
orgId
)
{
OrganizationDto
result
=
organizationMapper
.
getSingleOrgByOrgIdToOrgDto
(
orgId
).
stream
().
findFirst
()
.
orElse
(
null
);
public
OrganizationHKDto
getSingleOrgByOrgId
(
Long
orgId
)
{
OrganizationHK
organizationHK
=
organizationHKMapper
.
selectByPrimaryKey
(
orgId
);
OrganizationHKDto
result
=
new
OrganizationHKDto
();
CommonUtils
.
copyProperties
(
organizationHK
,
result
);
Assert
.
notNull
(
result
,
"result is null"
);
result
.
setLevel
(
result
.
getLevel
()
==
null
?
0
:
result
.
getLevel
());
result
.
setIsSystemDimension
(
result
.
getIsSystemDimension
()
==
null
?
false
:
result
.
getIsSystemDimension
());
//
result.setIsSystemDimension(result.getIsSystemDimension() == null ? false : result.getIsSystemDimension());
// 查询机构账套
// List<EnterpriseAccountSetOrgDto> query1 = enterpriseAccountSetOrgMapper.getSingleOrgByOrgIdToEASODto(orgId);
...
...
@@ -1930,10 +1939,10 @@ public class OrganizationServiceImpl extends BaseService{
// }
// }
// result.setOrganizationServiceTemplateGroupList(query2);
if
(
StringUtils
.
isEmpty
(
result
.
getParentId
())
)
{
if
(
result
.
getParentId
()==
0
)
{
result
.
setParentName
(
""
);
}
else
{
Organization
tParent
=
organization
Mapper
.
selectByExample
(
null
).
stream
()
Organization
HK
tParent
=
organizationHK
Mapper
.
selectByExample
(
null
).
stream
()
.
filter
(
sa
->
Objects
.
equals
(
sa
.
getId
(),
result
.
getParentId
())).
findFirst
().
orElse
(
null
);
Assert
.
notNull
(
tParent
,
"tParent is null"
);
result
.
setParentName
(
tParent
.
getName
());
...
...
@@ -1946,8 +1955,8 @@ public class OrganizationServiceImpl extends BaseService{
OrganizationExtraDto
organizationExtraDto
=
new
OrganizationExtraDto
();
OrganizationExtra
organizationExtra
=
organizationExtraMapper
.
selectByOrgId
(
orgId
).
stream
().
findFirst
()
.
orElse
(
null
);
if
(
null
!=
organizationExtra
)
{
beanUtil
.
copyProperties
(
organizationExtra
,
organizationExtraDto
);
if
(
null
!=
organizationExtra
)
{
beanUtil
.
copyProperties
(
organizationExtra
,
organizationExtraDto
);
}
return
organizationExtraDto
;
}
...
...
@@ -2021,7 +2030,7 @@ public class OrganizationServiceImpl extends BaseService{
}
// 添加账套
if
(!
orgDto
.
getOversea
())
{
if
(!
orgDto
.
getOversea
())
{
// for (EnterpriseAccountSetOrgDto p : orgDto.getEnterpriseAccountSetOrgList()) {
// EnterpriseAccountSetOrg enterpriseAccountSetOrg = new EnterpriseAccountSetOrg();
// enterpriseAccountSetOrg.setId(CommonUtils.getUUID());
...
...
@@ -2170,7 +2179,7 @@ public class OrganizationServiceImpl extends BaseService{
private
OperationResultDto
checkExist
(
OrganizationDto
orgDto
)
{
Assert
.
notNull
(
orgDto
,
"orgDto null point error"
);
Organization
queryRoot
=
null
;
if
((
null
==
orgDto
.
getOversea
()||
!
orgDto
.
getOversea
())
&&
orgDto
.
getParentId
()
!=
null
)
{
if
((
null
==
orgDto
.
getOversea
()
||
!
orgDto
.
getOversea
())
&&
orgDto
.
getParentId
()
!=
null
)
{
OrganizationExample
example
=
new
OrganizationExample
();
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andClientCodeEqualTo
(
orgDto
.
getClientCode
());
...
...
@@ -2183,7 +2192,7 @@ public class OrganizationServiceImpl extends BaseService{
return
new
OperationResultDto
(
false
,
OrganizationMessage
.
ClientCodeIsExist
);
}
OperationResultDto
operationResult
=
checkOrgNameOrOrgCode
(
orgDto
);
if
(
operationResult
.
getResult
()
&&
(
null
==
orgDto
.
getOversea
()||
!
orgDto
.
getOversea
()))
{
if
(
operationResult
.
getResult
()
&&
(
null
==
orgDto
.
getOversea
()
||
!
orgDto
.
getOversea
()))
{
operationResult
=
checkCodeTaxPaymentNo
(
orgDto
);
}
return
operationResult
;
...
...
@@ -2319,7 +2328,7 @@ public class OrganizationServiceImpl extends BaseService{
@SuppressWarnings
(
"rawtypes"
)
private
OperationResultDto
checkOrgNameOrOrgCode
(
OrganizationDto
orgDto
)
{
OrganizationExample
example
=
new
OrganizationExample
();
if
(
null
!=
orgDto
.
getOversea
()&&
orgDto
.
getOversea
()&&
null
!=
orgDto
.
getEnglishName
())
{
if
(
null
!=
orgDto
.
getOversea
()
&&
orgDto
.
getOversea
()
&&
null
!=
orgDto
.
getEnglishName
())
{
return
new
OperationResultDto
(
true
);
}
if
(
orgDto
.
getId
()
==
null
)
{
...
...
@@ -2409,7 +2418,7 @@ public class OrganizationServiceImpl extends BaseService{
org.setIndustryId(orgDto.getIndustryId());
org.setBusinessUnitId(orgDto.getBusinessUnitId());*/
beanUtil
.
copyProperties
(
orgDto
,
org
);
beanUtil
.
copyProperties
(
orgDto
,
org
);
org
.
setUpdateTime
(
new
Date
());
Organization
orgUpdate
=
org
;
...
...
@@ -2615,26 +2624,27 @@ public class OrganizationServiceImpl extends BaseService{
* 16/01/2019 14:26
* 根据唯一主键进行更新机构其他信息,缺少逻辑校验
* [orgExtraDto]
*
@author Gary J Li
*
* @return
* @author Gary J Li
*/
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
public
OperationResultDto
<
Object
>
updateOrgExtra
(
OrganizationExtraDto
orgExtraDto
)
{
try
{
OrganizationExtra
orgExtra
=
new
OrganizationExtra
();
BeanUtils
.
copyProperties
(
orgExtraDto
,
orgExtra
);
BeanUtils
.
copyProperties
(
orgExtraDto
,
orgExtra
);
// 根据唯一主键进行更新
if
(
null
==
orgExtra
.
getId
())
{
if
(
null
==
orgExtra
.
getId
())
{
orgExtra
.
setId
(
idService
.
nextId
());
organizationExtraMapper
.
insertSelective
(
orgExtra
);
}
else
{
}
else
{
OrganizationExtraExample
orgExtraExample
=
new
OrganizationExtraExample
();
orgExtraExample
.
createCriteria
().
andIdEqualTo
(
orgExtraDto
.
getId
());
organizationExtraMapper
.
updateByExampleSelective
(
orgExtra
,
orgExtraExample
);
organizationExtraMapper
.
updateByExampleSelective
(
orgExtra
,
orgExtraExample
);
}
// todo 暂时未做校验
return
new
OperationResultDto
(
true
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
logger
.
error
(
"UpdateOrgExtra出错了:"
+
ex
,
ex
);
logger
.
error
(
"标记回滚, ready to call setRollbackOnly"
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
...
...
@@ -2790,10 +2800,11 @@ public class OrganizationServiceImpl extends BaseService{
/**
* 19/02/2019 19:26
*
*
<p>
* [userId]
*
@author Gary J Li
*
* @return
* @author Gary J Li
*/
public
List
<
OrgSelectDto
>
getOrgSimpleList
()
{
String
userId
=
authUserHelper
.
getCurrentUserId
();
...
...
@@ -2806,7 +2817,7 @@ public class OrganizationServiceImpl extends BaseService{
organizationExample
.
createCriteria
().
andIdIn
(
orgIds
);
List
<
Organization
>
organizations
=
organizationMapper
.
selectByExample
(
organizationExample
);
organizations
.
forEach
(
o
->
{
OrgSelectDto
orgSelectDto
=
beanUtil
.
copyProperties
(
o
,
new
OrgSelectDto
());
OrgSelectDto
orgSelectDto
=
beanUtil
.
copyProperties
(
o
,
new
OrgSelectDto
());
orgSelectDtos
.
add
(
orgSelectDto
);
});
return
orgSelectDtos
;
...
...
@@ -3126,7 +3137,7 @@ public class OrganizationServiceImpl extends BaseService{
public
int
getDownloadFilePath
(
JsonExportDto
exportData
,
OutputStream
os
)
{
List
<
OrgInfoDto
>
orgInfoDtos
=
JSON
.
parseArray
(
exportData
.
getJsonData
(),
OrgInfoDto
.
class
);
try
{
try
{
if
(
orgInfoDtos
.
size
()
==
0
)
{
return
0
;
}
...
...
@@ -3135,100 +3146,100 @@ public class OrganizationServiceImpl extends BaseService{
orgInfoDtos
.
stream
().
forEach
(
x
->
{
pwc
.
taxtech
.
atms
.
dto
.
organization
.
OrgInfoDto
d
=
new
pwc
.
taxtech
.
atms
.
dto
.
organization
.
OrgInfoDto
();
d
=
beanUtil
.
copyProperties
(
x
,
d
);
d
=
beanUtil
.
copyProperties
(
x
,
d
);
cellList
.
add
(
d
);
});
ExcelUtil
.
exportExcel
(
header
,
cellList
,
os
);
}
catch
(
Exception
e
)
{
logger
.
error
(
"机构列表导出转换Excel异常: %s"
,
e
.
getMessage
());
}
catch
(
Exception
e
)
{
logger
.
error
(
"机构列表导出转换Excel异常: %s"
,
e
.
getMessage
());
}
return
orgInfoDtos
.
size
();
}
private
Map
<
String
,
String
>
generalHeader
()
{
Map
<
String
,
String
>
header
=
new
LinkedHashMap
<>();
header
.
put
(
"Name"
,
"机构名称"
);
header
.
put
(
"Code"
,
"机构代码"
);
header
.
put
(
"TaxPayerNumber"
,
"纳税人识别号"
);
header
.
put
(
"StructureName"
,
"机构层级"
);
header
.
put
(
"RegionName"
,
"地区"
);
header
.
put
(
"BusinessUnitName"
,
"事业部"
);
header
.
put
(
"AreaName"
,
"区域"
);
header
.
put
(
"IndustryName"
,
"行业"
);
header
.
put
(
"IsActive"
,
"启用状态"
);
header
.
put
(
"EnglishName"
,
"机构名称(英文)"
);
header
.
put
(
"Abbreviation"
,
"机构缩写"
);
header
.
put
(
"FoundationDate"
,
"成立日期"
);
header
.
put
(
"RegistrationLocation"
,
"注册地"
);
header
.
put
(
"RegistrationLocationEn"
,
"注册地(英文)"
);
header
.
put
(
"LegalPersonName"
,
"法人名称"
);
header
.
put
(
"BusinessScope"
,
"经营范围"
);
header
.
put
(
"RegStatus"
,
"工商登记状态"
);
header
.
put
(
"ArchitectureType"
,
"架构类型"
);
header
.
put
(
"NationalEconomicIndustry"
,
"所属国民经济行业"
);
header
.
put
(
"EngageNationalProhibitIndustry"
,
"从事国家限制或禁止行业"
);
header
.
put
(
"RegistrationCapital"
,
"注册资本(万元)"
);
header
.
put
(
"PaidInCapital"
,
"实缴资本(万元)"
);
header
.
put
(
"NumOfBranches"
,
"分公司数量"
);
header
.
put
(
"UnifiedSocialCreditCode"
,
"统一社会信用代码"
);
header
.
put
(
"RegFinancialAccountingType"
,
"注册登记财务核算方式"
);
header
.
put
(
"TaxRegStatus"
,
"财务核算方法"
);
header
.
put
(
"TaxCreditRating"
,
"纳税信用评级"
);
header
.
put
(
"ApplicableAccountingRule"
,
"适用会计制度"
);
header
.
put
(
"LowValueConsumablesAmortizationMethod"
,
"低值易耗品摊销方法"
);
header
.
put
(
"DepreciationMethod"
,
"折旧方式"
);
header
.
put
(
"AccountingSoftware"
,
"会计核算软件"
);
header
.
put
(
"CompleteRecordTotalInstitutions"
,
"是否完成总分机构备案"
);
header
.
put
(
"TaxClientPersonName"
,
"办税人姓名"
);
header
.
put
(
"TaxClientPersonPhone"
,
"办税人电话"
);
header
.
put
(
"TaxClientPersonIdNum"
,
"办税人身份证号"
);
header
.
put
(
"TicketHolderName"
,
"购票人姓名"
);
header
.
put
(
"TicketHolderPhoneNum"
,
"购票人电话"
);
header
.
put
(
"NationalTaxHallAddress"
,
"主管国税大厅地址"
);
header
.
put
(
"NationalTaxAdministratorName"
,
"主管国税税局名称"
);
header
.
put
(
"NationalTaxAdministratorPhoneNum"
,
"主管国税税局电话"
);
header
.
put
(
"LocalTaxHallAddress"
,
"主管地税大厅地址"
);
header
.
put
(
"LocalTaxAdministratorName"
,
"主管地税税局名称"
);
header
.
put
(
"LocalTaxAdministratorPhoneNum"
,
"主管地税税局电话"
);
header
.
put
(
"EtaWebsite"
,
"电子税务网站"
);
header
.
put
(
"SignTripartiteAgreement"
,
"三方协议是否签订"
);
header
.
put
(
"ReportingCurrency"
,
"记账本位币"
);
header
.
put
(
"ConsolidationTime"
,
"并表期间"
);
header
.
put
(
"TaxAgent"
,
"税务代理"
);
header
.
put
(
"TaxAgentContact"
,
"税务代理联系方式"
);
header
.
put
(
"TaxReturnBusinessType"
,
"纳税申报企业类型"
);
header
.
put
(
"SmallMeagerProfit"
,
"小型微利企业"
);
header
.
put
(
"ListedCompany"
,
"上市公司"
);
header
.
put
(
"ApplicableAccountingStandardsOrAccountingSystems"
,
"适用会计准则或会计制度"
);
header
.
put
(
"TaxPayerNumberVat"
,
"增值税纳税人识别号"
);
header
.
put
(
"TaxPayerNumberCit"
,
"企业所得税纳税人识别号"
);
header
.
put
(
"TaxClientPersonEmailAddress"
,
"办税人邮箱地址"
);
header
.
put
(
"BankAccountName"
,
"三方协议开户银行名称"
);
header
.
put
(
"BankAccountNumber"
,
"三方协议开户银行账户"
);
header
.
put
(
"LegalPersonPhoneNumber"
,
"法定代表人/负责人手机"
);
header
.
put
(
"LegalPersonLandlineNum"
,
"法定代表人/负责人座机"
);
header
.
put
(
"LegalPersonEmailAddress"
,
"法定代表人/负责人邮箱"
);
header
.
put
(
"RegFinancialOfficerName"
,
"注册登记财务负责人姓名"
);
header
.
put
(
"RegFinancialOfficerPhoneNum"
,
"注册登记财务负责人电话"
);
header
.
put
(
"RegFinancialOfficerLandlineNum"
,
"注册登记财务负责人座机"
);
header
.
put
(
"RegFinancialOfficerEmailAddress"
,
"注册登记财务负责人邮箱"
);
header
.
put
(
"ActualBusinessAddress"
,
"实际经营地址"
);
header
.
put
(
"SecondaryApprovalAmount"
,
"二级审批金额"
);
header
.
put
(
"FiscalYearDeadline"
,
"财年截止日"
);
header
.
put
(
"BusinessRegistrationNumber"
,
"Business registration number"
);
header
.
put
(
"ParValue"
,
"Par Value"
);
header
.
put
(
"IssuedShares"
,
"Issued shares"
);
header
.
put
(
"Directors"
,
"Directors"
);
header
.
put
(
"OtherFacts"
,
"其他情况说明"
);
header
.
put
(
"LogoutTime"
,
"注销时间"
);
header
.
put
(
"TaxRuleIntroduction"
,
"税制简介"
);
header
.
put
(
"Country"
,
"国家"
);
header
.
put
(
"Name"
,
"机构名称"
);
header
.
put
(
"Code"
,
"机构代码"
);
header
.
put
(
"TaxPayerNumber"
,
"纳税人识别号"
);
header
.
put
(
"StructureName"
,
"机构层级"
);
header
.
put
(
"RegionName"
,
"地区"
);
header
.
put
(
"BusinessUnitName"
,
"事业部"
);
header
.
put
(
"AreaName"
,
"区域"
);
header
.
put
(
"IndustryName"
,
"行业"
);
header
.
put
(
"IsActive"
,
"启用状态"
);
header
.
put
(
"EnglishName"
,
"机构名称(英文)"
);
header
.
put
(
"Abbreviation"
,
"机构缩写"
);
header
.
put
(
"FoundationDate"
,
"成立日期"
);
header
.
put
(
"RegistrationLocation"
,
"注册地"
);
header
.
put
(
"RegistrationLocationEn"
,
"注册地(英文)"
);
header
.
put
(
"LegalPersonName"
,
"法人名称"
);
header
.
put
(
"BusinessScope"
,
"经营范围"
);
header
.
put
(
"RegStatus"
,
"工商登记状态"
);
header
.
put
(
"ArchitectureType"
,
"架构类型"
);
header
.
put
(
"NationalEconomicIndustry"
,
"所属国民经济行业"
);
header
.
put
(
"EngageNationalProhibitIndustry"
,
"从事国家限制或禁止行业"
);
header
.
put
(
"RegistrationCapital"
,
"注册资本(万元)"
);
header
.
put
(
"PaidInCapital"
,
"实缴资本(万元)"
);
header
.
put
(
"NumOfBranches"
,
"分公司数量"
);
header
.
put
(
"UnifiedSocialCreditCode"
,
"统一社会信用代码"
);
header
.
put
(
"RegFinancialAccountingType"
,
"注册登记财务核算方式"
);
header
.
put
(
"TaxRegStatus"
,
"财务核算方法"
);
header
.
put
(
"TaxCreditRating"
,
"纳税信用评级"
);
header
.
put
(
"ApplicableAccountingRule"
,
"适用会计制度"
);
header
.
put
(
"LowValueConsumablesAmortizationMethod"
,
"低值易耗品摊销方法"
);
header
.
put
(
"DepreciationMethod"
,
"折旧方式"
);
header
.
put
(
"AccountingSoftware"
,
"会计核算软件"
);
header
.
put
(
"CompleteRecordTotalInstitutions"
,
"是否完成总分机构备案"
);
header
.
put
(
"TaxClientPersonName"
,
"办税人姓名"
);
header
.
put
(
"TaxClientPersonPhone"
,
"办税人电话"
);
header
.
put
(
"TaxClientPersonIdNum"
,
"办税人身份证号"
);
header
.
put
(
"TicketHolderName"
,
"购票人姓名"
);
header
.
put
(
"TicketHolderPhoneNum"
,
"购票人电话"
);
header
.
put
(
"NationalTaxHallAddress"
,
"主管国税大厅地址"
);
header
.
put
(
"NationalTaxAdministratorName"
,
"主管国税税局名称"
);
header
.
put
(
"NationalTaxAdministratorPhoneNum"
,
"主管国税税局电话"
);
header
.
put
(
"LocalTaxHallAddress"
,
"主管地税大厅地址"
);
header
.
put
(
"LocalTaxAdministratorName"
,
"主管地税税局名称"
);
header
.
put
(
"LocalTaxAdministratorPhoneNum"
,
"主管地税税局电话"
);
header
.
put
(
"EtaWebsite"
,
"电子税务网站"
);
header
.
put
(
"SignTripartiteAgreement"
,
"三方协议是否签订"
);
header
.
put
(
"ReportingCurrency"
,
"记账本位币"
);
header
.
put
(
"ConsolidationTime"
,
"并表期间"
);
header
.
put
(
"TaxAgent"
,
"税务代理"
);
header
.
put
(
"TaxAgentContact"
,
"税务代理联系方式"
);
header
.
put
(
"TaxReturnBusinessType"
,
"纳税申报企业类型"
);
header
.
put
(
"SmallMeagerProfit"
,
"小型微利企业"
);
header
.
put
(
"ListedCompany"
,
"上市公司"
);
header
.
put
(
"ApplicableAccountingStandardsOrAccountingSystems"
,
"适用会计准则或会计制度"
);
header
.
put
(
"TaxPayerNumberVat"
,
"增值税纳税人识别号"
);
header
.
put
(
"TaxPayerNumberCit"
,
"企业所得税纳税人识别号"
);
header
.
put
(
"TaxClientPersonEmailAddress"
,
"办税人邮箱地址"
);
header
.
put
(
"BankAccountName"
,
"三方协议开户银行名称"
);
header
.
put
(
"BankAccountNumber"
,
"三方协议开户银行账户"
);
header
.
put
(
"LegalPersonPhoneNumber"
,
"法定代表人/负责人手机"
);
header
.
put
(
"LegalPersonLandlineNum"
,
"法定代表人/负责人座机"
);
header
.
put
(
"LegalPersonEmailAddress"
,
"法定代表人/负责人邮箱"
);
header
.
put
(
"RegFinancialOfficerName"
,
"注册登记财务负责人姓名"
);
header
.
put
(
"RegFinancialOfficerPhoneNum"
,
"注册登记财务负责人电话"
);
header
.
put
(
"RegFinancialOfficerLandlineNum"
,
"注册登记财务负责人座机"
);
header
.
put
(
"RegFinancialOfficerEmailAddress"
,
"注册登记财务负责人邮箱"
);
header
.
put
(
"ActualBusinessAddress"
,
"实际经营地址"
);
header
.
put
(
"SecondaryApprovalAmount"
,
"二级审批金额"
);
header
.
put
(
"FiscalYearDeadline"
,
"财年截止日"
);
header
.
put
(
"BusinessRegistrationNumber"
,
"Business registration number"
);
header
.
put
(
"ParValue"
,
"Par Value"
);
header
.
put
(
"IssuedShares"
,
"Issued shares"
);
header
.
put
(
"Directors"
,
"Directors"
);
header
.
put
(
"OtherFacts"
,
"其他情况说明"
);
header
.
put
(
"LogoutTime"
,
"注销时间"
);
header
.
put
(
"TaxRuleIntroduction"
,
"税制简介"
);
header
.
put
(
"Country"
,
"国家"
);
return
header
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RoleServiceImpl.java
View file @
f3a7aa52
...
...
@@ -511,73 +511,73 @@ public class RoleServiceImpl extends AbstractService {
}
public
List
<
UserRoleInfo
>
getAllOwnUserRoleList
()
{
logger
.
debug
(
"Start to get all own user roles"
);
List
<
User
>
userList
=
userService
.
findAllUsers
();
// 角色列表
List
<
Role
>
roleList
=
findAll
();
// 原始维度
List
<
UserRole
>
userRoleList
=
userRoleService
.
findAllUserRoles
();
List
<
Organization
>
organizationList
=
organizationService
.
findAllOrganizations
();
List
<
UserRoleInfo
>
retList
=
new
ArrayList
<>();
for
(
User
userItem
:
userList
)
{
List
<
UserRole
>
sameList
=
userRoleList
.
stream
().
filter
(
sa
->
userItem
.
getId
().
equals
(
sa
.
getUserId
()))
.
collect
(
Collectors
.
toList
());
List
<
Organization
>
orgList
=
organizationList
.
stream
()
.
filter
(
sa
->
sa
.
getId
().
equals
(
userItem
.
getOrganizationId
())).
collect
(
Collectors
.
toList
());
if
(
orgList
.
isEmpty
())
{
continue
;
}
Organization
org
=
orgList
.
get
(
0
);
UserRoleInfo
userRoleInfo
=
new
UserRoleInfo
();
userRoleInfo
.
setUserName
(
userItem
.
getUserName
());
userRoleInfo
.
setStatus
(
userItem
.
getStatus
());
userRoleInfo
.
setServiceTypeId
(
""
);
userRoleInfo
.
setRoleInfoList
(
new
ArrayList
<>());
userRoleInfo
.
setOrganizationName
(
org
.
getName
());
userRoleInfo
.
setOrganizationId
(
org
.
getId
());
userRoleInfo
.
setIsAccessible
(
true
);
userRoleInfo
.
setEmail
(
userItem
.
getEmail
());
userRoleInfo
.
setBusinessUnitId
(
org
.
getBusinessUnitId
());
userRoleInfo
.
setAreaId
(
org
.
getAreaId
());
userRoleInfo
.
setId
(
userItem
.
getId
());
List
<
RoleInfo
>
roleInfoList
=
new
ArrayList
<>();
for
(
UserRole
userRole
:
sameList
)
{
for
(
Role
role
:
roleList
)
{
if
(
role
.
getId
().
equals
(
userRole
.
getRoleId
()))
{
RoleInfo
roleInfo
=
new
RoleInfo
();
roleInfo
.
setDimensionId
(
""
);
roleInfo
.
setDimensionValue
(
""
);
roleInfo
.
setDimensionValueId
(
""
);
roleInfo
.
setId
(
role
.
getId
());
roleInfo
.
setIsAccessible
(
true
);
roleInfo
.
setIsHeritable
(
true
);
roleInfo
.
setName
(
role
.
getName
());
roleInfo
.
setRoleSource
(
RoleSourceEnum
.
OriginalLevel
.
value
());
roleInfoList
.
add
(
roleInfo
);
}
}
}
userRoleInfo
.
setRoleInfoList
(
roleInfoList
);
retList
.
add
(
userRoleInfo
);
}
// 这里可以一次查出来再合并
retList
.
forEach
(
l
->{
if
(
null
!=
l
.
getBusinessUnitId
()){
BusinessUnit
bu
=
businessUnitMapper
.
selectByPrimaryKey
(
l
.
getBusinessUnitId
());
if
(
bu
!=
null
){
l
.
setBusinessUnitName
(
bu
.
getName
());
}
}
if
(
null
!=
l
.
getAreaId
()){
Area
area
=
areaMapper
.
selectByPrimaryKey
(
l
.
getAreaId
());
if
(
area
!=
null
){
l
.
setAreaName
(
area
.
getName
());
}
}
});
return
retList
;
//
logger.debug("Start to get all own user roles");
//
List<User> userList = userService.findAllUsers();
//
// 角色列表
//
List<Role> roleList = findAll();
//
// 原始维度
//
List<UserRole> userRoleList = userRoleService.findAllUserRoles();
// List<OrganizationHK
> organizationList = organizationService.findAllOrganizations();
//
List<UserRoleInfo> retList = new ArrayList<>();
//
//
for (User userItem : userList) {
//
List<UserRole> sameList = userRoleList.stream().filter(sa -> userItem.getId().equals(sa.getUserId()))
//
.collect(Collectors.toList());
// List<OrganizationHK
> orgList = organizationList.stream()
//
.filter(sa -> sa.getId().equals(userItem.getOrganizationId())).collect(Collectors.toList());
//
if (orgList.isEmpty()) {
//
continue;
//
}
// OrganizationHK
org = orgList.get(0);
//
UserRoleInfo userRoleInfo = new UserRoleInfo();
//
userRoleInfo.setUserName(userItem.getUserName());
//
userRoleInfo.setStatus(userItem.getStatus());
//
userRoleInfo.setServiceTypeId("");
//
userRoleInfo.setRoleInfoList(new ArrayList<>());
//
userRoleInfo.setOrganizationName(org.getName());
//
userRoleInfo.setOrganizationId(org.getId());
//
userRoleInfo.setIsAccessible(true);
//
userRoleInfo.setEmail(userItem.getEmail());
//
userRoleInfo.setBusinessUnitId(org.getBusinessUnitId());
//
userRoleInfo.setAreaId(org.getAreaId());
//
userRoleInfo.setId(userItem.getId());
//
//
List<RoleInfo> roleInfoList = new ArrayList<>();
//
for (UserRole userRole : sameList) {
//
for (Role role : roleList) {
//
if (role.getId().equals(userRole.getRoleId())) {
//
RoleInfo roleInfo = new RoleInfo();
//
roleInfo.setDimensionId("");
//
roleInfo.setDimensionValue("");
//
roleInfo.setDimensionValueId("");
//
roleInfo.setId(role.getId());
//
roleInfo.setIsAccessible(true);
//
roleInfo.setIsHeritable(true);
//
roleInfo.setName(role.getName());
//
roleInfo.setRoleSource(RoleSourceEnum.OriginalLevel.value());
//
roleInfoList.add(roleInfo);
//
}
//
}
//
}
//
userRoleInfo.setRoleInfoList(roleInfoList);
//
retList.add(userRoleInfo);
//
}
//
// 这里可以一次查出来再合并
//
retList.forEach(l->{
//
if(null!=l.getBusinessUnitId()){
//
BusinessUnit bu = businessUnitMapper.selectByPrimaryKey(l.getBusinessUnitId());
//
if(bu!=null){
//
l.setBusinessUnitName(bu.getName());
//
}
//
}
//
if (null!=l.getAreaId()){
//
Area area = areaMapper.selectByPrimaryKey(l.getAreaId());
//
if(area!=null){
//
l.setAreaName(area.getName());
//
}
//
}
//
});
return
java
.
util
.
Collections
.
emptyList
()
;
}
public
List
<
UserRoleInfo
>
getAllUserRoleList
()
{
...
...
atms-dao/src/main/java/pwc/taxtech/atms/organization/dpo/OrganizationHKDto.java
0 → 100644
View file @
f3a7aa52
package
pwc
.
taxtech
.
atms
.
organization
.
dpo
;
import
pwc.taxtech.atms.organization.entity.OrganizationHK
;
import
java.util.List
;
public
class
OrganizationHKDto
extends
OrganizationHK
{
private
String
parentName
;
private
List
<
OrganizationHKDto
>
subOrgs
;
public
Integer
getLevel
()
{
return
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
private
Integer
level
;
public
String
getParentName
()
{
return
parentName
;
}
public
void
setParentName
(
String
parentName
)
{
this
.
parentName
=
parentName
;
}
public
List
<
OrganizationHKDto
>
getSubOrgs
()
{
return
subOrgs
;
}
public
void
setSubOrgs
(
List
<
OrganizationHKDto
>
subOrgs
)
{
this
.
subOrgs
=
subOrgs
;
}
}
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
f3a7aa52
...
...
@@ -335,55 +335,55 @@
}
});
var
loadUserRoleList
=
function
(
orgID
)
{
roleService
.
getUserRoleList
(
orgID
,
''
,
''
).
success
(
function
(
data
)
{
// 构造用户信息
var
roleStaticsList
=
[];
var
userRoleShowList
=
[];
if
(
data
&&
data
.
length
>
0
)
{
data
.
forEach
(
function
(
row
)
{
var
uniqRoleList
=
_
.
uniq
(
row
.
roleInfoList
,
function
(
item
)
{
return
item
.
name
});
row
.
roleNameList
=
_
.
map
(
uniqRoleList
,
function
(
x
)
{
return
x
.
name
;
}).
join
(
constant
.
comma
);
//var roleNames = _.pluck(row.roleInfoList, 'name');
//row.roleNameList = roleNames.join(',');
if
(
!
row
.
isAccessible
)
{
row
.
roleNameList
=
$translate
.
instant
(
'UnAccessable'
);
}
row
.
hasEditPermission
=
$scope
.
hasEditPermission
;
userRoleShowList
.
push
({
id
:
row
.
id
,
userName
:
row
.
userName
,
roleNameList
:
row
.
roleNameList
});
row
.
roleInfoList
.
forEach
(
function
(
role
)
{
var
one
=
_
.
find
(
roleStaticsList
,
function
(
data
)
{
return
data
.
id
===
role
.
id
;
});
if
(
one
)
{
one
.
count
++
;
}
else
{
role
.
count
=
1
;
roleStaticsList
.
push
(
role
);
}
});
});
}
$scope
.
roleStaticsList
=
roleStaticsList
;
$scope
.
userRoleList
=
JSON
.
stringify
(
userRoleShowList
);
$scope
.
userRoleGridOptions
.
data
=
data
;
//用户数统计
$scope
.
userCount
=
data
.
length
||
0
;
});
};
//
var loadUserRoleList = function (orgID) {
//
roleService.getUserRoleList(orgID, '', '').success(function (data) {
//
// 构造用户信息
//
var roleStaticsList = [];
//
//
var userRoleShowList = [];
//
if (data && data.length > 0) {
//
data.forEach(function (row) {
//
//
var uniqRoleList = _.uniq(row.roleInfoList, function (item) {
//
return item.name
//
});
//
row.roleNameList = _.map(uniqRoleList, function (x) {
//
return x.name;
//
}).join(constant.comma);
//
//
//var roleNames = _.pluck(row.roleInfoList, 'name');
//
//row.roleNameList = roleNames.join(',');
//
//
if (!row.isAccessible) {
//
row.roleNameList = $translate.instant('UnAccessable');
//
}
//
//
row.hasEditPermission = $scope.hasEditPermission;
//
//
userRoleShowList.push({id: row.id, userName: row.userName, roleNameList: row.roleNameList});
//
row.roleInfoList.forEach(function (role) {
//
var one = _.find(roleStaticsList, function (data) {
//
return data.id === role.id;
//
});
//
//
if (one) {
//
one.count++;
//
} else {
//
role.count = 1;
//
roleStaticsList.push(role);
//
}
//
});
//
});
//
}
//
//
$scope.roleStaticsList = roleStaticsList;
//
//
$scope.userRoleList = JSON.stringify(userRoleShowList);
//
$scope.userRoleGridOptions.data = data;
//
//用户数统计
//
$scope.userCount = data.length || 0;
//
});
//
};
// 选中机构
$scope
.
selectOrganization
=
function
(
branch
)
{
...
...
@@ -441,21 +441,21 @@
// $scope.editOrgExtraModel.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
// $scope.selectCompanyExtra.unifiedSocialCreditCode = $scope.selectCompany.taxPayerNumber;
//加载用户权限list
loadUserRoleList
(
org
.
id
);
generalSelectCompanyText
();
//
loadUserRoleList(org.id);
//
generalSelectCompanyText();
cancelWebChange
();
// $scope.updateOrgExtraCancel()
});
orgService
.
getSingleOrgExtra
(
org
.
id
).
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
selectCompanyExtra
=
data
;
$scope
.
editOrgExtraModel
=
angular
.
copy
(
data
);
generalSelectCompanyExtraText
();
}
});
//
orgService.getSingleOrgExtra(org.id).success(function (data) {
//
if (data) {
//
$scope.selectCompanyExtra = data;
//
$scope.editOrgExtraModel = angular.copy(data);
// //
generalSelectCompanyExtraText();
//
}
//
});
// getEquityListByOrgId(org.id);
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.ctrl.js
View file @
f3a7aa52
...
...
@@ -754,12 +754,12 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 基础数据初始化
var
init
=
function
()
{
loadProjectIndustryList
();
//
loadProjectIndustryList();
loadOrganizationStructureService
();
loadBusinessUnitList
();
loadProvinceList
();
loadEnterpriseAccountSetList
();
getAllDimensionList
();
//
loadEnterpriseAccountSetList();
//
getAllDimensionList();
// loadprojectClient();
initDatePicker
();
};
...
...
@@ -1243,11 +1243,11 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
};
// 获取所有维度值和维度值配置信息
var
getAllDimensionList
=
function
()
{
dimensionService
.
getAllDimensionList
().
success
(
function
(
data
)
{
$scope
.
dimensionList
=
data
;
});
};
//
var getAllDimensionList = function () {
//
dimensionService.getAllDimensionList().success(function (data) {
//
$scope.dimensionList = data;
//
});
//
};
// 获取添加自定义纬度列表
var
getAddOrgSetDimension
=
function
()
{
...
...
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