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
1874cb8f
Commit
1874cb8f
authored
Apr 16, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#
parent
9e466900
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
706 additions
and
110 deletions
+706
-110
AnalysisJob.java
...in/java/pwc/taxtech/atms/common/schedule/AnalysisJob.java
+1
-1
DataBaseTableUtil.java
.../java/pwc/taxtech/atms/common/util/DataBaseTableUtil.java
+180
-0
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+68
-21
FileExcelUtil.java
...main/java/pwc/taxtech/atms/common/util/FileExcelUtil.java
+8
-7
LetterExcelUtil.java
...in/java/pwc/taxtech/atms/common/util/LetterExcelUtil.java
+49
-0
POIStyleUtil.java
.../main/java/pwc/taxtech/atms/common/util/POIStyleUtil.java
+33
-0
AnalysisController.java
.../java/pwc/taxtech/atms/controller/AnalysisController.java
+19
-0
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+1
-2
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+4
-13
AnalysisJobServiceImpl.java
...pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
+0
-0
AnalysisServiceImpl.java
...va/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
+0
-0
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+10
-3
EbsApiServiceImpl.java
...java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
+7
-4
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
analysis_init_data.xlsx
...ain/resources/analysis_excel_init/analysis_init_data.xlsx
+0
-0
analysisGeneratorConfig.xml
atms-dao/etc/generator-mysql/analysisGeneratorConfig.xml
+1
-1
AnalysisSalesMapper.java
...va/pwc/taxtech/atms/analysis/dao/AnalysisSalesMapper.java
+3
-0
AnalysisTaxMapper.java
...java/pwc/taxtech/atms/analysis/dao/AnalysisTaxMapper.java
+3
-0
AnalysisSales.java
.../java/pwc/taxtech/atms/analysis/entity/AnalysisSales.java
+38
-30
ProjectAnaylsisDto.java
...rc/main/java/pwc/taxtech/atms/dpo/ProjectAnaylsisDto.java
+9
-1
AnalysisSalesMapper.xml
...ces/pwc/taxtech/atms/analysis/dao/AnalysisSalesMapper.xml
+4
-4
AnalysisTaxMapper.xml
...urces/pwc/taxtech/atms/analysis/dao/AnalysisTaxMapper.xml
+49
-0
AnalysisSalesExtendsMapper.xml
...c/taxtech/atms/dao/extends/AnalysisSalesExtendsMapper.xml
+118
-0
ProjectExtendsMapper.xml
...ces/pwc/taxtech/atms/dao/extends/ProjectExtendsMapper.xml
+6
-1
JournalEntryMapper.xml
...resources/pwc/taxtech/atms/vat/dao/JournalEntryMapper.xml
+1
-3
vat.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
+1
-1
international-data-import.ctrl.js
...ternational-data-import/international-data-import.ctrl.js
+75
-5
international-data-import.html
.../international-data-import/international-data-import.html
+9
-1
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+8
-10
vatImportService.js
...rc/main/webapp/app/common/vatservices/vatImportService.js
+0
-0
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+1
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/schedule/AnalysisJob.java
View file @
1874cb8f
...
...
@@ -59,7 +59,7 @@ public class AnalysisJob extends QuartzJobBean {
logger
.
info
(
String
.
format
(
"开始分析%s返还后税数据"
,
period
));
analysisJobService
.
analysisTaxReturnEnd
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
logger
.
info
(
String
.
format
(
"开始分析%税种税金计算数据"
,
period
));
logger
.
info
(
String
.
format
(
"开始分析%
s
税种税金计算数据"
,
period
));
analysisJobService
.
analysisTax
(
orgs
,
period
,
EnumTbImportType
.
CoverImport
.
getCode
());
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/DataBaseTableUtil.java
0 → 100644
View file @
1874cb8f
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
com.google.common.collect.Lists
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.stereotype.Component
;
import
java.io.FileInputStream
;
import
java.io.FileNotFoundException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.sql.Connection
;
import
java.sql.DriverManager
;
import
java.sql.ResultSet
;
import
java.sql.Statement
;
import
java.util.*
;
/**
* author kevin
*/
public
class
DataBaseTableUtil
{
private
static
String
url
;
private
static
String
username
;
private
static
String
password
;
private
final
static
String
driver
=
"com.mysql.jdbc.Driver"
;
static
{
InputStream
in
=
null
;
in
=
DataBaseTableUtil
.
class
.
getClassLoader
().
getResourceAsStream
(
"conf/conf.properties"
);
Properties
p
=
new
Properties
();
try
{
p
.
load
(
in
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
url
=
p
.
getProperty
(
"jdbc_url"
);
username
=
p
.
getProperty
(
"jdbc_user"
);
password
=
p
.
getProperty
(
"jdbc_password"
);
}
/**
* 读取mysql某数据库下表的注释信息
*
* @author xxx
*/
public
static
Connection
getMySQLConnection
()
throws
Exception
{
Class
.
forName
(
driver
);
Connection
conn
=
DriverManager
.
getConnection
(
url
,
username
,
password
);
return
conn
;
}
/**
* 获取当前数据库下的所有表名称
* @return
* @throws Exception
*/
public
static
List
getAllTableName
()
throws
Exception
{
List
tables
=
new
ArrayList
();
Connection
conn
=
getMySQLConnection
();
Statement
stmt
=
conn
.
createStatement
();
ResultSet
rs
=
stmt
.
executeQuery
(
"SHOW TABLES "
);
while
(
rs
.
next
())
{
String
tableName
=
rs
.
getString
(
1
);
tables
.
add
(
tableName
);
}
rs
.
close
();
stmt
.
close
();
conn
.
close
();
return
tables
;
}
/**
* 获得某表的建表语句
*
* @param tableName
* @return
* @throws Exception
*/
public
static
Map
getCommentByTableName
(
List
tableName
)
throws
Exception
{
Map
map
=
new
HashMap
();
Connection
conn
=
getMySQLConnection
();
Statement
stmt
=
conn
.
createStatement
();
for
(
int
i
=
0
;
i
<
tableName
.
size
();
i
++)
{
String
table
=
(
String
)
tableName
.
get
(
i
);
ResultSet
rs
=
stmt
.
executeQuery
(
"SHOW CREATE TABLE "
+
table
);
if
(
rs
!=
null
&&
rs
.
next
())
{
String
createDDL
=
rs
.
getString
(
2
);
String
comment
=
parse
(
createDDL
);
map
.
put
(
table
,
comment
);
}
rs
.
close
();
}
stmt
.
close
();
conn
.
close
();
return
map
;
}
/**
* 获得某表中所有字段的注释
*
* @param tableName
* @return
* @throws Exception
*/
public
static
void
getColumnCommentByTableName
(
List
tableName
)
throws
Exception
{
Map
map
=
new
HashMap
();
Connection
conn
=
getMySQLConnection
();
Statement
stmt
=
conn
.
createStatement
();
for
(
int
i
=
0
;
i
<
tableName
.
size
();
i
++)
{
String
table
=
(
String
)
tableName
.
get
(
i
);
ResultSet
rs
=
stmt
.
executeQuery
(
"show full columns from "
+
table
);
System
.
out
.
println
(
"【"
+
table
+
"】"
);
// if (rs != null && rs.next()) {
//map.put(rs.getString("Field"), rs.getString("Comment"));
while
(
rs
.
next
())
{
// System.out.println("字段名称:" + rs.getString("Field") + "\t"+ "字段注释:" + rs.getString("Comment") );
System
.
out
.
println
(
rs
.
getString
(
"Field"
)
+
"\t:\t"
+
rs
.
getString
(
"Comment"
));
}
// }
rs
.
close
();
}
stmt
.
close
();
conn
.
close
();
// return map;
}
/**
* 返回注释信息
*
* @param all
* @return
*/
public
static
String
parse
(
String
all
)
{
String
comment
=
null
;
int
index
=
all
.
indexOf
(
"COMMENT='"
);
if
(
index
<
0
)
{
return
""
;
}
comment
=
all
.
substring
(
index
+
9
);
comment
=
comment
.
substring
(
0
,
comment
.
length
()
-
1
);
return
comment
;
}
public
void
main
(
String
[]
args
)
throws
Exception
{
List
tables
=
getAllTableName
();
Map
tablesComment
=
getCommentByTableName
(
tables
);
Set
names
=
tablesComment
.
keySet
();
Iterator
iter
=
names
.
iterator
();
while
(
iter
.
hasNext
())
{
String
name
=
(
String
)
iter
.
next
();
System
.
out
.
println
(
"Table Name: "
+
name
+
", Comment: "
+
tablesComment
.
get
(
name
));
}
getColumnCommentByTableName
(
tables
);
}
public
static
List
<
String
>
getTableComment
(
String
tableName
)
{
List
<
String
>
commentComments
=
Lists
.
newArrayList
();
Connection
conn
=
null
;
try
{
conn
=
getMySQLConnection
();
Statement
stmt
=
conn
.
createStatement
();
ResultSet
rs
=
stmt
.
executeQuery
(
"show full columns from "
+
tableName
);
while
(
rs
.
next
())
{
commentComments
.
add
(
rs
.
getString
(
"Comment"
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
commentComments
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
1874cb8f
...
...
@@ -124,6 +124,7 @@ public class DateUtils {
return
null
;
}
}
/**
* 将短时间格式字符串转换为区间格式 yyyyMM
*
...
...
@@ -131,7 +132,7 @@ public class DateUtils {
* @return
*/
public
static
Integer
dateToPeriod
(
java
.
util
.
Date
dateDate
)
{
if
(
dateDate
==
null
)
{
if
(
dateDate
==
null
)
{
return
null
;
}
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyyMM"
);
...
...
@@ -145,34 +146,38 @@ public class DateUtils {
* @return
*/
public
static
Integer
strToPeriod
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
" "
,
""
);
dateStr
=
dateStr
.
replace
(
" "
,
""
);
Integer
period
=
null
;
if
(
dateStr
.
length
()<
7
)
{
period
=
Integer
.
valueOf
(
dateStr
.
substring
(
0
,
4
)
+
"0"
+
dateStr
.
substring
(
5
,
6
));
}
else
{
if
(
dateStr
.
length
()
<
7
)
{
period
=
Integer
.
valueOf
(
dateStr
.
substring
(
0
,
4
)
+
"0"
+
dateStr
.
substring
(
5
,
6
));
}
else
{
period
=
Integer
.
valueOf
(
dateStr
.
substring
(
0
,
4
)
+
dateStr
.
substring
(
5
,
7
));
}
return
period
;
}
/**
* 将yyyy- 等字符串转换为区间格式 yyyy
*
* @param dateStr
* @return
*/
public
static
Integer
strToPeriodY
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
" "
,
""
);
dateStr
=
dateStr
.
replace
(
" "
,
""
);
Integer
period
=
Integer
.
valueOf
(
dateStr
.
substring
(
0
,
4
));
return
period
;
}
/**
* 将yyyy- 等字符串转换为区间格式 yyyyMM
*
* @param dateStr
* @return
*/
public
static
Integer
strToPeriodYM
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
"-"
,
""
).
replace
(
" "
,
""
).
replace
(
"年"
,
""
).
replace
(
"月"
,
""
);
dateStr
=
dateStr
.
replace
(
"-"
,
""
).
replace
(
" "
,
""
).
replace
(
"年"
,
""
).
replace
(
"月"
,
""
);
Integer
period
=
Integer
.
valueOf
(
dateStr
);
return
period
;
}
...
...
@@ -185,7 +190,7 @@ public class DateUtils {
* @return
*/
public
static
Integer
strToPeriod2
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
" "
,
""
);
dateStr
=
dateStr
.
replace
(
" "
,
""
);
Integer
period
=
Integer
.
valueOf
(
dateStr
);
return
period
;
}
...
...
@@ -223,7 +228,7 @@ public class DateUtils {
* @return
*/
public
static
Date
strToDate3
(
String
strDate
)
{
strDate
=
"20"
+
strDate
;
strDate
=
"20"
+
strDate
;
SimpleDateFormat
formatter
=
new
SimpleDateFormat
(
"yyyy/MM/dd"
);
ParsePosition
pos
=
new
ParsePosition
(
0
);
Date
strtodate
=
formatter
.
parse
(
strDate
,
pos
);
...
...
@@ -315,7 +320,7 @@ public class DateUtils {
return
hour
;
}
public
static
Date
getZero
(){
public
static
Date
getZero
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
...
...
@@ -324,10 +329,10 @@ public class DateUtils {
return
calendar
.
getTime
();
}
public
static
Date
getThreeDayZero
(){
public
static
Date
getThreeDayZero
()
{
Calendar
calendar
=
Calendar
.
getInstance
();
calendar
.
setTime
(
new
Date
());
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,-
3
);
calendar
.
set
(
Calendar
.
DAY_OF_MONTH
,
-
3
);
calendar
.
set
(
Calendar
.
HOUR_OF_DAY
,
0
);
calendar
.
set
(
Calendar
.
MINUTE
,
0
);
calendar
.
set
(
Calendar
.
SECOND
,
0
);
...
...
@@ -649,17 +654,16 @@ public class DateUtils {
return
newday
;
}
public
static
Integer
getNowMonth
(){
public
static
Integer
getNowMonth
()
{
Calendar
cale
=
Calendar
.
getInstance
();
return
cale
.
get
(
Calendar
.
MONTH
)
+
1
;
}
public
static
Integer
getNowYear
(){
public
static
Integer
getNowYear
()
{
Calendar
cale
=
Calendar
.
getInstance
();
return
cale
.
get
(
Calendar
.
YEAR
);
}
/**
* 取得数据库主键 生成格式为yyyymmddhhmmss+k位随机数
*
...
...
@@ -713,14 +717,15 @@ public class DateUtils {
/**
* 获得该月第一天
*
* @param year
* @param month
* @return
*/
public
static
String
getFirstDayOfMonth
(
int
year
,
int
month
)
{
public
static
String
getFirstDayOfMonth
(
int
year
,
int
month
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
set
(
Calendar
.
YEAR
,
year
);
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
cal
.
set
(
Calendar
.
YEAR
,
year
);
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
int
firstDay
=
cal
.
getActualMinimum
(
Calendar
.
DAY_OF_MONTH
);
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
firstDay
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
...
...
@@ -729,20 +734,62 @@ public class DateUtils {
/**
* 获得该月最后一天
*
* @param year
* @param month
* @return
*/
public
static
String
getLastDayOfMonth
(
int
year
,
int
month
)
{
public
static
String
getLastDayOfMonth
(
int
year
,
int
month
)
{
Calendar
cal
=
Calendar
.
getInstance
();
cal
.
set
(
Calendar
.
YEAR
,
year
);
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
cal
.
set
(
Calendar
.
YEAR
,
year
);
cal
.
set
(
Calendar
.
MONTH
,
month
-
1
);
int
lastDay
=
cal
.
getActualMaximum
(
Calendar
.
DAY_OF_MONTH
);
cal
.
set
(
Calendar
.
DAY_OF_MONTH
,
lastDay
);
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
return
sdf
.
format
(
cal
.
getTime
());
}
//获取档期那月 前N月的值 N的格式 : 201904
public
static
Integer
getBeforeMonthN
(
Integer
period
,
Integer
N
)
{
Integer
nowYear
=
period
/
100
;
Integer
nowMonth
=
period
%
100
;
if
(
nowMonth
-
N
<
0
)
{
nowYear
--;
nowMonth
=
nowMonth
-
N
+
12
;
}
else
{
nowMonth
-=
N
;
}
return
Integer
.
parseInt
(
String
.
valueOf
(
nowYear
)
+
String
.
valueOf
(
nowMonth
));
}
public
static
Date
convertIntertToDate
(
Integer
period
){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMM"
);
try
{
return
format
.
parse
(
String
.
valueOf
(
period
));
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"日期转换失败"
);
}
return
null
;
}
public
static
Date
convertStringToDate
(
String
period
){
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyyMM"
);
try
{
return
format
.
parse
(
period
);
}
catch
(
ParseException
e
)
{
e
.
printStackTrace
();
System
.
out
.
println
(
"日期转换失败"
);
}
return
null
;
}
public
static
String
getPeriodBegin
(
int
year
,
int
period
)
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
Calendar
calendar
=
Calendar
.
getInstance
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/util/FileExcelUtil.java
View file @
1874cb8f
...
...
@@ -325,6 +325,8 @@ public class FileExcelUtil {
public
static
void
deleteColumn
(
Sheet
sheet
,
int
columnToDelete
,
List
<
Integer
>
cols
)
{
for
(
int
rId
=
0
;
rId
<=
sheet
.
getLastRowNum
();
rId
++)
{
Row
row
=
sheet
.
getRow
(
rId
);
if
(
row
==
null
)
continue
;
for
(
int
cID
=
columnToDelete
;
cID
<=
row
.
getLastCellNum
();
cID
++)
{
Cell
cOld
=
row
.
getCell
(
cID
);
if
(
cOld
!=
null
)
{
...
...
@@ -355,6 +357,8 @@ public class FileExcelUtil {
*/
public
static
void
cloneCell
(
Cell
cNew
,
Cell
cOld
)
{
try
{
if
(
cOld
==
null
||
cNew
==
null
)
return
;;
cNew
.
setCellComment
(
cOld
.
getCellComment
());
cNew
.
setCellStyle
(
cOld
.
getCellStyle
());
try
{
...
...
@@ -382,7 +386,6 @@ public class FileExcelUtil {
}
/**
*
* @param cell 获取值的单元格
* @param zero 是否将空 或者null转换成 zero
* @return
...
...
@@ -412,12 +415,12 @@ public class FileExcelUtil {
default
:
break
;
}
if
(
""
.
equals
(
cellValue
)
&&
zero
)
if
(
""
.
equals
(
cellValue
)
&&
zero
)
return
BigDecimal
.
ZERO
;
if
(
zero
)
{
try
{
if
(
zero
)
{
try
{
return
new
BigDecimal
(
cellValue
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
warn
(
"获取Cell,在值转换成数字的地方出错"
);
return
BigDecimal
.
ZERO
;
}
...
...
@@ -426,5 +429,4 @@ public class FileExcelUtil {
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/common/util/LetterExcelUtil.java
0 → 100644
View file @
1874cb8f
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* author kevin
* version 1.0
*/
public
class
LetterExcelUtil
{
public
static
int
excelToNum
(
String
col
)
{
// "AAA"
if
(
col
==
null
)
return
-
1
;
char
[]
chrs
=
col
.
toUpperCase
().
toCharArray
();
// 转为大写字母组成的 char数组
int
length
=
chrs
.
length
;
int
ret
=
-
1
;
for
(
int
i
=
0
;
i
<
length
;
i
++)
{
ret
+=
(
chrs
[
i
]
-
'A'
+
1
)
*
Math
.
pow
(
26
,
length
-
i
-
1
);
// 当做26进制来算 AAA=111 26^2+26^1+26^0
}
return
ret
;
// 702; 从0开始的下标
}
/**
* 数字下标转列
*
* @param index
* @return
*/
public
static
String
NumToExcel
(
int
index
)
{
int
shang
=
0
;
int
yu
=
0
;
List
<
Integer
>
list
=
new
ArrayList
<
Integer
>();
//10进制转26进制 倒序
while
(
true
)
{
shang
=
index
/
26
;
yu
=
index
%
26
;
index
=
shang
;
list
.
add
(
yu
);
if
(
shang
==
0
)
break
;
}
StringBuilder
sb
=
new
StringBuilder
();
for
(
int
j
=
list
.
size
()
-
1
;
j
>=
0
;
j
--)
{
sb
.
append
((
char
)
(
list
.
get
(
j
)
+
'A'
-
(
j
>
1
?
1
:
j
)));
//倒序拼接 序号转字符 非末位 序号减去 1
}
return
sb
.
toString
();
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/common/util/POIStyleUtil.java
0 → 100644
View file @
1874cb8f
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFCellStyle
;
import
org.apache.poi.xssf.usermodel.XSSFColor
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
/**
* author kevin
* version 1.0
*/
public
class
POIStyleUtil
{
public
static
void
setCellAlign
(
XSSFWorkbook
xssfWorkbook
,
Cell
cell
)
{
CellStyle
cellStyle
=
xssfWorkbook
.
createCellStyle
();
cellStyle
.
setAlignment
(
HorizontalAlignment
.
CENTER
);
// 设置居中
cellStyle
.
setVerticalAlignment
(
VerticalAlignment
.
CENTER
);
cell
.
setCellStyle
(
cellStyle
);
}
///new XSSFColor(java.awt.Color.YELLOW)
public
static
void
setCellBackgroundColor
(
XSSFWorkbook
xssfWorkbook
,
Cell
cell
,
XSSFColor
xssfColor
,
FillPatternType
fillPatternType
)
{
if
(
fillPatternType
==
null
)
fillPatternType
=
FillPatternType
.
SOLID_FOREGROUND
;
XSSFCellStyle
cellStyle
=
xssfWorkbook
.
createCellStyle
();
cellStyle
.
setFillPattern
(
fillPatternType
);
cellStyle
.
setFillForegroundColor
(
xssfColor
);
cell
.
setCellStyle
(
cellStyle
);
}
public
static
void
setCellBackgroundColor
(
XSSFWorkbook
xssfWorkbook
,
Cell
cell
,
XSSFColor
xssfColor
){
setCellBackgroundColor
(
xssfWorkbook
,
cell
,
xssfColor
,
null
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/AnalysisController.java
View file @
1874cb8f
...
...
@@ -126,4 +126,23 @@ public class AnalysisController extends BaseController {
}
return
null
;
}
@RequestMapping
(
"analysisDataInit"
)
public
OperationResultDto
analysisDataInit
(
Integer
type
){
logger
.
info
(
"开始分析模块数据初始化"
);
OperationResultDto
operationResultDto
=
analysisServiceImpl
.
analysisDataInit
(
type
);
logger
.
info
(
"分析模块数据初始化完毕"
);
return
operationResultDto
;
}
@RequestMapping
(
"handleAnalysisData"
)
public
OperationResultDto
handleAnalysisData
(
Integer
type
){
logger
.
info
(
"开始分析模块手动加载数据"
);
OperationResultDto
operationResultDto
=
analysisServiceImpl
.
handleAnalysisData
(
type
);
logger
.
info
(
"分析模块手动加载数据完毕"
);
return
operationResultDto
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
1874cb8f
...
...
@@ -173,7 +173,7 @@ public class ReportController {
resultDto.setResult(false);
return resultDto;
}*/
operationResultDto
=
reportService
.
getCellData
(
requestParameterDto
.
getReportId
(),
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
());
operationResultDto
=
reportService
.
getCellData
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
());
return
operationResultDto
;
}
...
...
@@ -377,7 +377,6 @@ public class ReportController {
e
.
printStackTrace
();
operationResultDto
.
error
(
e
.
getMessage
());
return
new
ResponseEntity
(
HttpStatus
.
NO_CONTENT
);
}
return
new
ResponseEntity
(
HttpStatus
.
OK
);
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
1874cb8f
...
...
@@ -301,30 +301,22 @@ public class TemplateController extends BaseController {
File
templateFile
;
InputStream
inputStream
=
null
;
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
EbitSpreadDataExample
ebitSpreadData
=
new
EbitSpreadDataExample
();
/*
EbitSpreadDataExample ebitSpreadData = new EbitSpreadDataExample();
ebitSpreadData.createCriteria().andPeriodEqualTo(period).andOrganizationIdEqualTo(orgId);
List
<
EbitSpreadData
>
ebitSpreadData1
=
ebitSpreadDataMapper
.
selectByExample
(
ebitSpreadData
);
List<EbitSpreadData> ebitSpreadData1 = ebitSpreadDataMapper.selectByExample(ebitSpreadData);
*/
OutputStream
out
=
null
;
//客户端保存的文件名
String
customFileName
=
"template_"
+
DateTime
.
now
().
toString
(
"yyyyMMddHHmmss"
)
+
".xlsx"
;
response
.
setHeader
(
"Content-Disposition"
,
String
.
format
(
"inline; filename=\""
+
customFileName
+
"\""
));
response
.
setContentType
(
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
);
// int len = 0;
// byte[] buffer = new byte[1024];
// out = response.getOutputStream();
// while ((len = inputStream.read(buffer)) > 0) {
// out.write(buffer, 0, len);
// }
try
{
out
=
response
.
getOutputStream
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
if
(
ebitSpreadData1
.
size
()
!=
0
)
{
/*
if (ebitSpreadData1.size() != 0) {
DidiFileIUploadParam didiFileIUploadParam = new DidiFileIUploadParam();
didiFileIUploadParam.setUuids(Arrays.asList(ebitSpreadData1.get(0).getFileKey()));
PageInfo<DidiFileUploadDetailResult> uploadDetail = didiFileUploadService.queryPage(didiFileIUploadParam);
String path = null;
if (CollectionUtils.isNotEmpty(uploadDetail.getList())) {
...
...
@@ -359,7 +351,7 @@ public class TemplateController extends BaseController {
inputStream = null;
}
}
}
}
*/
List
<
Template
>
templates
=
templateService
.
getTL
(
templateId
);
MyAsserts
.
assertNotEmpty
(
templates
,
new
NotFoundException
());
Template
template
=
templates
.
get
(
0
);
...
...
@@ -368,7 +360,6 @@ public class TemplateController extends BaseController {
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
String
tempPath
=
filePath
.
substring
(
0
,
filePath
.
indexOf
(
"classes"
)
+
"\\classes"
.
length
());
templateFile
=
new
File
(
tempPath
+
templatePath
);
try
{
//如果是系统报表就取本地文件夹,如果不是就取FTP
if
(
template
.
getIsSystemType
())
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisJobServiceImpl.java
View file @
1874cb8f
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AnalysisServiceImpl.java
View file @
1874cb8f
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
1874cb8f
...
...
@@ -1255,7 +1255,7 @@ public class DataImportService extends BaseService {
* @return
*/
public
OperationResultDto
importCILExcelFile
(
MultipartFile
file
,
List
<
String
>
orgIds
,
String
periodDate
,
Integer
importType
)
throws
ServiceException
{
SimpleDateFormat
format
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
try
{
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
...
...
@@ -1348,8 +1348,12 @@ public class DataImportService extends BaseService {
cil
.
setInvoiceNum
(
getCellStringValue
(
cell3
));
Cell
cell4
=
row
.
getCell
(
3
);
try
{
String
BillingDate
=
format
.
format
(
cell4
.
getDateCellValue
());
cil
.
setBillingDate
(
DateUtils
.
strToDate4
(
BillingDate
));
}
catch
(
Exception
e
){
cil
.
setBillingDate
(
DateUtils
.
strToDate4
(
getCellStringValue
(
cell4
)));
}
Cell
cell5
=
row
.
getCell
(
4
);
cil
.
setSalesTaxNum
(
getCellStringValue
(
cell5
));
...
...
@@ -1366,7 +1370,10 @@ public class DataImportService extends BaseService {
cil
.
setVerificationMethod
(
getCellStringValue
(
cell9
));
Cell
cell10
=
row
.
getCell
(
9
);
cil
.
setCertifiedDate
(
DateUtils
.
strToDate4
(
getCellStringValue
(
cell10
)));
Date
dateCellValue
=
cell10
.
getDateCellValue
();
String
format1
=
format
.
format
(
dateCellValue
);
cil
.
setCertifiedDate
(
DateUtils
.
strToDate4
(
format1
));
Cell
cell11
=
row
.
getCell
(
10
);
cil
.
setInvoiceType
(
getCellStringValue
(
cell11
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/EbsApiServiceImpl.java
View file @
1874cb8f
...
...
@@ -126,7 +126,8 @@ public class EbsApiServiceImpl implements EbsApiService {
}
@Override
public
void
queryRemoteServerThenUpdateCF
(
Long
id
,
List
<
CashFlowQueryDto
>
items
)
{
public
void
queryRemoteServerThenUpdateCF
(
Long
id
,
List
<
CashFlowQueryDto
>
items
)
{
long
start
=
System
.
currentTimeMillis
();
logger
.
debug
(
"start queryRemoteServerThenUpdateCF 现金流量表"
);
//判断数据是否存在
...
...
@@ -260,11 +261,12 @@ public class EbsApiServiceImpl implements EbsApiService {
//唯一则更新否则插入
JournalEntry
journalEntry
=
new
JournalEntry
();
if
(
journalEntryList
.
size
()
==
1
)
{
logger
.
debug
(
"exist and update journalEntry headerId:{},lineNum:{},taskId:{}"
,
item
.
getHeaderId
(),
item
.
getLineNum
(),
item
.
getTaskId
());
//todo 待验证
/*logger.debug("exist and update journalEntry headerId:{},lineNum:{},taskId:{}", item.getHeaderId(), item.getLineNum(),item.getTaskId());
journalEntry = journalEntryList.get(0);
populateFieldsJE(item, journalEntry);
journalEntry.setId(journalEntryList.get(0).getId());
journalEntryMapper
.
updateByPrimaryKeySelective
(
journalEntry
);
journalEntryMapper.updateByPrimaryKeySelective(journalEntry);
*/
}
else
{
logger
.
debug
(
"miss and insert journalEntry headerId:{},lineNum:{},taskId:{}"
,
item
.
getHeaderId
(),
item
.
getLineNum
(),
item
.
getTaskId
());
populateFieldsJE
(
item
,
journalEntry
);
...
...
@@ -870,9 +872,10 @@ public class EbsApiServiceImpl implements EbsApiService {
}
private
void
updateDataImportLog
(
Long
id
,
int
size
)
{
DataImportLog
dataImportLogTemp
=
dataImportLogMapper
.
selectByPrimaryKey
(
id
);
DataImportLog
dataImportLog
=
new
DataImportLog
();
dataImportLog
.
setId
(
id
);
dataImportLog
.
setRecordSize
(
size
);
dataImportLog
.
setRecordSize
(
(
dataImportLogTemp
==
null
?
0
:
dataImportLogTemp
.
getRecordSize
())+
size
);
dataImportLog
.
setImportResult
(
true
);
dataImportLog
.
setUpdateTime
(
new
Date
());
int
res
=
dataImportLogMapper
.
updateByPrimaryKeySelective
(
dataImportLog
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
1874cb8f
This diff is collapsed.
Click to expand it.
atms-api/src/main/resources/analysis_excel_init/analysis_init_data.xlsx
0 → 100644
View file @
1874cb8f
File added
atms-dao/etc/generator-mysql/analysisGeneratorConfig.xml
View file @
1874cb8f
...
...
@@ -41,7 +41,7 @@
<property
name=
"rootInterface"
value=
"pwc.taxtech.atms.MyAnalysisMapper"
/>
</javaClientGenerator>
<table
tableName=
"analysis_
international_business_data"
domainObjectName=
"AnalysisInternationalBusinessData
"
>
<table
tableName=
"analysis_
employee_num"
domainObjectName=
"AnalysisEmployeeNum
"
>
<property
name=
"useActualColumnNames"
value=
"false"
/>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
</table>
...
...
atms-dao/src/main/java/pwc/taxtech/atms/analysis/dao/AnalysisSalesMapper.java
View file @
1874cb8f
...
...
@@ -105,4 +105,6 @@ public interface AnalysisSalesMapper extends MyAnalysisMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
AnalysisSales
record
);
int
insertBatch
(
List
<
AnalysisSales
>
salesList
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/analysis/dao/AnalysisTaxMapper.java
View file @
1874cb8f
...
...
@@ -105,4 +105,6 @@ public interface AnalysisTaxMapper extends MyAnalysisMapper {
* @mbg.generated
*/
int
updateByPrimaryKey
(
AnalysisTax
record
);
int
insertBatch
(
List
<
AnalysisTax
>
taxList
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/analysis/entity/AnalysisSales.java
View file @
1874cb8f
...
...
@@ -222,6 +222,16 @@ public class AnalysisSales extends BaseEntity implements Serializable {
*/
private
BigDecimal
segment17
;
public
BigDecimal
getSegment18
()
{
return
segment18
;
}
public
void
setSegment18
(
BigDecimal
segment18
)
{
this
.
segment18
=
segment18
;
}
private
BigDecimal
segment18
;
/**
* Database Column Remarks:
* 创建时间
...
...
@@ -863,35 +873,32 @@ public class AnalysisSales extends BaseEntity implements Serializable {
*/
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", seqNo="
).
append
(
seqNo
);
sb
.
append
(
", segment1="
).
append
(
segment1
);
sb
.
append
(
", segment2="
).
append
(
segment2
);
sb
.
append
(
", segment3="
).
append
(
segment3
);
sb
.
append
(
", segment4="
).
append
(
segment4
);
sb
.
append
(
", segment5="
).
append
(
segment5
);
sb
.
append
(
", segment6="
).
append
(
segment6
);
sb
.
append
(
", segment7="
).
append
(
segment7
);
sb
.
append
(
", segment8="
).
append
(
segment8
);
sb
.
append
(
", segment9="
).
append
(
segment9
);
sb
.
append
(
", segment10="
).
append
(
segment10
);
sb
.
append
(
", segment11="
).
append
(
segment11
);
sb
.
append
(
", segment12="
).
append
(
segment12
);
sb
.
append
(
", segment13="
).
append
(
segment13
);
sb
.
append
(
", segment14="
).
append
(
segment14
);
sb
.
append
(
", segment15="
).
append
(
segment15
);
sb
.
append
(
", segment16="
).
append
(
segment16
);
sb
.
append
(
", segment17="
).
append
(
segment17
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", organizationId="
).
append
(
organizationId
);
sb
.
append
(
", companyName="
).
append
(
companyName
);
sb
.
append
(
", period="
).
append
(
period
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
return
"AnalysisSales{"
+
"id="
+
id
+
", seqNo='"
+
seqNo
+
'\''
+
", segment1="
+
segment1
+
", segment2="
+
segment2
+
", segment3="
+
segment3
+
", segment4="
+
segment4
+
", segment5="
+
segment5
+
", segment6="
+
segment6
+
", segment7="
+
segment7
+
", segment8="
+
segment8
+
", segment9="
+
segment9
+
", segment10="
+
segment10
+
", segment11="
+
segment11
+
", segment12="
+
segment12
+
", segment13="
+
segment13
+
", segment14="
+
segment14
+
", segment15="
+
segment15
+
", segment16="
+
segment16
+
", segment17="
+
segment17
+
", segment18="
+
segment18
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", organizationId='"
+
organizationId
+
'\''
+
", companyName='"
+
companyName
+
'\''
+
", period="
+
period
+
'}'
;
}
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/dpo/ProjectAnaylsisDto.java
View file @
1874cb8f
...
...
@@ -10,13 +10,21 @@ public class ProjectAnaylsisDto {
private
String
reportId
;
private
String
projectId
;
private
Integer
period
;
private
String
orgId
;
private
String
templateName
;
private
String
serviceTypeId
;
public
Integer
getPeriod
()
{
return
period
;
}
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
public
String
getReportId
()
{
return
reportId
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/analysis/dao/AnalysisSalesMapper.xml
View file @
1874cb8f
...
...
@@ -6,8 +6,7 @@
WARNING - @mbg.generated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"seq_no"
jdbcType=
"VARCHAR"
property=
"seqNo"
/>
<result
column=
"segment_1"
jdbcType=
"DECIMAL"
property=
"segment1"
/>
<result
column=
"segment_2"
jdbcType=
"DECIMAL"
property=
"segment2"
/>
<result
column=
"segment_3"
jdbcType=
"DECIMAL"
property=
"segment3"
/>
...
...
@@ -25,6 +24,7 @@
<result
column=
"segment_15"
jdbcType=
"DECIMAL"
property=
"segment15"
/>
<result
column=
"segment_16"
jdbcType=
"DECIMAL"
property=
"segment16"
/>
<result
column=
"segment_17"
jdbcType=
"DECIMAL"
property=
"segment17"
/>
<result
column=
"segment_18"
jdbcType=
"DECIMAL"
property=
"segment18"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"organization_id"
jdbcType=
"VARCHAR"
property=
"organizationId"
/>
...
...
@@ -104,7 +104,7 @@
-->
id, seq_no, segment_1, segment_2, segment_3, segment_4, segment_5, segment_6, segment_7,
segment_8, segment_9, segment_10, segment_11, segment_12, segment_13, segment_14,
segment_15, segment_16, segment_17,
create_time, update_time, organization_id, company_name,
segment_15, segment_16, segment_17,
segment_18, create_time, update_time, organization_id, company_name,
period
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.analysis.entity.AnalysisSalesExample"
resultMap=
"BaseResultMap"
>
...
...
@@ -173,7 +173,7 @@
#{segment8,jdbcType=DECIMAL}, #{segment9,jdbcType=DECIMAL}, #{segment10,jdbcType=DECIMAL},
#{segment11,jdbcType=DECIMAL}, #{segment12,jdbcType=DECIMAL}, #{segment13,jdbcType=DECIMAL},
#{segment14,jdbcType=DECIMAL}, #{segment15,jdbcType=DECIMAL}, #{segment16,jdbcType=DECIMAL},
#{segment17,jdbcType=DECIMAL},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{segment17,jdbcType=DECIMAL},
#{segment17,jdbcType=DECIMAL}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{organizationId,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER}
)
</insert>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/analysis/dao/AnalysisTaxMapper.xml
View file @
1874cb8f
...
...
@@ -351,4 +351,52 @@
order by ${orderByClause}
</if>
</select>
<insert
id=
"insertBatch"
parameterType=
"java.util.List"
>
insert into analysis_tax
(
<include
refid=
"Base_Column_List"
/>
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<choose>
<when
test=
"item.id != null"
>
#{item.id,jdbcType=BIGINT},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.organizationId != null"
>
#{item.organizationId,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.companyName != null"
>
#{item.companyName,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER} ,
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.seqNo != null"
>
#{item.seqNo,jdbcType=VARCHAR},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.taxGroup != null"
>
#{item.taxGroup,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.taxAmount != null"
>
#{item.taxAmount,jdbcType=DECIMAL},
</when>
<otherwise>
0.000,
</otherwise>
</choose>
<choose>
<when
test=
"item.createTime != null"
>
#{item.createTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
<choose>
<when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
</trim>
</foreach>
;
SELECT 1 FROM DUAL;
</insert>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/AnalysisSalesExtendsMapper.xml
0 → 100644
View file @
1874cb8f
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"pwc.taxtech.atms.analysis.dao.AnalysisSalesMapper"
>
<insert
id=
"insertBatch"
parameterType=
"java.util.List"
>
insert into analysis_sales
(
<include
refid=
"Base_Column_List"
/>
)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<choose>
<when
test=
"item.id != null"
>
#{item.id,jdbcType=BIGINT},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.seqNo != null"
>
#{item.seqNo,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.segment1 != null"
>
#{item.segment1,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment2 != null"
>
#{item.segment2,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment3 != null"
>
#{item.segment3,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment4 != null"
>
#{item.segment4,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment5 != null"
>
#{item.segment5,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment6 != null"
>
#{item.segment6,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment7 != null"
>
#{item.segment7,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment8 != null"
>
#{item.segment8,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment9 != null"
>
#{item.segment9,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment10 != null"
>
#{item.segment10,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment11 != null"
>
#{item.segmen11,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment12 != null"
>
#{item.segment12,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment13 != null"
>
#{item.segment13,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment14 != null"
>
#{item.segment14,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment15 != null"
>
#{item.segment15,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment16 != null"
>
#{item.segment16,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment17 != null"
>
#{item.segment17,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.segment18 != null"
>
#{item.segment18,jdbcType=DECIMAL},
</when>
<otherwise>
0.0000,
</otherwise>
</choose>
<choose>
<when
test=
"item.createTime != null"
>
#{item.createTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
<choose>
<when
test=
"item.updateTime != null"
>
#{item.updateTime,jdbcType=TIMESTAMP},
</when>
<otherwise>
CURRENT_TIMESTAMP,
</otherwise>
</choose>
<choose>
<when
test=
"item.organizationId != null"
>
#{item.organizationId,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.companyName != null"
>
#{item.companyName,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER} ,
</when>
<otherwise>
0,
</otherwise>
</choose>
</trim>
</foreach>
;
SELECT 1 FROM DUAL;
</insert>
</mapper>
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/ProjectExtendsMapper.xml
View file @
1874cb8f
...
...
@@ -3,7 +3,8 @@
<mapper
namespace=
"pwc.taxtech.atms.dao.ProjectMapper"
>
<select
id=
"getTemlateWithServiceType"
resultType=
"pwc.taxtech.atms.dpo.ProjectAnaylsisDto"
>
select pp.id as reportId,p.id as projectId,p.organization_id as orgId,pst.service_type_id,t.name as templateName
select pp.id as reportId,p.id as projectId,p.organization_id as orgId,pst.service_type_id,t.name as templateName,
pp.period as period
from period_report pp
left join project p on
pp.project_id = p.id
...
...
@@ -38,4 +39,7 @@
</select>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/JournalEntryMapper.xml
View file @
1874cb8f
...
...
@@ -1322,9 +1322,7 @@
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<if
test=
"distinct"
>
distinct
</if>
<include
refid=
"Base_Column_List"
/>
from journal_entry
<if
test=
"_parameter != null"
>
...
...
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
View file @
1874cb8f
...
...
@@ -2287,7 +2287,7 @@
"Country"
:
"国家"
,
"Company"
:
"公司"
,
"CompanySimpleName"
:
"公司简称"
,
"SaveAnalysisData"
:
"是否保留原始数据?"
,
"DriverType"
:
"司机类型"
,
"FileExportSuccess"
:
"文件下载成功!"
,
"FileExportFailed"
:
"文件下载失败!"
,
...
...
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.ctrl.js
View file @
1874cb8f
...
...
@@ -678,19 +678,89 @@
$scope
.
selectCountry
=
e
.
currentTarget
[
clickedIndex
].
value
;
});
var
initContryList
=
function
()
{
var
initContryList
=
function
()
{
var
joinText
=
""
;
if
(
constant
.
countryCNList
)
{
for
(
var
i
=
0
;
i
<
constant
.
countryCNList
.
length
;
i
++
)
{
joinText
+=
"<option value ="
+
constant
.
countryCNList
[
i
]
+
" style ='text-align: left;' >"
+
constant
.
countryCNList
[
i
]
+
"</option>"
;
if
(
constant
.
countryCNList
)
{
for
(
var
i
=
0
;
i
<
constant
.
countryCNList
.
length
;
i
++
)
{
joinText
+=
"<option value ="
+
constant
.
countryCNList
[
i
]
+
" style ='text-align: left;' >"
+
constant
.
countryCNList
[
i
]
+
"</option>"
;
}
$
(
'#contryList'
).
html
(
joinText
);
$
(
'#contryList'
).
selectpicker
(
'refresh'
);
}
};
$
(
'#orgList'
).
on
(
'shown.bs.select'
,
function
()
{
$
(
'#orgList'
).
on
(
'shown.bs.select'
,
function
()
{
$
(
this
).
find
(
'.dropdown-menu'
).
width
(
"200px"
);
});
$scope
.
analysisInitData
=
function
()
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
'WarningTitle'
),
text
:
$translate
.
instant
(
'SaveAnalysisData'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'ConfirmYes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
showCloseButton
:
true
},
function
(
isConfirm
)
{
var
type
=
1
;
//默认保留原始数据
if
(
isConfirm
)
{
type
=
1
;
vatImportService
.
analysisInitData
(
type
).
success
(
function
(
res
)
{
if
(
res
.
resultMsg
)
{
SweetAlert
.
success
(
"分析数据初始化成功!"
+
'消耗'
+
Number
(
res
.
resultMsg
/
1000
)
+
"秒"
);
}
}).
error
(
function
(
error
)
{
SweetAlert
.
error
(
error
);
});
}
else
if
(
isConfirm
==
false
)
{
type
=
0
;
vatImportService
.
analysisInitData
(
type
).
success
(
function
(
res
)
{
if
(
res
.
resultMsg
)
{
SweetAlert
.
success
(
"分析数据初始化成功!"
+
'消耗'
+
Number
(
res
.
resultMsg
/
1000
)
+
"秒"
);
}
}).
error
(
function
(
error
)
{
SweetAlert
.
error
(
error
);
});
}
});
};
$scope
.
handleAnalysisData
=
function
()
{
SweetAlert
.
swal
({
title
:
$translate
.
instant
(
'WarningTitle'
),
text
:
$translate
.
instant
(
'SaveAnalysisData'
),
type
:
"warning"
,
showCancelButton
:
true
,
confirmButtonColor
:
"#DD6B55"
,
confirmButtonText
:
$translate
.
instant
(
'ConfirmYes'
),
cancelButtonText
:
$translate
.
instant
(
'No'
),
closeOnConfirm
:
true
,
showCloseButton
:
true
},
function
(
isConfirm
)
{
var
type
=
1
;
//默认保留原始数据
if
(
isConfirm
)
{
type
=
1
;
vatImportService
.
handleAnalysisData
(
type
).
success
(
function
(
res
)
{
if
(
res
.
resultMsg
)
{
SweetAlert
.
success
(
"手动加载分析模块数据成功!"
+
'消耗'
+
Number
(
res
.
resultMsg
)
+
"秒"
);
}
}).
error
(
function
(
error
)
{
SweetAlert
.
error
(
error
);
});
}
else
if
(
isConfirm
==
false
)
{
type
=
0
;
vatImportService
.
handleAnalysisData
(
type
).
success
(
function
(
res
)
{
if
(
res
.
resultMsg
)
{
SweetAlert
.
success
(
"手动加载分析模块数据成功!"
+
'消耗'
+
Number
(
res
.
resultMsg
)
+
"秒"
);
}
}).
error
(
function
(
error
)
{
SweetAlert
.
error
(
error
);
});
}
});
};
/*------------------------------------------------------------------------------------------------------------*/
//开始
...
...
atms-web/src/main/webapp/app/analysis/data-import/international-data-import/international-data-import.html
View file @
1874cb8f
...
...
@@ -121,7 +121,15 @@
</div>
</div>
</form>
<div
class=
"row"
>
<button
type=
"button"
class=
"btn btn-vat-primary col-sm-2"
style=
"margin-left: 20px!important; margin-top: 10px!important;display: none;"
ng-click=
"analysisInitData()"
>
数据初始化
</button>
<div
class=
""
></div>
<button
type=
"button"
class=
"btn btn-vat-primary col-sm-2"
style=
"margin-left: 20px!important; margin-top: 10px!important; display: none;"
ng-click=
"handleAnalysisData()"
>
(手动)加载按分析模块数据
</button>
</div>
<div
class=
"dt-init-wrapper"
>
<div
class=
"dx-viewport grid-container"
>
<div
id=
"internationalBUDataGridContainer"
dx-data-grid=
"internationalBUDataGridOptions"
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
1874cb8f
...
...
@@ -1104,7 +1104,7 @@
$scope
.
relation
.
loadSheet
(
$scope
.
templateId
);
return
;
}
vatReportService
.
getReportEbitData
(
$scope
.
reportId
,
$scope
.
relation
.
orgId
,
period
!=
undefined
?
period
:
(
$scope
.
relation
.
period
==
undefined
?
period
:
$scope
.
relation
.
period
)).
success
(
function
(
reportData
)
{
vatReportService
.
getReportEbitData
(
$scope
.
relation
.
orgId
,
period
!=
undefined
?
period
:
(
$scope
.
relation
.
period
==
undefined
?
period
:
$scope
.
relation
.
period
)).
success
(
function
(
reportData
)
{
if
(
reportData
&&
reportData
.
data
)
{
_
.
each
(
reportData
.
data
.
cellData
,
function
(
x
)
{
x
.
value
=
x
.
cellValue
;
...
...
@@ -1112,13 +1112,9 @@
});
$scope
.
relation
.
data
=
reportData
.
data
.
ebitData
;
$scope
.
reportData
=
reportData
.
data
.
cellData
;
$scope
.
formulaBlocks
=
reportData
.
data
.
formulaBlocks
;
$scope
.
manualDataSources
=
reportData
.
data
.
manualDataSources
;
$scope
.
relation
.
loadSheet
(
$scope
.
templateId
);
}
else
{
$scope
.
reportData
=
[];
$scope
.
formulaBlocks
=
[];
$scope
.
manualDataSources
=
[];
$scope
.
relation
.
data
=
[];
$scope
.
relation
.
loadSheet
(
$scope
.
templateId
);
}
...
...
@@ -1129,7 +1125,7 @@
//period = Number(period);
if
(
$scope
.
templateId
!==
undefined
)
{
//todo: according to templateId and period get reportId
period
=
Number
(
period
);
//转成Number类型
/*
period = Number(period);//转成Number类型
vatReportService.getReportByTemplateIdEbit($scope.templateId, period, orgId).success(function (report) {
if (report.data) {
$scope.reportId = report.data.id;
...
...
@@ -1139,7 +1135,8 @@
$scope.manualDataSources = [];
}
getReportData(period);
});
});*/
getReportData
(
period
);
}
};
$scope
.
periodChange
=
function
(
data
)
{
...
...
@@ -3090,10 +3087,9 @@
$scope
.
relation
.
addEbitRow
(
sheet
);
calculateEbitAndInsert
(
sheet
,
true
);
$scope
.
relation
.
lockCell
(
$scope
.
spread
);
$
(
'#busy-indicator-container'
).
hide
();
//关闭弹出层
spreadTODb
(
true
);
$
(
'#busy-indicator-container'
).
hide
(
);
spreadTODb
();
},
function
(
e
)
{
alert
(
e
.
errorMessage
);
if
(
e
.
errorCode
===
2
/*noPassword*/
||
e
.
errorCode
===
3
/*invalidPassword*/
)
{
...
...
@@ -3148,6 +3144,7 @@
sheet
.
setValue
(
42
,
2
,
$scope
.
_ebitResult
.
sixAddtax
);
sheet
.
setValue
(
43
,
2
,
$scope
.
_ebitResult
.
klzcjsz
);
}
}
$scope
.
singleExport
=
function
()
{
...
...
@@ -3174,6 +3171,7 @@
var
param
=
{
period
:
$scope
.
relation
.
period
,
templateId
:
$scope
.
templateId
}
/* $timeout(function () {
...
...
atms-web/src/main/webapp/app/common/vatservices/vatImportService.js
View file @
1874cb8f
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/common/vatservices/vatReportService.js
View file @
1874cb8f
...
...
@@ -60,9 +60,8 @@
getReportData
:
function
(
reportId
)
{
return
$http
.
get
(
'/Report/reportData/'
+
reportId
,
apiConfig
.
createVat
());
},
getReportEbitData
:
function
(
reportId
,
orgId
,
period
)
{
getReportEbitData
:
function
(
orgId
,
period
)
{
var
param
=
{
reportId
:
reportId
,
period
:
period
,
orgId
:
orgId
}
...
...
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