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
b0faca2b
Commit
b0faca2b
authored
Jul 10, 2019
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed entity page-- frank
parent
8a9ab692
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
161 additions
and
109 deletions
+161
-109
OrganizationHKController.java
...pwc/taxtech/atms/controller/OrganizationHKController.java
+64
-0
OrganizationHKServiceImpl.java
.../taxtech/atms/service/impl/OrganizationHKServiceImpl.java
+0
-0
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+5
-4
organization-full-chart.js
...tructure/organizationFullChart/organization-full-chart.js
+2
-3
organization-manage.ctrl.js
...astructure/organizationManage/organization-manage.ctrl.js
+51
-77
edit-organization-director-modal.js
...zation-director-modal/edit-organization-director-modal.js
+3
-3
edit-organization-shareholder-modal.js
...-shareholder-modal/edit-organization-shareholder-modal.js
+3
-3
organization.svc.js
...rc/main/webapp/app/common/webservices/organization.svc.js
+8
-19
organizationHK.svc.js
.../main/webapp/app/common/webservices/organizationHK.svc.js
+25
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OrganizationHKController.java
0 → 100644
View file @
b0faca2b
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.navtree.NavTreeDto
;
import
pwc.taxtech.atms.organization.dpo.OrganizationHKDto
;
import
pwc.taxtech.atms.organization.entity.OrganizationHK
;
import
pwc.taxtech.atms.service.impl.OrganizationHKServiceImpl
;
import
java.util.List
;
@RestController
@RequestMapping
(
"/api/v1/orgHK/"
)
public
class
OrganizationHKController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
OrganizationHKController
.
class
);
@Autowired
OrganizationHKServiceImpl
organizationHKService
;
@RequestMapping
(
value
=
"getOrgInfoList"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
OrganizationHK
>
getOrgInfoList
()
{
logger
.
info
(
"GET /api/v1/org/getOrgInfoList"
);
return
organizationHKService
.
getOrgInfo
();
}
@RequestMapping
(
value
=
"enableOrgs"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OperationResultDto
enableOrgs
(
@RequestParam
(
"orgId"
)
Long
orgId
)
{
logger
.
info
(
"POST /api/v1/org/enableOrgs"
);
return
organizationHKService
.
enableOrgs
(
orgId
);
}
@RequestMapping
(
value
=
"disableOrgs"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
OperationResultDto
disableOrgs
(
@RequestBody
List
<
Long
>
orgIds
)
{
logger
.
info
(
"POST /api/v1/org/disableOrgs"
);
return
organizationHKService
.
disableOrgs
(
orgIds
);
}
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
PUT
)
public
@ResponseBody
OperationResultDto
<
Object
>
updateOrg
(
@RequestBody
OrganizationHKDto
orgDto
)
{
logger
.
info
(
"PUT /api/v1/org/update"
);
return
organizationHKService
.
updateOrg
(
orgDto
);
}
@RequestMapping
(
value
=
"getjson"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
NavTreeDto
>
getOrgListToJson
(
@RequestParam
(
"useType"
)
Integer
useType
)
{
return
organizationHKService
.
getOrgListToJson
(
useType
);
}
@RequestMapping
(
value
=
"displaySingle"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
OrganizationHKDto
getSingleOrgByOrgId
(
@RequestParam
(
"orgId"
)
Long
orgId
)
{
logger
.
info
(
"POST /api/v1/org/displaySingle"
);
return
organizationHKService
.
getSingleOrgByOrgId
(
orgId
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationHKServiceImpl.java
0 → 100644
View file @
b0faca2b
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
b0faca2b
...
...
@@ -1938,10 +1938,11 @@ public class OrganizationServiceImpl extends BaseService {
}
public
Boolean
codeUniqueValidate
(
OrganizationValidateDto
validateDto
)
{
String
innerId
=
Strings
.
isBlank
(
validateDto
.
getId
())
?
""
:
validateDto
.
getId
().
trim
();
String
innerCode
=
Strings
.
isBlank
(
validateDto
.
getValue
())
?
""
:
validateDto
.
getValue
().
trim
();
return
Strings
.
isBlank
(
innerCode
)
||
organizationMapper
.
countForCodeUniqueValidate
(
innerId
,
innerCode
).
equals
(
0
);
// String innerId = Strings.isBlank(validateDto.getId()) ? "" : validateDto.getId().trim();
//// String innerCode = Strings.isBlank(validateDto.getValue()) ? "" : validateDto.getValue().trim();
//// return Strings.isBlank(innerCode)
//// || organizationMapper.countForCodeUniqueValidate(innerId, innerCode).equals(0);
return
true
;
}
@SuppressWarnings
({
"rawtypes"
,
"unchecked"
})
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationFullChart/organization-full-chart.js
View file @
b0faca2b
...
...
@@ -12,5 +12,4 @@ infrastructureModule.directive('organizationFullChart', ['$log', function ($log)
}
}
}
]);
\ No newline at end of file
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.ctrl.js
View file @
b0faca2b
infrastructureModule
.
controller
(
'OrganizationManageController'
,
[
'$scope'
,
'$location'
,
'$log'
,
'org
Service'
,
'$interval'
,
'uiGridTreeViewConstants'
,
'uiGridConstants'
,
'SweetAlert'
,
'projectService'
,
'$translate'
,
'$timeout'
,
'organizationStructureService'
,
'areaRegionService'
,
'apiInterceptor'
,
'businessUnitService'
,
'userService'
,
'roleService'
,
'$q'
,
'permissionService'
,
'dimensionService'
,
'region'
,
'equityService'
,
'orgExtraService
'
,
'loginContext'
,
function
(
$scope
,
$location
,
$log
,
org
Service
,
$interval
,
uiGridTreeViewConstants
,
uiGridConstants
,
SweetAlert
,
projectService
,
$translate
,
$timeout
,
organizationStructureService
,
areaRegionService
,
apiInterceptor
,
businessUnitService
,
userService
,
roleService
,
$q
,
permissionService
,
dimensionService
,
region
,
equityService
,
orgExtraService
,
loginContext
)
{
.
controller
(
'OrganizationManageController'
,
[
'$scope'
,
'$location'
,
'$log'
,
'org
HKService'
,
'$interval'
,
'uiGridTreeViewConstants'
,
'uiGridConstants'
,
'SweetAlert'
,
'$translate'
,
'$timeout'
,
'apiInterceptor'
,
'$q
'
,
'loginContext'
,
function
(
$scope
,
$location
,
$log
,
org
HKService
,
$interval
,
uiGridTreeViewConstants
,
uiGridConstants
,
SweetAlert
,
$translate
,
$timeout
,
apiInterceptor
,
$q
,
loginContext
)
{
'use strict'
;
$scope
.
expanded
=
false
;
...
...
@@ -121,7 +121,7 @@
};
var
getOrgList
=
function
()
{
orgService
.
getOrgInfoList
().
success
(
function
(
data
)
{
org
HK
Service
.
getOrgInfoList
().
success
(
function
(
data
)
{
if
(
data
)
{
//data.forEach(function (row) {
// if (row.userList) {
...
...
@@ -151,7 +151,7 @@
$scope
.
isCanOrganizationIsActiveBtn
=
false
;
var
isActive
=
!
$scope
.
selectCompany
.
isActive
;
if
(
isActive
)
{
orgService
.
enableOrgs
(
$scope
.
selectCompany
.
id
).
success
(
function
()
{
org
HK
Service
.
enableOrgs
(
$scope
.
selectCompany
.
id
).
success
(
function
()
{
SweetAlert
.
success
(
$translate
.
instant
(
'EnableUserSuccess'
));
$scope
.
selectCompany
.
isActive
=
!
$scope
.
selectCompany
.
isActive
;
...
...
@@ -166,7 +166,7 @@
}
else
{
var
list
=
[];
list
.
push
(
$scope
.
selectCompany
.
id
);
orgService
.
disableOrgs
(
list
).
success
(
function
()
{
org
HK
Service
.
disableOrgs
(
list
).
success
(
function
()
{
SweetAlert
.
success
(
$translate
.
instant
(
'DisableUserSuccess'
));
$scope
.
selectCompany
.
isActive
=
!
$scope
.
selectCompany
.
isActive
;
...
...
@@ -211,7 +211,7 @@
}
};
orgService
.
updateOrg
(
$scope
.
selectCompany
).
success
(
function
(
data
)
{
org
HK
Service
.
updateOrg
(
$scope
.
selectCompany
).
success
(
function
(
data
)
{
if
(
data
&&
!
data
.
result
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
data
.
resultMsg
));
return
;
...
...
@@ -259,49 +259,49 @@
};
// 提交修改的机构其他信息
$scope
.
updateOrgExtraSubmit
=
function
()
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
'ComfirmUpdate'
),
text
:
$translate
.
instant
(
'UpdateOrgExtraInfoTips'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Confirm'
),
cancelButtonText
:
$translate
.
instant
(
'Cancel'
),
closeOnConfirm
:
false
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
// 选中
updateOrgExtraInfo
(
$scope
.
selectCompany
.
id
);
}
});
};
var
updateOrgExtraInfo
=
function
(
id
)
{
var
editData
=
$scope
.
editOrgExtraModel
;
editData
.
organizationId
=
id
;
org
Service
.
updateOrgExtraInfoByOrgId
(
editData
).
success
(
function
(
res
)
{
if
(
res
&&
!
res
.
result
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
res
.
resultMsg
));
return
;
}
if
(
res
)
{
org
Service
.
getSingleOrgExtra
(
id
).
success
(
function
(
data
)
{
if
(
data
==
null
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
data
.
resultMsg
));
return
;
}
$scope
.
editOrgExtraModel
=
angular
.
copy
(
data
);
$scope
.
selectCompanyExtra
=
data
;
generalSelectCompanyExtraText
();
cancelWebChange
();
SweetAlert
.
success
(
$translate
.
instant
(
'OrganizationExtraInfoEditSuccess'
));
});
}
});
};
//
$scope.updateOrgExtraSubmit = function () {
//
SweetAlert.swal({
//
title: $translate.instant('ComfirmUpdate'),
//
text: $translate.instant('UpdateOrgExtraInfoTips'),
//
type: "warning",
//
showCancelButton: true,
//
confirmButtonColor: "#DD6B55",
//
confirmButtonText: $translate.instant('Confirm'),
//
cancelButtonText: $translate.instant('Cancel'),
//
closeOnConfirm: false,
//
closeOnCancel: true
//
},
//
function (isConfirm) {
//
if (isConfirm) {
//
// 选中
//
updateOrgExtraInfo($scope.selectCompany.id);
//
}
//
});
//
};
//
//
var updateOrgExtraInfo = function (id) {
//
var editData = $scope.editOrgExtraModel;
//
editData.organizationId = id;
// orgHK
Service.updateOrgExtraInfoByOrgId(editData).success(function (res) {
//
if (res && !res.result) {
//
SweetAlert.warning($translate.instant(res.resultMsg));
//
return;
//
}
//
if (res) {
// orgHK
Service.getSingleOrgExtra(id).success(function (data) {
//
if (data == null) {
//
SweetAlert.warning($translate.instant(data.resultMsg));
//
return;
//
}
//
$scope.editOrgExtraModel = angular.copy(data);
//
$scope.selectCompanyExtra = data;
//
generalSelectCompanyExtraText();
//
cancelWebChange();
//
SweetAlert.success($translate.instant('OrganizationExtraInfoEditSuccess'));
//
});
//
}
//
});
//
};
// 添加或者编辑机构成功之后,刷新当前页面的数据
$scope
.
$watch
(
'isOrgUpdate'
,
function
(
newValue
,
oldValue
)
{
...
...
@@ -324,7 +324,7 @@
var
suborgList
=
getSubOrgList
(
branch
);
$scope
.
selectedOrgID
=
org
.
id
;
// 选中事件
orgService
.
getSingleOrg
(
org
.
id
).
success
(
function
(
data
)
{
org
HK
Service
.
getSingleOrg
(
org
.
id
).
success
(
function
(
data
)
{
if
(
$scope
.
selectNodeCount
>
1
)
{
$scope
.
showOrgs
=
false
;
$scope
.
showSingle
=
true
;
...
...
@@ -422,7 +422,7 @@
$scope
.
showOrgTree
=
false
;
orgService
.
getOrgListToJson
(
1
).
success
(
function
(
data
)
{
org
HK
Service
.
getOrgListToJson
(
1
).
success
(
function
(
data
)
{
$scope
.
orgList
=
data
;
$log
.
debug
(
data
);
// 设置默认选中机构
...
...
@@ -519,32 +519,6 @@
title
:
$translate
.
instant
(
'TPermission'
)
};
//Jack
$scope
.
showPermission
=
function
(
item
)
{
var
roleID
=
item
.
id
;
$scope
.
permissionList
=
[];
var
currentPermission
=
_
.
find
(
$scope
.
allRolePermission
,
function
(
row
)
{
return
row
.
roleID
==
roleID
;
});
if
(
currentPermission
&&
currentPermission
.
permissionList
)
{
$scope
.
permissionList
=
currentPermission
.
permissionList
;
var
copyData
=
angular
.
copy
(
currentPermission
.
permissionList
);
copyData
.
forEach
(
function
(
item
)
{
var
findParent
=
_
.
find
(
currentPermission
.
permissionList
,
function
(
num
)
{
return
num
.
id
===
item
.
parentID
;
});
if
(
!
findParent
)
{
item
.
parentID
=
null
;
}
});
$scope
.
permissionTreeViewData
=
copyData
;
// currentPermission.permissionList;
// console.log(JSON.stringify($scope.permissionTreeViewData));
}
// console.log(JSON.stringify(item));
};
$scope
.
getGridHeight
=
function
()
{
return
{
height
:
$
(
".dx-viewport"
).
height
()
+
"px"
};
};
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-director-modal/edit-organization-director-modal.js
View file @
b0faca2b
commonModule
.
directive
(
'editOrganizationDirectorModal'
,
'$log'
,
function
(
$log
)
{
commonModule
.
directive
(
'editOrganizationDirectorModal'
,
[
'$log'
,
function
(
$log
)
{
'use strict'
;
$log
.
debug
(
'editOrganizationDirectorModal.ctor()...'
);
return
{
...
...
@@ -14,4 +14,4 @@ commonModule.directive('editOrganizationDirectorModal', '$log', function ($log)
link
:
function
(
scope
,
element
)
{
}
};
});
\ No newline at end of file
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/common/controls/edit-organization-shareholder-modal/edit-organization-shareholder-modal.js
View file @
b0faca2b
commonModule
.
directive
(
'editOrganizationShareholderModal'
,
'$log'
,
function
(
$log
)
{
commonModule
.
directive
(
'editOrganizationShareholderModal'
,
[
'$log'
,
function
(
$log
)
{
'use strict'
;
$log
.
debug
(
'editOrganizationShareholderModal.ctor()...'
);
return
{
...
...
@@ -14,4 +14,4 @@ commonModule.directive('editOrganizationShareholderModal', '$log', function ($lo
link
:
function
(
scope
,
element
)
{
}
};
});
\ No newline at end of file
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/common/webservices/organization.svc.js
View file @
b0faca2b
...
...
@@ -5,33 +5,24 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getOrgList
:
function
(
type
)
{
return
$http
.
get
(
'/org/display?useType='
+
type
,
apiConfig
.
create
());
},
getOrgListToJson
:
function
(
type
)
{
return
$http
.
get
(
'/org/getjson?useType='
+
type
,
apiConfig
.
create
());
},
getOrgListForGrid
:
function
()
{
return
$http
.
get
(
'/org/displayForGrid'
,
apiConfig
.
create
());
},
getSingleOrg
:
function
(
orgId
)
{
return
$http
.
get
(
'/org/displaySingle?orgId='
+
orgId
,
apiConfig
.
create
());
},
getSingleOrgExtra
:
function
(
orgId
)
{
return
$http
.
get
(
'/org/displaySingleExtra?orgId='
+
orgId
,
apiConfig
.
create
());
},
addOrg
:
function
(
org
)
{
return
$http
.
post
(
'/org/add'
,
org
,
apiConfig
.
create
());
},
updateOrg
:
function
(
org
)
{
return
$http
.
put
(
'/org/update'
,
org
,
apiConfig
.
create
());
},
updateOrgExtraInfoByOrgId
:
function
(
org
)
{
return
$http
.
put
(
'/org/updateExtra'
,
org
,
apiConfig
.
create
());
},
updateHierarchy
:
function
(
srcOrgID
,
destOrgID
)
{
return
$http
.
put
(
'/org/updateHierarchy?srcOrgID='
+
srcOrgID
+
'&destOrgID='
+
destOrgID
,
org
,
apiConfig
.
create
());
},
disableOrgs
:
function
(
orgList
)
{
return
$http
.
post
(
'/org/disableOrgs'
,
orgList
,
apiConfig
.
create
());
},
deleteOrg
:
function
(
org
)
{
return
$http
.
post
(
'/org/delete'
,
org
,
apiConfig
.
create
());
},
...
...
@@ -41,9 +32,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getProjectIndustrys
:
function
()
{
return
$http
.
get
(
'/org/getProjectIndustrys'
,
apiConfig
.
create
());
},
enableOrgs
:
function
(
id
)
{
return
$http
.
get
(
'/org/enableOrgs?orgId='
+
id
,
apiConfig
.
create
());
},
getOrgIvhTreeList
:
function
(
useType
,
orgSetID
)
{
return
$http
.
get
(
'/org/getOrgIvhTreeList?useType='
+
useType
+
'&orgSetID='
+
orgSetID
,
apiConfig
.
create
());
},
...
...
@@ -107,9 +96,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
getOrgListLevel
:
function
()
{
return
$http
.
get
(
'/org/getOrgListLevel'
,
apiConfig
.
create
());
},
getOrgInfoList
:
function
()
{
return
$http
.
get
(
'/org/getOrgInfoList'
,
apiConfig
.
create
());
},
getOrgListByUserId
:
function
()
{
return
$http
.
get
(
'/org/getOrgListByUserId'
,
apiConfig
.
create
());
},
...
...
@@ -142,6 +129,7 @@ webservices.factory('orgService', ['$http', 'apiConfig', function ($http, apiCon
},
getAllActiveOrgList
:
function
()
{
return
$http
.
get
(
'/org/displayList'
,
apiConfig
.
create
());
}
},
};
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/common/webservices/organizationHK.svc.js
0 → 100644
View file @
b0faca2b
// web service proxy for org
webservices
.
factory
(
'orgHKService'
,
[
'$http'
,
'apiConfig'
,
function
(
$http
,
apiConfig
)
{
'use strict'
;
return
{
getOrgInfoList
:
function
()
{
return
$http
.
get
(
'/orgHK/getOrgInfoList'
,
apiConfig
.
create
());
},
enableOrgs
:
function
(
id
)
{
return
$http
.
get
(
'/orgHK/enableOrgs?orgId='
+
id
,
apiConfig
.
create
());
},
disableOrgs
:
function
(
orgList
)
{
return
$http
.
post
(
'/orgHK/disableOrgs'
,
orgList
,
apiConfig
.
create
());
},
updateOrg
:
function
(
org
)
{
return
$http
.
put
(
'/orgHK/update'
,
org
,
apiConfig
.
create
());
},
getOrgListToJson
:
function
(
type
)
{
return
$http
.
get
(
'/orgHK/getjson?useType='
+
type
,
apiConfig
.
create
());
},
getSingleOrg
:
function
(
orgId
)
{
return
$http
.
get
(
'/org/displaySingle?orgId='
+
orgId
,
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