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
e3774c2c
Commit
e3774c2c
authored
Nov 12, 2018
by
eddie.woo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify
parent
dab6c28f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
121 additions
and
17 deletions
+121
-17
EnterpriseAccountServiceImpl.java
...xtech/atms/service/impl/EnterpriseAccountServiceImpl.java
+5
-5
subject-corresponding.ctrl.js
...ration/subjectCorresponding/subject-corresponding.ctrl.js
+12
-12
common.svc.js
...-web/src/main/webapp/app/common/webservices/common.svc.js
+104
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EnterpriseAccountServiceImpl.java
View file @
e3774c2c
...
...
@@ -988,7 +988,7 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
//endregion
//1. 如果将标准科目对应到企业科目的父级,那么该企业科目的子级都对应到该标准科目
updateManualMapChildAccount
(
eaList
,
eAccount
,
stdAccount
,
accountSetId
,
industryId
,
organization
.
getId
());
//
updateManualMapChildAccount(eaList, eAccount, stdAccount, accountSetId, industryId, organization.getId());
//region 添加日志
OperationLogDto
operationLogDto
=
new
OperationLogDto
();
...
...
@@ -1009,13 +1009,13 @@ public class EnterpriseAccountServiceImpl extends AbstractService {
//region 手动对应当前的所有父级科目
//清空ParentAccountMapResult
this
.
mapParentAccountResult
=
Maps
.
newHashMap
();
mapAccountUpdateParent
(
Lists
.
newArrayList
(
accountMapDto
.
getEnterpriseAccountCodes
()),
accountSetId
,
industryId
,
organization
.
getId
(),
true
);
//
this.mapParentAccountResult = Maps.newHashMap();
//
mapAccountUpdateParent(Lists.newArrayList(accountMapDto.getEnterpriseAccountCodes()), accountSetId, industryId,
//
organization.getId(), true);
//endregion
AccountMapDto
mapDto
=
new
AccountMapDto
();
mapDto
.
setParentAccountMappingResult
(
this
.
mapParentAccountResult
);
mapDto
.
setParentAccountMappingResult
(
this
.
mapParentAccountResult
);
//todo 此处有线程安全问题
return
OperationResultDto
.
success
(
mapDto
);
}
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/subjectCorresponding/subject-corresponding.ctrl.js
View file @
e3774c2c
...
...
@@ -511,18 +511,18 @@
v
[
'stdCode'
]
=
codeToUpdate
;
v
[
'stdName'
]
=
nameToUpdate
;
v
[
'stdResult'
]
=
getStdResult
(
codeToUpdate
,
nameToUpdate
);
//todo 需求不需要覆盖子节点
//找出该选中节点的所有子节点,然后复制,避免再次从数据库获取数据
$scope
.
gridApiSubject
.
grid
.
rows
.
forEach
(
function
(
row
)
{
if
(
row
.
entity
.
parentCode
===
v
.
code
)
{
row
.
entity
[
'stdCode'
]
=
codeToUpdate
;
row
.
entity
[
'stdName'
]
=
nameToUpdate
;
row
.
entity
[
'stdResult'
]
=
getStdResult
(
codeToUpdate
,
nameToUpdate
);
//再次更新该row下面的子节点如果存在的话
updateChildrenMappedCodeNameRecursive
(
$scope
.
gridApiSubject
.
grid
.
rows
,
row
.
entity
[
'code'
],
codeToUpdate
,
nameToUpdate
);
}
});
//
$scope.gridApiSubject.grid.rows.forEach(function (row) {
//
if (row.entity.parentCode === v.code) {
//
row.entity['stdCode'] = codeToUpdate;
//
row.entity['stdName'] = nameToUpdate;
//
row.entity['stdResult'] = getStdResult(codeToUpdate, nameToUpdate);
//
//
//再次更新该row下面的子节点如果存在的话
//
updateChildrenMappedCodeNameRecursive($scope.gridApiSubject.grid.rows, row.entity['code'], codeToUpdate, nameToUpdate);
//
}
//
});
});
};
...
...
@@ -855,7 +855,7 @@
if
(
newVal
!==
oldVal
)
{
//初始化右侧标准科目的树,使用jquery fancytree的方式来显示树,所以需要用到ajax的方式
var
stdAccountUrl
=
'/stdAccount/stdAccountHierarchy?orgID='
+
$scope
.
selectedOrgID
;
commonWebService
.
initFancyTreeAjax
(
'treetable'
,
stdAccountUrl
,
mapStdAccount
);
commonWebService
.
init
All
FancyTreeAjax
(
'treetable'
,
stdAccountUrl
,
mapStdAccount
);
$scope
.
LoadEtsSubjectBySelectedOrg
();
}
...
...
atms-web/src/main/webapp/app/common/webservices/common.svc.js
View file @
e3774c2c
...
...
@@ -252,6 +252,109 @@ webservices.factory('commonWebService', ['$http', 'apiConfig', 'loginContext', '
node
.
setExpanded
(
false
);
});
}
},
initAllFancyTreeAjax
:
function
(
treeID
,
ajaxUrl
,
dblFn
)
{
var
prefixUrl
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
;
var
ajaxUrl
=
prefixUrl
+
ajaxUrl
;
var
ajaxSource
=
$
.
ajax
({
url
:
ajaxUrl
,
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
'Authorization'
,
tokenType
+
' '
+
apiToken
);
}
});
var
treeOptions
=
{
extensions
:
[
"edit"
,
"glyph"
,
"table"
,
"filter"
],
quicksearch
:
true
,
checkbox
:
false
,
glyph
:
glyph_opts
,
source
:
ajaxSource
,
table
:
{
checkboxColumnIdx
:
1
,
nodeColumnIdx
:
2
},
dblclick
:
function
(
event
,
data
)
{
var
node
=
data
.
node
.
data
;
var
code
=
node
.
code
;
var
name
=
node
.
fullName
;
var
acctProp
=
node
.
acctProp
;
var
direction
=
node
.
direction
;
var
hasChildren
=
node
.
hasChildren
;
if
(
code
!=
null
)
{
dblFn
(
code
,
name
,
acctProp
,
direction
);
}
},
renderColumns
:
function
(
event
,
data
)
{
var
node
=
data
.
node
,
$tdList
=
$
(
node
.
tr
).
find
(
">td"
);
$tdList
.
eq
(
3
).
text
(
!!
node
.
folder
);
},
filter
:
{
autoApply
:
true
,
// Re-apply last filter if lazy data is loaded
autoExpand
:
true
,
// Expand all branches that contain matches while filtered
counter
:
true
,
// Show a badge with number of matching child nodes near parent icons
fuzzy
:
false
,
// Match single characters in order, e.g. 'fb' will match 'FooBar'
hideExpandedCounter
:
false
,
// Hide counter badge if parent is expanded
hideExpanders
:
false
,
// Hide expanders if all child nodes are hidden by filter
highlight
:
true
,
// Highlight matches by wrapping inside <mark> tags
leavesOnly
:
false
,
// Match end nodes only
nodata
:
true
,
// Display a 'no data' status node if result is empty
mode
:
"hide"
,
// Grayout unmatched nodes (pass "hide" to remove unmatched node instead)
regularExpression
:
false
,
matchWholeBranch
:
false
}
};
///由于fancyTree第一次ajax请求加载的时候,只需要把发送ajax option即可,不需要使用callback去赋值
///但是第二次ajax请求重新渲染fancytree的话,需要ajax.done获取返回的数据并做为参数传递给fancytree去重新渲染
///所以使用了tick来判断是否是首次请求
var
tree
=
$
.
ui
.
fancytree
.
getTree
(
"#"
+
treeID
);
if
(
tree
)
{
ajaxSource
.
done
(
function
(
data
)
{
tree
.
reload
(
data
).
done
(
function
()
{
console
.
log
(
'reloaded'
);
});
}).
fail
(
function
(
err
)
{
console
.
log
(
err
);
});
}
else
{
$
(
"#"
+
treeID
).
fancytree
(
treeOptions
);
}
$
(
"input[name=fancytree-search]"
).
keyup
(
function
(
e
)
{
var
n
,
tree
=
$
.
ui
.
fancytree
.
getTree
(
"#"
+
treeID
),
opts
=
{},
filterFunc
=
tree
.
options
.
filter
.
matchWholeBranch
?
tree
.
filterBranches
:
tree
.
filterNodes
,
match
=
$
(
this
).
val
();
opts
.
nodata
=
tree
.
options
.
filter
.
nodata
;
opts
.
leavesOnly
=
tree
.
options
.
filter
.
leavesOnly
;
opts
.
highlight
=
tree
.
options
.
filter
.
highlight
;
opts
.
hideExpanders
=
tree
.
options
.
filter
.
hideExpanders
;
opts
.
fuzzy
=
tree
.
options
.
filter
.
fuzzy
;
opts
.
autoApply
=
tree
.
options
.
filter
.
autoApply
;
opts
.
mode
=
tree
.
options
.
filter
.
mode
;
opts
.
autoExpand
=
tree
.
options
.
filter
.
autoExpand
;
opts
.
counter
=
tree
.
options
.
filter
.
counter
;
if
(
e
&&
e
.
which
===
$
.
ui
.
keyCode
.
ESCAPE
||
$
.
trim
(
match
)
===
""
)
{
$
(
"input[name=fancytree-search]"
).
val
(
""
);
tree
.
clearFilter
();
return
;
}
//opts.
if
(
tree
.
options
.
filter
.
regularExpression
)
{
// Pass function to perform match
n
=
filterFunc
.
call
(
tree
,
function
(
node
)
{
return
new
RegExp
(
match
,
"i"
).
test
(
node
.
title
);
},
opts
);
}
else
{
// Pass a string to perform case insensitive matching
n
=
filterFunc
.
call
(
tree
,
match
,
opts
);
}
}).
focus
();
}
};
}]);
\ 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