Commit 230a2b7e authored by frank.xa.zhang's avatar frank.xa.zhang

fixed shareholder structure -- frank

parent cf13aecd
......@@ -310,11 +310,11 @@ public class OrganizationHKServiceImpl {
result.setLevel(result.getLevel() == null ? 0 : result.getLevel());
result.setParentName("");
OrganizationShareholderExample shareholderExample = new OrganizationShareholderExample();
shareholderExample.createCriteria().andEntityIdEqualTo(orgId);
shareholderExample.createCriteria().andEntityIdEqualTo(orgId).andIsDeleteEqualTo(false);
List<OrganizationShareholderDto> organizationShareholderDtos = organizationShareholderMapper.selectByExample(shareholderExample).stream()
.map(a -> organizationShareholderTMapper.toOrgShareholder(a)).collect(Collectors.toList());
OrganizationDirectorExample directorExample = new OrganizationDirectorExample();
directorExample.createCriteria().andEntityIdEqualTo(orgId);
directorExample.createCriteria().andEntityIdEqualTo(orgId).andIsDeleteEqualTo(false);
List<OrganizationDirectorDto> organizationDirectorDtos = organizationDirectorMapper.selectByExample(directorExample).stream()
.map(a -> organizationDirectorTMapper.toOrganizationDirectorDto(a)).collect(Collectors.toList());
result.setDirectors(organizationDirectorDtos);
......
......@@ -283,6 +283,9 @@
$scope.orgDirectorsDatasource = data.orgDirectorDtos;
getEventsOfCurrentEntity();
if (showPage4) {
initOrgChart($scope.selectCompany.id);
}
});
};
......@@ -1335,7 +1338,7 @@
$scope.eventsOfCurrentEntity = angular.copy(calendarEventList);
};
$scope.revertEventsOfCurrentEntity = function(){
$scope.revertEventsOfCurrentEntity = function () {
$scope.eventsOfCurrentEntity = angular.copy(calendarEventList);
};
......@@ -1440,13 +1443,14 @@
};
var initOrgTree = function (nodesCotent) {
console.log("nodesContent", nodesCotent);
OrgChart.templates.myTemplate = Object.assign({}, OrgChart.templates.ana);
OrgChart.templates.myTemplate.size = [200, 120];
OrgChart.templates.myTemplate.node = '<rect width="200" height="100" style="fill:rgb(35,143,159);stroke-width:3px;stroke:rgba(153,10,10,0.01)" />';
OrgChart.templates.myTemplate.node = '<rect width="200" height="100" style="fill:#ffff;stroke:#000;stroke-width:1px" />';
OrgChart.templates.myTemplate.field_0 = '<text style="font-size: 20px;" fill="#000" x="100" y="90" text-anchor="middle">{val}</text>';
OrgChart.templates.myTemplate.link = '<path stroke="#686868" stroke-width="1px" fill="none" link-id="[{id}][{child-id}]" d="M{xa},{ya} L{xb},{yb} {xc},{yc} {xd},{yd}" />';
// OrgChart.templates.myTemplate.secondlink = '<path stroke="#686868" stroke-width="1px" fill="none" link-id="[{id}][{child-id}]" d="M{xa},{ya} L{xb},{yb} {xc},{yc} {xd},{yd}" />';
OrgChart.templates.myTemplate.link = '<path stroke="#000" stroke-width="1px" fill="none" link-id="[{id}][{child-id}]" d="M{xa},{ya} L{xb},{yb} {xc},{yc} {xd},{yd}" />';
OrgChart.templates.myTemplate.secondlink = '<path stroke="#000" stroke-width="1px" fill="none" link-id="[{id}][{child-id}]" d="M{xa},{ya} L{xb},{yb} {xc},{yc} {xd},{yd}" />';
OrgChart.templates.myTemplate.plus =
'<rect x="0" y="0" width="36" height="36" rx="12" ry="12" fill="#2E2E2E" stroke="#aeaeae" stroke-width="1"></rect>'
+ '<line x1="4" y1="18" x2="32" y2="18" stroke-width="1" stroke="#aeaeae"></line>'
......@@ -1520,9 +1524,10 @@
if (middleNode && middleNode.id > 2) {
var count = 0;
for (var i = middleNode.id-1; i > 1; i--) {
for (var i = middleNode.id - 1; i > 1; i--) {
var nodeSelector = "svg>g[second-link-id='[" + middleNode.id + "][" + i + "]']>path";
var value = 320 + 220 * count;
$(nodeSelector).attr("stroke", "#000");
$(nodeSelector).attr("d", "M100,180 L100,160 L" + value + ",160 L" + value + ",102");
count++;
}
......@@ -1559,9 +1564,8 @@
var middleNode;
$scope.showPage4 = function () {
//todo:get node content @ here
orgHKService.getOrgTreeData($scope.selectCompany.id).success(function (res) {
var initOrgChart = function (orgId) {
orgHKService.getOrgTreeData(orgId).success(function (res) {
if (res && res.result) {
if (res.data.length < 3) {
if (res.data.length === 1) {
......@@ -1579,6 +1583,25 @@
});
};
var showPage4 = false;
$scope.showPage4 = function () {
showPage4 = true;
//todo:get node content @ here
initOrgChart($scope.selectCompany.id);
};
$scope.showPage1 = function () {
showPage4 = false;
};
$scope.showPage2 = function () {
showPage4 = false;
};
$scope.showPage3 = function () {
showPage4 = false;
};
(function initialize() {
$log.debug('organizationManageController.ctor()...');
$scope.title = $translate.instant('OrganizationManageTitle');
......
......@@ -96,13 +96,13 @@
<div class="right-bottom">
<md-content>
<md-nav-bar md-selected-nav-item="currentNavItem" nav-bar-aria-label="navigation links">
<md-nav-item md-nav-click="goto('page1')" name="page1">
<md-nav-item md-nav-click="goto('page1')" name="page1" ng-click="showPage1()">
{{'FundamentalInfo' | translate}}
</md-nav-item>
<md-nav-item md-nav-click="goto('page2')" name="page2">
<md-nav-item md-nav-click="goto('page2')" name="page2" ng-click="showPage2()">
{{'ShareholdingInfo' | translate}}
</md-nav-item>
<md-nav-item md-nav-click="goto('page3')" name="page3">
<md-nav-item md-nav-click="goto('page3')" name="page3" ng-click="showPage3()">
{{'ComplianceInfo' | translate}}
</md-nav-item>
<md-nav-item md-nav-click="goto('page4')" ng-click="showPage4()" name="page4">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment