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
1f74d0af
Commit
1f74d0af
authored
Apr 16, 2019
by
Cheng C Yang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 23451
parent
f6a94285
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
6 deletions
+33
-6
RevenueConfController.java
...va/pwc/taxtech/atms/controller/RevenueConfController.java
+1
-2
RevenueConfService.java
...ava/pwc/taxtech/atms/service/impl/RevenueConfService.java
+16
-1
vat.json
atms-web/src/main/webapp/app-resources/i18n/en-us/vat.json
+2
-0
vat.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
+3
-0
add-exist-dimension-modal.ctrl.js
...d-exist-dimension-modal/add-exist-dimension-modal.ctrl.js
+2
-2
vat-revenue-config.ctrl.js
.../dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
+9
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/RevenueConfController.java
View file @
1f74d0af
...
...
@@ -34,8 +34,7 @@ public class RevenueConfController extends BaseController {
@PostMapping
(
"add"
)
public
ApiResultDto
addConf
(
@RequestBody
RevConfAddDto
addDto
)
{
revenueConfService
.
addConfig
(
addDto
);
return
ApiResultDto
.
success
();
return
revenueConfService
.
addConfig
(
addDto
);
}
@PostMapping
(
"update"
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/RevenueConfService.java
View file @
1f74d0af
...
...
@@ -8,6 +8,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.constant.enums.RevenueConfEnum
;
import
pwc.taxtech.atms.dpo.OrgSelectDto
;
import
pwc.taxtech.atms.dto.ApiResultDto
;
import
pwc.taxtech.atms.dto.revenuconf.RevConfAddDto
;
import
pwc.taxtech.atms.dto.revenuconf.RevenueConfParam
;
import
pwc.taxtech.atms.dto.revenuconf.RevenueConfResult
;
...
...
@@ -71,14 +72,28 @@ public class RevenueConfService extends BaseService {
*
* @param addDto RevConfAddDto
*/
public
void
addConfig
(
RevConfAddDto
addDto
)
{
public
ApiResultDto
addConfig
(
RevConfAddDto
addDto
)
{
RevenueConfigExample
revenueConfigExample
=
new
RevenueConfigExample
();
revenueConfigExample
.
createCriteria
().
andNameEqualTo
(
addDto
.
getName
());
List
<
RevenueConfig
>
list
=
revenueConfigMapper
.
selectByExample
(
revenueConfigExample
);
if
(
list
.
size
()
>
0
)
{
ApiResultDto
apiResultDto
=
ApiResultDto
.
success
();
apiResultDto
.
setMessage
(
"DuplicateName"
);
return
apiResultDto
;
}
if
(!
CollectionUtils
.
isEmpty
(
addDto
.
getOrgList
()))
{
addDto
.
getOrgList
().
forEach
(
id
->
{
addDto
.
setId
(
idService
.
nextId
());
addDto
.
setOrgId
(
id
);
revenueConfigMapper
.
insertSelective
(
parseEntity
(
addDto
));
});
return
ApiResultDto
.
success
();
}
return
ApiResultDto
.
fail
();
}
/**
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/vat.json
View file @
1f74d0af
...
...
@@ -1985,6 +1985,7 @@
"FileExportFailed"
:
"File Export Failed"
,
"InputAllMandatoryInfo"
:
"Please Input All The Mandatory Information"
,
"NameShouldUniqueWarn"
:
"Name Should Be Unique"
,
"~MustBeEndOneApp"
:
"I Must be the End One, please!"
}
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/vat.json
View file @
1f74d0af
...
...
@@ -2297,6 +2297,8 @@
"uploadProfileTable"
:
"上传利润表"
,
"InputAllMandatoryInfo"
:
"请输入所有必填信息"
,
"NameShouldUniqueWarn"
:
"收入类型名称应当唯一"
,
"~MustBeEndOneApp"
:
"我必须是最后一个!"
}
\ No newline at end of file
atms-web/src/main/webapp/app/common/controls/add-exist-dimension-modal/add-exist-dimension-modal.ctrl.js
View file @
1f74d0af
...
...
@@ -28,9 +28,9 @@ controller('addExistDimensionModalController', ['$scope', '$log', '$translate',
$scope
.
$watch
(
'operateType'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
)
{
if
(
newValue
==
constant
.
Operation
.
Add
)
{
if
(
newValue
==
=
constant
.
Operation
.
Add
)
{
showModal
();
}
else
if
(
newValue
==
constant
.
Operation
.
Edit
)
{
}
else
if
(
newValue
==
=
constant
.
Operation
.
Edit
)
{
}
}
...
...
atms-web/src/main/webapp/app/dataImport/vat-revenue-config/vat-revenue-config.ctrl.js
View file @
1f74d0af
...
...
@@ -178,7 +178,7 @@
$scope
.
formParam
.
status
===
undefined
||
$scope
.
formParam
.
startDate
===
undefined
||
$scope
.
formParam
.
endDate
===
undefined
)
{
SweetAlert
.
warning
(
"InputAllMandatoryInfo"
);
SweetAlert
.
warning
(
$translate
.
instant
(
"InputAllMandatoryInfo"
)
);
return
;
}
...
...
@@ -186,6 +186,10 @@
$http
.
post
(
'/revenueConf/update'
,
$scope
.
formParam
,
apiConfig
.
createVat
())
.
success
(
function
(
res
)
{
if
(
res
&&
0
===
res
.
code
)
{
if
(
res
.
message
===
"DuplicateName"
){
SweetAlert
.
success
(
$translate
.
instant
(
'NameShouldUniqueWarn'
));
return
;
}
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
...
...
@@ -198,6 +202,10 @@
$http
.
post
(
'/revenueConf/add'
,
$scope
.
formParam
,
apiConfig
.
createVat
())
.
success
(
function
(
res
)
{
if
(
res
&&
0
===
res
.
code
)
{
if
(
res
.
message
===
"DuplicateName"
){
SweetAlert
.
success
(
$translate
.
instant
(
'NameShouldUniqueWarn'
));
return
;
}
SweetAlert
.
success
(
$translate
.
instant
(
'RevenueAddSuccess'
));
$scope
.
refreshConfigGrid
();
$
(
$scope
.
revenueConfAddDiv
).
modal
(
'hide'
);
...
...
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