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
30a6d8cd
Commit
30a6d8cd
authored
Jul 31, 2019
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed shareholder structure -- frank
parent
943fbc69
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
28 deletions
+61
-28
OrganizationHKController.java
...pwc/taxtech/atms/controller/OrganizationHKController.java
+6
-0
OrganizationHKServiceImpl.java
.../taxtech/atms/service/impl/OrganizationHKServiceImpl.java
+33
-21
OrgShareholderTreeDataDto.java
...tech/atms/organization/dpo/OrgShareholderTreeDataDto.java
+2
-0
OrganizationDirectorDto.java
...axtech/atms/organization/dpo/OrganizationDirectorDto.java
+2
-2
OrganizationDirectorTMapper.java
...atms/organization/mapper/OrganizationDirectorTMapper.java
+7
-0
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+0
-0
edit-organization-director-modal.ctrl.js
...n-director-modal/edit-organization-director-modal.ctrl.js
+4
-2
organizationHK.svc.js
.../main/webapp/app/common/webservices/organizationHK.svc.js
+7
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OrganizationHKController.java
View file @
30a6d8cd
...
...
@@ -196,4 +196,10 @@ public class OrganizationHKController {
return
organizationHKService
.
deleteShareholder
(
id
);
}
@RequestMapping
(
value
=
"deleteDirector"
,
method
=
RequestMethod
.
DELETE
)
public
@ResponseBody
OperationResultDto
deleteDirector
(
@RequestParam
(
"id"
)
Long
id
){
logger
.
info
(
"GET /api/v1/orgHK/deleteDirector"
);
return
organizationHKService
.
deleteDirector
(
id
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationHKServiceImpl.java
View file @
30a6d8cd
...
...
@@ -97,7 +97,7 @@ public class OrganizationHKServiceImpl {
public
List
<
OrganizationHKDto
>
getOrgInfo
()
{
List
<
OrganizationHKDto
>
organizationHKDtos
=
new
ArrayList
<>();
OrganizationHKExample
organizationHKExample
=
new
OrganizationHKExample
();
OrganizationHKExample
organizationHKExample
=
new
OrganizationHKExample
();
organizationHKExample
.
createCriteria
().
andIsActiveEqualTo
(
true
);
List
<
OrganizationHK
>
organizationHKS
=
organizationHKMapper
.
selectByExample
(
organizationHKExample
);
OrganizationShareholderExample
organizationShareholderExample
=
new
OrganizationShareholderExample
();
...
...
@@ -304,7 +304,7 @@ public class OrganizationHKServiceImpl {
public
OrganizationHKDto
getSingleOrgByOrgId
(
Long
orgId
)
{
OrganizationHK
organizationHK
=
organizationHKMapper
.
selectByPrimaryKey
(
orgId
);
OrganizationHKDto
result
=
organizationHKTMapper
.
toOrganizationHKDto
(
organizationHK
);
OrganizationHKDto
result
=
organizationHKTMapper
.
toOrganizationHKDto
(
organizationHK
);
Assert
.
notNull
(
result
,
"result is null"
);
result
.
setLevel
(
result
.
getLevel
()
==
null
?
0
:
result
.
getLevel
());
result
.
setParentName
(
""
);
...
...
@@ -482,27 +482,24 @@ public class OrganizationHKServiceImpl {
public
OperationResultDto
<
Object
>
updateDirectors
(
List
<
OrganizationDirectorDto
>
organizationDirectorDtos
)
{
OperationResultDto
<
Object
>
resultDto
=
new
OperationResultDto
<>();
organizationDirectorDtos
.
forEach
(
a
->
{
OrganizationDirector
organizationDirector
;
try
{
organizationDirector
=
CommonUtils
.
copyProperties
(
a
,
new
OrganizationDirector
());
}
catch
(
Exception
ex
)
{
organizationDirector
=
new
OrganizationDirector
();
organizationDirector
.
setDirectorName
(
a
.
getDirectorName
());
organizationDirector
.
setDateOfAppointment
(
new
Date
(
a
.
getDateOfAppointment
()));
organizationDirector
.
setDateOfResignation
(
new
Date
(
a
.
getDateOfResignation
()));
organizationDirector
.
setResidency
(
a
.
getResidency
());
organizationDirector
.
setEntityId
(
Long
.
valueOf
(
a
.
getEntityId
()));
}
OrganizationDirector
organizationDirector
=
organizationDirectorTMapper
.
toOrganizationDirector
(
a
);
Date
now
=
new
Date
();
if
(
organizationDirector
.
getId
()
!=
null
)
{
organizationDirectorMapper
.
deleteByPrimaryKey
(
organizationDirector
.
getId
());
organizationDirector
.
setUpdateTime
(
now
);
organizationDirectorMapper
.
updateByPrimaryKeySelective
(
organizationDirector
);
}
else
{
organizationDirector
.
setId
(
distributedIdService
.
nextId
());
organizationDirector
.
setCreateTime
(
now
);
organizationDirector
.
setUpdateTime
(
now
);
organizationDirectorMapper
.
insertSelective
(
organizationDirector
);
}
Date
now
=
new
Date
();
organizationDirector
.
setId
(
distributedIdService
.
nextId
());
organizationDirector
.
setCreateTime
(
now
);
organizationDirector
.
setUpdateTime
(
now
);
organizationDirectorMapper
.
insertSelective
(
organizationDirector
);
});
OrganizationDirectorExample
organizationDirectorExample
=
new
OrganizationDirectorExample
();
organizationDirectorExample
.
createCriteria
().
andEntityIdEqualTo
(
Long
.
valueOf
(
organizationDirectorDtos
.
get
(
0
).
getEntityId
())).
andIsDeleteEqualTo
(
false
);
List
<
OrganizationDirector
>
organizationDirectors
=
organizationDirectorMapper
.
selectByExample
(
organizationDirectorExample
);
List
<
OrganizationDirectorDto
>
organizationDirectorDtoList
=
organizationDirectors
.
stream
().
map
(
organizationDirectorTMapper:
:
toOrganizationDirectorDto
).
collect
(
Collectors
.
toList
());
resultDto
.
setResult
(
true
);
resultDto
.
setData
(
organizationDirectorDtoList
);
return
resultDto
;
}
...
...
@@ -660,6 +657,7 @@ public class OrganizationHKServiceImpl {
orgShareholderTreeDataDto
.
setPercent
(
shareholderDto
.
getVotingPercentage
());
// orgShareholderTreeDataDto.setPid(shareholderDtos.size() + 1);
orgShareholderTreeDataDto
.
setSpids
(
Collections
.
emptyList
());
orgShareholderTreeDataDto
.
setIsMiddleNode
(
false
);
orgShareholderTreeDataDtos
.
add
(
orgShareholderTreeDataDto
);
if
(
i
>
1
)
{
parentIds
.
add
(
i
);
...
...
@@ -668,6 +666,7 @@ public class OrganizationHKServiceImpl {
}
//todo: add organization node
OrgShareholderTreeDataDto
treeDataDto
=
new
OrgShareholderTreeDataDto
();
int
middleNodeId
=
i
;
treeDataDto
.
setId
(
i
);
treeDataDto
.
setName
(
organizationHK
.
getName
());
treeDataDto
.
setPercent
(
""
);
...
...
@@ -676,16 +675,19 @@ public class OrganizationHKServiceImpl {
treeDataDto
.
setSpids
(
parentIds
);
}
i
++;
treeDataDto
.
setIsMiddleNode
(
true
);
orgShareholderTreeDataDtos
.
add
(
treeDataDto
);
//todo: add subsidary nodes
for
(
SubsidaryDto
subsidaryDto
:
subsidaryDtos
)
{
OrgShareholderTreeDataDto
orgShareholderTreeDataDto
=
new
OrgShareholderTreeDataDto
();
orgShareholderTreeDataDto
.
setId
(
i
);
orgShareholderTreeDataDto
.
setName
(
subsidaryDto
.
getEntityName
());
orgShareholderTreeDataDto
.
setPercent
(
subsidaryDto
.
getVotingPercentage
());
orgShareholderTreeDataDto
.
setPid
(
0
);
orgShareholderTreeDataDto
.
setPid
(
middleNodeId
);
orgShareholderTreeDataDto
.
setSpids
(
Collections
.
emptyList
());
orgShareholderTreeDataDto
.
setIsMiddleNode
(
false
);
orgShareholderTreeDataDtos
.
add
(
orgShareholderTreeDataDto
);
i
++;
}
...
...
@@ -706,7 +708,7 @@ public class OrganizationHKServiceImpl {
}
public
OperationResultDto
deleteShareholder
(
Long
id
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
OperationResultDto
resultDto
=
new
OperationResultDto
();
OrganizationShareholder
organizationShareholder
=
organizationShareholderMapper
.
selectByPrimaryKey
(
id
);
organizationShareholder
.
setIsDelete
(
true
);
organizationShareholder
.
setUpdateTime
(
new
Date
());
...
...
@@ -714,4 +716,14 @@ public class OrganizationHKServiceImpl {
resultDto
.
setResult
(
true
);
return
resultDto
;
}
public
OperationResultDto
deleteDirector
(
Long
id
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
OrganizationDirector
organizationDirector
=
organizationDirectorMapper
.
selectByPrimaryKey
(
id
);
organizationDirector
.
setIsDelete
(
true
);
organizationDirector
.
setUpdateTime
(
new
Date
());
organizationDirectorMapper
.
updateByPrimaryKeySelective
(
organizationDirector
);
resultDto
.
setResult
(
true
);
return
resultDto
;
}
}
atms-dao/src/main/java/pwc/taxtech/atms/organization/dpo/OrgShareholderTreeDataDto.java
View file @
30a6d8cd
...
...
@@ -15,4 +15,5 @@ public class OrgShareholderTreeDataDto {
String
percent
;
Integer
pid
;
List
<
Integer
>
spids
;
Boolean
isMiddleNode
;
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/organization/dpo/OrganizationDirectorDto.java
View file @
30a6d8cd
...
...
@@ -16,7 +16,7 @@ public class OrganizationDirectorDto {
String
residency
;
String
dateOfAppointment
;
String
dateOfResignation
;
String
isExecutive
;
String
otherRoles
;
Integer
isExecutive
;
Integer
otherRoles
;
String
isDelete
;
}
atms-dao/src/main/java/pwc/taxtech/atms/organization/mapper/OrganizationDirectorTMapper.java
View file @
30a6d8cd
package
pwc
.
taxtech
.
atms
.
organization
.
mapper
;
import
org.mapstruct.Mapper
;
import
org.mapstruct.Mapping
;
import
org.mapstruct.factory.Mappers
;
import
pwc.taxtech.atms.organization.dpo.OrgDirectorDto
;
import
pwc.taxtech.atms.organization.dpo.OrganizationDirectorDto
;
...
...
@@ -10,7 +11,13 @@ import pwc.taxtech.atms.organization.entity.OrganizationDirector;
public
interface
OrganizationDirectorTMapper
{
OrganizationDirectorTMapper
ORGANIZATION_DIRECTOR_T_MAPPER
=
Mappers
.
getMapper
(
OrganizationDirectorTMapper
.
class
);
@Mapping
(
source
=
"dateOfAppointment"
,
target
=
"dateOfAppointment"
,
dateFormat
=
"yyyy/MM/dd"
)
@Mapping
(
source
=
"dateOfResignation"
,
target
=
"dateOfResignation"
,
dateFormat
=
"yyyy/MM/dd"
)
OrganizationDirectorDto
toOrganizationDirectorDto
(
OrganizationDirector
organizationDirector
);
OrgDirectorDto
toOrgDirectorDto
(
OrganizationDirector
organizationDirector
);
@Mapping
(
source
=
"dateOfAppointment"
,
target
=
"dateOfAppointment"
,
dateFormat
=
"yyyy/MM/dd"
)
@Mapping
(
source
=
"dateOfResignation"
,
target
=
"dateOfResignation"
,
dateFormat
=
"yyyy/MM/dd"
)
OrganizationDirector
toOrganizationDirector
(
OrganizationDirectorDto
organizationDirectorDto
);
}
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
30a6d8cd
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/common/controls/edit-organization-director-modal/edit-organization-director-modal.ctrl.js
View file @
30a6d8cd
...
...
@@ -16,16 +16,18 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
},
close
:
function
()
{
$scope
.
onClose
();
$scope
.
editModelD
=
{};
$scope
.
modalInstance
.
close
();
},
cancel
:
function
()
{
$scope
.
onClose
();
$scope
.
editModelD
=
{};
$scope
.
modalInstance
.
cancel
();
},
save
:
function
()
{
var
dxResult
=
DevExpress
.
validationEngine
.
validateGroup
(
$
(
'#directorControlForm'
).
dxValidationGroup
(
"instance"
)).
isValid
;
if
(
dxResult
)
{
if
(
!
$scope
.
editModelD
.
id
)
{
if
(
!
$scope
.
editModelD
.
id
&&
$scope
.
parentPage
!==
".system-manage"
)
{
$scope
.
editModelD
.
id
=
PWC
.
newGuid
();
}
$scope
.
onSave
({
directorEntity
:
$scope
.
editModelD
});
...
...
@@ -84,7 +86,7 @@ commonModule.controller('editOrganizationDirectorModalController', ['$scope', '$
executiveOption
:
{
bindingOptions
:
{
dataSource
:
'dropdownDatasource.executiveTypeList'
,
value
:
'editModelD.
e
xecutive'
value
:
'editModelD.
isE
xecutive'
},
onSelectionChanged
:
function
(
args
)
{
// $scope.editModel.executive = args.selectedItem.id;
...
...
atms-web/src/main/webapp/app/common/webservices/organizationHK.svc.js
View file @
30a6d8cd
...
...
@@ -62,11 +62,14 @@ webservices.factory('orgHKService', ['$http', 'apiConfig', function ($http, apiC
getOrgList
:
function
(
type
)
{
return
$http
.
get
(
'/org/display?useType='
+
type
,
apiConfig
.
create
());
},
getOrgsListInfo
:
function
()
{
getOrgsListInfo
:
function
()
{
return
$http
.
get
(
'/orgHK/getOrgsListInfo'
,
apiConfig
.
create
());
},
deleteShareholder
:
function
(
id
)
{
return
$http
.
delete
(
'/orgHK/deleteShareholder?id='
+
id
,
apiConfig
.
create
());
deleteShareholder
:
function
(
id
)
{
return
$http
.
delete
(
'/orgHK/deleteShareholder?id='
+
id
,
apiConfig
.
create
());
},
deleteDirector
:
function
(
id
)
{
return
$http
.
delete
(
'/orgHK/deleteDirector?id='
+
id
,
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