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
6e3260ed
Commit
6e3260ed
authored
Mar 29, 2019
by
chase
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev_mysql' of
http://code.tech.tax.asia.pwcinternal.com/root/atms
into dev_mysql
parents
af74bb1e
839e2e84
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
251 additions
and
78 deletions
+251
-78
ReportController.java
...in/java/pwc/taxtech/atms/controller/ReportController.java
+7
-1
TemplateGroupController.java
.../pwc/taxtech/atms/controller/TemplateGroupController.java
+1
-2
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+9
-8
TemplateGroupServiceImpl.java
...c/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
+9
-7
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+61
-33
RedLetterInfoTableExtendsMapper.xml
.../atms/vat/dao/extends/RedLetterInfoTableExtendsMapper.xml
+4
-0
table-report-sheet.js
...ain/webapp/app/analysis/table/sheet/table-report-sheet.js
+1
-12
tb-ebit-form.ctrl.js
...b/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
+78
-10
import-red-letter-info-table.ctrl.js
...ed-letter-info-table/import-red-letter-info-table.ctrl.js
+29
-0
import-red-letter-info-table.html
...t-red-letter-info-table/import-red-letter-info-table.html
+45
-4
import-red-letter-info-table.less
...t-red-letter-info-table/import-red-letter-info-table.less
+3
-1
pwc-util.js
atms-web/src/main/webapp/app/common/utils/pwc-util.js
+4
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/ReportController.java
View file @
6e3260ed
...
...
@@ -235,6 +235,13 @@ public class ReportController {
return
operationResultDto
;
}
/**
* 获取模板的report,通过reportid可以获取模板数据
* @param templateId
* @param period
* @param orgId
* @return
*/
@RequestMapping
(
value
=
"getReportByTemplateEbit/{templateId}/{period}/{orgId}"
,
method
=
RequestMethod
.
GET
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
OperationResultDto
<
PeriodReportDto
>
getReportByTemplateEbit
(
@PathVariable
String
templateId
,
@PathVariable
Integer
period
,
@PathVariable
String
orgId
)
{
OperationResultDto
resultDto
=
new
OperationResultDto
();
...
...
@@ -253,7 +260,6 @@ public class ReportController {
@RequestMapping
(
"manyExport"
)
public
OperationResultDto
manyExport
(
@RequestBody
RequestParameterDto
requestParameterDto
){
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
operationResultDto
.
setResult
(
null
);
return
operationResultDto
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateGroupController.java
View file @
6e3260ed
...
...
@@ -149,8 +149,7 @@ public class TemplateGroupController {
@RequestParam
(
"orgId"
)
String
orgId
,
@RequestParam
(
"period"
)
Integer
period
)
{
try
{
templateGroupService
.
ebitTemplateImport
(
file
,
orgId
,
period
);
return
OperationResultDto
.
success
();
return
templateGroupService
.
ebitTemplateImport
(
file
,
orgId
,
period
);
}
catch
(
ServiceException
e
)
{
return
OperationResultDto
.
error
(
e
.
getMessage
());
}
catch
(
Exception
e
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
6e3260ed
...
...
@@ -938,6 +938,7 @@ public class DataImportService extends BaseService {
public
OperationResultDto
importRLITExcelFile
(
MultipartFile
file
,
List
<
String
>
orgIds
,
String
periodDate
,
Integer
importType
)
throws
ServiceException
{
try
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
InputStream
inputStream
=
file
.
getInputStream
();
Workbook
workbook
=
WorkbookFactory
.
create
(
inputStream
);
if
(
StringUtils
.
isBlank
(
periodDate
)
||
"null"
.
equals
(
periodDate
))
{
...
...
@@ -960,16 +961,14 @@ public class DataImportService extends BaseService {
if
(
isSuccess
<
1
)
{
return
OperationResultDto
.
error
(
ErrorMessage
.
ImportFailed
);
}
return
OperationResultDto
.
success
();
}
catch
(
ServiceException
e
)
{
throw
e
;
return
operationResultDto
.
success
();
}
catch
(
Exception
e
)
{
logger
.
error
(
"importRLITExcelFile error."
,
e
);
throw
new
ServiceException
(
ErrorMessage
.
SystemError
);
e
.
printStackTrace
(
);
return
OperationResultDto
.
error
(
e
.
getMessage
()
);
}
}
private
void
processRlits
(
String
companyCode
,
List
<
RedLetterInfoTable
>
rlits
,
List
<
String
>
orgIds
,
private
void
processRlits
(
String
companyCode
,
List
<
RedLetterInfoTable
>
rlits
,
List
<
String
>
orgIds
,
Integer
tmsPeriod
,
Integer
importType
,
List
<
DataImportLog
>
dataImportLogs
)
{
OrganizationExample
organizationExample
=
new
OrganizationExample
();
organizationExample
.
createCriteria
().
andCodeEqualTo
(
companyCode
);
...
...
@@ -1014,16 +1013,18 @@ public class DataImportService extends BaseService {
boolean
validateRes
=
true
;
for
(
RedLetterInfoTable
rlit
:
rlits
)
{
// 校验该主体导入所有记录区间是否一致
if
(!
rlit
.
get
FillInDate
().
equals
(
period
))
{
if
(!
rlit
.
get
Period
().
equals
(
period
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
InconsistentPeriod
);
validateRes
=
false
;
new
Exception
(
ErrorMessageCN
.
InconsistentPeriod
);
break
;
}
if
(!
rlit
.
get
FillInDate
().
equals
(
tmsPeriod
))
{
if
(!
rlit
.
get
Period
().
equals
(
tmsPeriod
))
{
dataImportLog
.
setImportResult
(
false
);
dataImportLog
.
setErrorMsg
(
ErrorMessageCN
.
ExistDataPeriodsError
);
validateRes
=
false
;
new
Exception
(
ErrorMessageCN
.
ExistDataPeriodsError
);
break
;
}
rlit
.
setOrganizationId
(
orgId
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TemplateGroupServiceImpl.java
View file @
6e3260ed
...
...
@@ -230,15 +230,19 @@ public class TemplateGroupServiceImpl extends AbstractService {
ebitCellDataMapper
.
deleteByExample
(
example
);
}
for
(
int
j
=
1
;
j
<=
sheet
.
getRow
(
0
).
getLastCellNum
();
j
++)
{
for
(
int
m
=
1
;
j
<
sheet
.
getLastRowNum
();
j
++)
{
for
(
int
m
=
1
;
m
<=
sheet
.
getLastRowNum
();
m
++)
{
if
(
j
==
1
||
j
==
2
)
{
EbitCellData
ebitCellData
=
new
EbitCellData
();
ebitCellData
.
setId
(
idService
.
nextId
());
ebitCellData
.
setCol
(
j
);
ebitCellData
.
setRow
(
m
);
ebitCellData
.
setCreateTime
(
now
);
if
(
sheet
.
getRow
(
m
).
getCell
(
j
)
!=
null
)
ebitCellData
.
setData
(
sheet
.
getRow
(
m
).
getCell
(
j
).
getStringCellValue
());
try
{
if
(
sheet
.
getRow
(
m
).
getCell
(
j
)
!=
null
)
ebitCellData
.
setData
(
sheet
.
getRow
(
m
).
getCell
(
j
).
getStringCellValue
());
}
catch
(
Exception
e
){
//遇到空行,略过
}
ebitCellData
.
setTemplateId
(
String
.
valueOf
(
idService
.
nextId
()));
ebitCellData
.
setProjectId
(
projectId
);
ebitCellData
.
setOrganizationId
(
orgId
);
...
...
@@ -249,13 +253,11 @@ public class TemplateGroupServiceImpl extends AbstractService {
}
ebitCellDataMapper
.
insertBatch
(
list
);
}
return
operationResultDto
.
success
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
operationResultDto
.
success
(
e
.
getMessage
());
return
operationResultDto
.
error
(
e
.
getMessage
());
}
operationResultDto
.
success
();
return
operationResultDto
;
}
public
class
TemplateGroupMessage
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
6e3260ed
...
...
@@ -20,10 +20,7 @@ import org.springframework.web.multipart.MultipartFile;
import
pwc.taxtech.atms.common.CommonUtils
;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.message.ErrorMessage
;
import
pwc.taxtech.atms.common.util.DataUtil
;
import
pwc.taxtech.atms.common.util.FileUploadUtil
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.common.util.*
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.*
;
import
pwc.taxtech.atms.dao.*
;
...
...
@@ -138,6 +135,7 @@ public class ReportServiceImpl extends BaseService {
TrialBalanceFinalMapper
trialBalanceFinalMapper
;
@Autowired
FormulaAgent
agent
;
public
OperationResultDto
<
List
<
ReportDto
>>
getFilterReportTemplate
(
String
projectId
,
EnumServiceType
serviceType
,
Integer
periodParam
)
{
OperationResultDto
<
List
<
ReportDto
>>
result
=
new
OperationResultDto
<>();
CommonUtils
.
copyProperties
(
getReportTemplate
(
projectId
,
serviceType
,
periodParam
),
result
);
...
...
@@ -303,19 +301,20 @@ public class ReportServiceImpl extends BaseService {
//根据收入类型映射生成开票记录关联数据
assembleInvoiceRecord
(
projectId
,
period
);
//生成trial_balance_final数据
assembleTrialBalanceFinal
(
projectId
,
period
);
assembleTrialBalanceFinal
(
projectId
,
period
);
clearPeriodData
(
projectId
,
period
,
exceptTemplateIds
,
isMergeManualData
);
copyTemplateAndConfigFromAdmin
(
projectId
,
templates
,
period
);
setStatus
(
job
,
STATUS_END
);
periodJobMapper
.
updateByPrimaryKey
(
job
);
}
public
void
assembleTrialBalanceFinal
(
String
projectId
,
Integer
period
){
public
void
assembleTrialBalanceFinal
(
String
projectId
,
Integer
period
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
MyAsserts
.
assertNotNull
(
project
,
Exceptions
.
NOT_FOUND_REPORT_EXCEPTION
);
String
queryPeriod
=
project
.
getYear
()
+
""
+(
period
<
10
?(
"0"
+
period
):(
period
+
""
));
String
queryPeriod
=
project
.
getYear
()
+
""
+
(
period
<
10
?
(
"0"
+
period
)
:
(
period
+
""
));
Project
lastProject
=
agent
.
getFixedProject
(
projectId
,
project
.
getYear
());
String
lastPeriod
=
"0"
;
if
(
lastProject
!=
null
)
{
if
(
lastProject
!=
null
)
{
if
(
project
.
getId
().
equals
(
lastProject
.
getId
()))
{
lastPeriod
=
project
.
getYear
()
+
""
+
(
period
-
1
<
10
?
(
"0"
+
(
period
-
1
))
:
((
period
-
1
)
+
""
));
}
else
{
...
...
@@ -325,10 +324,11 @@ public class ReportServiceImpl extends BaseService {
TrialBalanceFinalExample
example
=
new
TrialBalanceFinalExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
projectId
).
andPeriodEqualTo
(
Integer
.
valueOf
(
queryPeriod
));
trialBalanceFinalMapper
.
deleteByExample
(
example
);
trialBalanceFinalMapper
.
generateFinalData
(
projectId
,
Integer
.
valueOf
(
queryPeriod
),
lastProject
==
null
?
"0"
:
lastProject
.
getId
(),
Integer
.
valueOf
(
lastPeriod
));
trialBalanceFinalMapper
.
generateFinalData
(
projectId
,
Integer
.
valueOf
(
queryPeriod
),
lastProject
==
null
?
"0"
:
lastProject
.
getId
(),
Integer
.
valueOf
(
lastPeriod
));
}
public
void
assembleInvoiceRecord
(
String
projectId
,
Integer
period
){
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
public
void
assembleInvoiceRecord
(
String
projectId
,
Integer
period
)
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
MyAsserts
.
assertNotNull
(
project
,
Exceptions
.
NOT_FOUND_REPORT_EXCEPTION
);
String
queryDate
=
project
.
getYear
()
+
"-"
+
(
period
<
10
?
(
"0"
+
period
)
:
(
period
+
""
));
RevenueTypeMappingExample
mappingExample
=
new
RevenueTypeMappingExample
();
...
...
@@ -1092,40 +1092,52 @@ public class ReportServiceImpl extends BaseService {
return
""
;
}
private
static
final
Integer
specialConsideration
=
0
;
//特殊因素考虑
private
static
final
String
ebitRate
=
"1%"
;
//ebit 比率
public
List
<
CellTemplateReferenceDto
>
getTemplateReferences
(
int
period
)
{
return
new
ArrayList
<>();
}
public
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
,
String
orgId
,
Integer
period
)
{
orgId
=
"5bbd739c-1a13-4b0f-aba6-32ba41e4de69"
;
OperationResultDto
<
ReportDataDto
>
cellData
=
getCellData
(
reportId
,
getProjId
(
orgId
,
period
));
EbitDataDto
ebitDataDto
=
loadEbitDataFirst
(
orgId
,
period
);
if
(
ebitDataDto
!=
null
)
{
cellData
.
getData
().
setEbitData
(
ebitDataDto
);
}
else
{
OperationResultDto
<
ReportDataDto
>
operationResultDto
=
new
OperationResultDto
<>();
OperationResultDto
<
ReportDataDto
>
operationResultDto1
=
loadEbitDataFirst
(
orgId
,
period
,
operationResultDto
);
//从数据库中加载ebit数据
if
(
operationResultDto1
.
getData
().
getEbitData
()
!=
null
&&
operationResultDto1
.
getData
().
getCellData
()
!=
null
)
{
return
operationResultDto1
;
}
else
if
(
operationResultDto1
.
getData
().
getEbitData
()
==
null
&&
operationResultDto1
.
getData
().
getCellData
()
==
null
)
{
OperationResultDto
<
ReportDataDto
>
cellData
=
getCellData
(
reportId
,
getProjId
(
orgId
,
period
));
ReportDataDto
reportDataDto
=
new
ReportDataDto
();
//特殊因素考虑 默认为0 rate 默认为1%
EbitDataDto
ebitDataDto1
=
loadEbitData
(
orgId
,
period
,
0
,
"1%"
);
if
(
ebitDataDto1
!=
null
)
if
(
cellData
.
getData
()
!=
null
){
cellData
.
getData
().
setEbitData
(
ebitDataDto1
);
}
else
{
ReportDataDto
reportDataDto
=
new
ReportDataDto
();
reportDataDto
.
setEbitData
(
ebitDataDto1
);
cellData
.
setData
(
reportDataDto
);
return
cellData
;
}
EbitDataDto
ebitDataDto1
=
loadEbitData
(
orgId
,
period
,
specialConsideration
,
ebitRate
);
if
(
cellData
.
getData
()
!=
null
)
{
cellData
.
getData
().
setEbitData
(
ebitDataDto1
);
}
else
{
reportDataDto
.
setEbitData
(
ebitDataDto1
);
return
cellData
;
}
}
else
if
(
operationResultDto1
.
getData
().
getEbitData
()
==
null
&&
operationResultDto1
.
getData
().
getCellData
()
!=
null
)
{
EbitDataDto
ebitDataDto1
=
loadEbitData
(
orgId
,
period
,
specialConsideration
,
ebitRate
);
operationResultDto1
.
getData
().
setEbitData
(
ebitDataDto1
);
}
else
{
OperationResultDto
<
ReportDataDto
>
cellData
=
getCellData
(
reportId
,
getProjId
(
orgId
,
period
));
operationResultDto1
.
getData
().
setCellData
(
cellData
.
getData
().
getCellData
());
}
return
cellData
;
return
operationResultDto1
;
}
public
EbitDataDto
loadEbitDataFirst
(
String
orgId
,
Integer
period
)
{
public
OperationResultDto
loadEbitDataFirst
(
String
orgId
,
Integer
period
,
OperationResultDto
operationResultDto
)
{
EbitDataDto
ebitDataDto
=
new
EbitDataDto
();
EbitCellDataExample
example
=
new
EbitCellDataExample
();
EbitCellDataExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andOrganizationIdEqualTo
(
orgId
);
ReportDataDto
reportDataDto
=
new
ReportDataDto
();
criteria
.
andPeriodEqualTo
(
period
);
List
<
EbitCellData
>
ebitCellData
=
ebitCellDataMapper
.
selectByExample
(
example
);
ArrayList
<
CellDataDto
>
listCelldatas
=
Lists
.
newArrayList
();
if
(
ebitCellData
.
size
()
==
0
)
return
null
;
boolean
bool
=
false
;
boolean
boo2
=
false
;
for
(
EbitCellData
ebitCellData1
:
ebitCellData
)
{
bool
=
true
;
switch
(
ebitCellData1
.
getRow
())
{
...
...
@@ -1164,11 +1176,28 @@ public class ReportServiceImpl extends BaseService {
break
;
ebitDataDto
.
setTotalAmountTax
(
new
BigDecimal
(
ebitCellData1
.
getData
()));
break
;
default
:
if
(
ebitCellData1
.
getRow
()
<
37
)
{
if
(!
boo2
)
boo2
=
true
;
CellDataDto
cellData
=
new
CellDataDto
();
cellData
.
setColumnIndex
(
ebitCellData1
.
getCol
());
cellData
.
setRowIndex
(
ebitCellData1
.
getRow
());
cellData
.
setCellValue
(
ebitCellData1
.
getData
());
listCelldatas
.
add
(
cellData
);
}
}
}
reportDataDto
.
setCellData
(
listCelldatas
);
reportDataDto
.
setEbitData
(
ebitDataDto
);
if
(!
bool
)
return
null
;
return
ebitDataDto
;
reportDataDto
.
setEbitData
(
null
);
if
(!
boo2
)
reportDataDto
.
setCellData
(
null
);
operationResultDto
.
setData
(
reportDataDto
);
return
operationResultDto
;
}
public
OperationResultDto
<
ReportDataDto
>
getCellData
(
Long
reportId
,
String
projectId
)
{
...
...
@@ -1445,10 +1474,8 @@ public class ReportServiceImpl extends BaseService {
ebitDataDto
.
setTransactionAmount
(
ebitDataDto
.
getSpecialFactors
().
multiply
(
new
BigDecimal
(
ebitDataDto
.
getEbitRate
())));
ebitDataDto
.
setTransactionAmount
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
0.06
)));
ebitDataDto
.
setTotalAmountTax
(
ebitDataDto
.
getTransactionAmount
().
multiply
(
new
BigDecimal
(
0.16
)));
Date
now
=
new
Date
();
/*//保存
for (int i = 37; i <= 43; i++) {
EbitCellData ebitCellData = new EbitCellData();
ebitCellData.setData(arr[i - 37]);
...
...
@@ -1459,6 +1486,7 @@ public class ReportServiceImpl extends BaseService {
ebitCellData.setPeriod(period);
ebitCellDataMapper.insert(ebitCellData);
}*/
return
ebitDataDto
;
}
return
null
;
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/vat/dao/extends/RedLetterInfoTableExtendsMapper.xml
View file @
6e3260ed
...
...
@@ -50,6 +50,10 @@
<when
test=
"item.projectId != null"
>
#{item.projectId,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.period != null"
>
#{item.period,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
</choose>
<choose>
<when
test=
"item.tmsPeriod != null"
>
#{item.tmsPeriod,jdbcType=INTEGER},
</when>
<otherwise>
0,
</otherwise>
...
...
atms-web/src/main/webapp/app/analysis/table/sheet/table-report-sheet.js
View file @
6e3260ed
...
...
@@ -31,17 +31,6 @@
scope
.
projectYear
=
vatSessionService
.
year
;
scope
.
projectPeriod
=
scope
.
serviceType
===
enums
.
serviceType
.
VAT
?
vatSessionService
.
month
:
0
;
scope
.
$watch
(
'templateId'
,
function
(
newVal
,
oldValue
)
{
if
(
newVal
!==
oldValue
)
{
loadSheet
(
newVal
);
}
});
scope
.
$watchGroup
([
'reportSource'
,
'formulaBlocks'
,
'manualDataSources'
,
'templateId'
],
function
(
newVal
,
oldValue
)
{
if
(
scope
.
templateId
&&
scope
.
reportSource
)
{
setData
(
true
);
}
});
var
profileList
=
[
"EBIT考虑资产减值损失"
,
"加:特殊因素考虑"
,
"EBIT(考虑特殊因素)"
,
"EBIT rate"
,
"关联交易金额"
,
"6%增值税"
,
"价税合计金额"
];
// 首次进入页面时,通过promise模式保证在加载完成后再调用locateCell以focus在特定单元格
// 如果是在当前页面要focus在特定单元格,通过watch行列号来完成
...
...
@@ -172,6 +161,7 @@
}
return
$q
.
when
(
spread
);
};
var
addEbitRow
=
function
(
sheet
){
if
(
sheet
==
undefined
||
sheet
==
null
)
sheet
=
scope
.
spread
.
getActiveSheet
();
...
...
@@ -187,7 +177,6 @@
}
var
setEditable
=
function
(
spread
,
isReadOnly
,
ifSuspend
)
{
//todo:注册之后这里去掉注释
var
sheet
;
if
(
constant
.
regesterInformation
.
active
)
{
...
...
atms-web/src/main/webapp/app/analysis/table/tb-ebit-form.ctrl.js
View file @
6e3260ed
...
...
@@ -1127,6 +1127,7 @@
//period = Number(period);
if
(
$scope
.
templateId
!==
undefined
)
{
//todo: according to templateId and period get reportId
period
=
Number
(
period
);
//转成Number类型
vatReportService
.
getReportByTemplateIdEbit
(
$scope
.
templateId
,
period
,
orgId
).
success
(
function
(
report
)
{
if
(
report
.
result
)
{
$scope
.
reportId
=
report
.
data
.
id
;
...
...
@@ -2902,6 +2903,9 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
//初始化
$scope
.
relation
.
period
=
year
.
toString
()
+
monthRevert
(
mon
);
loadCellData
(
$scope
.
relation
.
period
,
$scope
.
relation
.
orgId
,
function
(){
});
};
var
monthRevert
=
function
(
mon
){
...
...
@@ -2949,14 +2953,19 @@
.
progress
(
function
(
evt
)
{
})
.
success
(
function
(
data
,
status
,
headers
,
config
)
{
frontImport
(
file
);
$
(
'#busy-indicator-container'
).
hide
();
SweetAlert
.
success
(
"上传成功"
);
$scope
.
relation
.
fileName
=
config
.
file
.
name
;
//重新获取数据
getReportData
(
function
(){
$scope
.
relation
.
broadcast
=
true
;
},
$scope
.
relation
.
period
);
debugger
;
if
(
data
.
result
){
frontImport
(
file
);
//前端导入
$
(
'#busy-indicator-container'
).
hide
();
SweetAlert
.
success
(
"上传成功"
);
$scope
.
relation
.
fileName
=
config
.
file
.
name
;
//重新获取数据
getReportData
(
function
(){
$scope
.
relation
.
broadcast
=
true
;
},
$scope
.
relation
.
period
);
}
else
{
SweetAlert
.
error
(
data
.
resultMsg
);
}
})
.
error
(
function
(
data
,
status
,
headers
,
config
)
{
...
...
@@ -2984,7 +2993,7 @@
$scope
.
singleExport
=
function
(){
if
(
$scope
.
spread
!=
undefined
&&
$scope
.
spread
){
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
var
fileName
=
$scope
.
relation
.
fileName
;
var
fileName
=
"利润表.xlsx"
;
if
(
fileName
.
substr
(
-
5
,
5
)
!==
'.xlsx'
)
{
fileName
+=
'.xlsx'
;
}
...
...
@@ -3006,6 +3015,39 @@
period
:
$scope
.
relation
.
period
,
templateId
:
$scope
.
templateId
}
$timeout
(
function
()
{
$
(
'#busy-indicator-container'
).
show
();
var
mainSpread
=
new
GC
.
Spread
.
Sheets
.
Workbook
(
document
.
getElementById
(
"report"
),
{
sheetCount
:
1
});
mainSpread
.
isPaintSuspended
(
true
);
mainSpread
.
sheets
.
pop
();
for
(
var
index
=
0
;
index
<
$scope
.
spreads
.
length
;
index
++
)
{
var
currentSheet
=
$scope
.
spreads
[
index
].
getActiveSheet
();
currentSheet
.
options
.
isProtected
=
false
;
for
(
var
rowIndex
=
0
;
rowIndex
<
currentSheet
.
getRowCount
();
rowIndex
++
)
{
for
(
var
columnIndex
=
0
;
columnIndex
<
currentSheet
.
getColumnCount
();
columnIndex
++
)
{
var
cellStyle
=
currentSheet
.
getActualStyle
(
rowIndex
,
columnIndex
,
GC
.
Spread
.
Sheets
.
SheetArea
.
viewport
,
true
);
currentSheet
.
setStyle
(
rowIndex
,
columnIndex
,
cellStyle
,
GC
.
Spread
.
Sheets
.
SheetArea
.
viewport
);
}
}
mainSpread
.
sheets
.
push
(
currentSheet
);
}
var
excelIo
=
new
GC
.
Spread
.
Excel
.
IO
();
// here is excel IO API
excelIo
.
save
(
mainSpread
.
toJSON
(),
function
(
blob
)
{
if
(
'export'
==
$scope
.
evenType
)
{
saveAs
(
blob
,
vatSessionService
.
project
.
name
+
'-'
+
vatSessionService
.
month
+
'-纳税申报.xlsx'
);
$
(
'#busy-indicator-container'
).
hide
();
}
},
function
(
e
)
{
alert
(
e
);
});
$
(
'.export-container'
).
html
(
''
);
$
(
'#export'
).
html
(
''
);
$log
.
debug
(
mainSpread
);
},
500
);
vatReportService
.
manyExport
(
JSON
.
stringify
(
param
)).
success
(
function
(
res
){
}).
error
(
function
(
error
){
...
...
@@ -3013,11 +3055,37 @@
});
};
//机构下拉设置
$scope
.
selectOrgOptions
=
{
displayExpr
:
'name'
,
valueExpr
:
'id'
,
width
:
'95%'
,
bindingOptions
:
{
value
:
'relation.orgId'
,
dataSource
:
'companyList'
},
height
:
'30px'
,
placeholder
:
$translate
.
instant
(
'PleaseSelected'
),
showClearButton
:
true
,
searchEnabled
:
true
,
noDataText
:
$translate
.
instant
(
'RevenueNoOrgData'
),
showSelectionControls
:
false
};
var
initCompanyList
=
function
()
{
orgService
.
getOrgListByUserId
().
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
companyList
=
data
;
}
});
};
// ---------------------------------------end -------------------------------------------
(
function
initialize
()
{
vatReportCacheService
.
initReportCache
();
initDatePicker
();
loadIndustry
();
//loadIndustry();
initCompanyList
();
$scope
.
reportApi
=
{
onCellClick
:
$scope
.
isDocumentList
?
null
:
cellClick
,
onCellDoubleClick
:
$scope
.
isDocumentList
?
null
:
cellDoubleClick
...
...
atms-web/src/main/webapp/app/common/controls/import/import-red-letter-info-table/import-red-letter-info-table.ctrl.js
View file @
6e3260ed
...
...
@@ -221,6 +221,35 @@
});
};
/------------------------------------------kevin insert -----------------------------------------/
//机构下拉设置
$scope
.
selectOrgOptions
=
{
displayExpr
:
'name'
,
valueExpr
:
'id'
,
width
:
'95%'
,
bindingOptions
:
{
value
:
'checkedCompanyCodeList'
,
dataSource
:
'companyList'
},
height
:
'30px'
,
placeholder
:
$translate
.
instant
(
'PleaseSelected'
),
showClearButton
:
true
,
searchEnabled
:
true
,
noDataText
:
$translate
.
instant
(
'RevenueNoOrgData'
),
showSelectionControls
:
true
};
var
initCompanyList
=
function
()
{
orgService
.
getOrgListByUserId
().
success
(
function
(
data
)
{
if
(
data
)
{
$scope
.
companyList
=
data
;
}
});
};
//-----------------------------------------------------------------------------------------------
var
getGridHeight
=
function
()
{
if
(
$scope
.
isLoadComplete
)
{
return
{
height
:
(
$
(
'.balance-ouput-grid-wrapper'
).
height
())
+
"px"
};
...
...
atms-web/src/main/webapp/app/common/controls/import/import-red-letter-info-table/import-red-letter-info-table.html
View file @
6e3260ed
...
...
@@ -8,11 +8,11 @@
</div>
<!--导航栏-->
<div
id=
"tab_total"
>
<form
class=
"form-inline"
id=
"navigationForm"
name=
"navigationForm"
>
<div
class=
"form-group"
ng-style=
"setButtonWrapStyle()"
>
<div
class=
"import-wrapper"
>
<!--
<form class="form-inline" id="navigationForm" name="navigationForm">
<div class="form-group" >
<div class="import-wrapper
1
">
<span class="text-bold" translate="SelectedOrganization"></span>:
<div
class=
"
dropdown
"
style=
"margin-left:10px"
>
<div class="" style="margin-left:10px">
<button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" style="width: 380px;">
{{checkedCompanyTypeList ? ((checkedCompanyTypeList)|limitString:maxTitleLength):('PleaseSelect' | translate)}}
...
...
@@ -33,6 +33,7 @@
</div>
</li>
</ul>
<div dx-tag-box="selectOrgOptions"></div>
</div>
<span class="text-bold" translate="InvoiceQJ"></span>:
<div class="period-picker" style="margin-left:10px">
...
...
@@ -62,6 +63,46 @@
ng-click="doUploadRLIT(importEnum.CoverImport)"></button>
</div>
</div>
</form>-->
<form
class=
"form-horizontal"
>
<div
class=
"form-group"
style=
"margin-top: 10px; height: 10px;"
>
<label
class=
"col-sm-1 control-label marTop"
>
{{'SelectedOrganization' | translate}}:
</label>
<div
class=
"col-sm-3 marTop"
>
<div
dx-tag-box=
"selectOrgOptions"
></div>
</div>
<label
class=
"col-sm-1 control-label marTop"
style=
"margin-left: -80px;"
>
{{'InvoiceQJ' | translate}}:
</label>
<div
class=
"col-sm-1 marTop"
style=
" width: 11%;"
>
<input
type=
"text"
id=
"periodDatepicker"
class=
"datepicker form-control imp-subheader"
style=
"width:120px; display: inline-block"
readonly=
"readonly"
ng-model=
"UploadPeriodTime"
/>
<i
class=
"fa fa-calendar imp-subheader red-color"
style=
"width:20px;"
></i>
</div>
<div
class=
"col-sm-3"
>
<button
type=
"button"
ngf-select=
""
type=
"file"
ng-model=
"importExcelFile"
ngf-drag-over-class=
"'dragover'"
accept=
".xls,.xlsx"
ngf-multiple=
"false"
ngf-allow-dir=
"false"
class=
"btn btn-vat-third"
style=
"margin-right:10px;margin-left:30px;margin-top: 10px;"
>
{{'SelectFile' | translate}}
</button>
<span
ng-show=
"fileName"
class=
"marTop"
title=
"{{fileName}}"
>
{{'FileName' | translate}}{{fileName | limitString:10}}
</span>
</div>
<div
class=
"col-sm-1"
>
<button
type=
"button"
class=
"btn btn-vat-primary"
style=
"float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate=
"TemplateBtn"
ng-click=
"downloadTemplate()"
></button>
</div>
<div
class=
"col-sm-1"
>
<button
type=
"button"
class=
"btn btn-vat-primary"
style=
"float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate=
"CoverImportBtn"
ng-click=
"doUploadRLIT(importEnum.CoverImport)"
></button>
</div>
<div
class=
"col-sm-1"
>
<button
type=
"button"
class=
"btn btn-vat-primary"
style=
"float:right; margin-right: 10px;margin-left: 30px;margin-top: 8px;"
translate=
"AddImportBtn"
ng-click=
"doUploadRLIT(importEnum.AddImport)"
></button>
</div>
</div>
</form>
<div
class=
"dt-init-wrapper"
>
...
...
atms-web/src/main/webapp/app/common/controls/import/import-red-letter-info-table/import-red-letter-info-table.less
View file @
6e3260ed
...
...
@@ -5,7 +5,9 @@
padding-left: 20px;
/*min-height: 800px;*/
height: 96%;
.marTop {
margin-top: 10px;
}
.nav-wrapper {
/*padding-bottom: 5px;
border-bottom: 1px solid #DBD8D3;*/
...
...
atms-web/src/main/webapp/app/common/utils/pwc-util.js
View file @
6e3260ed
...
...
@@ -1129,4 +1129,7 @@
}
});
}
/------------------------------------------------kevin insert -----------------------------------/
})(
window
)
\ No newline at end of file
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