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
7aea0602
Commit
7aea0602
authored
Mar 13, 2019
by
chase
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
f3afdc1c
310468b7
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
13 deletions
+29
-13
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+1
-2
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+3
-0
FormulaAgent.java
.../java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
+21
-9
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-1
TABLESUMIF.java
...ch/atms/vat/service/impl/report/functions/TABLESUMIF.java
+1
-1
cit-calculate-data.ctrl.js
...t/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
+2
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
7aea0602
...
...
@@ -183,12 +183,11 @@ public class CitReportServiceImpl extends BaseService {
@Override
public
void
run
()
{
try
{
updateConfig
(
projectId
,
periodParam
,
isMergeManualData
,
templates
,
genJob
);
// TODO 进行数据校验
DataValidation
(
periodParam
,
projectId
,
genJob
);
updateConfig
(
projectId
,
periodParam
,
isMergeManualData
,
templates
,
genJob
);
PeriodResources
resources
=
reportGenerator
.
getPeriodResources
(
projectId
,
periodParam
,
templates
.
stream
().
map
(
Template:
:
getId
).
collect
(
Collectors
.
toList
()));
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
7aea0602
...
...
@@ -361,6 +361,9 @@ public class TemplateGroupServiceImpl extends AbstractService {
Row
row
=
temp
.
getRow
(
j
);
for
(
int
k
=
row
.
getFirstCellNum
();
k
<
row
.
getLastCellNum
();
k
++){
Cell
cell
=
row
.
getCell
(
k
);
if
(
cell
==
null
)
{
continue
;
//todo cell == null 如何处理
}
cell
.
setCellType
(
CellType
.
STRING
);
if
(!
cell
.
getCellStyle
().
getLocked
()
&&
"${KeyIn}"
.
equalsIgnoreCase
(
cell
.
getStringCellValue
())){
cell
.
setCellValue
(
""
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
View file @
7aea0602
...
...
@@ -174,7 +174,7 @@ public class FormulaAgent {
public
static
String
_buildSql
(
String
getField
,
String
tableName
,
String
filter
,
String
filterValue
,
Integer
period
,
FormulaContext
formulaContext
,
String
year
,
boolean
bool
)
throws
Exception
{
String
sql
=
"select "
+
getField
+
" from "
+
tableName
+
" where 1=1 and "
+
filter
+
filterValue
;
String
sql
=
"select
sum("
+
getField
+
") as
"
+
getField
+
" from "
+
tableName
+
" where 1=1 and "
+
filter
+
filterValue
;
String
_p
=
insertZero
(
formulaContext
.
getPeriod
()
-
Math
.
abs
(
period
));
String
_period
=
insertZero
(
formulaContext
.
getPeriod
());
String
per
=
insertZero
((
formulaContext
.
getPeriod
()
-
1
));
...
...
@@ -183,13 +183,13 @@ public class FormulaAgent {
sql
+=
" and tms_period = "
+
Integer
.
parseInt
(
year
+
_period
);
}
else
if
(
period
==
-
99
)
{
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
}
else
if
(
period
==
99
)
{
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
_period
);
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
_period
);
}
else
{
if
(
period
>
0
)
throw
new
Exception
(
"参数不正确"
);
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
_p
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
_p
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
}
}
if
(
bool
)
...
...
@@ -218,16 +218,28 @@ public class FormulaAgent {
formulaAgent
.
getTableDataByName
(
"CIT_TBAM"
,
"ending_balance"
,
"attribute"
,
"= '销售费用-财产损耗、盘亏及毁损损失'"
,
0
,
"2018"
,
formulaContext
);
}
public
double
getTableDataByName
(
String
tableName
,
String
getField
,
String
filter
,
String
filterValue
,
Integer
period
,
String
year
,
FormulaContext
formulaContext
)
{
List
<
Map
<
String
,
Object
>>
stringObjectMap
=
jdbcTemplate
.
queryForList
(
buildSql
(
TableRule
.
map
.
get
(
tableName
),
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
));
double
rev
=
0.00
;
for
(
int
i
=
0
,
j
=
stringObjectMap
.
size
();
i
<
j
;
i
++)
{
public
BigDecimal
getTableDataByName
(
String
tableName
,
String
getField
,
String
filter
,
String
filterValue
,
Integer
period
,
String
year
,
FormulaContext
formulaContext
)
{
Map
<
String
,
Object
>
stringObjectMap
=
jdbcTemplate
.
queryForMap
(
buildSql
(
TableRule
.
map
.
get
(
tableName
),
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
));
/* for (int i = 0, j = stringObjectMap.size(); i < j; i++) {
if (i == 1) {
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev = 0.00;
}else{
rev = Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
} else {
if(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField)) == null){
rev= rev+ 0.00;
}else{
rev = rev + Long.parseLong(String.valueOf(stringObjectMap.get(i).get(StringUtil.underline2Camel(getField))));
}
}
return
rev
;
}
*/
if
(
stringObjectMap
.
get
(
getField
)
!=
null
){
return
new
BigDecimal
(
stringObjectMap
.
get
(
getField
).
toString
());
}
return
new
BigDecimal
(
0
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
7aea0602
...
...
@@ -513,7 +513,7 @@ public class ReportGeneratorImpl {
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
PC
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
),
new
WPNAME
(
formulaContext
),
new
WPTYPE
(
formulaContext
),
new
SUM2
(
formulaContext
),
new
SUM
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
TABLESUMIF
(
formulaContext
)};
new
RSUMIF
(
formulaContext
),
new
TABLESUMIF
(
formulaContext
),
new
SUM
(
formulaContext
)};
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functions
,
functionImpls
);
UDFFinder
udfToolpack
=
new
AggregatingUDFFinder
(
udfs
);
workbook
.
addToolPack
(
udfToolpack
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/TABLESUMIF.java
View file @
7aea0602
...
...
@@ -56,7 +56,7 @@ public class TABLESUMIF extends FunctionBase implements FreeRefFunction {
String
filterValue
=
resolverString
(
args
,
ec
,
3
);
period
=
resolverInteger
(
args
,
ec
,
4
);
//会计期间
year
=
resolverString
(
args
,
ec
,
5
);
//会计年度
new
NumberEval
(
agent
.
getTableDataByName
(
tableName
,
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
));
new
NumberEval
(
agent
.
getTableDataByName
(
tableName
,
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
)
.
doubleValue
()
);
}
catch
(
EvaluationException
e
)
{
e
.
printStackTrace
();
return
new
NumberEval
(
0.00
);
...
...
atms-web/src/main/webapp/app/cit/reduction/cit-calculate-data/cit-calculate-data.ctrl.js
View file @
7aea0602
...
...
@@ -642,7 +642,9 @@ debugger;
}
var
getInitTaskStatus
=
function
(){
debugger
;
citReportService
.
getRunningJob
(
vatSessionService
.
project
.
id
,
0
).
then
(
function
(
result
)
{
debugger
;
if
(
result
.
data
&&
result
.
status
==
200
){
updateTasksStatus
(
result
.
data
);
if
(
result
.
data
.
jobStatus
==
'Begin'
||
result
.
data
.
jobStatus
==
'Running'
){
...
...
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