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
c897feee
Commit
c897feee
authored
Mar 16, 2019
by
kevin
Browse files
Options
Browse Files
Download
Plain Diff
#
parents
7c569771
337ffed7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
796 additions
and
125 deletions
+796
-125
POIUtil.java
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
+85
-4
TaxesCalculateReportEnum.java
...taxtech/atms/constant/enums/TaxesCalculateReportEnum.java
+49
-0
OperationLogTaxDocController.java
...taxtech/atms/controller/OperationLogTaxDocController.java
+13
-9
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+7
-0
OrgInfoDto.java
...in/java/pwc/taxtech/atms/dto/organization/OrgInfoDto.java
+10
-0
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+1
-1
OperationLogTaxDocServiceImpl.java
...tech/atms/service/impl/OperationLogTaxDocServiceImpl.java
+3
-1
OrganizationServiceImpl.java
...wc/taxtech/atms/service/impl/OrganizationServiceImpl.java
+1
-0
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+131
-2
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+14
-53
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+0
-0
MyUserMapper.java
...-dao/src/main/java/pwc/taxtech/atms/dao/MyUserMapper.java
+3
-3
OrganizationDto.java
...o/src/main/java/pwc/taxtech/atms/dpo/OrganizationDto.java
+10
-0
OperationLogTaxDocument.java
...java/pwc/taxtech/atms/entity/OperationLogTaxDocument.java
+11
-0
Organization.java
...o/src/main/java/pwc/taxtech/atms/entity/Organization.java
+36
-0
OrganizationExample.java
...ain/java/pwc/taxtech/atms/entity/OrganizationExample.java
+70
-0
OrganizationMapper.xml
...ain/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
+22
-7
module-part1.js
atms-web/src/main/webapp/Scripts/module-part1.js
+9
-1
organization-manage.html
...nfrastructure/organizationManage/organization-manage.html
+6
-0
user-list.ctrl.js
...ebapp/app/admin/infrastructure/userList/user-list.ctrl.js
+1
-1
edit-organization-modal.ctrl.js
...s/edit-organization-modal/edit-organization-modal.ctrl.js
+77
-4
edit-organization-modal.html
...rols/edit-organization-modal/edit-organization-modal.html
+17
-0
constant.js
atms-web/src/main/webapp/app/common/utils/constant.js
+70
-0
user.svc.js
atms-web/src/main/webapp/app/common/webservices/user.svc.js
+2
-2
app-data-import.js
...n/webapp/app/framework/app-data-import/app-data-import.js
+2
-0
app-multi-select.html
...bapp/app/framework/app-multi-select/app-multi-select.html
+15
-4
app-usr-operate-log.ctrl.js
...framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
+3
-3
app-usr-operate-log.svc.js
.../framework/app-usr-operate-log/app-usr-operate-log.svc.js
+2
-1
tax-document-list.ctrl.js
...ocumentManage/tax-document-list/tax-document-list.ctrl.js
+0
-0
tax-document-list.html
...axDocumentManage/tax-document-list/tax-document-list.html
+20
-11
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+106
-18
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/POIUtil.java
View file @
c897feee
...
...
@@ -2,14 +2,12 @@ package pwc.taxtech.atms.common;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.poi.hssf.usermodel.HSSFWorkbook
;
import
org.apache.poi.ss.usermodel.Cell
;
import
org.apache.poi.ss.usermodel.Row
;
import
org.apache.poi.ss.usermodel.Sheet
;
import
org.apache.poi.ss.usermodel.Workbook
;
import
org.apache.poi.ss.usermodel.*
;
import
org.apache.poi.xssf.usermodel.XSSFWorkbook
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
java.util.Iterator
;
import
java.util.Optional
;
public
class
POIUtil
{
...
...
@@ -119,6 +117,89 @@ public class POIUtil {
return
row
;
}
public
static
Row
createAndCloneRow
(
Workbook
wb
,
Sheet
sheet
,
Integer
destRowIndex
,
Row
fromRow
)
{
Row
toRow
=
null
;
if
(
sheet
.
getRow
(
destRowIndex
)
!=
null
)
{
int
lastRowNo
=
sheet
.
getLastRowNum
();
sheet
.
shiftRows
(
destRowIndex
,
lastRowNo
,
1
);
}
toRow
=
sheet
.
createRow
(
destRowIndex
);
for
(
Iterator
cellIt
=
fromRow
.
cellIterator
();
cellIt
.
hasNext
();)
{
Cell
tmpCell
=
(
Cell
)
cellIt
.
next
();
Cell
newCell
=
toRow
.
createCell
(
tmpCell
.
getColumnIndex
());
copyCell
(
wb
,
tmpCell
,
newCell
,
false
);
}
return
toRow
;
}
public
static
void
copyCell
(
Workbook
wb
,
Cell
srcCell
,
Cell
distCell
,
boolean
copyValueFlag
)
{
CellStyle
newstyle
=
wb
.
createCellStyle
();
copyCellStyle
(
wb
,
srcCell
.
getCellStyle
(),
newstyle
);
if
(
srcCell
.
getColumnIndex
()==
7
){
newstyle
.
setLocked
(
false
);
}
// distCell.setEncoding(srcCell.getEncoding());
//样式
distCell
.
setCellStyle
(
newstyle
);
//评论
if
(
srcCell
.
getCellComment
()
!=
null
)
{
distCell
.
setCellComment
(
srcCell
.
getCellComment
());
}
// 不同数据类型处理
int
srcCellType
=
srcCell
.
getCellType
();
distCell
.
setCellType
(
srcCellType
);
if
(
copyValueFlag
)
{
if
(
srcCellType
==
Cell
.
CELL_TYPE_NUMERIC
)
{
if
(
DateUtil
.
isCellDateFormatted
(
srcCell
))
{
distCell
.
setCellValue
(
srcCell
.
getDateCellValue
());
}
else
{
distCell
.
setCellValue
(
srcCell
.
getNumericCellValue
());
}
}
else
if
(
srcCellType
==
Cell
.
CELL_TYPE_STRING
)
{
distCell
.
setCellValue
(
srcCell
.
getRichStringCellValue
());
}
else
if
(
srcCellType
==
Cell
.
CELL_TYPE_BLANK
)
{
// nothing21
}
else
if
(
srcCellType
==
Cell
.
CELL_TYPE_BOOLEAN
)
{
distCell
.
setCellValue
(
srcCell
.
getBooleanCellValue
());
}
else
if
(
srcCellType
==
Cell
.
CELL_TYPE_ERROR
)
{
distCell
.
setCellErrorValue
(
srcCell
.
getErrorCellValue
());
}
else
if
(
srcCellType
==
Cell
.
CELL_TYPE_FORMULA
)
{
distCell
.
setCellFormula
(
srcCell
.
getCellFormula
());
}
else
{
// nothing29
}
}
}
public
static
void
copyCellStyle
(
Workbook
wb
,
CellStyle
fromStyle
,
CellStyle
toStyle
)
{
toStyle
.
setAlignment
(
HorizontalAlignment
.
forInt
(
fromStyle
.
getAlignment
()));
//边框和边框颜色
toStyle
.
setBorderBottom
(
BorderStyle
.
valueOf
(
fromStyle
.
getBorderBottom
()));
toStyle
.
setBorderLeft
(
BorderStyle
.
valueOf
(
fromStyle
.
getBorderLeft
()));
toStyle
.
setBorderRight
(
BorderStyle
.
valueOf
(
fromStyle
.
getBorderRight
()));
toStyle
.
setBorderTop
(
BorderStyle
.
valueOf
(
fromStyle
.
getBorderTop
()));
toStyle
.
setTopBorderColor
(
fromStyle
.
getTopBorderColor
());
toStyle
.
setBottomBorderColor
(
fromStyle
.
getBottomBorderColor
());
toStyle
.
setRightBorderColor
(
fromStyle
.
getRightBorderColor
());
toStyle
.
setLeftBorderColor
(
fromStyle
.
getLeftBorderColor
());
//背景和前景
toStyle
.
setFillBackgroundColor
(
fromStyle
.
getFillBackgroundColor
());
toStyle
.
setFillForegroundColor
(
fromStyle
.
getFillForegroundColor
());
//
toStyle
.
setDataFormat
(
fromStyle
.
getDataFormat
());
toStyle
.
setFillPattern
(
FillPatternType
.
forInt
(
fromStyle
.
getFillPattern
()));
toStyle
.
setFont
(
wb
.
getFontAt
(
fromStyle
.
getFontIndex
()));
toStyle
.
setHidden
(
fromStyle
.
getHidden
());
toStyle
.
setIndention
(
fromStyle
.
getIndention
());
//首行缩进
toStyle
.
setLocked
(
fromStyle
.
getLocked
());
toStyle
.
setRotation
(
fromStyle
.
getRotation
());
//旋转
toStyle
.
setVerticalAlignment
(
VerticalAlignment
.
forInt
(
fromStyle
.
getVerticalAlignment
()));
toStyle
.
setWrapText
(
fromStyle
.
getWrapText
());
}
}
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/TaxesCalculateReportEnum.java
0 → 100644
View file @
c897feee
package
pwc
.
taxtech
.
atms
.
constant
.
enums
;
import
java.util.HashMap
;
import
java.util.Map
;
public
class
TaxesCalculateReportEnum
{
public
enum
Column
{
Column_1
(
0
,
"序号"
),
Column_2
(
1
,
"收入类型名称"
),
Column_3
(
2
,
"税金项目"
),
Column_4
(
3
,
"账载收入-明细"
),
Column_5
(
4
,
"销项开票收入数-专票"
),
Column_6
(
5
,
"销项开票收入数-普票"
),
Column_7
(
6
,
"计税基数(应税收入)"
),
Column_8
(
7
,
"税率"
),
Column_9
(
8
,
"税额(元)"
),
Column_10
(
9
,
"收入类别"
),
Column_11
(
10
,
"计税方式"
),
Column_12
(
11
,
"备注"
)
;
private
Integer
index
;
private
String
name
;
public
static
final
Map
<
Integer
,
String
>
MAPPING
=
new
HashMap
<>();
Column
(
Integer
index
,
String
name
)
{
this
.
index
=
index
;
this
.
name
=
name
;
}
public
Integer
getIndex
()
{
return
index
;
}
public
String
getName
()
{
return
name
;
}
static
{
for
(
TaxesCalculateReportEnum
.
Column
accountType
:
TaxesCalculateReportEnum
.
Column
.
values
())
{
MAPPING
.
put
(
accountType
.
getIndex
(),
accountType
.
getName
());
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogTaxDocController.java
View file @
c897feee
package
pwc
.
taxtech
.
atms
.
controller
;
import
com.google.common.collect.Lists
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
pwc.taxtech.atms.dto.ReturnData
;
...
...
@@ -24,7 +26,7 @@ public class OperationLogTaxDocController {
@RequestMapping
(
"selectList"
)
@ResponseBody
public
ReturnData
selectTaxDocumentList
(){
public
ReturnData
selectTaxDocumentList
()
{
List
<
OperationLogTaxDocument
>
operationLogTaxDocuments
=
operationLogTaxDocService
.
selectTaxDocumentList
();
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
operationLogTaxDocuments
);
...
...
@@ -34,13 +36,15 @@ public class OperationLogTaxDocController {
/**
* 根据 id 数组来查询相关日志
* @param taxDocumentIds
*
* @param operationLogTaxDocument
* @return
*/
@RequestMapping
(
"/selectListForLog"
)
@ResponseBody
public
ReturnData
selectListForLog
(
List
<
String
>
taxDocumentIds
){
List
<
OperationLogTaxDocument
>
operationLogTaxDocuments
=
operationLogTaxDocService
.
selectListForLog
(
taxDocumentIds
);
public
ReturnData
selectListForLog
(
@RequestBody
OperationLogTaxDocument
operationLogTaxDocument
)
{
List
<
String
>
ids
=
operationLogTaxDocument
.
getIds
()
==
null
?
Lists
.
newArrayList
()
:
operationLogTaxDocument
.
getIds
();
List
<
OperationLogTaxDocument
>
operationLogTaxDocuments
=
operationLogTaxDocService
.
selectListForLog
(
ids
);
ReturnData
returnData
=
new
ReturnData
();
returnData
.
setItems
(
operationLogTaxDocuments
);
returnData
.
setTotalCount
(
operationLogTaxDocuments
.
size
());
...
...
@@ -49,25 +53,25 @@ public class OperationLogTaxDocController {
@RequestMapping
(
"add"
)
@ResponseBody
public
boolean
addTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
){
public
boolean
addTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
)
{
return
operationLogTaxDocService
.
addTaxDocumentList
(
operationLogTaxDocument
);
}
@RequestMapping
(
"delete"
)
@ResponseBody
public
boolean
deleteTaxDocuments
(
String
id
){
public
boolean
deleteTaxDocuments
(
String
id
)
{
return
operationLogTaxDocService
.
deleteTaxDocument
(
id
);
}
@RequestMapping
(
"edit"
)
@ResponseBody
public
boolean
editTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
){
public
boolean
editTaxDocuments
(
OperationLogTaxDocument
operationLogTaxDocument
)
{
return
operationLogTaxDocService
.
editFilesType
(
operationLogTaxDocument
);
}
@RequestMapping
(
"exportExcel"
)
@ResponseBody
public
void
exportExcelFile
(
HttpServletResponse
response
)
{
public
void
exportExcelFile
(
HttpServletResponse
response
)
{
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
"id"
,
"id"
);
...
...
@@ -86,7 +90,7 @@ public class OperationLogTaxDocController {
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
""
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
OutputStream
ouputStream
=
response
.
getOutputStream
();
ExcelUtil
.
exportExcel
(
headers
,
TaxDocuments
,
ouputStream
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
c897feee
...
...
@@ -246,6 +246,13 @@ public class TaxDocumentController {
}
}
/**
* 下载全部附件
*/
@PostMapping
(
value
=
"/downloadAllFile"
)
public
void
downloadAllFile
(
HttpServletResponse
response
,
@RequestBody
TaxDocumentDto
taxDocumentDto
)
{
taxDocumentService
.
downloadAllFile
(
response
,
taxDocumentDto
.
getIds
());
}
/**
* 解析json
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/organization/OrgInfoDto.java
View file @
c897feee
...
...
@@ -175,6 +175,8 @@ public class OrgInfoDto {
private
Date
logoutTime
;
@ExcelCell
(
index
=
75
)
private
String
taxRuleIntroduction
;
@ExcelCell
(
index
=
76
)
private
String
country
;
public
String
getId
()
{
return
id
;
...
...
@@ -839,4 +841,12 @@ public class OrgInfoDto {
public
void
setTaxRuleIntroduction
(
String
taxRuleIntroduction
)
{
this
.
taxRuleIntroduction
=
taxRuleIntroduction
;
}
public
String
getCountry
()
{
return
country
;
}
public
void
setCountry
(
String
country
)
{
this
.
country
=
country
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
c897feee
...
...
@@ -1720,7 +1720,7 @@ public class DataImportService extends BaseService {
// todo 调用滴滴的http财务数据抽取调用接口 List<String> codes, Integer period, List<Integer> dataTypes
OrganizationExample
example
=
new
OrganizationExample
();
example
.
createCriteria
().
andIdIn
(
dataExtractParam
.
getOrgIds
());
List
<
String
>
codes
=
organizationMapper
.
selectByExample
(
example
).
stream
().
map
(
Organization:
:
getCode
).
collect
(
Collectors
.
toList
()
);
List
<
Organization
>
orgs
=
organizationMapper
.
selectByExample
(
example
);
// HttpUtil.post();
Integer
tmsPeriod
=
DateUtils
.
strToPeriod
(
dataExtractParam
.
getPeriod
());
// data_import_log 日志记录为 EnumImportType.ExtractFinancialData
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OperationLogTaxDocServiceImpl.java
View file @
c897feee
...
...
@@ -51,7 +51,9 @@ public class OperationLogTaxDocServiceImpl {
public
List
<
OperationLogTaxDocument
>
selectListForLog
(
List
<
String
>
taxDocumentIds
)
{
OperationLogTaxDocumentExample
example
=
new
OperationLogTaxDocumentExample
();
OperationLogTaxDocumentExample
.
Criteria
criteria
=
example
.
createCriteria
();
criteria
.
andIdIn
(
taxDocumentIds
);
if
(
taxDocumentIds
.
size
()>
0
){
criteria
.
andIdIn
(
taxDocumentIds
);
}
return
operationLogTaxDocumentMapper
.
selectByExample
(
example
);
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/OrganizationServiceImpl.java
View file @
c897feee
...
...
@@ -3214,6 +3214,7 @@ public class OrganizationServiceImpl extends BaseService{
header
.
put
(
"OtherFacts"
,
"其他情况说明"
);
header
.
put
(
"LogoutTime"
,
"注销时间"
);
header
.
put
(
"TaxRuleIntroduction"
,
"税制简介"
);
header
.
put
(
"Country"
,
"国家"
);
return
header
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
c897feee
...
...
@@ -22,8 +22,16 @@ import pwc.taxtech.atms.vat.entity.FileUpload;
import
pwc.taxtech.atms.vat.entity.ReportFileUpload
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletResponse
;
import
java.io.*
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.net.URLDecoder
;
import
java.net.URLEncoder
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.zip.ZipEntry
;
import
java.util.zip.ZipOutputStream
;
/**
* 查询
...
...
@@ -47,8 +55,6 @@ public class TaxDocumentServiceImpl {
@Autowired
DidiFileUploadService
didiFileUploadService
;
@Autowired
private
BusinessUnitServiceImpl
businessUnitService
;
@Autowired
private
OrganizationServiceImpl
organizationService
;
...
...
@@ -340,4 +346,127 @@ public class TaxDocumentServiceImpl {
return
false
;
}
}
public
void
downloadAllFile
(
HttpServletResponse
response
,
List
<
Long
>
ids
)
{
String
downloadName
=
"多选附件.zip"
;
try
{
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
URLEncoder
.
encode
(
downloadName
,
"UTF-8"
));
}
catch
(
UnsupportedEncodingException
e
)
{
throw
new
RuntimeException
(
"下载文件名编码时出现错误."
,
e
);
}
OutputStream
outputStream
=
null
;
ZipOutputStream
zos
=
null
;
try
{
outputStream
=
response
.
getOutputStream
();
zos
=
new
ZipOutputStream
(
outputStream
);
// 将文件流写入zip中
downloadTolocal
(
zos
,
ids
);
}
catch
(
IOException
e
)
{
log
.
error
(
"downloadAllFile-xxx下载全部附件失败,ids=[{}],错误信息=[{}]"
,
ids
,
e
);
}
finally
{
if
(
zos
!=
null
)
{
try
{
zos
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"关闭输入流时出现错误"
,
e2
);
}
}
if
(
outputStream
!=
null
)
{
try
{
outputStream
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"关闭输入流时出现错误"
,
e2
);
}
}
}
}
/**
* // 将文件流写入zip中
*
* @param zos
* @param ids
*/
private
void
downloadTolocal
(
ZipOutputStream
zos
,
List
<
Long
>
ids
)
{
TaxDocumentExample
example
=
new
TaxDocumentExample
();
TaxDocumentExample
.
Criteria
criteria
=
example
.
createCriteria
();
if
(
null
==
ids
||
ids
.
size
()
<
1
)
{
throw
new
RuntimeException
(
"传入参数错误:空参数数组"
);
}
criteria
.
andIdIn
(
ids
);
List
<
TaxDocument
>
taxDocuments
=
taxDocumentMapper
.
selectByExample
(
example
);
for
(
TaxDocument
item
:
taxDocuments
)
{
//文件url
String
urlPath
=
item
.
getFilePositionUrl
();
//如果url为null或空字符串而抛出异常
if
(
StringUtils
.
isBlank
(
urlPath
))
{
throw
new
RuntimeException
(
"文件url为空,id为:"
+
item
.
getId
());
}
//文件名称(带后缀)
String
fileName
=
StringUtils
.
isBlank
(
item
.
getFileOriginalName
())
?
"未知文件(请修改后缀名).xlsx"
:
item
.
getFileOriginalName
();
InputStream
is
=
null
;
BufferedInputStream
in
=
null
;
byte
[]
buffer
=
new
byte
[
1024
];
int
len
;
//创建zip实体(一个文件对应一个ZipEntry)
ZipEntry
entry
=
new
ZipEntry
(
fileName
);
try
{
//获取需要下载的文件流
URL
httpurl
=
new
URL
(
URLDecoder
.
decode
(
urlPath
,
"UTF-8"
));
HttpURLConnection
httpConn
=
(
HttpURLConnection
)
httpurl
.
openConnection
();
httpConn
.
setDoOutput
(
true
);
// 使用 URL 连接进行输出
httpConn
.
setDoInput
(
true
);
// 使用 URL 连接进行输入
httpConn
.
setUseCaches
(
false
);
// 忽略缓存
httpConn
.
setRequestMethod
(
"GET"
);
// 设置URL请求方法
//可设置请求头
httpConn
.
setRequestProperty
(
"Content-Type"
,
"application/octet-stream"
);
httpConn
.
setRequestProperty
(
"Connection"
,
"Keep-Alive"
);
// 维持长连接
httpConn
.
setRequestProperty
(
"Charset"
,
"UTF-8"
);
httpConn
.
connect
();
if
(
httpConn
.
getResponseCode
()
>=
400
)
{
is
=
httpConn
.
getErrorStream
();
}
else
{
is
=
httpConn
.
getInputStream
();
}
in
=
new
BufferedInputStream
(
is
);
zos
.
putNextEntry
(
entry
);
//文件流循环写入ZipOutputStream
while
((
len
=
in
.
read
(
buffer
))
!=
-
1
)
{
zos
.
write
(
buffer
,
0
,
len
);
}
}
catch
(
Exception
e
)
{
log
.
info
(
"xxx--下载全部附件--压缩文件出错"
,
e
);
}
finally
{
if
(
entry
!=
null
)
{
try
{
zos
.
closeEntry
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"xxx下载全部附件--zip实体关闭失败"
,
e2
);
}
}
if
(
in
!=
null
)
{
try
{
in
.
close
();
}
catch
(
Exception
e2
)
{
log
.
info
(
"xxx下载全部附件--文件输入流关闭失败"
,
e2
);
}
}
if
(
is
!=
null
)
{
try
{
is
.
close
();
}
catch
(
Exception
e
)
{
log
.
info
(
"xxx下载全部附件--输入缓冲流关闭失败"
,
e
);
}
}
}
}
}
}
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
c897feee
...
...
@@ -19,7 +19,6 @@ import org.springframework.stereotype.Component;
import
pwc.taxtech.atms.common.POIUtil
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.enums.CellDataSourceType
;
import
pwc.taxtech.atms.constant.enums.FileUploadEnum
;
import
pwc.taxtech.atms.dao.ProjectMapper
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileIUploadParam
;
import
pwc.taxtech.atms.dto.didiFileUpload.DidiFileUploadDetailResult
;
...
...
@@ -34,7 +33,10 @@ import pwc.taxtech.atms.vat.dpo.PeriodCellTemplateConfigExtendDto;
import
pwc.taxtech.atms.vat.entity.*
;
import
pwc.taxtech.atms.vat.service.impl.report.functions.*
;
import
java.io.*
;
import
javax.annotation.Resource
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.regex.Matcher
;
...
...
@@ -47,31 +49,32 @@ import static pwc.taxtech.atms.dto.vatdto.WrapPeriodJobDto.*;
@Component
public
class
ReportGeneratorImpl
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
ReportGeneratorImpl
.
class
);
@
Autowired
@
Resource
private
ProjectMapper
projectMapper
;
@Autowired
private
HttpFileService
httpFileService
;
@Autowired
private
FormulaAgent
formulaAgent
;
@
Autowired
@
Resource
private
PeriodCellDataMapper
periodCellDataMapper
;
@
Autowired
@
Resource
private
PeriodFormulaBlockMapper
periodFormulaBlockMapper
;
@
Autowired
private
PeriodDataSourceMapper
periodDataSource
Mapper
;
@
Autowired
@
Resource
private
RevenueConfigMapper
revenueConfig
Mapper
;
@
Resource
private
PeriodCellTemplateConfigMapper
periodCellTemplateConfigMapper
;
@
Autowired
@
Resource
private
PeriodCellTemplateMapper
periodCellTemplateMapper
;
@
Autowired
@
Resource
private
PeriodTemplateMapper
periodTemplateMapper
;
@Autowired
private
DistributedIdService
distributedIdService
;
@
Autowired
@
Resource
private
PeriodJobMapper
periodJobMapper
;
@Autowired
private
DidiFileUploadService
didiFileUploadService
;
public
FormulaContext
initContext
(
PeriodResources
resources
,
Integer
period
)
{
return
FormulaContext
.
extractContextFromProject
(
resources
.
getProject
()).
fixedFormula
(
period
,
resources
.
getTemplateGroupId
(),
formulaAgent
);
...
...
@@ -503,26 +506,7 @@ public class ReportGeneratorImpl {
}
}
}
//TODO 当是税金计算表时动态添加行
if
(
"VAT8002"
.
equals
(
a
.
getCode
()))
{
tWorkbook
=
assembleTaxWorkBook
(
tWorkbook
);
//覆盖template地址
ByteArrayOutputStream
bout
=
new
ByteArrayOutputStream
();
try
{
tWorkbook
.
write
(
bout
);
FileUpload
fileUpload
=
didiFileUploadService
.
uploadFile
(
bout
.
toByteArray
(),
a
.
getCode
()
+
"_"
+
a
.
getName
()
+
".xlsx"
,
FileUploadEnum
.
BizSource
.
PERIOD_REPORT_TEMPLATE_UPLOAD
.
name
());
a
.
setPath
(
fileUpload
.
getUid
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
finally
{
try
{
bout
.
close
();
}
catch
(
Exception
e
)
{
}
}
periodTemplateMapper
.
updateByPrimaryKey
(
a
);
}
POIUtil
.
cloneSheet
(
tWorkbook
.
getSheetAt
(
0
),
workbook
.
createSheet
(
a
.
getCode
()));
});
...
...
@@ -536,29 +520,6 @@ public class ReportGeneratorImpl {
}
}
public
Workbook
assembleTaxWorkBook
(
Workbook
tWorkbook
)
{
Sheet
sheet
=
tWorkbook
.
getSheetAt
(
0
);
Row
row
=
POIUtil
.
createRow
(
sheet
,
3
);
Cell
cell
=
row
.
createCell
(
0
);
cell
.
setCellValue
(
"test"
);
return
tWorkbook
;
}
private
void
saveExcel
(
Workbook
wb
)
{
FileOutputStream
fileOut
;
try
{
fileOut
=
new
FileOutputStream
(
""
);
wb
.
write
(
fileOut
);
fileOut
.
close
();
}
catch
(
FileNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
}
}
/**
* 注册所有的自定义方法到工作簿
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
c897feee
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/dao/MyUserMapper.java
View file @
c897feee
...
...
@@ -47,12 +47,12 @@ public interface MyUserMapper extends MyMapper {
List
<
Map
<
String
,
String
>>
selectUserRoleListByUserId
(
@Param
(
value
=
"userId"
)
String
userId
);
@Select
(
"select q.id as id, q.organization_id as OrganizationID, q.user_id as UserID, q.is_accessible as IsAccessible, "
+
"q.has_original_role as HasOriginalRole from user_organization q join
U
ser u on q.user_id = u.id "
"q.has_original_role as HasOriginalRole from user_organization q join
u
ser u on q.user_id = u.id "
+
"where u.status = 1"
)
@Results
({
@Result
(
id
=
true
,
column
=
"id"
,
property
=
"id"
),
@Result
(
column
=
"OrganizationID"
,
property
=
"organizationI
D
"
),
@Result
(
column
=
"OrganizationID"
,
property
=
"organizationI
d
"
),
@Result
(
column
=
"HasOriginalRole"
,
property
=
"hasOriginalRole"
),
@Result
(
column
=
"UserID"
,
property
=
"userI
D
"
),
@Result
(
column
=
"UserID"
,
property
=
"userI
d
"
),
@Result
(
column
=
"IsAccessible"
,
property
=
"isAccessible"
)
})
List
<
UserOrganization
>
selectUserOrganizationByUserId
();
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dpo/OrganizationDto.java
View file @
c897feee
...
...
@@ -117,6 +117,8 @@ public class OrganizationDto {
private
Boolean
oversea
;
private
String
country
;
public
List
<
EnterpriseAccountSetOrgDto
>
enterpriseAccountSetOrgList
;
public
List
<
OrganizationServiceTemplateGroupDto
>
organizationServiceTemplateGroupList
;
public
List
<
DimensionValueOrgDto
>
dimensionValueOrgList
;
...
...
@@ -671,6 +673,14 @@ public class OrganizationDto {
this
.
oversea
=
oversea
;
}
public
String
getCountry
()
{
return
country
;
}
public
void
setCountry
(
String
country
)
{
this
.
country
=
country
;
}
public
List
<
EnterpriseAccountSetOrgDto
>
getEnterpriseAccountSetOrgList
()
{
return
enterpriseAccountSetOrgList
;
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/OperationLogTaxDocument.java
View file @
c897feee
...
...
@@ -2,6 +2,7 @@ package pwc.taxtech.atms.entity;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
*
...
...
@@ -110,6 +111,8 @@ public class OperationLogTaxDocument implements Serializable {
*/
private
Date
createTime
;
List
<
String
>
ids
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table operation_log_tax_document
...
...
@@ -118,6 +121,14 @@ public class OperationLogTaxDocument implements Serializable {
*/
private
static
final
long
serialVersionUID
=
1L
;
public
List
<
String
>
getIds
()
{
return
ids
;
}
public
void
setIds
(
List
<
String
>
ids
)
{
this
.
ids
=
ids
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column operation_log_tax_document.id
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/Organization.java
View file @
c897feee
...
...
@@ -546,6 +546,17 @@ public class Organization extends BaseEntity implements Serializable {
*/
private
String
psCode
;
/**
* Database Column Remarks:
* 国家
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column organization.country
*
* @mbg.generated
*/
private
String
country
;
private
Area
area
;
private
BusinessUnit
businessUnit
;
...
...
@@ -1878,6 +1889,30 @@ public class Organization extends BaseEntity implements Serializable {
this
.
psCode
=
psCode
==
null
?
null
:
psCode
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column organization.country
*
* @return the value of organization.country
*
* @mbg.generated
*/
public
String
getCountry
()
{
return
country
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column organization.country
*
* @param country the value for organization.country
*
* @mbg.generated
*/
public
void
setCountry
(
String
country
)
{
this
.
country
=
country
==
null
?
null
:
country
.
trim
();
}
public
Area
getArea
()
{
return
area
;
}
...
...
@@ -1961,6 +1996,7 @@ public class Organization extends BaseEntity implements Serializable {
sb
.
append
(
", currencyCode="
).
append
(
currencyCode
);
sb
.
append
(
", legalEntity="
).
append
(
legalEntity
);
sb
.
append
(
", psCode="
).
append
(
psCode
);
sb
.
append
(
", country="
).
append
(
country
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/OrganizationExample.java
View file @
c897feee
...
...
@@ -3894,6 +3894,76 @@ public class OrganizationExample {
addCriterion
(
"ps_code not between"
,
value1
,
value2
,
"psCode"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryIsNull
()
{
addCriterion
(
"country is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryIsNotNull
()
{
addCriterion
(
"country is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryEqualTo
(
String
value
)
{
addCriterion
(
"country ="
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryNotEqualTo
(
String
value
)
{
addCriterion
(
"country <>"
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryGreaterThan
(
String
value
)
{
addCriterion
(
"country >"
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"country >="
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryLessThan
(
String
value
)
{
addCriterion
(
"country <"
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"country <="
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryLike
(
String
value
)
{
addCriterion
(
"country like"
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryNotLike
(
String
value
)
{
addCriterion
(
"country not like"
,
value
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryIn
(
List
<
String
>
values
)
{
addCriterion
(
"country in"
,
values
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"country not in"
,
values
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"country between"
,
value1
,
value2
,
"country"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCountryNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"country not between"
,
value1
,
value2
,
"country"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/OrganizationMapper.xml
View file @
c897feee
...
...
@@ -61,6 +61,7 @@
<result
column=
"currency_code"
jdbcType=
"VARCHAR"
property=
"currencyCode"
/>
<result
column=
"legal_entity"
jdbcType=
"VARCHAR"
property=
"legalEntity"
/>
<result
column=
"ps_code"
jdbcType=
"VARCHAR"
property=
"psCode"
/>
<result
column=
"country"
jdbcType=
"VARCHAR"
property=
"country"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -143,7 +144,7 @@
api_update_flag, effec_time_of_general_taxpayers, registration_location_en, paid_in_capital,
general_tax_payer_effective_time, oversea, reg_status, national_economic_industry,
engage_national_prohibit_industry, logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
currency_code, legal_entity, ps_code
, country
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -215,8 +216,8 @@
general_tax_payer_effective_time, oversea, reg_status,
national_economic_industry, engage_national_prohibit_industry,
logout_time, enterprise_account_code, enterprise_account_name,
currency_code, legal_entity, ps_code
)
currency_code, legal_entity, ps_code
,
country
)
values (#{id,jdbcType=VARCHAR}, #{clientCode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{taxPayerNumber,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{structureId,jdbcType=VARCHAR}, #{industryId,jdbcType=VARCHAR},
...
...
@@ -236,8 +237,8 @@
#{generalTaxPayerEffectiveTime,jdbcType=TIMESTAMP}, #{oversea,jdbcType=BIT}, #{regStatus,jdbcType=VARCHAR},
#{nationalEconomicIndustry,jdbcType=VARCHAR}, #{engageNationalProhibitIndustry,jdbcType=BIT},
#{logoutTime,jdbcType=TIMESTAMP}, #{enterpriseAccountCode,jdbcType=VARCHAR}, #{enterpriseAccountName,jdbcType=VARCHAR},
#{currencyCode,jdbcType=VARCHAR}, #{legalEntity,jdbcType=VARCHAR}, #{psCode,jdbcType=VARCHAR}
)
#{currencyCode,jdbcType=VARCHAR}, #{legalEntity,jdbcType=VARCHAR}, #{psCode,jdbcType=VARCHAR}
,
#{country,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.Organization"
>
<!--
...
...
@@ -411,6 +412,9 @@
<if
test=
"psCode != null"
>
ps_code,
</if>
<if
test=
"country != null"
>
country,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -578,6 +582,9 @@
<if
test=
"psCode != null"
>
#{psCode,jdbcType=VARCHAR},
</if>
<if
test=
"country != null"
>
#{country,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultType=
"java.lang.Long"
>
...
...
@@ -762,6 +769,9 @@
<if
test=
"record.psCode != null"
>
ps_code = #{record.psCode,jdbcType=VARCHAR},
</if>
<if
test=
"record.country != null"
>
country = #{record.country,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -827,7 +837,8 @@
enterprise_account_name = #{record.enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{record.currencyCode,jdbcType=VARCHAR},
legal_entity = #{record.legalEntity,jdbcType=VARCHAR},
ps_code = #{record.psCode,jdbcType=VARCHAR}
ps_code = #{record.psCode,jdbcType=VARCHAR},
country = #{record.country,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -1001,6 +1012,9 @@
<if
test=
"psCode != null"
>
ps_code = #{psCode,jdbcType=VARCHAR},
</if>
<if
test=
"country != null"
>
country = #{country,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
...
...
@@ -1063,7 +1077,8 @@
enterprise_account_name = #{enterpriseAccountName,jdbcType=VARCHAR},
currency_code = #{currencyCode,jdbcType=VARCHAR},
legal_entity = #{legalEntity,jdbcType=VARCHAR},
ps_code = #{psCode,jdbcType=VARCHAR}
ps_code = #{psCode,jdbcType=VARCHAR},
country = #{country,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entity.OrganizationExample"
resultMap=
"BaseResultMap"
>
...
...
atms-web/src/main/webapp/Scripts/module-part1.js
View file @
c897feee
...
...
@@ -329,7 +329,15 @@ var frameworkModule = angular.module('app.framework', ['app.webservices', 'app.c
appTranslation
.
load
([
appTranslation
.
appPart
]);
}],
template
:
'<app-tax-analysis></app-tax-analysis>'
}
},
'importContent'
:
{
controller
:
[
'$scope'
,
'$state'
,
'appTranslation'
,
function
(
$scope
,
$state
,
appTranslation
)
{
$scope
.
state
=
$state
;
appTranslation
.
load
([
appTranslation
.
appPart
]);
}],
template
:
'<domestic-data-import></domestic-data-import>'
}
},
deepStateRedirect
:
true
,
sticky
:
true
...
...
atms-web/src/main/webapp/app/admin/infrastructure/organizationManage/organization-manage.html
View file @
c897feee
...
...
@@ -206,6 +206,12 @@
title=
"{{selectCompany.engageNationalProhibitIndustry}}"
>
{{selectCompany.engageNationalProhibitIndustryStr}}
</span></span>
</div>
</div>
<div
class=
"form-group"
ng-show=
"isInternational"
>
<div
class=
"col-sm-12"
>
<span
class=
"control-label"
>
{{'Country' | translate}}:
<span
title=
"{{selectCompany.country}}"
>
{{selectCompany.country}}
</span></span>
</div>
</div>
</div>
<!--
...
...
atms-web/src/main/webapp/app/admin/infrastructure/userList/user-list.ctrl.js
View file @
c897feee
...
...
@@ -58,7 +58,7 @@
cellTemplate
:
function
(
container
,
options
)
{
try
{
$
(
'<a class="hyper-link">'
+
options
.
value
+
'</a>'
)
.
attr
(
'href'
,
'#/userDetail/'
+
options
.
row
.
data
.
id
)
.
attr
(
'href'
,
'#/userDetail/'
+
options
.
row
.
data
.
ID
)
.
appendTo
(
container
);
}
catch
(
e
)
{
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.ctrl.js
View file @
c897feee
...
...
@@ -98,8 +98,76 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
// 保存机构
$scope
.
saveOrg
=
function
()
{
debugger
;
if
(
$scope
.
isInternational
){
saveInternationalOrg
();
}
else
{
saveLocalOrg
();
}
};
var
saveInternationalOrg
=
function
()
{
$scope
.
orgControlForm
.
$setSubmitted
();
var
editModel
=
$scope
.
editOrgModel
;
// 是否为境外企业
editModel
.
oversea
=
$scope
.
isInternational
;
if
(
$scope
.
isAdd
)
{
editModel
.
isActive
=
true
;
orgService
.
addOrg
(
editModel
).
success
(
function
(
orgId
)
{
if
(
orgId
&&
!
orgId
.
result
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
orgId
.
resultMsg
));
return
;
}
$
(
selectedModel
).
modal
(
'hide'
);
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
refreshOrg
();
$scope
.
operateType
=
null
;
$scope
.
isUpdate
=
true
;
});
}
else
{
if
(
editModel
.
parentID
&&
$scope
.
selectedOrganization
.
suborgList
)
{
if
(
editModel
.
parentID
===
editModel
.
id
)
{
SweetAlert
.
warning
(
'上级机构不能为机构本身'
);
return
;
}
this
.
orgControlForm
.
$setSubmitted
();
var
subOrg
=
_
.
find
(
$scope
.
selectedOrganization
.
suborgList
,
function
(
row
)
{
return
row
.
id
===
editModel
.
parentID
;
});
if
(
subOrg
)
{
SweetAlert
.
warning
(
'不能将当前机构的下级机构设置为其上级公司'
);
return
;
}
}
editModel
.
isActive
=
!
editModel
.
isActive
;
orgService
.
updateOrg
(
editModel
).
success
(
function
(
data
)
{
if
(
data
&&
!
data
.
result
)
{
//SweetAlert.info("Disable", orgId);
SweetAlert
.
warning
(
$translate
.
instant
(
data
.
resultMsg
));
return
;
}
$
(
selectedModel
).
modal
(
'hide'
);
SweetAlert
.
success
(
$translate
.
instant
(
'SaveSuccess'
));
refreshOrg
();
$scope
.
operateType
=
null
;
$scope
.
isUpdate
=
true
;
});
}
};
var
saveLocalOrg
=
function
()
{
$scope
.
orgControlForm
.
$setSubmitted
();
var
fail
=
false
;
...
...
@@ -122,7 +190,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
return
false
;
}
if
(
this
.
orgControlForm
.
$invalid
)
{
if
(
$scope
.
orgControlForm
.
$invalid
)
{
$scope
.
isShowBasic
=
true
;
return
;
}
else
{
...
...
@@ -136,8 +204,8 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
isShowAdvanced
=
false
;
}
//
this
.advancedControlForm.$setSubmitted();
//if (
this
.advancedControlForm.$invalid) {
//
$scope
.advancedControlForm.$setSubmitted();
//if (
$scope
.advancedControlForm.$invalid) {
// $scope.isShowAdvanced = true;
// return;
//} else {
...
...
@@ -423,6 +491,10 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
});
if
(
$scope
.
isInternational
){
$
(
'.localRequired'
).
removeAttr
(
"required"
);
}
// set first active page is basic info
$
(
'#orgControlTab a:first'
).
tab
(
'show'
);
// $('#orgModalFooter').css('padding-left','139px');
...
...
@@ -1000,6 +1072,7 @@ controller('editOrganizationModalController', ['$scope', '$log', '$translate', '
$scope
.
architectureTypeList
=
constant
.
ArchitectureTypeList
;
$scope
.
nationalEconomicIndustryList
=
constant
.
NationalEconomicIndustryList
;
$scope
.
trueFalse
=
constant
.
trueFalse
;
$scope
.
countryCNList
=
constant
.
countryCNList
;
$
(
'.localRequired'
).
attr
(
"required"
,
true
);
// $('.localRequired').attr("required","true"); required="required"
...
...
atms-web/src/main/webapp/app/common/controls/edit-organization-modal/edit-organization-modal.html
View file @
c897feee
...
...
@@ -325,6 +325,23 @@
</div>
</div>
</div>
<!--国家-->
<div
class=
"form-group"
ng-show=
"isInternational"
>
<label
for=
"country"
class=
"col-sm-3 control-label"
>
{{'Country'
| translate}}:
</label>
<div
class=
"col-sm-9"
ng-class=
"{'has-error':orgControlForm.country.$invalid && (orgControlForm.country.$dirty || orgControlForm.$submitted)}"
>
<select
class=
"form-control"
id=
'country'
name=
"country"
ng-model=
"editOrgModel.country"
ng-options=
"x for x in countryCNList"
>
<option
value=
""
>
{{resources.Country}}
</option>
</select>
<p
ng-show=
"orgControlForm.country.$error.required && (orgControlForm.country.$dirty || orgControlForm.$submitted)"
class=
"has-error label"
>
{{resources.OrganizationMsgcountryRequired}}
</p>
</div>
</div>
</div>
</div>
<div
style=
"clear: both;"
></div>
...
...
atms-web/src/main/webapp/app/common/utils/constant.js
View file @
c897feee
...
...
@@ -716,6 +716,14 @@ constant.adminPermission = {
basicData
:
{
mainData
:{
queryCode
:
'01.001.012'
},
financialData
:{
queryCode
:
'01.001.013'
},
// 企业账套
enterpriseAccountSet
:
{
// 查看
...
...
@@ -845,6 +853,65 @@ constant.adminPermission = {
}
};
constant
.
batchImportPermisson
=
{
ExtractDistribution
:{
code
:
'04.001'
,
financialDataExtraction
:{
code
:
'04.001.001'
},
invoiceDataExtraction
:{
code
:
'04.001.002'
}
},
ImportDistribution
:{
code
:
'04.002'
,
vATInvoiceRecord
:{
code
:
'04.002.001'
},
certifiedInvoicesList
:{
code
:
'04.002.002'
},
redLetterVATSpecialInvoiceInfo
:{
code
:
'04.002.003'
},
invoiceInformation
:{
code
:
'04.002.004'
},
coupaInvoiceReport
:{
code
:
'04.002.005'
},
adjustmentTable
:{
code
:
'04.002.006'
},
balanceSheetPRC
:{
code
:
'04.002.007'
},
incomeStatementPRC
:{
code
:
'04.002.008'
},
cashFlowStatement
:{
code
:
'04.002.009'
},
cITAdjustmentJournal
:{
code
:
'04.002.010'
},
cITTrialBalance
:{
code
:
'04.002.011'
},
cITDocumentSubjectMappingTable
:{
code
:
'04.002.012'
},
cITBalanceSheetPRC
:{
code
:
'04.002.013'
},
cITProfitStatementPRC
:{
code
:
'04.002.014'
},
cITEAMAssetDisposalAmountRecord
:{
code
:
'04.002.015'
},
cITPreClassifiedDataSource
:{
code
:
'04.002.016'
}
},
Configuration
:{
RevenueTypeConfiguration
:{
code
:
'04.003.001'
},
BillingRecordAndRevenueTypeMappingConfiguration
:{
code
:
'04.003.002'
},
InputRollOutConfiguration
:{
code
:
'04.003.003'
}
},
log
:{
code
:
'05'
,
dataImportRecord
:{
code
:
'04.004.001'
},
dataProcessingCheckRecord
:{
code
:
'04.004.002'
}
}
};
constant
.
analysisPermisson
=
{
code
:
'05'
,
Dashboard
:
{
code
:
'05.001'
},
DataImport
:
{
code
:
'05.002'
,
DomesticDataImport
:
{
code
:
'05.002.001'
},
InternationalDataImport
:
{
code
:
'05.002.002'
}
},
Form
:
{
code
:
'05.003'
,
TBEBITForm
:{
code
:
'05.003.001'
}
}
};
constant
.
citMenuList
=
[
constant
.
citPermission
.
dataImport
.
balanceSheet
.
queryCode
,
constant
.
citPermission
.
dataImport
.
journalEntry
.
queryCode
,
...
...
@@ -1548,6 +1615,9 @@ constant.anlDownLoadFileNameList = [
{
code
:
101
,
name
:
"国际税税务数据_"
}
];
constant
.
countryCNList
=
[
'安哥拉'
,
'阿富汗'
,
'阿尔巴尼亚'
,
'阿尔及利亚'
,
'安道尔共和国'
,
'安圭拉岛'
,
'安提瓜和巴布达'
,
'阿根廷'
,
'亚美尼亚'
,
'阿森松'
,
'澳大利亚'
,
'奥地利'
,
'阿塞拜疆'
,
'巴哈马'
,
'巴林'
,
'孟加拉国'
,
'巴巴多斯'
,
'白俄罗斯'
,
'比利时'
,
'伯利兹'
,
'贝宁'
,
'百慕大群岛'
,
'玻利维亚'
,
'博茨瓦纳'
,
'巴西'
,
'文莱'
,
'保加利亚'
,
'布基纳法索'
,
'缅甸'
,
'布隆迪'
,
'喀麦隆'
,
'加拿大'
,
'开曼群岛'
,
'中非共和国'
,
'乍得'
,
'智利'
,
'中国'
,
'哥伦比亚'
,
'刚果'
,
'库克群岛'
,
'哥斯达黎加'
,
'古巴'
,
'塞浦路斯'
,
'捷克'
,
'丹麦'
,
'吉布提'
,
'多米尼加共和国'
,
'厄瓜多尔'
,
'埃及'
,
'萨尔瓦多'
,
'爱沙尼亚'
,
'埃塞俄比亚'
,
'斐济'
,
'芬兰'
,
'法国'
,
'法属圭亚那'
,
'法属玻利尼西亚'
,
'加蓬'
,
'冈比亚'
,
'格鲁吉亚'
,
'德国'
,
'加纳'
,
'直布罗陀'
,
'希腊'
,
'格林纳达'
,
'关岛'
,
'危地马拉'
,
'几内亚'
,
'圭亚那'
,
'海地'
,
'洪都拉斯'
,
'香港'
,
'匈牙利'
,
'冰岛'
,
'印度'
,
'印度尼西亚'
,
'伊朗'
,
'伊拉克'
,
'爱尔兰'
,
'以色列'
,
'意大利'
,
'科特迪瓦'
,
'牙买加'
,
'日本'
,
'约旦'
,
'柬埔寨'
,
'哈萨克斯坦'
,
'肯尼亚'
,
'韩国'
,
'科威特'
,
'吉尔吉斯坦'
,
'老挝'
,
'拉脱维亚'
,
'黎巴嫩'
,
'莱索托'
,
'利比里亚'
,
'利比亚'
,
'列支敦士登'
,
'立陶宛'
,
'卢森堡'
,
'澳门'
,
'马达加斯加'
,
'马拉维'
,
'马来西亚'
,
'马尔代夫'
,
'马里'
,
'马耳他'
,
'马里亚那群岛'
,
'马提尼克'
,
'毛里求斯'
,
'墨西哥'
,
'摩尔多瓦'
,
'摩纳哥'
,
'蒙古'
,
'蒙特塞拉特岛'
,
'摩洛哥'
,
'莫桑比克'
,
'纳米比亚'
,
'瑙鲁'
,
'尼泊尔'
,
'荷属安的列斯'
,
'荷兰'
,
'新西兰'
,
'尼加拉瓜'
,
'尼日尔'
,
'尼日利亚'
,
'朝鲜'
,
'挪威'
,
'阿曼'
,
'巴基斯坦'
,
'巴拿马'
,
'巴布亚新几内亚'
,
'巴拉圭'
,
'秘鲁'
,
'菲律宾'
,
'波兰'
,
'葡萄牙'
,
'波多黎各'
,
'卡塔尔'
,
'留尼旺'
,
'罗马尼亚'
,
'俄罗斯'
,
'圣卢西亚'
,
'圣文森特岛'
,
'东萨摩亚(美)'
,
'西萨摩亚'
,
'圣马力诺'
,
'圣多美和普林西比'
,
'沙特阿拉伯'
,
'塞内加尔'
,
'塞舌尔'
,
'塞拉利昂'
,
'新加坡'
,
'斯洛伐克'
,
'斯洛文尼亚'
,
'所罗门群岛'
,
'索马里'
,
'南非'
,
'西班牙'
,
'斯里兰卡'
,
'圣卢西亚'
,
'圣文森特'
,
'苏丹'
,
'苏里南'
,
'斯威士兰'
,
'瑞典'
,
'瑞士'
,
'叙利亚'
,
'台湾省'
,
'塔吉克斯坦'
,
'坦桑尼亚'
,
'泰国'
,
'多哥'
,
'汤加'
,
'特立尼达和多巴哥'
,
'突尼斯'
,
'土耳其'
,
'土库曼斯坦'
,
'乌干达'
,
'乌克兰'
,
'阿拉伯联合酋长国'
,
'英国'
,
'美国'
,
'乌拉圭'
,
'乌兹别克斯坦'
,
'委内瑞拉'
,
'越南'
,
'也门'
,
'南斯拉夫'
,
'津巴布韦'
,
'扎伊尔'
,
'赞比亚'
];
constant
.
countryENList
=
[
'Angola'
,
'Afghanistan'
,
'Albania'
,
'Algeria'
,
'Andorra'
,
'Anguilla'
,
'Antigua and Barbuda'
,
'Argentina'
,
'Armenia'
,
'Ascension'
,
'Australia'
,
'Austria'
,
'Azerbaijan'
,
'Bahamas'
,
'Bahrain'
,
'Bangladesh'
,
'Barbados'
,
'Belarus'
,
'Belgium'
,
'Belize'
,
'Benin'
,
'Bermuda Is'
,
'Bolivia'
,
'Botswana'
,
'Brazil'
,
'Brunei'
,
'Bulgaria'
,
'Burkina Faso'
,
'Burma'
,
'Burundi'
,
'Cameroon'
,
'Canada'
,
'Cayman Is'
,
'Central African Republic'
,
'Chad'
,
'Chile'
,
'China'
,
'Colombia'
,
'Congo'
,
'Cook Is'
,
'Costa Rica'
,
'Cuba'
,
'Cyprus'
,
'Czech Republic'
,
'Denmark'
,
'Djibouti'
,
'Dominica Rep'
,
'Ecuador'
,
'Egypt'
,
'EI Salvador'
,
'Estonia'
,
'Ethiopia'
,
'Fiji'
,
'Finland'
,
'France'
,
'French Guiana'
,
'French Polynesia'
,
'Gabon'
,
'Gambia'
,
'Georgia'
,
'Germany'
,
'Ghana'
,
'Gibraltar'
,
'Greece'
,
'Grenada'
,
'Guam'
,
'Guatemala'
,
'Guinea'
,
'Guyana'
,
'Haiti'
,
'Honduras'
,
'Hongkong'
,
'Hungary'
,
'Iceland'
,
'India'
,
'Indonesia'
,
'Iran'
,
'Iraq'
,
'Ireland'
,
'Israel'
,
'Italy'
,
'Ivory Coast'
,
'Jamaica'
,
'Japan'
,
'Jordan'
,
'Kampuchea (Cambodia )'
,
'Kazakstan'
,
'Kenya'
,
'Korea'
,
'Kuwait'
,
'Kyrgyzstan'
,
'Laos'
,
'Latvia'
,
'Lebanon'
,
'Lesotho'
,
'Liberia'
,
'Libya'
,
'Liechtenstein'
,
'Lithuania'
,
'Luxembourg'
,
'Macao'
,
'Madagascar'
,
'Malawi'
,
'Malaysia'
,
'Maldives'
,
'Mali'
,
'Malta'
,
'Mariana Is'
,
'Martinique'
,
'Mauritius'
,
'Mexico'
,
'Moldova'
,
'Monaco'
,
'Mongolia'
,
'Montserrat Is'
,
'Morocco'
,
'Mozambique'
,
'Namibia'
,
'Nauru'
,
'Nepal'
,
'Netheriands Antilles'
,
'Netherlands'
,
'New Zealand'
,
'Nicaragua'
,
'Niger'
,
'Nigeria'
,
'North Korea'
,
'Norway'
,
'Oman'
,
'Pakistan'
,
'Panama'
,
'Papua New Cuinea'
,
'Paraguay'
,
'Peru'
,
'Philippines'
,
'Poland'
,
'Portugal'
,
'Puerto Rico'
,
'Qatar'
,
'Reunion'
,
'Romania'
,
'Russia'
,
'Saint Lueia'
,
'Saint Vincent'
,
'Samoa Eastern'
,
'Samoa Western'
,
'San Marino'
,
'Sao Tome and Principe'
,
'Saudi Arabia'
,
'Senegal'
,
'Seychelles'
,
'Sierra Leone'
,
'Singapore'
,
'Slovakia'
,
'Slovenia'
,
'Solomon Is'
,
'Somali'
,
'South Africa'
,
'Spain'
,
'SriLanka'
,
'St.Lucia'
,
'St.Vincent'
,
'Sudan'
,
'Suriname'
,
'Swaziland'
,
'Sweden'
,
'Switzerland'
,
'Syria'
,
'Taiwan'
,
'Tajikstan'
,
'Tanzania'
,
'Thailand'
,
'Togo'
,
'Tonga'
,
'Trinidad and Tobago'
,
'Tunisia'
,
'Turkey'
,
'Turkmenistan'
,
'Uganda'
,
'Ukraine'
,
'United Arab Emirates'
,
'United Kiongdom'
,
'United States of America'
,
'Uruguay'
,
'Uzbekistan'
,
'Venezuela'
,
'Vietnam'
,
'Yemen'
,
'Yugoslavia'
,
'Zimbabwe'
,
'Zaire'
,
'Zambia'
];
...
...
atms-web/src/main/webapp/app/common/webservices/user.svc.js
View file @
c897feee
...
...
@@ -92,7 +92,7 @@ webservices.factory('userService', ['$http', 'apiConfig', 'httpCacheService', 'l
return
$http
.
post
(
'/user/addUsersToRole'
,
userRoleList
,
apiConfig
.
create
())
},
getUserRoleListByUserID
:
function
(
userId
)
{
return
$http
.
get
(
'/user/getUserRoleListByUserI
D
?userId='
+
userId
,
apiConfig
.
create
());
return
$http
.
get
(
'/user/getUserRoleListByUserI
d
?userId='
+
userId
,
apiConfig
.
create
());
},
deleteUserRoleDimension
:
function
(
userRoleList
)
{
return
$http
.
post
(
'/user/deleteUserRoleDimension'
,
userRoleList
,
apiConfig
.
create
())
...
...
@@ -104,7 +104,7 @@ webservices.factory('userService', ['$http', 'apiConfig', 'httpCacheService', 'l
return
$http
.
post
(
'/user/deleteUserRoleForOrg'
,
userOrgdto
,
apiConfig
.
create
());
},
getUserRoleByOrgIDUserID
:
function
(
userID
,
orgID
)
{
return
$http
.
get
(
'/user/getUserRoleByOrgI
DUserID?userID='
+
userID
+
'&orgID
='
+
orgID
,
apiConfig
.
create
());
return
$http
.
get
(
'/user/getUserRoleByOrgI
dUserId?userId='
+
userID
+
'&orgId
='
+
orgID
,
apiConfig
.
create
());
},
getUserRoleByUserID
:
function
(
userID
)
{
return
$http
.
get
(
'/user/getUserRoleByUserID?userID='
+
userID
,
apiConfig
.
create
());
...
...
atms-web/src/main/webapp/app/framework/app-data-import/app-data-import.js
View file @
c897feee
...
...
@@ -11,6 +11,8 @@
},
controller
:
'appDataImportController'
,
link
:
function
(
scope
,
element
,
attr
)
{
debugger
;
$
(
'.nav-element-left a'
).
removeClass
(
'active'
);
$
(
'.main-contents'
)[
0
].
style
.
width
=
"260px"
;
$
(
'.main-contents'
)[
0
].
style
.
float
=
"left"
;
$
(
'.main-contents'
)[
0
].
style
.
styleFloat
=
"left"
;
...
...
atms-web/src/main/webapp/app/framework/app-multi-select/app-multi-select.html
View file @
c897feee
...
...
@@ -45,16 +45,19 @@
.select-simulator-option-menu
ul
li
{
padding
:
0
8px
;
list-style
:
none
;
color
:
#000
;
font-size
:
13px
;
line-height
:
1
;
}
.select-simulator-option-menu
ul
li
:hover
{
background-color
:
#e7e8e0
;
}
.select-simulator-option-menu
ul
li
:nth-child
(
odd
)
{
background-color
:
#
efefef
;
background-color
:
#
F2F2F2
;
;
}
.select-simulator-option-menu
ul
li
>
label
{
padding-bottom
:
5px
;
margin
:
0
;
padding
:
8px
0
;
}
.input-reset-button
{
...
...
@@ -93,6 +96,13 @@
position
:
relative
;
background
:
inherit
;
}
.select-simulator-option-name
{
float
:
left
;
}
.select-simulator-option-check-icon
{
float
:
right
;
color
:
#0db4ff
;
}
</style>
<div
class=
"select-simulator"
>
<input
class=
"for-fake-input"
...
...
@@ -120,10 +130,11 @@
<label
style=
"width: 100%;"
ng-click=
"checksOption()"
>
<input
type=
"{{optionType}}"
name=
"simulatorOptionMenu"
value=
"{{value}}"
value=
"{{value}}"
ng-hide=
"true"
ng-checked=
"selected.indexOf(optionValues[$index]) > -1"
data-key=
"{{optionKeys[$index]}}"
/>
<span>
{{value}}
</span>
<span
class=
"select-simulator-option-name"
>
{{value}}
</span>
<i
ng-if=
"selected.indexOf(optionValues[$index]) > -1"
class=
"fa fa-check select-simulator-option-check-icon"
></i>
</label>
</li>
</ul>
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.ctrl.js
View file @
c897feee
...
...
@@ -11,9 +11,9 @@ frameworkModule.controller('appUsrOperateLogController',
$scope
.
loadMainData
=
function
()
{
$scope
.
thisModuleId
=
$scope
.
thisModuleId
?
$scope
.
thisModuleId
:
[];
var
config
=
{
params
:
{
taxDocumentIds
:
JSON
.
stringify
(
$scope
.
thisModuleId
)
}
//
params: {
"ids"
:
$scope
.
thisModuleId
//
}
};
usrOperateLogService
[
$scope
.
thisModuleName
](
config
).
then
(
function
(
data
)
{
if
(
status
===
204
)
{
...
...
atms-web/src/main/webapp/app/framework/app-usr-operate-log/app-usr-operate-log.svc.js
View file @
c897feee
...
...
@@ -10,7 +10,7 @@ function ($q, apiConfig, jqFetch,apiInterceptor) {
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/operLogFileTypes/selectList'
,
params
);
},
docManageListLog
:
function
(
params
)
{
return
jqFetch
.
ge
t
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/selectListForLog'
,
params
);
return
jqFetch
.
pos
t
(
apiInterceptor
.
webApiHostUrl
+
'/operLogTaxDoc/selectListForLog'
,
params
);
}
};
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
c897feee
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
c897feee
<div
class=
"land-manage-page"
watch-group
temp-module
>
<div
class=
"land-manage-page"
watch-group
temp-module
down-load-module
>
<style>
ul
{
margin
:
0
;
...
...
@@ -344,7 +344,7 @@
<div
class=
"TDL-query-val"
>
<select
ng-model=
"queryFieldModel.fileAttr"
class=
"form-control radius3"
required
placeholder=
"{{'PleaseSelected' | translate}}"
>
placeholder=
"{{'PleaseSelected' | translate}}"
>
<option
ng-repeat=
"fileAttr in fileAttrOptions track by $index"
value=
"{{fileAttr}}"
>
{{fileAttr}}
</option>
...
...
@@ -360,8 +360,7 @@
<div
class=
"TDL-query-val"
>
<select
ng-model=
"queryFieldModel.fileType"
class=
"form-control radius3"
required
placeholder=
"{{'PleaseSelected' | translate}}"
>
<option
selected
></option>
placeholder=
"{{'PleaseSelected' | translate}}"
>
<option
ng-repeat=
"fileType in fileTypeOptions track by $index"
value=
"{{fileType}}"
>
{{fileType}}
</option>
...
...
@@ -424,8 +423,15 @@
<span
translate=
"BusinessLine"
></span>
</div>
<div
class=
"TDL-query-val"
>
<input
type=
"text"
class=
"form-control radius3"
ng-model=
"queryFieldModel.businessLine"
/>
<select
ng-model=
"queryFieldModel.businessLine"
class=
"form-control radius3"
placeholder=
"{{'PleaseSelected' | translate}}"
>
<option
ng-repeat=
"businessLine in businessLineOptions track by $index"
value=
"{{businessLine.name}}"
>
{{businessLine.name}}
</option>
</select>
<!--<input type="text" class="form-control radius3"-->
<!--ng-model="queryFieldModel.businessLine"/>-->
</div>
</div>
<div
class=
"TDL-query-block"
>
...
...
@@ -779,13 +785,16 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
placeholder=
"{{'PleaseType'
|
translate}}"
placeholder=
"{{'PleaseType'
|
translate}}"
ng-required=
"isRequired('EntityStorageLocation')"
ng-model=
"editFieldModel.storageArea"
/>
</div>
<div
class=
"DTL-special-external-btn"
title=
"{{'EntityStorageDescription' | translate}}"
>
<i
class=
"fa fake-exclamatory-circle"
></i>
<a
href=
"javascript:void(0)"
ng-click=
"openHelpPopForEntityStorage()"
>
<i
class=
"fa fake-exclamatory-circle"
aria-hidden=
"true"
></i>
</a>
</div>
</div>
<div
class=
"col-sm-6 form-group"
>
...
...
@@ -807,7 +816,7 @@
{{'EntityIndex' | translate}}
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
title=
"{{editFieldModel.storageArea}}"
<input
class=
"form-control"
placeholder=
"{{'PleaseType' | translate}}"
ng-required=
"isRequired('EntityIndex')"
ng-model=
"editFieldModel.physicalIndexNumber"
...
...
@@ -822,7 +831,7 @@
<textarea
class=
"form-control"
placeholder=
"{{'PleaseType' | translate}}"
ng-required=
"isRequired('Remarks')"
ng-model=
"editFieldModel.remark
s
"
>
ng-model=
"editFieldModel.remark"
>
</textarea>
</div>
</div>
...
...
@@ -1014,7 +1023,7 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
placeholder=
"{{'
PleaseType' |
translate}}"
placeholder=
"{{'
EntityStorageDescription'|
translate}}"
ng-model=
"editFieldItem.storageArea"
ng-required=
"isRequired('EntityStorageLocation')"
/>
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
c897feee
...
...
@@ -2,54 +2,143 @@
* Created by Administrator on 2019/3/1 0001.
*/
taxDocumentManageModule
.
factory
(
'taxDocumentListService'
,
[
'$q'
,
'apiConfig'
,
'jqFetch'
,
'apiInterceptor'
,
function
(
$q
,
apiConfig
,
jqFetch
,
apiInterceptor
)
{
[
'$q'
,
'apiConfig'
,
'jqFetch'
,
'apiInterceptor'
,
function
(
$q
,
apiConfig
,
jqFetch
,
apiInterceptor
)
{
'use strict'
;
return
{
fetchMainList
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/selectList'
,
params
);
},
addNewRecord
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/add'
,
params
);
var
defer
=
$q
.
defer
();
window
.
$
.
ajax
({
type
:
'POST'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/v1/taxDoc/add'
,
data
:
params
,
dataType
:
"json"
,
beforeSend
:
function
(
request
)
{
request
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
request
.
setRequestHeader
(
"Content-Type"
,
'application/x-www-form-urlencoded'
);
request
.
setRequestHeader
(
"Accept"
,
"*/*"
);
},
success
:
function
(
result
)
{
$
(
'#busy-indicator-container'
).
hide
();
defer
.
resolve
(
result
);
},
error
:
function
(
result
){
$
(
'#busy-indicator-container'
).
hide
();
defer
.
reject
(
result
);
}
});
return
defer
.
promise
;
},
editRecord
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/edit'
,
params
);
$
(
'#busy-indicator-container'
).
show
();
var
defer
=
$q
.
defer
();
window
.
$
.
ajax
({
type
:
'POST'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/v1/taxDoc/edit'
,
data
:
params
,
dataType
:
"json"
,
beforeSend
:
function
(
request
)
{
request
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
// request.setRequestHeader("Content-Type", 'multipart/form-data; boundary=----WebKitFormBoundaryNBBkL3vAiuTDbAZP');
request
.
setRequestHeader
(
"Content-Type"
,
'application/x-www-form-urlencoded'
);
request
.
setRequestHeader
(
"Accept"
,
"*/*"
);
},
success
:
function
(
result
)
{
$
(
'#busy-indicator-container'
).
hide
();
defer
.
resolve
(
result
);
},
error
:
function
(
result
){
$
(
'#busy-indicator-container'
).
hide
();
defer
.
reject
(
result
);
}
});
return
defer
.
promise
;
},
verifyDuplicate
:
function
(
params
)
{
verifyDuplicate
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/queryWhetherData'
,
params
);
},
getFileInfoOptions
:
function
(
params
)
{
getFileInfoOptions
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/query4SelectionBox'
,
params
);
},
getCompanyNameOptions
:
function
(
params
)
{
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/org/getMyOrgList
'
,
params
);
getCompanyNameOptions
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/org/query4SelectionBox
'
,
params
);
},
delFileRecordItems
:
function
(
params
)
{
delFileRecordItems
:
function
(
params
)
{
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/batchDelete'
,
params
);
},
getDocumentsAttrAndType
:
function
(
params
){
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/fileTypes/selectList'
,
params
);
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/v1/fileTypes/selectList'
,
params
);
},
getBusinessList
:
function
(
params
){
return
jqFetch
.
get
(
apiInterceptor
.
webApiHostUrl
+
'/v1/businessunit/getlist'
,
params
);
},
downloadAllFile
:
function
(
params
){
var
xhr
=
new
XMLHttpRequest
();
var
fileName
=
'files.zip'
;
// 文件名称
xhr
.
open
(
'POST'
,
apiInterceptor
.
webApiHostUrl
+
"/taxDoc/downloadAllFile"
,
true
);
xhr
.
responseType
=
'arraybuffer'
;
// xhr.setRequestHeader(token, 'xxxxx') ;// 请求头中的验证信息等(如果有)
xhr
.
setRequestHeader
(
"Authorization"
,
apiInterceptor
.
tokenType
+
' '
+
apiInterceptor
.
apiToken
());
xhr
.
setRequestHeader
(
"Content-Type"
,
'application/json;charset=UTF-8'
);
xhr
.
onload
=
function
()
{
if
(
this
.
status
===
200
)
{
// let type = xhr.getResponseHeader('Content-Type');
var
blob
=
new
Blob
([
this
.
response
],
{
type
:
"arraybuffer"
});
if
(
typeof
window
.
navigator
.
msSaveBlob
!==
'undefined'
)
{
/*
* IE workaround for "HTML7007: One or more blob URLs were revoked by closing
* the blob for which they were created. These URLs will no longer resolve as
* the data backing the URL has been freed."
*/
window
.
navigator
.
msSaveBlob
(
blob
,
fileName
)
}
else
{
var
URL
=
window
.
URL
||
window
.
webkitURL
;
var
objectUrl
=
URL
.
createObjectURL
(
blob
);
if
(
fileName
)
{
var
a
=
document
.
createElement
(
'a'
);
// safari doesn't support this yet
if
(
typeof
a
.
download
===
'undefined'
)
{
window
.
location
=
objectUrl
}
else
{
a
.
href
=
objectUrl
;
a
.
download
=
fileName
;
document
.
body
.
appendChild
(
a
);
a
.
click
();
a
.
remove
();
}
}
else
{
window
.
location
=
objectUrl
;
}
}
}
};
xhr
.
send
(
JSON
.
stringify
(
params
));
},
readXLSX
:
function
(
params
){
return
jqFetch
.
post
(
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/previewExcelToJson'
,
params
);
},
getBinaryData
:
function
(
url
)
{
getBinaryData
:
function
(
url
)
{
var
defer
=
$q
.
defer
();
var
oReq
=
new
XMLHttpRequest
();
oReq
.
onload
=
function
(
e
)
{
oReq
.
onload
=
function
(
e
)
{
var
arraybuffer
=
oReq
.
response
;
console
.
info
(
"arraybuffer:"
,
arraybuffer
);
console
.
info
(
"arraybuffer:"
,
arraybuffer
);
defer
.
resolve
(
arraybuffer
);
};
// oReq.open("GET", 'http://47.94.233.173:11007/static/erp_tax_system/3221D133-85B8-4E22-AE9B-DBEBD942D217?expire=1552361736&signiture=_Wz1_8Z6T8h5qnZAGpoRa8kNZeqmE7KoztKeehzYK4U=', true);
oReq
.
open
(
"GET"
,
url
,
true
);
oReq
.
responseType
=
"arraybuffer"
;
oReq
.
send
();
// return jqFetch.get(url,{},'arraybuffer');
return
defer
.
promise
;
}
};
}]);
\ 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