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
fdc87c68
Commit
fdc87c68
authored
Feb 25, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT数据导入模板下载功能补充
parent
e57197df
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
332 additions
and
41 deletions
+332
-41
TemplateController.java
.../java/pwc/taxtech/atms/controller/TemplateController.java
+28
-2
CitCommonUtil.java
...ain/java/pwc/taxtech/atms/service/impl/CitCommonUtil.java
+8
-0
CitImportExcelServiceImpl.java
.../taxtech/atms/service/impl/CitImportExcelServiceImpl.java
+30
-4
BalanceSheetPrcAdjust.xlsx
.../resources/Document/DataImport/BalanceSheetPrcAdjust.xlsx
+0
-0
DraftAccountMapping.xlsx
...in/resources/Document/DataImport/DraftAccountMapping.xlsx
+0
-0
EAMAssetsDisposal.xlsx
...main/resources/Document/DataImport/EAMAssetsDisposal.xlsx
+0
-0
JournalAdjust.xlsx
...src/main/resources/Document/DataImport/JournalAdjust.xlsx
+0
-0
ProfitPrcAdjust.xlsx
...c/main/resources/Document/DataImport/ProfitPrcAdjust.xlsx
+0
-0
SalaryAdvance.xlsx
...src/main/resources/Document/DataImport/SalaryAdvance.xlsx
+0
-0
TrialBalance.xlsx
.../src/main/resources/Document/DataImport/TrialBalance.xlsx
+0
-0
CitSalaryAdvance.java
...c/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
+4
-4
CitSalaryAdvanceExample.java
...java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
+20
-10
CitSalaryAdvanceMapper.xml
...resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
+7
-7
import-cit-bs-prc-adjust.ctrl.js
...import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
+32
-2
import-cit-bs-prc-adjust.js
...port/import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.js
+1
-0
import-cit-draft-account-mapping.ctrl.js
...-account-mapping/import-cit-draft-account-mapping.ctrl.js
+32
-2
import-cit-draft-account-mapping.js
...draft-account-mapping/import-cit-draft-account-mapping.js
+1
-0
import-cit-eam-assets-disposal.ctrl.js
...am-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
+32
-2
import-cit-eam-assets-disposal.js
...cit-eam-assets-disposal/import-cit-eam-assets-disposal.js
+1
-0
import-cit-journal-adjust.ctrl.js
...port-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
+32
-2
import-cit-journal-adjust.js
...rt/import-cit-journal-adjust/import-cit-journal-adjust.js
+1
-0
import-cit-profit-prc-adjust.ctrl.js
...it-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
+32
-2
import-cit-profit-prc-adjust.js
...ort-cit-profit-prc-adjust/import-cit-profit-prc-adjust.js
+1
-0
import-cit-salary-advance.ctrl.js
...port-cit-salary-advance/import-cit-salary-advance.ctrl.js
+32
-2
import-cit-salary-advance.js
...rt/import-cit-salary-advance/import-cit-salary-advance.js
+1
-0
import-cit-trial-balance.ctrl.js
...import-cit-trial-balance/import-cit-trial-balance.ctrl.js
+32
-2
import-cit-trial-balance.js
...port/import-cit-trial-balance/import-cit-trial-balance.js
+1
-0
citImportData.svc.js
...c/main/webapp/app/common/webservices/citImportData.svc.js
+0
-0
template.svc.js
...eb/src/main/webapp/app/common/webservices/template.svc.js
+4
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/TemplateController.java
View file @
fdc87c68
...
...
@@ -13,6 +13,7 @@ import org.joda.time.DateTime;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Required
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
...
@@ -23,6 +24,7 @@ import org.springframework.web.bind.annotation.ResponseBody;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.context.ServletContextAware
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.enums.EnumCitImportType
;
import
pwc.taxtech.atms.constant.enums.EnumImportType
;
import
pwc.taxtech.atms.dpo.TemplateUniqDto
;
import
pwc.taxtech.atms.dto.*
;
...
...
@@ -238,10 +240,15 @@ public class TemplateController extends BaseController implements ServletContext
}
@RequestMapping
(
value
=
"file/downloadTemplate"
,
method
=
RequestMethod
.
GET
)
public
void
fileDownload
(
@RequestParam
Integer
fileType
,
HttpServletResponse
response
){
public
void
fileDownload
(
@RequestParam
Integer
fileType
,
@RequestParam
(
required
=
false
)
Integer
serviceType
,
HttpServletResponse
response
){
//获取网站部署路径(通过ServletContext对象),用于确定下载文件位置,从而实现下载
String
path
=
servletContext
.
getRealPath
(
"/"
)+
"\\WEB-INF\\classes"
;
String
fileName
=
getFileName
(
fileType
);
String
fileName
=
""
;
if
(
serviceType
==
null
){
fileName
=
getFileName
(
fileType
);
}
else
{
fileName
=
getCitFileName
(
fileType
);
}
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
fileName
+
".xlsx"
);
ServletOutputStream
out
;
...
...
@@ -288,6 +295,25 @@ public class TemplateController extends BaseController implements ServletContext
return
null
;
}
private
String
getCitFileName
(
Integer
fileType
)
{
if
(
EnumCitImportType
.
JournalAdjust
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
JournalAdjust
.
name
();
}
else
if
(
EnumCitImportType
.
TrialBalance
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
TrialBalance
.
name
();
}
else
if
(
EnumCitImportType
.
DraftAccountMapping
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
DraftAccountMapping
.
name
();
}
else
if
(
EnumCitImportType
.
BalanceSheetPrcAdjust
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
BalanceSheetPrcAdjust
.
name
();
}
else
if
(
EnumCitImportType
.
ProfitPrcAdjust
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
ProfitPrcAdjust
.
name
();
}
else
if
(
EnumCitImportType
.
EAMAssetsDisposal
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
EAMAssetsDisposal
.
name
();
}
else
if
(
EnumCitImportType
.
SalaryAdvance
.
getCode
().
equals
(
fileType
)){
return
EnumCitImportType
.
SalaryAdvance
.
name
();
}
return
null
;
}
@Override
public
void
setServletContext
(
ServletContext
servletContext
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitCommonUtil.java
View file @
fdc87c68
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.apache.poi.hssf.usermodel.HSSFDateUtil
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.CellType
;
import
java.text.SimpleDateFormat
;
import
java.util.Calendar
;
import
java.util.Date
;
/**
* @author ZhiKai Z Wei
...
...
@@ -45,6 +48,11 @@ public class CitCommonUtil {
obj
=
cell
.
getErrorCellValue
();
break
;
case
NUMERIC:
if
(
HSSFDateUtil
.
isCellDateFormatted
(
cell
)){
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd"
);
obj
=
sdf
.
format
(
cell
.
getDateCellValue
());
break
;
}
obj
=
cell
.
getNumericCellValue
();
break
;
case
STRING:
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitImportExcelServiceImpl.java
View file @
fdc87c68
...
...
@@ -612,7 +612,6 @@ public class CitImportExcelServiceImpl extends BaseService {
//获取该行数据
Row
rowData
=
sheet
.
getRow
(
rowNum
);
CitDataImportLog
citDataImportLogError
=
generalCitDataImportLog
(
""
,
""
,
""
,
EnumCitImportType
.
EAMAssetsDisposal
.
getCode
(),
0
,
0
,
0
,
...
...
@@ -623,7 +622,7 @@ public class CitImportExcelServiceImpl extends BaseService {
citEAMAssetsDisposal
.
setId
(
idService
.
nextId
());
citEAMAssetsDisposal
.
setPeriod
(
Integer
.
valueOf
(
CitCommonUtil
.
getPeriod
().
toString
()));
String
[]
split
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
1
)).
toString
().
replace
(
"月"
,
""
).
split
(
"年
"
);
String
[]
split
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
1
)).
toString
().
split
(
"-
"
);
StringBuilder
sb
=
new
StringBuilder
(
split
[
0
]);
if
(
new
Integer
(
split
[
1
])
+
1
<
10
){
sb
.
append
(
0
);
...
...
@@ -709,9 +708,36 @@ public class CitImportExcelServiceImpl extends BaseService {
citSalaryAdvance
.
setId
(
idService
.
nextId
());
citSalaryAdvance
.
setPeriod
(
Integer
.
valueOf
(
CitCommonUtil
.
getPeriod
().
toString
()));
citSalaryAdvance
.
setPoNo
(
Integer
.
valueOf
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
0
)).
toString
()));
Object
cellValue
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
0
));
if
(
cellValue
==
null
){
citDataImportLogError
.
setErrorMsg
(
"第"
+(
rowNum
+
1
)+
"行PO号为空"
);
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
citSalaryAdvance
.
setPoNo
(
cellValue
.
toString
());
cellValue
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
5
));
if
(
cellValue
==
null
){
citDataImportLogError
.
setErrorMsg
(
"第"
+(
rowNum
+
1
)+
"行PO主体CODE为空"
);
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
citSalaryAdvance
.
setPoSubjectCode
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
5
)).
toString
());
cellValue
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
6
));
if
(
cellValue
==
null
){
citDataImportLogError
.
setErrorMsg
(
"第"
+(
rowNum
+
1
)+
"行PO主体为空"
);
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
citSalaryAdvance
.
setPoSubjectName
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
6
)).
toString
());
cellValue
=
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
16
));
if
(
cellValue
==
null
){
citDataImportLogError
.
setErrorMsg
(
"第"
+(
rowNum
+
1
)+
"行预提为空"
);
citDataImportLogList
.
add
(
citDataImportLogError
);
continue
;
}
citSalaryAdvance
.
setAdvance
(
new
BigDecimal
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
16
)).
toString
()));
citSalaryAdvance
.
setApprovedStandardInvoiceAmount
(
new
BigDecimal
(
CitCommonUtil
.
getValue
(
rowData
.
getCell
(
18
)).
toString
()));
...
...
@@ -719,7 +745,7 @@ public class CitImportExcelServiceImpl extends BaseService {
}
int
insertBatchNum
=
citSalaryAdvanceMapper
.
insertBatch
(
citSalaryAdvanceList
);
CitDataImportLog
citDataImportLog
=
generalCitDataImportLog
(
""
,
""
,
""
,
EnumCitImportType
.
JournalAdjust
.
getCode
(),
period
/
100
,
EnumCitImportType
.
SalaryAdvance
.
getCode
(),
period
/
100
,
0
,
period
%
100
,
""
,
"预提重分类数据源"
,
true
);
citDataImportLog
.
setRecordSize
(
insertBatchNum
);
...
...
atms-api/src/main/resources/Document/DataImport/BalanceSheetPrcAdjust.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/DraftAccountMapping.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/EAMAssetsDisposal.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/JournalAdjust.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/ProfitPrcAdjust.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/SalaryAdvance.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-api/src/main/resources/Document/DataImport/TrialBalance.xlsx
0 → 100644
View file @
fdc87c68
File added
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
View file @
fdc87c68
...
...
@@ -76,7 +76,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private
Integer
poNo
;
private
String
poNo
;
/**
* Database Column Remarks:
...
...
@@ -302,7 +302,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
Integer
getPoNo
()
{
public
String
getPoNo
()
{
return
poNo
;
}
...
...
@@ -314,8 +314,8 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
void
setPoNo
(
Integer
poNo
)
{
this
.
poNo
=
poNo
;
public
void
setPoNo
(
String
poNo
)
{
this
.
poNo
=
poNo
==
null
?
null
:
poNo
.
trim
()
;
}
/**
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
View file @
fdc87c68
...
...
@@ -536,52 +536,62 @@ public class CitSalaryAdvanceExample {
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoEqualTo
(
Integer
value
)
{
public
Criteria
andPoNoEqualTo
(
String
value
)
{
addCriterion
(
"po_no ="
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoNotEqualTo
(
Integer
value
)
{
public
Criteria
andPoNoNotEqualTo
(
String
value
)
{
addCriterion
(
"po_no <>"
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoGreaterThan
(
Integer
value
)
{
public
Criteria
andPoNoGreaterThan
(
String
value
)
{
addCriterion
(
"po_no >"
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoGreaterThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andPoNoGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"po_no >="
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoLessThan
(
Integer
value
)
{
public
Criteria
andPoNoLessThan
(
String
value
)
{
addCriterion
(
"po_no <"
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoLessThanOrEqualTo
(
Integer
value
)
{
public
Criteria
andPoNoLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"po_no <="
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoIn
(
List
<
Integer
>
values
)
{
public
Criteria
andPoNoLike
(
String
value
)
{
addCriterion
(
"po_no like"
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoNotLike
(
String
value
)
{
addCriterion
(
"po_no not like"
,
value
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoIn
(
List
<
String
>
values
)
{
addCriterion
(
"po_no in"
,
values
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoNotIn
(
List
<
Integer
>
values
)
{
public
Criteria
andPoNoNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"po_no not in"
,
values
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andPoNoBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"po_no between"
,
value1
,
value2
,
"poNo"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoNoNotBetween
(
Integer
value1
,
Integer
value2
)
{
public
Criteria
andPoNoNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"po_no not between"
,
value1
,
value2
,
"poNo"
);
return
(
Criteria
)
this
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
View file @
fdc87c68
...
...
@@ -11,7 +11,7 @@
<result
column=
"project_id"
jdbcType=
"VARCHAR"
property=
"projectId"
/>
<result
column=
"period"
jdbcType=
"INTEGER"
property=
"period"
/>
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"po_no"
jdbcType=
"
INTEGE
R"
property=
"poNo"
/>
<result
column=
"po_no"
jdbcType=
"
VARCHA
R"
property=
"poNo"
/>
<result
column=
"po_subject_code"
jdbcType=
"VARCHAR"
property=
"poSubjectCode"
/>
<result
column=
"po_subject_name"
jdbcType=
"VARCHAR"
property=
"poSubjectName"
/>
<result
column=
"advance"
jdbcType=
"DECIMAL"
property=
"advance"
/>
...
...
@@ -153,7 +153,7 @@
updated_by, create_time, update_time
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{poNo,jdbcType=
INTEGE
R},
#{period,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{poNo,jdbcType=
VARCHA
R},
#{poSubjectCode,jdbcType=VARCHAR}, #{poSubjectName,jdbcType=VARCHAR}, #{advance,jdbcType=DECIMAL},
#{approvedStandardInvoiceAmount,jdbcType=DECIMAL}, #{createdBy,jdbcType=VARCHAR},
#{updatedBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
...
...
@@ -226,7 +226,7 @@
#{source,jdbcType=VARCHAR},
</if>
<if
test=
"poNo != null"
>
#{poNo,jdbcType=
INTEGE
R},
#{poNo,jdbcType=
VARCHA
R},
</if>
<if
test=
"poSubjectCode != null"
>
#{poSubjectCode,jdbcType=VARCHAR},
...
...
@@ -287,7 +287,7 @@
source = #{record.source,jdbcType=VARCHAR},
</if>
<if
test=
"record.poNo != null"
>
po_no = #{record.poNo,jdbcType=
INTEGE
R},
po_no = #{record.poNo,jdbcType=
VARCHA
R},
</if>
<if
test=
"record.poSubjectCode != null"
>
po_subject_code = #{record.poSubjectCode,jdbcType=VARCHAR},
...
...
@@ -329,7 +329,7 @@
project_id = #{record.projectId,jdbcType=VARCHAR},
period = #{record.period,jdbcType=INTEGER},
source = #{record.source,jdbcType=VARCHAR},
po_no = #{record.poNo,jdbcType=
INTEGE
R},
po_no = #{record.poNo,jdbcType=
VARCHA
R},
po_subject_code = #{record.poSubjectCode,jdbcType=VARCHAR},
po_subject_name = #{record.poSubjectName,jdbcType=VARCHAR},
advance = #{record.advance,jdbcType=DECIMAL},
...
...
@@ -362,7 +362,7 @@
source = #{source,jdbcType=VARCHAR},
</if>
<if
test=
"poNo != null"
>
po_no = #{poNo,jdbcType=
INTEGE
R},
po_no = #{poNo,jdbcType=
VARCHA
R},
</if>
<if
test=
"poSubjectCode != null"
>
po_subject_code = #{poSubjectCode,jdbcType=VARCHAR},
...
...
@@ -401,7 +401,7 @@
project_id = #{projectId,jdbcType=VARCHAR},
period = #{period,jdbcType=INTEGER},
source = #{source,jdbcType=VARCHAR},
po_no = #{poNo,jdbcType=
INTEGE
R},
po_no = #{poNo,jdbcType=
VARCHA
R},
po_subject_code = #{poSubjectCode,jdbcType=VARCHAR},
po_subject_name = #{poSubjectName,jdbcType=VARCHAR},
advance = #{advance,jdbcType=DECIMAL},
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitBalanceSheetPrcAdjustCon'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
BalanceSheetPrcAdjust
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"BalanceSheetPrcAdjust.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitBalanceSheetPrcAdjustCon'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-draft-account-mapping/import-cit-draft-account-mapping.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitDaftAccountMappingCon'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
DraftAccountMapping
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"DraftAccountMapping.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-draft-account-mapping/import-cit-draft-account-mapping.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitDaftAccountMappingCon'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-eam-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitEamAssetsDisposalCon'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
EAMAssetsDisposal
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"EAMAssetsDisposal.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-eam-assets-disposal/import-cit-eam-assets-disposal.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitEamAssetsDisposalCon'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitJournalAdjustController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -384,6 +384,36 @@ debugger;
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
JournalAdjust
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"JournalAdjust.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitJournalAdjustController'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitProfitPrcAdjustCon'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
ProfitPrcAdjust
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"ProfitPrcAdjust.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-profit-prc-adjust/import-cit-profit-prc-adjust.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitProfitPrcAdjustCon'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-salary-advance/import-cit-salary-advance.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitSalaryAdvanceCon'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
SalaryAdvance
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"AdjustmentTable"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"SalaryAdvance.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-salary-advance/import-cit-salary-advance.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitSalaryAdvanceCon'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-trial-balance/import-cit-trial-balance.ctrl.js
View file @
fdc87c68
commonModule
.
controller
(
'importCitTrialBalanceController'
,
[
'$scope'
,
'$log'
,
'$translate'
,
'$timeout'
,
'$q'
,
'$interval'
,
'apiInterceptor'
,
'Upload'
,
'citImportDataService'
,
'SweetAlert'
,
'uiGridConstants'
,
'$uibModal'
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
$anchorScroll'
,
'$location
'
,
,
'vatSessionService'
,
'enums'
,
'vatOperationLogService'
,
'
templateService
'
,
function
(
$scope
,
$log
,
$translate
,
$timeout
,
$q
,
$interval
,
apiInterceptor
,
Upload
,
citImportDataService
,
SweetAlert
,
uiGridConstants
,
$uibModal
,
vatSessionService
,
enums
,
vatOperationLogService
,
$anchorScroll
,
$location
)
{
,
vatSessionService
,
enums
,
vatOperationLogService
,
templateService
)
{
'use strict'
;
// $anchorScroll.yOffset=55;
// $location.hash('top');
...
...
@@ -383,6 +383,36 @@
ele1
.
datepicker
(
"setDate"
,
$scope
.
selectedDate
);
};
$scope
.
downloadTemplate
=
function
()
{
debugger
;
templateService
.
citDownloadTemplate
(
constant
.
citImportFileType
.
TrialBalance
).
success
(
function
(
data
,
status
,
headers
)
{
var
octetStreamMime
=
'application/octet-stream'
;
var
contentType
=
headers
(
'content-type'
)
||
octetStreamMime
;
if
(
window
.
navigator
.
msSaveBlob
)
{
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
navigator
.
msSaveBlob
(
blob
,
"TrialBalance"
);
}
else
{
var
urlCreator
=
window
.
URL
||
window
.
webkitURL
||
window
.
mozURL
||
window
.
msURL
;
if
(
urlCreator
)
{
var
a
=
document
.
createElement
(
'a'
);
var
blob
=
new
Blob
([
data
],
{
type
:
contentType
});
var
url
=
urlCreator
.
createObjectURL
(
blob
);
a
.
href
=
url
;
a
.
target
=
'_blank'
;
a
.
download
=
"TrialBalance.xlsx"
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
}
}
}).
error
(
function
()
{
SweetAlert
.
error
(
$translate
.
instant
(
'PleaseContactAdministrator'
));
});
};
//开始
(
function
initialize
()
{
debugger
;
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-trial-balance/import-cit-trial-balance.js
View file @
fdc87c68
...
...
@@ -14,6 +14,7 @@
controller
:
'importCitTrialBalanceController'
,
link
:
function
(
scope
,
element
)
{
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.data-import-contents'
)[
0
].
style
.
display
=
"block"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
cssFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/common/webservices/citImportData.svc.js
View file @
fdc87c68
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/common/webservices/template.svc.js
View file @
fdc87c68
...
...
@@ -128,6 +128,9 @@ webservices.factory('templateService', ['$log', '$http', '$q', 'apiConfig', 'htt
getTemplateJson
:
getTemplateJson
,
downloadTemplate
:
function
(
fileType
)
{
return
$http
.
get
(
'/template/file/downloadTemplate?fileType='
+
fileType
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
},
citDownloadTemplate
:
function
(
fileType
)
{
return
$http
.
get
(
'/template/file/downloadTemplate?fileType='
+
fileType
+
'&serviceType='
+
1
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
}
};
}]);
\ 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