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
a0f4d5d8
Commit
a0f4d5d8
authored
Apr 16, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
6c2e039a
dda9822c
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
57 additions
and
2 deletions
+57
-2
UserController.java
...main/java/pwc/taxtech/atms/controller/UserController.java
+7
-1
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+41
-0
app.js
atms-web/src/main/webapp/Scripts/app.js
+8
-0
index.html
atms-web/src/main/webapp/WEB-INF/templates/index.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/UserController.java
View file @
a0f4d5d8
package
pwc
.
taxtech
.
atms
.
controller
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -244,7 +245,12 @@ public class UserController {
public
@ResponseBody
UserDto
getUserByName
(
@RequestBody
UserDto
userParam
)
{
return
userRoleService
.
GetUserByUserName
(
userParam
);
UserDto
dto
=
userRoleService
.
GetUserByUserName
(
userParam
);
if
(
null
!=
dto
)
{
// 去掉password字段,安全问题 不需要返回给前端
dto
.
setPassword
(
StringUtils
.
EMPTY
);
}
return
dto
;
}
@RequestMapping
(
value
=
"downloadFile/get"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
a0f4d5d8
...
...
@@ -1568,6 +1568,7 @@ public class DataImportService extends BaseService {
private
List
<
InvoiceRecord
>
generalIRs
(
Sheet
sheet
)
{
List
<
InvoiceRecord
>
irs
=
Lists
.
newArrayList
();
Set
<
String
>
orgsNot
=
new
HashSet
<>();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
InvoiceRecord
ir
=
new
InvoiceRecord
();
Long
irId
=
idService
.
nextId
();
...
...
@@ -1577,6 +1578,14 @@ public class DataImportService extends BaseService {
}
ir
.
setId
(
irId
);
ir
.
setSeqNo
(
getCellIntegerValue
(
row
.
getCell
(
0
)));
//所属机构
if
(
StringUtils
.
isBlank
(
getCellStringValue
(
row
.
getCell
(
1
)))){
continue
;
}
//如果存在有错误的机构也跳过
if
(
validIRExcelCell
(
row
,
orgsNot
).
contains
(
getCellStringValue
(
row
.
getCell
(
1
)))){
continue
;
}
ir
.
setBillingBody
(
getCellStringValue
(
row
.
getCell
(
1
)));
ir
.
setCustomerCompanyName
(
getCellStringValue
(
row
.
getCell
(
2
)));
ir
.
setInvoiceType
(
getCellStringValue
(
row
.
getCell
(
3
)));
...
...
@@ -1606,6 +1615,38 @@ public class DataImportService extends BaseService {
return
irs
;
}
/**
* 导入分发-已开增值税发票记录,校验1-发票类型、开票内容、所属机构、税率、税额、开票金额任意不为空;
* 且校验2-校验发票类型的值只能包含“增值税专用发票”、“增值税普通发票”、“增值税电子发票”和“机动车发票”,
* 存在校验1或校验2不通过的机构不进行导入
* @param row
* @return
*/
private
Set
<
String
>
validIRExcelCell
(
Row
row
,
Set
<
String
>
orgsNot
){
List
<
String
>
invoiceTypes
=
Arrays
.
asList
(
new
String
[]{
"增值税专用发票"
,
"增值税普通发票"
,
"增值税电子发票"
,
"机动车发票"
});
String
orgName
=
getCellStringValue
(
row
.
getCell
(
1
));
//发票类型
if
(
StringUtils
.
isBlank
(
getCellStringValue
(
row
.
getCell
(
3
)))){
orgsNot
.
add
(
orgName
);
}
else
if
(!
invoiceTypes
.
contains
(
getCellStringValue
(
row
.
getCell
(
3
)))){
orgsNot
.
add
(
orgName
);
}
//开票内容
if
(
StringUtils
.
isBlank
(
getCellStringValue
(
row
.
getCell
(
4
)))){
orgsNot
.
add
(
orgName
);
}
//开票金额
if
(
StringUtils
.
isBlank
(
getCellStringValue
(
row
.
getCell
(
5
)))){
orgsNot
.
add
(
orgName
);
}
//税额
if
(
StringUtils
.
isBlank
(
getCellStringValue
(
row
.
getCell
(
20
)))){
orgsNot
.
add
(
orgName
);
}
return
orgsNot
;
}
private
List
<
AdjustmentTable
>
generalATs
(
Sheet
sheet
)
{
List
<
AdjustmentTable
>
ats
=
Lists
.
newArrayList
();
for
(
int
j
=
1
;
j
<=
sheet
.
getLastRowNum
();
j
++)
{
...
...
atms-web/src/main/webapp/Scripts/app.js
View file @
a0f4d5d8
...
...
@@ -358,6 +358,14 @@ var app = angular.module('app', ['ui.tree', 'ui.bootstrap', 'ui.bootstrap.tpls',
}
};
$rootScope
.
changeLanguage
(
region
);
waterMark
({
systemId
:
'2500'
,
//当前用户ID
userId
:
loginContext
.
localName
,
textStyle
:
'rgba(0,0,0,0.15)'
,
containerEl
:
document
.
querySelector
(
'body'
)
});
// publish unbeforeunload event to child scopes
$scope
.
onbeforeunload
=
function
()
{
...
...
atms-web/src/main/webapp/WEB-INF/templates/index.html
View file @
a0f4d5d8
...
...
@@ -116,8 +116,8 @@
<script
type=
"text/javascript"
src=
"bundles/ivh-treeview.js"
></script>
<script
type=
"text/javascript"
src=
"bundles/ui-select.js"
></script>
<script
type=
"text/javascript"
src=
"bundles/month-picker.js"
></script>
<script
src=
"http://sec-aegisfe.didistatic.com/static/aegisfe/water-mark1.0.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/xlsx/0.10.1/xlsx.full.min.js"
></script>
<!--<script type="text/javascript" src="bundles/hubs.js">-->
<script
type=
"text/javascript"
>
GC
.
Spread
.
Sheets
.
LicenseKey
=
constant
.
regesterInformation
.
userKey
;
...
...
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