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
aab60a50
Commit
aab60a50
authored
Apr 06, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#
parent
9e20505d
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
98 additions
and
93 deletions
+98
-93
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+39
-26
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+2
-10
TemplateServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
+5
-0
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+15
-0
table-report-sheet.js
...ain/webapp/app/analysis/table/sheet/table-report-sheet.js
+2
-0
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+27
-53
tb-ebit-form.html
...-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
+1
-1
tb-ebit-form.less
...-web/src/main/webapp/app/analysis/table/tb-ebit-form.less
+1
-1
vatReportService.js
...rc/main/webapp/app/common/vatservices/vatReportService.js
+6
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
aab60a50
...
@@ -50,6 +50,7 @@ public class ReportController {
...
@@ -50,6 +50,7 @@ public class ReportController {
ReportServiceImpl
reportService
;
ReportServiceImpl
reportService
;
@Autowired
@Autowired
ReportUploadService
reportUploadService
;
ReportUploadService
reportUploadService
;
@RequestMapping
(
value
=
"export"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"export"
,
method
=
RequestMethod
.
POST
)
public
ResponseEntity
getExportFile
(
@RequestBody
ReportExportDto
report
)
{
public
ResponseEntity
getExportFile
(
@RequestBody
ReportExportDto
report
)
{
return
ResponseEntity
.
ok
(
reportService
.
export
(
report
.
getReportData
(),
"~"
));
return
ResponseEntity
.
ok
(
reportService
.
export
(
report
.
getReportData
(),
"~"
));
...
@@ -80,19 +81,19 @@ public class ReportController {
...
@@ -80,19 +81,19 @@ public class ReportController {
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
OutputStream
ouputStream
=
null
;
OutputStream
ouputStream
=
null
;
try
{
try
{
Workbook
tWorkbook
=
reportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
Workbook
tWorkbook
=
reportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
response
.
setContentType
(
"multipart/form-data"
);
response
.
setContentType
(
"multipart/form-data"
);
// response.setHeader("Content-Disposition", "attachment;fileName=" + new String(param.getFileName().getBytes("GB2312"), "ISO-8859-1"));
// response.setHeader("Content-Disposition", "attachment;fileName=" + new String(param.getFileName().getBytes("GB2312"), "ISO-8859-1"));
ouputStream
=
response
.
getOutputStream
();
ouputStream
=
response
.
getOutputStream
();
tWorkbook
.
write
(
ouputStream
);
tWorkbook
.
write
(
ouputStream
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
try
{
try
{
if
(
ouputStream
!=
null
)
{
if
(
ouputStream
!=
null
)
{
ouputStream
.
close
();
ouputStream
.
close
();
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
...
@@ -108,7 +109,7 @@ public class ReportController {
...
@@ -108,7 +109,7 @@ public class ReportController {
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
@PathVariable
(
name
=
"projectId"
,
required
=
false
)
String
projectId
)
{
ByteArrayOutputStream
bout
=
new
ByteArrayOutputStream
();
ByteArrayOutputStream
bout
=
new
ByteArrayOutputStream
();
try
{
try
{
Workbook
tWorkbook
=
reportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
Workbook
tWorkbook
=
reportService
.
generateReportData
(
param
.
getReportIds
(),
projectId
,
period
);
tWorkbook
.
write
(
bout
);
tWorkbook
.
write
(
bout
);
ReportUpload
data
=
new
ReportUpload
();
ReportUpload
data
=
new
ReportUpload
();
data
.
setProjectId
(
projectId
);
data
.
setProjectId
(
projectId
);
...
@@ -117,18 +118,19 @@ public class ReportController {
...
@@ -117,18 +118,19 @@ public class ReportController {
return
OperationResultDto
.
success
();
return
OperationResultDto
.
success
();
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
finally
{
}
finally
{
try
{
try
{
if
(
bout
!=
null
)
{
if
(
bout
!=
null
)
{
bout
.
close
();
bout
.
close
();
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
return
OperationResultDto
.
error
(
ErrorMessage
.
SystemError
);
return
OperationResultDto
.
error
(
ErrorMessage
.
SystemError
);
}
}
@RequestMapping
(
value
=
"getRunningJob/{projectId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getRunningJob/{projectId}/{period}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@ResponseBody
@ResponseBody
public
PeriodJobDto
getRunningJob
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
public
PeriodJobDto
getRunningJob
(
@PathVariable
String
projectId
,
@PathVariable
Integer
period
)
{
...
@@ -264,16 +266,17 @@ public class ReportController {
...
@@ -264,16 +266,17 @@ public class ReportController {
@Autowired
@Autowired
private
DidiFileUploadService
didiFileUploadService
;
private
DidiFileUploadService
didiFileUploadService
;
@RequestMapping
(
value
=
"doUpload"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"doUpload"
,
method
=
RequestMethod
.
POST
)
public
OperationResultDto
doUploadAttach
(
@RequestParam
(
"fileName"
)
String
fileName
,
MultipartFile
file
,
String
remarks
,
@RequestParam
(
"activeCol"
)
Long
activeCol
,
@RequestParam
(
"activeRow"
)
Long
activeRow
,
@RequestParam
(
"activeTemplateId"
)
String
activeTemplateId
)
{
public
OperationResultDto
doUploadAttach
(
@RequestParam
(
"fileName"
)
String
fileName
,
MultipartFile
file
,
String
remarks
,
@RequestParam
(
"activeCol"
)
Long
activeCol
,
@RequestParam
(
"activeRow"
)
Long
activeRow
,
@RequestParam
(
"activeTemplateId"
)
String
activeTemplateId
)
{
FileUpload
fileUpload
=
null
;
FileUpload
fileUpload
=
null
;
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
try
{
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
"附件上传"
);
fileUpload
=
didiFileUploadService
.
uploadFile
(
file
,
file
.
getOriginalFilename
(),
"附件上传"
);
operationResultDto
.
setData
(
reportService
.
bindPwcAttach
(
activeCol
,
activeRow
,
activeTemplateId
,
fileUpload
,
remarks
));
operationResultDto
.
setData
(
reportService
.
bindPwcAttach
(
activeCol
,
activeRow
,
activeTemplateId
,
fileUpload
,
remarks
));
operationResultDto
.
setResultMsg
(
"success"
);
operationResultDto
.
setResultMsg
(
"success"
);
return
operationResultDto
;
return
operationResultDto
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
return
operationResultDto
.
error
();
return
operationResultDto
.
error
();
}
}
...
@@ -304,7 +307,7 @@ public class ReportController {
...
@@ -304,7 +307,7 @@ public class ReportController {
operationResultDto.setResultMsg("附件导出失败");
operationResultDto.setResultMsg("附件导出失败");
return operationResultDto;
return operationResultDto;
}
}
*/
*/
@Resource
@Resource
private
OrganizationMapper
organizationMapper
;
private
OrganizationMapper
organizationMapper
;
...
@@ -318,21 +321,17 @@ public class ReportController {
...
@@ -318,21 +321,17 @@ public class ReportController {
/**
/**
* 获取模板的report,通过reportid可以获取模板数据
* 获取模板的report,通过reportid可以获取模板数据
*
* @param templateId
* @param period
* @param orgId
* @return
*/
*/
@RequestMapping
(
value
=
"getReportByTemplateEbit/{templateId}/{period}/{orgId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
@RequestMapping
(
value
=
"getReportByTemplateEbit"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
PeriodReportDto
>
getReportByTemplateEbit
(
@PathVariable
String
templateId
,
@PathVariable
Integer
period
,
@PathVariable
String
orgId
)
{
public
OperationResultDto
<
PeriodReportDto
>
getReportByTemplateEbit
(
/*@PathVariable String templateId, @PathVariable Integer period, @PathVariable String orgId*/
RequestParameterDto
requestParameterDto
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
OperationResultDto
resultDto
=
new
OperationResultDto
();
if
(
templateId
==
null
||
period
==
null
||
period
==
0
)
{
if
(
requestParameterDto
.
getTemplateId
()
==
null
||
requestParameterDto
.
getPeriod
()
==
null
||
requestParameterDto
.
getPeriod
()
==
0
)
{
resultDto
.
setResult
(
false
);
resultDto
.
setResult
(
false
);
resultDto
.
setResultMsg
(
"templateId or period is invalid"
);
resultDto
.
setResultMsg
(
"templateId or period is invalid"
);
return
resultDto
;
return
resultDto
;
}
}
return
reportService
.
getReportByTemplateEbit
(
Long
.
parseLong
(
templateId
),
period
%
100
,
getProjId
(
orgId
,
period
));
return
reportService
.
getReportByTemplateEbit
(
Long
.
parseLong
(
requestParameterDto
.
getTemplateId
()),
requestParameterDto
.
getPeriod
()
%
100
,
getProjId
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
()
));
}
}
...
@@ -344,17 +343,30 @@ public class ReportController {
...
@@ -344,17 +343,30 @@ public class ReportController {
@RequestParam(value = "reportId") Long reportId,*/
@RequestBody
RequestParameterDto
requestParameterDto
)
{
@RequestParam(value = "reportId") Long reportId,*/
@RequestBody
RequestParameterDto
requestParameterDto
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
String
projId
=
getProjId
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
());
String
projId
=
getProjId
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
());
try
{
try
{
operationResultDto
.
setData
(
reportService
.
loadEbitData
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
(),
requestParameterDto
.
getSpecialConsiderations
(),
requestParameterDto
.
getEbitRate
()));
operationResultDto
.
setData
(
reportService
.
loadEbitData
(
requestParameterDto
.
getOrgId
(),
requestParameterDto
.
getPeriod
(),
requestParameterDto
.
getSpecialConsiderations
(),
requestParameterDto
.
getEbitRate
()));
/* new Thread(()->{
/* new Thread(()->{
reportService.saveDatasource(orgId, period, specialConsiderations, ebitRate, operationResultDto, reportService.getCellData(Long.parseLong(requestParameterDto.getReportId()),projId ).getData().getCellData());
reportService.saveDatasource(orgId, period, specialConsiderations, ebitRate, operationResultDto, reportService.getCellData(Long.parseLong(requestParameterDto.getReportId()),projId ).getData().getCellData());
}).start();*/
}).start();*/
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
return
operationResultDto
.
error
();
return
operationResultDto
.
error
();
}
}
operationResultDto
.
setResultMsg
(
"success"
);
operationResultDto
.
setResultMsg
(
"success"
);
return
operationResultDto
;
return
operationResultDto
;
}
}
@RequestMapping
(
"getlxbId"
)
public
OperationResultDto
getlxbId
()
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
operationResultDto
.
setData
(
reportService
.
getlxbId
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
operationResultDto
.
error
(
e
.
getMessage
());
}
return
operationResultDto
;
}
/**
/**
* 批量导出利润表
* 批量导出利润表
*/
*/
...
@@ -362,7 +374,7 @@ public class ReportController {
...
@@ -362,7 +374,7 @@ public class ReportController {
public
OperationResultDto
manyExport
(
@RequestBody
RequestParameterDto
requestParameterDto
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
public
OperationResultDto
manyExport
(
@RequestBody
RequestParameterDto
requestParameterDto
,
HttpServletResponse
response
,
HttpServletRequest
request
)
throws
Exception
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
try
{
reportService
.
manyExport
(
requestParameterDto
,
request
,
response
);
reportService
.
manyExport
(
requestParameterDto
,
request
,
response
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
operationResultDto
.
error
(
e
.
getMessage
());
operationResultDto
.
error
(
e
.
getMessage
());
...
@@ -375,18 +387,19 @@ public class ReportController {
...
@@ -375,18 +387,19 @@ public class ReportController {
private
EbitSpreadDataMapper
ebitSpreadDataMapper
;
private
EbitSpreadDataMapper
ebitSpreadDataMapper
;
@Autowired
@Autowired
protected
DistributedIdService
idService
;
protected
DistributedIdService
idService
;
/**
/**
*/
*/
@RequestMapping
(
"spreadToDb"
)
@RequestMapping
(
"spreadToDb"
)
public
OperationResultDto
spreadToDb
(
HttpServletRequest
request
,
Integer
period
,
String
orgId
)
{
public
OperationResultDto
spreadToDb
(
HttpServletRequest
request
,
Integer
period
,
String
orgId
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
try
{
try
{
reportService
.
spreadToDb
(
request
,
period
,
orgId
);
reportService
.
spreadToDb
(
request
,
period
,
orgId
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
operationResultDto
.
error
(
"保存失败"
);
operationResultDto
.
error
(
"保存失败"
);
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
aab60a50
...
@@ -359,17 +359,9 @@ public class TemplateController extends BaseController {
...
@@ -359,17 +359,9 @@ public class TemplateController extends BaseController {
}
}
}
}
}
}
List
<
PeriodTemplate
>
templates
=
Lists
.
newArrayList
();
List
<
Template
>
templates
=
templateService
.
getTL
(
templateId
);
if
(
projectId
==
null
||
""
.
equals
(
projectId
))
{
templates
=
templateService
.
getTemplates
(
templateId
);
}
else
{
templates
=
templateService
.
getPeriodTemplates
(
templateId
,
period
,
projectId
);
}
if
(
templates
.
size
()
==
0
){
templates
=
templateService
.
getTemplates
(
templateId
);
}
MyAsserts
.
assertNotEmpty
(
templates
,
new
NotFoundException
());
MyAsserts
.
assertNotEmpty
(
templates
,
new
NotFoundException
());
Period
Template
template
=
templates
.
get
(
0
);
Template
template
=
templates
.
get
(
0
);
String
templatePath
=
template
.
getPath
();
String
templatePath
=
template
.
getPath
();
MyAsserts
.
assertNotEmpty
(
templatePath
,
new
NotFoundException
());
MyAsserts
.
assertNotEmpty
(
templatePath
,
new
NotFoundException
());
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
filePath
=
this
.
getClass
().
getResource
(
""
).
toURI
().
getPath
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateServiceImpl.java
View file @
aab60a50
...
@@ -128,6 +128,11 @@ public class TemplateServiceImpl extends AbstractService {
...
@@ -128,6 +128,11 @@ public class TemplateServiceImpl extends AbstractService {
example
.
createCriteria
().
andTemplateIdEqualTo
(
templateId
);
example
.
createCriteria
().
andTemplateIdEqualTo
(
templateId
);
return
periodTemplateMapper
.
selectByExample
(
example
);
return
periodTemplateMapper
.
selectByExample
(
example
);
}
}
public
List
<
Template
>
getTL
(
Long
templateId
){
TemplateExample
example
=
new
TemplateExample
();
example
.
createCriteria
().
andIdEqualTo
(
templateId
);
return
templateMapper
.
selectByExample
(
example
);
}
public
String
getTemplatePath
(
Long
templateId
)
{
public
String
getTemplatePath
(
Long
templateId
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
aab60a50
...
@@ -20,6 +20,7 @@ import org.slf4j.Logger;
...
@@ -20,6 +20,7 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.jdbc.core.JdbcTemplate
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.springframework.web.multipart.MultipartFile
;
...
@@ -2457,6 +2458,20 @@ public class ReportServiceImpl extends BaseService {
...
@@ -2457,6 +2458,20 @@ public class ReportServiceImpl extends BaseService {
example
.
createCriteria
().
andIdEqualTo
(
orgId
);
example
.
createCriteria
().
andIdEqualTo
(
orgId
);
return
organizationMapper
.
selectByExample
(
example
).
get
(
0
).
getName
();
return
organizationMapper
.
selectByExample
(
example
).
get
(
0
).
getName
();
}
}
@Autowired
private
JdbcTemplate
jdbcTemplate
;
//获取利润表模板Id
public
String
getlxbId
()
throws
Exception
{
try
{
String
sql
=
"select * from template t where t.name = '利润表'"
;
Map
<
String
,
Object
>
stringObjectMap
=
new
HashMap
<>();
stringObjectMap
=
jdbcTemplate
.
queryForList
(
"select * from template t where t.name = '利润表' "
).
get
(
0
);
return
stringObjectMap
.
get
(
"id"
).
toString
();
}
catch
(
Exception
e
){
e
.
printStackTrace
();
throw
new
Exception
(
"获取EBIT利润表模板失败"
);
}
}
/* private String getCellStringValue(Cell cell) {
/* private String getCellStringValue(Cell cell) {
if (cell.getCellTypeEnum().equals(CellType.STRING)) {
if (cell.getCellTypeEnum().equals(CellType.STRING)) {
...
...
atms-web/src/main/webapp/app/analysis/table/sheet/table-report-sheet.js
View file @
aab60a50
...
@@ -106,6 +106,8 @@
...
@@ -106,6 +106,8 @@
if
(
scope
.
relation
.
orgId
==
undefined
){
if
(
scope
.
relation
.
orgId
==
undefined
){
scope
.
relation
.
orgId
=
null
;
scope
.
relation
.
orgId
=
null
;
}
}
if
(
templateId
==
undefined
)
return
;
return
templateService
.
getPeriodTemplateJsonByOrg
(
templateId
,
scope
.
relation
.
period
,
scope
.
relation
.
orgId
).
then
(
function
(
reportSpread
)
{
return
templateService
.
getPeriodTemplateJsonByOrg
(
templateId
,
scope
.
relation
.
period
,
scope
.
relation
.
orgId
).
then
(
function
(
reportSpread
)
{
var
spreadCtrl
=
getSpreadControl
();
var
spreadCtrl
=
getSpreadControl
();
if
(
spreadCtrl
)
{
if
(
spreadCtrl
)
{
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
aab60a50
...
@@ -1100,6 +1100,10 @@
...
@@ -1100,6 +1100,10 @@
};
};
var
getReportData
=
function
(
period
)
{
var
getReportData
=
function
(
period
)
{
if
(
$scope
.
relation
.
orgId
==
null
||
$scope
.
relation
.
orgId
==
undefined
){
$scope
.
relation
.
loadSheet
(
$scope
.
templateId
);
return
;
}
vatReportService
.
getReportEbitData
(
$scope
.
reportId
,
$scope
.
relation
.
orgId
,
period
!=
undefined
?
period
:
(
$scope
.
relation
.
period
==
undefined
?
period
:
$scope
.
relation
.
period
)).
success
(
function
(
reportData
)
{
vatReportService
.
getReportEbitData
(
$scope
.
reportId
,
$scope
.
relation
.
orgId
,
period
!=
undefined
?
period
:
(
$scope
.
relation
.
period
==
undefined
?
period
:
$scope
.
relation
.
period
)).
success
(
function
(
reportData
)
{
if
(
reportData
&&
reportData
.
data
&&
reportData
.
data
.
cellData
)
{
if
(
reportData
&&
reportData
.
data
&&
reportData
.
data
.
cellData
)
{
_
.
each
(
reportData
.
data
.
cellData
,
function
(
x
)
{
_
.
each
(
reportData
.
data
.
cellData
,
function
(
x
)
{
...
@@ -1129,7 +1133,7 @@
...
@@ -1129,7 +1133,7 @@
//todo: according to templateId and period get reportId
//todo: according to templateId and period get reportId
period
=
Number
(
period
);
//转成Number类型
period
=
Number
(
period
);
//转成Number类型
vatReportService
.
getReportByTemplateIdEbit
(
$scope
.
templateId
,
period
,
orgId
).
success
(
function
(
report
)
{
vatReportService
.
getReportByTemplateIdEbit
(
$scope
.
templateId
,
period
,
orgId
).
success
(
function
(
report
)
{
if
(
report
.
data
)
{
if
(
report
.
data
)
{
$scope
.
reportId
=
report
.
data
.
id
;
$scope
.
reportId
=
report
.
data
.
id
;
}
else
{
}
else
{
$scope
.
reportData
=
[];
$scope
.
reportData
=
[];
...
@@ -2832,34 +2836,6 @@
...
@@ -2832,34 +2836,6 @@
//--------------------------------------kevin insert -------------------------------------
//--------------------------------------kevin insert -------------------------------------
$scope
.
relation
=
{};
$scope
.
relation
=
{};
/* var loadIndustry = function () {
vatReportService.getOrgLists().success(function (industryData) {
var _data = industryData.data;
$scope.relation.orgId = _data[0].id;
if (_data && _data.length > 0) {
//配置行业下拉列表
$scope.dataSourceIndustryList = {
dataSource: new DevExpress.data.ArrayStore({
data: _data
}),
displayExpr: 'name',
valueExpr: "id",
value: _data[0].id,
itemTemplate: 'orgList',
onItemClick: function (e) {
loadCellData($scope.relation.period, e.itemData.id,function(){
$scope.relation.orgId = e.itemData.id;
});
},
onInitialized: function (e) {
$scope.dataSourceIndustryListInstance = e.component;
}
}
$scope.curIndustry = _data[0];
$('#dx-select-industry').dxSelectBox('instance').option('value', $scope.relation.id);
}
});
};*/
$scope
.
changeDate
=
function
(
e
)
{
$scope
.
changeDate
=
function
(
e
)
{
if
(
e
&&
e
.
date
)
{
if
(
e
&&
e
.
date
)
{
...
@@ -2899,10 +2875,25 @@
...
@@ -2899,10 +2875,25 @@
$scope
.
changeDate
(
e
);
$scope
.
changeDate
(
e
);
});
});
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
$scope
.
templateId
=
"100610523201314816"
;
//这里先写死 todo 这里先写死利润表模板,后续会修改模板id
var
webApiHostUrl
=
loginContext
.
apiHost
+
constant
.
webapi
.
prefix
;
$
.
ajax
({
url
:
webApiHostUrl
+
"/Report/getlxbId"
,
type
:
"POST"
,
headers
:
{
'Access-Control-Allow-Origin'
:
'*'
,
Authorization
:
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
(),
},
success
:
function
(
res
)
{
if
(
res
.
data
)
{
$scope
.
templateId
=
res
.
data
;
loadCellData
(
$scope
.
selectedDate
,
$scope
.
relation
.
orgId
);
}
else
{
SweetAlert
.
error
(
res
.
resultMsg
);
}
}
});
//初始化
//初始化
$scope
.
relation
.
period
=
year
.
toString
()
+
monthRevert
(
mon
);
$scope
.
relation
.
period
=
year
.
toString
()
+
monthRevert
(
mon
);
loadCellData
(
$scope
.
selectedDate
,
$scope
.
relation
.
orgId
);
//初始化数据,默认是当前period
};
};
var
monthRevert
=
function
(
mon
)
{
var
monthRevert
=
function
(
mon
)
{
...
@@ -2924,7 +2915,7 @@
...
@@ -2924,7 +2915,7 @@
}
}
//数字校验
//数字校验
var
reg
=
/^
[
0-9
]
+
([
.
]{1}[
0-9
]
+
){0,1}
$/
;
var
reg
=
/^
[
0-9
]
+
([
.
]{1}[
0-9
]
+
){0,1}
$/
;
if
(
!
reg
.
test
(
specialConsiderations
)
&&
specialConsiderations
!=
""
)
{
if
(
!
reg
.
test
(
specialConsiderations
)
&&
specialConsiderations
!=
""
)
{
SweetAlert
.
error
(
"请输入正确的特殊因素考虑值"
);
SweetAlert
.
error
(
"请输入正确的特殊因素考虑值"
);
return
;
return
;
...
@@ -2952,23 +2943,6 @@
...
@@ -2952,23 +2943,6 @@
});
});
}
}
var
spreadTODb
=
function
()
{
var
spreadTODb
=
function
()
{
/*//spread序列化参数
var serializationOption = {
ignoreFormula: false, // indicate to ignore the style when convert workbook to json, default value is false
ignoreStyle: false, // indicate to ignore the formula when convert workbook to json, default value is false
rowHeadersAsFrozenColumns: false, // indicate to treat the row headers as frozen columns when convert workbook to json, default value is false
columnHeadersAsFrozenRows: false // indicate to treat the column headers as frozen rows when convert workbook to json, default value is false
}
var jsonString = JSON.stringify($scope.spread.toJSON(serializationOption));
var obj = {
period : $scope.relation.period != undefined ? $scope.relation.period : null,
orgId : $scope.relation.orgId,
jsonString : jsonString
}
$http.post('/Report/spreadToDb', obj ,function(res){
if(!res.result)
SweetAlert.error("保存表单到数据库失败");
});*/
var
json
=
$scope
.
spread
.
toJSON
({
includeBindingSource
:
true
});
var
json
=
$scope
.
spread
.
toJSON
({
includeBindingSource
:
true
});
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
var
url
=
apiInterceptor
.
webApiHostUrl
+
'/Report/spreadToDb?orgId='
+
$scope
.
relation
.
orgId
+
"&period="
+
$scope
.
relation
.
period
;
var
url
=
apiInterceptor
.
webApiHostUrl
+
'/Report/spreadToDb?orgId='
+
$scope
.
relation
.
orgId
+
"&period="
+
$scope
.
relation
.
period
;
...
@@ -3170,13 +3144,13 @@
...
@@ -3170,13 +3144,13 @@
vatReportService
.
getOrgLists
().
success
(
function
(
data
)
{
vatReportService
.
getOrgLists
().
success
(
function
(
data
)
{
if
(
data
)
{
if
(
data
)
{
/*$scope.companyList = data.data;*/
/*$scope.companyList = data.data;*/
for
(
var
a
=
0
;
a
<
data
.
data
.
length
;
a
++
)
{
for
(
var
a
=
0
;
a
<
data
.
data
.
length
;
a
++
)
{
joinText
+=
"<option value ="
+
data
.
data
[
a
].
id
+
" ng-bind = 'relation.orgId' data-id ="
+
data
.
data
[
a
].
id
+
" >"
+
data
.
data
[
a
].
name
+
"</option>"
;
joinText
+=
"<option value ="
+
data
.
data
[
a
].
id
+
" ng-bind = 'relation.orgId' data-id ="
+
data
.
data
[
a
].
id
+
" >"
+
data
.
data
[
a
].
name
+
"</option>"
;
}
}
$
(
'#orgList'
).
html
(
joinText
);
$
(
'#orgList'
).
html
(
joinText
);
$
(
'.selectpicker'
).
selectpicker
();
$
(
'.selectpicker'
).
selectpicker
();
setTimeout
(
function
()
{
setTimeout
(
function
()
{
$
(
'.dropdown-menu'
).
css
({
"min-width"
:
"0!important;"
,
"width"
:
"100%"
})
$
(
'.dropdown-menu'
).
css
({
"min-width"
:
"0!important;"
,
"width"
:
"100%"
})
},
1000
);
},
1000
);
}
}
});
});
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.html
View file @
aab60a50
<div
class=
"vat-report-view"
style=
"overflow-y: scroll"
>
<div
class=
"vat-report-view"
style=
"overflow-y: scroll"
>
<!--Report SpreadJS-->
<!--Report SpreadJS-->
<div
class=
"row"
style=
" height: 53px; background: #
ccc
;"
>
<div
class=
"row"
style=
" height: 53px; background: #
f5f5f5
;"
>
<div
class=
"col-sm-7 navLeft "
style=
" margin-top: 10px;"
>
<div
class=
"col-sm-7 navLeft "
style=
" margin-top: 10px;"
>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<span
class=
"text-bold"
translate=
"SelectedOrganization"
></span><span>
:
</span>
<span
class=
"text-bold"
translate=
"SelectedOrganization"
></span><span>
:
</span>
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.less
View file @
aab60a50
...
@@ -124,7 +124,7 @@
...
@@ -124,7 +124,7 @@
}
}
@media screen and (min-width:1400px) {
@media screen and (min-width:1400px) {
.navRight{
.navRight{
right: -
8
%!important;
right: -
7
%!important;
}
}
...
...
atms-web/src/main/webapp/app/common/vatservices/vatReportService.js
View file @
aab60a50
...
@@ -237,8 +237,12 @@
...
@@ -237,8 +237,12 @@
if
(
!
_
.
isNumber
(
period
))
{
if
(
!
_
.
isNumber
(
period
))
{
period
=
0
;
period
=
0
;
}
}
return
$http
.
get
(
'/Report/getReportByTemplateEbit/'
+
templateId
+
'/'
+
period
+
'/'
+
orgId
,
apiConfig
.
createVat
());
var
param
=
{
templateId
:
templateId
,
period
:
period
,
orgId
:
orgId
}
return
$http
.
post
(
"/Report/getReportByTemplateEbit"
,
JSON
.
stringify
(
param
),
apiConfig
.
createVat
());
},
},
getDataSourceDetailList
:
function
(
dataSourceId
)
{
getDataSourceDetailList
:
function
(
dataSourceId
)
{
return
$http
.
get
(
'/Report/getDataSourceDetailList/'
+
dataSourceId
,
apiConfig
.
createVat
());
return
$http
.
get
(
'/Report/getDataSourceDetailList/'
+
dataSourceId
,
apiConfig
.
createVat
());
...
...
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