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
f5d391e6
Commit
f5d391e6
authored
Nov 09, 2018
by
eddie.wu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_oracle' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_oracle
parents
b79c3b7d
6502d902
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
131 additions
and
44 deletions
+131
-44
OutputInvoiceController.java
.../pwc/taxtech/atms/controller/OutputInvoiceController.java
+4
-4
TemplateGroupController.java
.../pwc/taxtech/atms/controller/TemplateGroupController.java
+7
-2
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+31
-3
OutputInvoiceServiceImpl.java
...xtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
+12
-4
edit-templategroup-modal.ctrl.js
...edit-templategroup-modal/edit-templategroup-modal.ctrl.js
+2
-1
edit-templategroup-modal.html
...ls/edit-templategroup-modal/edit-templategroup-modal.html
+4
-0
vat-organization-dashboard.ctrl.js
...organization-dashboard/vat-organization-dashboard.ctrl.js
+58
-2
vat-organization-dashboard.html
...at-organization-dashboard/vat-organization-dashboard.html
+10
-27
vat-preview-input-invoice.ctrl.js
...t-preview-input-invoice/vat-preview-input-invoice.ctrl.js
+2
-0
vat-preview-input-invoice.html
.../vat-preview-input-invoice/vat-preview-input-invoice.html
+1
-1
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/OutputInvoiceController.java
View file @
f5d391e6
...
...
@@ -51,7 +51,7 @@ public class OutputInvoiceController {
}
@RequestMapping
(
value
=
"getExportOutputInvoiceList"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
HttpServletResponse
response
)
{
public
void
downloadInvoiceQueryData
(
@RequestBody
QueryOutputDto
paras
,
@RequestHeader
(
"from"
)
String
projectId
,
HttpServletResponse
response
)
{
response
.
setContentType
(
"application/vnd.ms-excel;charset=utf-8"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;filename="
+
UUID
.
randomUUID
()
+
".xls"
);
...
...
@@ -59,7 +59,7 @@ public class OutputInvoiceController {
OutputStream
os
=
null
;
try
{
os
=
response
.
getOutputStream
();
int
count
=
getDownloadFilePath
(
paras
,
os
);
int
count
=
getDownloadFilePath
(
paras
,
projectId
,
os
);
if
(
count
==
0
)
{
response
.
setStatus
(
SC_NO_CONTENT
);
...
...
@@ -81,8 +81,8 @@ public class OutputInvoiceController {
return
ResponseEntity
.
ok
().
body
(
outputInvoiceService
.
getOutputInvoiceList
(
period
));
}
private
int
getDownloadFilePath
(
QueryOutputDto
paras
,
OutputStream
outputStream
)
{
List
<
OutputVATInvoiceInfoDto
>
list
=
outputInvoiceService
.
getExportOutputInvoiceList
(
paras
).
getData
();
private
int
getDownloadFilePath
(
QueryOutputDto
paras
,
String
projectId
,
OutputStream
outputStream
)
{
List
<
OutputVATInvoiceInfoDto
>
list
=
outputInvoiceService
.
getExportOutputInvoiceList
(
paras
,
projectId
).
getData
();
if
(
list
.
size
()
==
0
)
{
return
0
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateGroupController.java
View file @
f5d391e6
...
...
@@ -97,6 +97,7 @@ public class TemplateGroupController {
@RequestMapping
(
value
=
"importTemplateGroupExcelFile"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
importTemplateGroupExcelFile
(
@RequestParam
MultipartFile
file
,
@RequestParam
String
filename
,
@RequestParam
Boolean
allowManual
,
@RequestParam
String
tempFileName
,
@RequestParam
String
jsonModel
)
{
try
{
...
...
@@ -107,7 +108,8 @@ public class TemplateGroupController {
if
(
CollectionUtils
.
isEmpty
(
templateGroupDto
.
getSheetNameList
()))
{
return
OperationResultDto
.
error
(
ErrorMessage
.
NoSelectSheet
);
}
templateGroupService
.
importTemplateGroupExcelFile
(
file
,
templateGroupDto
);
if
(
allowManual
==
null
)
allowManual
=
Boolean
.
FALSE
;
templateGroupService
.
importTemplateGroupExcelFile
(
file
,
allowManual
,
templateGroupDto
);
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
return
OperationResultDto
.
error
(
e
.
getMessage
());
...
...
@@ -117,17 +119,20 @@ public class TemplateGroupController {
return
OperationResultDto
.
error
(
ErrorMessage
.
SystemError
);
}
@ResponseBody
@ApiOperation
(
value
=
"导入报表"
)
@RequestMapping
(
value
=
"importTemplateExcelFile"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
importTemplateExcelFile
(
@RequestParam
MultipartFile
file
,
@RequestParam
Long
templateGroupID
,
@RequestParam
String
sheetList
,
@RequestParam
Boolean
allowManual
,
@RequestParam
String
tempFileName
,
@RequestParam
String
reportType
,
@RequestParam
String
filename
)
{
try
{
templateGroupService
.
importTemplateExcelFile
(
file
,
templateGroupID
,
reportType
,
sheetList
);
if
(
allowManual
==
null
)
allowManual
=
Boolean
.
FALSE
;
templateGroupService
.
importTemplateExcelFile
(
file
,
allowManual
,
templateGroupID
,
reportType
,
sheetList
);
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
return
OperationResultDto
.
error
(
e
.
getMessage
());
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
f5d391e6
...
...
@@ -15,6 +15,7 @@ import pwc.taxtech.atms.common.CommonUtils;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.message.TemplateMessage
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.constant.enums.TemplateGroupType
;
import
pwc.taxtech.atms.dao.CellTemplateConfigDao
;
import
pwc.taxtech.atms.dao.CellTemplateConfigMapper
;
...
...
@@ -184,7 +185,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
@Transactional
public
void
importTemplateGroupExcelFile
(
MultipartFile
file
,
TemplateGroupDto
templateGroupDto
)
throws
ServiceException
{
public
void
importTemplateGroupExcelFile
(
MultipartFile
file
,
boolean
allowManual
,
TemplateGroupDto
templateGroupDto
)
throws
ServiceException
{
List
<
String
>
sheetNameList
=
templateGroupDto
.
getSheetNameList
();
if
(
CollectionUtils
.
isEmpty
(
sheetNameList
))
{
throw
new
ServiceException
(
ErrorMessage
.
NoSelectSheet
);
...
...
@@ -269,13 +270,27 @@ public class TemplateGroupServiceImpl extends AbstractService {
config
.
setId
(
distributedIdService
.
nextId
());
config
.
setCellTemplateId
(
cellTemplate
.
getId
());
config
.
setReportTemplateId
(
template
.
getId
());
config
.
setDataSourceType
(
1
);
//todo 枚举
config
.
setDataSourceType
(
CellDataSourceType
.
Formula
.
getCode
()
);
//todo 枚举
config
.
setFormula
(
POIUtil
.
getCellFormulaString
(
cell
));
// config.setFormula(cell.getCellFormula());
config
.
setFormulaDataSource
(
"报表数据"
);
//todo KV相关
config
.
setUpdateTime
(
now
);
config
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
config
);
if
(
allowManual
){
CellTemplateConfig
configManual
=
new
CellTemplateConfig
();
configManual
.
setId
(
distributedIdService
.
nextId
());
configManual
.
setCellTemplateId
(
cellTemplate
.
getId
());
configManual
.
setReportTemplateId
(
template
.
getId
());
configManual
.
setDataSourceType
(
CellDataSourceType
.
KeyIn
.
getCode
());
//todo 枚举
configManual
.
setFormula
(
POIUtil
.
getCellFormulaString
(
cell
));
// config.setFormula(cell.getCellFormula());
// configManual.setFormulaDataSource("报表数据"); //todo KV相关
configManual
.
setUpdateTime
(
now
);
configManual
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
configManual
);
}
PeriodDataSource
pds
=
new
PeriodDataSource
();
pds
.
setAmount
(
BigDecimal
.
ZERO
);
pds
.
setUpdateBy
(
"Admin"
);
...
...
@@ -310,7 +325,7 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
@Transactional
public
void
importTemplateExcelFile
(
MultipartFile
file
,
Long
templateGroupId
,
String
reportType
,
String
sheetList
)
throws
ServiceException
{
public
void
importTemplateExcelFile
(
MultipartFile
file
,
boolean
allowManual
,
Long
templateGroupId
,
String
reportType
,
String
sheetList
)
throws
ServiceException
{
if
(
null
==
file
)
{
throw
new
ServiceException
(
ErrorMessage
.
NoFile
);
}
...
...
@@ -388,6 +403,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
config
.
setUpdateTime
(
now
);
config
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
config
);
if
(
allowManual
){
CellTemplateConfig
configManual
=
new
CellTemplateConfig
();
configManual
.
setId
(
distributedIdService
.
nextId
());
configManual
.
setCellTemplateId
(
cellTemplate
.
getId
());
configManual
.
setReportTemplateId
(
template
.
getId
());
configManual
.
setDataSourceType
(
CellDataSourceType
.
KeyIn
.
getCode
());
//todo 枚举
configManual
.
setFormula
(
POIUtil
.
getCellFormulaString
(
cell
));
// config.setFormula(cell.getCellFormula());
// configManual.setFormulaDataSource("报表数据"); //todo KV相关
configManual
.
setUpdateTime
(
now
);
configManual
.
setUpdateBy
(
authUserHelper
.
getCurrentUserId
());
cellTemplateConfigList
.
add
(
configManual
);
}
PeriodDataSource
pds
=
new
PeriodDataSource
();
pds
.
setAmount
(
BigDecimal
.
ZERO
);
pds
.
setUpdateBy
(
"Admin"
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/OutputInvoiceServiceImpl.java
View file @
f5d391e6
...
...
@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import
com.alibaba.fastjson.TypeReference
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageInfo
;
import
com.google.common.collect.Lists
;
import
javafx.geometry.Orientation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.http.client.methods.CloseableHttpResponse
;
...
...
@@ -100,9 +101,9 @@ public class OutputInvoiceServiceImpl {
return
pageInfo
;
}
public
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
getExportOutputInvoiceList
(
QueryOutputDto
queryDto
)
{
public
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
getExportOutputInvoiceList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
OperationResultDto
<
List
<
OutputVATInvoiceInfoDto
>>
result
=
new
OperationResultDto
<>();
List
<
OutputVATInvoiceInfoDto
>
finalList
=
getQueryList
(
queryDto
);
List
<
OutputVATInvoiceInfoDto
>
finalList
=
getQueryList
(
queryDto
,
projectId
);
finalList
=
getOutputDetailInfoList
(
finalList
);
result
.
setData
(
finalList
);
result
.
setResult
(
true
);
...
...
@@ -256,9 +257,16 @@ public class OutputInvoiceServiceImpl {
// return stream.sorted(Comparator.comparing(OutputVATInvoiceInfoDto::getInvoiceDate)).collect(Collectors.toList());
// }
private
List
<
OutputVATInvoiceInfoDto
>
getQueryList
(
QueryOutputDto
queryDto
)
{
private
List
<
OutputVATInvoiceInfoDto
>
getQueryList
(
QueryOutputDto
queryDto
,
String
projectId
)
{
List
<
OutputVATInvoiceInfoDto
>
rList
=
outputInvoiceMapper
.
selectOutputInvoiceInfoLeftJoinItem
(
queryDto
);
rList
.
stream
().
forEach
(
x
->
{
Organization
organization
=
organizationMapper
.
selectByPrimaryKey
(
projectMapper
.
selectByPrimaryKey
(
projectId
).
getOrganizationId
());
if
(
organization
==
null
){
return
Lists
.
newArrayList
();
}
OutputInvoiceExample
e
=
new
OutputInvoiceExample
();
e
.
createCriteria
().
andXFSHEqualTo
(
organization
.
getTaxPayerNumber
());
List
<
String
>
fpqqlshList
=
outputInvoiceMapper
.
selectByExample
(
e
).
stream
().
map
(
OutputInvoice:
:
getFPQQLSH
).
collect
(
Collectors
.
toList
());
rList
.
stream
().
filter
(
a
->
fpqqlshList
.
contains
(
a
.
getFpqqlsh
())).
forEach
(
x
->
{
CAL
.
setTime
(
x
.
getInvoiceDate
());
x
.
setPeriodId
(
CAL
.
get
(
Calendar
.
MONTH
)
+
1
);
});
...
...
atms-web/src/main/webapp/app/common/controls/edit-templategroup-modal/edit-templategroup-modal.ctrl.js
View file @
f5d391e6
...
...
@@ -71,7 +71,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
Upload
.
upload
({
url
:
thisConstant
.
uploadUrl
,
data
:
{
allowManual
:
$
(
'#allowManual'
).
is
(
':checked'
),
filename
:
$scope
.
editModel
.
file
.
name
,
tempFileName
:
tempFileName
,
},
...
...
@@ -264,6 +264,7 @@ controller('editTemplategroupModalController', ['$scope', '$log', '$translate',
Upload
.
upload
({
url
:
thisConstant
.
importTemplateExcelFile
,
data
:
{
allowManual
:
$
(
'#allowManual'
).
is
(
':checked'
),
jsonModel
:
json
,
filename
:
$scope
.
editModel
.
file
.
name
,
tempFileName
:
tempFileName
...
...
atms-web/src/main/webapp/app/common/controls/edit-templategroup-modal/edit-templategroup-modal.html
View file @
f5d391e6
...
...
@@ -28,6 +28,10 @@
<
div
id
=
{{::
editModel
.
sheetSelectDxID
}}
><
/div
>
<
/div
>
<
/div
>
<
div
class
=
"form-group"
>
<
label
for
=
"telCode"
class
=
"col-sm-5 control-label"
><
input
type
=
"radio"
id
=
"allowManual"
><
/label
>
<
label
for
=
"telCode"
class
=
"col-sm-5 control-label"
><
span
>
允许手工录入
<
/span></
label
>
<
/div
>
<
/form
>
<
/div
>
<
div
class
=
"modal-footer"
style
=
"padding-left: 22px;text-align: left;"
>
...
...
atms-web/src/main/webapp/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.ctrl.js
View file @
f5d391e6
...
...
@@ -22,17 +22,73 @@
autoExpandAll
:
true
,
columns
:
[
{
dataField
:
'typeName'
,
caption
:
$translate
.
instant
(
'IncomeType'
)
},
{
dataField
:
'description'
,
caption
:
$translate
.
instant
(
'Description'
)
},
{
dataField
:
'amount'
,
caption
:
$translate
.
instant
(
'Amount'
)
,
format
:
{
type
:
'fixedPoint'
,
precision
:
2
}
}
{
dataField
:
'description'
,
caption
:
"栏次"
},
{
dataField
:
'amount'
,
caption
:
"税务系统"
,
format
:
{
type
:
'fixedPoint'
,
precision
:
2
}
}
],
selection
:
{
mode
:
"single"
},
onRowPrepared
:
function
(
info
)
{
if
(
info
.
rowType
!=
'header'
)
{
if
(
info
.
data
.
head_ID
===
"0"
)
{
info
.
rowElement
.
addClass
(
'top-category'
);
}
}
}
},
reasonOptions
:
{
height
:
'600px'
,
bindingOptions
:
{
dataSource
:
'reasonList'
},
keyExpr
:
"id"
,
parentIdExpr
:
"head_ID"
,
expandedRowKeys
:
[
1
],
showBorders
:
false
,
showColumnLines
:
false
,
showRowLines
:
false
,
columnAutoWidth
:
true
,
autoExpandAll
:
true
,
columns
:
[
{
dataField
:
'name'
,
caption
:
"会计科目"
},
{
dataField
:
'desc'
,
caption
:
"明细字段"
},
{
dataField
:
'amount'
,
caption
:
$translate
.
instant
(
'Amount'
),
format
:
{
type
:
'fixedPoint'
,
precision
:
2
}
},
{
dataField
:
'desc'
,
caption
:
$translate
.
instant
(
'Description'
)
},
{
dataField
:
'name'
,
caption
:
$translate
.
instant
(
'DifferenceReason'
)
}
],
onRowPrepared
:
function
(
info
)
{
if
(
info
.
rowType
!=
'header'
)
{
if
(
info
.
data
.
head_ID
===
"0"
)
{
info
.
rowElement
.
addClass
(
'top-category'
);
}
if
(
info
.
data
.
id
===
'total'
)
{
info
.
rowElement
.
addClass
(
'table-summary'
);
}
}
}
}
};
$scope
.
toggleAllMasterRows
=
function
(
$event
)
{
var
expand
=
"dx-datagrid-group-closed"
;
var
collapse
=
"dx-datagrid-group-opened"
;
if
(
$
(
$event
.
target
).
hasClass
(
expand
))
{
$scope
.
gridInstance
.
expandAll
(
-
1
);
$
(
$event
.
target
).
removeClass
(
expand
);
$
(
$event
.
target
).
addClass
(
collapse
);
}
else
{
$scope
.
gridInstance
.
collapseAll
(
-
1
);
$
(
$event
.
target
).
removeClass
(
collapse
);
$
(
$event
.
target
).
addClass
(
expand
);
}
};
var
initData
=
function
()
{
$scope
.
differenceList
=
[];
$scope
.
reasonList
=
[];
// getService.getDifferenceList();
// getService.getReasonList();
};
...
...
atms-web/src/main/webapp/app/vat/dashboard/vat-organization-dashboard/vat-organization-dashboard.html
View file @
f5d391e6
...
...
@@ -2,33 +2,16 @@
<div
class=
"content"
>
<div
class=
"col-lg-12 col-md-12"
style=
"margin-top:10px;"
>
</div>
<div
class=
"col-lg-24 col-md-24 fit-height"
>
<table
border=
"1"
width=
"95%"
style=
"margin: auto"
>
<thead>
<tr
class=
"th"
>
<th>
会计科目
</th>
<th>
明细字段
</th>
<th>
金额
</th>
<th>
差异
</th>
<th>
差异原因
</th>
</tr>
</thead>
<tbody
>
<tr
ng-repeat=
"x in list"
>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
<td>
{{}}
</td>
</tr>
</tbody>
</table>
<div
class=
"col-lg-12 col-md-12 fit-height"
>
<div
class=
"col-lg-4 col-md-4"
>
<div
dx-tree-list=
"grid.differenceOptions"
dx-item-alias=
"item"
>
</div>
</div>
<style
>
.th
>
th
{
width
:
15%
;
text-align
:
center
;
}
</style>
<div
class=
"col-lg-8 col-md-8"
>
<div
dx-tree-list=
"grid.reasonOptions"
id=
"reason"
></div>
</div>
</div>
</div>
</div>
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.ctrl.js
View file @
f5d391e6
...
...
@@ -11,6 +11,7 @@
$scope
.
totalTaxAmount
=
0
;
var
minDate
=
[
1
,
vatSessionService
.
project
.
year
];
// var minDate = moment().startOf('month').subtract(0, 'months');
var
maxDate
=
[
12
,
vatSessionService
.
project
.
year
];
var
setDate
=
[
[
vatSessionService
.
month
,
vatSessionService
.
project
.
year
],
...
...
@@ -108,6 +109,7 @@
vatPreviewService
.
queryInputInvoiceList
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
if
(
data
)
{
// minDate = data.
var
index
=
1
;
data
.
list
.
forEach
(
function
(
v
)
{
v
.
index
=
index
++
;
...
...
atms-web/src/main/webapp/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice.html
View file @
f5d391e6
...
...
@@ -8,7 +8,7 @@
data-templateurl="/app/vat/preview/vat-preview-input-invoice/vat-preview-input-invoice-search.html">
<i class="fa fa-filter" aria-hidden="true"></i>
</button>-->
<div></div><div></div>
<span
translate=
"IncomeInvoiceTitle"
class=
"text-bold"
></span>
|
<span
class=
"text-bold"
translate=
"InvoiceQJ"
></span>
:
<input
type=
"text"
class=
"form-control input-width-middle"
style=
"position: relative; top: -33px; left: 160px;"
id=
"input-invoice-period-picker"
/>
...
...
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