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
0457636b
Commit
0457636b
authored
Mar 30, 2019
by
kevin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
$
parent
bcb807ed
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
253 additions
and
38 deletions
+253
-38
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+25
-15
OperationResultDto.java
...rc/main/java/pwc/taxtech/atms/dto/OperationResultDto.java
+1
-0
RequestParameterBaseDto.java
...in/java/pwc/taxtech/atms/dto/RequestParameterBaseDto.java
+18
-0
RequestParameterDto.java
...c/main/java/pwc/taxtech/atms/dto/RequestParameterDto.java
+32
-6
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+10
-6
vatGeneratorConfig.xml
atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
+5
-4
EbitSpreadDataMapper.java
...n/java/pwc/taxtech/atms/vat/dao/EbitSpreadDataMapper.java
+141
-0
EbitSpreadData.java
...main/java/pwc/taxtech/atms/vat/entity/EbitSpreadData.java
+0
-0
EbitSpreadDataExample.java
...va/pwc/taxtech/atms/vat/entity/EbitSpreadDataExample.java
+0
-0
PeriodCellData.java
...main/java/pwc/taxtech/atms/vat/entity/PeriodCellData.java
+1
-2
EbitSpreadDataMapper.xml
...sources/pwc/taxtech/atms/vat/dao/EbitSpreadDataMapper.xml
+0
-0
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+20
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
0457636b
...
@@ -111,21 +111,6 @@ public class ReportController {
...
@@ -111,21 +111,6 @@ public class ReportController {
return
""
;
return
""
;
}
}
public
static
void
main
(
String
[]
args
)
{
System
.
out
.
println
(
201833
%
100
);
}
private
DataImportService
dataImportService
;
@RequestMapping
(
value
=
"saveAndRefresh"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
EbitDataDto
>
saveAndRefresh
(
@RequestParam
(
value
=
"orgId"
)
String
orgId
,
@RequestParam
(
value
=
"period"
)
Integer
period
,
@RequestParam
(
value
=
"specialConsiderations"
,
defaultValue
=
"0"
)
Integer
specialConsiderations
,
@RequestParam
(
value
=
"ebitRate"
,
defaultValue
=
"1"
)
String
ebitRate
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
operationResultDto
.
setData
(
reportService
.
loadEbitData
(
orgId
,
period
,
specialConsiderations
,
ebitRate
));
reportService
.
saveDatasource
(
orgId
,
period
,
specialConsiderations
,
ebitRate
,
operationResultDto
);
return
operationResultDto
;
}
@RequestMapping
(
value
=
"report/{templateId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"report/{templateId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
ReportDto
>
getReportByTemplate
(
@PathVariable
Long
templateId
,
@PathVariable
Integer
period
,
@RequestHeader
String
from
)
{
public
OperationResultDto
<
ReportDto
>
getReportByTemplate
(
@PathVariable
Long
templateId
,
@PathVariable
Integer
period
,
@RequestHeader
String
from
)
{
...
@@ -271,6 +256,16 @@ public class ReportController {
...
@@ -271,6 +256,16 @@ public class ReportController {
}
}
@RequestMapping
(
value
=
"saveAndRefresh"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
EbitDataDto
>
saveAndRefresh
(
@RequestParam
(
value
=
"orgId"
)
String
orgId
,
@RequestParam
(
value
=
"period"
)
Integer
period
,
@RequestParam
(
value
=
"specialConsiderations"
,
defaultValue
=
"0"
)
Integer
specialConsiderations
,
@RequestParam
(
value
=
"ebitRate"
,
defaultValue
=
"1"
)
String
ebitRate
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
operationResultDto
.
setData
(
reportService
.
loadEbitData
(
orgId
,
period
,
specialConsiderations
,
ebitRate
));
reportService
.
saveDatasource
(
orgId
,
period
,
specialConsiderations
,
ebitRate
,
operationResultDto
);
return
operationResultDto
;
}
/**
/**
*批量导出利润表
*批量导出利润表
*/
*/
...
@@ -280,5 +275,19 @@ public class ReportController {
...
@@ -280,5 +275,19 @@ public class ReportController {
operationResultDto
.
setResult
(
null
);
operationResultDto
.
setResult
(
null
);
return
operationResultDto
;
return
operationResultDto
;
}
}
/**
* 将spread序列化字符串保存到数据库
*/
@RequestMapping
(
"spreadToDb"
)
public
OperationResultDto
spreadToDb
(
@RequestBody
RequestParameterDto
.
EbitParam
ebitParam
){
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
reportService
.
spreadToDb
(
ebitParam
);
return
operationResultDto
.
success
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
return
operationResultDto
.
error
();
}
}
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/dto/OperationResultDto.java
View file @
0457636b
...
@@ -43,6 +43,7 @@ public class OperationResultDto<T> extends OperationResultBase {
...
@@ -43,6 +43,7 @@ public class OperationResultDto<T> extends OperationResultBase {
return
new
OperationResultDto
<>(
true
);
return
new
OperationResultDto
<>(
true
);
}
}
public
static
OperationResultDto
<?>
success
(
Object
data
)
{
public
static
OperationResultDto
<?>
success
(
Object
data
)
{
OperationResultDto
dto
=
new
OperationResultDto
();
OperationResultDto
dto
=
new
OperationResultDto
();
dto
.
setData
(
data
);
dto
.
setData
(
data
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/RequestParameterBaseDto.java
0 → 100644
View file @
0457636b
package
pwc
.
taxtech
.
atms
.
dto
;
/**
* @ClassName RequestParameterBaseDto
* Description TODO
* @Author pwc kevin
* @Date 3/30/2019 3:00 PM
* Version 1.0
**/
public
class
RequestParameterBaseDto
{
public
String
orgId
;
public
Integer
period
;
public
String
templateId
;
public
String
projectId
;
public
String
reportId
;
}
atms-api/src/main/java/pwc/taxtech/atms/dto/RequestParameterDto.java
View file @
0457636b
...
@@ -10,12 +10,38 @@ import java.io.Serializable;
...
@@ -10,12 +10,38 @@ import java.io.Serializable;
* Version 1.0
* Version 1.0
* 请求参数封装
* 请求参数封装
**/
**/
public
class
RequestParameterDto
implements
Serializable
{
public
class
RequestParameterDto
extends
RequestParameterBaseDto
implements
Serializable
{
private
String
reportId
;
private
String
orgId
;
public
class
EbitParam
extends
RequestParameterDto
{
private
Integer
period
;
private
String
jsonString
;
//excel传过来的数据 已经被序列化成字符串了
private
String
templateId
;
private
Integer
specialConsiderations
;
private
String
projectId
;
private
String
ebitRate
;
public
String
getEbitRate
()
{
return
ebitRate
;
}
public
void
setEbitRate
(
String
ebitRate
)
{
this
.
ebitRate
=
ebitRate
;
}
public
Integer
getSpecialConsiderations
()
{
return
specialConsiderations
;
}
public
void
setSpecialConsiderations
(
Integer
specialConsiderations
)
{
this
.
specialConsiderations
=
specialConsiderations
;
}
public
String
getJsonString
()
{
return
jsonString
;
}
public
void
setJsonString
(
String
jsonString
)
{
this
.
jsonString
=
jsonString
;
}
}
public
String
getReportId
()
{
public
String
getReportId
()
{
return
reportId
;
return
reportId
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
0457636b
...
@@ -31,10 +31,7 @@ import pwc.taxtech.atms.constant.Constant;
...
@@ -31,10 +31,7 @@ import pwc.taxtech.atms.constant.Constant;
import
pwc.taxtech.atms.constant.enums.*
;
import
pwc.taxtech.atms.constant.enums.*
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dao.*
;
import
pwc.taxtech.atms.dpo.ReportDto
;
import
pwc.taxtech.atms.dpo.ReportDto
;
import
pwc.taxtech.atms.dto.FileDto
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.PeriodReportDto
;
import
pwc.taxtech.atms.dto.ReportAttachDto
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
import
pwc.taxtech.atms.dto.vatdto.*
;
import
pwc.taxtech.atms.dto.vatdto.*
;
...
@@ -2261,7 +2258,7 @@ public class ReportServiceImpl extends BaseService {
...
@@ -2261,7 +2258,7 @@ public class ReportServiceImpl extends BaseService {
EbitCellDataExample
.
Criteria
criteria
=
example
.
createCriteria
();
EbitCellDataExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andOrganizationIdEqualTo
(
orgId
);
criteria
.
andOrganizationIdEqualTo
(
orgId
);
criteria
.
andPeriodEqualTo
(
period
);
criteria
.
andPeriodEqualTo
(
period
);
criteria
.
andColEqualTo
(
3
);
criteria
.
andColEqualTo
(
1
);
criteria
.
andRowEqualTo
(
i
);
criteria
.
andRowEqualTo
(
i
);
List
<
EbitCellData
>
ebitCellData
=
ebitCellDataMapper
.
selectByExample
(
example
);
List
<
EbitCellData
>
ebitCellData
=
ebitCellDataMapper
.
selectByExample
(
example
);
if
(
ebitCellData
.
size
()
==
0
)
{
if
(
ebitCellData
.
size
()
==
0
)
{
...
@@ -2295,10 +2292,17 @@ public class ReportServiceImpl extends BaseService {
...
@@ -2295,10 +2292,17 @@ public class ReportServiceImpl extends BaseService {
ebitCellData1
.
setData
(
operationResultDto
.
getData
().
getEbitData
().
getTotalAmountTax
().
toString
());
ebitCellData1
.
setData
(
operationResultDto
.
getData
().
getEbitData
().
getTotalAmountTax
().
toString
());
ebitCellData1
.
setRow
(
i
);
ebitCellData1
.
setRow
(
i
);
}
}
ebitCellData1
.
setCol
(
3
);
ebitCellData1
.
setCol
(
1
);
ebitCellData1
.
setCreateTime
(
new
Date
());
ebitCellData1
.
setCreateTime
(
new
Date
());
ebitCellData1
.
setOrganizationId
(
orgId
);
ebitCellData1
.
setOrganizationId
(
orgId
);
ebitCellData1
.
setPeriod
(
period
);
ebitCellData1
.
setPeriod
(
period
);
return
ebitCellData1
;
return
ebitCellData1
;
}
}
public
void
spreadToDb
(
RequestParameterDto
.
EbitParam
ebitParam
)
{
EbitSpreadDataExample
example
=
new
EbitSpreadDataExample
();
EbitSpreadDataExample
.
Criteria
criteria
=
example
.
createCriteria
();
EbitSpreadDataExample
.
Criteria
criteria1
=
criteria
.
andOrganizationIdEqualTo
(
ebitParam
.
getOrgId
()).
andPeriodEqualTo
(
ebitParam
.
getPeriod
());
}
}
}
atms-dao/etc/generator-mysql/vatGeneratorConfig.xml
View file @
0457636b
...
@@ -40,10 +40,11 @@
...
@@ -40,10 +40,11 @@
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"pwc.taxtech.atms.vat.dao"
targetProject=
"../../src/main/java"
>
<javaClientGenerator
type=
"XMLMAPPER"
targetPackage=
"pwc.taxtech.atms.vat.dao"
targetProject=
"../../src/main/java"
>
<property
name=
"rootInterface"
value=
"pwc.taxtech.atms.MyVatMapper"
/>
<property
name=
"rootInterface"
value=
"pwc.taxtech.atms.MyVatMapper"
/>
</javaClientGenerator>
</javaClientGenerator>
<!--<table tableName="ebit_cell_data" domainObjectName="EbitCellData">-->
<table
tableName=
"ebit_spread_data"
domainObjectName=
"EbitSpreadData"
>
<!--<property name="useActualColumnNames" value="false"/>-->
<property
name=
"useActualColumnNames"
value=
"false"
/>
<!--<property name="ignoreQualifiersAtRuntime" value="true"/>-->
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
<!--</table>-->
</table>
<!--
<!--
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/EbitSpreadDataMapper.java
0 → 100644
View file @
0457636b
package
pwc
.
taxtech
.
atms
.
vat
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyVatMapper
;
import
pwc.taxtech.atms.vat.entity.EbitSpreadData
;
import
pwc.taxtech.atms.vat.entity.EbitSpreadDataExample
;
@Mapper
public
interface
EbitSpreadDataMapper
extends
MyVatMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
long
countByExample
(
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
deleteByExample
(
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
insert
(
EbitSpreadData
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
insertSelective
(
EbitSpreadData
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
List
<
EbitSpreadData
>
selectByExampleWithBLOBsWithRowbounds
(
EbitSpreadDataExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
List
<
EbitSpreadData
>
selectByExampleWithBLOBs
(
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
List
<
EbitSpreadData
>
selectByExampleWithRowbounds
(
EbitSpreadDataExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
List
<
EbitSpreadData
>
selectByExample
(
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
EbitSpreadData
selectByPrimaryKey
(
Long
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
EbitSpreadData
record
,
@Param
(
"example"
)
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
EbitSpreadData
record
,
@Param
(
"example"
)
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
EbitSpreadData
record
,
@Param
(
"example"
)
EbitSpreadDataExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
EbitSpreadData
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByPrimaryKeyWithBLOBs
(
EbitSpreadData
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table ebit_spread_data
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
EbitSpreadData
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/EbitSpreadData.java
0 → 100644
View file @
0457636b
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/EbitSpreadDataExample.java
0 → 100644
View file @
0457636b
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/vat/entity/PeriodCellData.java
View file @
0457636b
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
package
pwc
.
taxtech
.
atms
.
vat
.
entity
;
import
pwc.taxtech.atms.entity.BaseEntity
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
import
pwc.taxtech.atms.entity.BaseEntity
;
/**
/**
*
*
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/EbitSpreadDataMapper.xml
0 → 100644
View file @
0457636b
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
0457636b
...
@@ -2922,11 +2922,29 @@
...
@@ -2922,11 +2922,29 @@
if
(
res
.
data
){
if
(
res
.
data
){
$scope
.
relation
.
data
=
res
.
data
;
$scope
.
relation
.
data
=
res
.
data
;
}
}
}).
error
(
function
(
error
){
}).
error
(
function
(
error
){
});
});
}
}
//将spread保存到数据库
var
spreadTODb
=
function
(){
//spread序列化参数
var
serializationOption
=
{
ignoreFormula
:
false
,
// indicate to ignore the style when convert workbook to json, default value is false
ignoreStyle
:
false
,
// indicate to ignore the formula when convert workbook to json, default value is false
rowHeadersAsFrozenColumns
:
false
,
// indicate to treat the row headers as frozen columns when convert workbook to json, default value is false
columnHeadersAsFrozenRows
:
false
// indicate to treat the column headers as frozen rows when convert workbook to json, default value is false
}
var
jsonString
=
JSON
.
stringify
(
$scope
.
spread
.
toJSON
(
serializationOption
));
var
obj
=
{
period
:
$scope
.
relation
.
period
!=
undefined
?
$scope
.
relation
.
period
:
null
,
orgId
:
$scope
.
relation
.
orgId
,
jsonString
:
jsonString
}
$http
.
post
(
'/Report/spreadToDb'
,
obj
,
function
(
res
){
if
(
!
res
.
result
)
SweetAlert
.
error
(
"保存表单到数据库失败"
);
});
}
$scope
.
$watch
(
'file'
,
function
(
file
)
{
$scope
.
$watch
(
'file'
,
function
(
file
)
{
$scope
.
upload
(
$scope
.
file
);
$scope
.
upload
(
$scope
.
file
);
...
@@ -3004,9 +3022,6 @@
...
@@ -3004,9 +3022,6 @@
}
}
}
}
//前端导入
//前端导入
var
frontImport
=
function
(
file
){
var
frontImport
=
function
(
file
){
if
(
$scope
.
spread
!=
undefined
&&
$scope
.
spread
){
if
(
$scope
.
spread
!=
undefined
&&
$scope
.
spread
){
...
...
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