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
070c5ba1
Commit
070c5ba1
authored
Oct 09, 2018
by
neo.wang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle_neo' into 'dev_oracle'
Dev oracle neo See merge request root/atms!139
parents
a4a0b300
a2d938f7
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
61 additions
and
45 deletions
+61
-45
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+6
-2
FormulaParamConfigDto.java
...a/pwc/taxtech/atms/dto/formula/FormulaParamConfigDto.java
+0
-3
ReportService.java
...main/java/pwc/taxtech/atms/vat/service/ReportService.java
+2
-1
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+1
-1
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+5
-3
FormulaHelper.java
...atms/vat/service/impl/report/functions/FormulaHelper.java
+8
-7
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+1
-0
PeriodCellTemplateConfigMapper.java
.../taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.java
+4
-2
PeriodCellTemplateConfigExtendsMapper.xml
...vat/dao/extends/PeriodCellTemplateConfigExtendsMapper.xml
+6
-2
PeriodCellTemplateExtendsMapper.xml
.../atms/vat/dao/extends/PeriodCellTemplateExtendsMapper.xml
+2
-0
PeriodDataSourceExtendsMapper.xml
...ch/atms/vat/dao/extends/PeriodDataSourceExtendsMapper.xml
+26
-24
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
070c5ba1
...
@@ -79,8 +79,12 @@ public class ReportController {
...
@@ -79,8 +79,12 @@ public class ReportController {
}
}
@RequestMapping
(
value
=
"getCellTemplateConfig/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getCellTemplateConfig/{reportTemplateId}/{period}/{rowIndex}/{columnIndex}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
@PathVariable
Long
reportTemplateId
,
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
)
{
public
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
@PathVariable
Long
reportTemplateId
,
return
reportService
.
getCellTemplateConfig
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
);
@PathVariable
Integer
period
,
@PathVariable
int
rowIndex
,
@PathVariable
int
columnIndex
,
@RequestHeader
(
"from"
)
String
projectId
)
{
return
reportService
.
getCellTemplateConfig
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
,
projectId
);
}
}
@RequestMapping
(
value
=
"getStdAccountByIndustry/{industryId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getStdAccountByIndustry/{industryId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/formula/FormulaParamConfigDto.java
View file @
070c5ba1
package
pwc
.
taxtech
.
atms
.
dto
.
formula
;
package
pwc
.
taxtech
.
atms
.
dto
.
formula
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
java.util.List
;
import
java.util.List
;
public
class
FormulaParamConfigDto
{
public
class
FormulaParamConfigDto
{
@JsonProperty
(
"ID"
)
public
String
id
;
public
String
id
;
public
String
name
;
public
String
name
;
public
String
displayFormat
;
public
String
displayFormat
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/ReportService.java
View file @
070c5ba1
...
@@ -28,7 +28,8 @@ public interface ReportService {
...
@@ -28,7 +28,8 @@ public interface ReportService {
OperationResultDto
<
ReportDto
>
getReportByTemplate
(
Long
templateId
,
Integer
period
,
String
projectId
);
OperationResultDto
<
ReportDto
>
getReportByTemplate
(
Long
templateId
,
Integer
period
,
String
projectId
);
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
Long
reportTemplateId
,
Integer
periodParam
,
int
rowIndex
,
int
columnIndex
);
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
Long
reportTemplateId
,
Integer
periodParam
,
int
rowIndex
,
int
columnIndex
,
String
porjectId
);
OperationResultDto
<
List
<
VatEnterpriseAccount
>>
getStdAccountByIndustry
(
String
industryId
,
String
projectId
);
OperationResultDto
<
List
<
VatEnterpriseAccount
>>
getStdAccountByIndustry
(
String
industryId
,
String
projectId
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
070c5ba1
...
@@ -515,7 +515,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
...
@@ -515,7 +515,7 @@ public class ReportGeneratorImpl extends VatAbstractService implements ReportGen
}
}
List
<
PeriodCellTemplateConfigExtendDto
>
periodCellTemplateConfigExtendDtos
=
List
<
PeriodCellTemplateConfigExtendDto
>
periodCellTemplateConfigExtendDtos
=
periodCellTemplateConfigMapper
.
getPeriodCellTemplateConfigExtendDtos
(
templateIdList
,
period
);
periodCellTemplateConfigMapper
.
getPeriodCellTemplateConfigExtendDtos
(
templateIdList
,
period
,
projectId
);
fixedPCTParsedFormula
(
periodCellTemplateConfigExtendDtos
,
projectId
,
period
);
fixedPCTParsedFormula
(
periodCellTemplateConfigExtendDtos
,
projectId
,
period
);
List
<
CellCalcInfoDto
>
cellCalcInfoDtos
=
new
ArrayList
<>();
List
<
CellCalcInfoDto
>
cellCalcInfoDtos
=
new
ArrayList
<>();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
070c5ba1
...
@@ -686,7 +686,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
...
@@ -686,7 +686,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
}
}
@Override
@Override
public
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
Long
reportTemplateId
,
Integer
periodParam
,
int
rowIndex
,
int
columnIndex
)
{
public
OperationResultDto
<
PeriodCellTemplateConfig
>
getCellTemplateConfig
(
Long
reportTemplateId
,
Integer
periodParam
,
int
rowIndex
,
int
columnIndex
,
String
projectId
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
OperationResultDto
resultDto
=
new
OperationResultDto
();
try
{
try
{
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
int
period
=
periodParam
!=
null
?
periodParam
:
0
;
...
@@ -697,7 +698,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
...
@@ -697,7 +698,8 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
return
resultDto
;
return
resultDto
;
}
}
PeriodCellTemplateConfig
periodCellTemplateConfig
=
periodCellTemplateConfigMapper
.
getConfigWithReportTemplateId
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
);
PeriodCellTemplateConfig
periodCellTemplateConfig
=
periodCellTemplateConfigMapper
.
getConfigWithReportTemplateId
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
,
projectId
);
if
(
periodCellTemplateConfig
==
null
)
{
if
(
periodCellTemplateConfig
==
null
)
{
resultDto
.
setResult
(
false
);
resultDto
.
setResult
(
false
);
resultDto
.
setResultMsg
(
"no config for this template!"
);
resultDto
.
setResultMsg
(
"no config for this template!"
);
...
@@ -746,7 +748,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
...
@@ -746,7 +748,7 @@ public class ReportServiceImpl extends VatAbstractService implements ReportServi
int
period
=
periodParam
==
null
?
0
:
periodParam
;
int
period
=
periodParam
==
null
?
0
:
periodParam
;
PeriodCellTemplateConfig
periodCellTemplateConfig
=
PeriodCellTemplateConfig
periodCellTemplateConfig
=
periodCellTemplateConfigMapper
.
getConfigWithReportTemplateId
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
);
periodCellTemplateConfigMapper
.
getConfigWithReportTemplateId
(
reportTemplateId
,
period
,
rowIndex
,
columnIndex
,
projectId
);
if
(
periodCellTemplateConfig
==
null
||
StringUtils
.
isBlank
(
periodCellTemplateConfig
.
getAccountCodes
()))
{
if
(
periodCellTemplateConfig
==
null
||
StringUtils
.
isBlank
(
periodCellTemplateConfig
.
getAccountCodes
()))
{
resultDto
.
setResult
(
false
);
resultDto
.
setResult
(
false
);
return
resultDto
;
return
resultDto
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FormulaHelper.java
View file @
070c5ba1
...
@@ -113,13 +113,14 @@ public class FormulaHelper {
...
@@ -113,13 +113,14 @@ public class FormulaHelper {
return
rtn
;
return
rtn
;
}
}
public
static
Long
getCellTemplateIdWithTemplateCodeAndColumnIndexAndRowIndex
(
String
templateCode
,
int
columnIndex
,
int
rowIndex
,
int
period
,
FormulaContext
formulaContext
)
{
public
static
Long
getCellTemplateIdWithTemplateCodeAndColumnIndexAndRowIndex
(
String
templateCode
,
int
columnIndex
,
int
rowIndex
,
int
period
,
FormulaContext
formulaContext
)
{
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"code"
,
templateCode
);
map
.
put
(
"code"
,
templateCode
);
map
.
put
(
"templateGroupId"
,
formulaContext
.
getReportTemplateGroupId
());
map
.
put
(
"templateGroupId"
,
formulaContext
.
getReportTemplateGroupId
());
map
.
put
(
"period"
,
period
);
map
.
put
(
"period"
,
period
);
map
.
put
(
"columnIndex"
,
columnIndex
);
map
.
put
(
"columnIndex"
,
columnIndex
);
map
.
put
(
"rowIndex"
,
rowIndex
);
map
.
put
(
"rowIndex"
,
rowIndex
);
map
.
put
(
"projectId"
,
formulaContext
.
getProjectId
());
return
SpringContextUtil
.
periodCellTemplateMapper
.
getCellTemplateIdWithMap
(
map
);
return
SpringContextUtil
.
periodCellTemplateMapper
.
getCellTemplateIdWithMap
(
map
);
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
070c5ba1
...
@@ -110,6 +110,7 @@ public class FunctionBase {
...
@@ -110,6 +110,7 @@ public class FunctionBase {
map
.
put
(
"period"
,
period
);
map
.
put
(
"period"
,
period
);
map
.
put
(
"columnIndex"
,
colNum
);
map
.
put
(
"columnIndex"
,
colNum
);
map
.
put
(
"rowIndex"
,
rowNum
);
map
.
put
(
"rowIndex"
,
rowNum
);
map
.
put
(
"projectId"
,
projectId
);
Long
periodCellTemplateId
=
SpringContextUtil
.
periodCellTemplateMapper
.
getCellTemplateIdWithMap
(
map
);
Long
periodCellTemplateId
=
SpringContextUtil
.
periodCellTemplateMapper
.
getCellTemplateIdWithMap
(
map
);
Date
creatime
=
new
Date
();
Date
creatime
=
new
Date
();
...
...
atms-dao/src/main/java/pwc/taxtech/atms/vat/dao/PeriodCellTemplateConfigMapper.java
View file @
070c5ba1
...
@@ -110,10 +110,11 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
...
@@ -110,10 +110,11 @@ public interface PeriodCellTemplateConfigMapper extends MyVatMapper {
void
batchInsert
(
List
<
PeriodCellTemplateConfig
>
list
);
void
batchInsert
(
List
<
PeriodCellTemplateConfig
>
list
);
List
<
PeriodCellTemplateConfigExtendDto
>
getPeriodCellTemplateConfigExtendDtos
(
@Param
(
"list"
)
List
<
Long
>
list
,
@Param
(
"period"
)
Integer
period
);
List
<
PeriodCellTemplateConfigExtendDto
>
getPeriodCellTemplateConfigExtendDtos
(
@Param
(
"list"
)
List
<
Long
>
list
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"projectId"
)
String
projectId
);
PeriodCellTemplateConfig
getConfigWithReportTemplateId
(
@Param
(
"reportTemplateId"
)
Long
reportTemplateId
,
PeriodCellTemplateConfig
getConfigWithReportTemplateId
(
@Param
(
"reportTemplateId"
)
Long
reportTemplateId
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"rowIndex"
)
int
rowIndex
,
@Param
(
"period"
)
Integer
period
,
@Param
(
"rowIndex"
)
int
rowIndex
,
@Param
(
"columnIndex"
)
int
columnIndex
);
@Param
(
"columnIndex"
)
int
columnIndex
,
@Param
(
"projectId"
)
String
projectId
);
}
}
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellTemplateConfigExtendsMapper.xml
View file @
070c5ba1
...
@@ -202,6 +202,7 @@
...
@@ -202,6 +202,7 @@
(
(
CELL_TEMPLATE.CELL_TEMPLATE_ID = CONFIG.CELL_TEMPLATE_ID
CELL_TEMPLATE.CELL_TEMPLATE_ID = CONFIG.CELL_TEMPLATE_ID
AND CELL_TEMPLATE.PERIOD = CONFIG.PERIOD
AND CELL_TEMPLATE.PERIOD = CONFIG.PERIOD
AND CELL_TEMPLATE.PROJECT_ID = CONFIG.PROJECT_ID
)
)
WHERE
WHERE
CELL_TEMPLATE.REPORT_TEMPLATE_ID IN
CELL_TEMPLATE.REPORT_TEMPLATE_ID IN
...
@@ -209,6 +210,7 @@
...
@@ -209,6 +210,7 @@
#{item}
#{item}
</foreach>
</foreach>
AND CELL_TEMPLATE.PERIOD = #{period,jdbcType=INTEGER}
AND CELL_TEMPLATE.PERIOD = #{period,jdbcType=INTEGER}
AND CELL_TEMPLATE.PROJECT_ID = #{projectId,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getConfigWithReportTemplateId"
resultType=
"pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig"
>
<select
id=
"getConfigWithReportTemplateId"
resultType=
"pwc.taxtech.atms.vat.entity.PeriodCellTemplateConfig"
>
...
@@ -221,14 +223,15 @@
...
@@ -221,14 +223,15 @@
JOIN
JOIN
PERIOD_CELL_TEMPLATE_CONFIG CTC
PERIOD_CELL_TEMPLATE_CONFIG CTC
ON
ON
CT.CELL_TEMPLATE_ID = CTC.CELL_TEMPLATE_ID
CT.CELL_TEMPLATE_ID = CTC.CELL_TEMPLATE_ID
AND CT.PROJECT_ID=CTC.PROJECT_ID
WHERE
WHERE
CT.REPORT_TEMPLATE_ID = #{reportTemplateId,jdbcType=BIGINT}
CT.REPORT_TEMPLATE_ID = #{reportTemplateId,jdbcType=BIGINT}
AND CT.ROW_INDEX = #{rowIndex,jdbcType = INTEGER}
AND CT.ROW_INDEX = #{rowIndex,jdbcType = INTEGER}
AND CT.COLUMN_INDEX = #{columnIndex,jdbcType = INTEGER}
AND CT.COLUMN_INDEX = #{columnIndex,jdbcType = INTEGER}
AND CT.PERIOD = #{period,jdbcType = INTEGER}
AND CT.PERIOD = #{period,jdbcType = INTEGER}
AND CTC.DATA_SOURCE_TYPE = 2
AND CTC.DATA_SOURCE_TYPE = 2
AND CTC.PERIOD= #{period,jdbcType = INTEGER} LIMIT 1
AND CTC.PERIOD= #{period,jdbcType = INTEGER} AND ROWNUM = 1
AND CT.PROJECT_ID = #{projectId,jdbcType=VARCHAR}
</select>
</select>
</mapper>
</mapper>
\ No newline at end of file
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodCellTemplateExtendsMapper.xml
View file @
070c5ba1
...
@@ -96,6 +96,8 @@
...
@@ -96,6 +96,8 @@
AND A.COLUMN_INDEX = #{columnIndex,jdbcType=INTEGER}
AND A.COLUMN_INDEX = #{columnIndex,jdbcType=INTEGER}
AND A.ROW_INDEX = #{rowIndex,jdbcType=INTEGER}
AND A.ROW_INDEX = #{rowIndex,jdbcType=INTEGER}
AND A.PERIOD = #{period,jdbcType=INTEGER}
AND A.PERIOD = #{period,jdbcType=INTEGER}
AND A.PROJECT_ID=#{projectId,jdbcType=VARCHAR}
AND B.PROJECT_ID=#{projectId,jdbcType=VARCHAR}
</select>
</select>
<select
id=
"getDataType"
resultType=
"java.lang.Integer"
>
<select
id=
"getDataType"
resultType=
"java.lang.Integer"
>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/PeriodDataSourceExtendsMapper.xml
View file @
070c5ba1
...
@@ -247,28 +247,30 @@
...
@@ -247,28 +247,30 @@
</resultMap>
</resultMap>
<select
id=
"getFormulaDataSource"
parameterType=
"java.lang.Long"
resultMap=
"DataSourceExtendDtoMap"
>
<select
id=
"getFormulaDataSource"
parameterType=
"java.lang.Long"
resultMap=
"DataSourceExtendDtoMap"
>
SELECT
SELECT
DS.*,
DS.*,
CDS.OPERATION_TYPE AS OPERATION_TYPE,
CDS.OPERATION_TYPE AS OPERATION_TYPE,
CD.CELL_TEMPLATE_ID AS CELL_TEMPLATE_ID,
CD.CELL_TEMPLATE_ID AS CELL_TEMPLATE_ID,
CD.ID AS CELL_DATA_ID,
CD.ID AS CELL_DATA_ID,
RPT.TEMPLATE_ID AS REPORT_TEMPLATE_ID
RPT.TEMPLATE_ID AS REPORT_TEMPLATE_ID
FROM
FROM
PERIOD_DATA_SOURCE DS
PERIOD_DATA_SOURCE DS
JOIN
JOIN
PERIOD_CELL_DATA_SOURCE CDS
PERIOD_CELL_DATA_SOURCE CDS
ON
ON
DS.ID = CDS.DATA_SOURCE_ID
DS.ID = CDS.DATA_SOURCE_ID AND DS.PROJECT_ID=CDS.PROJECT_ID
JOIN
JOIN
PERIOD_CELL_DATA CD
PERIOD_CELL_DATA CD
ON
ON
CDS.CELL_DATA_ID = CD.ID
CDS.CELL_DATA_ID = CD.ID
JOIN
AND CDS.PROJECT_ID=CD.PROJECT_ID
PERIOD_REPORT RPT
JOIN
ON
PERIOD_REPORT RPT
CD.REPORT_ID= RPT.ID
ON
WHERE
CD.REPORT_ID= RPT.ID
CD.REPORT_ID = #{reportID,jdbcType=BIGINT}
AND CD.PROJECT_ID=RPT.PROJECT_ID
WHERE
CD.REPORT_ID = #{reportID,jdbcType=BIGINT}
<!--AND <![CDATA[ ds.type <> 1]]>-->
<!--AND <![CDATA[ ds.type <> 1]]>-->
</select>
</select>
...
@@ -298,7 +300,7 @@
...
@@ -298,7 +300,7 @@
JOIN
JOIN
PERIOD_DATA_SOURCE DS
PERIOD_DATA_SOURCE DS
ON
ON
CDS.DATA_SOURCE_ID = DS.ID
CDS.DATA_SOURCE_ID = DS.ID
AND CDS.PROJECT_ID = DS.PROJECT_ID
WHERE
WHERE
DS.TYPE = 10
DS.TYPE = 10
AND CDS.CELL_DATA_ID = #{cellDataID,jdbcType=BIGINT}
AND CDS.CELL_DATA_ID = #{cellDataID,jdbcType=BIGINT}
...
@@ -332,7 +334,7 @@
...
@@ -332,7 +334,7 @@
JOIN
JOIN
PERIOD_CELL_DATA_SOURCE CELLDATASOURCE
PERIOD_CELL_DATA_SOURCE CELLDATASOURCE
ON
ON
CELLDATA.ID = CELLDATASOURCE.CELL_DATA_ID
CELLDATA.ID = CELLDATASOURCE.CELL_DATA_ID
AND CELLDATA.PROJECT_ID = CELLDATASOURCE.PROJECT_ID
WHERE
WHERE
CELLDATASOURCE.DATA_SOURCE_ID = #{dataSourceID,jdbcType=BIGINT} LIMIT 1
CELLDATASOURCE.DATA_SOURCE_ID = #{dataSourceID,jdbcType=BIGINT} LIMIT 1
</select>
</select>
...
...
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