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
c5dca341
Commit
c5dca341
authored
Apr 02, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT导入及预览优化、RSUMIF增加多条件查询
parent
cf9f55a4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
293 additions
and
150 deletions
+293
-150
DateUtils.java
...src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
+11
-0
RSUMIFParasBo.java
.../main/java/pwc/taxtech/atms/dto/vatdto/RSUMIFParasBo.java
+1
-1
CitCommonUtil.java
...ain/java/pwc/taxtech/atms/service/impl/CitCommonUtil.java
+4
-1
CitDataPreviewServiceImpl.java
.../taxtech/atms/service/impl/CitDataPreviewServiceImpl.java
+14
-1
CitImportExcelServiceImpl.java
.../taxtech/atms/service/impl/CitImportExcelServiceImpl.java
+0
-0
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+17
-6
DataImportService.java
...java/pwc/taxtech/atms/service/impl/DataImportService.java
+12
-3
FormulaAgent.java
.../java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
+48
-21
ReportGeneratorImpl.java
...wc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
+16
-6
RSUMIF.java
...axtech/atms/vat/service/impl/report/functions/RSUMIF.java
+26
-11
CitDraftAccountMapping.java
.../java/pwc/taxtech/atms/entity/CitDraftAccountMapping.java
+0
-0
CitDraftAccountMappingExample.java
...wc/taxtech/atms/entity/CitDraftAccountMappingExample.java
+0
-0
CitSalaryAdvance.java
...c/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
+4
-4
CitSalaryAdvanceExample.java
...java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
+10
-20
CitDraftAccountMappingMapper.xml
...ces/pwc/taxtech/atms/dao/CitDraftAccountMappingMapper.xml
+0
-0
CitSalaryAdvanceMapper.xml
...resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
+7
-7
CitDraftAccountMappingExtendsMapper.xml
.../atms/dao/extends/CitDraftAccountMappingExtendsMapper.xml
+33
-1
CitSalaryAdvanceExtendsMapper.xml
...axtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
+2
-2
CitTrialBalanceExtendsMapper.xml
...taxtech/atms/dao/extends/CitTrialBalanceExtendsMapper.xml
+9
-0
cit.json
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
+3
-1
cit.json
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
+2
-1
cit-preview-journal-merge-search.html
...eview-journal-merge/cit-preview-journal-merge-search.html
+1
-1
cit-preview-journal-merge.ctrl.js
...t-preview-journal-merge/cit-preview-journal-merge.ctrl.js
+15
-15
cit-preview-tb-generate-ver-search.html
...w-tb-generate-ver/cit-preview-tb-generate-ver-search.html
+2
-2
cit-preview-tb-generate-ver.ctrl.js
...eview-tb-generate-ver/cit-preview-tb-generate-ver.ctrl.js
+9
-9
cit-preview-tb-mapping-ver.ctrl.js
...preview-tb-mapping-ver/cit-preview-tb-mapping-ver.ctrl.js
+13
-13
cit-report-sheet.js
...ebapp/app/cit/report/cit-report-sheet/cit-report-sheet.js
+8
-2
import-cit-bs-prc-adjust.ctrl.js
...import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
+2
-2
import-cit-draft-account-mapping.ctrl.js
...-account-mapping/import-cit-draft-account-mapping.ctrl.js
+4
-3
import-cit-eam-assets-disposal.ctrl.js
...am-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
+4
-3
import-cit-journal-adjust.ctrl.js
...port-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
+2
-2
import-cit-profit-prc-adjust.ctrl.js
...it-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
+2
-2
import-cit-salary-advance.ctrl.js
...port-cit-salary-advance/import-cit-salary-advance.ctrl.js
+10
-8
import-cit-trial-balance.ctrl.js
...import-cit-trial-balance/import-cit-trial-balance.ctrl.js
+2
-2
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/util/DateUtils.java
View file @
c5dca341
...
...
@@ -151,6 +151,17 @@ public class DateUtils {
return
period
;
}
/**
* 将yyyy- 等字符串转换为区间格式 yyyyMM
* @param dateStr
* @return
*/
public
static
Integer
strToPeriodYM
(
String
dateStr
)
{
dateStr
=
dateStr
.
replace
(
"-"
,
""
);
Integer
period
=
Integer
.
valueOf
(
dateStr
);
return
period
;
}
/**
* 将yyyymm 字符串转换为区间格式 yyyyMM
...
...
atms-api/src/main/java/pwc/taxtech/atms/dto/vatdto/RSUMIFParasBo.java
View file @
c5dca341
...
...
@@ -45,7 +45,7 @@ public class RSUMIFParasBo {
StringBuilder
expression
=
new
StringBuilder
(
""
);
begin
(
expression
);
for
(
int
i
=
0
;
i
<
args
.
length
;
i
++)
{
if
(
i
>=
4
)
{
if
(
i
>=
args
.
length
-
2
)
{
concatPara
(
expression
,
resolverInteger
(
args
,
ec
,
i
));
}
else
{
concatPara
(
expression
,
resolverString
(
args
,
ec
,
i
));
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitCommonUtil.java
View file @
c5dca341
...
...
@@ -39,7 +39,7 @@ public class CitCommonUtil {
Object
obj
=
null
;
//判断单元格是否为null,若为null则直接返回,以防在获取枚举类型时报空指针异常
if
(
cell
==
null
){
return
obj
;
return
""
;
}
switch
(
cell
.
getCellTypeEnum
())
{
case
BOOLEAN:
...
...
@@ -63,6 +63,9 @@ public class CitCommonUtil {
default
:
break
;
}
if
(
obj
==
null
){
return
""
;
}
return
obj
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitDataPreviewServiceImpl.java
View file @
c5dca341
...
...
@@ -165,6 +165,13 @@ public class CitDataPreviewServiceImpl extends BaseService {
CitTrialBalanceExample
citTbExample
=
new
CitTrialBalanceExample
();
CitTrialBalanceExample
.
Criteria
citTbExampleCriteria
=
citTbExample
.
createCriteria
();
citTbExampleCriteria
.
andProjectIdEqualTo
(
citTrialBalanceDto
.
getProjectId
());
if
(
citTrialBalanceDto
.
getAccountCode
()
!=
null
&&
!
""
.
equals
(
citTrialBalanceDto
.
getAccountCode
())){
citTbExampleCriteria
.
andAccountCodeEqualTo
(
citTrialBalanceDto
.
getAccountCode
());
}
if
(
citTrialBalanceDto
.
getAccountDescription
()
!=
null
&&
!
""
.
equals
(
citTrialBalanceDto
.
getAccountDescription
())){
citTbExampleCriteria
.
andAccountDescriptionEqualTo
(
citTrialBalanceDto
.
getAccountDescription
());
}
List
<
CitTrialBalance
>
citTbList
=
citTbMapper
.
selectByExample
(
citTbExample
);
List
<
CitTrialBalanceDto
>
citTbDtos
=
Lists
.
newArrayList
();
citTbList
.
forEach
(
tb
->
{
...
...
@@ -216,7 +223,13 @@ public class CitDataPreviewServiceImpl extends BaseService {
public
int
exportTbGeneVerData2
(
CitTrialBalanceDto
citTrialBalanceDto
,
HttpServletResponse
response
){
CitTrialBalanceExample
citTbExample
=
new
CitTrialBalanceExample
();
CitTrialBalanceExample
.
Criteria
citTbExampleCriteria
=
citTbExample
.
createCriteria
();
// citTbExampleCriteria.andProjectIdEqualTo(citTrialBalanceDto.getProjectId());
citTbExampleCriteria
.
andProjectIdEqualTo
(
citTrialBalanceDto
.
getProjectId
());
if
(
citTrialBalanceDto
.
getAccountCode
()
!=
null
&&
!
""
.
equals
(
citTrialBalanceDto
.
getAccountCode
())){
citTbExampleCriteria
.
andAccountCodeEqualTo
(
citTrialBalanceDto
.
getAccountCode
());
}
if
(
citTrialBalanceDto
.
getAccountDescription
()
!=
null
&&
!
""
.
equals
(
citTrialBalanceDto
.
getAccountDescription
())){
citTbExampleCriteria
.
andAccountDescriptionEqualTo
(
citTrialBalanceDto
.
getAccountDescription
());
}
List
<
CitTrialBalance
>
citTbList
=
citTbMapper
.
selectByExample
(
citTbExample
);
if
(
citTbList
.
size
()==
0
){
return
0
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitImportExcelServiceImpl.java
View file @
c5dca341
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
c5dca341
...
...
@@ -55,14 +55,17 @@ import java.util.stream.Collectors;
import
static
pwc
.
taxtech
.
atms
.
dto
.
vatdto
.
WrapPeriodJobDto
.*;
/**
* CIT报表生成service
* @author zhikai.z.wei
*/
@Component
public
class
CitReportServiceImpl
extends
BaseService
{
private
final
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CitReportServiceImpl
.
class
);
//报表公式
private
final
static
String
[]
functions
=
{
"SGSR"
,
"FSJZ"
,
"ND"
,
"BB"
,
"XXFP"
,
"GZSD"
,
"PC"
,
"JXFPMX"
,
"JXFP"
,
"PSUM"
,
"DFFS"
,
"JFFS"
,
"WPSR"
,
"WPNAME"
,
"WPTYPE"
,
"SUM2"
,
"RSUMIF"
,
"QMYE"
,
"ZC"
};
//生成总分机构分配表时取营业收入时所要用的条件
private
final
static
String
[]
attributeArr
=
{
"主营业务收入-销售商品收入"
,
"主营业务收入-提供劳务收入"
,
"其他业务收入-其他"
};
@Autowired
...
...
@@ -134,7 +137,13 @@ public class CitReportServiceImpl extends BaseService {
@Autowired
private
CitAssetEamMappingMapper
citAssetEamMappingMapper
;
/**
* 获取当前卡片所对应的所有报表
* @param projectId
* @param serviceType
* @param period
* @return
*/
public
OperationResultDto
<
List
<
ReportDto
>>
getReportTemplate
(
String
projectId
,
EnumServiceType
serviceType
,
Integer
period
)
{
OperationResultDto
<
List
<
ReportDto
>>
operationResult
=
new
OperationResultDto
<>();
try
{
...
...
@@ -204,6 +213,7 @@ public class CitReportServiceImpl extends BaseService {
@Override
public
void
run
()
{
try
{
//清除之前生成的内容并复制报表模板相关内容(各个报表的单元格内容等)
updateConfig
(
projectId
,
periodParam
,
isMergeManualData
,
templates
,
genJob
);
// TODO 进行数据校验
...
...
@@ -211,12 +221,12 @@ public class CitReportServiceImpl extends BaseService {
PeriodResources
resources
=
reportGenerator
.
getPeriodResources
(
projectId
,
periodParam
,
templates
.
stream
().
map
(
Template:
:
getId
).
collect
(
Collectors
.
toList
()));
//把所有的报表弄到一个Excel里面
Workbook
workbook
=
reportGenerator
.
createWorkBookByPeriodTemplate
(
resources
.
getPeriodTemplates
(),
genJob
);
reportGenerator
.
addCitFunctionsAndContext
(
workbook
,
functions
,
reportGenerator
.
initContext
(
resources
,
periodParam
));
//注册公式到POI
reportGenerator
.
addCitFunctionsAndContext
(
workbook
,
functions
,
reportGenerator
.
initContext
(
resources
,
periodParam
)
,
false
);
reportGenerator
.
setConfigAndDataToWorkBook
(
workbook
,
resources
);
//运行公式
FormulaEvaluator
evaluator
=
workbook
.
getCreationHelper
().
createFormulaEvaluator
();
evaluator
.
evaluateAll
();
...
...
@@ -261,7 +271,8 @@ public class CitReportServiceImpl extends BaseService {
periodCellTemplateConfigDtos
.
forEach
(
a
->
{
workbook4Validate
.
getSheetAt
(
a
.
getSheetNumber
()
-
1
).
getRow
(
a
.
getRowNumber
()).
getCell
(
a
.
getColNumber
()).
setCellFormula
(
a
.
getParsedValidation
());
});
reportGenerator
.
addFunctionsAndContext
(
workbook4Validate
,
functions
,
reportGenerator
.
initContext
(
resources
,
periodParam
),
true
);
//CIT与VAT所用公式不同,所以拷贝出来一个方法,若有改动请用该方法
reportGenerator
.
addCitFunctionsAndContext
(
workbook4Validate
,
functions
,
reportGenerator
.
initContext
(
resources
,
periodParam
),
true
);
FormulaEvaluator
validateEvaluator
=
workbook4Validate
.
getCreationHelper
().
createFormulaEvaluator
();
validateEvaluator
.
evaluateAll
();
//todo: 4.then save the validation result to cellData table
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/DataImportService.java
View file @
c5dca341
...
...
@@ -1603,9 +1603,18 @@ public class DataImportService extends BaseService {
continue
;
}
at
.
setId
(
plId
);
String
periodStr
=
getCellStringValue
(
row
.
getCell
(
0
));
Integer
period
=
Integer
.
valueOf
(
periodStr
.
substring
(
0
,
4
)+
periodStr
.
substring
(
5
,
7
));
at
.
setPeriod
(
period
);
//第一版方法,因未能识别单元格格式问题,做出改进,只针对该单元格
// String periodStr = getCellStringValue(row.getCell(0));
// Integer period = Integer.valueOf(periodStr.substring(0,4)+periodStr.substring(5,7));
// at.setPeriod(period);
Object
value
=
CitCommonUtil
.
getValue
(
row
.
getCell
(
0
));
if
(!
""
.
equals
(
value
)){
String
periodStr
=
value
.
toString
();
Integer
period
=
Integer
.
valueOf
(
periodStr
.
substring
(
0
,
4
)+
periodStr
.
substring
(
5
,
7
));
at
.
setPeriod
(
period
);
}
at
.
setSegment1
(
getCellStringValue
(
row
.
getCell
(
1
)));
at
.
setSegment2
(
getCellStringValue
(
row
.
getCell
(
2
)));
at
.
setSegment3
(
getCellStringValue
(
row
.
getCell
(
3
)));
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/FormulaAgent.java
View file @
c5dca341
...
...
@@ -152,7 +152,7 @@ public class FormulaAgent {
}
public
static
String
buildSql
(
String
tableName
,
String
getField
,
String
filter
,
String
filterValue
,
Integer
period
,
Integer
year
,
FormulaContext
formulaContext
)
{
public
static
String
buildSql
(
String
tableName
,
String
getField
,
String
[]
filters
,
String
[]
filterValues
,
Integer
period
,
Integer
year
,
FormulaContext
formulaContext
)
{
/*
if (split[0].indexOf(">=") != -1) {
...
...
@@ -166,13 +166,13 @@ public class FormulaAgent {
if
(
tableName
.
substring
(
0
,
3
).
equals
(
"cit"
))
{
try
{
return
_buildSql
(
getField
,
tableName
,
filter
,
filterValue
,
period
,
formulaContext
,
year
,
true
,
false
);
return
_buildSql
(
getField
,
tableName
,
filter
s
,
filterValues
,
period
,
formulaContext
,
year
,
true
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
try
{
return
_buildSql
(
getField
,
tableName
,
filter
,
filterValue
,
period
,
formulaContext
,
year
,
false
,
false
);
return
_buildSql
(
getField
,
tableName
,
filter
s
,
filterValues
,
period
,
formulaContext
,
year
,
false
,
false
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
...
...
@@ -180,38 +180,63 @@ public class FormulaAgent {
}
public
static
String
_buildSql
(
String
getField
,
String
tableName
,
String
filter
,
String
filterValue
,
Integer
period
,
FormulaContext
formulaContext
,
Integer
year
,
boolean
bool
,
boolean
getSql
)
throws
Exception
{
String
sql
=
""
;
public
static
String
_buildSql
(
String
getField
,
String
tableName
,
String
[]
filters
,
String
[]
filterValues
,
Integer
period
,
FormulaContext
formulaContext
,
Integer
year
,
boolean
bool
,
boolean
getSql
)
throws
Exception
{
String
Builder
sql
=
new
StringBuilder
()
;
//统一判断年度
year
=
formulaContext
.
getYear
()
+
year
;
if
(
getSql
)
{
tableName
=
tableName
.
toLowerCase
();
sql
=
"select * from "
+
tableName
+
" where 1=1 and "
+
filter
+
filterValue
;
return
sql
+
" and project_id = '"
+
formulaContext
.
getProjectId
()
+
"'"
;
sql
.
append
(
"select * from "
).
append
(
tableName
).
append
(
" where 1=1 and "
);
for
(
int
i
=
0
;
i
<
filters
.
length
;
i
++){
sql
.
append
(
filters
[
i
]);
sql
.
append
(
filterValues
[
i
]);
if
(
i
<
filters
.
length
-
1
){
sql
.
append
(
" and "
);
}
}
//注意:如果此处不是return,请另新建一个变量再返回,因StringBuilder操作的是同一个对象
sql
.
append
(
" and project_id = '"
).
append
(
formulaContext
.
getProjectId
()).
append
(
"'"
);
return
sql
.
toString
();
}
else
{
sql
=
"select sum("
+
getField
+
") as "
+
getField
+
" from "
+
tableName
+
" where 1=1 and "
+
filter
+
filterValue
;
sql
.
append
(
"select sum("
+
getField
+
") as "
).
append
(
getField
).
append
(
" from "
).
append
(
tableName
).
append
(
" where 1=1 and "
);
for
(
int
i
=
0
;
i
<
filters
.
length
;
i
++){
sql
.
append
(
filters
[
i
]);
sql
.
append
(
filterValues
[
i
]);
if
(
i
<
filters
.
length
-
1
){
sql
.
append
(
" and "
);
}
}
// sql = "select sum(" + getField + ") as " + getField + " from " + tableName + " where 1=1 and " + filter + filterValue;
}
String
_p
=
insertZero
(
formulaContext
.
getPeriod
()
-
Math
.
abs
(
period
));
String
_period
=
insertZero
(
formulaContext
.
getPeriod
());
String
per
=
insertZero
((
formulaContext
.
getPeriod
()
-
1
));
if
(!
bool
)
{
if
(
period
==
0
)
{
sql
+=
" and tms_period = "
+
Integer
.
parseInt
(
year
+
_period
);
sql
.
append
(
" and tms_period = "
).
append
(
Integer
.
parseInt
(
year
+
_period
));
// sql += " and tms_period = " + Integer.parseInt(year + _period);
}
else
if
(
period
==
-
99
)
{
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
sql
.
append
(
" and tms_period between "
).
append
(
Integer
.
parseInt
(
year
+
"01"
)).
append
(
" and "
).
append
(
Integer
.
parseInt
(
year
+
per
));
//
sql += " and tms_period between " + Integer.parseInt(year + "01") + " and " + Integer.parseInt(year + per);
}
else
if
(
period
==
99
)
{
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
"01"
)
+
" and "
+
Integer
.
parseInt
(
year
+
_period
);
sql
.
append
(
" and tms_period between "
).
append
(
Integer
.
parseInt
(
year
+
"01"
)).
append
(
" and "
).
append
(
Integer
.
parseInt
(
year
+
_period
));
// sql += " and tms_period between " + Integer.parseInt(year + "01") + " and " + Integer.parseInt(year + _period);
}
else
{
if
(
period
>
0
)
if
(
period
>
0
)
{
throw
new
Exception
(
"参数不正确"
);
sql
+=
" and tms_period between "
+
Integer
.
parseInt
(
year
+
_p
)
+
" and "
+
Integer
.
parseInt
(
year
+
per
);
}
sql
.
append
(
" and tms_period between "
).
append
(
Integer
.
parseInt
(
year
+
_p
)).
append
(
" and "
).
append
(
Integer
.
parseInt
(
year
+
per
));
// sql += " and tms_period between " + Integer.parseInt(year + _p) + " and " + Integer.parseInt(year + per);
}
}
if
(
bool
)
sql
+=
" and period = "
+
year
;
sql
+=
" and project_id = '"
+
formulaContext
.
getProjectId
()
+
"'"
;
return
sql
;
if
(
bool
){
sql
.
append
(
" and period = "
).
append
(
year
);
// sql += " and period = " + year;
}
sql
.
append
(
" and project_id = '"
).
append
(
formulaContext
.
getProjectId
()).
append
(
"'"
);
// sql += " and project_id = '" + formulaContext.getProjectId() + "'";
return
sql
.
toString
();
}
public
static
String
insertZero
(
Integer
itr
)
{
...
...
@@ -232,14 +257,16 @@ public class FormulaAgent {
FormulaAgent
formulaAgent
=
new
FormulaAgent
();
FormulaContext
formulaContext
=
new
FormulaContext
();
formulaContext
.
setPeriod
(
3
);
formulaAgent
.
getTableDataByName
(
"CIT_TBAM"
,
"ending_balance"
,
"attribute"
,
"= '销售费用-财产损耗、盘亏及毁损损失'"
,
0
,
0
,
null
);
String
[]
filtes
=
new
String
[]{
"attribute"
};
String
[]
filteValues
=
new
String
[]{
"= '销售费用-财产损耗、盘亏及毁损损失'"
};
formulaAgent
.
getTableDataByName
(
"CIT_TBAM"
,
"ending_balance"
,
filtes
,
filteValues
,
0
,
0
,
null
);
}
public
BigDecimal
getTableDataByName
(
String
tableName
,
String
getField
,
String
filter
,
String
filterValue
,
Integer
period
,
Integer
year
,
FormulaContext
formulaContext
)
{
public
BigDecimal
getTableDataByName
(
String
tableName
,
String
getField
,
String
[]
filters
,
String
[]
filterValues
,
Integer
period
,
Integer
year
,
FormulaContext
formulaContext
)
{
Map
<
String
,
Object
>
stringObjectMap
=
new
HashMap
<>();
try
{
stringObjectMap
=
jdbcTemplate
.
queryForMap
(
buildSql
(
TableRule
.
map
.
get
(
tableName
),
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
));
stringObjectMap
=
jdbcTemplate
.
queryForMap
(
buildSql
(
TableRule
.
map
.
get
(
tableName
),
getField
,
filter
s
,
filterValues
,
period
,
year
,
formulaContext
));
if
(
stringObjectMap
.
get
(
getField
)
!=
null
)
{
return
new
BigDecimal
(
stringObjectMap
.
get
(
getField
).
toString
());
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/ReportGeneratorImpl.java
View file @
c5dca341
...
...
@@ -617,13 +617,23 @@ public class ReportGeneratorImpl {
*
* @param workbook 工作簿
*/
public
void
addCitFunctionsAndContext
(
Workbook
workbook
,
String
[]
functions
,
FormulaContext
formulaContext
)
{
public
void
addCitFunctionsAndContext
(
Workbook
workbook
,
String
[]
functions
,
FormulaContext
formulaContext
,
Boolean
isValidate
)
{
//**************************** 为CIT复制的一份注册自定义公式 ****************************
FreeRefFunction
[]
functionImpls
=
{
new
SGSR
(
formulaContext
),
new
FSJZ
(
formulaContext
),
new
ND
(
formulaContext
),
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
PC
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
),
new
WPNAME
(
formulaContext
),
new
WPTYPE
(
formulaContext
),
new
SUM2
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
QMYE
(
formulaContext
),
new
ZC
(
formulaContext
)};
//为CIT复制的一份注册自定义公式
FreeRefFunction
[]
functionImpls
;
if
(!
isValidate
)
{
functionImpls
=
new
FreeRefFunction
[]{
new
SGSR
(
formulaContext
),
new
FSJZ
(
formulaContext
),
new
ND
(
formulaContext
),
new
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
PC
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
),
new
WPNAME
(
formulaContext
),
new
WPTYPE
(
formulaContext
),
new
SUM2
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
QMYE
(
formulaContext
),
new
ZC
(
formulaContext
)};
//为CIT复制的一份注册自定义公式
}
else
{
functionImpls
=
new
FreeRefFunction
[]{
new
SGSR
(
formulaContext
),
new
FSJZ
(
formulaContext
),
new
ND
(
formulaContext
),
new
pwc
.
taxtech
.
atms
.
vat
.
service
.
impl
.
report
.
functions
.
validation
.
BB
(
formulaContext
),
new
XXFP
(
formulaContext
),
new
GZSD
(
formulaContext
),
new
PC
(
formulaContext
)
,
new
JXFPMX
(
formulaContext
),
new
JXFP
(
formulaContext
),
new
PSUM
(
formulaContext
),
new
DFFS
(
formulaContext
),
new
JFFS
(
formulaContext
),
new
WPSR
(
formulaContext
),
new
WPNAME
(
formulaContext
),
new
WPTYPE
(
formulaContext
),
new
SUM2
(
formulaContext
),
new
RSUMIF
(
formulaContext
),
new
QMYE
(
formulaContext
),
new
ZC
(
formulaContext
)};
//为CIT复制的一份注册自定义公式
}
//**************************** 为CIT复制的一份注册自定义公式 ****************************
UDFFinder
udfs
=
new
DefaultUDFFinder
(
functions
,
functionImpls
);
UDFFinder
udfToolpack
=
new
AggregatingUDFFinder
(
udfs
);
...
...
atms-api/src/main/java/pwc/taxtech/atms/vat/service/impl/report/functions/RSUMIF.java
View file @
c5dca341
...
...
@@ -41,21 +41,21 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
//进行参数验证
public
void
parameterCheck
(
ValueEval
[]
args
,
OperationEvaluationContext
ec
)
{
argsLength
=
args
.
length
;
if
(
argsLength
!=
6
)
//参数小于6
当做异常处理, 最后俩参数可以取默认值
if
(
args
.
length
<
6
&&
(
args
.
length
&
1
)
==
1
)
{
//参数小于6且如果是奇数的话
当做异常处理, 最后俩参数可以取默认值
throw
Exceptions
.
parameterError
;
}
try
{
tableName
=
resolverString
(
args
,
ec
,
0
);
if
(!
_map
.
containsKey
(
tableName
))
if
(!
_map
.
containsKey
(
tableName
))
{
throw
Exceptions
.
parameterError
;
}
}
catch
(
EvaluationException
e
)
{
e
.
printStackTrace
();
}
}
Integer
argsLength
;
String
getField
;
Integer
period
;
Integer
year
;
...
...
@@ -66,6 +66,9 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
BigDecimal
cellValue
=
BigDecimal
.
ZERO
;
String
filter
=
null
;
String
filterValue
=
null
;
//减4的原因是去掉前面两个参数和后面两个参数,剩下的参数才是条件列与条件值的总和,再除以2就是条件列的的数量
String
[]
filters
=
new
String
[(
args
.
length
-
4
)/
2
];
String
[]
filterValues
=
new
String
[(
args
.
length
-
4
)/
2
];
try
{
parameterCheck
(
args
,
ec
);
Map
map
=
new
HashMap
<
String
,
String
>();
...
...
@@ -75,11 +78,18 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
dataSource
.
add
(
reportCellTableSUMIFDataSourceDto
);
tableName
=
resolverString
(
args
,
ec
,
0
);
getField
=
resolverString
(
args
,
ec
,
1
);
filter
=
resolverString
(
args
,
ec
,
2
);
filterValue
=
resolverString
(
args
,
ec
,
3
);
year
=
resolverInteger
(
args
,
ec
,
4
);
//会计年度
period
=
Integer
.
parseInt
(
resolverString
(
args
,
ec
,
5
));
//会计期间
cellValue
=
agent
.
getTableDataByName
(
tableName
,
getField
,
filter
,
filterValue
,
period
,
year
,
formulaContext
);
//获取条件列及条件值
for
(
int
i
=
2
;
i
<
args
.
length
-
2
;
i
++)
{
filters
[(
i
-
2
)/
2
]
=
resolverString
(
args
,
ec
,
i
);
filterValues
[(
i
-
2
)/
2
]
=
resolverString
(
args
,
ec
,
++
i
);
}
resolverFilterAndValues
(
args
);
// filter = resolverString(args, ec, 2);
//// filterValue = resolverString(args, ec, 3);
year
=
resolverInteger
(
args
,
ec
,
args
.
length
-
2
);
//会计年度
period
=
Integer
.
parseInt
(
resolverString
(
args
,
ec
,
args
.
length
-
1
));
//会计期间
cellValue
=
agent
.
getTableDataByName
(
tableName
,
getField
,
filters
,
filterValues
,
period
,
year
,
formulaContext
);
return
new
NumberEval
(
cellValue
.
doubleValue
());
}
catch
(
EvaluationException
e
)
{
e
.
printStackTrace
();
...
...
@@ -97,7 +107,7 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
dataSourceId
=
saveDataRSUMIFSource
(
ec
,
dataSource
,
FormulaDataSourceDetailType
.
ReportCellTableSUMIFDataSourceDto
,
cellValue
,
formulaContext
.
getPeriod
(),
formulaContext
.
getReportTemplateGroupId
(),
ec
.
getColumnIndex
(),
ec
.
getRowIndex
(),
formulaContext
.
getProjectId
(),
selectShow
(
tableName
),
FormulaAgent
.
_buildSql
(
getField
,
tableName
,
filter
,
filterValue
,
period
,
formulaContext
,
year
,
boo
,
true
));
formulaContext
.
getProjectId
(),
selectShow
(
tableName
),
FormulaAgent
.
_buildSql
(
getField
,
tableName
,
filter
s
,
filterValues
,
period
,
formulaContext
,
year
,
boo
,
true
));
saveFormulaBlock
(
formulaContext
.
getPeriod
(),
ec
,
new
RSUMIFParasBo
().
getExpression
(
args
,
ec
),
cellValue
,
dataSourceId
,
formulaContext
.
getProjectId
());
}
catch
(
Exception
e
)
{
...
...
@@ -119,4 +129,9 @@ public class RSUMIF extends FunctionBase implements FreeRefFunction {
return
""
;
}
public
void
resolverFilterAndValues
(
ValueEval
[]
args
)
{
}
}
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitDraftAccountMapping.java
View file @
c5dca341
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitDraftAccountMappingExample.java
View file @
c5dca341
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvance.java
View file @
c5dca341
...
...
@@ -98,7 +98,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
private
String
poCreateTime
;
private
Date
poCreateTime
;
/**
* Database Column Remarks:
...
...
@@ -647,7 +647,7 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
String
getPoCreateTime
()
{
public
Date
getPoCreateTime
()
{
return
poCreateTime
;
}
...
...
@@ -659,8 +659,8 @@ public class CitSalaryAdvance extends BaseEntity implements Serializable {
*
* @mbg.generated
*/
public
void
setPoCreateTime
(
String
poCreateTime
)
{
this
.
poCreateTime
=
poCreateTime
==
null
?
null
:
poCreateTime
.
trim
()
;
public
void
setPoCreateTime
(
Date
poCreateTime
)
{
this
.
poCreateTime
=
poCreateTime
;
}
/**
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitSalaryAdvanceExample.java
View file @
c5dca341
...
...
@@ -676,62 +676,52 @@ public class CitSalaryAdvanceExample {
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeEqualTo
(
String
value
)
{
public
Criteria
andPoCreateTimeEqualTo
(
Date
value
)
{
addCriterion
(
"po_create_time ="
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeNotEqualTo
(
String
value
)
{
public
Criteria
andPoCreateTimeNotEqualTo
(
Date
value
)
{
addCriterion
(
"po_create_time <>"
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeGreaterThan
(
String
value
)
{
public
Criteria
andPoCreateTimeGreaterThan
(
Date
value
)
{
addCriterion
(
"po_create_time >"
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeGreaterThanOrEqualTo
(
String
value
)
{
public
Criteria
andPoCreateTimeGreaterThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"po_create_time >="
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeLessThan
(
String
value
)
{
public
Criteria
andPoCreateTimeLessThan
(
Date
value
)
{
addCriterion
(
"po_create_time <"
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeLessThanOrEqualTo
(
String
value
)
{
public
Criteria
andPoCreateTimeLessThanOrEqualTo
(
Date
value
)
{
addCriterion
(
"po_create_time <="
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeLike
(
String
value
)
{
addCriterion
(
"po_create_time like"
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeNotLike
(
String
value
)
{
addCriterion
(
"po_create_time not like"
,
value
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeIn
(
List
<
String
>
values
)
{
public
Criteria
andPoCreateTimeIn
(
List
<
Date
>
values
)
{
addCriterion
(
"po_create_time in"
,
values
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeNotIn
(
List
<
String
>
values
)
{
public
Criteria
andPoCreateTimeNotIn
(
List
<
Date
>
values
)
{
addCriterion
(
"po_create_time not in"
,
values
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeBetween
(
String
value1
,
String
value2
)
{
public
Criteria
andPoCreateTimeBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"po_create_time between"
,
value1
,
value2
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPoCreateTimeNotBetween
(
String
value1
,
String
value2
)
{
public
Criteria
andPoCreateTimeNotBetween
(
Date
value1
,
Date
value2
)
{
addCriterion
(
"po_create_time not between"
,
value1
,
value2
,
"poCreateTime"
);
return
(
Criteria
)
this
;
}
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitDraftAccountMappingMapper.xml
View file @
c5dca341
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitSalaryAdvanceMapper.xml
View file @
c5dca341
...
...
@@ -13,7 +13,7 @@
<result
column=
"source"
jdbcType=
"VARCHAR"
property=
"source"
/>
<result
column=
"po_no"
jdbcType=
"VARCHAR"
property=
"poNo"
/>
<result
column=
"po_row"
jdbcType=
"VARCHAR"
property=
"poRow"
/>
<result
column=
"po_create_time"
jdbcType=
"
VARCHAR
"
property=
"poCreateTime"
/>
<result
column=
"po_create_time"
jdbcType=
"
TIMESTAMP
"
property=
"poCreateTime"
/>
<result
column=
"lading_bill_person"
jdbcType=
"VARCHAR"
property=
"ladingBillPerson"
/>
<result
column=
"purchase_person"
jdbcType=
"VARCHAR"
property=
"purchasePerson"
/>
<result
column=
"po_subject_code"
jdbcType=
"VARCHAR"
property=
"poSubjectCode"
/>
...
...
@@ -195,7 +195,7 @@
update_time)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{period,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{poNo,jdbcType=VARCHAR},
#{poRow,jdbcType=VARCHAR}, #{poCreateTime,jdbcType=
VARCHAR
}, #{ladingBillPerson,jdbcType=VARCHAR},
#{poRow,jdbcType=VARCHAR}, #{poCreateTime,jdbcType=
TIMESTAMP
}, #{ladingBillPerson,jdbcType=VARCHAR},
#{purchasePerson,jdbcType=VARCHAR}, #{poSubjectCode,jdbcType=VARCHAR}, #{poSubjectName,jdbcType=VARCHAR},
#{costCenterCode,jdbcType=VARCHAR}, #{costCenter,jdbcType=VARCHAR}, #{supplier,jdbcType=VARCHAR},
#{item,jdbcType=VARCHAR}, #{standardMoney,jdbcType=VARCHAR}, #{currency,jdbcType=VARCHAR},
...
...
@@ -363,7 +363,7 @@
#{poRow,jdbcType=VARCHAR},
</if>
<if
test=
"poCreateTime != null"
>
#{poCreateTime,jdbcType=
VARCHAR
},
#{poCreateTime,jdbcType=
TIMESTAMP
},
</if>
<if
test=
"ladingBillPerson != null"
>
#{ladingBillPerson,jdbcType=VARCHAR},
...
...
@@ -505,7 +505,7 @@
po_row = #{record.poRow,jdbcType=VARCHAR},
</if>
<if
test=
"record.poCreateTime != null"
>
po_create_time = #{record.poCreateTime,jdbcType=
VARCHAR
},
po_create_time = #{record.poCreateTime,jdbcType=
TIMESTAMP
},
</if>
<if
test=
"record.ladingBillPerson != null"
>
lading_bill_person = #{record.ladingBillPerson,jdbcType=VARCHAR},
...
...
@@ -624,7 +624,7 @@
source = #{record.source,jdbcType=VARCHAR},
po_no = #{record.poNo,jdbcType=VARCHAR},
po_row = #{record.poRow,jdbcType=VARCHAR},
po_create_time = #{record.poCreateTime,jdbcType=
VARCHAR
},
po_create_time = #{record.poCreateTime,jdbcType=
TIMESTAMP
},
lading_bill_person = #{record.ladingBillPerson,jdbcType=VARCHAR},
purchase_person = #{record.purchasePerson,jdbcType=VARCHAR},
po_subject_code = #{record.poSubjectCode,jdbcType=VARCHAR},
...
...
@@ -688,7 +688,7 @@
po_row = #{poRow,jdbcType=VARCHAR},
</if>
<if
test=
"poCreateTime != null"
>
po_create_time = #{poCreateTime,jdbcType=
VARCHAR
},
po_create_time = #{poCreateTime,jdbcType=
TIMESTAMP
},
</if>
<if
test=
"ladingBillPerson != null"
>
lading_bill_person = #{ladingBillPerson,jdbcType=VARCHAR},
...
...
@@ -804,7 +804,7 @@
source = #{source,jdbcType=VARCHAR},
po_no = #{poNo,jdbcType=VARCHAR},
po_row = #{poRow,jdbcType=VARCHAR},
po_create_time = #{poCreateTime,jdbcType=
VARCHAR
},
po_create_time = #{poCreateTime,jdbcType=
TIMESTAMP
},
lading_bill_person = #{ladingBillPerson,jdbcType=VARCHAR},
purchase_person = #{purchasePerson,jdbcType=VARCHAR},
po_subject_code = #{poSubjectCode,jdbcType=VARCHAR},
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitDraftAccountMappingExtendsMapper.xml
View file @
c5dca341
...
...
@@ -28,6 +28,26 @@
<when
test=
"item.source != null"
>
#{item.source,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.draftCode != null"
>
#{item.draftCode,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.draftName != null"
>
#{item.draftName,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.largeAttribute != null"
>
#{item.largeAttribute,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.attribute != null"
>
#{item.attribute,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.wpPosition != null"
>
#{item.wpPosition,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.acctCode != null"
>
#{item.acctCode,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
...
...
@@ -37,7 +57,19 @@
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.attribute != null"
>
#{item.attribute,jdbcType=VARCHAR},
</when>
<when
test=
"item.plRowSet != null"
>
#{item.plRowSet,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.bsRowSet != null"
>
#{item.bsRowSet,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.fetchNumber != null"
>
#{item.fetchNumber,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.remark != null"
>
#{item.remark,jdbcType=VARCHAR},
</when>
<otherwise>
'',
</otherwise>
</choose>
<choose>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitSalaryAdvanceExtendsMapper.xml
View file @
c5dca341
...
...
@@ -55,8 +55,8 @@
<otherwise>
'',
</otherwise>
</choose>
<choose>
<when
test=
"item.poCreateTime != null"
>
#{item.poCreateTime,jdbcType=
VARCHAR
},
</when>
<otherwise>
''
,
</otherwise>
<when
test=
"item.poCreateTime != null"
>
#{item.poCreateTime,jdbcType=
TIMESTAMP
},
</when>
<otherwise>
CURRENT_TIMESTAMP
,
</otherwise>
</choose>
<choose>
<when
test=
"item.ladingBillPerson != null"
>
#{item.ladingBillPerson,jdbcType=VARCHAR},
</when>
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/extends/CitTrialBalanceExtendsMapper.xml
View file @
c5dca341
...
...
@@ -360,6 +360,15 @@
on
tb.account_code=dam.acct_code
where tb.project_id = #{projectId,jdbcType=VARCHAR}
<if
test=
"accountCode != null"
>
and tb.account_code = #{accountCode,jdbcType=VARCHAR}
</if>
<if
test=
"accountDescription != null"
>
and tb.account_description = #{accountDescription,jdbcType=VARCHAR}
</if>
<if
test=
"attribute != null"
>
and dam.account_description = #{attribute,jdbcType=VARCHAR}
</if>
</select>
...
...
atms-web/src/main/webapp/app-resources/i18n/en-us/cit.json
View file @
c5dca341
...
...
@@ -1149,5 +1149,6 @@
"DistributionRatio"
:
"Distribution Ratio"
,
"DistributionAmount"
:
"Distribution Amount"
,
"Subtotal"
:
"Total"
,
"AssetEamMapping"
:
"Asset Eam Mapping"
"AssetEamMapping"
:
"Asset Eam Mapping"
,
"ItemData"
:
"Item Data"
}
\ No newline at end of file
atms-web/src/main/webapp/app-resources/i18n/zh-CN/cit.json
View file @
c5dca341
...
...
@@ -1202,7 +1202,8 @@
"TotalAssets"
:
"资产总额"
,
"DistributionRatio"
:
"分配比例"
,
"DistributionAmount"
:
"分配税额"
,
"AssetEamMapping"
:
"固资损失计算"
"AssetEamMapping"
:
"固资损失计算"
,
"ItemData"
:
"条数据"
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge-search.html
View file @
c5dca341
...
...
@@ -27,7 +27,7 @@
<input
class=
"form-control input-width-middle"
type=
"text"
id=
"orgName"
ng-model=
"queryParams.orgName"
/>
</td>
</tr>
<tr>
<tr
style=
"display: none"
>
<td>
<span
translate=
"DocumentDate"
></span>
<input
class=
"form-control input-width-middle"
type=
"text"
id=
"documentDate"
ng-model=
"queryParams.documentDate"
/>
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-journal-merge/cit-preview-journal-merge.ctrl.js
View file @
c5dca341
...
...
@@ -159,21 +159,21 @@
removeItem
.
forEach
(
function
(
v
)
{
$scope
.
queryParams
[
v
]
=
null
;
if
(
$scope
.
queryParams
.
subjectCode
===
null
)
{
$scope
.
queryParams
.
subjectCode
=
''
;
}
if
(
$scope
.
queryParams
.
subjectName
===
null
)
{
$scope
.
queryParams
.
subjectName
=
''
;
}
if
(
$scope
.
queryParams
.
orgCode
===
null
)
{
$scope
.
queryParams
.
orgCode
=
''
;
}
if
(
$scope
.
queryParams
.
orgName
===
null
)
{
$scope
.
queryParams
.
orgName
=
''
;
}
if
(
$scope
.
queryParams
.
documentDate
===
null
)
{
$scope
.
queryParams
.
documentDate
=
''
;
}
//
if ($scope.queryParams.subjectCode === null) {
//
$scope.queryParams.subjectCode = '';
//
}
//
if ($scope.queryParams.subjectName === null) {
//
$scope.queryParams.subjectName = '';
//
}
//
if ($scope.queryParams.orgCode === null) {
//
$scope.queryParams.orgCode = '';
//
}
//
if ($scope.queryParams.orgName === null) {
//
$scope.queryParams.orgName = '';
//
}
//
if ($scope.queryParams.documentDate === null) {
//
$scope.queryParams.documentDate = '';
//
}
});
}
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-tb-generate-ver/cit-preview-tb-generate-ver-search.html
View file @
c5dca341
...
...
@@ -9,8 +9,8 @@
<div
class=
"input-group"
>
<input
class=
"form-control "
type=
"text"
id=
"accountCode"
placeholder=
""
ng-model=
"filterData.accountCode"
>
<
a
class=
"input-group-addon btn btn-sm"
ng-click=
"popTheParentCode()"
><i
class=
"fa fa-columns"
aria-hidden=
"true"
></i></a
>
<
!--<a class="input-group-addon btn btn-sm" ng-click="popTheParentCode()"><i-->
<!--class="fa fa-columns" aria-hidden="true"></i></a>--
>
</div>
</td>
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-tb-generate-ver/cit-preview-tb-generate-ver.ctrl.js
View file @
c5dca341
...
...
@@ -39,8 +39,8 @@
pageInfo
:
{},
periodStart
:
''
,
periodEnd
:
''
,
accountCode
:
''
,
accountDescription
:
''
,
accountCode
:
null
,
accountDescription
:
null
,
projectId
:
vatSessionService
.
project
.
id
};
};
...
...
@@ -150,18 +150,18 @@
// $scope.queryParams.periodEnd = $scope.queryParams.periodStart;
// }
设置需要去掉的查询条件的值为空
//
设置需要去掉的查询条件的值为空
if
(
!
PWC
.
isNullOrEmpty
(
removeData
))
{
var
removeItem
=
removeData
.
split
(
"|"
);
removeItem
.
forEach
(
function
(
v
)
{
$scope
.
queryParams
[
v
]
=
null
;
if
(
$scope
.
queryParams
.
accountCode
===
null
)
{
$scope
.
queryParams
.
accountCode
=
''
;
}
if
(
$scope
.
queryParams
.
accountDescription
===
null
)
{
$scope
.
queryParams
.
accountDescription
=
''
;
}
//
if ($scope.queryParams.accountCode === null) {
//
$scope.queryParams.accountCode = '';
//
}
//
if ($scope.queryParams.accountDescription === null) {
//
$scope.queryParams.accountDescription = '';
//
}
});
}
...
...
atms-web/src/main/webapp/app/cit/preview/cit-preview-tb-mapping-ver/cit-preview-tb-mapping-ver.ctrl.js
View file @
c5dca341
...
...
@@ -42,9 +42,9 @@
pageInfo
:
{},
periodStart
:
''
,
periodEnd
:
''
,
accountCode
:
''
,
accountDescription
:
''
,
attribute
:
''
,
accountCode
:
null
,
accountDescription
:
null
,
attribute
:
null
,
projectId
:
vatSessionService
.
project
.
id
};
};
...
...
@@ -154,21 +154,21 @@
// $scope.queryParams.periodEnd = $scope.queryParams.periodStart;
// }
设置需要去掉的查询条件的值为空
//
设置需要去掉的查询条件的值为空
if
(
!
PWC
.
isNullOrEmpty
(
removeData
))
{
var
removeItem
=
removeData
.
split
(
"|"
);
removeItem
.
forEach
(
function
(
v
)
{
$scope
.
queryParams
[
v
]
=
null
;
if
(
$scope
.
queryParams
.
accountCode
===
null
)
{
$scope
.
queryParams
.
accountCode
=
''
;
}
if
(
$scope
.
queryParams
.
accountDescription
===
null
)
{
$scope
.
queryParams
.
accountDescription
=
''
;
}
if
(
$scope
.
queryParams
.
attribute
===
null
)
{
$scope
.
queryParams
.
attribute
=
''
;
}
//
if ($scope.queryParams.accountCode === null) {
//
$scope.queryParams.accountCode = '';
//
}
//
if ($scope.queryParams.accountDescription === null) {
//
$scope.queryParams.accountDescription = '';
//
}
//
if ($scope.queryParams.attribute === null) {
//
$scope.queryParams.attribute = '';
//
}
});
}
...
...
atms-web/src/main/webapp/app/cit/report/cit-report-sheet/cit-report-sheet.js
View file @
c5dca341
...
...
@@ -513,7 +513,7 @@
}
scope
.
reportSource
.
forEach
(
function
(
data
)
{
//fix bug11737 导出需要显示千分位
// 避免直接使用data.value = parseFloat(data.value)导致非数字型value无法显示
data
.
value
=
PWC
.
tryParseStringToNum
(
data
.
value
);
...
...
@@ -613,7 +613,7 @@
if
(
!
_
.
isEmpty
(
parsedFormula
))
{
//
parsedFormula = 'IFERROR(' + parsedFormula + ', "")';
parsedFormula
=
'IFERROR('
+
parsedFormula
+
', "")'
;
sheet
.
setFormula
(
data
.
rowIndex
,
data
.
columnIndex
,
'='
+
parsedFormula
);
// sheet.setValue(data.rowIndex, data.columnIndex, data.value);
ifShowParseFloat
=
false
;
// 有公式或手工数据源,单元格设置为公式
...
...
@@ -642,6 +642,12 @@
cell
.
value
(
0
);
cell
.
formatter
(
"[=0]——;0.00"
);
}
if
(
sheet
.
getValue
(
r
,
c
)
===
'#VALUE!'
){
sheet
.
setValue
(
r
,
c
,
0.0
);
}
if
(
sheet
.
getText
(
r
,
c
)
===
'#VALUE!'
){
sheet
.
setText
(
r
,
c
,
"0.0"
);
}
}
}
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-bs-prc-adjust/import-cit-bs-prc-adjust.ctrl.js
View file @
c5dca341
...
...
@@ -172,9 +172,9 @@
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
resp
.
resultMsg
);
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-draft-account-mapping/import-cit-draft-account-mapping.ctrl.js
View file @
c5dca341
...
...
@@ -159,13 +159,14 @@
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
function
(
resp
)
{
}).
then
(
function
(
data
)
{
var
resp
=
data
.
data
;
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
" "
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
" "
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
message
&&
resp
.
message
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
resultMsg
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-eam-assets-disposal/import-cit-eam-assets-disposal.ctrl.js
View file @
c5dca341
...
...
@@ -158,13 +158,14 @@
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
function
(
resp
)
{
}).
then
(
function
(
data
)
{
var
resp
=
data
.
data
;
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
message
&&
resp
.
message
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
resultMsg
));
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-journal-adjust/import-cit-journal-adjust.ctrl.js
View file @
c5dca341
...
...
@@ -178,9 +178,9 @@
deferred
.
resolve
();
if
(
resp
.
result
)
{
debugger
;
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
debugger
;
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-profit-prc-adjust/import-cit-profit-prc-adjust.ctrl.js
View file @
c5dca341
...
...
@@ -172,9 +172,9 @@
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
resp
.
resultMsg
);
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-salary-advance/import-cit-salary-advance.ctrl.js
View file @
c5dca341
...
...
@@ -26,8 +26,8 @@
$scope
.
selectedDate
=
new
Date
(
vatSessionService
.
year
,
vatSessionService
.
month
-
1
,
1
);
$scope
.
startDate
=
new
Date
(
year
-
20
,
1
,
1
);
$scope
.
endDate
=
new
Date
(
year
+
20
,
1
,
1
);
$scope
.
viewMode
=
2
;
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4Year'
);
$scope
.
viewMode
=
1
;
$scope
.
dateFormat
=
$translate
.
instant
(
'dateFormat4Year
Month
'
);
$scope
.
importExcelFile
=
null
;
$scope
.
UploadPeriodTime
=
null
;
...
...
@@ -168,16 +168,18 @@
},
__RequestVerificationToken
:
token
,
withCredentials
:
true
}).
then
(
function
(
resp
)
{
}).
then
(
function
(
data
)
{
var
resp
=
data
.
data
;
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
if
(
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
message
&&
resp
.
message
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
resultMsg
));
debugger
;
if
(
resp
.
resultMsg
&&
resp
.
resultMsg
.
length
>
0
)
{
SweetAlert
.
warning
(
resp
.
resultMsg
);
}
else
{
SweetAlert
.
error
(
$translate
.
instant
(
'ImportFailed'
));
}
...
...
atms-web/src/main/webapp/app/common/controls/import/import-cit-trial-balance/import-cit-trial-balance.ctrl.js
View file @
c5dca341
...
...
@@ -174,9 +174,9 @@
$
(
'#busy-indicator-container'
).
hide
();
deferred
.
resolve
();
if
(
resp
.
data
||
resp
.
result
)
{
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
);
logDto
.
UpdateState
=
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
;
vatOperationLogService
.
addOperationLog
(
logDto
);
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
));
SweetAlert
.
success
(
$translate
.
instant
(
'ImportSuccess'
)
+
" "
+
resp
.
data
+
$translate
.
instant
(
'ItemData'
)
);
}
else
{
if
(
resp
.
message
&&
resp
.
message
.
length
>
0
)
{
SweetAlert
.
warning
(
$translate
.
instant
(
resp
.
resultMsg
));
...
...
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