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
ec72a43d
Commit
ec72a43d
authored
May 30, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add apis for report configuration function
parent
8622b313
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
464 additions
and
178 deletions
+464
-178
ApplyScope.java
...main/java/pwc/taxtech/atms/constant/enums/ApplyScope.java
+17
-0
CellTemplateController.java
...a/pwc/taxtech/atms/controller/CellTemplateController.java
+6
-0
RuleEngineeConfigController.java
.../taxtech/atms/controller/RuleEngineeConfigController.java
+2
-2
TemplateGroupController.java
.../pwc/taxtech/atms/controller/TemplateGroupController.java
+12
-4
ModelConfigMapper.java
...src/main/java/pwc/taxtech/atms/dao/ModelConfigMapper.java
+5
-2
CellTemplateConfigDto.java
...main/java/pwc/taxtech/atms/dto/CellTemplateConfigDto.java
+97
-96
KeyValueConfigDisplayDto.java
...n/java/pwc/taxtech/atms/dto/KeyValueConfigDisplayDto.java
+37
-36
CellTemplateService.java
...in/java/pwc/taxtech/atms/service/CellTemplateService.java
+2
-0
RuleEngineeConfigService.java
...va/pwc/taxtech/atms/service/RuleEngineeConfigService.java
+2
-2
TemplateGroupService.java
...n/java/pwc/taxtech/atms/service/TemplateGroupService.java
+5
-2
AbstractService.java
...n/java/pwc/taxtech/atms/service/impl/AbstractService.java
+2
-0
CellTemplateServiceImpl.java
...wc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
+222
-11
KeyValueConfigServiceImpl.java
.../taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
+2
-2
ModelConfigurationServiceImpl.java
...tech/atms/service/impl/ModelConfigurationServiceImpl.java
+6
-1
RuleEngineeConfigServiceImpl.java
...xtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
+2
-2
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+29
-2
ModelConfigMapper.xml
...main/resources/pwc/taxtech/atms/dao/ModelConfigMapper.xml
+16
-16
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/ApplyScope.java
0 → 100644
View file @
ec72a43d
package
pwc
.
taxtech
.
atms
.
constant
.
enums
;
public
enum
ApplyScope
{
FinancialStatement
(
1
),
TaxReturn
(
2
),
AnalyticsModel
(
3
);
private
Integer
code
;
ApplyScope
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Integer
getCode
()
{
return
code
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/CellTemplateController.java
View file @
ec72a43d
...
@@ -53,4 +53,10 @@ public class CellTemplateController {
...
@@ -53,4 +53,10 @@ public class CellTemplateController {
return
new
OperationResultDto
<>();
return
new
OperationResultDto
<>();
}
}
@RequestMapping
(
value
=
"config"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResultDto
PostConfig
(
@RequestBody
CellTemplateConfigDto
cellTemplateConfigDto
){
return
cellTemplateService
.
saveOrEdit
(
cellTemplateConfigDto
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/RuleEngineeConfigController.java
View file @
ec72a43d
...
@@ -31,7 +31,7 @@ public class RuleEngineeConfigController {
...
@@ -31,7 +31,7 @@ public class RuleEngineeConfigController {
@RequestMapping
(
value
=
"taxPayerReportMapping"
,
method
=
RequestMethod
.
GET
)
@RequestMapping
(
value
=
"taxPayerReportMapping"
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
TaxPayerReportRuleDto
>
GetTaxPayerReportMapping
()
{
public
@ResponseBody
List
<
TaxPayerReportRuleDto
>
GetTaxPayerReportMapping
()
{
logger
.
debug
(
"RuleEngineeConfigController GetTaxPayerReportMapping"
);
logger
.
debug
(
"RuleEngineeConfigController GetTaxPayerReportMapping"
);
return
ruleEngineeConfigService
.
G
etTaxPayerReportMapping
();
return
ruleEngineeConfigService
.
g
etTaxPayerReportMapping
();
}
}
@ApiOperation
(
value
=
"Get TaxRuleSetting"
,
notes
=
"Return TaxRuleSetting"
)
@ApiOperation
(
value
=
"Get TaxRuleSetting"
,
notes
=
"Return TaxRuleSetting"
)
...
@@ -39,7 +39,7 @@ public class RuleEngineeConfigController {
...
@@ -39,7 +39,7 @@ public class RuleEngineeConfigController {
public
@ResponseBody
List
<
TaxRuleSettingDto
>
GetTaxRuleSetting
()
public
@ResponseBody
List
<
TaxRuleSettingDto
>
GetTaxRuleSetting
()
{
{
logger
.
debug
(
"RuleEngineeConfigController GetTaxRuleSetting"
);
logger
.
debug
(
"RuleEngineeConfigController GetTaxRuleSetting"
);
return
ruleEngineeConfigService
.
G
etTaxRuleSetting
();
return
ruleEngineeConfigService
.
g
etTaxRuleSetting
();
}
}
@ApiOperation
(
value
=
""
,
notes
=
""
)
@ApiOperation
(
value
=
""
,
notes
=
""
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateGroupController.java
View file @
ec72a43d
...
@@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
...
@@ -6,6 +6,7 @@ import org.slf4j.LoggerFactory;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
pwc.taxtech.atms.service.TemplateGroupService
;
import
pwc.taxtech.atms.service.TemplateGroupService
;
...
@@ -22,16 +23,23 @@ public class TemplateGroupController {
...
@@ -22,16 +23,23 @@ public class TemplateGroupController {
@ApiOperation
(
value
=
"获取所有的模板分组"
)
@ApiOperation
(
value
=
"获取所有的模板分组"
)
@RequestMapping
(
value
=
"getall"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getall"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
public
@ResponseBody
List
<
TemplateGroupDto
>
G
et
()
{
List
<
TemplateGroupDto
>
g
et
()
{
logger
.
debug
(
"TemplateGroupController Get"
);
logger
.
debug
(
"TemplateGroupController Get"
);
return
templateGroupService
.
G
et
();
return
templateGroupService
.
g
et
();
}
}
@ApiOperation
(
value
=
"根据服务类型和行业获取模板分组"
)
@ApiOperation
(
value
=
"根据服务类型和行业获取模板分组"
)
@RequestMapping
(
value
=
"getByIndustry/{serviceTypeID}/{industryID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getByIndustry/{serviceTypeID}/{industryID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
public
@ResponseBody
List
<
TemplateGroupDto
>
getTemplateGroupByIndustry
(
@PathVariable
int
serviceTypeID
,
@RequestParam
Integer
taxPayType
,
@PathVariable
String
industryID
)
{
List
<
TemplateGroupDto
>
getTemplateGroupByIndustry
(
@PathVariable
int
serviceTypeID
,
@RequestParam
Integer
taxPayType
,
@PathVariable
String
industryID
)
{
return
templateGroupService
.
G
et
(
serviceTypeID
,
taxPayType
,
industryID
);
return
templateGroupService
.
g
et
(
serviceTypeID
,
taxPayType
,
industryID
);
}
}
@RequestMapping
(
value
=
"updateTemplateGroupName"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResultDto
<
Object
>
updateTemplateGroupName
(
TemplateGroupDto
templateGroupDto
)
{
return
templateGroupService
.
updateTemplateGroupName
(
templateGroupDto
);
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/dao/ModelConfigMapper.java
View file @
ec72a43d
package
pwc
.
taxtech
.
atms
.
dao
;
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
org.apache.ibatis.session.RowBounds
;
...
@@ -9,6 +8,9 @@ import pwc.taxtech.atms.dto.ModelProfileDto;
...
@@ -9,6 +8,9 @@ import pwc.taxtech.atms.dto.ModelProfileDto;
import
pwc.taxtech.atms.entitiy.ModelConfig
;
import
pwc.taxtech.atms.entitiy.ModelConfig
;
import
pwc.taxtech.atms.entitiy.ModelConfigExample
;
import
pwc.taxtech.atms.entitiy.ModelConfigExample
;
import
java.util.List
;
import
java.util.Map
;
@Mapper
@Mapper
public
interface
ModelConfigMapper
extends
MyMapper
{
public
interface
ModelConfigMapper
extends
MyMapper
{
/**
/**
...
@@ -107,5 +109,5 @@ public interface ModelConfigMapper extends MyMapper {
...
@@ -107,5 +109,5 @@ public interface ModelConfigMapper extends MyMapper {
*/
*/
int
updateByPrimaryKey
(
ModelConfig
record
);
int
updateByPrimaryKey
(
ModelConfig
record
);
List
<
ModelProfileDto
>
GetModelListByIndustry
(
@Param
(
"serviceTypeID"
)
String
serviceTypeID
,
@Param
(
"industryID"
)
String
industryID
);
List
<
ModelProfileDto
>
GetModelListByIndustry
(
Map
<
String
,
Object
>
map
);
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/dto/CellTemplateConfigDto.java
View file @
ec72a43d
...
@@ -4,274 +4,275 @@ import java.util.List;
...
@@ -4,274 +4,275 @@ import java.util.List;
public
class
CellTemplateConfigDto
{
public
class
CellTemplateConfigDto
{
private
String
CellTemplateID
;
private
String
cellTemplateID
;
private
String
TemplateID
;
private
String
templateID
;
private
int
RowIndex
;
private
int
rowIndex
;
private
String
RowName
;
private
String
rowName
;
private
int
ColumnIndex
;
private
int
columnIndex
;
private
String
ColumnName
;
private
String
columnName
;
private
Integer
DataType
;
private
Integer
dataType
;
private
Integer
IsReadOnly
;
private
Integer
isReadOnly
;
private
boolean
HasFormula
;
private
boolean
hasFormula
;
private
String
Formula
;
private
String
formula
;
private
String
ParsedFormula
;
private
String
parsedFormula
;
private
String
FormulaDescription
;
private
String
formulaDescription
;
private
boolean
HasVoucher
;
private
boolean
hasVoucher
;
private
List
<
String
>
AccountCodes
;
private
List
<
String
>
accountCodes
;
private
boolean
HasInvoice
;
private
boolean
hasInvoice
;
private
Integer
InvoiceType
;
private
Integer
invoiceType
;
private
List
<
String
>
TaxRate
;
private
List
<
String
>
taxRate
;
private
boolean
HasKeyIn
;
private
boolean
hasKeyIn
;
private
String
Creator
;
private
String
creator
;
private
String
Updater
;
private
String
updater
;
private
Integer
InvoiceAmountType
;
private
Integer
invoiceAmountType
;
private
boolean
HasModel
;
private
boolean
hasModel
;
private
List
<
String
>
ModelIDs
;
private
List
<
String
>
modelIDs
;
private
List
<
Integer
>
InvoiceCategory
;
private
List
<
Integer
>
invoiceCategory
;
private
String
FormulaDataSource
;
private
String
formulaDataSource
;
private
boolean
HasValidation
;
private
boolean
hasValidation
;
private
String
Validation
;
private
String
validation
;
private
String
ParsedValidation
;
private
String
parsedValidation
;
private
String
ValidationDescription
;
private
String
validationDescription
;
private
String
VoucherKeyword
;
private
String
voucherKeyword
;
public
String
getCellTemplateID
()
{
public
String
getCellTemplateID
()
{
return
C
ellTemplateID
;
return
c
ellTemplateID
;
}
}
public
void
setCellTemplateID
(
String
cellTemplateID
)
{
public
void
setCellTemplateID
(
String
cellTemplateID
)
{
C
ellTemplateID
=
cellTemplateID
;
this
.
c
ellTemplateID
=
cellTemplateID
;
}
}
public
String
getTemplateID
()
{
public
String
getTemplateID
()
{
return
T
emplateID
;
return
t
emplateID
;
}
}
public
void
setTemplateID
(
String
templateID
)
{
public
void
setTemplateID
(
String
templateID
)
{
T
emplateID
=
templateID
;
this
.
t
emplateID
=
templateID
;
}
}
public
int
getRowIndex
()
{
public
int
getRowIndex
()
{
return
R
owIndex
;
return
r
owIndex
;
}
}
public
void
setRowIndex
(
int
rowIndex
)
{
public
void
setRowIndex
(
int
rowIndex
)
{
R
owIndex
=
rowIndex
;
this
.
r
owIndex
=
rowIndex
;
}
}
public
String
getRowName
()
{
public
String
getRowName
()
{
return
R
owName
;
return
r
owName
;
}
}
public
void
setRowName
(
String
rowName
)
{
public
void
setRowName
(
String
rowName
)
{
R
owName
=
rowName
;
this
.
r
owName
=
rowName
;
}
}
public
int
getColumnIndex
()
{
public
int
getColumnIndex
()
{
return
C
olumnIndex
;
return
c
olumnIndex
;
}
}
public
void
setColumnIndex
(
int
columnIndex
)
{
public
void
setColumnIndex
(
int
columnIndex
)
{
C
olumnIndex
=
columnIndex
;
this
.
c
olumnIndex
=
columnIndex
;
}
}
public
String
getColumnName
()
{
public
String
getColumnName
()
{
return
C
olumnName
;
return
c
olumnName
;
}
}
public
void
setColumnName
(
String
columnName
)
{
public
void
setColumnName
(
String
columnName
)
{
C
olumnName
=
columnName
;
this
.
c
olumnName
=
columnName
;
}
}
public
Integer
getDataType
()
{
public
Integer
getDataType
()
{
return
D
ataType
;
return
d
ataType
;
}
}
public
void
setDataType
(
Integer
dataType
)
{
public
void
setDataType
(
Integer
dataType
)
{
D
ataType
=
dataType
;
this
.
d
ataType
=
dataType
;
}
}
public
Integer
getIsReadOnly
()
{
public
Integer
getIsReadOnly
()
{
return
I
sReadOnly
;
return
i
sReadOnly
;
}
}
public
void
setIsReadOnly
(
Integer
isReadOnly
)
{
public
void
setIsReadOnly
(
Integer
isReadOnly
)
{
I
sReadOnly
=
isReadOnly
;
this
.
i
sReadOnly
=
isReadOnly
;
}
}
public
boolean
is
HasFormula
()
{
public
boolean
get
HasFormula
()
{
return
H
asFormula
;
return
h
asFormula
;
}
}
public
void
setHasFormula
(
boolean
hasFormula
)
{
public
void
setHasFormula
(
boolean
hasFormula
)
{
H
asFormula
=
hasFormula
;
this
.
h
asFormula
=
hasFormula
;
}
}
public
String
getFormula
()
{
public
String
getFormula
()
{
return
F
ormula
;
return
f
ormula
;
}
}
public
void
setFormula
(
String
formula
)
{
public
void
setFormula
(
String
formula
)
{
F
ormula
=
formula
;
this
.
f
ormula
=
formula
;
}
}
public
String
getParsedFormula
()
{
public
String
getParsedFormula
()
{
return
P
arsedFormula
;
return
p
arsedFormula
;
}
}
public
void
setParsedFormula
(
String
parsedFormula
)
{
public
void
setParsedFormula
(
String
parsedFormula
)
{
P
arsedFormula
=
parsedFormula
;
this
.
p
arsedFormula
=
parsedFormula
;
}
}
public
String
getFormulaDescription
()
{
public
String
getFormulaDescription
()
{
return
F
ormulaDescription
;
return
f
ormulaDescription
;
}
}
public
void
setFormulaDescription
(
String
formulaDescription
)
{
public
void
setFormulaDescription
(
String
formulaDescription
)
{
F
ormulaDescription
=
formulaDescription
;
this
.
f
ormulaDescription
=
formulaDescription
;
}
}
public
boolean
is
HasVoucher
()
{
public
boolean
get
HasVoucher
()
{
return
H
asVoucher
;
return
h
asVoucher
;
}
}
public
void
setHasVoucher
(
boolean
hasVoucher
)
{
public
void
setHasVoucher
(
boolean
hasVoucher
)
{
H
asVoucher
=
hasVoucher
;
this
.
h
asVoucher
=
hasVoucher
;
}
}
public
List
<
String
>
getAccountCodes
()
{
public
List
<
String
>
getAccountCodes
()
{
return
A
ccountCodes
;
return
a
ccountCodes
;
}
}
public
void
setAccountCodes
(
List
<
String
>
accountCodes
)
{
public
void
setAccountCodes
(
List
<
String
>
accountCodes
)
{
A
ccountCodes
=
accountCodes
;
this
.
a
ccountCodes
=
accountCodes
;
}
}
public
boolean
is
HasInvoice
()
{
public
boolean
get
HasInvoice
()
{
return
H
asInvoice
;
return
h
asInvoice
;
}
}
public
void
setHasInvoice
(
boolean
hasInvoice
)
{
public
void
setHasInvoice
(
boolean
hasInvoice
)
{
H
asInvoice
=
hasInvoice
;
this
.
h
asInvoice
=
hasInvoice
;
}
}
public
Integer
getInvoiceType
()
{
public
Integer
getInvoiceType
()
{
return
I
nvoiceType
;
return
i
nvoiceType
;
}
}
public
void
setInvoiceType
(
Integer
invoiceType
)
{
public
void
setInvoiceType
(
Integer
invoiceType
)
{
I
nvoiceType
=
invoiceType
;
this
.
i
nvoiceType
=
invoiceType
;
}
}
public
List
<
String
>
getTaxRate
()
{
public
List
<
String
>
getTaxRate
()
{
return
T
axRate
;
return
t
axRate
;
}
}
public
void
setTaxRate
(
List
<
String
>
taxRate
)
{
public
void
setTaxRate
(
List
<
String
>
taxRate
)
{
T
axRate
=
taxRate
;
this
.
t
axRate
=
taxRate
;
}
}
public
boolean
is
HasKeyIn
()
{
public
boolean
get
HasKeyIn
()
{
return
H
asKeyIn
;
return
h
asKeyIn
;
}
}
public
void
setHasKeyIn
(
boolean
hasKeyIn
)
{
public
void
setHasKeyIn
(
boolean
hasKeyIn
)
{
H
asKeyIn
=
hasKeyIn
;
this
.
h
asKeyIn
=
hasKeyIn
;
}
}
public
String
getCreator
()
{
public
String
getCreator
()
{
return
C
reator
;
return
c
reator
;
}
}
public
void
setCreator
(
String
creator
)
{
public
void
setCreator
(
String
creator
)
{
C
reator
=
creator
;
this
.
c
reator
=
creator
;
}
}
public
String
getUpdater
()
{
public
String
getUpdater
()
{
return
U
pdater
;
return
u
pdater
;
}
}
public
void
setUpdater
(
String
updater
)
{
public
void
setUpdater
(
String
updater
)
{
U
pdater
=
updater
;
this
.
u
pdater
=
updater
;
}
}
public
Integer
getInvoiceAmountType
()
{
public
Integer
getInvoiceAmountType
()
{
return
I
nvoiceAmountType
;
return
i
nvoiceAmountType
;
}
}
public
void
setInvoiceAmountType
(
Integer
invoiceAmountType
)
{
public
void
setInvoiceAmountType
(
Integer
invoiceAmountType
)
{
I
nvoiceAmountType
=
invoiceAmountType
;
this
.
i
nvoiceAmountType
=
invoiceAmountType
;
}
}
public
boolean
is
HasModel
()
{
public
boolean
get
HasModel
()
{
return
H
asModel
;
return
h
asModel
;
}
}
public
void
setHasModel
(
boolean
hasModel
)
{
public
void
setHasModel
(
boolean
hasModel
)
{
H
asModel
=
hasModel
;
this
.
h
asModel
=
hasModel
;
}
}
public
List
<
String
>
getModelIDs
()
{
public
List
<
String
>
getModelIDs
()
{
return
M
odelIDs
;
return
m
odelIDs
;
}
}
public
void
setModelIDs
(
List
<
String
>
modelIDs
)
{
public
void
setModelIDs
(
List
<
String
>
modelIDs
)
{
M
odelIDs
=
modelIDs
;
this
.
m
odelIDs
=
modelIDs
;
}
}
public
List
<
Integer
>
getInvoiceCategory
()
{
public
List
<
Integer
>
getInvoiceCategory
()
{
return
I
nvoiceCategory
;
return
i
nvoiceCategory
;
}
}
public
void
setInvoiceCategory
(
List
<
Integer
>
invoiceCategory
)
{
public
void
setInvoiceCategory
(
List
<
Integer
>
invoiceCategory
)
{
I
nvoiceCategory
=
invoiceCategory
;
this
.
i
nvoiceCategory
=
invoiceCategory
;
}
}
public
String
getFormulaDataSource
()
{
public
String
getFormulaDataSource
()
{
return
F
ormulaDataSource
;
return
f
ormulaDataSource
;
}
}
public
void
setFormulaDataSource
(
String
formulaDataSource
)
{
public
void
setFormulaDataSource
(
String
formulaDataSource
)
{
F
ormulaDataSource
=
formulaDataSource
;
this
.
f
ormulaDataSource
=
formulaDataSource
;
}
}
public
boolean
is
HasValidation
()
{
public
boolean
get
HasValidation
()
{
return
H
asValidation
;
return
h
asValidation
;
}
}
public
void
setHasValidation
(
boolean
hasValidation
)
{
public
void
setHasValidation
(
boolean
hasValidation
)
{
H
asValidation
=
hasValidation
;
this
.
h
asValidation
=
hasValidation
;
}
}
public
String
getValidation
()
{
public
String
getValidation
()
{
return
V
alidation
;
return
v
alidation
;
}
}
public
void
setValidation
(
String
validation
)
{
public
void
setValidation
(
String
validation
)
{
V
alidation
=
validation
;
this
.
v
alidation
=
validation
;
}
}
public
String
getParsedValidation
()
{
public
String
getParsedValidation
()
{
return
P
arsedValidation
;
return
p
arsedValidation
;
}
}
public
void
setParsedValidation
(
String
parsedValidation
)
{
public
void
setParsedValidation
(
String
parsedValidation
)
{
P
arsedValidation
=
parsedValidation
;
this
.
p
arsedValidation
=
parsedValidation
;
}
}
public
String
getValidationDescription
()
{
public
String
getValidationDescription
()
{
return
V
alidationDescription
;
return
v
alidationDescription
;
}
}
public
void
setValidationDescription
(
String
validationDescription
)
{
public
void
setValidationDescription
(
String
validationDescription
)
{
V
alidationDescription
=
validationDescription
;
this
.
v
alidationDescription
=
validationDescription
;
}
}
public
String
getVoucherKeyword
()
{
public
String
getVoucherKeyword
()
{
return
V
oucherKeyword
;
return
v
oucherKeyword
;
}
}
public
void
setVoucherKeyword
(
String
voucherKeyword
)
{
public
void
setVoucherKeyword
(
String
voucherKeyword
)
{
V
oucherKeyword
=
voucherKeyword
;
this
.
v
oucherKeyword
=
voucherKeyword
;
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/KeyValueConfigDisplayDto.java
View file @
ec72a43d
...
@@ -5,18 +5,18 @@ import java.util.Map;
...
@@ -5,18 +5,18 @@ import java.util.Map;
public
class
KeyValueConfigDisplayDto
{
public
class
KeyValueConfigDisplayDto
{
private
String
ID
;
private
String
ID
;
private
String
K
eyCode
;
private
String
k
eyCode
;
private
String
N
ame
;
private
String
n
ame
;
private
String
F
ormula
;
private
String
f
ormula
;
private
String
D
escription
;
private
String
d
escription
;
private
String
S
copeSummary
;
private
String
s
copeSummary
;
private
String
S
erviceTypes
;
private
String
s
erviceTypes
;
private
String
I
ndustrys
;
private
String
i
ndustrys
;
private
List
<
String
>
S
erviceTypeIds
;
private
List
<
String
>
s
erviceTypeIds
;
private
List
<
String
>
I
ndustryIds
;
private
List
<
String
>
i
ndustryIds
;
private
Integer
K
eyValueType
;
private
Integer
k
eyValueType
;
private
String
D
ataSource
;
private
String
d
ataSource
;
private
Map
<
Integer
,
Integer
>
S
copeCount
;
private
Map
<
Integer
,
Integer
>
s
copeCount
;
public
String
getID
()
{
public
String
getID
()
{
return
ID
;
return
ID
;
...
@@ -26,99 +26,100 @@ public class KeyValueConfigDisplayDto {
...
@@ -26,99 +26,100 @@ public class KeyValueConfigDisplayDto {
this
.
ID
=
ID
;
this
.
ID
=
ID
;
}
}
public
String
getKeyCode
()
{
public
String
getKeyCode
()
{
return
K
eyCode
;
return
k
eyCode
;
}
}
public
void
setKeyCode
(
String
keyCode
)
{
public
void
setKeyCode
(
String
keyCode
)
{
K
eyCode
=
keyCode
;
this
.
k
eyCode
=
keyCode
;
}
}
public
String
getName
()
{
public
String
getName
()
{
return
N
ame
;
return
n
ame
;
}
}
public
void
setName
(
String
name
)
{
public
void
setName
(
String
name
)
{
N
ame
=
name
;
this
.
n
ame
=
name
;
}
}
public
String
getFormula
()
{
public
String
getFormula
()
{
return
F
ormula
;
return
f
ormula
;
}
}
public
void
setFormula
(
String
formula
)
{
public
void
setFormula
(
String
formula
)
{
F
ormula
=
formula
;
this
.
f
ormula
=
formula
;
}
}
public
String
getDescription
()
{
public
String
getDescription
()
{
return
D
escription
;
return
d
escription
;
}
}
public
void
setDescription
(
String
description
)
{
public
void
setDescription
(
String
description
)
{
D
escription
=
description
;
this
.
d
escription
=
description
;
}
}
public
String
getScopeSummary
()
{
public
String
getScopeSummary
()
{
return
S
copeSummary
;
return
s
copeSummary
;
}
}
public
void
setScopeSummary
(
String
scopeSummary
)
{
public
void
setScopeSummary
(
String
scopeSummary
)
{
S
copeSummary
=
scopeSummary
;
this
.
s
copeSummary
=
scopeSummary
;
}
}
public
String
getServiceTypes
()
{
public
String
getServiceTypes
()
{
return
S
erviceTypes
;
return
s
erviceTypes
;
}
}
public
void
setServiceTypes
(
String
serviceTypes
)
{
public
void
setServiceTypes
(
String
serviceTypes
)
{
S
erviceTypes
=
serviceTypes
;
this
.
s
erviceTypes
=
serviceTypes
;
}
}
public
String
getIndustrys
()
{
public
String
getIndustrys
()
{
return
I
ndustrys
;
return
i
ndustrys
;
}
}
public
void
setIndustrys
(
String
industrys
)
{
public
void
setIndustrys
(
String
industrys
)
{
I
ndustrys
=
industrys
;
this
.
i
ndustrys
=
industrys
;
}
}
public
List
<
String
>
getServiceTypeIds
()
{
public
List
<
String
>
getServiceTypeIds
()
{
return
S
erviceTypeIds
;
return
s
erviceTypeIds
;
}
}
public
void
setServiceTypeIds
(
List
<
String
>
serviceTypeIds
)
{
public
void
setServiceTypeIds
(
List
<
String
>
serviceTypeIds
)
{
S
erviceTypeIds
=
serviceTypeIds
;
this
.
s
erviceTypeIds
=
serviceTypeIds
;
}
}
public
List
<
String
>
getIndustryIds
()
{
public
List
<
String
>
getIndustryIds
()
{
return
I
ndustryIds
;
return
i
ndustryIds
;
}
}
public
void
setIndustryIds
(
List
<
String
>
industryIds
)
{
public
void
setIndustryIds
(
List
<
String
>
industryIds
)
{
I
ndustryIds
=
industryIds
;
this
.
i
ndustryIds
=
industryIds
;
}
}
public
Integer
getKeyValueType
()
{
public
Integer
getKeyValueType
()
{
return
K
eyValueType
;
return
k
eyValueType
;
}
}
public
void
setKeyValueType
(
Integer
keyValueType
)
{
public
void
setKeyValueType
(
Integer
keyValueType
)
{
K
eyValueType
=
keyValueType
;
this
.
k
eyValueType
=
keyValueType
;
}
}
public
String
getDataSource
()
{
public
String
getDataSource
()
{
return
D
ataSource
;
return
d
ataSource
;
}
}
public
void
setDataSource
(
String
dataSource
)
{
public
void
setDataSource
(
String
dataSource
)
{
D
ataSource
=
dataSource
;
this
.
d
ataSource
=
dataSource
;
}
}
public
Map
<
Integer
,
Integer
>
getScopeCount
()
{
public
Map
<
Integer
,
Integer
>
getScopeCount
()
{
return
S
copeCount
;
return
s
copeCount
;
}
}
public
void
setScopeCount
(
Map
<
Integer
,
Integer
>
scopeCount
)
{
public
void
setScopeCount
(
Map
<
Integer
,
Integer
>
scopeCount
)
{
S
copeCount
=
scopeCount
;
this
.
s
copeCount
=
scopeCount
;
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/CellTemplateService.java
View file @
ec72a43d
...
@@ -9,4 +9,6 @@ public interface CellTemplateService {
...
@@ -9,4 +9,6 @@ public interface CellTemplateService {
OperationResultDto
<
List
<
CellTemplateConfigDto
>>
getCellConfigList
(
String
templateID
);
OperationResultDto
<
List
<
CellTemplateConfigDto
>>
getCellConfigList
(
String
templateID
);
OperationResultDto
<
CellTemplateConfigDto
>
getCellConfig
(
String
cellTemplateID
);
OperationResultDto
<
CellTemplateConfigDto
>
getCellConfig
(
String
cellTemplateID
);
OperationResultDto
saveOrEdit
(
CellTemplateConfigDto
cellTemplateConfig
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/RuleEngineeConfigService.java
View file @
ec72a43d
...
@@ -7,9 +7,9 @@ import pwc.taxtech.atms.dto.TaxPayerReportRuleDto;
...
@@ -7,9 +7,9 @@ import pwc.taxtech.atms.dto.TaxPayerReportRuleDto;
import
pwc.taxtech.atms.dto.TaxRuleSettingDto
;
import
pwc.taxtech.atms.dto.TaxRuleSettingDto
;
public
interface
RuleEngineeConfigService
{
public
interface
RuleEngineeConfigService
{
List
<
TaxPayerReportRuleDto
>
G
etTaxPayerReportMapping
();
List
<
TaxPayerReportRuleDto
>
g
etTaxPayerReportMapping
();
List
<
TaxRuleSettingDto
>
G
etTaxRuleSetting
();
List
<
TaxRuleSettingDto
>
g
etTaxRuleSetting
();
void
savetaxrulesettings
(
BatchUpdateTaxRuleDto
batchUpdateTaxRule
);
void
savetaxrulesettings
(
BatchUpdateTaxRuleDto
batchUpdateTaxRule
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/TemplateGroupService.java
View file @
ec72a43d
package
pwc
.
taxtech
.
atms
.
service
;
package
pwc
.
taxtech
.
atms
.
service
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
java.util.List
;
import
java.util.List
;
public
interface
TemplateGroupService
{
public
interface
TemplateGroupService
{
List
<
TemplateGroupDto
>
G
et
();
List
<
TemplateGroupDto
>
g
et
();
List
<
TemplateGroupDto
>
Get
(
int
serviceTypeID
,
Integer
taxPayType
,
String
industryID
);
List
<
TemplateGroupDto
>
get
(
int
serviceTypeID
,
Integer
taxPayType
,
String
industryID
);
OperationResultDto
<
Object
>
updateTemplateGroupName
(
TemplateGroupDto
templateGroupDto
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/AbstractService.java
View file @
ec72a43d
...
@@ -121,4 +121,6 @@ public class AbstractService {
...
@@ -121,4 +121,6 @@ public class AbstractService {
protected
TemplateMapper
templateMapper
;
protected
TemplateMapper
templateMapper
;
@Autowired
@Autowired
protected
TemplateFormulaMapper
templateFormulaMapper
;
protected
TemplateFormulaMapper
templateFormulaMapper
;
@Autowired
protected
FormulaConfigMapper
formulaConfigMapper
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CellTemplateServiceImpl.java
View file @
ec72a43d
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.dao.CellTemplateMapper
;
import
org.springframework.transaction.annotation.Transactional
;
import
pwc.taxtech.atms.common.ApplyScope
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.dto.CellTemplateConfigDto
;
import
pwc.taxtech.atms.dto.CellTemplateConfigDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.entitiy.CellTemplate
;
import
pwc.taxtech.atms.entitiy.*
;
import
pwc.taxtech.atms.entitiy.CellTemplateConfig
;
import
pwc.taxtech.atms.entitiy.CellTemplateConfigExample
;
import
pwc.taxtech.atms.entitiy.CellTemplateExample
;
import
pwc.taxtech.atms.service.CellTemplateService
;
import
pwc.taxtech.atms.service.CellTemplateService
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -47,23 +49,19 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
...
@@ -47,23 +49,19 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
@Override
@Override
public
OperationResultDto
<
CellTemplateConfigDto
>
getCellConfig
(
String
cellTemplateID
)
{
public
OperationResultDto
<
CellTemplateConfigDto
>
getCellConfig
(
String
cellTemplateID
)
{
OperationResultDto
<
CellTemplateConfigDto
>
result
=
new
OperationResultDto
<>();
OperationResultDto
<
CellTemplateConfigDto
>
result
=
new
OperationResultDto
<>();
CellTemplate
config
=
cellTemplateMapper
.
selectByPrimaryKey
(
cellTemplateID
);
CellTemplate
config
=
cellTemplateMapper
.
selectByPrimaryKey
(
cellTemplateID
);
if
(
config
.
equals
(
null
)
)
{
if
(
config
==
null
)
{
result
.
setResultMsg
(
"NoData"
);
result
.
setResultMsg
(
"NoData"
);
return
result
;
return
result
;
}
}
CellTemplateConfigExample
example
=
new
CellTemplateConfigExample
();
CellTemplateConfigExample
example
=
new
CellTemplateConfigExample
();
example
.
createCriteria
().
andCellTemplateIDEqualTo
(
cellTemplateID
);
example
.
createCriteria
().
andCellTemplateIDEqualTo
(
cellTemplateID
);
List
<
CellTemplateConfig
>
configList
=
cellTemplateConfigMapper
.
selectByExample
(
example
);
List
<
CellTemplateConfig
>
configList
=
cellTemplateConfigMapper
.
selectByExample
(
example
);
result
.
setData
(
GetConfigDto
(
config
,
configList
));
result
.
setData
(
GetConfigDto
(
config
,
configList
));
if
(
result
.
getData
()
.
equals
(
null
)
)
{
if
(
result
.
getData
()
==
null
)
{
result
.
setResultMsg
(
"NoData"
);
result
.
setResultMsg
(
"NoData"
);
return
result
;
return
result
;
}
}
...
@@ -72,6 +70,219 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
...
@@ -72,6 +70,219 @@ public class CellTemplateServiceImpl extends AbstractService implements CellTemp
return
result
;
return
result
;
}
}
@Override
@Transactional
public
OperationResultDto
saveOrEdit
(
CellTemplateConfigDto
cellTemplateConfig
)
{
OperationResultDto
result
=
new
OperationResultDto
();
CellTemplate
cellTemplate
=
cellTemplateMapper
.
selectByPrimaryKey
(
cellTemplateConfig
.
getCellTemplateID
());
if
(
cellTemplate
==
null
)
{
result
.
setResultMsg
(
"Nodata"
);
return
result
;
}
cellTemplate
.
setComment
(
cellTemplateConfig
.
getFormulaDescription
());
cellTemplate
.
setRowName
(
cellTemplateConfig
.
getRowName
());
cellTemplate
.
setColumnName
(
cellTemplateConfig
.
getColumnName
());
CellTemplateConfigExample
example
=
new
CellTemplateConfigExample
();
example
.
createCriteria
().
andCellTemplateIDEqualTo
(
cellTemplateConfig
.
getCellTemplateID
());
List
<
CellTemplateConfig
>
cellTemplateConfigs
=
cellTemplateConfigMapper
.
selectByExample
(
example
);
if
(!
cellTemplateConfigs
.
isEmpty
())
{
for
(
CellTemplateConfig
templateConfig
:
cellTemplateConfigs
)
{
cellTemplateConfigMapper
.
deleteByPrimaryKey
(
templateConfig
.
getID
());
}
}
List
<
String
>
keyValues
=
new
ArrayList
<>();
OperationResultDto
<
List
<
CellTemplateConfig
>>
configResult
=
GetConfigList
(
cellTemplateConfig
,
keyValues
);
if
(
configResult
.
getResult
())
{
configResult
.
getData
().
forEach
(
a
->
cellTemplateConfigMapper
.
insert
(
a
));
}
if
(
keyValues
!=
null
&&
keyValues
.
size
()
>
0
)
{
keyValues
.
forEach
(
a
->
{
KeyValueReference
keyValueReferenceData
=
new
KeyValueReference
();
keyValueReferenceData
.
setID
(
CommonUtils
.
getUUID
());
keyValueReferenceData
.
setKeyValueConfigID
(
a
);
keyValueReferenceData
.
setScope
(
ApplyScope
.
TaxReturn
.
value
());
keyValueReferenceData
.
setCellTemplateID
(
cellTemplate
.
getID
());
keyValueReferenceMapper
.
insert
(
keyValueReferenceData
);
});
}
result
.
setResult
(
true
);
result
.
setResultMsg
(
configResult
.
getResultMsg
());
return
result
;
}
private
OperationResultDto
<
List
<
CellTemplateConfig
>>
GetConfigList
(
CellTemplateConfigDto
cellTemplateConfigDto
,
List
<
String
>
keyValueIds
)
{
OperationResultDto
<
List
<
CellTemplateConfig
>>
operationResultDto
=
new
OperationResultDto
<>();
List
<
CellTemplateConfig
>
cellTemplateConfigList
=
new
ArrayList
<>();
if
(
cellTemplateConfigDto
.
getHasFormula
())
{
operationResultDto
.
setResultMsg
(
GetFormulaDataSource
(
cellTemplateConfigDto
.
getFormula
(),
keyValueIds
));
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
CellDataSourceType
.
Formula
.
getCode
());
cellTemplateConfig
.
setFormulaDataSource
(
operationResultDto
.
getResultMsg
());
cellTemplateConfig
.
setFormula
(
cellTemplateConfigDto
.
getFormula
());
cellTemplateConfig
.
setFormulaDescription
(
cellTemplateConfigDto
.
getFormulaDescription
());
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasVoucher
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
CellDataSourceType
.
Voucher
.
getCode
());
cellTemplateConfig
.
setVoucherKeyword
(
cellTemplateConfigDto
.
getVoucherKeyword
());
cellTemplateConfig
.
setAccountCodes
(
GetJoinString
(
cellTemplateConfigDto
.
getAccountCodes
()));
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasInvoice
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
getInvoiceType
(
cellTemplateConfigDto
.
getInvoiceType
()).
getCode
());
cellTemplateConfig
.
setInvoiceType
(
cellTemplateConfigDto
.
getInvoiceType
());
cellTemplateConfig
.
setInvoiceAmountType
(
cellTemplateConfigDto
.
getInvoiceAmountType
());
cellTemplateConfig
.
setTaxRate
(
GetJoinString
(
cellTemplateConfigDto
.
getTaxRate
()));
cellTemplateConfig
.
setInvoiceCategory
(
GetJoinString
(
cellTemplateConfigDto
.
getInvoiceCategory
().
stream
().
map
(
String:
:
valueOf
).
collect
(
Collectors
.
toList
())));
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasKeyIn
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
CellDataSourceType
.
KeyIn
.
getCode
());
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasModel
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
CellDataSourceType
.
RelatedModel
.
getCode
());
cellTemplateConfig
.
setModelIDs
(
GetJoinString
(
cellTemplateConfigDto
.
getModelIDs
()));
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
if
(
cellTemplateConfigDto
.
getHasValidation
())
{
CellTemplateConfig
cellTemplateConfig
=
new
CellTemplateConfig
();
cellTemplateConfig
.
setID
(
CommonUtils
.
getUUID
());
cellTemplateConfig
.
setCellTemplateID
(
cellTemplateConfigDto
.
getCellTemplateID
());
cellTemplateConfig
.
setReportTemplateID
(
cellTemplateConfigDto
.
getTemplateID
());
cellTemplateConfig
.
setCreator
(
cellTemplateConfigDto
.
getCreator
());
cellTemplateConfig
.
setUpdater
(
cellTemplateConfigDto
.
getUpdater
());
cellTemplateConfig
.
setUpdateTime
(
new
Date
());
cellTemplateConfig
.
setCreateTime
(
new
Date
());
cellTemplateConfig
.
setDataSourceType
(
CellDataSourceType
.
Validation
.
getCode
());
cellTemplateConfig
.
setValidation
(
cellTemplateConfigDto
.
getValidation
());
cellTemplateConfig
.
setValidationDescription
(
cellTemplateConfigDto
.
getValidationDescription
());
cellTemplateConfigList
.
add
(
cellTemplateConfig
);
}
operationResultDto
.
setResult
(
true
);
operationResultDto
.
setData
(
cellTemplateConfigList
);
return
operationResultDto
;
}
private
CellDataSourceType
getInvoiceType
(
Integer
invoiceType
)
{
if
(
invoiceType
==
null
)
{
return
CellDataSourceType
.
InputInvoice
;
}
if
(
invoiceType
.
intValue
()
==
1
)
{
return
CellDataSourceType
.
InputInvoice
;
}
else
if
(
invoiceType
.
intValue
()
==
2
)
{
return
CellDataSourceType
.
OutputInvoice
;
}
else
if
(
invoiceType
.
intValue
()
==
3
)
{
return
CellDataSourceType
.
CustomInvoice
;
}
return
CellDataSourceType
.
InputInvoice
;
}
private
String
GetJoinString
(
List
<
String
>
array
)
{
if
(
array
!=
null
&&
array
.
size
()
>
0
)
{
StringBuilder
sb
=
new
StringBuilder
();
for
(
String
s
:
array
)
{
sb
.
append
(
s
+
","
);
}
String
tempStr
=
sb
.
toString
();
return
tempStr
.
substring
(
0
,
tempStr
.
length
()
-
2
);
}
return
null
;
}
private
String
GetFormulaDataSource
(
String
formula
,
List
<
String
>
keyValueConfigIDs
)
{
FormulaConfigExample
example
=
new
FormulaConfigExample
();
example
.
setOrderByClause
(
"LENGTH(FormulaName) desc"
);
List
<
FormulaConfig
>
dataSourceList
=
formulaConfigMapper
.
selectByExample
(
example
);
List
<
String
>
nameList
=
new
ArrayList
<>();
FormulaHelper
formulaHelper
=
new
FormulaHelper
();
String
tmpFormula
=
formulaHelper
.
FormatFormula
(
formula
).
toUpperCase
();
for
(
FormulaConfig
dataSource
:
dataSourceList
)
{
if
(
tmpFormula
.
contains
(
dataSource
.
getFormulaName
().
toUpperCase
()
+
"("
)
&&
!
nameList
.
contains
(
dataSource
.
getDataSourceName
()))
{
nameList
.
add
(
dataSource
.
getDataSourceName
());
}
}
String
keyValueMethodName
=
"KEYVALUE("
;
if
(
tmpFormula
.
contains
(
keyValueMethodName
))
{
KeyValueConfigExample
keyValueConfigExample
=
new
KeyValueConfigExample
();
keyValueConfigExample
.
setOrderByClause
(
"LENGTH(KeyCode) desc"
);
List
<
KeyValueConfig
>
keyValueList
=
keyValueConfigMapper
.
selectByExample
(
keyValueConfigExample
);
for
(
KeyValueConfig
keyValueConfig
:
keyValueList
)
{
if
(
tmpFormula
.
contains
(
keyValueMethodName
+
"\""
+
keyValueConfig
.
getKeyCode
().
toUpperCase
()
+
"\")"
))
{
if
(!
StringUtils
.
isBlank
(
keyValueConfig
.
getDataSource
()))
{
String
dataSourceName
=
keyValueConfig
.
getDataSource
().
split
(
"_"
)[
1
];
if
(!
nameList
.
contains
(
dataSourceName
))
{
nameList
.
add
(
dataSourceName
);
}
}
if
(
keyValueConfigIDs
.
contains
(
keyValueConfig
.
getID
()))
{
keyValueConfigIDs
.
add
(
keyValueConfig
.
getID
());
}
}
}
}
if
(
nameList
.
isEmpty
())
{
return
formula
;
}
else
{
return
String
.
join
(
"+"
,
nameList
);
}
}
private
CellTemplateConfigDto
GetConfigDto
(
CellTemplate
cellTemplate
,
List
<
CellTemplateConfig
>
configList
)
{
private
CellTemplateConfigDto
GetConfigDto
(
CellTemplate
cellTemplate
,
List
<
CellTemplateConfig
>
configList
)
{
CellTemplateConfigDto
cellTemplateConfigDto
=
CellConfigTranslater
.
GetConfigDto
(
cellTemplate
,
configList
);
CellTemplateConfigDto
cellTemplateConfigDto
=
CellConfigTranslater
.
GetConfigDto
(
cellTemplate
,
configList
);
cellTemplateConfigDto
.
setCellTemplateID
(
cellTemplate
.
getID
());
cellTemplateConfigDto
.
setCellTemplateID
(
cellTemplate
.
getID
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
View file @
ec72a43d
...
@@ -49,10 +49,10 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
...
@@ -49,10 +49,10 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
dtoObj
.
setServiceTypeIds
(
Arrays
.
asList
(
keyValueConfig
.
getServiceTypeIDs
().
split
(
","
)));
dtoObj
.
setServiceTypeIds
(
Arrays
.
asList
(
keyValueConfig
.
getServiceTypeIDs
().
split
(
","
)));
List
<
KeyValueReference
>
selectScopeList
=
scopes
.
stream
()
List
<
KeyValueReference
>
selectScopeList
=
scopes
.
stream
()
.
filter
(
item
->
item
.
getKeyValueConfigID
().
equals
(
item
.
getID
())).
collect
(
Collectors
.
toList
());
.
filter
(
item
->
item
.
getKeyValueConfigID
().
equals
(
item
.
getID
())).
collect
(
Collectors
.
toList
());
List
<
Integer
>
selectScopes
=
selectScopeList
.
stream
().
map
(
item
->
item
.
getScope
()
).
distinct
()
List
<
Integer
>
selectScopes
=
selectScopeList
.
stream
().
map
(
KeyValueReference:
:
getScope
).
distinct
()
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
Map
<
Integer
,
Integer
>
scopeCount
=
new
HashMap
<>();
Map
<
Integer
,
Integer
>
scopeCount
=
new
HashMap
<>();
if
(
selectScopeList
!=
null
&&
selectScopeList
.
size
()>
0
)
{
if
(
selectScopeList
.
size
()
>
0
)
{
for
(
Integer
selectScope
:
selectScopes
)
{
for
(
Integer
selectScope
:
selectScopes
)
{
Integer
count
=
(
int
)(
selectScopeList
.
stream
().
filter
(
a
->
a
.
getScope
().
equals
(
selectScope
)).
count
());
Integer
count
=
(
int
)(
selectScopeList
.
stream
().
filter
(
a
->
a
.
getScope
().
equals
(
selectScope
)).
count
());
scopeCount
.
put
(
selectScope
,
count
);
scopeCount
.
put
(
selectScope
,
count
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/ModelConfigurationServiceImpl.java
View file @
ec72a43d
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -12,7 +14,10 @@ public class ModelConfigurationServiceImpl extends AbstractService implements Mo
...
@@ -12,7 +14,10 @@ public class ModelConfigurationServiceImpl extends AbstractService implements Mo
@Override
@Override
public
List
<
ModelProfileDto
>
GetModelListByIndustry
(
String
serviceTypeID
,
String
industryID
)
{
public
List
<
ModelProfileDto
>
GetModelListByIndustry
(
String
serviceTypeID
,
String
industryID
)
{
return
modelConfigMapper
.
GetModelListByIndustry
(
serviceTypeID
,
industryID
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"serviceTypeID"
,
serviceTypeID
);
map
.
put
(
"industryID"
,
industryID
);
return
modelConfigMapper
.
GetModelListByIndustry
(
map
);
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
View file @
ec72a43d
...
@@ -40,7 +40,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
...
@@ -40,7 +40,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
private
AuthUserHelper
authUserHelper
;
private
AuthUserHelper
authUserHelper
;
@Override
@Override
public
List
<
TaxPayerReportRuleDto
>
G
etTaxPayerReportMapping
()
{
public
List
<
TaxPayerReportRuleDto
>
g
etTaxPayerReportMapping
()
{
List
<
String
>
orgIDs
=
organizationMapper
.
selectOnlyIDAndParentID
().
stream
().
map
(
OrganizationDto:
:
getID
)
List
<
String
>
orgIDs
=
organizationMapper
.
selectOnlyIDAndParentID
().
stream
().
map
(
OrganizationDto:
:
getID
)
.
collect
(
Collectors
.
toList
());
.
collect
(
Collectors
.
toList
());
List
<
TaxPayerReportRule
>
rules
=
taxPayerReportRuleMapper
.
selectByExample
(
new
TaxPayerReportRuleExample
());
List
<
TaxPayerReportRule
>
rules
=
taxPayerReportRuleMapper
.
selectByExample
(
new
TaxPayerReportRuleExample
());
...
@@ -72,7 +72,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
...
@@ -72,7 +72,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
}
}
@Override
@Override
public
List
<
TaxRuleSettingDto
>
G
etTaxRuleSetting
()
{
public
List
<
TaxRuleSettingDto
>
g
etTaxRuleSetting
()
{
List
<
TaxRuleSettingDto
>
trsdList
=
taxRuleSettingMapper
.
GetTaxRuleSetting
();
List
<
TaxRuleSettingDto
>
trsdList
=
taxRuleSettingMapper
.
GetTaxRuleSetting
();
List
<
String
>
orgIDs
=
trsdList
.
stream
().
map
(
TaxRuleSettingDto:
:
getOrganizationID
).
collect
(
Collectors
.
toList
());
List
<
String
>
orgIDs
=
trsdList
.
stream
().
map
(
TaxRuleSettingDto:
:
getOrganizationID
).
collect
(
Collectors
.
toList
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
ec72a43d
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.service.impl;
...
@@ -3,6 +3,7 @@ package pwc.taxtech.atms.service.impl;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.constant.enums.TemplateGroupType
;
import
pwc.taxtech.atms.constant.enums.TemplateGroupType
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
pwc.taxtech.atms.dto.TemplateGroupDto
;
import
pwc.taxtech.atms.entitiy.TemplateGroup
;
import
pwc.taxtech.atms.entitiy.TemplateGroup
;
import
pwc.taxtech.atms.entitiy.TemplateGroupExample
;
import
pwc.taxtech.atms.entitiy.TemplateGroupExample
;
...
@@ -15,7 +16,7 @@ import java.util.List;
...
@@ -15,7 +16,7 @@ import java.util.List;
public
class
TemplateGroupServiceImpl
extends
AbstractService
implements
TemplateGroupService
{
public
class
TemplateGroupServiceImpl
extends
AbstractService
implements
TemplateGroupService
{
@Override
@Override
public
List
<
TemplateGroupDto
>
G
et
()
{
public
List
<
TemplateGroupDto
>
g
et
()
{
List
<
TemplateGroup
>
templateGroups
=
templateGroupMapper
.
selectByExample
(
new
TemplateGroupExample
());
List
<
TemplateGroup
>
templateGroups
=
templateGroupMapper
.
selectByExample
(
new
TemplateGroupExample
());
List
<
TemplateGroupDto
>
templateGroupDtos
=
new
ArrayList
<>();
List
<
TemplateGroupDto
>
templateGroupDtos
=
new
ArrayList
<>();
for
(
TemplateGroup
templateGroup
:
templateGroups
)
{
for
(
TemplateGroup
templateGroup
:
templateGroups
)
{
...
@@ -27,7 +28,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
...
@@ -27,7 +28,7 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
}
}
@Override
@Override
public
List
<
TemplateGroupDto
>
G
et
(
int
serviceTypeID
,
Integer
taxPayType
,
String
industryID
)
{
public
List
<
TemplateGroupDto
>
g
et
(
int
serviceTypeID
,
Integer
taxPayType
,
String
industryID
)
{
TemplateGroupExample
example
=
new
TemplateGroupExample
();
TemplateGroupExample
example
=
new
TemplateGroupExample
();
TemplateGroupExample
.
Criteria
criteria
=
example
.
createCriteria
();
TemplateGroupExample
.
Criteria
criteria
=
example
.
createCriteria
();
...
@@ -48,4 +49,30 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
...
@@ -48,4 +49,30 @@ public class TemplateGroupServiceImpl extends AbstractService implements Templat
return
templateGroupDtos
;
return
templateGroupDtos
;
}
}
@Override
public
OperationResultDto
<
Object
>
updateTemplateGroupName
(
TemplateGroupDto
templateGroupDto
)
{
TemplateGroup
entity
=
templateGroupMapper
.
selectByPrimaryKey
(
templateGroupDto
.
getID
());
TemplateGroupExample
example
=
new
TemplateGroupExample
();
example
.
createCriteria
().
andNameEqualTo
(
templateGroupDto
.
getName
()).
andIDNotEqualTo
(
templateGroupDto
.
getID
()).
andServiceTypeIDEqualTo
(
entity
.
getServiceTypeID
()).
andIndustryIDsEqualTo
(
entity
.
getIndustryIDs
()).
andPayTaxTypeEqualTo
(
entity
.
getPayTaxType
());
List
<
TemplateGroup
>
templateGroups
=
templateGroupMapper
.
selectByExample
(
example
);
if
(!
templateGroups
.
isEmpty
())
{
OperationResultDto
<
Object
>
result
=
new
OperationResultDto
<>();
result
.
setResult
(
false
);
result
.
setResultMsg
(
TemplateGroupMessage
.
TemplateGroupNameExist
);
}
entity
.
setName
(
templateGroupDto
.
getName
());
templateGroupMapper
.
updateByPrimaryKey
(
entity
);
OperationResultDto
<
Object
>
result
=
new
OperationResultDto
<>();
result
.
setResult
(
true
);
return
result
;
}
public
class
TemplateGroupMessage
{
public
static
final
String
TemplateGroupNameExist
=
"TemplateGroupNameExist"
;
public
static
final
String
SystemTypeCannotDelete
=
"SystemTypeCannotDelete"
;
public
static
final
String
OrganizationUsedTemplateGroup
=
"OrganizationUsedTemplateGroup"
;
}
}
}
atms-api/src/main/resources/pwc/taxtech/atms/dao/ModelConfigMapper.xml
View file @
ec72a43d
...
@@ -277,21 +277,21 @@
...
@@ -277,21 +277,21 @@
<resultMap
id=
"GetModelListByIndustryResult"
type=
"pwc.taxtech.atms.dto.ModelProfileDto"
>
<resultMap
id=
"GetModelListByIndustryResult"
type=
"pwc.taxtech.atms.dto.ModelProfileDto"
>
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"ID"
/>
<id
column=
"ID"
jdbcType=
"VARCHAR"
property=
"ID"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"Name"
jdbcType=
"VARCHAR"
property=
"name"
/>
<result
column=
"CategoryID"
jdbcType=
"VARCHAR"
property=
"
C
ategoryID"
/>
<result
column=
"CategoryID"
jdbcType=
"VARCHAR"
property=
"
c
ategoryID"
/>
<result
column=
"CategoryString"
jdbcType=
"VARCHAR"
property=
"
C
ategoryString"
/>
<result
column=
"CategoryString"
jdbcType=
"VARCHAR"
property=
"
c
ategoryString"
/>
<result
column=
"OrgID"
jdbcType=
"VARCHAR"
property=
"
O
rgID"
/>
<result
column=
"OrgID"
jdbcType=
"VARCHAR"
property=
"
o
rgID"
/>
<result
column=
"OrganizationName"
jdbcType=
"VARCHAR"
property=
"
O
rganizationName"
/>
<result
column=
"OrganizationName"
jdbcType=
"VARCHAR"
property=
"
o
rganizationName"
/>
<result
column=
"Type"
jdbcType=
"INTEGER"
property=
"
T
ype"
/>
<result
column=
"Type"
jdbcType=
"INTEGER"
property=
"
t
ype"
/>
<result
column=
"Feature"
jdbcType=
"INTEGER"
property=
"
F
eature"
/>
<result
column=
"Feature"
jdbcType=
"INTEGER"
property=
"
f
eature"
/>
<result
column=
"IsStatus"
jdbcType=
"INTEGER"
property=
"
I
sStatus"
/>
<result
column=
"IsStatus"
jdbcType=
"INTEGER"
property=
"
i
sStatus"
/>
<result
column=
"Code"
jdbcType=
"VARCHAR"
property=
"
C
ode"
/>
<result
column=
"Code"
jdbcType=
"VARCHAR"
property=
"
c
ode"
/>
<result
column=
"Indust
yId"
jdbcType=
"VARCHAR"
property=
"IndustyId
"
/>
<result
column=
"Indust
ryId"
jdbcType=
"VARCHAR"
property=
"industryID
"
/>
<result
column=
"IndustryName"
jdbcType=
"VARCHAR"
property=
"
I
ndustryName"
/>
<result
column=
"IndustryName"
jdbcType=
"VARCHAR"
property=
"
i
ndustryName"
/>
<result
column=
"Description"
jdbcType=
"VARCHAR"
property=
"
D
escription"
/>
<result
column=
"Description"
jdbcType=
"VARCHAR"
property=
"
d
escription"
/>
<result
column=
"RuleType"
jdbcType=
"INTEGER"
property=
"
R
uleType"
/>
<result
column=
"RuleType"
jdbcType=
"INTEGER"
property=
"
r
uleType"
/>
<result
column=
"IsFilter"
jdbcType=
"INTEGER"
property=
"
I
sFilter"
/>
<result
column=
"IsFilter"
jdbcType=
"INTEGER"
property=
"
i
sFilter"
/>
<result
column=
"ServiceTypeID"
jdbcType=
"VARCHAR"
property=
"
S
erviceTypeID"
/>
<result
column=
"ServiceTypeID"
jdbcType=
"VARCHAR"
property=
"
s
erviceTypeID"
/>
<result
column=
"ServiceTypeName"
jdbcType=
"VARCHAR"
property=
"
S
erviceTypeName"
/>
<result
column=
"ServiceTypeName"
jdbcType=
"VARCHAR"
property=
"
s
erviceTypeName"
/>
</resultMap>
</resultMap>
<select
id=
"GetModelListByIndustry"
parameterType=
"map"
resultMap=
"GetModelListByIndustryResult"
>
<select
id=
"GetModelListByIndustry"
parameterType=
"map"
resultMap=
"GetModelListByIndustryResult"
>
SELECT
SELECT
...
@@ -305,7 +305,7 @@
...
@@ -305,7 +305,7 @@
m.Feature,
m.Feature,
m.IsStatus,
m.IsStatus,
m.Code,
m.Code,
org.IndustryID AS IndustyId,
org.IndustryID AS Indust
r
yId,
i.Name AS IndustryName,
i.Name AS IndustryName,
m.Description,
m.Description,
m.RuleType,
m.RuleType,
...
...
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