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
794ccd79
Commit
794ccd79
authored
Jul 30, 2018
by
frank.xa.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into dev_frank
parents
1fa40cc2
8c20d107
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
251 additions
and
144 deletions
+251
-144
JournalEntryImportController.java
...taxtech/atms/controller/JournalEntryImportController.java
+1
-1
VoucherDto.java
...src/main/java/pwc/taxtech/atms/dto/vatdto/VoucherDto.java
+29
-0
JournalEntryImportMapper.java
...va/pwc/taxtech/atms/vat/dao/JournalEntryImportMapper.java
+6
-8
FinanceDataImportServiceImpl.java
...h/atms/vat/service/impl/FinanceDataImportServiceImpl.java
+1
-9
JournalEntryImportServiceImpl.java
.../atms/vat/service/impl/JournalEntryImportServiceImpl.java
+2
-11
import-journal-entry.ctrl.js
.../import/import-journal-entry/import-journal-entry.ctrl.js
+3
-3
vatSessionService.js
...c/main/webapp/app/common/vatservices/vatSessionService.js
+209
-30
app-overview.ctrl.js
...in/webapp/app/framework/app-overview/app-overview.ctrl.js
+0
-0
vatSessionService.js
.../src/main/webapp/app/framework/utils/vatSessionService.js
+0
-82
common.js
atms-web/src/main/webapp/bundles/common.js
+0
-0
framework.js
atms-web/src/main/webapp/bundles/framework.js
+0
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/JournalEntryImportController.java
View file @
794ccd79
...
...
@@ -36,7 +36,7 @@ public class JournalEntryImportController {
return
ResponseEntity
.
ok
(
journalEntryDataImportService
.
getValidationInfoList
(
type
,
period
));
}
@RequestMapping
(
value
=
"
/
importJournalEntry"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"importJournalEntry"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ResponseEntity
ImportJournalEntryData
(
@RequestBody
ImportVoucherDto
importParam
)
{
journalEntryDataImportService
.
ImportJournalEntryData
(
importParam
.
VoucherList
,
importParam
.
ImportType
,
identityService
.
getIdentityUser
().
getID
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/VoucherDto.java
View file @
794ccd79
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
org.thymeleaf.util.StringUtils
;
import
pwc.taxtech.atms.vat.entity.Voucher
;
import
java.math.BigDecimal
;
import
java.util.Date
;
...
...
@@ -396,4 +399,30 @@ public class VoucherDto {
public
void
setAuditCount
(
int
auditCount
)
{
this
.
auditCount
=
auditCount
;
}
public
VoucherDto
extractFromVoucher
(
Voucher
v
)
{
setVoucherID
(
v
.
getVoucherID
());
setvID
(
v
.
getVID
());
setDate
(
v
.
getDate
());
setGroup
(
v
.
getGroup
());
setPeriod
(
v
.
getPeriod
());
setCustomerCode
(
v
.
getCustomerCode
());
setCustomerName
(
v
.
getCustomerName
());
setSummary
(
v
.
getSummary
());
setAcctCode
(
v
.
getAcctCode
());
setDebit
(
v
.
getDebit
());
setCredit
(
v
.
getCredit
());
setAttach
(
v
.
getAttach
());
if
(
v
.
getItemID
()
!=
null
)
setItemID
(
Long
.
parseLong
(
v
.
getItemID
()));
setCreatedTime
(
v
.
getCreateTime
());
setOriginalPeriod
(
v
.
getOriginalPeriod
());
setStatus
(
v
.
getStatus
());
setStdCode
(
v
.
getStdCode
());
setMappingReason
(
v
.
getMappingReason
());
if
(!
StringUtils
.
isEmpty
(
v
.
getMappingReason
()))
setMappingUser
(
Integer
.
valueOf
(
v
.
getMappingUser
()));
setMappingTime
(
v
.
getMappingTime
());
return
this
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/dao/JournalEntryImportMapper.java
View file @
794ccd79
...
...
@@ -43,7 +43,6 @@ public interface JournalEntryImportMapper extends MyVatMapper {
"WHERE "
+
" 1 = 1 "
+
" AND `ImportType` = #{importType} AND `Period` = #{period} "
+
" ORDER BY `Period`,`Group`,`VID`,`ItemID`"
+
" LIMIT #{start},#{size}"
+
"</script>"
)
List
<
Voucher
>
pageQuery
(
@Param
(
"importType"
)
int
code
,
@Param
(
"period"
)
int
periodId
,
@Param
(
"start"
)
int
start
,
...
...
@@ -61,14 +60,13 @@ public interface JournalEntryImportMapper extends MyVatMapper {
Integer
pageQueryCount
(
@Param
(
"importType"
)
int
code
,
@Param
(
"period"
)
int
periodId
);
@Select
(
"<script>"
+
"SELECT "
+
"
COUNT
(1) "
+
"
SELECT "
+
"
count
(1) "
+
"FROM "
+
" Voucher "
+
"WHERE "
+
" 1 = 1"
+
" AND `ImportType` = #{importType} AND `Period` = #{period}"
+
" GROUP BY `VID` ,`Group`,`Period`"
+
" (SELECT DISTINCT "
+
" VID , `Group`, Period "
+
" FROM "
+
" Voucher WHERE `ImportType` = #{importType} AND `Period` = #{period}) as temp"
+
"</script>"
)
Integer
pageVIDCount
(
@Param
(
"importType"
)
int
code
,
@Param
(
"period"
)
int
periodId
);
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FinanceDataImportServiceImpl.java
View file @
794ccd79
...
...
@@ -282,15 +282,7 @@ public class FinanceDataImportServiceImpl {
List
<
VoucherDto
>
dtos
=
new
ArrayList
<>(
vouchers
.
size
());
vouchers
.
forEach
(
m
->
{
VoucherDto
dto
=
new
VoucherDto
();
try
{
FieldsMapper
.
map
(
m
,
dto
);
}
catch
(
ClassNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
dtos
.
add
(
dto
);
dtos
.
add
(
new
VoucherDto
().
extractFromVoucher
(
m
));
});
return
dtos
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/JournalEntryImportServiceImpl.java
View file @
794ccd79
...
...
@@ -60,7 +60,7 @@ public class JournalEntryImportServiceImpl {
qResult
.
setCalculateData
(
new
VoucherDto
());
List
<
Voucher
>
pageResultList
=
journalEntryImportMapper
.
pageQuery
(
VatImportType
.
JournalEntry
.
getCode
(),
queryJeDto
.
getPeriodId
(),
queryJeDto
.
getPageInfo
().
getPageIndex
(
)
*
queryJeDto
.
getPageInfo
().
getPageSize
(),
queryJeDto
.
getPeriodId
(),
(
queryJeDto
.
getPageInfo
().
getPageIndex
()-
1
)
*
queryJeDto
.
getPageInfo
().
getPageSize
(),
queryJeDto
.
getPageInfo
().
getPageSize
());
Integer
pageCount
=
journalEntryImportMapper
.
pageQueryCount
(
VatImportType
.
JournalEntry
.
getCode
(),
...
...
@@ -92,16 +92,7 @@ public class JournalEntryImportServiceImpl {
for
(
Voucher
voucher
:
pageResultList
)
{
if
(
voucher
.
getMonthID
()
==
null
&&
MonthID
==
1
)
voucher
.
setMonthID
(
0
);
if
(
voucher
.
getSummary
()
==
null
&&
Summary
==
1
)
voucher
.
setSummary
(
""
);
VoucherDto
voucherDto
=
new
VoucherDto
();
try
{
FieldsMapper
.
map
(
voucher
,
voucherDto
);
}
catch
(
ClassNotFoundException
e
)
{
//TODO replace exception filter (neo)
e
.
printStackTrace
();
}
catch
(
IllegalAccessException
e
)
{
e
.
printStackTrace
();
}
qResult
.
getList
().
add
(
voucherDto
);
qResult
.
getList
().
add
(
new
VoucherDto
().
extractFromVoucher
(
voucher
));
}
return
qResult
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-journal-entry/import-journal-entry.ctrl.js
View file @
794ccd79
...
...
@@ -691,7 +691,7 @@
})
+
')'
+
$translate
.
instant
(
'JournalJFJE'
)
+
$translate
.
instant
(
'NumOverLengthMsg'
)
+
'<br />'
;
numOutRangeCheckCount
++
;
}
else
{
m
.
Debit
=
PWC
.
round
(
m
.
Debit
,
2
);
// m.Debit = PWC.round(m.Debit, 2);//todo:skip round to ben open future (neo)
}
//如果在规定的数值范围外,则提示错误
if
(
parseFloat
(
m
.
Credit
)
<
constant
.
startNum
||
parseFloat
(
m
.
Credit
)
>
constant
.
endNum
)
{
...
...
@@ -700,7 +700,7 @@
})
+
')'
+
$translate
.
instant
(
'JournalDFJE'
)
+
$translate
.
instant
(
'NumOverLengthMsg'
)
+
'<br />'
;
numOutRangeCheckCount
++
;
}
else
{
m
.
Credit
=
PWC
.
round
(
m
.
Credit
,
2
);
// m.Credit = PWC.round(m.Credit, 2);//todo:skip round to ben open future (neo)
}
}
...
...
@@ -949,7 +949,7 @@
//前台数据验证
// FrontEndValidJournalEntryData(inputJournalEntryList);todo : to be open futrue (neo)
FrontEndValidJournalEntryData
(
inputJournalEntryList
);
if
(
$scope
.
errorMsgMap
.
length
>
0
)
{
$
(
'#errorListModal'
).
modal
(
'show'
);
...
...
atms-web/src/main/webapp/app/common/vatservices/vatSessionService.js
View file @
794ccd79
...
...
@@ -5,14 +5,17 @@
var
date
=
new
Date
();
var
month
=
date
.
getMonth
();
var
projectyear
=
date
.
getFullYear
();
var
cacheName
=
'atms-vat-cache'
;
var
propList
=
[
'month'
,
'year'
,
'project'
,
'projects'
,
'dataChanged'
,
'logUser'
,
'userPermission'
,
'queryDto'
];
if
(
month
<=
0
)
{
month
=
1
;
}
var
logUser
=
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
var
userPermission
=
{};
...
...
@@ -23,6 +26,15 @@
checkedOrgs
:
{},
};
var
cacheObj
=
{
month
:
month
,
userPermission
:
{},
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
};
//重置项目月份
var
reset
=
function
()
{
var
date
=
new
Date
();
var
m
=
date
.
getMonth
();
...
...
@@ -32,50 +44,216 @@
this
.
month
=
m
;
setProperty
(
"month"
,
m
);
};
var
temp
=
localStorageService
.
get
(
cacheName
);
if
(
temp
)
{
cacheObj
=
temp
;
}
else
{
localStorageService
.
set
(
cacheName
,
cacheObj
);
};
//设置属性值
var
setProperty
=
function
(
propertyName
,
propertyValue
)
{
cacheObj
[
propertyName
]
=
propertyValue
;
localStorageService
.
set
(
cacheName
,
cacheObj
);
};
//获取属性值
var
getProperty
=
function
(
propertyName
)
{
return
cacheObj
[
propertyName
];
};
// 更新project内属性
var
updateObjectProperty
=
function
(
objectName
,
propertyPath
,
propertyValue
)
{
var
obj
=
cacheObj
[
objectName
];
if
(
!
_
.
isEmpty
(
obj
))
{
var
propertyArr
=
propertyPath
.
split
(
'.'
);
for
(
var
i
=
0
;
i
<
propertyArr
.
length
-
1
;
i
++
)
{
if
(
!
_
.
isEmpty
(
obj
))
{
obj
=
obj
[
propertyArr
[
i
]];
}
}
if
(
!
_
.
isEmpty
(
obj
))
{
obj
[
propertyArr
[
propertyArr
.
length
-
1
]]
=
propertyValue
;
}
}
localStorageService
.
set
(
cacheName
,
cacheObj
);
};
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var
clearSelectProject
=
function
()
{
var
tempProject
=
{
year
:
2017
};
setProperty
(
'project'
,
tempProject
);
};
var
result
=
{};
var
defineProp
=
function
(
propertyName
)
{
Object
.
defineProperty
(
result
,
propertyName
,
{
get
:
function
()
{
var
getValue
=
getProperty
(
propertyName
);
var
year
=
new
Date
().
getFullYear
();
var
month
=
new
Date
().
getMonth
();
switch
(
propertyName
)
{
case
"year"
:
return
getValue
||
year
;
case
"month"
:
return
getValue
||
month
-
1
;
case
"project"
:
return
getValue
||
{
year
:
year
};
case
"projects"
:
return
getValue
||
[];
case
"dataChanged"
:
return
getValue
||
false
;
case
"logUser"
:
return
getValue
||
logUser
;
case
"userPermission"
:
return
getValue
||
{};
case
"queryDto"
:
return
getValue
||
queryDto
;
}
},
set
:
function
(
val
)
{
setProperty
(
propertyName
,
val
);
},
});
};
propList
.
forEach
(
function
(
propName
)
{
defineProp
(
propName
);
});
result
.
reset
=
reset
;
result
.
setProperty
=
setProperty
;
result
.
getProperty
=
getProperty
;
result
.
updateObjectProperty
=
updateObjectProperty
;
result
.
clearSelectProject
=
clearSelectProject
;
return
result
;
}]);
webservices
.
factory
(
'citSessionService'
,
[
'$log'
,
'localStorageService'
,
'enums'
,
function
(
$log
,
localStorageService
,
enums
)
{
'use strict'
;
$log
.
debug
(
'citSessionService.ctor()...'
);
var
date
=
new
Date
();
var
month
=
constant
.
WholeYearPeriod
;
var
projectyear
=
2017
;
var
cacheName
=
'atms-cit-cache'
;
var
propList
=
[
'month'
,
'year'
,
'project'
,
'projects'
,
'dataChanged'
,
'logUser'
,
'userPermission'
,
'queryDto'
];
var
logUser
=
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
var
queryDto
=
{
searchKeyword
:
''
,
fieldId
:
''
,
filedName
:
'orgName'
,
checkedOrgs
:
{},
};
var
cacheObj
=
{
month
:
month
,
userPermission
:
{},
project
:
{
year
:
2017
},
project
:
{
year
:
projectyear
},
projects
:
[],
dataChanged
:
false
};
var
temp
=
localStorageService
.
get
(
'atms-cache'
);
var
temp
=
localStorageService
.
get
(
cacheName
);
if
(
temp
)
{
cacheObj
=
temp
;
}
else
{
localStorageService
.
set
(
'atms-cache'
,
cacheObj
);
}
localStorageService
.
set
(
cacheName
,
cacheObj
);
}
;
//设置属性值
var
setProperty
=
function
(
propertyName
,
propertyValue
)
{
cacheObj
[
propertyName
]
=
propertyValue
//$cookieStore.put('atms-cache', JSON.stringify(apiTokenObj));
localStorageService
.
set
(
'atms-cache'
,
cacheObj
);
}
cacheObj
[
propertyName
]
=
propertyValue
;
localStorageService
.
set
(
cacheName
,
cacheObj
);
};
//获取属性值
var
getProperty
=
function
(
propertyName
)
{
//console.log($cookieStore.get('atms-cache'));
return
cacheObj
[
propertyName
];
}
}
;
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
// 更新project内属性
var
updateObjectProperty
=
function
(
objectName
,
propertyPath
,
propertyValue
)
{
var
obj
=
cacheObj
[
objectName
];
if
(
obj
)
{
var
propertyArr
=
propertyPath
.
split
(
'.'
);
for
(
var
i
=
0
;
i
<
propertyArr
.
length
-
1
;
i
++
)
{
if
(
!
_
.
isEmpty
(
obj
))
{
obj
=
obj
[
propertyArr
[
i
]];
}
}
obj
[
propertyArr
[
propertyArr
.
length
-
1
]]
=
propertyValue
;
}
localStorageService
.
set
(
cacheName
,
cacheObj
);
};
//跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var
clearSelectProject
=
function
()
{
var
tempProject
=
{
year
:
2017
};
var
tempProject
=
{
year
:
projectyear
};
setProperty
(
'project'
,
tempProject
);
};
return
{
month
:
month
,
year
:
projectyear
,
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
,
logUser
:
logUser
,
reset
:
reset
,
userPermission
:
userPermission
,
queryDto
:
queryDto
,
setProperty
:
setProperty
,
getProperty
:
getProperty
,
clearSelectProject
:
clearSelectProject
,
}
var
result
=
{};
var
defineProp
=
function
(
propertyName
)
{
Object
.
defineProperty
(
result
,
propertyName
,
{
get
:
function
()
{
var
getValue
=
getProperty
(
propertyName
);
var
year
=
new
Date
().
getFullYear
();
switch
(
propertyName
)
{
case
"year"
:
return
getValue
||
year
;
case
"month"
:
return
getValue
||
enums
.
wholeYearPeriod
.
import
;
case
"project"
:
return
getValue
||
{
year
:
year
};
case
"projects"
:
return
getValue
||
[];
case
"dataChanged"
:
return
getValue
||
false
;
case
"logUser"
:
return
getValue
||
logUser
;
case
"userPermission"
:
return
getValue
||
{};
case
"queryDto"
:
return
getValue
||
queryDto
;
}
},
set
:
function
(
val
)
{
setProperty
(
propertyName
,
val
);
},
});
};
propList
.
forEach
(
function
(
propName
)
{
defineProp
(
propName
);
});
result
.
setProperty
=
setProperty
;
result
.
getProperty
=
getProperty
;
result
.
updateObjectProperty
=
updateObjectProperty
;
result
.
clearSelectProject
=
clearSelectProject
;
return
result
;
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/framework/app-overview/app-overview.ctrl.js
View file @
794ccd79
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/framework/utils/vatSessionService.js
deleted
100644 → 0
View file @
1fa40cc2
webservices
.
factory
(
'vatSessionService'
,
[
'$log'
,
'localStorageService'
,
function
(
$log
,
localStorageService
)
{
'use strict'
;
$log
.
debug
(
'vatSessionService.ctor()...'
);
var
date
=
new
Date
();
var
month
=
date
.
getMonth
();
var
projectyear
=
date
.
getFullYear
();
if
(
month
<=
0
)
{
month
=
1
;
}
var
logUser
=
{
ID
:
"66933E7B-DA75-4B2E-B7D6-AB65DCA20D50"
,
UserName
:
"Admin"
,
};
var
userPermission
=
{};
var
queryDto
=
{
searchKeyword
:
''
,
fieldId
:
''
,
filedName
:
'orgName'
,
checkedOrgs
:
{},
};
var
reset
=
function
()
{
var
date
=
new
Date
();
var
m
=
date
.
getMonth
();
if
(
m
<=
0
)
{
m
=
1
;
}
this
.
month
=
m
;
setProperty
(
"month"
,
m
);
};
var
cacheObj
=
{
month
:
month
,
userPermission
:
{},
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
};
var
temp
=
localStorageService
.
get
(
'tesla-cache'
);
if
(
temp
)
{
cacheObj
=
temp
;
}
else
{
localStorageService
.
set
(
'tesla-cache'
,
cacheObj
);
}
var
setProperty
=
function
(
propertyName
,
propertyValue
)
{
cacheObj
[
propertyName
]
=
propertyValue
;
//$cookieStore.put('tesla-cache', JSON.stringify(apiTokenObj));
localStorageService
.
set
(
'tesla-cache'
,
cacheObj
);
};
var
getProperty
=
function
(
propertyName
)
{
//console.log($cookieStore.get('tesla-cache'));
return
cacheObj
[
propertyName
];
};
// 跳转到admin或者outputinvoice management 需要清空所选择的project,不然会影响权限
var
clearSelectProject
=
function
()
{
var
tempProject
=
{
year
:
2017
};
setProperty
(
'project'
,
tempProject
);
};
return
{
month
:
month
,
year
:
projectyear
,
project
:
{
year
:
2017
},
projects
:
[],
dataChanged
:
false
,
logUser
:
logUser
,
reset
:
reset
,
userPermission
:
userPermission
,
queryDto
:
queryDto
,
setProperty
:
setProperty
,
getProperty
:
getProperty
,
clearSelectProject
:
clearSelectProject
}
}]);
\ No newline at end of file
atms-web/src/main/webapp/bundles/common.js
View file @
794ccd79
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/bundles/framework.js
View file @
794ccd79
This diff is collapsed.
Click to expand it.
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