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
1e994fc1
Commit
1e994fc1
authored
Nov 01, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEV] add comfire for munal datasrource for re gen report
parent
0aedfa54
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
69 additions
and
10 deletions
+69
-10
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+11
-3
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+4
-0
PeriodReportMapper.java
...ain/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
+14
-0
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+8
-3
vat-caculate-data.ctrl.js
...vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
+32
-4
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
1e994fc1
...
@@ -30,15 +30,17 @@ public class ReportController {
...
@@ -30,15 +30,17 @@ public class ReportController {
public
OperationResultDto
updateConfig
(
@PathVariable
String
projectId
,
public
OperationResultDto
updateConfig
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@PathVariable
Integer
period
,
@RequestParam
String
generator
)
{
@RequestParam
String
generator
,
return
reportService
.
updateConfig
(
projectId
,
period
,
ifDeleteManualDataSource
,
generator
,
true
);
@RequestParam
Boolean
mergeManual
)
{
return
reportService
.
updateConfig
(
projectId
,
period
,
ifDeleteManualDataSource
,
generator
,
mergeManual
);
// OperationResultDto operationResultDto = new OperationResultDto();
// OperationResultDto operationResultDto = new OperationResultDto();
// operationResultDto.setResult(true);
// operationResultDto.setResult(true);
// return operationResultDto;
// return operationResultDto;
}
}
@RequestMapping
(
value
=
"generateByTotal/{projectId}/{ifDeleteManualDataSource}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"generateByTotal/{projectId}/{ifDeleteManualDataSource}/{period}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
generateAllData
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@RequestParam
Optional
<
String
>
generator
)
{
public
OperationResultDto
generateAllData
(
@PathVariable
String
projectId
,
@PathVariable
Boolean
ifDeleteManualDataSource
,
@PathVariable
Integer
period
,
@RequestParam
Optional
<
String
>
generator
)
{
return
reportService
.
generateData
(
projectId
,
EnumServiceType
.
VAT
,
ifDeleteManualDataSource
,
period
,
null
,
generator
);
return
reportService
.
generateData
(
projectId
,
EnumServiceType
.
VAT
,
ifDeleteManualDataSource
,
period
,
null
,
generator
);
}
}
...
@@ -124,4 +126,9 @@ public class ReportController {
...
@@ -124,4 +126,9 @@ public class ReportController {
public
OperationResultDto
<
String
>
getDataSourceDetailList
(
@PathVariable
Long
dataSourceId
)
{
public
OperationResultDto
<
String
>
getDataSourceDetailList
(
@PathVariable
Long
dataSourceId
)
{
return
reportService
.
getDataSourceDetailList
(
dataSourceId
);
return
reportService
.
getDataSourceDetailList
(
dataSourceId
);
}
}
@RequestMapping
(
value
=
"hasManualDataSource/{projectId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
Boolean
hasManualDataSource
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
return
reportService
.
hasManualDataSource
(
projectId
,
period
);
}
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
1e994fc1
...
@@ -1216,4 +1216,8 @@ public class ReportServiceImpl {
...
@@ -1216,4 +1216,8 @@ public class ReportServiceImpl {
return
""
;
return
""
;
}
}
}
}
public
Boolean
hasManualDataSource
(
String
projectId
,
Integer
period
)
{
return
periodReportMapper
.
hasManualDataSource
(
projectId
,
period
)
>
0
;
}
}
}
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodReportMapper.java
View file @
1e994fc1
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.dao;
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.vat.dao;
import
java.util.List
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Select
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.entity.PeriodReport
;
import
pwc.taxtech.atms.vat.entity.PeriodReport
;
...
@@ -105,4 +106,16 @@ public interface PeriodReportMapper extends MyVatMapper {
...
@@ -105,4 +106,16 @@ public interface PeriodReportMapper extends MyVatMapper {
* @mbg.generated
* @mbg.generated
*/
*/
int
updateByPrimaryKey
(
PeriodReport
record
);
int
updateByPrimaryKey
(
PeriodReport
record
);
@Select
(
""
+
"SELECT "
+
" tCOUNT( 1 ) "
+
"FROM "
+
" tPERIOD_DATA_SOURCE pds "
+
"WHERE "
+
" tpds.PROJECT_ID = #{projectId} "
+
" tAND pds.TYPE = 10 "
+
" tAND pds.PERIOD = #{period}"
+
""
)
int
hasManualDataSource
(
@Param
(
"projectId"
)
String
projectId
,
@Param
(
"period"
)
Integer
period
);
}
}
\ No newline at end of file
atms-web/src/main/webapp/app/common/vatservices/vatReportService.js
View file @
1e994fc1
...
@@ -42,14 +42,14 @@
...
@@ -42,14 +42,14 @@
// citUpdateConfig: function (projectId, period?)
// citUpdateConfig: function (projectId, period?)
// citGetTemplate: function (projectId, period?)
// citGetTemplate: function (projectId, period?)
updateConfig
:
function
(
projectId
,
ifDeleteManualDataSource
,
period
,
generator
)
{
updateConfig
:
function
(
projectId
,
ifDeleteManualDataSource
,
period
,
generator
,
isMergeManualDataSource
)
{
return
$http
.
post
(
'/Report/updateConfig/'
+
projectId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
return
$http
.
post
(
'/Report/updateConfig/'
+
projectId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
+
'&mergeManual='
+
isMergeManualDataSource
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
},
},
generate
:
function
(
projectId
,
templateId
,
ifDeleteManualDataSource
,
period
,
generator
)
{
generate
:
function
(
projectId
,
templateId
,
ifDeleteManualDataSource
,
period
,
generator
)
{
return
$http
.
post
(
'/Report/generate/'
+
projectId
+
'/'
+
templateId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
return
$http
.
post
(
'/Report/generate/'
+
projectId
+
'/'
+
templateId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
},
},
generateAll
:
function
(
projectId
,
ifDeleteManualDataSource
,
period
,
generator
)
{
generateAll
:
function
(
projectId
,
ifDeleteManualDataSource
,
period
,
generator
)
{
return
$http
.
post
(
'/Report/generateByTotal/'
+
projectId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
return
$http
.
post
(
'/Report/generateByTotal/'
+
projectId
+
'/'
+
ifDeleteManualDataSource
+
'/'
+
period
+
'?generator='
+
generator
,
{},
apiConfig
.
createVat
({
ignoreLoadingBar
:
true
}));
},
},
getReportData
:
function
(
reportId
)
{
getReportData
:
function
(
reportId
)
{
return
$http
.
get
(
'/Report/reportData/'
+
reportId
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/Report/reportData/'
+
reportId
,
apiConfig
.
createVat
());
...
@@ -178,7 +178,11 @@
...
@@ -178,7 +178,11 @@
},
},
getDataSourceDetailList
:
function
(
dataSourceId
)
{
getDataSourceDetailList
:
function
(
dataSourceId
)
{
return
$http
.
get
(
'/Report/getDataSourceDetailList/'
+
dataSourceId
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/Report/getDataSourceDetailList/'
+
dataSourceId
,
apiConfig
.
createVat
());
},
hasManualDataSource
:
function
(
projectId
,
period
)
{
return
$http
.
get
(
'/Report/hasManualDataSource/'
+
projectId
+
'/'
+
period
,
apiConfig
.
createVat
());
}
}
};
};
}]);
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/vat/reduction/vat-caculate-data/vat-caculate-data.ctrl.js
View file @
1e994fc1
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
var
taskList
=
[];
var
taskList
=
[];
var
fixedRef
=
[];
var
fixedRef
=
[];
$scope
.
period
=
vatSessionService
.
month
;
$scope
.
period
=
vatSessionService
.
month
;
$scope
.
isMergeManualDataSource
=
false
;
$scope
.
moduleid
=
enums
.
vatModuleEnum
.
Import_CalculateData
;
$scope
.
moduleid
=
enums
.
vatModuleEnum
.
Import_CalculateData
;
...
@@ -118,7 +119,9 @@
...
@@ -118,7 +119,9 @@
//}, function () {
//}, function () {
// taskError(_this);
// taskError(_this);
//});
//});
vatReportService
.
updateConfig
(
vatSessionService
.
project
.
id
,
true
,
vatSessionService
.
month
).
success
(
function
(
data
)
{
vatReportService
.
updateConfig
(
vatSessionService
.
project
.
id
,
true
,
vatSessionService
.
month
,
vatSessionService
.
logUser
.
id
?
vatSessionService
.
logUser
.
id
:
""
,
$scope
.
isMergeManualDataSource
).
success
(
function
(
data
)
{
var
data
=
{
result
:
true
};
var
data
=
{
result
:
true
};
updateProgress
(
data
,
_this
);
updateProgress
(
data
,
_this
);
//vatReportService.getTemplateReferences(vatSessionService.month).then(function (refData) {
//vatReportService.getTemplateReferences(vatSessionService.month).then(function (refData) {
...
@@ -240,7 +243,8 @@
...
@@ -240,7 +243,8 @@
});
});
};
};
function
doStartCaculate
()
{
function
doStartCaculate
(
isMergeManualDataSource
)
{
$scope
.
isMergeManualDataSource
=
isMergeManualDataSource
;
$scope
.
readonly
=
true
;
$scope
.
readonly
=
true
;
$scope
.
resolveRef
.
length
=
0
;
$scope
.
resolveRef
.
length
=
0
;
$scope
.
resolveRef
.
push
({
$scope
.
resolveRef
.
push
({
...
@@ -287,7 +291,31 @@
...
@@ -287,7 +291,31 @@
},
},
function
(
isConfirm
)
{
function
(
isConfirm
)
{
if
(
isConfirm
)
{
if
(
isConfirm
)
{
doStartCaculate
();
vatReportService
.
hasManualDataSource
(
vatSessionService
.
project
.
id
,
vatSessionService
.
month
).
then
(
function
(
hasManual
)
{
if
(
hasManual
){
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
)
{
doStartCaculate
(
true
);
}
else
{
doStartCaculate
(
false
);
}
});
}
else
{
doStartCaculate
(
false
);
}
}
}
}
else
{
else
{
swal
.
close
();
swal
.
close
();
...
@@ -295,7 +323,7 @@
...
@@ -295,7 +323,7 @@
});
});
}
}
else
{
else
{
doStartCaculate
();
doStartCaculate
(
false
);
}
}
};
};
...
...
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