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
ab976984
Commit
ab976984
authored
Mar 20, 2019
by
gary
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql
parents
8d2aa647
407ac979
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
247 additions
and
146 deletions
+247
-146
CellCommentController.java
...va/pwc/taxtech/atms/controller/CellCommentController.java
+13
-4
TaxDocumentController.java
...va/pwc/taxtech/atms/controller/TaxDocumentController.java
+92
-71
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+3
-3
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+1
-2
ReportServiceImpl.java
.../pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
+29
-7
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+13
-1
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+1
-1
JFFS.java
.../taxtech/atms/vat/service/impl/report/functions/JFFS.java
+15
-3
FileTypesMapper.java
...o/src/main/java/pwc/taxtech/atms/dao/FileTypesMapper.java
+1
-1
CitTbam.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitTbam.java
+0
-8
OperationLogEntryLog.java
...in/java/pwc/taxtech/atms/entity/OperationLogEntryLog.java
+10
-1
FileTypesMapper.xml
...esources/pwc/taxtech/atms/dao/extends/FileTypesMapper.xml
+2
-0
basicData.json
...b/src/main/webapp/app-resources/i18n/zh-CN/basicData.json
+2
-1
cit-report-view.ctrl.js
...pp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
+1
-3
entryList-modal.ctrl.js
...pp/app/cit/report/entryList-modal/entryList-modal.ctrl.js
+16
-4
entryLog-modal.ctrl.js
...bapp/app/cit/report/entryLog-modal/entryLog-modal.ctrl.js
+0
-3
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+39
-19
tax-report-cell-detail-modal.html
...eport-cell-detail-modal/tax-report-cell-detail-modal.html
+1
-1
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+0
-6
vat-report-view.ctrl.js
...p/common/controls/vat-report-view/vat-report-view.ctrl.js
+0
-3
pwc-util.js
atms-web/src/main/webapp/app/common/utils/pwc-util.js
+1
-1
cellComment.svc.js
...src/main/webapp/app/common/webservices/cellComment.svc.js
+5
-1
tax-document-list.svc.js
...DocumentManage/tax-document-list/tax-document-list.svc.js
+2
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CellCommentController.java
View file @
ab976984
...
...
@@ -86,10 +86,6 @@ public class CellCommentController {
for
(
CitTbam
citTbam1
:
citTbams
){
citTbam
.
setId
(
citTbam1
.
getId
());
citTbamMapper
.
updateByPrimaryKey
(
citTbam
);
for
(
OperationLogEntryLog
operationLogEntryLog
:
citTbam1
.
getOperationLogEntryLogList
()){
operationLogEntryLog
.
setMyId
(
distributedIdService
.
nextId
());
operationLogEntryLogMapper
.
insert
(
operationLogEntryLog
);
}
}
operationResultDto
.
setResultMsg
(
"success"
);
return
operationResultDto
;
...
...
@@ -105,4 +101,17 @@ public class CellCommentController {
return
operationResultDto
;
}
/**
* 添加日志
*/
@RequestMapping
(
"addLog"
)
public
OperationResultDto
addLog
(
@RequestBody
OperationLogEntryLog
[]
operationLogEntryLogs
){
for
(
OperationLogEntryLog
operationLogEntryLog
:
operationLogEntryLogs
){
operationLogEntryLogMapper
.
insert
(
operationLogEntryLog
);
}
OperationResultDto
<
Object
>
objectOperationResultDto
=
new
OperationResultDto
<>();
objectOperationResultDto
.
setResultMsg
(
"success"
);
return
objectOperationResultDto
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/controller/TaxDocumentController.java
View file @
ab976984
...
...
@@ -28,6 +28,7 @@ import javax.servlet.http.HttpServletResponse;
import
java.io.*
;
import
java.net.HttpURLConnection
;
import
java.net.URL
;
import
java.net.URLDecoder
;
import
java.text.SimpleDateFormat
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -78,7 +79,7 @@ public class TaxDocumentController {
@PostMapping
(
"edit"
)
@ResponseBody
public
boolean
editTaxDocument
(
@RequestBody
TaxDocument
taxDocument
)
{
public
boolean
editTaxDocument
(
TaxDocument
taxDocument
)
{
return
taxDocumentService
.
editFilesType
(
taxDocument
);
}
...
...
@@ -161,84 +162,19 @@ public class TaxDocumentController {
/**
* 读取Excel转换成 Json
*
@param taxDocumentDto 文件的路径
*
*/
@PostMapping
(
"/previewExcelToJson"
)
@ResponseBody
public
String
previewExcel
(
@RequestBody
TaxDocumentDto
taxDocumentDto
)
{
try
{
JSONArray
dataArray
=
new
JSONArray
();
URL
httpurl
=
new
URL
(
taxDocumentDto
.
getPath
());
InputStream
is
;
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
();
}
//根据url地址 获取文件输入流
InputStream
is
=
getInputStreamByUrl
(
taxDocumentDto
.
getPath
());
InputStream
inStream
=
is
;
XSSFWorkbook
xssfWorkbook
=
new
XSSFWorkbook
(
inStream
);
// 循环工作表Sheet
for
(
int
numSheet
=
0
;
numSheet
<
xssfWorkbook
.
getNumberOfSheets
();
numSheet
++)
{
XSSFSheet
xssfSheet
=
xssfWorkbook
.
getSheetAt
(
numSheet
);
String
sheetName
=
xssfSheet
.
getSheetName
();
if
(
xssfSheet
==
null
)
{
continue
;
}
//当前sheet的json文件
JSONObject
sheetJson
=
new
JSONObject
();
//当前sheet的array,作为sheetJson 的value值
JSONArray
sheetArr
=
new
JSONArray
();
//sheet的第一行,获取作为json的key值
JSONArray
key
=
new
JSONArray
();
int
xssfLastRowNum
=
xssfSheet
.
getLastRowNum
();
// 循环行Row
for
(
int
rowNum
=
0
;
rowNum
<=
xssfLastRowNum
;
rowNum
++)
{
XSSFRow
xssfRow
=
xssfSheet
.
getRow
(
rowNum
);
if
(
xssfRow
==
null
)
{
continue
;
}
// 循环列Cell,在这里组合json文件
int
firstCellNum
=
xssfRow
.
getFirstCellNum
();
int
lastCellNum
=
xssfRow
.
getLastCellNum
();
JSONObject
rowJson
=
new
JSONObject
();
for
(
int
cellNum
=
firstCellNum
;
cellNum
<
lastCellNum
;
cellNum
++)
{
XSSFCell
cell
=
null
;
try
{
cell
=
xssfRow
.
getCell
(
cellNum
);
if
(
cell
==
null
)
{
rowJson
.
put
(
key
.
getString
(
cellNum
),
""
);
continue
;
}
if
(
rowNum
==
0
)
key
.
add
(
toString
(
cell
));
else
{
//若是列号超过了key的大小,则跳过
if
(
cellNum
>=
key
.
size
())
continue
;
rowJson
.
put
(
key
.
getString
(
cellNum
),
toString
(
cell
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
if
(
rowJson
.
keySet
().
size
()
>
0
)
sheetArr
.
add
(
rowJson
);
}
sheetJson
.
put
(
sheetName
,
shuffleData
(
sheetArr
));
dataArray
.
add
(
sheetJson
);
}
// 循环工作表Sheet 将数据解析后 存入json对象
workForSheet
(
dataArray
,
xssfWorkbook
);
return
dataArray
.
toString
();
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
@@ -322,4 +258,89 @@ public class TaxDocumentController {
}
return
array
;
}
/**
* 读取sheet数据 添加到json数据中
* @param dataArray
* @param xssfWorkbook
*/
private
void
workForSheet
(
JSONArray
dataArray
,
XSSFWorkbook
xssfWorkbook
)
{
for
(
int
numSheet
=
0
;
numSheet
<
xssfWorkbook
.
getNumberOfSheets
();
numSheet
++)
{
XSSFSheet
xssfSheet
=
xssfWorkbook
.
getSheetAt
(
numSheet
);
String
sheetName
=
xssfSheet
.
getSheetName
();
if
(
xssfSheet
==
null
)
{
continue
;
}
//当前sheet的json文件
JSONObject
sheetJson
=
new
JSONObject
();
//当前sheet的array,作为sheetJson 的value值
JSONArray
sheetArr
=
new
JSONArray
();
//sheet的第一行,获取作为json的key值
JSONArray
key
=
new
JSONArray
();
int
xssfLastRowNum
=
xssfSheet
.
getLastRowNum
();
// 循环行Row
for
(
int
rowNum
=
0
;
rowNum
<=
xssfLastRowNum
;
rowNum
++)
{
XSSFRow
xssfRow
=
xssfSheet
.
getRow
(
rowNum
);
if
(
xssfRow
==
null
)
{
continue
;
}
// 循环列Cell,在这里组合json文件
int
firstCellNum
=
xssfRow
.
getFirstCellNum
();
int
lastCellNum
=
xssfRow
.
getLastCellNum
();
JSONObject
rowJson
=
new
JSONObject
();
for
(
int
cellNum
=
firstCellNum
;
cellNum
<
lastCellNum
;
cellNum
++)
{
XSSFCell
cell
=
null
;
try
{
cell
=
xssfRow
.
getCell
(
cellNum
);
if
(
cell
==
null
)
{
rowJson
.
put
(
key
.
getString
(
cellNum
),
""
);
continue
;
}
if
(
rowNum
==
0
)
key
.
add
(
toString
(
cell
));
else
{
//若是列号超过了key的大小,则跳过
if
(
cellNum
>=
key
.
size
())
continue
;
rowJson
.
put
(
key
.
getString
(
cellNum
),
toString
(
cell
));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
if
(
rowJson
.
keySet
().
size
()
>
0
)
sheetArr
.
add
(
rowJson
);
}
sheetJson
.
put
(
sheetName
,
shuffleData
(
sheetArr
));
dataArray
.
add
(
sheetJson
);
}
}
/**
* 根据url地址 获取输入流
* @param url
* @return
* @throws IOException
*/
private
InputStream
getInputStreamByUrl
(
String
url
)
throws
IOException
{
URL
httpurl
=
new
URL
(
URLDecoder
.
decode
(
url
,
"UTF-8"
));
InputStream
is
;
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
();
}
return
is
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
ab976984
...
...
@@ -53,11 +53,11 @@ public class FileTypesServiceImpl {
fileTypes
.
setCreateTime
(
new
Date
());
fileTypes
.
setCreator
(
authUserHelper
.
getCurrentAuditor
().
get
());
fileTypes
.
setCreatorId
(
authUserHelper
.
getCurrentUserId
());
Long
id
=
fileTypesMapper
.
insert
(
fileTypes
);
if
(
id
>
0
)
{
int
num
=
fileTypesMapper
.
insert
(
fileTypes
);
if
(
num
>
0
)
{
OperationLogFileType
actionEntity
=
buildOperationLogFileType
();
actionEntity
.
setOperationAction
(
"新增"
);
actionEntity
.
setId
(
id
.
toString
());
actionEntity
.
setId
(
fileTypes
.
getId
()
.
toString
());
actionEntity
.
setUpdateState
(
fileTypes
.
toString
());
boolean
result
=
operationLogFileTypeService
.
addFileTypesList
(
actionEntity
);
if
(
result
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
ab976984
...
...
@@ -218,8 +218,7 @@ public class TaxDocumentServiceImpl {
public
boolean
deleteTaxDocument
(
Long
id
)
{
try
{
// log.warn("删除的内容:" + taxDocumentMapper.selectByPrimaryKey(id).toString());
// int num = taxDocumentMapper.deleteByPrimaryKey(id);
//逻辑删除
int
num
=
taxDocumentMapper
.
updateEnableToF
(
id
);
if
(
num
>
0
)
{
OperationLogTaxDocument
actionEntity
=
buildOperationLogTaxDocument
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportServiceImpl.java
View file @
ab976984
...
...
@@ -392,8 +392,9 @@ public class ReportServiceImpl extends BaseService {
if
(
cell
==
null
)
{
continue
;
//todo cell == null 如何处理
}
if
(
r
<=
addRowIndex
)
{
Long
cellTemplateId
=
distributedIdService
.
nextId
();
if
(
r
<=
addRowIndex
+
1
)
{
String
cellId
=
projectId
+
template
.
getId
()+
period
+
r
+
c
;
Long
cellTemplateId
=
Long
.
valueOf
(
cellId
.
hashCode
());
PeriodCellTemplate
cellTemplate
=
new
PeriodCellTemplate
();
cellTemplate
.
setPeriod
(
period
);
cellTemplate
.
setRowName
(
POIUtil
.
getCellFormulaString
(
cell
));
...
...
@@ -430,7 +431,7 @@ public class ReportServiceImpl extends BaseService {
fixedAccountCode
(
periodCellTemplateConfig
);
cellTemplateConfigList
.
add
(
periodCellTemplateConfig
);
}
if
(
r
>
0
&&
hasHandDatas
.
contains
(
c
))
{
if
(
r
>
0
&&
r
<=
addRowIndex
&&
hasHandDatas
.
contains
(
c
))
{
addManualConfig
(
cellTemplate
,
cell
,
now
,
cellTemplateConfigList
);
}
}
else
{
...
...
@@ -722,7 +723,11 @@ public class ReportServiceImpl extends BaseService {
}
public
Workbook
assembleTaxWorkBook
(
Template
template
,
Workbook
tWorkbook
,
String
projectId
,
Integer
period
)
{
Sheet
sheet
=
tWorkbook
.
getSheetAt
(
0
);
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
RevenueConfigExample
example
=
new
RevenueConfigExample
();
String
queryDate
=
project
.
getYear
()+
"-"
+(
period
>=
10
?
period:
(
"0"
+
period
));
example
.
createCriteria
().
andOrgIdEqualTo
(
project
.
getOrganizationId
()).
andStartDateLessThanOrEqualTo
(
queryDate
).
andEndDateGreaterThanOrEqualTo
(
queryDate
).
andStatusEqualTo
(
1
);
List
<
RevenueConfig
>
dataList
=
revenueConfigMapper
.
selectByExample
(
example
);
//合计项map
Map
<
Integer
,
List
<
String
>>
sumMap
=
new
HashMap
<>();
...
...
@@ -732,7 +737,7 @@ public class ReportServiceImpl extends BaseService {
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
(),
new
ArrayList
<>());
sumMap
.
put
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
(),
new
ArrayList
<>());
if
(
CollectionUtils
.
isNotEmpty
(
dataList
))
{
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
int
rowIndex
=
1
;
Row
sourceRow
=
sheet
.
getRow
(
3
);
for
(
RevenueConfig
config
:
dataList
)
{
...
...
@@ -771,24 +776,41 @@ public class ReportServiceImpl extends BaseService {
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
setCellValue
(
""
);
}
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_9
.
getIndex
()).
setCellValue
(
config
.
getTaxRate
().
multiply
(
new
BigDecimal
(
100
)).
intValue
()
+
"%"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"
E
\")*"
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
setCellValue
(
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"
H
\")*"
+
"WPNAME(\"VAT020\",\"B\",\""
+
config
.
getName
()+
"\",\"I\")"
);
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_11
.
getIndex
()).
setCellValue
(
RevenueConfEnum
.
RevenueType
.
MAPPING
.
get
(
config
.
getRevenueType
()));
row
.
getCell
(
TaxesCalculateReportEnum
.
Column
.
Column_12
.
getIndex
()).
setCellValue
(
RevenueConfEnum
.
TaxType
.
MAPPING
.
get
(
config
.
getTaxType
()));
rowIndex
++;
//组装合计项
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_5
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_6
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_7
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_8
.
getIndex
()+
1
,
""
)+
rowIndex
);
sumMap
.
get
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()).
add
(
transNumber
(
TaxesCalculateReportEnum
.
Column
.
Column_10
.
getIndex
()+
1
,
""
)+
rowIndex
);
rowIndex
++;
}
//组装合计项数据
assembleSumRow
(
sheet
.
getRow
(
rowIndex
),
sumMap
);
}
assemblePeriodTemplate
(
template
,
tWorkbook
,
projectId
,
period
,
dataList
.
size
());
return
tWorkbook
;
}
public
void
assembleSumRow
(
Row
sumRow
,
Map
<
Integer
,
List
<
String
>>
sumMap
){
Iterator
<
Map
.
Entry
<
Integer
,
List
<
String
>>>
iterator
=
sumMap
.
entrySet
().
iterator
();
while
(
iterator
.
hasNext
()){
Map
.
Entry
<
Integer
,
List
<
String
>>
entry
=
iterator
.
next
();
String
sumStr
=
"Sum("
;
for
(
String
cellNum
:
entry
.
getValue
()){
sumStr
+=
cellNum
+
","
;
}
sumStr
+=
")"
;
sumStr
=
sumStr
.
replace
(
",)"
,
")"
);
sumRow
.
getCell
(
entry
.
getKey
()).
setCellValue
(
sumStr
);
}
}
public
OperationResultDto
generateData
(
String
projectId
,
EnumServiceType
serviceType
,
Boolean
isMergeManualData
,
Integer
periodParam
,
Integer
reportType
,
Optional
<
String
>
generator
)
{
OperationResultDto
operationResultDto
=
new
OperationResultDto
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
ab976984
...
...
@@ -44,7 +44,19 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
if
(!(
args
[
4
]
instanceof
MissingArgEval
)){
segment6
=
getStringParam
(
args
[
5
],
ec
);
//产品代码
}
String
formulaExpression
=
"DFFS(\""
+
code
+
"\","
+
year
+
","
+
period
+
","
+
sourceDataType
+
",\""
+
segment5
+
"\",\""
+
segment6
+
"\")"
;
String
formulaExpression
=
"DFFS(\""
+
code
+
"\","
+
year
+
","
+
period
+
","
+
sourceDataType
;
if
(
segment5
!=
null
){
formulaExpression
+=
",\""
+
segment5
+
"\""
;
}
else
{
formulaExpression
+=
","
;
}
if
(
segment6
!=
null
){
formulaExpression
+=
",\""
+
segment6
+
"\""
;
}
else
{
formulaExpression
+=
","
;
}
formulaExpression
+=
")"
;
logger
.
debug
(
formulaExpression
);
year
=
getYear
(
year
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
ab976984
...
...
@@ -230,7 +230,7 @@ public class FunctionBase {
evalStr
=
evalStr
.
replace
(
"%"
,
""
);
try
{
BigDecimal
bigDecimal
=
new
BigDecimal
(
evalStr
);
bigDecimal
.
divide
(
new
BigDecimal
(
100
));
bigDecimal
=
bigDecimal
.
divide
(
new
BigDecimal
(
100
));
if
(!
dss
.
isEmpty
())
{
return
bigDecimal
.
add
(
dss
.
get
(
0
).
getAmount
());
}
else
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JFFS.java
View file @
ab976984
...
...
@@ -36,16 +36,28 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
int
year
=
getIntParam
(
args
[
1
],
ec
);
int
period
=
getIntParam
(
args
[
2
],
ec
);
int
sourceDataType
=
getIntParam
(
args
[
3
],
ec
);
//取值数据源
String
segment5
=
null
;
String
segment5
=
""
;
if
(!(
args
[
4
]
instanceof
MissingArgEval
)){
segment5
=
getStringParam
(
args
[
4
],
ec
);
//利润中心代码
}
String
segment6
=
null
;
String
segment6
=
""
;
if
(!(
args
[
4
]
instanceof
MissingArgEval
)){
segment6
=
getStringParam
(
args
[
5
],
ec
);
//产品代码
}
String
formulaExpression
=
"JFFS(\""
+
code
+
"\","
+
year
+
","
+
period
+
","
+
sourceDataType
+
",\""
+
segment5
+
"\",\""
+
segment6
+
"\")"
;
String
formulaExpression
=
"JFFS(\""
+
code
+
"\","
+
year
+
","
+
period
+
","
+
sourceDataType
;
if
(
segment5
!=
null
){
formulaExpression
+=
",\""
+
segment5
+
"\""
;
}
else
{
formulaExpression
+=
","
;
}
if
(
segment6
!=
null
){
formulaExpression
+=
",\""
+
segment6
+
"\""
;
}
else
{
formulaExpression
+=
","
;
}
formulaExpression
+=
")"
;
logger
.
debug
(
formulaExpression
);
year
=
getYear
(
year
);
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/FileTypesMapper.java
View file @
ab976984
...
...
@@ -41,7 +41,7 @@ public interface FileTypesMapper extends MyMapper {
*
* @mbg.generated
*/
Long
insert
(
FileTypes
record
);
int
insert
(
FileTypes
record
);
/**
* This method was generated by MyBatis Generator.
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitTbam.java
View file @
ab976984
...
...
@@ -36,7 +36,6 @@ public class CitTbam extends BaseEntity implements Serializable {
private
String
organizationId
;
private
Long
adjustAccount
;
private
OperationLogEntryLog
[]
operationLogEntryLogList
;
public
Long
getAdjustAccount
()
{
return
adjustAccount
;
...
...
@@ -46,13 +45,6 @@ public class CitTbam extends BaseEntity implements Serializable {
this
.
adjustAccount
=
adjustAccount
;
}
public
OperationLogEntryLog
[]
getOperationLogEntryLogList
()
{
return
operationLogEntryLogList
;
}
public
void
setOperationLogEntryLogList
(
OperationLogEntryLog
[]
operationLogEntryLogList
)
{
this
.
operationLogEntryLogList
=
operationLogEntryLogList
;
}
/**
* Database Column Remarks:
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/OperationLogEntryLog.java
View file @
ab976984
...
...
@@ -154,8 +154,17 @@ public class OperationLogEntryLog extends BaseEntity implements Serializable {
* @mbg.generated
*/
private
String
orgCode
;
private
String
operate
;
/**
public
String
getOperate
()
{
return
operate
;
}
public
void
setOperate
(
String
operate
)
{
this
.
operate
=
operate
;
}
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column operation_log_entry_log.create_time
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/FileTypesMapper.xml
View file @
ab976984
...
...
@@ -403,5 +403,6 @@
SELECT
id,file_attr, file_type
FROM file_types
ORDER BY file_attr
</select>
</mapper>
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/basicData.json
View file @
ab976984
...
...
@@ -403,6 +403,6 @@
"WordLibraryTitle"
:
"字库"
,
"notAllowDisableMessage"
:
"机构中已关联,不允许停用"
,
"UnSave"
:
"未点击保存按钮!"
,
"addFileType"
:
"增加档案类型"
,
"~MustBeEndOneApp"
:
"I Must be the End One, please!"
}
\ No newline at end of file
atms-web/src/main/webapp/app/cit/report/cit-report-view/cit-report-view.ctrl.js
View file @
ab976984
...
...
@@ -9,7 +9,7 @@
// 根据ServiceType判断当前实际Period
var
getActualPeriod
=
function
()
{
return
$scope
.
serviceType
===
enums
.
serviceType
.
VA
T
?
vatSessionService
.
month
:
0
;
return
$scope
.
serviceType
===
enums
.
serviceType
.
CI
T
?
vatSessionService
.
month
:
0
;
};
//Voucher Comments:
...
...
@@ -1325,7 +1325,6 @@
}
else
{
$scope
.
manualDataSources
.
push
({
item1
:
manualData
.
cellTemplateId
,
item2
:
manualData
});
}
// 刷新spreadsheet,获取操作数据源后最新的计算结果,并拿来与当前所有单元格value比较,得到value修改前后的值对比
var
updatedCells
=
$scope
.
reportApi
.
refreshReport
();
loadCellData
(
getActualPeriod
());
...
...
@@ -1602,7 +1601,6 @@
return
$q
.
when
();
});
}
return
$q
.
reject
();
}
});
...
...
atms-web/src/main/webapp/app/cit/report/entryList-modal/entryList-modal.ctrl.js
View file @
ab976984
...
...
@@ -51,17 +51,29 @@
});
$log.debug($scope.selectedItems);*/
name
:
"124600SYSADMIN20180900025 社保公积金 CNY"
orgCode
:
"124600"
orgName
:
"滴滴智慧交通科技有限公司"
organizationId
:
"5bbd739c-1a13-4b0f-aba6-32ba41e4de69"
period
:
2018
$scope
.
doCalcute
(
selectedItems
.
selectedRowsData
);
var
_in
=
{};
if
(
selectedItems
.
currentDeselectedRowKeys
.
length
==
0
){
_in
.
operate
=
"增"
;
_in
.
accountingDate
=
selectedItems
.
currentSelectedRowKeys
[
0
];
_in
.
voucherNum
=
selectedItems
.
currentSelectedRowKeys
[
0
];
_in
.
accountingDate
=
selectedItems
.
currentSelectedRowKeys
[
0
].
accountingDate
;
_in
.
voucherNum
=
selectedItems
.
currentSelectedRowKeys
[
0
].
voucherNum
;
_in
.
orgCode
=
selectedItems
.
currentSelectedRowKeys
[
0
].
orgCode
;
_in
.
organizationId
=
selectedItems
.
currentSelectedRowKeys
[
0
].
organizationId
;
}
else
{
_in
.
operate
=
"减"
;
_in
.
accountingDate
=
selectedItems
.
currentDeselectedRowKeys
[
0
];
_in
.
voucherNum
=
selectedItems
.
currentDeselectedRowKeys
[
0
];
_in
.
accountingDate
=
selectedItems
.
currentDeselectedRowKeys
[
0
].
accountingDate
;
_in
.
voucherNum
=
selectedItems
.
currentDeselectedRowKeys
[
0
].
voucherNum
;
_in
.
orgCode
=
selectedItems
.
currentDeselectedRowKeys
[
0
].
orgCode
;
_in
.
organizationId
=
selectedItems
.
currentDeselectedRowKeys
[
0
].
organizationId
;
}
_in
.
subjectCode
=
$scope
.
relObj
.
entryLogIdByCode
;
$scope
.
relObj
.
logs
.
push
(
_in
);
},
allowColumnResizing
:
true
,
...
...
atms-web/src/main/webapp/app/cit/report/entryLog-modal/entryLog-modal.ctrl.js
View file @
ab976984
...
...
@@ -79,7 +79,5 @@
$scope
.
hideCellAttachmentModel
=
function
()
{
$
(
'#entryListModal'
).
modal
(
'hide'
);
}
}
]);
\ No newline at end of file
atms-web/src/main/webapp/app/cit/report/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
ab976984
...
...
@@ -239,8 +239,11 @@
});
}
});
updateAdjustDto
.
push
(
$scope
.
relObj
.
logs
);
cellCommentService
.
updateAdjust
(
updateAdjustDto
).
success
(
function
(
res
)
{
cellCommentService
.
updateAdjust
(
updateAdjustDto
).
success
(
function
(
res1
)
{
if
(
res1
.
resultMsg
==
"success"
)
{
cellCommentService
.
addLog
(
$scope
.
relObj
.
logs
).
success
(
function
(
res
)
{
});
}
}).
error
(
function
(
error
)
{
if
(
error
)
{
alert
(
"调整金额数据更新失败"
);
...
...
@@ -249,7 +252,6 @@
}
};
//确定点击事件的处理函数
var
confirmEventHandler
=
function
()
{
if
(
vatSessionService
.
project
.
projectStatusList
[
vatSessionService
.
month
]
>=
constant
.
ProjectStatusEnum
.
AccountMapSubmitted
)
{
...
...
@@ -463,7 +465,6 @@
if
(
!
$scope
.
selectedAccountCodes
)
{
$scope
.
selectedAccountCodes
=
[];
}
if
(
!
_
.
isEmpty
(
$scope
.
selectedAccountCodes
))
{
var
selectedData
=
_
.
filter
(
$scope
.
accountDataSource
,
function
(
data
)
{
return
$scope
.
selectedAccountCodes
.
indexOf
(
data
.
code
)
>
-
1
;
...
...
@@ -639,6 +640,7 @@
}
};
//弹框表格右下角合计值
var
getConclusionVal
=
function
()
{
var
precition
=
2
;
//如果数值是份数类型,则精度为0,否则为2
...
...
@@ -709,11 +711,7 @@
$
(
"#dataGridFooterSummary"
).
html
(
$translate
.
instant
(
'Conclusion'
)
+
' '
+
evalVal
.
formatAmount
(
precition
));
}
else
if
(
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
CIT_TBAM
)
{
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
return
memo
+
x
.
endingBalance
;
},
0
);
$
(
"#dataGridFooterSummary"
).
html
(
$translate
.
instant
(
'Conclusion'
)
+
' '
+
evalVal
.
formatAmount
(
precition
));
calculateSum
(
null
);
}
else
{
// For 报表数据源 and BSPL数据源
if
(
$scope
.
detail
.
dataGridSource
&&
$scope
.
detail
.
dataGridSource
.
length
>
0
)
{
...
...
@@ -1542,22 +1540,45 @@
$scope
.
$watch
(
'relObj.checkRadio'
,
function
(
n
,
o
)
{
if
(
$scope
.
detail
.
entryIndex
!=
undefined
)
{
$scope
.
detail
.
dataGridSourceBind
[
$scope
.
detail
.
entryIndex
].
adjustBack
=
n
;
$scope
.
detail
.
dataGridSourceBind
[
$scope
.
detail
.
entryIndex
].
isBack
=
true
;
calculateSum
(
n
);
}
});
//重新计算合计值
var
calculateSum
=
function
(
n
)
{
var
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSourceBind
,
function
(
memo
,
x
)
{
if
((
x
.
accountCode
==
$scope
.
relObj
.
account
)
&&
x
.
accountCode
!=
undefined
&&
$scope
.
relObj
.
account
!=
undefined
)
{
memo
+
n
;
}
else
{
return
memo
+
x
.
endingBalance
;
var
evalVal
=
0
;
var
s
;
if
(
n
!=
null
)
{
for
(
var
i
=
0
,
j
=
$scope
.
detail
.
dataGridSourceBind
.
length
;
i
<
j
;
i
++
)
{
if
(
i
==
$scope
.
detail
.
entryIndex
)
{
continue
;
}
evalVal
+=
Number
(
$scope
.
detail
.
dataGridSourceBind
[
i
].
endingBalance
);
}
evalVal
=
evalVal
+
Number
(
n
);
$scope
.
detail
.
penValue
=
evalVal
;
var
_v1
=
0
;
if
(
$scope
.
detail
.
keyinData
!=
null
&&
$scope
.
detail
.
keyinData
!=
undefined
)
{
_v1
=
Number
(
$scope
.
detail
.
keyinData
);
}
},
0
);
$scope
.
detail
.
cellInfo
.
money
=
_v1
.
formatAmount
((
_v1
+
evalVal
),
true
);
}
else
{
for
(
var
i
=
0
,
j
=
$scope
.
detail
.
dataGridSourceBind
.
length
;
i
<
j
;
i
++
)
{
s
=
$scope
.
detail
.
dataGridSourceBind
[
i
].
adjustAccount
;
if
(
s
==
null
&&
$scope
.
detail
.
dataGridSourceBind
[
$scope
.
detail
.
entryIndex
].
isBack
==
undefined
)
{
evalVal
+=
$scope
.
detail
.
dataGridSourceBind
[
$scope
.
detail
.
entryIndex
].
endingBalance
;
}
else
if
(
s
!=
null
&&
$scope
.
detail
.
dataGridSourceBind
[
$scope
.
detail
.
entryIndex
].
isBack
==
undefined
)
{
evalVal
+=
s
;
}
else
{
evalVal
+=
s
;
}
}
}
var
va
=
evalVal
.
formatAmount
(
evalVal
,
true
);
$
(
"#dataGridFooterSummary"
).
html
(
$translate
.
instant
(
'Conclusion'
)
+
' '
+
evalVal
.
formatAmount
(
evalVal
,
true
));
$scope
.
detail
.
penValue
=
evalVal
.
formatAmount
(
evalVal
,
true
);
+
' '
+
va
);
}
$scope
.
showLog
=
function
()
{
//显示日志
...
...
@@ -1576,6 +1597,7 @@
$scope
.
loadEntryListDataList
=
function
(
e
)
{
$scope
.
detail
.
entryIndex
=
e
.
dataIndex
;
$scope
.
detail
.
entryLogIdByCode
=
e
.
data
.
accountCode
;
$scope
.
relObj
.
entryLogIdByCode
=
e
.
data
.
accountCode
;
cellCommentService
.
loadEntryListDataList
(
e
.
data
.
accountCode
).
success
(
function
(
res
)
{
$scope
.
relObj
.
account
=
e
.
data
.
accountCode
;
if
(
res
.
resultMsg
==
"success"
)
{
...
...
@@ -1588,7 +1610,6 @@
}
//-------------------------------------------------------------------- end --------------------------------------------------------------
//设置数据源表格的列
...
...
@@ -2279,7 +2300,6 @@
});
var
getBlowGridData
=
function
(
data
)
{
cellCommentService
.
getCellInformation
(
data
).
success
(
function
(
res
)
{
debugger
;
if
(
res
.
resultMsg
)
{
$scope
.
detail
.
dataGridSourceBind
=
res
.
data
;
calculateSum
(
null
);
...
...
atms-web/src/main/webapp/app/cit/report/tax-report-cell-detail-modal/tax-report-cell-detail-modal.html
View file @
ab976984
...
...
@@ -302,7 +302,7 @@
<!--分录弹框-->
<entry-list-modal
id =
"entryListId"
rel-obj =
"relObj"
show-log =
"showLog()"
></entry-list-modal>
<entry-list-modal
id =
"entryListId"
rel-obj =
"relObj"
show-log =
"showLog()"
detail =
"detail"
></entry-list-modal>
<entry-log
id =
"entryLogId"
rel-obj =
"relObj"
></entry-log>
</div>
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
ab976984
...
...
@@ -9,9 +9,6 @@
$scope
.
isWriteBackUpdate
=
false
;
$scope
.
projectYear
=
vatSessionService
.
year
;
$scope
.
projectPeriod
=
vatSessionService
.
month
;
$scope
.
relObj
=
{};
//关闭数据源弹出框
var
hidePanel
=
function
()
{
$scope
.
selectedDataSourceTabIndex
=
1
;
...
...
@@ -604,9 +601,6 @@
}
}]
},
onInitialized
:
function
(
e
)
{
dxDataGridService
.
registerRowDbClick
(
e
.
component
);
},
paging
:
{
enabled
:
false
},
...
...
atms-web/src/main/webapp/app/common/controls/vat-report-view/vat-report-view.ctrl.js
View file @
ab976984
...
...
@@ -273,9 +273,6 @@
break
;
case
enums
.
formulaDataSourceType
.
InvoiceFilter
:
break
;
case
enums
.
formulaDataSourceType
.
CIT_TBAM
:
obj
.
relSql
=
sourceData
.
rel_sql
;
}
if
(
sourceData
.
type
===
0
&&
sourceData
.
dataSourceType
===
enums
.
cellDataSourceType
.
RelatedModel
)
{
...
...
atms-web/src/main/webapp/app/common/utils/pwc-util.js
View file @
ab976984
...
...
@@ -52,7 +52,7 @@
if
(
!
Number
.
prototype
.
formatAmount
)
{
Number
.
prototype
.
formatAmount
=
function
(
decPlaces
,
type
)
{
if
(
type
){
return
Number
(
decPlaces
.
toString
().
match
(
/^
\d
+
(?:\.\d{
0,
2})?
/
));
return
Number
(
decPlaces
.
toString
().
match
(
/^
\d
+
(?:\.\d{2})?
/
));
}
decPlaces
=
isNaN
(
decPlaces
=
Math
.
abs
(
decPlaces
))
?
2
:
decPlaces
;
var
n
=
this
.
toFixed
(
decPlaces
);
...
...
atms-web/src/main/webapp/app/common/webservices/cellComment.svc.js
View file @
ab976984
...
...
@@ -22,6 +22,9 @@ webservices.factory('cellCommentService', ['$http', 'apiConfig', function ($http
},
selectEntryLog
:
function
(
code
)
{
return
$http
.
get
(
'/CellComment/selectEntryLog?code='
+
code
,
apiConfig
.
createVat
());
}
},
addLog
:
function
(
data
){
return
$http
.
post
(
'/CellComment/addLog'
,
data
,
apiConfig
.
createVat
());
}
};
}]);
\ No newline at end of file
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.svc.js
View file @
ab976984
...
...
@@ -14,7 +14,7 @@ taxDocumentManageModule.factory('taxDocumentListService',
var
defer
=
$q
.
defer
();
window
.
$
.
ajax
({
type
:
'POST'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/
v1/
taxDoc/add'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/add'
,
data
:
params
,
dataType
:
"json"
,
beforeSend
:
function
(
request
)
{
...
...
@@ -40,7 +40,7 @@ taxDocumentManageModule.factory('taxDocumentListService',
var
defer
=
$q
.
defer
();
window
.
$
.
ajax
({
type
:
'POST'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/
v1/
taxDoc/edit'
,
url
:
apiInterceptor
.
webApiHostUrl
+
'/taxDoc/edit'
,
data
:
params
,
dataType
:
"json"
,
beforeSend
:
function
(
request
)
{
...
...
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