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
b3f395d4
Commit
b3f395d4
authored
Mar 27, 2019
by
zhkwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CIT总分机构分配表
parent
867bf355
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
396 additions
and
54 deletions
+396
-54
CitReportController.java
...java/pwc/taxtech/atms/controller/CitReportController.java
+18
-6
CitReportServiceImpl.java
...a/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
+104
-26
A202000.xlsx
atms-api/src/main/resources/cit_excel_template/A202000.xlsx
+0
-0
CitDistribution.java
...rc/main/java/pwc/taxtech/atms/entity/CitDistribution.java
+72
-0
CitDistributionExample.java
.../java/pwc/taxtech/atms/entity/CitDistributionExample.java
+140
-0
CitDistributionMapper.xml
.../resources/pwc/taxtech/atms/dao/CitDistributionMapper.xml
+37
-7
cit-distribution-table.ctrl.js
...ion/cit-distribution-table/cit-distribution-table.ctrl.js
+6
-5
cit-distribution-table.html
...uction/cit-distribution-table/cit-distribution-table.html
+7
-7
citReport.svc.js
...b/src/main/webapp/app/common/webservices/citReport.svc.js
+12
-3
No files found.
atms-api/src/main/java/pwc/taxtech/atms/controller/CitReportController.java
View file @
b3f395d4
...
...
@@ -29,7 +29,7 @@ import static javax.servlet.http.HttpServletResponse.SC_OK;
* @description CIT报表生成(数据处理)
*/
@RestController
@RequestMapping
(
value
=
"
api/v1/citReport
"
)
@RequestMapping
(
value
=
"
/api/v1/citReport/
"
)
public
class
CitReportController
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
CitReportController
.
class
);
...
...
@@ -68,17 +68,15 @@ public class CitReportController {
/**
* 生成CIT总分机构分配表
* @param projectId
* @return
*/
@RequestMapping
(
value
=
"generateDistributionTable/{projectId}"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
ApiResultDto
generateDistributionTable
(
@PathVariable
String
projectId
)
{
@RequestMapping
(
value
=
"generateDistributionTable"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
ApiResultDto
generateDistributionTable
(
@RequestBody
CitDistributionDto
citDistributionDto
)
{
ApiResultDto
apiResultDto
=
new
ApiResultDto
();
try
{
apiResultDto
.
setCode
(
1
);
apiResultDto
.
setMessage
(
"生成成功"
);
apiResultDto
.
setData
(
citReportService
.
generateTotalBranchOrgDisTable
(
projectId
));
apiResultDto
.
setData
(
citReportService
.
generateTotalBranchOrgDisTable
(
citDistributionDto
.
getProjectId
()
));
return
apiResultDto
;
}
catch
(
Exception
e
){
e
.
printStackTrace
();
...
...
@@ -179,7 +177,21 @@ public class CitReportController {
return
apiResultDto
;
}
}
/**
* 固定资产及EAM Mapping导出
* @param paras
* @param response
*/
@RequestMapping
(
value
=
"exportDTData"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
void
exportDTData
(
@RequestBody
CitDistributionDto
paras
,
HttpServletResponse
response
)
{
int
count
=
citReportService
.
exportDTData2
(
paras
,
response
);
if
(
count
==
0
)
{
response
.
setStatus
(
SC_NO_CONTENT
);
}
else
{
response
.
setStatus
(
SC_OK
);
}
}
/**
* 获取单元格相关数据
* @param reportId
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/CitReportServiceImpl.java
View file @
b3f395d4
...
...
@@ -65,6 +65,8 @@ public class CitReportServiceImpl extends BaseService {
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
private
ReportGeneratorImpl
reportGenerator
;
@Resource
...
...
@@ -127,6 +129,8 @@ public class CitReportServiceImpl extends BaseService {
private
CitBalanceSheetPrcAdjustMapper
citBsPrcAdjustMapper
;
@Autowired
private
CitDistributionMapper
citDistributionMapper
;
@Autowired
private
CitTbamMapper
citTbamMapper
;
public
OperationResultDto
<
List
<
ReportDto
>>
getReportTemplate
(
String
projectId
,
EnumServiceType
serviceType
,
Integer
period
)
{
...
...
@@ -776,6 +780,34 @@ public class CitReportServiceImpl extends BaseService {
return
pageInfo
;
}
/**
* 固资申报表导出(第二种方式)--正在使用
*
* @param citDistributionDto
* @param response
* @return
*/
public
int
exportDTData2
(
CitDistributionDto
citDistributionDto
,
HttpServletResponse
response
)
{
CitDistributionExample
example
=
new
CitDistributionExample
();
example
.
createCriteria
().
andProjectIdEqualTo
(
citDistributionDto
.
getProjectId
());
List
<
CitDistribution
>
citDistributionList
=
citDistributionMapper
.
selectByExample
(
example
);
List
<
CitDistributionDto
>
citDistributionDtos
=
new
ArrayList
<>();
citDistributionList
.
stream
().
forEach
(
citDistribution
->
{
CitDistributionDto
temp
=
new
CitDistributionDto
();
BeanUtils
.
copyProperties
(
citDistribution
,
temp
);
citDistributionDtos
.
add
(
temp
);
});
ExportDto
exportDto
=
new
ExportDto
();
exportDto
.
setFileName
(
"A202000"
);
exportDto
.
setTemplateUrl
(
Constant
.
citTemplateUrl
+
"/A202000.xlsx"
);
exportDto
.
setResponse
(
response
);
exportDto
.
setList
(
citDistributionDtos
);
exportDto
.
setRelation
(
null
);
JxlsUtils
.
export
(
exportDto
);
return
1
;
}
/**
* 固资申报表导出(第二种方式)--正在使用
*
...
...
@@ -1359,22 +1391,29 @@ public class CitReportServiceImpl extends BaseService {
Project
project
=
projectMapper
.
selectByPrimaryKey
(
projectId
);
//判断是不是总机构,若机构代码最后两位是00代表是总机构
if
(
project
.
getCode
()
!=
null
&&
project
.
getCode
().
substring
(
project
.
getCode
().
length
()
-
3
,
project
.
getCode
().
length
()).
equals
(
"00"
))
{
if
(
project
.
getCode
()
!=
null
&&
project
.
getCode
().
substring
(
project
.
getCode
().
length
()
-
2
,
project
.
getCode
().
length
()).
equals
(
"00"
))
{
//此时代表该机构为总机构,需要生成总分机构分配表
//获取当前卡片所在期间(就是年数)
Integer
period
=
project
.
getYear
();
//生成总分机构分配表 start
//1、查出所有所有分支机构
OrganizationExample
example
=
new
OrganizationExample
();
example
.
createCriteria
().
andCodeLike
(
project
.
getCode
().
substring
(
0
,
project
.
getCode
().
length
()
-
2
)
);
example
.
createCriteria
().
andCodeLike
(
project
.
getCode
().
substring
(
0
,
project
.
getCode
().
length
()
-
1
)+
"%"
);
List
<
Organization
>
organizations
=
organizationMapper
.
selectByExample
(
example
);
//2、取出各个分支机构的三项因素,并算出各个三项因素的合计
//比较变量,其余值和该值进行比较,判断其余变量是否为0
BigDecimal
compareVariable
=
new
BigDecimal
(
0.000000
);
//营业收入合计变量
BigDecimal
totalBusinessIncome
=
new
BigDecimal
(
0.000000
);
//职工薪酬合计变量
BigDecimal
totalEmployeeRemuneration
=
new
BigDecimal
(
0.000000
);
//资产总额合计变量
BigDecimal
totalTotalAssets
=
new
BigDecimal
(
0.000000
);
//分配所得税额合计变量
BigDecimal
totalDistributionAmount
=
new
BigDecimal
(
0.000000
);
//第六行G列的值
BigDecimal
sixRowGCouValue
=
new
BigDecimal
(
0.000000
);
List
<
CitDistribution
>
citDistributionList
=
new
ArrayList
<>();
for
(
Organization
org
:
organizations
)
{
//2.1 查出该机构该期间对应的卡片
...
...
@@ -1392,9 +1431,20 @@ public class CitReportServiceImpl extends BaseService {
citDistribution
.
setProjectId
(
project
.
getId
());
citDistribution
.
setOrgName
(
org
.
getName
());
citDistribution
.
setTaxPayerNumber
(
org
.
getTaxPayerNumber
());
citDistribution
.
setCode
(
org
.
getCode
());
//2.2 获取该机构该期间的营业收入--A101010《一版企业收入明细表》的营业收入金额C4抓取
// TODO 获取该机构该期间的营业收入
CitTbamExample
citTbamExample
=
new
CitTbamExample
();
citTbamExample
.
createCriteria
().
andAttributeIn
(
Arrays
.
asList
(
attributeArr
)).
andProjectIdEqualTo
(
projects
.
get
(
0
).
getId
());
List
<
CitTbam
>
citTbams
=
citTbamMapper
.
selectByExample
(
citTbamExample
);
BigDecimal
businessIncome
=
new
BigDecimal
(
0.000000
);
for
(
CitTbam
citTbam
:
citTbams
)
{
businessIncome
.
add
(
citTbam
.
getEndingBalance
());
}
totalBusinessIncome
.
add
(
businessIncome
);
citDistribution
.
setBusinessIncome
(
businessIncome
);
//2.3 获取该机构该期间的职工薪酬--WP008职工薪酬表的“职工薪酬”的小计项D20抓取
//2.3.1找出该卡片对应的模板组
...
...
@@ -1420,31 +1470,56 @@ public class CitReportServiceImpl extends BaseService {
map
.
put
(
"period"
,
0
);
map
.
put
(
"projectId"
,
project
.
getId
());
map
.
put
(
"templateGroupID"
,
templateGroupId
);
//根据条件获取到报表相关信息
List
<
ReportDto
>
collect
=
templateMapper
.
getTemplateLeftJoinReport
(
map
).
stream
().
filter
(
reportDto
->
reportDto
.
getTemplateCode
().
equals
(
"CIT.WP008"
)).
collect
(
Collectors
.
toList
());
if
(
collect
==
null
)
{
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
"0.000000"
));
}
else
{
//根据报表主键和卡片查询出
PeriodCellDataExample
periodCellDataExample
=
new
PeriodCellDataExample
();
periodCellDataExample
.
createCriteria
().
andProjectIdEqualTo
(
projects
.
get
(
0
).
getId
()).
andReportIdEqualTo
(
Long
.
getLong
(
collect
.
get
(
0
).
getId
())).
andFormulaExpEqualTo
(
"D16+D18"
).
andPeriodEqualTo
(
0
);
List
<
PeriodCellData
>
periodCellData
=
periodCellDataMapper
.
selectByExample
(
periodCellDataExample
);
if
(
periodCellData
==
null
)
{
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
"0.000000"
));
}
else
{
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
periodCellData
.
get
(
0
).
getData
()));
totalEmployeeRemuneration
.
add
(
citDistribution
.
getEmployeeRemuneration
());
//根据条件获取到CIT.WP008报表相关信息
List
<
ReportDto
>
templateLeftJoinReport
=
templateMapper
.
getTemplateLeftJoinReport
(
map
);
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
"0.000000"
));
for
(
ReportDto
reportDto
:
templateLeftJoinReport
)
{
if
(
reportDto
.
getTemplateCode
().
equals
(
"CIT.WP008"
)){
//根据报表主键和卡片查询出WP008的相关数据
PeriodCellDataExample
periodCellDataExample
=
new
PeriodCellDataExample
();
periodCellDataExample
.
createCriteria
().
andProjectIdEqualTo
(
projects
.
get
(
0
).
getId
()).
andReportIdEqualTo
(
Long
.
parseLong
(
reportDto
.
getId
())).
andFormulaExpEqualTo
(
"D16+D18"
).
andPeriodEqualTo
(
0
);
List
<
PeriodCellData
>
periodCellData
=
periodCellDataMapper
.
selectByExample
(
periodCellDataExample
);
if
(
periodCellData
==
null
)
{
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
"0.000000"
));
}
else
{
citDistribution
.
setEmployeeRemuneration
(
new
BigDecimal
(
periodCellData
.
get
(
0
).
getData
()));
totalEmployeeRemuneration
.
add
(
citDistribution
.
getEmployeeRemuneration
());
}
}
else
if
(
org
.
getCode
().
equals
(
project
.
getCode
())
&&
reportDto
.
getTemplateCode
().
equals
(
"CIT.A200000"
))
{
//此时证明是总机构,要取总机构的A200000的15栏数据
//根据报表主键和卡片查询出CIT.A200000的相关数据
CellTemplateExample
cellTemplateExample
=
new
CellTemplateExample
();
cellTemplateExample
.
createCriteria
().
andRowIndexEqualTo
(
25
).
andColumnIndexEqualTo
(
3
).
andReportTemplateIdEqualTo
(
Long
.
parseLong
(
reportDto
.
getId
()));
List
<
CellTemplate
>
cellTemplates
=
cellTemplateMapper
.
selectByExample
(
cellTemplateExample
);
if
(
cellTemplates
!=
null
){
PeriodCellDataExample
periodCellDataExample
=
new
PeriodCellDataExample
();
periodCellDataExample
.
createCriteria
().
andProjectIdEqualTo
(
projects
.
get
(
0
).
getId
()).
andReportIdEqualTo
(
Long
.
parseLong
(
reportDto
.
getId
())).
andCellTemplateIdEqualTo
(
cellTemplates
.
get
(
0
).
getId
()).
andPeriodEqualTo
(
0
);
List
<
PeriodCellData
>
periodCellDatas
=
periodCellDataMapper
.
selectByExample
(
periodCellDataExample
);
if
(
periodCellDatas
!=
null
)
{
sixRowGCouValue
.
add
(
new
BigDecimal
(
periodCellDatas
.
get
(
0
).
getData
()));
}
}
}
}
// List<ReportDto> collect = templateLeftJoinReport.stream().
// filter(reportDto -> reportDto.getTemplateCode().equals("CIT.WP008")).collect(Collectors.toList());
// if (collect == null) {
// citDistribution.setEmployeeRemuneration(new BigDecimal("0.000000"));
// } else {
//
// }
}
//2.4 获取该机构该期间的资产总额--取该机构该期间的卡片的利润表(cit_profit_prc_adjust)中的数据
CitBalanceSheetPrcAdjustExample
citBsExample
=
new
CitBalanceSheetPrcAdjustExample
();
citBsExample
.
createCriteria
().
andProjectIdEqualTo
(
projects
.
get
(
0
).
getId
()).
andItemNameEqualTo
(
"非流动资产合计"
);
List
<
CitBalanceSheetPrcAdjust
>
citBalanceSheetPrcAdjusts
=
citBsPrcAdjustMapper
.
selectByExample
(
citBsExample
);
citDistribution
.
setTotalAssets
(
citBalanceSheetPrcAdjusts
.
get
(
0
).
getBegBal
());
citDistribution
.
setTotalAssets
(
citBalanceSheetPrcAdjusts
==
null
?
new
BigDecimal
(
0.000000
):
citBalanceSheetPrcAdjusts
.
get
(
0
).
getBegBal
());
totalTotalAssets
.
add
(
citBalanceSheetPrcAdjusts
.
get
(
0
).
getBegBal
());
citDistributionList
.
add
(
citDistribution
);
...
...
@@ -1453,9 +1528,11 @@ public class CitReportServiceImpl extends BaseService {
//计算各个机构的分配比例及分配税额
for
(
CitDistribution
citDistribution
:
citDistributionList
)
{
//计算分配比例
citDistribution
.
setDistributionRatio
(
citDistribution
.
getBusinessIncome
().
divide
(
totalBusinessIncome
).
multiply
(
new
BigDecimal
(
"0.35"
)).
add
(
citDistribution
.
getEmployeeRemuneration
().
divide
(
totalEmployeeRemuneration
).
multiply
(
new
BigDecimal
(
"0.35"
))).
add
(
citDistribution
.
getTotalAssets
().
divide
(
totalTotalAssets
).
multiply
(
new
BigDecimal
(
"0.30"
))));
citDistribution
.
setDistributionRatio
(
citDistribution
.
getBusinessIncome
().
divide
(
totalBusinessIncome
.
compareTo
(
compareVariable
)==
0
?
new
BigDecimal
(
1
):
totalBusinessIncome
).
multiply
(
new
BigDecimal
(
"0.35"
)).
add
(
citDistribution
.
getEmployeeRemuneration
().
divide
(
totalEmployeeRemuneration
.
compareTo
(
compareVariable
)==
0
?
new
BigDecimal
(
1
):
totalEmployeeRemuneration
).
multiply
(
new
BigDecimal
(
"0.35"
))).
add
(
citDistribution
.
getTotalAssets
().
divide
(
totalTotalAssets
.
compareTo
(
compareVariable
)==
0
?
new
BigDecimal
(
1
):
totalTotalAssets
).
multiply
(
new
BigDecimal
(
"0.30"
))));
//拼写分配比例的公式
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
citDistribution
.
getBusinessIncome
());
...
...
@@ -1474,13 +1551,14 @@ public class CitReportServiceImpl extends BaseService {
sb
.
append
(
"*0.30"
);
citDistribution
.
setDistributionRatioFormula
(
citDistribution
.
getBusinessIncome
().
toString
());
// TODO 计算分配税额
//计算分配税额
citDistribution
.
setDistributionAmount
(
sixRowGCouValue
.
multiply
(
citDistribution
.
getDistributionRatio
()));
totalDistributionAmount
.
add
(
citDistribution
.
getDistributionAmount
());
// TODO 拼写分配税额的计算公式
}
citDistributionList
.
stream
().
forEach
(
citDistribution
->
{
int
insert
=
citDistributionMapper
.
insert
(
citDistribution
);
int
insert
=
citDistributionMapper
.
insert
Selective
(
citDistribution
);
});
}
return
null
;
...
...
atms-api/src/main/resources/cit_excel_template/A202000.xlsx
0 → 100644
View file @
b3f395d4
File added
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitDistribution.java
View file @
b3f395d4
...
...
@@ -221,6 +221,28 @@ public class CitDistribution extends BaseEntity implements Serializable {
*/
private
Date
updateTime
;
/**
* Database Column Remarks:
* 机构编码
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cit_distribution.code
*
* @mbg.generated
*/
private
String
code
;
/**
* Database Column Remarks:
* 期间月份
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column cit_distribution.period_month
*
* @mbg.generated
*/
private
String
periodMonth
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table cit_distribution
...
...
@@ -685,6 +707,54 @@ public class CitDistribution extends BaseEntity implements Serializable {
this
.
updateTime
=
updateTime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cit_distribution.code
*
* @return the value of cit_distribution.code
*
* @mbg.generated
*/
public
String
getCode
()
{
return
code
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cit_distribution.code
*
* @param code the value for cit_distribution.code
*
* @mbg.generated
*/
public
void
setCode
(
String
code
)
{
this
.
code
=
code
==
null
?
null
:
code
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column cit_distribution.period_month
*
* @return the value of cit_distribution.period_month
*
* @mbg.generated
*/
public
String
getPeriodMonth
()
{
return
periodMonth
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column cit_distribution.period_month
*
* @param periodMonth the value for cit_distribution.period_month
*
* @mbg.generated
*/
public
void
setPeriodMonth
(
String
periodMonth
)
{
this
.
periodMonth
=
periodMonth
==
null
?
null
:
periodMonth
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table cit_distribution
...
...
@@ -716,6 +786,8 @@ public class CitDistribution extends BaseEntity implements Serializable {
sb
.
append
(
", createBy="
).
append
(
createBy
);
sb
.
append
(
", createTime="
).
append
(
createTime
);
sb
.
append
(
", updateTime="
).
append
(
updateTime
);
sb
.
append
(
", code="
).
append
(
code
);
sb
.
append
(
", periodMonth="
).
append
(
periodMonth
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
...
...
atms-dao/src/main/java/pwc/taxtech/atms/entity/CitDistributionExample.java
View file @
b3f395d4
...
...
@@ -1415,6 +1415,146 @@ public class CitDistributionExample {
addCriterion
(
"update_time not between"
,
value1
,
value2
,
"updateTime"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeIsNull
()
{
addCriterion
(
"code is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeIsNotNull
()
{
addCriterion
(
"code is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeEqualTo
(
String
value
)
{
addCriterion
(
"code ="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotEqualTo
(
String
value
)
{
addCriterion
(
"code <>"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeGreaterThan
(
String
value
)
{
addCriterion
(
"code >"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"code >="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLessThan
(
String
value
)
{
addCriterion
(
"code <"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"code <="
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeLike
(
String
value
)
{
addCriterion
(
"code like"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotLike
(
String
value
)
{
addCriterion
(
"code not like"
,
value
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeIn
(
List
<
String
>
values
)
{
addCriterion
(
"code in"
,
values
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"code not in"
,
values
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"code between"
,
value1
,
value2
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andCodeNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"code not between"
,
value1
,
value2
,
"code"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthIsNull
()
{
addCriterion
(
"period_month is null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthIsNotNull
()
{
addCriterion
(
"period_month is not null"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthEqualTo
(
String
value
)
{
addCriterion
(
"period_month ="
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthNotEqualTo
(
String
value
)
{
addCriterion
(
"period_month <>"
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthGreaterThan
(
String
value
)
{
addCriterion
(
"period_month >"
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthGreaterThanOrEqualTo
(
String
value
)
{
addCriterion
(
"period_month >="
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthLessThan
(
String
value
)
{
addCriterion
(
"period_month <"
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthLessThanOrEqualTo
(
String
value
)
{
addCriterion
(
"period_month <="
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthLike
(
String
value
)
{
addCriterion
(
"period_month like"
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthNotLike
(
String
value
)
{
addCriterion
(
"period_month not like"
,
value
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthIn
(
List
<
String
>
values
)
{
addCriterion
(
"period_month in"
,
values
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthNotIn
(
List
<
String
>
values
)
{
addCriterion
(
"period_month not in"
,
values
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"period_month between"
,
value1
,
value2
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
public
Criteria
andPeriodMonthNotBetween
(
String
value1
,
String
value2
)
{
addCriterion
(
"period_month not between"
,
value1
,
value2
,
"periodMonth"
);
return
(
Criteria
)
this
;
}
}
/**
...
...
atms-dao/src/main/resources/pwc/taxtech/atms/dao/CitDistributionMapper.xml
View file @
b3f395d4
...
...
@@ -25,6 +25,8 @@
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"code"
jdbcType=
"VARCHAR"
property=
"code"
/>
<result
column=
"period_month"
jdbcType=
"VARCHAR"
property=
"periodMonth"
/>
</resultMap>
<sql
id=
"Example_Where_Clause"
>
<!--
...
...
@@ -100,7 +102,7 @@
id, organization_id, project_id, date, source, period, quarter, tax_payer_number,
org_name, business_income, employee_remuneration, total_assets, distribution_ratio,
distribution_ratio_formula, distribution_amount, distribution_amount_formula, create_by,
create_time, update_time
create_time, update_time
, code, period_month
</sql>
<select
id=
"selectByExample"
parameterType=
"pwc.taxtech.atms.entity.CitDistributionExample"
resultMap=
"BaseResultMap"
>
<!--
...
...
@@ -159,16 +161,16 @@
business_income, employee_remuneration, total_assets,
distribution_ratio, distribution_ratio_formula,
distribution_amount, distribution_amount_formula,
create_by, create_time, update_time
)
create_by, create_time, update_time
,
code, period_month
)
values (#{id,jdbcType=BIGINT}, #{organizationId,jdbcType=VARCHAR}, #{projectId,jdbcType=VARCHAR},
#{date,jdbcType=TIMESTAMP}, #{source,jdbcType=VARCHAR}, #{period,jdbcType=INTEGER},
#{quarter,jdbcType=INTEGER}, #{taxPayerNumber,jdbcType=VARCHAR}, #{orgName,jdbcType=VARCHAR},
#{businessIncome,jdbcType=DECIMAL}, #{employeeRemuneration,jdbcType=DECIMAL}, #{totalAssets,jdbcType=DECIMAL},
#{distributionRatio,jdbcType=DECIMAL}, #{distributionRatioFormula,jdbcType=VARCHAR},
#{distributionAmount,jdbcType=DECIMAL}, #{distributionAmountFormula,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
#{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
,
#{code,jdbcType=VARCHAR}, #{periodMonth,jdbcType=VARCHAR}
)
</insert>
<insert
id=
"insertSelective"
parameterType=
"pwc.taxtech.atms.entity.CitDistribution"
>
<!--
...
...
@@ -234,6 +236,12 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"code != null"
>
code,
</if>
<if
test=
"periodMonth != null"
>
period_month,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -293,6 +301,12 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"code != null"
>
#{code,jdbcType=VARCHAR},
</if>
<if
test=
"periodMonth != null"
>
#{periodMonth,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select
id=
"countByExample"
parameterType=
"pwc.taxtech.atms.entity.CitDistributionExample"
resultType=
"java.lang.Long"
>
...
...
@@ -369,6 +383,12 @@
<if
test=
"record.updateTime != null"
>
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"record.code != null"
>
code = #{record.code,jdbcType=VARCHAR},
</if>
<if
test=
"record.periodMonth != null"
>
period_month = #{record.periodMonth,jdbcType=VARCHAR},
</if>
</set>
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
...
...
@@ -398,7 +418,9 @@
distribution_amount_formula = #{record.distributionAmountFormula,jdbcType=VARCHAR},
create_by = #{record.createBy,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
code = #{record.code,jdbcType=VARCHAR},
period_month = #{record.periodMonth,jdbcType=VARCHAR}
<if
test=
"_parameter != null"
>
<include
refid=
"Update_By_Example_Where_Clause"
/>
</if>
...
...
@@ -464,6 +486,12 @@
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"code != null"
>
code = #{code,jdbcType=VARCHAR},
</if>
<if
test=
"periodMonth != null"
>
period_month = #{periodMonth,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
...
...
@@ -490,7 +518,9 @@
distribution_amount_formula = #{distributionAmountFormula,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
update_time = #{updateTime,jdbcType=TIMESTAMP},
code = #{code,jdbcType=VARCHAR},
period_month = #{periodMonth,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT}
</update>
<select
id=
"selectByExampleWithRowbounds"
parameterType=
"pwc.taxtech.atms.entity.CitDistributionExample"
resultMap=
"BaseResultMap"
>
...
...
atms-web/src/main/webapp/app/cit/reduction/cit-distribution-table/cit-distribution-table.ctrl.js
View file @
b3f395d4
va
tModule
.
controller
(
'citDistributionTableController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$filter'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'citPreviewService'
,
'citReportService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
ci
tModule
.
controller
(
'citDistributionTableController'
,
[
'$rootScope'
,
'$scope'
,
'$log'
,
'$filter'
,
'$translate'
,
'$timeout'
,
'SweetAlert'
,
'$q'
,
'uiGridConstants'
,
'$interval'
,
'citPreviewService'
,
'citReportService'
,
'browserService'
,
'vatSessionService'
,
'region'
,
'enums'
,
'vatExportService'
,
function
(
$rootScope
,
$scope
,
$log
,
$filter
,
$translate
,
$timeout
,
SweetAlert
,
$q
,
uiGridConstants
,
$interval
,
citPreviewService
,
citReportService
,
browserService
,
vatSessionService
,
region
,
enums
,
vatExportService
)
{
'use strict'
;
...
...
@@ -50,7 +50,7 @@
};
$scope
.
getDataFromDatabase
=
function
(
queryParams
){
citReportService
.
get
AssetEamMapping
s
(
queryParams
).
success
(
function
(
resp
)
{
citReportService
.
get
DistributionTable
s
(
queryParams
).
success
(
function
(
resp
)
{
debugger
;
if
(
resp
.
data
)
{
// minDate = data.
...
...
@@ -234,7 +234,7 @@
};
var
downloadJE
=
function
()
{
citReportService
.
initExport
AEM
Data
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
citReportService
.
initExport
DT
Data
(
$scope
.
queryParams
).
success
(
function
(
data
,
status
,
headers
)
{
if
(
status
===
204
){
SweetAlert
.
warning
(
"没有数据可以下载"
);
return
;
...
...
@@ -246,7 +246,7 @@
};
$scope
.
startCalculateData
=
function
()
{
citReportService
.
generateDistributionTable
(
vatSessionService
.
project
.
id
).
success
(
function
(
data
,
status
,
headers
)
{
citReportService
.
generateDistributionTable
(
$scope
.
queryParams
).
success
(
function
(
data
)
{
loadJournalEntryDataFromDB
(
1
);
// if(status===204){
// SweetAlert.warning("没有数据可以下载");
...
...
@@ -258,7 +258,7 @@
};
(
function
initialize
()
{
$log
.
debug
(
'
VatPreviewInputInvoic
eController.ctor()...'
);
$log
.
debug
(
'
citDistributionTabl
eController.ctor()...'
);
$
(
'#input-invoice-period-picker'
).
focus
(
function
()
{
$
(
'.filter-button'
).
popover
(
"hide"
);
});
...
...
@@ -286,6 +286,7 @@
$scope
.
gridOptions
=
{
rowHeight
:
constant
.
UIGrid
.
rowHeight
,
showColumnFooter
:
true
,
selectionRowHeaderWidth
:
constant
.
UIGrid
.
rowHeight
,
// expandableRowTemplate: '<div ui-grid="row.entity.subGridOptions" style="height:150px;"></div>',
virtualizationThreshold
:
50
,
//默认加载50条数据,避免在数据展示时,只显示前面4条
...
...
atms-web/src/main/webapp/app/cit/reduction/cit-distribution-table/cit-distribution-table.html
View file @
b3f395d4
...
...
@@ -3,15 +3,15 @@
<div
class=
"nav-header"
>
{{'DistributionTable' | translate}}
</div>
<div
class=
"nav-tab"
>
<span
style=
"width: auto"
ng-click=
"startCalculateData()"
>
{{'startCaculateData' | translate}}
</span>
<span
ng-click=
"downloadJE()"
style=
"
position: relative; top: -61px; left: 95%
;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
<span
ng-click=
"downloadJE()"
style=
"
float: right
;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span>
</div>
</div>
<
!--<div class="top-area-wrapper" style="margin-top: 10px">--
>
<
!--<span translate="DistributionTable" class="text-bold"></span> | -->
<
!--<span class="text-bold" translate="InvoiceQJ" style="display: none"></span>--
>
<
!--<input type="text" class="form-control input-width-middle periodInput" style="position: relative; top: -30px; left: 180px;display: none" id="input-invoice-period-picker" />--
>
<
!--<span ng-click="downloadJE()" style="position: relative; top: -61px; left: 95%;"><i class="fa fa-file-excel-o" aria-hidden="true"></i>{{'ExportBtn' | translate}}</span>--
>
<
!--</div>--
>
<
div
class=
"top-area-wrapper"
style=
"margin-top: 10px;display: none"
>
<
span
translate=
"DistributionTable"
class=
"text-bold"
></span>
|
<
span
class=
"text-bold"
translate=
"InvoiceQJ"
style=
"display: none"
></span
>
<
input
type=
"text"
class=
"form-control input-width-middle periodInput"
style=
"position: relative; top: -30px; left: 180px;display: none"
id=
"input-invoice-period-picker"
/
>
<
span
ng-click=
"downloadJE()"
style=
"position: relative; top: -61px; left: 95%;"
><i
class=
"fa fa-file-excel-o"
aria-hidden=
"true"
></i>
{{'ExportBtn' | translate}}
</span
>
<
/div
>
<!--<div style="margin-bottom: 8px;margin-left: 30px">-->
<!--{{'EnterpriseAccountSetName' | translate}}<span class="numAmount">{{ledgerName}}</span> -->
...
...
atms-web/src/main/webapp/app/common/webservices/citReport.svc.js
View file @
b3f395d4
...
...
@@ -2,7 +2,7 @@
'vatSessionService'
,
function
(
$q
,
$log
,
$http
,
$translate
,
apiConfig
,
enums
,
SweetAlert
,
vatOperationLogService
,
vatSessionService
)
{
'use strict'
;
$log
.
debug
(
'
va
tReportService.ctor()...'
);
$log
.
debug
(
'
ci
tReportService.ctor()...'
);
return
{
// 修改保存机制后,需要添加缓存机制的方法:
...
...
@@ -234,8 +234,17 @@
/**
生成所得税分配表的
*/
generateDistributionTable
:
function
(
projectId
){
return
$http
.
post
(
'/citReport/generateDistributionTable/'
+
projectId
,
apiConfig
.
create
());
generateDistributionTable
:
function
(
citAssetsListDto
){
debugger
;
return
$http
.
post
(
'/citReport/generateDistributionTable'
,
citAssetsListDto
,
apiConfig
.
create
());
},
/**
* 导出生成所得税分配表
* @param citAssetsListDto
* @returns {HttpPromise}
*/
initExportDTData
:
function
(
citAssetsListDto
)
{
return
$http
.
post
(
'/citReport/exportDTData'
,
citAssetsListDto
,
apiConfig
.
create
({
responseType
:
'arraybuffer'
}));
},
};
...
...
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