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
f89cb5ba
Commit
f89cb5ba
authored
Aug 06, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed code issues and add datasource for invoice and voucher
parent
244ad198
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
43 additions
and
17 deletions
+43
-17
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+12
-5
CellConfigTranslater.java
...a/pwc/taxtech/atms/service/impl/CellConfigTranslater.java
+6
-1
DistributedIDService.java
...a/pwc/taxtech/atms/service/impl/DistributedIDService.java
+2
-1
DataSourceMapper.java
.../main/java/pwc/taxtech/atms/vat/dao/DataSourceMapper.java
+2
-0
ReportService.java
...main/java/pwc/taxtech/atms/vat/service/ReportService.java
+2
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
DataSourceMapper.xml
...n/resources/pwc/taxtech/atms/vat/dao/DataSourceMapper.xml
+17
-2
angular-material.js
.../main/webapp/Scripts/angular-material/angular-material.js
+1
-1
declaration-form-configuration.html
...tionFormConfiguration/declaration-form-configuration.html
+1
-1
adminModule.js
atms-web/src/main/webapp/app/adminModule.js
+0
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
f89cb5ba
...
...
@@ -11,6 +11,7 @@ import pwc.taxtech.atms.vat.entity.Report;
import
pwc.taxtech.atms.vat.entity.VatEnterpriseAccount
;
import
pwc.taxtech.atms.vat.service.ReportService
;
import
javax.print.attribute.standard.Media
;
import
java.util.List
;
@RestController
...
...
@@ -73,13 +74,18 @@ public class ReportController {
return
reportService
.
getStdAccountByIndustry
(
industryID
);
}
@RequestMapping
(
value
=
"getCellAccountRange/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
List
<
VatEnterpriseAccountResultDto
>>
getCellAccountRange
(
@PathVariable
Long
reportTemplateId
,
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
){
return
reportService
.
getCellAccountRange
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
);
@RequestMapping
(
value
=
"getCellAccountRange/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
List
<
VatEnterpriseAccountResultDto
>>
getCellAccountRange
(
@PathVariable
Long
reportTemplateId
,
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
)
{
return
reportService
.
getCellAccountRange
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
);
}
@RequestMapping
(
value
=
"addCellManualData"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
addCellManualDataSource
(
@RequestBody
ManualDataSourceDto
data
){
@RequestMapping
(
value
=
"addCellManualData"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
addCellManualDataSource
(
@RequestBody
ManualDataSourceDto
data
)
{
return
reportService
.
addCellManualDataSource
(
data
);
}
@RequestMapping
(
value
=
"addDataSource"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
String
>
addDataSource
(
@RequestBody
DataSourceDto
datasource
)
{
return
reportService
.
addDataSource
(
datasource
);
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CellConfigTranslater.java
View file @
f89cb5ba
...
...
@@ -71,7 +71,12 @@ public final class CellConfigTranslater {
}
}
Optional
<
CellTemplateConfig
>
invoiceItem
=
configList
.
stream
().
filter
(
x
->
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
OutputInvoice
.
getCode
())
||
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
InputInvoice
.
getCode
())
||
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
CustomInvoice
.
getCode
())).
findFirst
();
Optional
<
CellTemplateConfig
>
invoiceItem
=
configList
.
stream
()
.
filter
(
x
->
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
OutputInvoice
.
getCode
())
||
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
InputInvoice
.
getCode
())
||
x
.
getDataSourceType
().
equals
(
CellDataSourceType
.
CustomInvoice
.
getCode
()))
.
findFirst
();
if
(
invoiceItem
.
isPresent
())
{
cellTemplateConfigDto
.
setHasInvoice
(
true
);
cellTemplateConfigDto
.
setInvoiceType
(
invoiceItem
.
get
().
getInvoiceType
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DistributedIDService.java
View file @
f89cb5ba
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.util.SnowFlake
;
import
javax.annotation.PostConstruct
;
@
Service
@
Component
public
class
DistributedIDService
extends
BaseService
{
@Value
(
"${distributed_id_datacenter}"
)
private
Integer
dataCenterId
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/DataSourceMapper.java
View file @
f89cb5ba
...
...
@@ -131,6 +131,8 @@ public interface DataSourceMapper extends MyVatMapper {
void
clearReportWithPeriod
(
Integer
period
);
void
clearDataWithPeriod
(
@Param
(
"exceptReportTemplateIDs"
)
String
exceptReportTemplateIDs
,
@Param
(
"period"
)
Integer
period
);
List
<
DataSourceExtendDto
>
getFormulaDataSource
(
Long
reportID
);
List
<
DataSourceExtendDto
>
getManualDataSource
(
Long
cellDataID
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/ReportService.java
View file @
f89cb5ba
...
...
@@ -35,4 +35,6 @@ public interface ReportService {
* @return 添加结果
*/
OperationResultDto
addCellManualDataSource
(
ManualDataSourceDto
data
);
OperationResultDto
<
String
>
addDataSource
(
DataSourceDto
datasource
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
f89cb5ba
This diff is collapsed.
Click to expand it.
atms-api/src/main/resources/pwc/taxtech/atms/vat/dao/DataSourceMapper.xml
View file @
f89cb5ba
...
...
@@ -526,6 +526,19 @@
<delete
id=
"clearReportWithPeriod"
>
DELETE FROM report WHERE period=#{period,jdbcType=INTEGER};
</delete>
<delete
id=
"clearDataWithPeriod"
>
DELETE FROM period_formula_block WHERE period=#{period,jdbcType=INTEGER};
DELETE FROM period_tax_rule_setting WHERE period=#{period,jdbcType=INTEGER};
DELETE FROM period_cell_template WHERE period=#{period,jdbcType=INTEGER} and report_template_id not in (${exceptReportTemplateIDs});
DELETE FROM period_cell_template_config WHERE period=#{period,jdbcType=INTEGER} and report_template_id not in (${exceptReportTemplateIDs});
DELETE FROM period_template WHERE period=#{period,jdbcType=INTEGER} and template_id not in (${exceptReportTemplateIDs});
DELETE FROM period_tax_payer_report_rule WHERE period=#{period,jdbcType=INTEGER};
DELETE d FROM data_source_detail d JOIN data_source f ON d.data_source_id = f.id WHERE f.period = #{period,jdbcType=INTEGER};
DELETE d FROM cell_data_source d JOIN data_source f ON d.data_source_id = f.id WHERE f.period = #{period,jdbcType=INTEGER};
DELETE d FROM data_source d WHERE d.period = #{period,jdbcType=INTEGER};
DELETE c FROM cell_data c join report r on c.report_id=r.id where r.period = #{period,jdbcType=INTEGER};
DELETE FROM report WHERE period=#{period,jdbcType=INTEGER};
</delete>
<resultMap
id=
"DataSourceExtendDtoMap"
type=
"pwc.taxtech.atms.dto.vatdto.DataSourceExtendDto"
>
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"type"
jdbcType=
"INTEGER"
property=
"type"
/>
...
...
@@ -591,12 +604,14 @@
<association
property=
"cellData"
javaType=
"pwc.taxtech.atms.vat.entity.CellData"
>
<id
column=
"cell_data_id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"cell_data_data"
property=
"data"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"cell_data_template_id"
property=
"cellTemplateId"
javaType=
"java.lang.Long"
jdbcType=
"BIGINT"
/>
<result
column=
"cell_data_template_id"
property=
"cellTemplateId"
javaType=
"java.lang.Long"
jdbcType=
"BIGINT"
/>
<result
column=
"cell_data_report_id"
property=
"reportId"
javaType=
"java.lang.Long"
jdbcType=
"BIGINT"
/>
</association>
<association
property=
"cellDataSource"
javaType=
"pwc.taxtech.atms.vat.entity.CellDataSource"
>
<id
column=
"cell_data_source_id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"cell_data_source_operation_type"
property=
"operationType"
javaType=
"java.lang.Integer"
jdbcType=
"INTEGER"
/>
<result
column=
"cell_data_source_operation_type"
property=
"operationType"
javaType=
"java.lang.Integer"
jdbcType=
"INTEGER"
/>
</association>
</resultMap>
<select
id=
"getManualDataSource2"
parameterType=
"java.lang.Long"
resultMap=
"dataSourceCellDataDto"
>
...
...
atms-web/src/main/webapp/Scripts/angular-material/angular-material.js
View file @
f89cb5ba
...
...
@@ -24479,12 +24479,12 @@
* @param {string} repeatName The left hand side of the repeat expression, indicating
* the name for each item in the array.
* @param {!Function} repeatListExpression A compiled expression based on the right hand side
* of the repeat expression. Points to the array to repeat over.
* @param {string|undefined} extraName The optional extra repeatName.
*/
VirtualRepeatController
.
prototype
.
link_
=
function
(
container
,
transclude
,
repeatName
,
repeatListExpression
,
extraName
)
{
this
.
container
=
container
;
*
of
the
repeat
expression
.
Points
to
the
array
to
repeat
over
.
this
.
transclude
=
transclude
;
this
.
repeatName
=
repeatName
;
this
.
rawRepeatListExpression
=
repeatListExpression
;
atms-web/src/main/webapp/app/admin/systemConfiguration/declarationFormConfiguration/declaration-form-configuration.html
View file @
f89cb5ba
...
...
@@ -186,7 +186,7 @@
tick-property=
"ticked"
button-label=
"key"
item-label=
"key"
max-labels=
"1"
helper-elements=
"all none"
translation=
"langSetting"
is-disabled=
"!hasEditPermission || !ToggleSaveAs || !editModel.hasInvoice"
on-item-click=
"refreshCategorySelect(data)"
class=
"invoice-category-select"
></span>
<span
isteven-multi-select
ng-
hide
=
"!(!editModel.chosenInvoiceOption.rateOptions || editModel.chosenInvoiceOption.rateOptions.length === 0)"
<span
isteven-multi-select
ng-
if
=
"!(!editModel.chosenInvoiceOption.rateOptions || editModel.chosenInvoiceOption.rateOptions.length === 0)"
input-model=
"editModel.chosenInvoiceOption.rateOptions"
output-model=
"selectedRateOptions"
tick-property=
"ticked"
button-label=
"key"
item-label=
"key"
max-labels=
"2"
helper-elements=
"all none"
translation=
"langSetting"
is-disabled=
"!hasEditPermission || !ToggleSaveAs || !editModel.hasInvoice"
on-item-click=
"refreshTaxRateSelect(data)"
...
...
atms-web/src/main/webapp/app/adminModule.js
View file @
f89cb5ba
...
...
@@ -252,13 +252,11 @@ var cacheModule = angular.module('app.cache', ['app.common'])
//Common Bind Module Method
var
bindModule
=
function
(
thisModule
,
controllerProvider
,
compileProvider
,
filterProvider
,
provide
)
{
thisModule
.
controller
=
controllerProvider
.
register
;
thisModule
.
directive
=
compileProvider
.
directive
;
thisModule
.
filter
=
filterProvider
.
register
;
thisModule
.
factory
=
provide
.
factory
;
thisModule
.
service
=
provide
.
service
;
return
thisModule
;
};
...
...
@@ -835,7 +833,6 @@ var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMe
sticky
:
true
});
$stateProvider
.
state
({
name
:
'modelConfiguration'
,
url
:
'/modelconfiguration'
,
...
...
@@ -960,7 +957,6 @@ var adminHomePageModule = angular.module('app.adminHomePage', ["isteven-multi-se
deepStateRedirect
:
true
,
sticky
:
true
});
}]);
...
...
@@ -972,11 +968,9 @@ var noPermissionPageModule = angular.module('app.noPermissionPage', ["isteven-mu
function
(
$controllerProvider
,
$compileProvider
,
$filterProvider
,
$provide
,
scriptDependencyProvider
,
$stateProvider
,
$urlRouterProvider
)
{
'use strict'
;
// this is required to add controller/directive/filter/service after angular bootstrap
bindModule
(
noPermissionPageModule
,
$controllerProvider
,
$compileProvider
,
$filterProvider
,
$provide
);
$stateProvider
.
state
({
name
:
'noPermissionPage'
,
url
:
'/noPermissionPage'
,
...
...
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