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
995a3328
Commit
995a3328
authored
Jul 01, 2019
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed org -- frank
parent
0b72b7d9
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
134 additions
and
155 deletions
+134
-155
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+21
-42
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+63
-63
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+7
-7
project-manage.ctrl.js
...admin/infrastructure/projectManage/project-manage.ctrl.js
+1
-1
add-enterprise-account-modal.ctrl.js
...rprise-account-modal/add-enterprise-account-modal.ctrl.js
+9
-9
edit-equity-change-modal.ctrl.js
...edit-equity-change-modal/edit-equity-change-modal.ctrl.js
+2
-2
edit-equity-modal.ctrl.js
...mmon/controls/edit-equity-modal/edit-equity-modal.ctrl.js
+2
-2
edit-organization-modal.ctrl.js
...s/edit-organization-modal/edit-organization-modal.ctrl.js
+29
-29
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
995a3328
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.google.common.collect.Lists
;
import
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.BooleanUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -14,44 +12,27 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.dao.DuplicateKeyException
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.interceptor.TransactionAspectSupport
;
import
org.springframework.util.Assert
;
import
pwc.taxtech.atms.common.CommonConstants
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.OperateLogType
;
import
pwc.taxtech.atms.common.OperationAction
;
import
pwc.taxtech.atms.common.OperationModule
;
import
pwc.taxtech.atms.common.ServiceTypeEnum
;
import
pwc.taxtech.atms.common.VatTaxPayerTypeEnum
;
import
pwc.taxtech.atms.common.*
;
import
pwc.taxtech.atms.common.message.EnterpriseAccountSetOrgMessage
;
import
pwc.taxtech.atms.common.message.LogMessage
;
import
pwc.taxtech.atms.common.message.OrganizationMessage
;
import
pwc.taxtech.atms.common.util.BeanUtil
;
import
pwc.taxtech.atms.common.util.HttpUtil
;
import
pwc.taxtech.atms.constant.*
;
import
pwc.taxtech.atms.constant.AreaConstant
;
import
pwc.taxtech.atms.constant.DimensionConstant
;
import
pwc.taxtech.atms.constant.LevelConstant
;
import
pwc.taxtech.atms.constant.OrganizationConstant
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dpo.*
;
import
pwc.taxtech.atms.dpo.DimensionValueJoinDimensionDto
;
import
pwc.taxtech.atms.dpo.OrgBasicDto
;
import
pwc.taxtech.atms.dpo.OrgGeneralInfoMiddleDto
;
import
pwc.taxtech.atms.dpo.OrgInfoDto
;
import
pwc.taxtech.atms.dto.AreaOrganizationStatistics
;
import
pwc.taxtech.atms.dto.AreaStatistics
;
import
pwc.taxtech.atms.dto.IndustryDto
;
import
pwc.taxtech.atms.dto.OperationLogDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.OrganizationStatistics
;
import
pwc.taxtech.atms.dto.OrganizationValidateDto
;
import
pwc.taxtech.atms.dto.UpdateLogParams
;
import
pwc.taxtech.atms.dto.dimension.AttributeTypeEnum
;
import
pwc.taxtech.atms.dto.dimension.DimensinTypeOrgDto
;
import
pwc.taxtech.atms.dto.dimension.DimensionOrgDto
;
import
pwc.taxtech.atms.dto.dimension.DimensionOrgDtoDashboard
;
import
pwc.taxtech.atms.dto.dimension.DimensionTypeEnum
;
import
pwc.taxtech.atms.dto.dimension.DimensionValueDisplayDto
;
import
pwc.taxtech.atms.dto.dimension.OrgDashboardParams
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.dimension.*
;
import
pwc.taxtech.atms.dto.navtree.DevTreeDto
;
import
pwc.taxtech.atms.dto.navtree.IvhTreeDto
;
import
pwc.taxtech.atms.dto.navtree.NavTreeDto
;
...
...
@@ -67,13 +48,11 @@ import pwc.taxtech.atms.thirdparty.ExcelUtil;
import
javax.annotation.Resource
;
import
java.io.OutputStream
;
import
java.text.SimpleDateFormat
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
static
java
.
util
.
Comparator
.*;
import
static
java
.
util
.
stream
.
Collectors
.
toList
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonConstants
.
*
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonConstants
.
SystemError
;
import
static
pwc
.
taxtech
.
atms
.
common
.
CommonUtils
.
copyProperties
;
import
static
pwc
.
taxtech
.
atms
.
common
.
OperateLogType
.
OperationLogOrganization
;
import
static
pwc
.
taxtech
.
atms
.
common
.
OperationModule
.
Organization
;
...
...
@@ -1940,17 +1919,17 @@ public class OrganizationServiceImpl extends BaseService{
// }
// result.setEnterpriseAccountSetOrgList(query1);
// 查询机构服务
List
<
ServiceType
>
serviceType
=
serviceTypeMapper
.
selectByExample
(
null
);
List
<
OrganizationServiceTemplateGroupDto
>
query2
=
organizationServiceTemplateGroupMapper
.
getSingleOrgByOrgIdToOSTGDto
(
orgId
);
for
(
OrganizationServiceTemplateGroupDto
mapping
:
query2
)
{
ServiceType
st
=
serviceType
.
stream
().
filter
(
n
->
Objects
.
equals
(
n
.
getId
(),
mapping
.
getServiceTypeId
()))
.
findFirst
().
orElse
(
null
);
if
(
st
!=
null
)
{
mapping
.
setServiceTypeName
(
st
.
getName
());
}
}
result
.
setOrganizationServiceTemplateGroupList
(
query2
);
//
List<ServiceType> serviceType = serviceTypeMapper.selectByExample(null);
//
List<OrganizationServiceTemplateGroupDto> query2 = organizationServiceTemplateGroupMapper
//
.getSingleOrgByOrgIdToOSTGDto(orgId);
//
for (OrganizationServiceTemplateGroupDto mapping : query2) {
//
ServiceType st = serviceType.stream().filter(n -> Objects.equals(n.getId(), mapping.getServiceTypeId()))
//
.findFirst().orElse(null);
//
if (st != null) {
//
mapping.setServiceTypeName(st.getName());
//
}
//
}
//
result.setOrganizationServiceTemplateGroupList(query2);
if
(
StringUtils
.
isEmpty
(
result
.
getParentId
()))
{
result
.
setParentName
(
""
);
}
else
{
...
...
@@ -1959,7 +1938,7 @@ public class OrganizationServiceImpl extends BaseService{
Assert
.
notNull
(
tParent
,
"tParent is null"
);
result
.
setParentName
(
tParent
.
getName
());
}
result
.
setDimensionValueOrgList
(
dimensionService
.
getAllDimensionOrgListByOrgId
(
result
.
getId
()));
//
result.setDimensionValueOrgList(dimensionService.getAllDimensionOrgListByOrgId(result.getId()));
return
result
;
}
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
995a3328
infrastructureModule
.
controller
(
'OrganizationManageController'
,
[
'$scope'
,
'$location'
,
'$log'
,
'orgService'
,
'$interval'
,
'uiGridTreeViewConstants'
,
'uiGridConstants'
,
'SweetAlert'
,
'projectService'
,
'$translate'
,
'$timeout'
,
'organizationStructureService'
,
'areaRegionService'
,
'apiInterceptor'
,
'
enterpriseAccountService'
,
'
businessUnitService'
,
'userService'
,
'roleService'
,
'$q'
,
'permissionService'
,
'dimensionService'
,
'region'
,
'equityService'
,
'orgExtraService'
,
function
(
$scope
,
$location
,
$log
,
orgService
,
$interval
,
uiGridTreeViewConstants
,
uiGridConstants
,
SweetAlert
,
projectService
,
$translate
,
$timeout
,
organizationStructureService
,
areaRegionService
,
apiInterceptor
,
enterpriseAccountService
,
businessUnitService
,
userService
,
roleService
,
$q
,
permissionService
,
dimensionService
,
region
,
equityService
,
orgExtraService
)
{
.
controller
(
'OrganizationManageController'
,
[
'$scope'
,
'$location'
,
'$log'
,
'orgService'
,
'$interval'
,
'uiGridTreeViewConstants'
,
'uiGridConstants'
,
'SweetAlert'
,
'projectService'
,
'$translate'
,
'$timeout'
,
'organizationStructureService'
,
'areaRegionService'
,
'apiInterceptor'
,
'businessUnitService'
,
'userService'
,
'roleService'
,
'$q'
,
'permissionService'
,
'dimensionService'
,
'region'
,
'equityService'
,
'orgExtraService'
,
function
(
$scope
,
$location
,
$log
,
orgService
,
$interval
,
uiGridTreeViewConstants
,
uiGridConstants
,
SweetAlert
,
projectService
,
$translate
,
$timeout
,
organizationStructureService
,
areaRegionService
,
apiInterceptor
,
businessUnitService
,
userService
,
roleService
,
$q
,
permissionService
,
dimensionService
,
region
,
equityService
,
orgExtraService
)
{
'use strict'
;
$scope
.
expanded
=
false
;
...
...
@@ -152,17 +152,17 @@
// 获取账套
var
loadEnterpriseAccountSetList
=
function
()
{
enterpriseAccountService
.
getEnterpriseAccountSetList
().
success
(
function
(
data
)
{
// 只获取启用状态的账套
//data = _.filter(data, function (num) { return num.isActive });
$scope
.
enterpriseAccountSetList
=
sortByEnterpriseName
(
data
);
if
(
data
&&
data
.
length
>
0
)
{
$scope
.
hasEnterpriseAccountSet
=
true
;
}
else
{
$scope
.
hasEnterpriseAccountSet
=
false
;
}
});
//
enterpriseAccountService.getEnterpriseAccountSetList().success(function (data) {
//
// 只获取启用状态的账套
//
//data = _.filter(data, function (num) { return num.isActive });
//
$scope.enterpriseAccountSetList = sortByEnterpriseName(data);
//
if (data && data.length > 0) {
//
$scope.hasEnterpriseAccountSet = true;
//
//
} else {
//
$scope.hasEnterpriseAccountSet = false;
//
}
//
});
};
var
dataType
=
{
...
...
@@ -631,14 +631,14 @@
};
var
getEquityChangeList
=
function
(
name
)
{
equityService
.
getChangeLogByOrgName
(
name
).
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
EquityChangeList
=
data
;
initPagingControl
(
data
.
length
);
}
});
};
//
var getEquityChangeList = function (name) {
//
equityService.getChangeLogByOrgName(name).success(function (data) {
//
if (data) {
//
$scope.EquityChangeList = data;
//
initPagingControl(data.length);
//
}
//
});
//
};
var
getEquityHistoryById
=
function
(
key
)
{
if
(
key
.
rowIndex
===
1
)
{
...
...
@@ -1959,7 +1959,7 @@
loadEnterpriseAccountSetList
();
loadEquityDatagrid
();
loadEquityChangeDatagrid
();
getServiceList
();
//
getServiceList();
// 其他信息中的grid
loadTaxRuleDatagrid
();
loadInvoiceInfoDatagrid
();
...
...
@@ -2462,7 +2462,7 @@
}
});
getEquityListByOrgId
(
org
.
id
);
//
getEquityListByOrgId(org.id);
// todo 其他信息的grid可以移到label ng-click事件里做,lazyinit
getTaxRuleList
(
org
.
id
);
...
...
@@ -2474,11 +2474,11 @@
getEmployeeList
(
org
.
id
);
getTaxpayerQualificationList
(
org
.
id
);
equityService
.
getChangeLogByOrgName
(
org
.
name
).
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
EquityChangeList
=
data
;
}
});
//
equityService.getChangeLogByOrgName(org.name).success(function (data) {
//
if (data) {
//
$scope.EquityChangeList = data;
//
}
//
});
};
$scope
.
resources
=
{
...
...
@@ -2719,11 +2719,11 @@
};
// 获取所有服务列表
var
getServiceList
=
function
()
{
projectService
.
getServiceList
().
success
(
function
(
serviceListData
)
{
$scope
.
serviceList
=
serviceListData
;
});
};
//
var getServiceList = function () {
//
projectService.getServiceList().success(function (serviceListData) {
//
$scope.serviceList = serviceListData;
//
});
//
};
// 验证是否为时间段
var
validateDate
=
function
(
from
,
to
)
{
...
...
@@ -2988,36 +2988,36 @@
});
};
var
getEquityListByOrgId
=
function
(
orgId
)
{
equityService
.
getEquityList
(
orgId
).
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
EquityList
=
data
;
var
amountTotal
=
0
;
var
proportionTotal
=
0
;
for
(
var
i
=
0
;
i
<
data
.
length
;
i
++
)
{
amountTotal
+=
data
[
i
].
payableCapitalContributionAmount
;
proportionTotal
+=
data
[
i
].
payableContributionProportion
;
}
$scope
.
EquitySumInfo
=
{
orgTotal
:
data
.
length
,
amountTotal
:
amountTotal
,
proportionTotal
:
proportionTotal
};
if
(
$scope
.
EquitySumInfo
.
proportionTotal
!==
100
)
{
$scope
.
isNotHundred
=
true
;
}
else
{
$scope
.
isNotHundred
=
false
;
}
}
else
{
SweetAlert
.
warning
(
$translate
.
instant
(
'NoEquityInfo'
));
}
});
};
$scope
.
refreshEquityList
=
function
()
{
getEquityListByOrgId
(
$scope
.
selectCompany
.
id
);
getEquityChangeList
(
$scope
.
selectCompany
.
name
);
};
//
var getEquityListByOrgId = function (orgId) {
//
equityService.getEquityList(orgId).success(function (data) {
//
if (data) {
//
$scope.EquityList = data;
//
var amountTotal = 0;
//
var proportionTotal = 0;
//
for (var i = 0; i < data.length; i++) {
//
amountTotal += data[i].payableCapitalContributionAmount;
//
proportionTotal += data[i].payableContributionProportion;
//
}
//
$scope.EquitySumInfo = {
//
orgTotal: data.length,
//
amountTotal: amountTotal,
//
proportionTotal: proportionTotal
//
};
//
if ($scope.EquitySumInfo.proportionTotal !== 100) {
//
$scope.isNotHundred = true;
//
} else {
//
$scope.isNotHundred = false;
//
}
//
} else {
//
SweetAlert.warning($translate.instant('NoEquityInfo'));
//
}
//
});
//
};
//
$scope.refreshEquityList = function () {
// //
getEquityListByOrgId($scope.selectCompany.id);
// //
getEquityChangeList($scope.selectCompany.name);
//
};
var
confirmWarningWindow
=
function
(
title
,
text
)
{
var
deferred
=
$q
.
defer
();
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
995a3328
...
...
@@ -58,13 +58,13 @@
<span
class=
"right-operate"
>
<!-- board展示 -->
<
a
class=
"display-user"
href=
"#/organizationViewInfrastructure/organizationBusinessUnitView"
title=
"{{'ShowAsCard' | translate}}"
><i
class=
"fa fa-th"
aria-hidden=
"true"
></i></a
>
<!--
list展示
-->
<
a
class=
"display-user border-left"
href=
"#/orgListView"
title=
"{{'ShowAsList' | translate}}"
><i
class=
"fa fa-list-ul"
aria-hidden=
"true"
></i></a
>
<
!--<a class="display-user"-->
<!--href="#/organizationViewInfrastructure/organizationBusinessUnitView"-->
<!--title="{{'ShowAsCard' | translate}}"><i class="fa fa-th" aria-hidden="true"></i></a>--
>
<!--
<!– list展示 –>
-->
<
!--<a class="display-user border-left" href="#/orgListView"-->
<!--title="{{'ShowAsList' | translate}}"><i class="fa fa-list-ul"-->
<!--aria-hidden="true"></i></a>--
>
</span>
</div>
</div>
...
...
atms-web/src/main/webapp/app/admin/infrastructure/projectManage/project-manage.ctrl.js
View file @
995a3328
...
...
@@ -1032,7 +1032,7 @@
//init project list
//init service dropdown list
initServiceList
();
//
initServiceList();
initProjectList
();
...
...
atms-web/src/main/webapp/app/common/controls/add-enterprise-account-modal/add-enterprise-account-modal.ctrl.js
View file @
995a3328
...
...
@@ -209,15 +209,15 @@ controller('addEnterpriseAccountModalController', ['$scope', '$log', '$translate
// model.enterpriseAccountSetOrgList = $scope.editModel.saveOrgList;
enterpriseAccountService
.
updateEnterpriseAccountSet
(
model
).
success
(
function
(
data
)
{
if
(
data
&&
data
.
result
)
{
$
(
'#addEnterpriceAccountSetPop'
).
modal
(
'hide'
);
loadEnterpriseAccountSetList
();
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
}
else
{
swal
(
$translate
.
instant
(
'SaveFail'
),
$translate
.
instant
(
data
.
resultMsg
),
'warning'
);
}
});
//
enterpriseAccountService.updateEnterpriseAccountSet(model).success(function (data) {
//
if (data && data.result) {
//
$('#addEnterpriceAccountSetPop').modal('hide');
//
loadEnterpriseAccountSetList();
//
SweetAlert.success($translate.instant('SaveSuccess'));
//
} else {
//
swal($translate.instant('SaveFail'), $translate.instant(data.resultMsg), 'warning');
//
}
//
});
}
}
};
...
...
atms-web/src/main/webapp/app/common/controls/edit-equity-change-modal/edit-equity-change-modal.ctrl.js
View file @
995a3328
commonModule
.
controller
(
'editEquityChangeModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'
enterpriseAccountService'
,
'
organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
'equityService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
enterpriseAccountService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
,
equityService
)
{
commonModule
.
controller
(
'editEquityChangeModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
'equityService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
,
equityService
)
{
var
selectedModel
=
'.editEquityChangeControlPop'
;
//'#addOrgControlPop' + $scope.dimensionId;
...
...
atms-web/src/main/webapp/app/common/controls/edit-equity-modal/edit-equity-modal.ctrl.js
View file @
995a3328
commonModule
.
controller
(
'editEquityModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'
enterpriseAccountService'
,
'
organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
'equityService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
enterpriseAccountService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
,
equityService
)
{
controller
(
'editEquityModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
'equityService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
,
equityService
)
{
var
selectedModel
=
'.editEquityControlPop'
;
//'#addOrgControlPop' + $scope.dimensionId;
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.ctrl.js
View file @
995a3328
commonModule
.
controller
(
'editOrganizationModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'
enterpriseAccountService'
,
'
organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
enterpriseAccountService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
)
{
controller
(
'editOrganizationModalController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'uiGridConstants'
,
'$location'
,
'$timeout'
,
'$interval'
,
'areaRegionService'
,
'$filter'
,
'SweetAlert'
,
'regionService'
,
'orgService'
,
'organizationStructureService'
,
'businessUnitService'
,
'projectService'
,
'dimensionService'
,
function
(
$scope
,
$log
,
$translate
,
uiGridConstants
,
$location
,
$timeout
,
$interval
,
areaRegionService
,
$filter
,
SweetAlert
,
regionService
,
orgService
,
organizationStructureService
,
businessUnitService
,
projectService
,
dimensionService
)
{
var
selectedModel
=
'.addOrgControlPop'
;
//'#addOrgControlPop' + $scope.dimensionId;
...
...
@@ -76,7 +76,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
newOrgAccountRow
();
$scope
.
selfDimensionModel
=
getAddOrgSetDimension
();
initIsCheckedServiceList
();
//
initIsCheckedServiceList();
// resetErrorStatus();
$scope
.
orgControlForm
.
$setPristine
();
$scope
.
advancedControlForm
.
$setPristine
();
...
...
@@ -503,12 +503,12 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$
(
"#selectedOrgName-error"
).
hide
();
$scope
.
isAdd
=
false
;
$scope
.
orgHasAccountMapping
=
false
;
enterpriseAccountService
.
getAccountMappingOrg
(
orgId
).
success
(
function
(
data
)
{
if
(
data
&&
data
.
length
>
0
)
{
$scope
.
orgHasAccountMapping
=
true
;
}
});
//
enterpriseAccountService.getAccountMappingOrg(orgId).success(function (data) {
//
if (data && data.length > 0) {
//
$scope.orgHasAccountMapping = true;
//
}
//
//
});
orgService
.
getSingleOrg
(
orgId
).
success
(
function
(
orgData
)
{
...
...
@@ -566,7 +566,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
selfDimensionModel
=
getUpdateOrgSetDimension
(
orgData
.
id
,
orgData
.
dimensionValueOrgList
);
setEnterpriseOrgRowList
(
orgData
);
setIsCheckedServiceList
(
orgData
);
//
setIsCheckedServiceList(orgData);
});
...
...
@@ -614,17 +614,17 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 获取账套
var
loadEnterpriseAccountSetList
=
function
()
{
enterpriseAccountService
.
getEnterpriseAccountSetList
().
success
(
function
(
data
)
{
// 只获取启用状态的账套
//data = _.filter(data, function (num) { return num.isActive });
$scope
.
enterpriseAccountSetList
=
data
;
if
(
data
&&
data
.
length
>
0
)
{
$scope
.
hasEnterpriseAccountSet
=
true
;
}
else
{
$scope
.
hasEnterpriseAccountSet
=
false
;
}
});
//
enterpriseAccountService.getEnterpriseAccountSetList().success(function (data) {
//
// 只获取启用状态的账套
//
//data = _.filter(data, function (num) { return num.isActive });
//
$scope.enterpriseAccountSetList = data;
//
if (data && data.length > 0) {
//
$scope.hasEnterpriseAccountSet = true;
//
//
} else {
//
$scope.hasEnterpriseAccountSet = false;
//
}
//
});
};
// 获取行业信息
...
...
@@ -655,13 +655,13 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
};
//获取项目客户信息
var
loadprojectClient
=
function
()
{
projectService
.
getProjectClientList
().
success
(
function
(
data
)
{
if
(
data
&&
data
.
length
>
0
)
{
$scope
.
projectClientName
=
data
[
0
].
name
;
}
});
};
//
var loadprojectClient = function () {
//
projectService.getProjectClientList().success(function (data) {
//
if (data && data.length > 0) {
//
$scope.projectClientName = data[0].name;
//
}
//
});
//
};
// 获取省市
var
loadProvinceList
=
function
()
{
...
...
@@ -760,7 +760,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
loadProvinceList
();
loadEnterpriseAccountSetList
();
getAllDimensionList
();
loadprojectClient
();
//
loadprojectClient();
initDatePicker
();
};
...
...
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