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
bf6f17c4
Commit
bf6f17c4
authored
Oct 12, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed issue of rule save failed
parent
0985d834
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
67 additions
and
48 deletions
+67
-48
RuleEngineeConfigController.java
.../taxtech/atms/controller/RuleEngineeConfigController.java
+2
-1
BatchUpdateTaxRuleDto.java
...main/java/pwc/taxtech/atms/dto/BatchUpdateTaxRuleDto.java
+6
-6
TaxPayerReportRuleDto.java
...main/java/pwc/taxtech/atms/dto/TaxPayerReportRuleDto.java
+23
-7
TaxPayerReportRuleDtoOperation.java
.../pwc/taxtech/atms/dto/TaxPayerReportRuleDtoOperation.java
+6
-6
TaxRuleSettingOperation.java
...in/java/pwc/taxtech/atms/dto/TaxRuleSettingOperation.java
+6
-6
RuleEngineeConfigServiceImpl.java
...xtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
+10
-8
rule-engine-comparer.svc.js
...eConfiguration/vatRuleEnginee/rule-engine-comparer.svc.js
+1
-1
rule-enginee-config.ctrl.js
...eConfiguration/vatRuleEnginee/rule-enginee-config.ctrl.js
+4
-4
rule-enginee-custome-table.js
...onfiguration/vatRuleEnginee/rule-enginee-custome-table.js
+1
-1
taxpayer-type-exceptions-table.js
...guration/vatRuleEnginee/taxpayer-type-exceptions-table.js
+1
-1
systemConfiguration.js
atms-web/src/main/webapp/bundles/systemConfiguration.js
+7
-7
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/RuleEngineeConfigController.java
View file @
bf6f17c4
...
...
@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiOperation;
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.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
...
...
@@ -41,7 +42,7 @@ public class RuleEngineeConfigController {
}
@ApiOperation
(
value
=
""
,
notes
=
"saveTaxRuleSettings"
)
@RequestMapping
(
value
=
"taxRuleSetting/Save"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"taxRuleSetting/Save"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
saveTaxRuleSettings
(
@RequestBody
BatchUpdateTaxRuleDto
batchUpdateTaxRule
)
{
logger
.
debug
(
"RuleEngineeConfigController SaveTaxRuleSettings"
);
ruleEngineeConfigService
.
savetaxrulesettings
(
batchUpdateTaxRule
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/BatchUpdateTaxRuleDto.java
View file @
bf6f17c4
...
...
@@ -3,22 +3,22 @@ package pwc.taxtech.atms.dto;
import
java.util.List
;
public
class
BatchUpdateTaxRuleDto
{
private
List
<
TaxRuleSettingOperation
>
T
axRuleSettingOperations
;
private
List
<
TaxPayerReportRuleDtoOperation
>
T
axPayerReportRuleOperations
;
private
List
<
TaxRuleSettingOperation
>
t
axRuleSettingOperations
;
private
List
<
TaxPayerReportRuleDtoOperation
>
t
axPayerReportRuleOperations
;
public
List
<
TaxRuleSettingOperation
>
getTaxRuleSettingOperations
()
{
return
T
axRuleSettingOperations
;
return
this
.
t
axRuleSettingOperations
;
}
public
void
setTaxRuleSettingOperations
(
List
<
TaxRuleSettingOperation
>
taxRuleSettingOperations
)
{
T
axRuleSettingOperations
=
taxRuleSettingOperations
;
this
.
t
axRuleSettingOperations
=
taxRuleSettingOperations
;
}
public
List
<
TaxPayerReportRuleDtoOperation
>
getTaxPayerReportRuleOperations
()
{
return
T
axPayerReportRuleOperations
;
return
this
.
t
axPayerReportRuleOperations
;
}
public
void
setTaxPayerReportRuleOperations
(
List
<
TaxPayerReportRuleDtoOperation
>
taxPayerReportRuleOperations
)
{
T
axPayerReportRuleOperations
=
taxPayerReportRuleOperations
;
this
.
t
axPayerReportRuleOperations
=
taxPayerReportRuleOperations
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/TaxPayerReportRuleDto.java
View file @
bf6f17c4
...
...
@@ -5,18 +5,19 @@ import com.fasterxml.jackson.annotation.JsonProperty;
import
java.util.List
;
public
class
TaxPayerReportRuleDto
{
private
Lo
ng
id
;
private
Stri
ng
id
;
private
int
isDefault
;
private
int
taxPayerType
;
@JsonProperty
(
"templateGroupID"
)
private
Long
templateGroupId
;
private
String
templateGroupId
;
private
List
<
String
>
orgs
;
private
Long
editKey
;
private
Boolean
isNotPersistent
;
public
Lo
ng
getId
()
{
public
Stri
ng
getId
()
{
return
id
;
}
public
void
setId
(
Lo
ng
id
)
{
public
void
setId
(
Stri
ng
id
)
{
this
.
id
=
id
;
}
...
...
@@ -36,11 +37,11 @@ public class TaxPayerReportRuleDto {
this
.
taxPayerType
=
taxPayerType
;
}
public
Lo
ng
getTemplateGroupId
()
{
public
Stri
ng
getTemplateGroupId
()
{
return
templateGroupId
;
}
public
void
setTemplateGroupId
(
Lo
ng
templateGroupId
)
{
public
void
setTemplateGroupId
(
Stri
ng
templateGroupId
)
{
this
.
templateGroupId
=
templateGroupId
;
}
...
...
@@ -53,4 +54,19 @@ public class TaxPayerReportRuleDto {
}
public
Long
getEditKey
()
{
return
editKey
;
}
public
void
setEditKey
(
Long
editKey
)
{
this
.
editKey
=
editKey
;
}
public
Boolean
getNotPersistent
()
{
return
isNotPersistent
;
}
public
void
setNotPersistent
(
Boolean
notPersistent
)
{
isNotPersistent
=
notPersistent
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/TaxPayerReportRuleDtoOperation.java
View file @
bf6f17c4
package
pwc
.
taxtech
.
atms
.
dto
;
public
class
TaxPayerReportRuleDtoOperation
{
private
String
A
ction
;
private
TaxPayerReportRuleDto
T
axPayerReportRule
;
private
String
a
ction
;
private
TaxPayerReportRuleDto
t
axPayerReportRule
;
public
String
getAction
()
{
return
A
ction
;
return
a
ction
;
}
public
void
setAction
(
String
action
)
{
A
ction
=
action
;
this
.
a
ction
=
action
;
}
public
TaxPayerReportRuleDto
getTaxPayerReportRule
()
{
return
T
axPayerReportRule
;
return
this
.
t
axPayerReportRule
;
}
public
void
setTaxPayerReportRule
(
TaxPayerReportRuleDto
taxPayerReportRule
)
{
T
axPayerReportRule
=
taxPayerReportRule
;
this
.
t
axPayerReportRule
=
taxPayerReportRule
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/dto/TaxRuleSettingOperation.java
View file @
bf6f17c4
package
pwc
.
taxtech
.
atms
.
dto
;
public
class
TaxRuleSettingOperation
{
private
String
A
ction
;
private
TaxRuleSettingDto
T
axRuleSetting
;
private
String
a
ction
;
private
TaxRuleSettingDto
t
axRuleSetting
;
public
String
getAction
()
{
return
A
ction
;
return
this
.
a
ction
;
}
public
void
setAction
(
String
action
)
{
A
ction
=
action
;
this
.
a
ction
=
action
;
}
public
TaxRuleSettingDto
getTaxRuleSetting
()
{
return
T
axRuleSetting
;
return
t
axRuleSetting
;
}
public
void
setTaxRuleSetting
(
TaxRuleSettingDto
taxPayerReportRule
)
{
T
axRuleSetting
=
taxPayerReportRule
;
this
.
t
axRuleSetting
=
taxPayerReportRule
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RuleEngineeConfigServiceImpl.java
View file @
bf6f17c4
...
...
@@ -45,19 +45,18 @@ public class RuleEngineeConfigServiceImpl extends AbstractService {
List
<
TaxPayerReportRule
>
filterRules
=
new
ArrayList
<>();
for
(
TaxPayerReportRule
rule
:
rules
)
{
boolean
isAtLeastOrgExisted
=
false
;
if
(
StringUtils
.
isNotBlank
(
rule
.
getOrganizationId
()))
{
String
[]
selectedOrgIds
=
rule
.
getOrganizationId
().
split
(
","
);
boolean
isAtLeastOrgExisted
=
false
;
for
(
String
selectedOrgId
:
selectedOrgIds
)
{
if
(
orgIds
.
contains
(
selectedOrgId
))
{
isAtLeastOrgExisted
=
true
;
}
}
if
(
isAtLeastOrgExisted
||
rule
.
getIsDefault
())
{
filterRules
.
add
(
rule
);
}
}
if
(
isAtLeastOrgExisted
||
rule
.
getIsDefault
())
{
filterRules
.
add
(
rule
);
}
}
...
...
@@ -65,7 +64,9 @@ public class RuleEngineeConfigServiceImpl extends AbstractService {
for
(
TaxPayerReportRule
rule
:
filterRules
)
{
TaxPayerReportRuleDto
ruleDto
=
new
TaxPayerReportRuleDto
();
CommonUtils
.
copyProperties
(
rule
,
ruleDto
);
ruleDto
.
setOrgs
(
new
ArrayList
<>(
Arrays
.
asList
(
rule
.
getOrganizationId
().
split
(
","
))));
if
(
rule
.
getOrganizationId
()!=
null
)
{
ruleDto
.
setOrgs
(
new
ArrayList
<>(
Arrays
.
asList
(
rule
.
getOrganizationId
().
split
(
","
))));
}
dtoList
.
add
(
ruleDto
);
}
return
dtoList
;
...
...
@@ -128,16 +129,17 @@ public class RuleEngineeConfigServiceImpl extends AbstractService {
sb
.
append
(
s
).
append
(
","
);
}
String
tempStr
=
sb
.
toString
();
taxPayerReportRule
.
setOrganizationId
(
tempStr
.
substring
(
0
,
tempStr
.
length
()
-
2
));
taxPayerReportRule
.
setOrganizationId
(
tempStr
.
substring
(
0
,
tempStr
.
length
()
-
1
));
taxPayerReportRule
.
setCreateTime
(
new
Date
());
taxPayerReportRule
.
setUpdateTime
(
new
Date
());
SaveOrganizationServiceTemplateGroup
(
taxPayerReportRule
,
tprrdo
.
getAction
());
if
(
"Add"
.
equals
(
tprrdo
.
getAction
()))
{
taxPayerReportRule
.
setId
(
distributedIdService
.
nextId
());
taxPayerReportRuleMapper
.
insert
(
taxPayerReportRule
);
// operationService.addDataAddLog(taxPayerReportRule, OperationModule.RuleEngineConfig, authUserHelper.getCurrentUserId(),
// "AddRuleEngineConfiguration", "纳税类型", "纳税类型添加特殊机构", OperateLogType.OperationLogRuleEngine);
}
else
if
(
"Update"
.
equals
(
tprrdo
.
getAction
()))
{
TaxPayerReportRule
old
=
taxPayerReportRuleMapper
.
selectByPrimaryKey
(
reportDto
.
getId
(
));
TaxPayerReportRule
old
=
taxPayerReportRuleMapper
.
selectByPrimaryKey
(
Long
.
parseLong
(
reportDto
.
getId
()
));
TaxPayerReportRule
original
=
new
TaxPayerReportRule
();
CommonUtils
.
copyProperties
(
old
,
original
);
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/ruleEngineeConfiguration/vatRuleEnginee/rule-engine-comparer.svc.js
View file @
bf6f17c4
...
...
@@ -34,7 +34,7 @@
state
=
itemState
.
Modified
;
}
if
(
originalItem
.
templateGroupI
D
!==
updatedItem
.
templateGroupID
)
{
if
(
originalItem
.
templateGroupI
d
!==
updatedItem
.
templateGroupId
)
{
state
=
itemState
.
Modified
;
}
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/ruleEngineeConfiguration/vatRuleEnginee/rule-enginee-config.ctrl.js
View file @
bf6f17c4
...
...
@@ -20,7 +20,7 @@
}))[
0
];
if
(
$scope
.
defaultTaxPayerReportMapping
){
$scope
.
defaultTaxPayerReportMapping
.
templateGroupI
D
=
$scope
.
defaultTaxPayerReportMapping
.
templateGroupID
.
toString
();
$scope
.
defaultTaxPayerReportMapping
.
templateGroupI
d
=
$scope
.
defaultTaxPayerReportMapping
.
templateGroupId
.
toString
();
}
$scope
.
taxPayerReportMappingExceptions
=
taxPayerReportMappings
.
filter
(
function
(
item
)
{
...
...
@@ -28,11 +28,11 @@
});
$scope
.
taxPayerReportMappingExceptions
.
forEach
(
function
(
value
)
{
value
.
templateGroupI
D
=
value
.
templateGroupID
.
toString
();
value
.
templateGroupI
d
=
value
.
templateGroupId
.
toString
();
});
taxReportRuleOrginal
.
forEach
(
function
(
value
)
{
value
.
templateGroupI
D
=
value
.
templateGroupID
.
toString
();
value
.
templateGroupI
d
=
value
.
templateGroupId
.
toString
();
});
});
...
...
@@ -111,7 +111,7 @@
$scope
.
defaultReportTypeOption
=
{
bindingOptions
:
{
value
:
'defaultTaxPayerReportMapping.templateGroupI
D
'
,
value
:
'defaultTaxPayerReportMapping.templateGroupI
d
'
,
dataSource
:
{
deep
:
true
,
dataPath
:
'reportTypes'
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/ruleEngineeConfiguration/vatRuleEnginee/rule-enginee-custome-table.js
View file @
bf6f17c4
...
...
@@ -29,7 +29,7 @@
});
scope
.
addException
=
function
()
{
var
newException
=
{
id
:
PWC
.
newGuid
()
,
GroupName
:
scope
.
editModel
.
groupName
,
name
:
scope
.
editModel
.
name
,
isNotPersistent
:
true
,
taxBase
:
''
,
editKey
:
+
new
Date
()
};
var
newException
=
{
id
:
0
,
GroupName
:
scope
.
editModel
.
groupName
,
name
:
scope
.
editModel
.
name
,
isNotPersistent
:
true
,
taxBase
:
''
,
editKey
:
+
new
Date
()
};
scope
.
editModel
.
taxRuleSettingsExceptions
.
push
(
newException
);
};
...
...
atms-web/src/main/webapp/app/admin/systemConfiguration/ruleEngineeConfiguration/vatRuleEnginee/taxpayer-type-exceptions-table.js
View file @
bf6f17c4
...
...
@@ -32,7 +32,7 @@
};
scope
.
addException
=
function
()
{
var
newException
=
{
id
:
PWC
.
newGuid
()
,
isNotPersistent
:
true
,
editKey
:
+
new
Date
()
};
var
newException
=
{
id
:
0
,
isNotPersistent
:
true
,
editKey
:
+
new
Date
()
};
ruleEngineOp
.
addTaxPayerReportRuleOperation
(
newException
);
scope
.
taxPayerExceptions
.
push
(
newException
);
};
...
...
atms-web/src/main/webapp/bundles/systemConfiguration.js
View file @
bf6f17c4
...
...
@@ -7007,7 +7007,7 @@ systemConfigurationModule.factory('ruleEngineComparer', ['ruleEngineService', fu
state
=
itemState
.
Modified
;
}
if
(
originalItem
.
templateGroupI
D
!==
updatedItem
.
templateGroupID
)
{
if
(
originalItem
.
templateGroupI
d
!==
updatedItem
.
templateGroupId
)
{
state
=
itemState
.
Modified
;
}
...
...
@@ -7268,7 +7268,7 @@ systemConfigurationModule.controller('ruleEngineeConfigController', ['$scope', '
}))[
0
];
if
(
$scope
.
defaultTaxPayerReportMapping
){
$scope
.
defaultTaxPayerReportMapping
.
templateGroupI
D
=
$scope
.
defaultTaxPayerReportMapping
.
templateGroupID
.
toString
();
$scope
.
defaultTaxPayerReportMapping
.
templateGroupI
d
=
$scope
.
defaultTaxPayerReportMapping
.
templateGroupId
.
toString
();
}
$scope
.
taxPayerReportMappingExceptions
=
taxPayerReportMappings
.
filter
(
function
(
item
)
{
...
...
@@ -7276,11 +7276,11 @@ systemConfigurationModule.controller('ruleEngineeConfigController', ['$scope', '
});
$scope
.
taxPayerReportMappingExceptions
.
forEach
(
function
(
value
)
{
value
.
templateGroupI
D
=
value
.
templateGroupID
.
toString
();
value
.
templateGroupI
d
=
value
.
templateGroupId
.
toString
();
});
taxReportRuleOrginal
.
forEach
(
function
(
value
)
{
value
.
templateGroupI
D
=
value
.
templateGroupID
.
toString
();
value
.
templateGroupI
d
=
value
.
templateGroupId
.
toString
();
});
});
...
...
@@ -7359,7 +7359,7 @@ systemConfigurationModule.controller('ruleEngineeConfigController', ['$scope', '
$scope
.
defaultReportTypeOption
=
{
bindingOptions
:
{
value
:
'defaultTaxPayerReportMapping.templateGroupI
D
'
,
value
:
'defaultTaxPayerReportMapping.templateGroupI
d
'
,
dataSource
:
{
deep
:
true
,
dataPath
:
'reportTypes'
...
...
@@ -7667,7 +7667,7 @@ systemConfigurationModule.directive('ruleEngineeTable', ['$log','ruleEngineOp','
});
scope
.
addException
=
function
()
{
var
newException
=
{
id
:
PWC
.
newGuid
()
,
GroupName
:
scope
.
editModel
.
groupName
,
name
:
scope
.
editModel
.
name
,
isNotPersistent
:
true
,
taxBase
:
''
,
editKey
:
+
new
Date
()
};
var
newException
=
{
id
:
0
,
GroupName
:
scope
.
editModel
.
groupName
,
name
:
scope
.
editModel
.
name
,
isNotPersistent
:
true
,
taxBase
:
''
,
editKey
:
+
new
Date
()
};
scope
.
editModel
.
taxRuleSettingsExceptions
.
push
(
newException
);
};
...
...
@@ -7725,7 +7725,7 @@ systemConfigurationModule.directive('taxpayerTypeExceptionsTable', ['$log','rule
};
scope
.
addException
=
function
()
{
var
newException
=
{
id
:
PWC
.
newGuid
()
,
isNotPersistent
:
true
,
editKey
:
+
new
Date
()
};
var
newException
=
{
id
:
0
,
isNotPersistent
:
true
,
editKey
:
+
new
Date
()
};
ruleEngineOp
.
addTaxPayerReportRuleOperation
(
newException
);
scope
.
taxPayerExceptions
.
push
(
newException
);
};
...
...
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