Commit 7735b088 authored by chase's avatar chase

收入明细功能

parent ce3ea281
......@@ -13,6 +13,7 @@ import pwc.taxtech.atms.service.impl.RevenueConfService;
import pwc.taxtech.atms.vat.entity.RevenueConfig;
import javax.annotation.Resource;
import java.util.List;
@RestController
@RequestMapping(value = "api/v1/revenueConf")
......@@ -26,6 +27,11 @@ public class RevenueConfController extends BaseController {
return new CamelPagingResultDto<>(revenueConfService.queryPage(param));
}
@PostMapping("queryAll")
public List<RevenueConfResult> queryAll(@RequestBody RevenueConfParam param) {
return revenueConfService.queryAll(param);
}
@PostMapping("add")
public ApiResultDto addConf(@RequestBody RevConfAddDto addDto) {
revenueConfService.addConfig(addDto);
......
......@@ -47,6 +47,12 @@ public class RevenueConfService extends BaseService {
return pageInfo;
}
public List<RevenueConfResult> queryAll(RevenueConfParam param) {
RevenueConfigExample example = new RevenueConfigExample();
example.createCriteria().andOrgIdEqualTo(param.getOrgId()).andStartDateLessThanOrEqualTo(param.getStartDate()).andEndDateGreaterThanOrEqualTo(param.getEndDate());
return revenueConfigMapper.selectByExample(example).stream()
.map( o -> beanUtil.copyProperties(o, new RevenueConfResult())).collect(Collectors.toList());
}
/**
* 新增配置
*
......
......@@ -24,7 +24,7 @@
when tbf.segment3 like '4002%' and rc.id is null then 1
when tbf.segment3 like '4010%' and rc.id is null then 1
when tbf.segment3 like '8002%' and rc.id is null then 1
<![CDATA[WHEN rc.id IS NOT NULL and rc.start_date > #{queryDate} and rc.end_date < #{queryDate} then 1]]>
<![CDATA[WHEN rc.id IS NOT NULL and (rc.start_date > #{queryDate} or rc.end_date < #{queryDate}) then 1]]>
<![CDATA[WHEN rc.id IS NOT NULL and rc.start_date <= #{queryDate} and rc.end_date >= #{queryDate} THEN 2]]>
else 3 end as isEmpty
from trial_balance_final as tbf
......@@ -66,7 +66,7 @@
and rc.revenue_type = #{category}
</if>
<if test="taxOn != null">
and rc.tax_rate = #{taxOn}
and rc.tax_type = #{taxOn}
</if>
) as detail
where
......
......@@ -12,7 +12,14 @@
dataField: 'serialNo',
caption: $translate.instant('RevDetailColSerialNo'),
fixed: true,
allowHeaderFiltering: true
allowHeaderFiltering: true, cellTemplate: function (container, options) {
try {
$("<span>" + (options.rowIndex + 1) + "</span>")
.appendTo(container);
} catch (e) {
$log.error(e);
}
}
},
{
dataField: 'subject',
......@@ -75,10 +82,10 @@
allowHeaderFiltering: true, cellTemplate: function (container, options) {
try {
if (options.data.type == null) {
$('<i class="fa fa-exclamation-triangle"></i>&nbsp;&nbsp;')
$('<i class="fa fa-exclamation-circle fa-1x" style="color: yellow" aria-hidden="true "></i>&nbsp;&nbsp;')
.appendTo(container);
} else {
$("<span>"+options.data.type+"</span>")
$("<span>" + options.data.type + "</span>")
.appendTo(container);
}
......@@ -96,16 +103,18 @@
cellTemplate: function (container, options) {
try {
if (options.data.category == null) {
$('<i class="fa fa-exclamation-triangle"></i>&nbsp;&nbsp;')
$('<i class="fa fa-exclamation-circle fa-1x" style="color: yellow" aria-hidden="true "></i>&nbsp;&nbsp;')
.appendTo(container);
} else {
switch (options.data.category) {
case "0":
$("<span>货物及加工修理修配劳务</span>")
.appendTo(container);
break;
case "1":
$("<span>服务、不动产和无形资产</span>")
.appendTo(container);
break;
}
}
......@@ -122,22 +131,26 @@
cellTemplate: function (container, options) {
try {
if (options.data.taxOn == null) {
$('<i class="fa fa-exclamation-triangle"></i>&nbsp;&nbsp;')
$('<i class="fa fa-exclamation-circle fa-1x" style="color: yellow" aria-hidden="true "></i>&nbsp;&nbsp;')
.appendTo(container);
} else {
switch (options.data.taxOn) {
case "0":
$("<span>一般计税</span>")
.appendTo(container);
break;
case "1":
$("<span>简易计税</span>")
.appendTo(container);
break;
case "2":
$("<span>免抵退税</span>")
.appendTo(container);
break;
case "3":
$("<span>免税</span>")
.appendTo(container);
break;
}
}
......@@ -191,10 +204,15 @@
};
$scope.revenueType = [];
$scope.getRevenueType = function () {
$http.post('/revenueConf/queryPage', {pageInfo: $scope.pagingOptions}, apiConfig.createVat())
var month = vatSessionService.month < 10 ? ("0" + vatSessionService.month) : vatSessionService.month;
$http.post('/revenueConf/queryAll', {
startDate: vatSessionService.year + "-" + month,
endDate: vatSessionService.year + "-" + month,
orgId: vatSessionService.project.organizationID
}, apiConfig.createVat())
.success(function (res) {
if (res && res.list) {
angular.forEach(res.list, function (d) {
if (res) {
angular.forEach(res, function (d) {
$scope.revenueType.push({'key': d.name, 'val': d.name});
})
} else {
......
......@@ -45,7 +45,7 @@
</td>
<td><span class="lbl-name">{{'RevSearchProfitCenterName' | translate }}:</span></td>
<td>
<input class="form-control" name="name" ng-model="searchParam.centerName" maxlength="20">
<input class="form-control" name="name" ng-model="searchParam.profitCenterName" maxlength="20">
</td>
<td><span class="lbl-name">{{'RevSearchTaxOn' | translate }}:</span></td>
<td>
......@@ -99,7 +99,7 @@
<div class="page-footer">
<ack-pagination page-options="pagingOptions"
refresh-table="refreshConfigGrid()"></ack-pagination>
refresh-table="refreshGrid()"></ack-pagination>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment