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
3aabd163
Commit
3aabd163
authored
Jun 04, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add the code for KeyValueConfiguration
parent
0a860d94
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
229 additions
and
35 deletions
+229
-35
KeyValueConfigType.java
...a/pwc/taxtech/atms/constant/enums/KeyValueConfigType.java
+16
-0
KeyValueConfigController.java
...pwc/taxtech/atms/controller/KeyValueConfigController.java
+79
-11
RemoteValidationRetDto.java
...a/pwc/taxtech/atms/dto/Common/RemoteValidationRetDto.java
+22
-0
KeyValueConfigService.java
.../java/pwc/taxtech/atms/service/KeyValueConfigService.java
+1
-1
OperationLogService.java
...in/java/pwc/taxtech/atms/service/OperationLogService.java
+6
-3
KeyValueConfigServiceImpl.java
.../taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
+96
-11
Message.java
.../src/main/java/pwc/taxtech/atms/service/impl/Message.java
+0
-0
OperationLogServiceImpl.java
...wc/taxtech/atms/service/impl/OperationLogServiceImpl.java
+3
-3
RuleEngineeConfigServiceImpl.java
...xtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
+6
-6
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/KeyValueConfigType.java
0 → 100644
View file @
3aabd163
package
pwc
.
taxtech
.
atms
.
constant
.
enums
;
public
enum
KeyValueConfigType
{
SystemFundation
(
1
),
Customize
(
2
);
private
Integer
code
;
KeyValueConfigType
(
Integer
code
)
{
this
.
code
=
code
;
}
public
Integer
getCode
()
{
return
code
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/KeyValueConfigController.java
View file @
3aabd163
...
...
@@ -2,18 +2,17 @@ package pwc.taxtech.atms.controller;
import
java.util.List
;
import
javassist.tools.web.BadHttpRequest
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
io.swagger.annotations.ApiOperation
;
import
pwc.taxtech.atms.dto.
KeyValueConfigDisplayDto
;
import
pwc.taxtech.atms.dto.
OperationResul
tDto
;
import
pwc.taxtech.atms.dto.
*
;
import
pwc.taxtech.atms.dto.
Common.RemoteValidationRe
tDto
;
import
pwc.taxtech.atms.dto.formula.FormulaConfigDto
;
import
pwc.taxtech.atms.service.KeyValueConfigService
;
...
...
@@ -25,15 +24,84 @@ public class KeyValueConfigController {
@Autowired
private
KeyValueConfigService
keyValueConfigService
;
@ApiOperation
(
value
=
"get keyValueConfig"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
KeyValueConfigDisplayDto
>
get
(){
@ApiOperation
(
value
=
"get keyValueConfig"
)
@RequestMapping
(
value
=
""
,
method
=
RequestMethod
.
GET
)
public
@ResponseBody
List
<
KeyValueConfigDisplayDto
>
get
()
{
return
keyValueConfigService
.
get
();
}
@RequestMapping
(
value
=
"dataSource"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"dataSource"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
OperationResultDto
<
List
<
FormulaConfigDto
>>
getDataSource
(){
OperationResultDto
<
List
<
FormulaConfigDto
>>
getDataSource
()
{
return
keyValueConfigService
.
getAllFormulaList
();
}
@RequestMapping
(
value
=
"getFinacialReference/{keyValueID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
FinancialStatementDetail
>
getFinacialStatementReference
(
@PathVariable
String
keyValueID
)
throws
BadHttpRequest
{
if
(
StringUtils
.
isBlank
(
keyValueID
))
{
throw
new
BadHttpRequest
(
new
Exception
(
"keyValueID is null"
));
}
return
keyValueConfigService
.
getFinacialStatement
(
keyValueID
);
}
@RequestMapping
(
value
=
"getTaxReference/{keyValueID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
TaxReturnDetail
>
getTaxReturnReference
(
@PathVariable
String
keyValueID
)
throws
BadHttpRequest
{
if
(
StringUtils
.
isBlank
(
keyValueID
))
{
throw
new
BadHttpRequest
(
new
Exception
(
"keyValueID is null"
));
}
return
keyValueConfigService
.
getTaxReturn
(
keyValueID
);
}
@RequestMapping
(
value
=
"getModelReference/{keyValueID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
AnalyticsModelDetail
>
getAnalyticsModelReference
(
@PathVariable
String
keyValueID
)
throws
BadHttpRequest
{
if
(
StringUtils
.
isBlank
(
keyValueID
))
{
throw
new
BadHttpRequest
(
new
Exception
(
"keyValueID is null"
));
}
return
keyValueConfigService
.
getAnalyticsModel
(
keyValueID
);
}
@RequestMapping
(
value
=
"add"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
addKeyValueConfiguration
(
@RequestBody
AddKeyValueConfigDto
addKeyValueConfigDto
)
{
//todo: add userName @ here
addKeyValueConfigDto
.
setUserName
(
""
);
keyValueConfigService
.
addKeyValueConfiguration
(
addKeyValueConfigDto
);
}
@RequestMapping
(
value
=
"update"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
updateKeyValueConfiguration
(
@RequestBody
UpdateKeyValueConfigDto
updateKeyValueConfigDto
)
{
//todo: add userName @ here
updateKeyValueConfigDto
.
setUserName
(
""
);
keyValueConfigService
.
updateKeyValueConfiguration
(
updateKeyValueConfigDto
);
}
@RequestMapping
(
method
=
RequestMethod
.
DELETE
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
int
delelte
(
@RequestParam
String
keyValueID
)
throws
BadHttpRequest
{
if
(
StringUtils
.
isBlank
(
keyValueID
))
{
throw
new
BadHttpRequest
(
new
Exception
(
"keyValueID is null"
));
}
return
keyValueConfigService
.
deleteKeyValueConfiguration
(
keyValueID
);
}
@RequestMapping
(
value
=
"getByOrgID/{orgID}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
List
<
KeyValueConfigDisplayDto
>
getByOrgID
(
@PathVariable
String
orgID
)
{
return
keyValueConfigService
.
getByOrgID
(
orgID
);
}
@RequestMapping
(
value
=
"isDuplicated"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
@ResponseBody
RemoteValidationRetDto
isDuplicated
(
@RequestParam
String
value
)
{
boolean
isDuplicated
=
keyValueConfigService
.
isKeyValueDuplicated
(
value
);
RemoteValidationRetDto
result
=
new
RemoteValidationRetDto
();
result
.
setValid
(!
isDuplicated
);
result
.
setValue
(
value
);
return
result
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/Common/RemoteValidationRetDto.java
0 → 100644
View file @
3aabd163
package
pwc
.
taxtech
.
atms
.
dto
.
Common
;
public
class
RemoteValidationRetDto
{
private
boolean
isValid
;
private
String
value
;
public
boolean
isValid
()
{
return
isValid
;
}
public
void
setValid
(
boolean
valid
)
{
isValid
=
valid
;
}
public
String
getValue
()
{
return
value
;
}
public
void
setValue
(
String
value
)
{
this
.
value
=
value
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/KeyValueConfigService.java
View file @
3aabd163
...
...
@@ -16,7 +16,7 @@ public interface KeyValueConfigService {
List
<
AnalyticsModelDetail
>
getAnalyticsModel
(
String
configurationID
);
int
deleteKeyValueConfiguration
(
String
keyID
,
String
userName
);
int
deleteKeyValueConfiguration
(
String
keyID
);
void
addKeyValueConfiguration
(
AddKeyValueConfigDto
addKeyValueConfigDto
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/OperationLogService.java
View file @
3aabd163
...
...
@@ -41,9 +41,12 @@ public interface OperationLogService {
*/
void
addOrDeleteDataAddLog
(
UpdateLogParams
updateLogParams
);
void
AddDataAddLog
(
Object
newObj
,
OperationModule
operationModule
,
String
userName
,
String
operationDesc
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
);
void
addDataAddLog
(
Object
newObj
,
OperationModule
operationModule
,
String
userName
,
String
operationDesc
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
);
void
UpdateDataAddLog
(
Object
originalObj
,
Object
updateObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationObject
,
String
operationContent
,
OperateLogType
logType
);
void
updateDataAddLog
(
Object
originalObj
,
Object
updateObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationObject
,
String
operationContent
,
OperateLogType
logType
);
void
DeleteDataAddLog
(
Object
deleteObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
);
void
deleteDataAddLog
(
Object
deleteObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
);
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/KeyValueConfigServiceImpl.java
View file @
3aabd163
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
import
java.util.stream.Collectors
;
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
;
...
...
@@ -15,6 +13,10 @@ import com.alibaba.druid.util.StringUtils;
import
pwc.taxtech.atms.common.ApplyScope
;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.OperateLogType
;
import
pwc.taxtech.atms.common.OperationModule
;
import
pwc.taxtech.atms.constant.enums.KeyValueConfigType
;
import
pwc.taxtech.atms.dao.KeyValueConfigMapper
;
import
pwc.taxtech.atms.dto.*
;
import
pwc.taxtech.atms.dto.formula.FormulaConfigDto
;
import
pwc.taxtech.atms.entitiy.*
;
...
...
@@ -25,6 +27,8 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
KeyValueConfigServiceImpl
.
class
);
private
OperateLogType
logType
=
OperateLogType
.
OperationLogKeyvalue
;
@Override
public
List
<
KeyValueConfigDisplayDto
>
get
()
{
List
<
KeyValueConfig
>
list
=
keyValueConfigMapper
.
selectKeyValueConfigsByOrderByCreateTime
();
...
...
@@ -42,7 +46,7 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
dtoObj
.
setIndustrys
(
getNamesByIDs
(
keyValueConfig
.
getIndustryIDs
(),
industryList
));
dtoObj
.
setIndustryIds
(
Arrays
.
asList
(
keyValueConfig
.
getIndustryIDs
().
split
(
","
)));
dtoObj
.
setServiceTypeIds
(
Arrays
.
asList
(
keyValueConfig
.
getServiceTypeIDs
().
split
(
","
)));
List
<
KeyValueReference
>
selectScopeList
=
scopes
.
stream
().
filter
(
item
->
item
.
getKeyValueConfigID
().
equals
(
item
.
getID
())).
collect
(
Collectors
.
toList
());
List
<
KeyValueReference
>
selectScopeList
=
scopes
.
stream
().
filter
(
item
->
item
.
getKeyValueConfigID
().
equals
(
keyValueConfig
.
getID
())).
collect
(
Collectors
.
toList
());
List
<
Integer
>
selectScopes
=
selectScopeList
.
stream
().
map
(
KeyValueReference:
:
getScope
).
distinct
().
collect
(
Collectors
.
toList
());
Map
<
Integer
,
Integer
>
scopeCount
=
new
HashMap
<>();
if
(
selectScopeList
.
size
()
>
0
)
{
...
...
@@ -107,28 +111,109 @@ public class KeyValueConfigServiceImpl extends AbstractService implements KeyVal
}
@Override
public
int
deleteKeyValueConfiguration
(
String
keyID
,
String
userName
)
{
return
0
;
public
int
deleteKeyValueConfiguration
(
String
keyID
)
{
KeyValueReferenceExample
example
=
new
KeyValueReferenceExample
();
example
.
createCriteria
().
andKeyValueConfigIDEqualTo
(
keyID
);
int
referenceCount
=
(
int
)
keyValueReferenceMapper
.
countByExample
(
example
);
if
(
referenceCount
==
0
)
{
KeyValueConfigExample
kvcExample
=
new
KeyValueConfigExample
();
kvcExample
.
createCriteria
().
andIDEqualTo
(
keyID
).
andKeyValueTypeEqualTo
(
KeyValueConfigType
.
Customize
.
getCode
());
Optional
<
KeyValueConfig
>
deleteKey
=
keyValueConfigMapper
.
selectByExample
(
kvcExample
).
stream
().
findFirst
();
if
(
deleteKey
.
isPresent
())
{
keyValueConfigMapper
.
deleteByPrimaryKey
(
deleteKey
.
get
().
getID
());
operationLogService
.
deleteDataAddLog
(
deleteKey
,
OperationModule
.
KeyValueConfig
,
""
,
"DeleteKeyValueConfiguration"
,
""
,
deleteKey
.
get
().
getName
(),
logType
);
referenceCount
=
1
;
}
}
else
{
referenceCount
=
-
1
;
}
return
referenceCount
;
}
@Override
public
void
addKeyValueConfiguration
(
AddKeyValueConfigDto
addKeyValueConfigDto
)
{
Date
now
=
new
Date
();
KeyValueConfig
keyValueConfig
=
new
KeyValueConfig
();
CommonUtils
.
copyProperties
(
addKeyValueConfigDto
,
keyValueConfig
);
keyValueConfig
.
setIndustryIDs
(
Strings
.
join
(
","
,
addKeyValueConfigDto
.
getIndustryIds
()));
keyValueConfig
.
setServiceTypeIDs
(
Strings
.
join
(
","
,
addKeyValueConfigDto
.
getServiceTypeIds
()));
String
guid
=
CommonUtils
.
getUUID
();
keyValueConfig
.
setID
(
guid
);
keyValueConfig
.
setKeyCode
(
guid
.
replaceAll
(
"-"
,
""
));
keyValueConfig
.
setIsConstant
(
0
);
keyValueConfig
.
setCalculateStatus
(
99
);
keyValueConfig
.
setCreateTime
(
now
);
keyValueConfig
.
setUpdateTime
(
now
);
keyValueConfig
.
setUpdator
(
addKeyValueConfigDto
.
getUserName
());
keyValueConfig
.
setKeyValueType
(
2
);
keyValueConfigMapper
.
insert
(
keyValueConfig
);
operationLogService
.
addDataAddLog
(
keyValueConfig
,
OperationModule
.
KeyValueConfig
,
addKeyValueConfigDto
.
getUserName
()
,
Message
.
Log
.
AddKeyValueConfiguration
,
""
,
keyValueConfig
.
getName
(),
logType
);
}
@Override
public
void
updateKeyValueConfiguration
(
UpdateKeyValueConfigDto
updateKeyValueConfigDto
)
{
KeyValueConfig
keyValueConfig
=
keyValueConfigMapper
.
selectByPrimaryKey
(
updateKeyValueConfigDto
.
getID
());
if
(
keyValueConfig
==
null
)
{
throw
new
InvalidOperationException
(
"Not found"
);
}
KeyValueConfig
original
=
new
KeyValueConfig
();
CommonUtils
.
copyProperties
(
keyValueConfig
,
original
);
keyValueConfig
.
setFormula
(
updateKeyValueConfigDto
.
getFormula
());
keyValueConfig
.
setDescription
(
updateKeyValueConfigDto
.
getDescription
());
keyValueConfig
.
setName
(
updateKeyValueConfigDto
.
getName
());
keyValueConfig
.
setDataSource
(
updateKeyValueConfigDto
.
getDataSource
());
keyValueConfig
.
setServiceTypeIDs
(
Strings
.
join
(
","
,
updateKeyValueConfigDto
.
getServiceTypeIDs
()));
keyValueConfig
.
setIndustryIDs
(
Strings
.
join
(
","
,
updateKeyValueConfigDto
.
getIndustryIDs
()));
keyValueConfigMapper
.
updateByPrimaryKey
(
keyValueConfig
);
operationLogService
.
updateDataAddLog
(
original
,
keyValueConfig
,
OperationModule
.
KeyValueConfig
,
updateKeyValueConfigDto
.
getUserName
(),
Message
.
Log
.
UpdateKeyValueConfiguration
,
keyValueConfig
.
getName
(),
"Operation content"
,
logType
);
}
@Override
public
boolean
isKeyValueDuplicated
(
String
name
)
{
return
false
;
KeyValueConfigExample
example
=
new
KeyValueConfigExample
();
example
.
createCriteria
().
andNameEqualTo
(
name
);
Optional
<
KeyValueConfig
>
keyValueConfig
=
keyValueConfigMapper
.
selectByExample
(
example
).
stream
().
findFirst
();
return
keyValueConfig
.
isPresent
();
}
@Override
public
List
<
KeyValueConfigDisplayDto
>
getByOrgID
(
String
orgID
)
{
return
null
;
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
orgID
);
if
(
organization
==
null
)
{
return
new
ArrayList
<>();
}
KeyValueConfigExample
example
=
new
KeyValueConfigExample
();
example
.
createCriteria
().
andIndustryIDsLike
(
organization
.
getIndustryID
());
List
<
KeyValueConfig
>
list
=
keyValueConfigMapper
.
selectByExample
(
example
);
List
<
KeyValueConfigDisplayDto
>
result
=
new
ArrayList
<>();
if
(
list
.
size
()
>
0
)
{
Map
<
String
,
String
>
industryList
=
new
HashMap
<>();
industryMapper
.
selectByExample
(
new
IndustryExample
()).
forEach
(
a
->
industryList
.
put
(
a
.
getID
(),
a
.
getName
()));
Map
<
String
,
String
>
serviceType
=
new
HashMap
<>();
serviceTypeMapper
.
selectByExample
(
new
ServiceTypeExample
()).
forEach
(
a
->
serviceType
.
put
(
a
.
getID
(),
a
.
getName
()));
List
<
KeyValueReference
>
scopes
=
keyValueReferenceMapper
.
selectByExample
(
new
KeyValueReferenceExample
());
for
(
KeyValueConfig
item
:
list
)
{
KeyValueConfigDisplayDto
dtoObj
=
new
KeyValueConfigDisplayDto
();
CommonUtils
.
copyProperties
(
item
,
dtoObj
);
dtoObj
.
setServiceTypes
(
getNamesByIDs
(
item
.
getServiceTypeIDs
(),
serviceType
));
dtoObj
.
setIndustrys
(
getNamesByIDs
(
item
.
getIndustryIDs
(),
industryList
));
dtoObj
.
setIndustryIds
(
new
ArrayList
<>(
Arrays
.
asList
(
item
.
getIndustryIDs
().
split
(
","
))));
List
<
Integer
>
selectScopes
=
scopes
.
stream
().
filter
(
a
->
a
.
getKeyValueConfigID
().
equals
(
item
.
getID
()))
.
map
(
KeyValueReference:
:
getScope
).
collect
(
Collectors
.
toList
());
dtoObj
.
setScopeSummary
(
jointToString
(
selectScopes
));
result
.
add
(
dtoObj
);
}
}
return
result
;
}
private
String
jointToString
(
List
<
Integer
>
selectScopes
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/Message.java
0 → 100644
View file @
3aabd163
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogServiceImpl.java
View file @
3aabd163
...
...
@@ -450,7 +450,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
}
@Override
public
void
A
ddDataAddLog
(
Object
newObj
,
OperationModule
operationModule
,
String
userName
,
String
operationDesc
,
public
void
a
ddDataAddLog
(
Object
newObj
,
OperationModule
operationModule
,
String
userName
,
String
operationDesc
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
)
{
OperationLogDto
addLog
=
new
OperationLogDto
();
...
...
@@ -470,7 +470,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
}
@Override
public
void
U
pdateDataAddLog
(
Object
originalObj
,
Object
updateObj
,
OperationModule
operationModule
,
String
userName
,
public
void
u
pdateDataAddLog
(
Object
originalObj
,
Object
updateObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationObject
,
String
operationContent
,
OperateLogType
logType
)
{
UpdateLogParams
params
=
new
UpdateLogParams
();
params
.
setOriginalState
(
originalObj
);
...
...
@@ -486,7 +486,7 @@ public class OperationLogServiceImpl extends AbstractService implements Operatio
}
@Override
public
void
D
eleteDataAddLog
(
Object
deleteObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
public
void
d
eleteDataAddLog
(
Object
deleteObj
,
OperationModule
operationModule
,
String
userName
,
String
comment
,
String
operationContent
,
String
OperationObject
,
OperateLogType
logType
)
{
OperationLogDto
addLog
=
new
OperationLogDto
();
addLog
.
setID
(
CommonUtils
.
getUUID
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
View file @
3aabd163
...
...
@@ -115,7 +115,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
taxRuleSettingOrganizationMapper
.
deleteByExample
(
trsoExample
);
taxRuleSettingMapper
.
deleteByPrimaryKey
(
taxRuleSetting
.
getID
());
operationService
.
D
eleteDataAddLog
(
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
operationService
.
d
eleteDataAddLog
(
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
"DeleteRuleEngineConfiguration"
,
""
,
taxRuleSetting
.
getName
(),
OperateLogType
.
OperationLogRuleEngine
);
}
...
...
@@ -136,7 +136,7 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
SaveOrganizationServiceTemplateGroup
(
taxPayerReportRule
,
tprrdo
.
getAction
());
if
(
"Add"
.
equals
(
tprrdo
.
getAction
()))
{
taxPayerReportRuleMapper
.
insert
(
taxPayerReportRule
);
operationService
.
A
ddDataAddLog
(
taxPayerReportRule
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
operationService
.
a
ddDataAddLog
(
taxPayerReportRule
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
"AddRuleEngineConfiguration"
,
"纳税类型"
,
"纳税类型添加特殊机构"
,
OperateLogType
.
OperationLogRuleEngine
);
}
else
if
(
"Update"
.
equals
(
tprrdo
.
getAction
()))
{
...
...
@@ -152,13 +152,13 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
old
.
setUpdateTime
(
taxPayerReportRule
.
getUpdateTime
());
taxPayerReportRuleMapper
.
updateByPrimaryKey
(
old
);
operationService
.
U
pdateDataAddLog
(
original
,
taxPayerReportRule
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
operationService
.
u
pdateDataAddLog
(
original
,
taxPayerReportRule
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
"UpdateRuleEngineConfiguration"
,
"纳税类型"
,
taxPayerReportRule
.
getIsDefault
()
?
"默认纳税类型或默认纳税报表"
:
"纳税类型更新特殊机构"
,
OperateLogType
.
OperationLogRuleEngine
);
}
else
if
(
"Delete"
.
equals
(
tprrdo
.
getAction
()))
{
taxPayerReportRuleMapper
.
deleteByPrimaryKey
(
taxPayerReportRule
.
getID
());
operationService
.
D
eleteDataAddLog
(
reportDto
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
operationService
.
d
eleteDataAddLog
(
reportDto
,
OperationModule
.
RuleEngineConfig
,
authUserHelper
.
getCurrentUserID
(),
"DeleteRuleEngineConfiguration"
,
"纳税类型"
,
"纳税类型删除特殊机构"
,
OperateLogType
.
OperationLogRuleEngine
);
}
}
...
...
@@ -174,13 +174,13 @@ public class RuleEngineeConfigServiceImpl extends AbstractService implements Rul
trso
.
setUpdateTime
(
new
Date
());
trso
.
setCreateTime
(
new
Date
());
if
(
"Add"
.
equals
(
taxRuleSettingOperation
.
getAction
()))
{
operationLogService
.
A
ddDataAddLog
(
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
userName
,
operationLogService
.
a
ddDataAddLog
(
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
userName
,
"AddRuleEngineConfiguration"
,
taxRuleSetting
.
getName
()
+
org
,
taxRuleSetting
.
getName
(),
OperateLogType
.
OperationLogRuleEngine
);
}
else
{
TaxRuleSetting
original
=
new
TaxRuleSetting
();
CommonUtils
.
copyProperties
(
old
,
original
);
operationService
.
U
pdateDataAddLog
(
original
,
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
userName
,
operationService
.
u
pdateDataAddLog
(
original
,
taxRuleSetting
,
OperationModule
.
RuleEngineConfig
,
userName
,
"UpdateRuleEngineConfiguration"
,
taxRuleSetting
.
getName
(),
taxRuleSetting
.
getIsDefault
()
?
"默认税基或默认税率"
:
taxRuleSetting
.
getName
(),
OperateLogType
.
OperationLogRuleEngine
);
...
...
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