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
90650fb9
Commit
90650fb9
authored
Mar 21, 2019
by
chase
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge 档案管理
parent
57d00e04
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
362 additions
and
39 deletions
+362
-39
FormulaDataSourceDetailType.java
...tech/atms/constant/enums/FormulaDataSourceDetailType.java
+2
-1
OperationLogFileTypeController.java
...xtech/atms/controller/OperationLogFileTypeController.java
+9
-6
OperationLogTaxDocController.java
...taxtech/atms/controller/OperationLogTaxDocController.java
+9
-6
TaxCellDataSourceDto.java
...ava/pwc/taxtech/atms/dto/vatdto/TaxCellDataSourceDto.java
+271
-0
FileTypesServiceImpl.java
...a/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
+1
-0
TaxDocumentServiceImpl.java
...pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
+1
-1
DFFS.java
.../taxtech/atms/vat/service/impl/report/functions/DFFS.java
+1
-1
FunctionBase.java
.../atms/vat/service/impl/report/functions/FunctionBase.java
+12
-0
JFFS.java
.../taxtech/atms/vat/service/impl/report/functions/JFFS.java
+1
-1
KPSR.java
.../taxtech/atms/vat/service/impl/report/functions/KPSR.java
+25
-15
WPNAME.java
...axtech/atms/vat/service/impl/report/functions/WPNAME.java
+4
-3
tax-report-cell-detail-modal.ctrl.js
...rt-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
+13
-0
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
+13
-5
No files found.
atms-api/src/main/java/pwc/taxtech/atms/constant/enums/FormulaDataSourceDetailType.java
View file @
90650fb9
...
...
@@ -12,7 +12,8 @@ public enum FormulaDataSourceDetailType {
AssetDetailDataSourceDto
(
5
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
AssetDetailDataSourceDto
.
class
),
ReportCellDataSourceDto
(
6
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
ReportCellDataSourceDto
.
class
),
ReportCellTableSUMIFDataSourceDto
(
7
,
ReportCellTableSUMIFDataSourceDto
.
class
);
ReportCellTableSUMIFDataSourceDto
(
7
,
ReportCellTableSUMIFDataSourceDto
.
class
),
TaxCellDataSourceDto
(
60
,
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
TaxCellDataSourceDto
.
class
),;
private
Integer
code
;
private
Class
clas
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogFileTypeController.java
View file @
90650fb9
...
...
@@ -91,22 +91,25 @@ public class OperationLogFileTypeController {
@RequestMapping
(
"exportExcel"
)
@ResponseBody
public
void
exportExcelFile
(
HttpServletResponse
response
){
// public ReturnData selectListForLog(@RequestBody OperationLogFileType operationLogFileType){
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
"id"
,
"id"
);
headers
.
put
(
"operation_content"
,
"操作内容"
);
headers
.
put
(
"module_name"
,
"模块名称"
);
headers
.
put
(
"operation_object"
,
"操作对象"
);
//
headers.put("operation_content", "操作内容");
//
headers.put("module_name", "模块名称");
//
headers.put("operation_object", "操作对象");
headers
.
put
(
"operation_action"
,
"操作action"
);
headers
.
put
(
"original_state"
,
"原始状态"
);
headers
.
put
(
"update_state"
,
"更新状态"
);
// headers.put("original_state", "原始状态");
// headers.put("update_state", "更新状态");
headers
.
put
(
"update_state"
,
"操作内容"
);
headers
.
put
(
"operation_user"
,
"操作者"
);
headers
.
put
(
"ip"
,
"操作ip"
);
headers
.
put
(
"comment"
,
"内容"
);
headers
.
put
(
"create_time"
,
"创建时间"
);
List
<
OperationLogFileType
>
fileTypes
=
operationLogFileTypeService
.
selectFileTypesList
();
// List<OperationLogFileType> operationLogFileTypes = operationLogFileTypeService.selectListForLog(operationLogFileType.getFileTypeIds());
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
""
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
"
档案类型日志
"
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
OutputStream
ouputStream
=
response
.
getOutputStream
();
ExcelUtil
.
exportExcel
(
headers
,
fileTypes
,
ouputStream
);
}
catch
(
Exception
e
){
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/OperationLogTaxDocController.java
View file @
90650fb9
...
...
@@ -71,23 +71,26 @@ public class OperationLogTaxDocController {
@RequestMapping
(
"exportExcel"
)
@ResponseBody
// public void exportExcelFile(HttpServletResponse response, @RequestBody OperationLogTaxDocument operationLogTaxDocument) {
public
void
exportExcelFile
(
HttpServletResponse
response
)
{
try
{
Map
<
String
,
String
>
headers
=
new
HashMap
<
String
,
String
>();
headers
.
put
(
"id"
,
"id"
);
headers
.
put
(
"operation_content"
,
"操作内容"
);
headers
.
put
(
"module_name"
,
"模块名称"
);
headers
.
put
(
"operation_object"
,
"操作对象"
);
//
headers.put("operation_content", "操作内容");
//
headers.put("module_name", "模块名称");
//
headers.put("operation_object", "操作对象");
headers
.
put
(
"operation_action"
,
"操作action"
);
headers
.
put
(
"original_state"
,
"原始状态"
);
headers
.
put
(
"update_state"
,
"更新状态"
);
// headers.put("original_state", "原始状态");
// headers.put("update_state", "更新状态");
headers
.
put
(
"update_state"
,
"操作内容"
);
headers
.
put
(
"operation_user"
,
"操作者"
);
headers
.
put
(
"ip"
,
"操作ip"
);
headers
.
put
(
"comment"
,
"内容"
);
headers
.
put
(
"create_time"
,
"创建时间"
);
List
<
OperationLogTaxDocument
>
TaxDocuments
=
operationLogTaxDocService
.
selectTaxDocumentList
();
// List<String> ids = operationLogTaxDocument.getIds() == null ? Lists.newArrayList() : operationLogTaxDocument.getIds();
response
.
setContentType
(
"multipart/form-data"
);
response
.
setHeader
(
"Content-Disposition"
,
"attachment;fileName="
+
new
String
(
""
.
getBytes
(
"GB2312"
),
"ISO-8859-1"
));
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
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/TaxCellDataSourceDto.java
0 → 100644
View file @
90650fb9
package
pwc
.
taxtech
.
atms
.
dto
.
vatdto
;
import
pwc.taxtech.atms.constant.DataSourceName
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.vat.entity.PeriodCellData
;
import
java.math.BigDecimal
;
public
class
TaxCellDataSourceDto
extends
DataSourceDto
{
private
String
tag
=
""
;
private
String
name
;
private
Integer
year
;
private
Integer
period
;
private
Integer
columnIndex
;
private
String
columnName
;
private
Integer
rowIndex
;
private
String
rowName
;
private
String
reportTemplateId
;
private
String
reportName
;
private
String
cellDataId
;
private
String
cellTemplateId
;
private
Boolean
isOnlyManualInput
;
private
Integer
type
;
private
Integer
resultType
;
private
BigDecimal
amount
;
public
TaxCellDataSourceDto
()
{
this
.
type
=
FormulaDataSourceType
.
Report
.
getCode
();
}
public
void
extractFromGroup
(
WPNAMEParasBo
parasBo
,
Integer
period
,
Integer
year
,
CellTemplatePerGroupDto
cellTemplateData
)
{
this
.
tag
=
"WPNAME"
;
this
.
name
=
DataSourceName
.
ReportDataSource
;
this
.
year
=
year
;
this
.
period
=
period
;
this
.
columnIndex
=
cellTemplateData
.
getColumnIndex
();
this
.
columnName
=
cellTemplateData
.
getColumnName
();
this
.
rowIndex
=
cellTemplateData
.
getRowIndex
();
this
.
rowName
=
cellTemplateData
.
getRowName
();
this
.
reportTemplateId
=
cellTemplateData
.
getReportTemplateId
();
this
.
cellTemplateId
=
cellTemplateData
.
getCellTemplateId
()
+
""
;
this
.
resultType
=
cellTemplateData
.
getResultType
();
this
.
isOnlyManualInput
=
false
;
this
.
reportName
=
parasBo
.
getReportCode
();
}
public
void
extractFromGroup
(
WPTYPEParasBo
parasBo
,
Integer
period
,
Integer
year
,
CellTemplatePerGroupDto
cellTemplateData
)
{
this
.
tag
=
"WPTYPE"
;
this
.
name
=
DataSourceName
.
ReportDataSource
;
this
.
year
=
year
;
this
.
period
=
period
;
this
.
columnIndex
=
cellTemplateData
.
getColumnIndex
();
this
.
columnName
=
cellTemplateData
.
getColumnName
();
this
.
rowIndex
=
cellTemplateData
.
getRowIndex
();
this
.
rowName
=
cellTemplateData
.
getRowName
();
this
.
reportTemplateId
=
cellTemplateData
.
getReportTemplateId
();
this
.
cellTemplateId
=
cellTemplateData
.
getCellTemplateId
()
+
""
;
this
.
resultType
=
cellTemplateData
.
getResultType
();
this
.
isOnlyManualInput
=
false
;
this
.
reportName
=
parasBo
.
getReportCode
();
}
public
static
TaxCellDataSourceDto
nullDataSource
(
BBParasBo
bbParasBo
,
CurrentPeriodBo
currentPeriodBo
)
{
TaxCellDataSourceDto
nulDataSource
=
new
TaxCellDataSourceDto
();
nulDataSource
.
name
=
DataSourceName
.
ReportDataSource
;
nulDataSource
.
reportTemplateId
=
bbParasBo
.
getReportCode
();
nulDataSource
.
year
=
currentPeriodBo
.
curYear
;
nulDataSource
.
period
=
currentPeriodBo
.
getCurPeriod
();
nulDataSource
.
columnIndex
=
bbParasBo
.
getColumnIndex
()
-
1
;
nulDataSource
.
rowIndex
=
bbParasBo
.
getRowIndex
()
-
1
;
nulDataSource
.
isOnlyManualInput
=
false
;
nulDataSource
.
reportName
=
bbParasBo
.
getReportCode
();
return
nulDataSource
;
}
public
void
extractFromGroup
(
BBParasBo
bbParasBo
,
CurrentPeriodBo
currentPeriodBo
,
PeriodCellData
cellData
,
CellTemplatePerGroupDto
cellTemplateData
)
{
this
.
name
=
DataSourceName
.
ReportDataSource
;
this
.
year
=
currentPeriodBo
.
curYear
;
this
.
period
=
currentPeriodBo
.
curPeriod
;
this
.
columnIndex
=
bbParasBo
.
getColumnIndex
()
-
1
;
this
.
columnName
=
cellTemplateData
.
getColumnName
();
this
.
rowIndex
=
bbParasBo
.
getRowIndex
()
-
1
;
this
.
rowName
=
cellTemplateData
.
getRowName
();
this
.
reportTemplateId
=
cellTemplateData
.
getReportTemplateId
();
this
.
cellDataId
=
cellData
.
getId
()
+
""
;
this
.
cellTemplateId
=
cellData
.
getCellTemplateId
()
+
""
;
this
.
resultType
=
cellTemplateData
.
getResultType
();
this
.
isOnlyManualInput
=
false
;
this
.
reportName
=
bbParasBo
.
getReportCode
();
}
public
void
extractFromGroup
(
BBParasBo
bbParasBo
,
Integer
period
,
Integer
year
,
CellTemplatePerGroupDto
cellTemplateData
)
{
this
.
name
=
DataSourceName
.
ReportDataSource
;
this
.
year
=
year
;
this
.
period
=
period
;
this
.
columnIndex
=
bbParasBo
.
getColumnIndex
()
-
1
;
this
.
columnName
=
cellTemplateData
.
getColumnName
();
this
.
rowIndex
=
bbParasBo
.
getRowIndex
()
-
1
;
this
.
rowName
=
cellTemplateData
.
getRowName
();
this
.
reportTemplateId
=
cellTemplateData
.
getReportTemplateId
();
this
.
cellTemplateId
=
cellTemplateData
.
getCellTemplateId
()
+
""
;
this
.
resultType
=
cellTemplateData
.
getResultType
();
this
.
isOnlyManualInput
=
false
;
this
.
reportName
=
bbParasBo
.
getReportCode
();
}
public
void
fixedWithGroup
(
CellTemplatePerGroupDto
dto
)
{
cellTemplateId
=
dto
.
getCellTemplateId
();
rowName
=
dto
.
getRowName
();
columnName
=
dto
.
getColumnName
();
reportTemplateId
=
dto
.
getReportTemplateId
();
resultType
=
dto
.
getResultType
();
}
public
String
getTag
()
{
return
this
.
tag
;
}
public
void
setTag
(
String
tag
)
{
this
.
tag
=
tag
;
}
@Override
public
String
getName
()
{
return
this
.
name
;
}
@Override
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
@Override
public
Integer
getYear
()
{
return
this
.
year
;
}
@Override
public
void
setYear
(
Integer
year
)
{
this
.
year
=
year
;
}
@Override
public
Integer
getPeriod
()
{
return
this
.
period
;
}
@Override
public
void
setPeriod
(
Integer
period
)
{
this
.
period
=
period
;
}
@Override
public
Integer
getColumnIndex
()
{
return
this
.
columnIndex
;
}
@Override
public
void
setColumnIndex
(
Integer
columnIndex
)
{
this
.
columnIndex
=
columnIndex
;
}
@Override
public
String
getColumnName
()
{
return
this
.
columnName
;
}
@Override
public
void
setColumnName
(
String
columnName
)
{
this
.
columnName
=
columnName
;
}
@Override
public
Integer
getRowIndex
()
{
return
this
.
rowIndex
;
}
@Override
public
void
setRowIndex
(
Integer
rowIndex
)
{
this
.
rowIndex
=
rowIndex
;
}
@Override
public
String
getRowName
()
{
return
this
.
rowName
;
}
@Override
public
void
setRowName
(
String
rowName
)
{
this
.
rowName
=
rowName
;
}
@Override
public
String
getReportTemplateId
()
{
return
this
.
reportTemplateId
;
}
@Override
public
void
setReportTemplateId
(
String
reportTemplateId
)
{
this
.
reportTemplateId
=
reportTemplateId
;
}
public
String
getReportName
()
{
return
this
.
reportName
;
}
public
void
setReportName
(
String
reportName
)
{
this
.
reportName
=
reportName
;
}
@Override
public
String
getCellDataId
()
{
return
this
.
cellDataId
;
}
@Override
public
void
setCellDataId
(
String
cellDataId
)
{
this
.
cellDataId
=
cellDataId
;
}
@Override
public
String
getCellTemplateId
()
{
return
this
.
cellTemplateId
;
}
@Override
public
void
setCellTemplateId
(
String
cellTemplateId
)
{
this
.
cellTemplateId
=
cellTemplateId
;
}
public
Boolean
getIsOnlyManualInput
()
{
return
this
.
isOnlyManualInput
;
}
public
void
setIsOnlyManualInput
(
Boolean
onlyManualInput
)
{
this
.
isOnlyManualInput
=
onlyManualInput
;
}
@Override
public
Integer
getType
()
{
return
this
.
type
;
}
@Override
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
@Override
public
Integer
getResultType
()
{
return
this
.
resultType
;
}
@Override
public
void
setResultType
(
Integer
resultType
)
{
this
.
resultType
=
resultType
;
}
@Override
public
BigDecimal
getAmount
()
{
return
this
.
amount
;
}
@Override
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
}
}
atms-api/src/main/java/pwc/taxtech/atms/service/impl/FileTypesServiceImpl.java
View file @
90650fb9
...
...
@@ -51,6 +51,7 @@ public class FileTypesServiceImpl {
requiredFieldFormatToJson
(
fileTypes
);
//设置当前时间 当前创建人信息
fileTypes
.
setCreateTime
(
new
Date
());
fileTypes
.
setUpdateTime
(
new
Date
());
fileTypes
.
setCreator
(
authUserHelper
.
getCurrentAuditor
().
get
());
fileTypes
.
setCreatorId
(
authUserHelper
.
getCurrentUserId
());
int
num
=
fileTypesMapper
.
insert
(
fileTypes
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxDocumentServiceImpl.java
View file @
90650fb9
...
...
@@ -282,8 +282,8 @@ public class TaxDocumentServiceImpl {
if
(
num
>
0
)
{
OperationLogTaxDocument
actionEntity
=
buildOperationLogTaxDocument
();
actionEntity
.
setOperationAction
(
"修改"
);
actionEntity
.
setId
(
taxDocument
.
getId
().
toString
());
//设置更新值
actionEntity
.
setOriginalState
(
taxDocumentMapper
.
selectByPrimaryKey
(
taxDocument
.
getId
()).
toString
());
actionEntity
.
setUpdateState
(
taxDocument
.
toString
());
boolean
result
=
operationLogTaxDocService
.
addTaxDocumentList
(
actionEntity
);
if
(
result
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/DFFS.java
View file @
90650fb9
...
...
@@ -190,7 +190,7 @@ public class DFFS extends FunctionBase implements FreeRefFunction {
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
contain
.
add
(
dto
);
}
return
temp
.
stream
().
mapToDouble
(
a
->
a
.
getPeriodCr
().
doubleValue
()).
sum
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/FunctionBase.java
View file @
90650fb9
...
...
@@ -89,11 +89,23 @@ public class FunctionBase {
}
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceType
sourceType
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
String
projectId
)
{
return
saveDataSource
(
ec
,
dataSourceList
,
sourceType
,
formulaDataSourceDetailType
,
val
,
period
,
templateGroupId
,
null
,
null
,
projectId
);
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
String
projectId
)
{
return
saveDataSource
(
ec
,
dataSourceList
,
formulaDataSourceDetailType
,
val
,
period
,
templateGroupId
,
null
,
null
,
projectId
);
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceType
sourceType
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
Integer
colNumP
,
Integer
rowNumP
,
String
projectId
)
{
return
saveDataSource
(
ec
,
dataSourceList
,
sourceType
,
formulaDataSourceDetailType
,
val
,
period
,
templateGroupId
,
colNumP
,
rowNumP
,
projectId
,
null
);
}
public
Long
saveDataSource
(
OperationEvaluationContext
ec
,
List
<
Object
>
dataSourceList
,
FormulaDataSourceDetailType
formulaDataSourceDetailType
,
BigDecimal
val
,
int
period
,
Long
templateGroupId
,
Integer
colNumP
,
Integer
rowNumP
,
String
projectId
)
{
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/JFFS.java
View file @
90650fb9
...
...
@@ -187,7 +187,7 @@ public class JFFS extends FunctionBase implements FreeRefFunction {
dto
.
setPeriod
(
period
);
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
TrialBalanceSource
.
getCode
());
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
contain
.
add
(
dto
);
}
return
temp
.
stream
().
mapToDouble
(
a
->
a
.
getPeriodDr
().
doubleValue
()).
sum
();
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/KPSR.java
View file @
90650fb9
...
...
@@ -6,12 +6,14 @@ import org.apache.poi.ss.formula.OperationEvaluationContext;
import
org.apache.poi.ss.formula.eval.NumberEval
;
import
org.apache.poi.ss.formula.eval.ValueEval
;
import
org.apache.poi.ss.formula.functions.FreeRefFunction
;
import
pwc.taxtech.atms.common.util.DateUtils
;
import
pwc.taxtech.atms.common.util.SpringContextUtil
;
import
pwc.taxtech.atms.constant.Constant
;
import
pwc.taxtech.atms.constant.enums.BillDetailEnum
;
import
pwc.taxtech.atms.constant.enums.EnumOperationType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.
FormulaDataSource
Type
;
import
pwc.taxtech.atms.dto.vatdto.
ReportCell
DataSourceDto
;
import
pwc.taxtech.atms.constant.enums.
KeyValueConfigResult
Type
;
import
pwc.taxtech.atms.dto.vatdto.
OutputInvoice
DataSourceDto
;
import
pwc.taxtech.atms.vat.entity.BillDetail
;
import
pwc.taxtech.atms.vat.entity.BillDetailExample
;
import
pwc.taxtech.atms.vat.entity.RevenueTypeMapping
;
...
...
@@ -40,18 +42,17 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
Integer
billType
=
getIntParam
(
args
[
1
],
ec
);
//发票类型
String
formulaExpression
=
"KPSR(\""
+
revenueTypeName
+
"\","
+
billType
+
")"
;
logger
.
debug
(
formulaExpression
);
List
<
ReportCell
DataSourceDto
>
dataSource
=
Lists
.
newArrayList
();
List
<
OutputInvoice
DataSourceDto
>
dataSource
=
Lists
.
newArrayList
();
double
result
=
countForTrialBalance
(
revenueTypeName
,
dataSource
,
billType
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
FormulaDataSourceDto
,
new
BigDecimal
(
result
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
double
result
=
countForTrialBalance
(
revenueTypeName
,
dataSource
,
billType
,
ec
);
Long
dataSoureId
=
saveDataSource
(
ec
,
Collections
.
singletonList
(
dataSource
),
FormulaDataSourceDetailType
.
InputInvoiceDataSourceDto
,
new
BigDecimal
(
result
),
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
formulaContext
.
getProjectId
());
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
formulaExpression
,
new
BigDecimal
(
result
),
dataSoureId
,
formulaContext
.
getProjectId
());
return
new
NumberEval
(
result
);
}
private
double
countForTrialBalance
(
String
revenueTypeName
,
List
<
ReportCellDataSourceDto
>
contain
,
Integer
billType
)
{
private
double
countForTrialBalance
(
String
revenueTypeName
,
List
<
OutputInvoiceDataSourceDto
>
contain
,
Integer
billType
,
OperationEvaluationContext
ec
)
{
String
queryDate
=
formulaContext
.
getYear
()+(
formulaContext
.
getPeriod
()<
10
?(
"0"
+
formulaContext
.
getPeriod
()):(
formulaContext
.
getPeriod
()+
""
));
RevenueTypeMappingExample
typeMappingExample
=
new
RevenueTypeMappingExample
();
typeMappingExample
.
createCriteria
().
andOrgIdEqualTo
(
formulaContext
.
getOrganizationId
())
...
...
@@ -72,13 +73,22 @@ public class KPSR extends FunctionBase implements FreeRefFunction {
.
andBillTypeEqualTo
(
BillDetailEnum
.
BillType
.
MAPPING
.
get
(
billType
));
List
<
BillDetail
>
billDetails
=
SpringContextUtil
.
billDetailMapper
.
selectByExample
(
billDetailExample
);
for
(
BillDetail
billDetail
:
billDetails
)
{
ReportCellDataSourceDto
dto
=
new
ReportCellDataSourceDto
();
dto
.
setAmount
(
billDetail
.
getBillAmount
());
dto
.
setPeriod
(
formulaContext
.
getPeriod
());
dto
.
setIsOnlyManualInput
(
Boolean
.
FALSE
);
dto
.
setName
(
Constant
.
DataSourceName
.
ReportDataSource
);
dto
.
setType
(
FormulaDataSourceType
.
Report
.
getCode
());
contain
.
add
(
dto
);
OutputInvoiceDataSourceDto
outputInvoiceDataSourceDto
=
new
OutputInvoiceDataSourceDto
();
outputInvoiceDataSourceDto
.
setAmount
(
FormulaHelper
.
roundValue
(
billDetail
.
getBillAmount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
outputInvoiceDataSourceDto
.
setResultType
(
KeyValueConfigResultType
.
Accounting
.
getCode
());
outputInvoiceDataSourceDto
.
setTaxAmount
(
FormulaHelper
.
roundValue
(
billDetail
.
getTaxAmount
(),
KeyValueConfigResultType
.
Accounting
,
null
,
formulaContext
));
outputInvoiceDataSourceDto
.
setTaxRate
(
billDetail
.
getTaxRate
());
outputInvoiceDataSourceDto
.
setBuyerName
(
billDetail
.
getCustomer
());
outputInvoiceDataSourceDto
.
setInvoiceCode
(
billDetail
.
getBillCode
());
outputInvoiceDataSourceDto
.
setInvoiceNumber
(
billDetail
.
getBillNo
());
outputInvoiceDataSourceDto
.
setInvoiceDate
(
DateUtils
.
strToDate
(
billDetail
.
getBillDate
()));
outputInvoiceDataSourceDto
.
setInvoiceType
(
billType
);
outputInvoiceDataSourceDto
.
setPeriod
(
formulaContext
.
getPeriod
());
outputInvoiceDataSourceDto
.
setName
(
Constant
.
DataSourceName
.
OutputInvoiceDataSource
);
outputInvoiceDataSourceDto
.
setOperationType
(
EnumOperationType
.
Single
.
getCode
());
contain
.
add
(
outputInvoiceDataSourceDto
);
}
return
billDetails
.
stream
().
mapToDouble
(
a
->
a
.
getBillAmount
().
doubleValue
()).
sum
();
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/WPNAME.java
View file @
90650fb9
...
...
@@ -9,8 +9,9 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
pwc.taxtech.atms.common.util.MyAsserts
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceDetailType
;
import
pwc.taxtech.atms.constant.enums.FormulaDataSourceType
;
import
pwc.taxtech.atms.dpo.CellTemplatePerGroupDto
;
import
pwc.taxtech.atms.dto.vatdto.
Report
CellDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.
Tax
CellDataSourceDto
;
import
pwc.taxtech.atms.dto.vatdto.WPNAMEParasBo
;
import
pwc.taxtech.atms.exception.Exceptions
;
import
pwc.taxtech.atms.exception.FormulaException
;
...
...
@@ -47,7 +48,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
}
public
BigDecimal
bb
(
WPNAMEParasBo
bo
,
OperationEvaluationContext
ec
,
List
<
Object
>
dataSource
)
throws
Exception
{
ReportCellDataSourceDto
nullCellDto
=
new
Report
CellDataSourceDto
();
TaxCellDataSourceDto
nullCellDto
=
new
Tax
CellDataSourceDto
();
dataSource
.
add
(
nullCellDto
);
BigDecimal
cellValue
=
BigDecimal
.
ZERO
;
CellTemplatePerGroupDto
cellTemplateData
=
null
;
...
...
@@ -69,7 +70,7 @@ public class WPNAME extends FunctionBase implements FreeRefFunction {
throw
e
;
}
finally
{
LOGGER
.
warn
(
"[BB_Exception] error for bb cacls for {}"
,
bo
.
toString
());
Long
dataSourceId
=
saveDataSource
(
ec
,
dataSource
,
FormulaDataSource
DetailType
.
Report
CellDataSourceDto
,
Long
dataSourceId
=
saveDataSource
(
ec
,
dataSource
,
FormulaDataSource
Type
.
Other
,
FormulaDataSourceDetailType
.
Tax
CellDataSourceDto
,
cellValue
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
cellTemplateData
.
getColumnIndex
(),
cellTemplateData
.
getRowIndex
(),
formulaContext
.
getProjectId
());
...
...
atms-web/src/main/webapp/app/common/controls/tax-report-cell-detail-modal/tax-report-cell-detail-modal.ctrl.js
View file @
90650fb9
...
...
@@ -643,11 +643,24 @@
||
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
OutputInvoice
||
$scope
.
selectedTabIndex
===
enums
.
formulaDataSourceType
.
InvoiceFilter
)
{
evalVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
if
(
x
.
money
){
return
memo
+
x
.
money
;
}
else
if
(
x
.
amount
){
return
memo
+
x
.
amount
;
}
else
{
return
memo
;
}
},
0
);
evalTaxVal
=
_
.
reduce
(
$scope
.
detail
.
dataGridSource
,
function
(
memo
,
x
)
{
if
(
x
.
taxMoney
){
return
memo
+
x
.
taxMoney
;
}
else
if
(
x
.
taxAmount
){
return
memo
+
x
.
taxAmount
;
}
else
{
return
memo
;
}
},
0
);
$
(
"#dataGridFooterSummary"
).
html
(
$translate
.
instant
(
'Conclusion'
)
+
' '
+
$translate
.
instant
(
'Amount'
)
+
': '
...
...
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.ctrl.js
View file @
90650fb9
This diff is collapsed.
Click to expand it.
atms-web/src/main/webapp/app/taxDocumentManage/tax-document-list/tax-document-list.html
View file @
90650fb9
...
...
@@ -230,7 +230,7 @@
/*left: 0;*/
/*top: 0;*/
float
:
left
;
min-width
:
100px
;
/*min-width: 100px;*/
/*max-width: 100px;*/
width
:
10%
;
}
...
...
@@ -339,6 +339,10 @@
color
:
#fff
;
}
div
.showSweetAlert
{
box-shadow
:
0
0
12px
#9e9e9e
;
animation
:
showSweetAlert
0.3s
;
}
</style>
<div
class=
"menu-header TDL-header"
>
<div
class=
"TDL-query-bar"
ng-init=
"MoreFields = false"
>
...
...
@@ -853,7 +857,7 @@
aria-labelledby=
"myModalLabel"
data-backdrop=
"static"
data-keyboard=
"false"
>
<div
class=
"modal-dialog"
style=
"width:80%;height:200px;max-width:1028px"
role=
"document"
>
<div
class=
"modal-content"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
ng-submit=
"multiUploadSubmit()"
>
<form
class=
"form-horizontal"
name=
"newDocFileTypeForm"
>
<div
class=
"modal-header"
>
<div
class=
"modal-title"
><span>
{{'MultiUpload'|translate}}
</span></div>
<input
id=
"multiUploadFilePlugin"
type=
"file"
multiple
style=
"display:none"
nv-file-select
...
...
@@ -1025,14 +1029,18 @@
</label>
<div
class=
"col-sm-11"
style=
"width:61.67%"
>
<input
class=
"form-control"
placeholder=
"{{'
EntityStorageDescription
'|translate}}"
placeholder=
"{{'
PleaseSelected
'|translate}}"
ng-model=
"editFieldItem.storageArea"
ng-required=
"isRequired('EntityStorageLocation')"
/>
</div>
<div
class=
"DTL-special-external-btn"
title=
"{{'EntityStorageDescription'|translate}}"
>
<i
class=
"fa fake-exclamatory-circle"
></i>
<!--<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"
>
...
...
@@ -1082,7 +1090,7 @@
<div
style=
"clear:both"
></div>
</div>
<div
class=
"modal-footer"
>
<button
type=
"
submit"
class=
"btn btn-primary"
translate=
"Confirm
"
></button>
<button
type=
"
button"
class=
"btn btn-primary"
translate=
"Confirm"
ng-click=
"multiUploadSubmit()
"
></button>
<button
type=
"button"
class=
"btn btn-third"
data-dismiss=
"modal"
ng-click=
"cancelDocFileType()"
translate=
"Cancel"
></button>
</div>
...
...
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