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
163c68c9
Commit
163c68c9
authored
Apr 11, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT数据处理及查看报表fixbug
parent
566191aa
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
296 additions
and
255 deletions
+296
-255
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+27
-25
CitJournalEntryAdjustMapper.xml
...rces/pwc/taxtech/atms/dao/CitJournalEntryAdjustMapper.xml
+3
-0
JournalEntryMapper.xml
...resources/pwc/taxtech/atms/vat/dao/JournalEntryMapper.xml
+0
-0
cit-calculate-data.ctrl.js
...t/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
+225
-225
cit-report-view.ctrl.js
...pp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
+33
-4
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+8
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
163c68c9
...
...
@@ -1244,33 +1244,35 @@ public class CitReportServiceImpl extends BaseService {
cellData
.
setFormulaExp
(
data
.
getAmount
().
toString
());
}
cellData
.
setData
(
sumValue
);
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
cellData
.
setUpdateTime
(
new
Date
()
);
int
i
=
periodCellDataMapper
.
updateByPrimaryKeySelective
(
cellData
);
/*kevin insert */
// TODO: 3/21/2019 需要验证
// PeriodCellTemplateConfigExample example = new PeriodCellTemplateConfigExample();
// PeriodCellTemplateConfigExample.Criteria criteria = example.createCriteria();
// criteria.andCellTemplateIdEqualTo(Long.parseLong(data.getCellTemplateId()));
// criteria.andProjectIdEqualTo(data.getProjectId());
// PeriodCellTemplateConfig periodCellTemplateConfig = new PeriodCellTemplateConfig();
// periodCellTemplateConfig.setParsedFormula(sumValue);
// periodCellTemplateConfigMapper.updateByExampleSelective(periodCellTemplateConfig, example);
// //更改选中行相关数据
// CitJournalEntryAdjust citJournalEntryAdjust = new CitJournalEntryAdjust();
// citJournalEntryAdjust.setIsSelect("1");
// CitJournalEntryAdjustExample example1 = new CitJournalEntryAdjustExample();
// CitJournalEntryAdjustExample.Criteria criteria1 = example1.createCriteria();
// criteria1.andProjectIdEqualTo(data.getProjectId());
// criteria1.andSubjectCodeEqualTo(data.getAccountCode());
// citJournalEntryAdjustMapper.updateByExample(citJournalEntryAdjust, example1);
//
// JournalEntry journalEntry = new JournalEntry();
// journalEntry.setIsSelect("1");
// JournalEntryExample example2 = new JournalEntryExample();
// JournalEntryExample.Criteria criteria2 = example2.createCriteria();
// criteria2.andProjectIdEqualTo(data.getProjectId());
// criteria2.andSegment3EqualTo(data.getAccountCode());
// journalEntryMapper.updateByExample(journalEntry, example2);
if
(
sumValue
!=
null
){
PeriodCellTemplateConfigExample
example
=
new
PeriodCellTemplateConfigExample
();
PeriodCellTemplateConfigExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andCellTemplateIdEqualTo
(
Long
.
parseLong
(
data
.
getCellTemplateId
()));
criteria
.
andProjectIdEqualTo
(
data
.
getProjectId
());
PeriodCellTemplateConfig
periodCellTemplateConfig
=
new
PeriodCellTemplateConfig
();
periodCellTemplateConfig
.
setParsedFormula
(
sumValue
);
periodCellTemplateConfigMapper
.
updateByExampleSelective
(
periodCellTemplateConfig
,
example
);
//更改选中行相关数据
CitJournalEntryAdjust
citJournalEntryAdjust
=
new
CitJournalEntryAdjust
();
citJournalEntryAdjust
.
setIsSelect
(
"1"
);
CitJournalEntryAdjustExample
example1
=
new
CitJournalEntryAdjustExample
();
CitJournalEntryAdjustExample
.
Criteria
criteria1
=
example1
.
createCriteria
();
criteria1
.
andProjectIdEqualTo
(
data
.
getProjectId
());
criteria1
.
andSubjectCodeEqualTo
(
data
.
getAccountCode
());
citJournalEntryAdjustMapper
.
updateByExampleSelective
(
citJournalEntryAdjust
,
example1
);
JournalEntry
journalEntry
=
new
JournalEntry
();
journalEntry
.
setIsSelect
(
"1"
);
JournalEntryExample
example2
=
new
JournalEntryExample
();
JournalEntryExample
.
Criteria
criteria2
=
example2
.
createCriteria
();
criteria2
.
andProjectIdEqualTo
(
data
.
getProjectId
());
criteria2
.
andSegment3EqualTo
(
data
.
getAccountCode
());
journalEntryMapper
.
updateByExampleSelective
(
journalEntry
,
example2
);
}
}
List
<
DataSourceExtendDto
>
dataSourceExtendDtos
=
periodDataSourceMapper
.
getManualDataSource
(
data
.
getCellId
());
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitJournalEntryAdjustMapper.xml
View file @
163c68c9
...
...
@@ -923,6 +923,9 @@
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.isSelect != null"
>
is_select = #{record.isSelect,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/JournalEntryMapper.xml
View file @
163c68c9
This source diff could not be displayed because it is too large. You can
view the blob
instead.
atms-web/src/main/webapp/app/cit/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
View file @
163c68c9
vatModule
.
controller
(
'citCalculateDataController'
,
[
'$scope'
,
'$log'
,
'$timeout'
,
'$interval'
,
'$q'
,
'$translate'
,
'loginContext'
,
vatModule
.
controller
(
'citCalculateDataController'
,
[
'$scope'
,
'$log'
,
'$timeout'
,
'$interval'
,
'$q'
,
'$translate'
,
'loginContext'
,
'apiInterceptor'
,
'Upload'
,
'dataImportService'
,
'SweetAlert'
,
'vatReductionService'
,
'vatSessionService'
,
'uiGridConstants'
,
'enums'
,
'modelConfigurationService'
,
'citReportService'
,
'vatCommonService'
,
'BSPLService'
,
'vatOperationLogService'
,
'vatWorkflowService'
,
...
...
@@ -15,7 +15,7 @@
var
initTasks
=
function
()
{
var
task
=
function
(
id
,
status
,
name
,
code
)
{
var
task
=
function
(
id
,
status
,
name
,
code
)
{
this
.
id
=
id
;
this
.
name
=
_
.
isEmpty
(
name
)
?
$translate
.
instant
(
id
)
:
name
;
this
.
status
=
status
;
...
...
@@ -123,25 +123,25 @@
// $scope.isMergeManualDataSource ).success(function (data) {
// var data = {result: true};
// updateProgress(data, _this);
//citReportService.getTemplateReferences(vatSessionService.month).then(function (refData) {
// if (refData && refData.data) {
// // 初始化resolve列表
// var newRefData = _.chain(refData.data).reject(function (x) {
// return _.isEmpty(x.referenceFromTemplateID) || _.isEmpty(x.referenceToTemplateID);
// }).map(function (x) {
// return {
// referFrom: x.referenceFromTemplateID,
// referTo: x.referenceToTemplateID,
// resolved: x.isResolved
// };
// }).value();
// $scope.resolveRef.push.apply($scope.resolveRef, newRefData);
// }
// return $q.when(data);
//}).then(function () {
// updateProgress(data, _this);
//});
//citReportService.getTemplateReferences(vatSessionService.month).then(function (refData) {
// if (refData && refData.data) {
// // 初始化resolve列表
// var newRefData = _.chain(refData.data).reject(function (x) {
// return _.isEmpty(x.referenceFromTemplateID) || _.isEmpty(x.referenceToTemplateID);
// }).map(function (x) {
// return {
// referFrom: x.referenceFromTemplateID,
// referTo: x.referenceToTemplateID,
// resolved: x.isResolved
// };
// }).value();
// $scope.resolveRef.push.apply($scope.resolveRef, newRefData);
// }
// return $q.when(data);
//}).then(function () {
// updateProgress(data, _this);
//});
// }).error(function () {
//
// taskError(_this);
...
...
@@ -181,8 +181,7 @@
updateProgress
(
data
,
_this
,
false
);
},
2000
);
});
}
else
{
}
else
{
citReportService
.
generateAllCitReport
(
vatSessionService
.
project
.
id
,
true
,
vatSessionService
.
logUser
.
id
?
vatSessionService
.
logUser
.
id
:
""
).
success
(
function
(
data
)
{
updateProgress
(
data
,
_this
);
}).
error
(
function
()
{
...
...
@@ -196,7 +195,7 @@
task
.
prototype
.
id
=
null
;
task
.
prototype
.
status
=
null
;
task
.
prototype
.
text
=
null
;
task
.
prototype
.
code
=
null
;
task
.
prototype
.
code
=
null
;
citReportService
.
getCitTemplate
(
vatSessionService
.
project
.
id
,
constant
.
serviceType
.
CIT
).
then
(
function
(
report
)
{
...
...
@@ -204,12 +203,17 @@
// result.push({ name: $translate.instant('ProcessData'), items: [new task('GenerateStdTb', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CompareUnbilled', 'unstarted')] });
// result.push({ name: $translate.instant('ProcessData'), items: [new task('CaculateUnbilled', 'unstarted'), new task('UpdateReportConfig', 'unstarted'), new task('GenerateFinanceReport', 'unstarted')] });
/* var dataValidateItems = [/!*"本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计",*!/ ""];
var dataValidateCode = [/!*'DA001', 'DA002', 'DA003',*!/ ''];*/
/* var dataValidateItems = [/!*"本期余额表累计数+导入调整表是否等于本期利润表累计数", "本期余额表本期数+导入调整表是否等于本期利润表本期数", "上期利润表本年累进+本期利润表本期数是否等于本期利润表本年累计",*!/ ""];
var dataValidateCode = [/!*'DA001', 'DA002', 'DA003',*!/ ''];*/
//数据配置
result
.
push
({
name
:
$translate
.
instant
(
'ProcessData'
),
items
:
[
new
task
(
'UpdateReportConfig'
,
'unstarted'
,
""
,
"UpdateConfig"
)]
});
result
[
result
.
length
-
1
].
items
.
forEach
(
function
(
t
)
{
t
.
seqNo
=
result
.
length
-
1
});
result
.
push
({
name
:
$translate
.
instant
(
'ProcessData'
),
items
:
[
new
task
(
'UpdateReportConfig'
,
'unstarted'
,
""
,
"UpdateConfig"
)]
});
result
[
result
.
length
-
1
].
items
.
forEach
(
function
(
t
)
{
t
.
seqNo
=
result
.
length
-
1
});
//数据校验
// var reItem = [];
...
...
@@ -248,7 +252,7 @@
i
++
;
taskList
=
taskList
.
concat
(
item
.
items
);
});
$scope
.
tasks
=
result
;
getInitTaskStatus
();
});
...
...
@@ -287,52 +291,52 @@
// });
}
function
doStartCaculate2
(
isMergeManualDataSource
)
{
citReportService
.
generateAllCitReport
(
vatSessionService
.
project
.
id
,
isMergeManualDataSource
,
vatSessionService
.
logUser
.
id
?
vatSessionService
.
logUser
.
id
:
""
).
success
(
function
(
data
)
{
$scope
.
readonly
=
true
;
if
(
data
&&
data
.
result
)
updateTasksStatus
(
data
.
data
);
if
(
data
.
data
.
jobStatus
==
'Begin'
||
data
.
data
.
jobStatus
==
'Running'
){
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
(){
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
data
.
data
.
id
).
then
(
function
(
result
){
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
});
function
doStartCaculate2
(
isMergeManualDataSource
)
{
citReportService
.
generateAllCitReport
(
vatSessionService
.
project
.
id
,
isMergeManualDataSource
,
vatSessionService
.
logUser
.
id
?
vatSessionService
.
logUser
.
id
:
""
).
success
(
function
(
data
)
{
},
1000
);
}
}).
error
(
function
(
data
,
status
,
config
,
statusText
)
{
if
(
status
==
412
){
SweetAlert
.
error
(
'报表提审中!'
);
}
else
if
(
status
==
409
){
SweetAlert
.
error
(
'报表已在处理中!'
);
}
});
$scope
.
readonly
=
true
;
if
(
data
&&
data
.
result
)
updateTasksStatus
(
data
.
data
);
if
(
data
.
data
.
jobStatus
==
'Begin'
||
data
.
data
.
jobStatus
==
'Running'
)
{
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
()
{
}
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
data
.
data
.
id
).
then
(
function
(
result
)
{
function
isAllEnd
(
stepCode
,
status
){
var
statusList
=
JSON
.
parse
(
status
);
var
stepCodes
=
stepCode
.
split
(
","
);
if
(
result
.
data
&&
result
.
status
==
200
)
{
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
});
}
},
1000
);
}
}).
error
(
function
(
data
,
status
,
config
,
statusText
)
{
if
(
status
==
412
)
{
SweetAlert
.
error
(
'报表提审中!'
);
}
else
if
(
status
==
409
)
{
SweetAlert
.
error
(
'报表已在处理中!'
);
}
});
}
function
isAllEnd
(
stepCode
,
status
)
{
var
statusList
=
JSON
.
parse
(
status
);
var
stepCodes
=
stepCode
.
split
(
","
);
}
var
startCaculate
=
function
()
{
debugger
;
var
a
=
vatSessionService
.
project
.
projectStatusList
;
if
(
vatSessionService
.
project
.
projectStatusList
[
0
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
if
(
vatSessionService
.
project
.
projectStatusList
[
-
1
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'IsConfirmReCalcuate'
).
formatObj
({
status
:
vatCommonService
.
getProjectStautsEnumDesc
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
])}),
text
:
$translate
.
instant
(
'IsConfirmReCalcuate'
).
formatObj
({
status
:
vatCommonService
.
getProjectStautsEnumDesc
(
vatSessionService
.
project
.
projectStatusList
[
-
1
])}),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
...
...
@@ -378,60 +382,58 @@
}
};
var
startCaculate2
=
function
()
{
var
a
=
vatSessionService
.
project
.
projectStatusList
;
if
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'IsConfirmReCalcuate'
).
formatObj
({
status
:
vatCommonService
.
getProjectStautsEnumDesc
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
])}),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#dd6b55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
citReportService
.
hasManualDataSource
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
).
then
(
function
(
hasManual
)
{
if
(
hasManual
)
{
setTimeout
(
function
()
{
swal
({
title
:
"warning!"
,
text
:
"是否保留手工数据!"
,
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
doStartCaculate2
(
true
);
}
else
{
doStartCaculate2
(
false
);
}
});
},
500
);
}
else
{
doStartCaculate2
(
false
);
}
});
}
else
{
swal
.
close
();
var
startCaculate2
=
function
()
{
debugger
;
var
a
=
vatSessionService
.
project
.
projectStatusList
;
if
(
vatSessionService
.
project
.
projectStatusList
[
-
1
]
>=
constant
.
ProjectStatusEnum
.
Generated
)
{
swal
({
title
:
"warning!"
,
text
:
$translate
.
instant
(
'IsConfirmReCalcuate'
).
formatObj
({
status
:
vatCommonService
.
getProjectStautsEnumDesc
(
vatSessionService
.
project
.
projectStatusList
[
-
1
])}),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#dd6b55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
citReportService
.
hasManualDataSource
(
vatSessionService
.
project
.
id
,
0
).
then
(
function
(
hasManual
)
{
if
(
hasManual
)
{
setTimeout
(
function
()
{
swal
({
title
:
"warning!"
,
text
:
"是否保留手工数据!"
,
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'Yes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
closeOnCancel
:
true
},
function
(
isConfirm
)
{
if
(
isConfirm
)
{
doStartCaculate2
(
true
);
}
else
{
doStartCaculate2
(
false
);
}
});
},
500
);
}
else
{
doStartCaculate2
(
false
);
}
});
}
else
{
doStartCaculate2
(
false
);
}
};
});
}
else
{
swal
.
close
();
}
});
}
else
{
doStartCaculate2
(
false
);
}
};
var
caculateProgress
=
function
(
task
)
{
...
...
@@ -462,20 +464,19 @@
if
(
!
_
.
isEmpty
(
$scope
.
resolveRef
))
{
readyTasks
=
_
.
reject
(
$scope
.
tasks
[
task
.
seqNo
+
1
].
items
,
function
(
t
)
{
return
_
.
some
(
$scope
.
resolveRef
,
function
(
x
)
{
if
(
$scope
.
tasks
[
task
.
seqNo
+
1
].
isReportTask
)
isReport
=
true
;
if
(
$scope
.
tasks
[
task
.
seqNo
+
1
].
isReportTask
)
isReport
=
true
;
return
!
x
.
resolved
&&
x
.
referTo
===
t
.
id
;
});
});
}
else
{
}
else
{
readyTasks
=
$scope
.
tasks
[
task
.
seqNo
+
1
].
items
;
if
(
$scope
.
tasks
[
task
.
seqNo
+
1
].
isReportTask
)
isReport
=
true
;
if
(
$scope
.
tasks
[
task
.
seqNo
+
1
].
isReportTask
)
isReport
=
true
;
}
readyTasks
.
forEach
(
function
(
t
)
{
if
(
isReport
&&!
isGenedAll
)
{
t
.
doTask
();
isGenedAll
=
true
;
if
(
isReport
&&
!
isGenedAll
)
{
t
.
doTask
();
isGenedAll
=
true
;
}
t
.
status
=
'processing'
;
...
...
@@ -512,25 +513,24 @@
});
if
(
!
$scope
.
readonly
)
{
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
,
constant
.
ProjectStatusEnum
.
Generated
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
0
,
constant
.
ProjectStatusEnum
.
Generated
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
}
};
var
updateProgress
=
function
(
data
,
task
,
ifWriteLog
)
{
if
(
data
&&
data
.
result
)
{
if
(
$scope
.
tasks
[
task
.
seqNo
].
isReportTask
)
{
if
(
$scope
.
tasks
[
task
.
seqNo
].
isReportTask
)
{
$scope
.
tasks
[
task
.
seqNo
].
items
.
forEach
(
function
(
t
)
{
t
.
status
=
'completed'
;
t
.
text
=
$translate
.
instant
(
t
.
status
);
t
.
status
=
'completed'
;
t
.
text
=
$translate
.
instant
(
t
.
status
);
});
}
else
{
task
.
status
=
'completed'
;
task
.
text
=
$translate
.
instant
(
task
.
status
);
}
else
{
task
.
status
=
'completed'
;
task
.
text
=
$translate
.
instant
(
task
.
status
);
}
}
else
{
}
else
{
task
.
status
=
'error'
;
task
.
text
=
$translate
.
instant
(
task
.
status
);
//SweetAlert.error($translate.instant('PleaseContactAdministrator'));
...
...
@@ -560,8 +560,8 @@
logDto
.
ModuleID
=
$scope
.
moduleid
;
logDto
.
CreatorID
=
vatSessionService
.
logUser
.
ID
;
logDto
.
OperationObject
=
$translate
.
instant
(
'vatCaculateDataDesc'
);
logDto
.
Comment
=
vatSessionService
.
project
.
name
+
" "
+
vatSessionService
.
project
.
year
+
"年"
+
vatSessionService
.
month
+
"月"
;
logDto
.
Period
=
vatSessionService
.
month
;
logDto
.
Comment
=
vatSessionService
.
project
.
name
+
" "
+
vatSessionService
.
project
.
year
+
"年"
+
0
+
"月"
;
logDto
.
Period
=
0
;
logDto
.
ID
=
PWC
.
newGuid
();
logDto
.
CreateTime
=
new
Date
();
...
...
@@ -573,74 +573,74 @@
vatOperationLogService
.
addOperationLog
(
logDto
);
};
var
updateTasksStatus
=
function
(
job
)
{
var
updateTasksStatus
=
function
(
job
)
{
var
items
=
$scope
.
tasks
;
var
tasks
=
JSON
.
parse
(
job
.
status
);
if
(
job
.
jobStatus
==
'End'
){
items
.
forEach
(
function
(
item
,
index
){
item
.
status
=
'completed'
;
item
.
text
=
$translate
.
instant
(
'completed'
);
item
.
items
.
forEach
(
function
(
_task
,
index
)
{
tasks
.
forEach
(
function
(
task
){
if
(
task
.
code
==
_task
.
code
){
_task
.
status
=
'completed'
;
_task
.
text
=
$translate
.
instant
(
_task
.
status
);
if
(
job
.
jobStatus
==
'End'
)
{
items
.
forEach
(
function
(
item
,
index
)
{
item
.
status
=
'completed'
;
item
.
text
=
$translate
.
instant
(
'completed'
);
item
.
items
.
forEach
(
function
(
_task
,
index
)
{
tasks
.
forEach
(
function
(
task
)
{
if
(
task
.
code
==
_task
.
code
)
{
_task
.
status
=
'completed'
;
_task
.
text
=
$translate
.
instant
(
_task
.
status
);
}
})
})
});
if
(
$scope
.
timer
)
{
$interval
.
cancel
(
$scope
.
timer
);
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
-
1
,
constant
.
ProjectStatusEnum
.
Generated
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
}
}
else
if
(
job
.
jobStatus
==
'Running'
||
job
.
jobStatus
==
'Error'
)
{
var
updateConfig
=
tasks
[
0
];
if
(
updateConfig
.
status
==
'Error'
)
{
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'error'
;
}
else
if
(
updateConfig
.
status
==
'End'
)
{
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
}
else
if
(
updateConfig
.
status
==
'Begin'
)
{
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'processing'
;
}
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
$scope
.
tasks
[
0
].
items
[
0
].
status
);
/* items.forEach(function(item,index){
tasks.forEach(function(task){
if(task.code==item.code){
if(task.status == 'Error'){
item.status = 'error';
}else if(task.status == 'End'){
item.status = 'completed';
}else if(task.status == 'Begin'){
item.status = 'processing';
}
})
})
});
if
(
$scope
.
timer
){
$interval
.
cancel
(
$scope
.
timer
);
vatCommonService
.
setProjectStatus
(
vatSessionService
.
project
.
id
,
-
1
,
constant
.
ProjectStatusEnum
.
Generated
,
constant
.
DictionaryDictKey
.
WFDataProcess
,
enums
.
FinishStatusEnum
.
Finished
);
}
}
else
if
(
job
.
jobStatus
==
'Running'
||
job
.
jobStatus
==
'Error'
){
var
updateConfig
=
tasks
[
0
];
if
(
updateConfig
.
status
==
'Error'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'error'
;
}
else
if
(
updateConfig
.
status
==
'End'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'completed'
;
}
else
if
(
updateConfig
.
status
==
'Begin'
){
$scope
.
tasks
[
0
].
items
[
0
].
status
=
'processing'
;
}
$scope
.
tasks
[
0
].
items
[
0
].
text
=
$translate
.
instant
(
$scope
.
tasks
[
0
].
items
[
0
].
status
);
/* items.forEach(function(item,index){
tasks.forEach(function(task){
if(task.code==item.code){
if(task.status == 'Error'){
item.status = 'error';
}else if(task.status == 'End'){
item.status = 'completed';
}else if(task.status == 'Begin'){
item.status = 'processing';
item.text = $translate.instant(item.status);
}
item.text = $translate.instant(item.status);
}
})
});*/
if
(
job
.
jobStatus
==
'Error'
){
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
})
});*/
if
(
job
.
jobStatus
==
'Error'
)
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
}
}
items
.
forEach
(
function
(
item
,
index
)
{
items
.
forEach
(
function
(
item
,
index
){
item
.
items
.
forEach
(
function
(
_task
,
index
)
{
tasks
.
forEach
(
function
(
task
)
{
if
(
task
.
code
==
_task
.
code
)
{
if
(
task
.
status
==
'Error'
)
{
tasks
.
forEach
(
function
(
task
)
{
if
(
task
.
code
==
_task
.
code
)
{
if
(
task
.
status
==
'Error'
)
{
_task
.
status
=
'error'
;
}
else
if
(
task
.
status
==
'End'
)
{
}
else
if
(
task
.
status
==
'End'
)
{
_task
.
status
=
'completed'
;
}
else
if
(
task
.
status
==
'Begin'
)
{
}
else
if
(
task
.
status
==
'Begin'
)
{
_task
.
status
=
'processing'
;
}
_task
.
text
=
$translate
.
instant
(
_task
.
status
);
...
...
@@ -650,34 +650,34 @@
});
}
var
getInitTaskStatus
=
function
()
{
citReportService
.
getRunningJob
(
vatSessionService
.
project
.
id
,
0
).
then
(
function
(
result
)
{
if
(
result
.
data
&&
result
.
status
==
200
)
{
updateTasksStatus
(
result
.
data
);
if
(
result
.
data
.
jobStatus
==
'Begin'
||
result
.
data
.
jobStatus
==
'Running'
)
{
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
()
{
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
result
.
data
.
id
)
.
then
(
function
(
result
)
{
if
(
result
.
data
&&
result
.
status
==
200
)
{
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
});
},
1000
);
}
}
else
{
$log
.
debug
(
"not running job"
);
}
var
getInitTaskStatus
=
function
()
{
citReportService
.
getRunningJob
(
vatSessionService
.
project
.
id
,
0
).
then
(
function
(
result
)
{
if
(
result
.
data
&&
result
.
status
==
200
)
{
updateTasksStatus
(
result
.
data
);
if
(
result
.
data
.
jobStatus
==
'Begin'
||
result
.
data
.
jobStatus
==
'Running'
)
{
if
(
!
$scope
.
timer
)
$scope
.
timer
=
$interval
(
function
()
{
citReportService
.
getJobStatus
(
vatSessionService
.
project
.
id
,
0
,
result
.
data
.
id
)
.
then
(
function
(
result
)
{
if
(
result
.
data
&&
result
.
status
==
200
)
{
updateTasksStatus
(
result
.
data
);
}
else
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
}
});
},
1000
);
}
}
else
{
$log
.
debug
(
"not running job"
);
}
});
}
}
var
sendMessage
=
function
(
task
)
{
...
...
@@ -708,8 +708,8 @@
initTasks
();
$scope
.
startCaculate
=
startCaculate
;
$scope
.
startCaculate2
=
startCaculate2
;
$scope
.
$on
(
'$destroy'
,
function
()
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
$scope
.
$on
(
'$destroy'
,
function
()
{
if
(
$scope
.
timer
)
$interval
.
cancel
(
$scope
.
timer
);
});
})();
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
View file @
163c68c9
...
...
@@ -897,7 +897,8 @@
};
$scope
.
exportReportTreeOptions
=
{
dataSource
:
[{
id
:
'0'
,
templateId
:
'0'
,
name
:
'纳税申报表'
,
items
:
[],
expanded
:
true
}],
dataSource
:
[{
id
:
'0'
,
templateId
:
'0'
,
name
:
'纳税申报表'
,
items
:
[],
expanded
:
true
},
{
id
:
'1'
,
templateId
:
'1'
,
name
:
'工作底稿'
,
items
:
[],
expanded
:
true
}],
displayExpr
:
'name'
,
keyExpr
:
'id'
,
selectionMode
:
'Multiple'
,
...
...
@@ -916,7 +917,7 @@
$scope
.
openExportPop
=
function
(
evenType
)
{
$scope
.
evenType
=
evenType
;
var
grp
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'TaxReturnType'
||
g
.
name
==
'WorkingPaperType'
;
return
g
.
name
==
'TaxReturnType'
;
});
if
(
!
grp
||
!
grp
.
children
)
{
...
...
@@ -928,6 +929,19 @@
return
{
id
:
item
.
reportId
,
templateId
:
item
.
id
,
name
:
item
.
name
,
parentId
:
'0'
};
});
var
grp2
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'WorkingPaperType'
});
if
(
!
grp2
||
!
grp2
.
children
)
{
return
;
}
$scope
.
exportReportTreeOptions
.
dataSource
[
1
].
items
=
[];
$scope
.
exportReportTreeOptions
.
dataSource
[
1
].
items
=
_
.
map
(
grp2
.
children
,
function
(
item
)
{
return
{
id
:
item
.
reportId
,
templateId
:
item
.
id
,
name
:
item
.
name
,
parentId
:
'0'
};
});
var
parentElem
=
angular
.
element
(
$
(
'#exportReportFilesContainer'
));
$scope
.
exportReportInstance
=
$uibModal
.
open
({
ariaLabelledBy
:
'modal-title'
,
...
...
@@ -958,7 +972,7 @@
//批量导出EXCEL
$scope
.
export
=
function
()
{
debugger
;
var
grp
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'TaxReturnType'
;
});
...
...
@@ -967,6 +981,14 @@
return
;
}
var
grp2
=
_
.
find
(
$scope
.
$parent
.
$parent
.
groups
,
function
(
g
)
{
return
g
.
name
==
'WorkingPaperType'
});
if
(
!
grp2
||
!
grp2
.
children
)
{
return
;
}
if
(
!
$scope
.
selectedReportIds
||
$scope
.
selectedReportIds
.
length
==
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
'ExportReportRequiredCheck'
));
return
;
...
...
@@ -978,6 +1000,10 @@
item
.
orderIndex
=
orderIndex
;
orderIndex
++
;
});
_
.
each
(
grp2
.
children
,
function
(
item
)
{
item
.
orderIndex
=
orderIndex
;
orderIndex
++
;
});
var
reportArray
=
$scope
.
selectedReportIds
;
...
...
@@ -996,7 +1022,10 @@
var
node
=
_
.
first
(
_
.
where
(
grp
.
children
,
{
reportId
:
currentVal
}));
if
(
!
node
)
{
return
;
node
=
_
.
first
(
_
.
where
(
grp2
.
children
,
{
reportId
:
currentVal
}));
if
(
!
node
)
{
return
;
}
}
var
reportPromiss
=
citReportService
.
getReportData
(
node
.
reportId
).
success
(
function
(
reportData
)
{
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
163c68c9
...
...
@@ -1442,7 +1442,14 @@ constant.GroupTypeList = [
{
code
:
4
,
type
:
"教育费附加"
},
{
code
:
5
,
type
:
"地方教育费附加"
},
{
code
:
6
,
type
:
"个人所得税"
},
{
code
:
7
,
type
:
"国际税"
}
{
code
:
7
,
type
:
"水利建设基金"
},
{
code
:
8
,
type
:
"文化事业建设费"
},
{
code
:
9
,
type
:
"房产税"
},
{
code
:
10
,
type
:
"城建土地使用税"
},
{
code
:
11
,
type
:
"工会经费"
},
{
code
:
12
,
type
:
"残疾人就业保障基金"
},
{
code
:
13
,
type
:
"代扣代缴税费"
},
{
code
:
14
,
type
:
"国际税"
}
];
constant
.
InvoiceTypeList
=
[
...
...
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