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
53bc8a3d
Commit
53bc8a3d
authored
Oct 09, 2018
by
neo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DEL] delete key value config service interface
parent
799bb62a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
52 deletions
+17
-52
KeyValueConfigController.java
...pwc/taxtech/atms/controller/KeyValueConfigController.java
+2
-2
KeyValueConfigService.java
.../java/pwc/taxtech/atms/service/KeyValueConfigService.java
+0
-31
KeyValueConfigServiceImpl.java
.../taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
+15
-19
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/KeyValueConfigController.java
View file @
53bc8a3d
...
...
@@ -23,7 +23,7 @@ import pwc.taxtech.atms.dto.KeyValueConfigDisplayDto;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.UpdateKeyValueConfigDto
;
import
pwc.taxtech.atms.dto.formula.FormulaConfigDto
;
import
pwc.taxtech.atms.service.
KeyValueConfigService
;
import
pwc.taxtech.atms.service.
impl.KeyValueConfigServiceImpl
;
import
pwc.taxtech.atms.service.impl.TemplateFormulaServiceImpl
;
import
java.util.List
;
...
...
@@ -34,7 +34,7 @@ public class KeyValueConfigController {
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
EnterpriseAccountManagerController
.
class
);
@Autowired
private
KeyValueConfigService
keyValueConfigService
;
private
KeyValueConfigService
Impl
keyValueConfigService
;
@Autowired
private
TemplateFormulaServiceImpl
templateFormulaService
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/KeyValueConfigService.java
deleted
100644 → 0
View file @
799bb62a
package
pwc
.
taxtech
.
atms
.
service
;
import
java.util.List
;
import
pwc.taxtech.atms.dpo.AnalyticsModelDetail
;
import
pwc.taxtech.atms.dpo.FinancialStatementDetail
;
import
pwc.taxtech.atms.dpo.TaxReturnDetail
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.formula.FormulaConfigDto
;
public
interface
KeyValueConfigService
{
List
<
KeyValueConfigDisplayDto
>
get
();
OperationResultDto
<
List
<
FormulaConfigDto
>>
getAllFormulaList
();
List
<
FinancialStatementDetail
>
getFinacialStatement
(
String
configurationId
);
List
<
TaxReturnDetail
>
getTaxReturn
(
String
configurationId
);
List
<
AnalyticsModelDetail
>
getAnalyticsModel
(
String
configurationId
);
int
deleteKeyValueConfiguration
(
String
keyId
);
void
addKeyValueConfiguration
(
AddKeyValueConfigDto
addKeyValueConfigDto
);
void
updateKeyValueConfiguration
(
UpdateKeyValueConfigDto
updateKeyValueConfigDto
);
boolean
isKeyValueDuplicated
(
String
name
);
List
<
KeyValueConfigDisplayDto
>
getByOrgId
(
String
orgId
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
View file @
53bc8a3d
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
com.alibaba.druid.util.StringUtils
;
import
org.apache.poi.openxml4j.exceptions.InvalidOperationException
;
import
org.nutz.lang.Strings
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.druid.util.StringUtils
;
import
pwc.taxtech.atms.common.ApplyScope
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.OperateLogType
;
...
...
@@ -19,19 +14,29 @@ import pwc.taxtech.atms.constant.enums.KeyValueConfigType;
import
pwc.taxtech.atms.dpo.AnalyticsModelDetail
;
import
pwc.taxtech.atms.dpo.FinancialStatementDetail
;
import
pwc.taxtech.atms.dpo.TaxReturnDetail
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.AddKeyValueConfigDto
;
import
pwc.taxtech.atms.dto.KeyValueConfigDisplayDto
;
import
pwc.taxtech.atms.dto.OperationResultDto
;
import
pwc.taxtech.atms.dto.UpdateKeyValueConfigDto
;
import
pwc.taxtech.atms.dto.formula.FormulaConfigDto
;
import
pwc.taxtech.atms.entity.*
;
import
pwc.taxtech.atms.service.KeyValueConfigService
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
@Service
public
class
KeyValueConfigServiceImpl
extends
AbstractService
implements
KeyValueConfigService
{
public
class
KeyValueConfigServiceImpl
extends
AbstractService
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
KeyValueConfigServiceImpl
.
class
);
private
OperateLogType
logType
=
OperateLogType
.
OperationLogKeyvalue
;
@Override
public
List
<
KeyValueConfigDisplayDto
>
get
()
{
List
<
KeyValueConfig
>
list
=
keyValueConfigMapper
.
selectKeyValueConfigsByOrderByCreateTime
();
List
<
KeyValueConfigDisplayDto
>
result
=
new
ArrayList
<>();
...
...
@@ -65,7 +70,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
result
;
}
@Override
public
OperationResultDto
<
List
<
FormulaConfigDto
>>
getAllFormulaList
()
{
OperationResultDto
<
List
<
FormulaConfigDto
>>
result
=
new
OperationResultDto
<>();
List
<
FormulaConfig
>
dbItems
=
formulaConfigMapper
.
selectByExample
(
new
FormulaConfigExample
());
...
...
@@ -76,7 +80,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
result
;
}
@Override
public
List
<
FinancialStatementDetail
>
getFinacialStatement
(
String
configurationId
)
{
Map
<
String
,
String
>
jointObjectMap
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
jointObjectMap
.
put
(
a
.
getId
(),
a
.
getName
()));
...
...
@@ -87,7 +90,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
referenceFinance
;
}
@Override
public
List
<
TaxReturnDetail
>
getTaxReturn
(
String
configurationId
)
{
Map
<
String
,
String
>
jointObjectMap
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
jointObjectMap
.
put
(
a
.
getId
(),
a
.
getName
()));
...
...
@@ -98,7 +100,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
referenceTax
;
}
@Override
public
List
<
AnalyticsModelDetail
>
getAnalyticsModel
(
String
configurationId
)
{
Map
<
String
,
String
>
industryList
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
industryList
.
put
(
a
.
getId
(),
a
.
getName
()));
...
...
@@ -112,7 +113,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
referenceModel
;
}
@Override
public
int
deleteKeyValueConfiguration
(
String
keyId
)
{
KeyValueReferenceExample
example
=
new
KeyValueReferenceExample
();
example
.
createCriteria
().
andKeyValueConfigIdEqualTo
(
keyId
);
...
...
@@ -133,7 +133,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
referenceCount
;
}
@Override
public
void
addKeyValueConfiguration
(
AddKeyValueConfigDto
addKeyValueConfigDto
)
{
Date
now
=
new
Date
();
KeyValueConfig
keyValueConfig
=
new
KeyValueConfig
();
...
...
@@ -155,7 +154,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
,
Message
.
Log
.
AddKeyValueConfiguration
,
""
,
keyValueConfig
.
getName
(),
logType
);
}
@Override
public
void
updateKeyValueConfiguration
(
UpdateKeyValueConfigDto
updateKeyValueConfigDto
)
{
KeyValueConfig
keyValueConfig
=
keyValueConfigMapper
.
selectByPrimaryKey
(
updateKeyValueConfigDto
.
getId
());
...
...
@@ -179,7 +177,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
,
keyValueConfig
.
getName
(),
"Operation content"
,
logType
);
}
@Override
public
boolean
isKeyValueDuplicated
(
String
name
)
{
KeyValueConfigExample
example
=
new
KeyValueConfigExample
();
example
.
createCriteria
().
andNameEqualTo
(
name
);
...
...
@@ -187,7 +184,6 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
return
keyValueConfig
.
isPresent
();
}
@Override
public
List
<
KeyValueConfigDisplayDto
>
getByOrgId
(
String
orgId
)
{
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
orgId
);
if
(
organization
==
null
)
{
...
...
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