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
5bf8d219
Commit
5bf8d219
authored
Apr 04, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT导入及预览优化
parent
2f69a0c6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
124 additions
and
26 deletions
+124
-26
CitImportExcelController.java
...pwc/taxtech/atms/controller/CitImportExcelController.java
+17
-0
CitImportExcelServiceImpl.java
.../taxtech/atms/service/impl/CitImportExcelServiceImpl.java
+22
-9
cit.json
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
+5
-1
cit.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
+3
-1
cit-preview-journal-merge.ctrl.js
...t-preview-journal-merge/cit-preview-journal-merge.ctrl.js
+15
-10
cit-preview-journal-merge.html
.../cit-preview-journal-merge/cit-preview-journal-merge.html
+3
-3
cit-preview-journal-merge.less
.../cit-preview-journal-merge/cit-preview-journal-merge.less
+54
-0
cit-preview-tb-generate-ver.html
...-preview-tb-generate-ver/cit-preview-tb-generate-ver.html
+1
-1
cit-preview-tb-mapping-ver.html
...it-preview-tb-mapping-ver/cit-preview-tb-mapping-ver.html
+1
-1
citPreview.svc.js
.../src/main/webapp/app/common/webservices/citPreview.svc.js
+3
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CitImportExcelController.java
View file @
5bf8d219
...
...
@@ -8,6 +8,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
pwc.taxtech.atms.constant.enums.EnumCitImportType
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.CitJournalAdjustDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.service.impl.CitImportExcelServiceImpl
;
...
...
@@ -128,5 +129,21 @@ public class CitImportExcelController {
return
apiResultDto
;
}
@RequestMapping
(
value
=
"/generateTb"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
generateTb
(
@RequestBody
CitJournalAdjustDto
citJournalAdjustDto
){
logger
.
info
(
"处理日记账并生成TB"
);
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
operationResultDto
.
setResult
(
true
);
citImportExcelService
.
generateTb
(
citJournalAdjustDto
.
getProjectId
());
operationResultDto
.
setResultMsg
(
"Success"
);
return
operationResultDto
;
}
catch
(
Exception
e
){
operationResultDto
.
setResult
(
false
);
operationResultDto
.
setResultMsg
(
"Fail"
);
return
operationResultDto
;
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitImportExcelServiceImpl.java
View file @
5bf8d219
...
...
@@ -1400,21 +1400,36 @@ public class CitImportExcelServiceImpl extends BaseService {
}
}
public
void
generateTb
(
String
projectId
){
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
//删除自动生成的试算平衡表相关数据
CitTrialBalanceExample
citTbExample
=
new
CitTrialBalanceExample
();
citTbExample
.
createCriteria
().
andPeriodEqualTo
(
project
.
getYear
()).
andCreateByEqualTo
(
authUserHelper
.
getCurrentAuditor
().
get
()).
andProjectIdEqualTo
(
projectId
);
int
deleteByExample
=
citTrialBalanceMapper
.
deleteByExample
(
citTbExample
);
logger
.
info
(
"删除符合条件的试算平衡表数据"
);
CitTbamExample
citTbamExample
=
new
CitTbamExample
();
citTbamExample
.
createCriteria
().
andPeriodEqualTo
(
project
.
getYear
()).
andCreateByEqualTo
(
authUserHelper
.
getCurrentAuditor
().
get
()).
andProjectIdEqualTo
(
projectId
);
logger
.
info
(
"删除符合条件的试算平衡表Mapping数据"
);
citTbamMapper
.
deleteByExample
(
citTbamExample
);
updateImportLog
(
EnumCitImportType
.
JournalAdjust
.
getCode
());
autoGeneTB
(
project
.
getYear
(),
project
.
getOrganizationId
(),
new
ArrayList
<>(),
projectId
);
}
/**
* 自动生成试算平衡表和join出Mapping版的attribute mapping TB
* @param period
* @param orgList
* @return
*/
public
OperationResultDto
autoGeneTB
(
Integer
period
,
String
orgId
,
List
<
String
>
orgList
,
String
projectId
){
OperationResultDto
autoGeneResult
=
new
OperationResultDto
(
);
public
void
autoGeneTB
(
Integer
period
,
String
orgId
,
List
<
String
>
orgList
,
String
projectId
){
List
<
String
>
orgListTemp
=
new
ArrayList
<>();
orgListTemp
.
add
(
orgId
);
//第一步,根据合并日记账计算出借方发生额,贷方发生额,科目代码等相关信息
StringBuilder
periodSb
=
new
StringBuilder
();
periodSb
.
append
(
period
);
periodSb
.
append
(
"%"
);
//第二步,查出cit_journal_entry_adjust该期间的调整日记账,
List
<
CitJournalEntryAdjust
>
citJournalEntryAdjustList
=
citJournalEntryAdjustMapper
.
sumAmountByCondition
(
periodSb
.
toString
(),
orgList
);
List
<
CitJournalEntryAdjust
>
citJournalEntryAdjustList
=
citJournalEntryAdjustMapper
.
sumAmountByCondition
(
periodSb
.
toString
(),
orgList
Temp
);
List
<
CitTrialBalance
>
trialBalanceList
=
new
ArrayList
<>();
//存放TB与Mapping结合的实体
...
...
@@ -1477,11 +1492,9 @@ public class CitImportExcelServiceImpl extends BaseService {
trialBalanceList
.
add
(
trialBalance
);
}
int
insertBatch
=
citTrialBalanceMapper
.
insertBatch
(
trialBalanceList
);
int
insertBatch1
=
citTbamMapper
.
insertBatch
(
citTbamList
);
autoGeneResult
.
setResult
(
true
);
autoGeneResult
.
setResultMsg
(
"自动生成TB成功"
);
return
autoGeneResult
;
citTrialBalanceMapper
.
insertBatch
(
trialBalanceList
);
citTbamMapper
.
insertBatch
(
citTbamList
);
logger
.
info
(
"自动生成TB成功"
);
}
}
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
View file @
5bf8d219
...
...
@@ -1151,5 +1151,8 @@
"Subtotal"
:
"Total"
,
"AssetEamMapping"
:
"Asset Eam Mapping"
,
"ItemData"
:
"Item Data"
,
"GenerateJournalMergeAndTB"
:
"Handle Journal"
"GenerateJournalMergeAndTB"
:
"Handle Journal"
,
"ProcessSuccess"
:
"Process Success"
,
"ProcessFail"
:
"Process Fail"
}
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
View file @
5bf8d219
...
...
@@ -1204,7 +1204,9 @@
"DistributionAmount"
:
"分配税额"
,
"AssetEamMapping"
:
"固资损失计算"
,
"ItemData"
:
"条数据"
,
"GenerateJournalMergeAndTB"
:
"处理日记账"
"GenerateJournalMergeAndTB"
:
"处理日记账"
,
"ProcessSuccess"
:
"处理成功"
,
"ProcessFail"
:
"处理失败"
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge.ctrl.js
View file @
5bf8d219
...
...
@@ -259,12 +259,17 @@
};
var
handleJournal
=
function
()
{
citPreviewService
.
initExportJMData
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
citPreviewService
.
generateTb
(
vatSessionService
.
project
.
id
).
success
(
function
(
resp
)
{
if
(
resp
.
result
)
{
SweetAlert
.
success
(
$translate
.
instant
(
'ProcessSuccess'
));
}
else
{
debugger
;
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
resp
.
resultMsg
);
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'ProcessFail'
));
}
}
vatExportService
.
exportToExcel
(
data
,
status
,
headers
,
'日记账信息.xlsx'
);
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
...
...
@@ -370,11 +375,11 @@
$scope
.
queryParams
.
periodStart
=
vatSessionService
.
year
*
100
+
vatSessionService
.
month
;
$scope
.
queryParams
.
periodEnd
=
vatSessionService
.
year
*
100
+
12
;
$scope
.
queryParams
.
organizationId
=
vatSessionService
.
project
.
organizationID
;
if
(
$rootScope
.
currentLanguage
===
'en-us'
){
$
(
'.periodInput'
)[
0
].
style
.
left
=
"280px"
;
}
else
{
$
(
'.periodInput'
)[
0
].
style
.
left
=
"250px"
;
}
//
if($rootScope.currentLanguage === 'en-us'){
//
$('.periodInput')[0].style.left = "280px";
//
}else{
//
$('.periodInput')[0].style.left = "250px";
//
}
loadJournalEntryDataFromDB
(
1
);
})();
}
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge.html
View file @
5bf8d219
...
...
@@ -11,8 +11,8 @@
<span
translate=
"JournalTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"AccountPeriod"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;"
id=
"input-invoice-period-picker"
/>
<
button
translate=
"GenerateJournalMergeAndTB"
ng-click=
"handleJournal()"
></button>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
top: -61px; left: 95%;
"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<
span
ng-click=
"handleJournal()"
style=
"position: relative; left: 90%; top: -61px; cursor: pointer"
>
{{'GenerateJournalMergeAndTB' | translate}}
</span>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
left: 90%; top: -61px; cursor: pointer
"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
...
...
@@ -40,7 +40,7 @@
</span>
</div>
<div
id=
"mainAreaDiv"
class=
"main-area"
>
<div
id=
"mainAreaDiv"
class=
"main-area"
style=
"padding-top: 10px"
>
<div
class=
"inputInvoiceGrid"
ui-grid=
"gridOptions"
>
<div
class=
"watermark"
ng-show=
"!gridOptions.data.length"
><span
translate=
"NoDataAvailable"
></span></div>
</div>
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge.less
View file @
5bf8d219
...
...
@@ -4,6 +4,57 @@
background-color: white;
height: 100%;
.row {
margin-left: 0px;
margin-bottom:10px;
&>span {
float: right;
margin-right: 15px;
cursor: pointer;
}
}
.nav-wrapper {
padding-bottom: 10px;
border-bottom: 1px solid #DBD8D3;
.nav-header {
height: 54px;
line-height: 54px;
font-family: "Microsoft YaHei Bold", "Microsoft YaHei Regular", "Microsoft YaHei";
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #333;
}
.nav-tab {
/*display: inline-block;*/
span {
display: inline-block;
height: 34px;
width: 80px;
text-align: center;
line-height: 34px;
padding: 0 10px;
background-color: #B90808;
color: #FFF;
font-family: "Microsoft YaHei";
font-weight: 400;
font-style: normal;
font-size: 14px;
cursor: pointer;
}
.active {
background-color: #F91000;
}
}
}
.numAmount {
padding: 0 3px;
height: 21px;
...
...
@@ -164,3 +215,6 @@
width: 217px;
}
}
atms-web/src/main/webapp/app/cit/preview/cit-preview-tb-generate-ver/cit-preview-tb-generate-ver.html
View file @
5bf8d219
...
...
@@ -11,7 +11,7 @@
<span
translate=
"TrialBalanceGeneVer"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
style=
"display: none"
></span>
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;display: none;"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
top: -61px; left: 9
5%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
left: 8
5%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-tb-mapping-ver/cit-preview-tb-mapping-ver.html
View file @
5bf8d219
...
...
@@ -11,7 +11,7 @@
<span
translate=
"TrialBalanceMappingVer"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
style=
"display: none"
></span>
<input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;display: none"
id=
"input-invoice-period-picker"
/>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
top: -61px; left: 95
%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"downloadJE()"
style=
"position: relative;
left: 80
%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
...
...
atms-web/src/main/webapp/app/common/webservices/citPreview.svc.js
View file @
5bf8d219
...
...
@@ -23,6 +23,9 @@ webservices.factory('citPreviewService', ['$http', 'apiConfig','FileSaver', func
initExportJMData
:
function
(
citJournalAdjustDto
)
{
return
$http
.
post
(
'/citDataPreview/exportJournalMergeData'
,
citJournalAdjustDto
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
},
generateTb
:
function
(
projectId
)
{
return
$http
.
post
(
'/citImport/generateTb'
,
{
projectId
:
projectId
},
apiConfig
.
create
());
},
/**
根据条件获取试算平衡表生成版
*/
...
...
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