Commit de480ad9 authored by gary's avatar gary

Merge remote-tracking branch 'origin/dev_mysql' into dev_mysql

parents 532ec1d0 b8d188a2
......@@ -30,7 +30,7 @@ public class EbsApiServiceImplTest extends CommonIT {
}
@Test
public void queryRemoteServerThenUpdateOrg(){
List<OrganizationQueryDto> items =new ArrayList<>();
List<OrganizationQueryDto> items = new ArrayList();
for(int i=0;i<2;i++){
OrganizationQueryDto dto = new OrganizationQueryDto();
dto.setTaxPayerNumber("sadsafsdf3232");
......
......@@ -13,6 +13,15 @@ public class ReportDto {
private Date createTime;
private String updater;
private Date updateTime;
private Integer reportType;
public Integer getReportType() {
return reportType;
}
public void setReportType(Integer reportType) {
this.reportType = reportType;
}
public String getId() {
return id;
......
......@@ -103,6 +103,7 @@
<result column="TEMPLATE_ID" jdbcType="INTEGER" property="templateId"/>
<result column="TEMPLATE_NAME" jdbcType="VARCHAR" property="templateName"/>
<result column="TEMPLATE_CODE" jdbcType="VARCHAR" property="templateCode"/>
<result column="REPORT_TYPE" jdbcType="INTEGER" property="reportType"/>
</resultMap>
<!--TODO: 考虑项目库表迁移-->
......@@ -112,13 +113,15 @@
D.period AS PERIOD,
C.id AS TEMPLATE_ID,
C.name AS TEMPLATE_NAME,
C.code AS TEMPLATE_CODE
C.code AS TEMPLATE_CODE,
C.reportType AS REPORT_TYPE
FROM
(
SELECT
A.id as ID,
A.name AS NAME,
A.code AS CODE
A.code AS CODE,
A.report_type AS reportType
FROM
template A
WHERE
......
......@@ -54,9 +54,11 @@ constant.payTaxTypeList = [
{value: 2, name: '小规模纳税人'}];
constant.citReportTypeList = [
{value: 1, name: '纳税申报表'},
{value: 2, name: '季度预缴表'},
{value: 3, name: '工作底稿'}];
{ value: 1, name: 'TaxReturnType',orderIndex:2 },
{ value: 2, name: 'QuarterlyFilingReturnType', orderIndex: 3 },
{ value: 3, name: 'WorkingPaperType', orderIndex: 1 },
{ value: 4, name: 'DocumentListType', orderIndex: 4 },
{ value: 5, name: 'OtherTaxes', orderIndex: 5 }];
constant.cfReportTypeList = [
{value: 1, name: '企业所得税预算'},
......
......@@ -129,7 +129,13 @@ commonModule.factory('enums', ['$translate', function ($translate) {
CF: "11",
AssetsManage: "12"
},
reportType: {
taxReturn: 1,
prepay: 2,
workingPaper: 3,
documentList: 4,
others: 5
},
//发票类型
invoiceType: {
VATInvoice: 1,
......
vatModule.controller('VatReportLayoutController', ['$scope', '$log', '$q', 'loginContext',
'$translate', '$location', 'templateGroupService', 'vatSessionService', 'vatReportService', '$state',
function ($scope, $log, $q, loginContext, $translate, $location, templateGroupService, vatSessionService, vatReportService, $state) {
'$translate', '$location', 'templateGroupService', 'vatSessionService', 'vatReportService', '$state','enums',
function ($scope, $log, $q, loginContext, $translate, $location, templateGroupService, vatSessionService, vatReportService, $state,enums) {
'use strict';
$log.debug('VatReportLayoutController.ctor()...');
......@@ -40,88 +40,145 @@
}
if ($scope.hasTaxReturnPermission && $scope.hasQueryTaxReturnPermission) {
var diffArr = ['会计数据统计','出口数据比对','进项税额差异分析表','收入差异分析表'];
// var templates = _.chain
// 获取 申报表 Report Template
var diffRtnGrp = {name:'差异分析表', children:[],orderIndex:1};
var taxRtnGrp = {
name: 'TaxReturn',
children: _.chain(result[1].data.data)
.sortBy(function(x){
return x.templateCode;
})
.map(function(x){
var nameIndex;
// var tempName = x.templateName.substr(x.templateName.length - 4);
if(x.templateName == ('增值税纳税申报表')){
nameIndex = 0;
} else if(x.templateName.search("一") != -1){
nameIndex = 1;
} else if(x.templateName.search("二") != -1){
nameIndex = 2;
} else if(x.templateName.search("三") != -1){
nameIndex = 3;
} else if(x.templateName.search("四") != -1){
nameIndex = 4;
} else if(x.templateName.search("五") != -1){
nameIndex = 5;
} else if(x.templateName.search('代扣代缴') != -1){
nameIndex = 6;
} else if(x.templateName.search('海关专用') != -1){
nameIndex = 7;
} else if(x.templateName.search('增值税减免税申报明细表') != -1){
nameIndex = 8;
} else if(x.templateName.search('营改增') != -1){
nameIndex = 9;
} else if(x.templateName.search('附加税报表') != -1){
nameIndex = 10;
} else {
nameIndex = 20;
if($.inArray(x.templateName, diffArr) != -1){
diffRtnGrp.children.push(x);
var len = grps.length;//初始化第一个排序号
var grpByType = _.groupBy(result[1].data.data, 'reportType');
_.each(grpByType, function (val, key) {
var typeName = 'TaxReturnType';
var parentId = '2';
if (key != null || key == "null") {
//兼容以前的的 vat报表 类型 为 null 的情况
var idx = 1;
var obj = _.find(constant.citReportTypeList, { 'value': parseInt(key) });
if (obj != null) {
typeName = obj.name;
idx = len + obj.orderIndex;
}
}
if (parseInt(key) == enums.reportType.taxReturn) {
parentId = '2';
} else if (parseInt(key) == enums.reportType.workingPaper) {
parentId = '4';
}
// 获取 申报表 Report Template
var taxRtnGrp = {
name: typeName,
children: _.map(val, function (x) {
if(parentId === '4')
{
return {
reportId: x.id,
id: x.templateId,
name: x.templateName,
code: x.templateCode
}
}
return {
id:x.id,
templateId:x.templateId,
templateName:x.templateName,
templateCode:x.templateCode,
nameIndex:nameIndex
}
})
.filter(function(x){
return $.inArray(x.templateName, diffArr) == -1;
})
.sortBy(function(x){
return x.nameIndex;
})
.map(function (x) {
return {
reportId: x.id,
id: x.templateId,
name: x.templateName,
code: x.templateCode
};
}).value(),
orderIndex: grps.length
};
diffRtnGrp.children = _.chain(diffRtnGrp.children)
.map(function(x){
return {
reportId: x.id,
id: x.templateId,
name: x.templateName,
code: x.templateCode
};
}).value();
grps.push(taxRtnGrp);
grps.push(diffRtnGrp);
else
{
return {
reportId: x.id,
id: x.templateId,
name: x.templateName,
code: x.templateCode
}
}
}),
orderIndex: idx
};
if (parentId === '2' && $scope.hasTaxReturnPermission && $scope.hasQueryTaxReturnPermission) {
grps.push(taxRtnGrp);
}
else if (parentId === '4' && $scope.hasWorkingPaperTypePermission && $scope.hasQueryWorkingPaperTypePermission) {
grps.push(taxRtnGrp);
}
else {
//没权限就不加入列表
}
});
}
// var diffArr = ['会计数据统计','出口数据比对','进项税额差异分析表','收入差异分析表'];
// // var templates = _.chain
// // 获取 申报表 Report Template
// var diffRtnGrp = {name:'差异分析表', children:[],orderIndex:1};
// var taxRtnGrp = {
// name: 'TaxReturn',
// children: _.chain(result[1].data.data)
// .sortBy(function(x){
// return x.templateCode;
// })
// .map(function(x){
// var nameIndex;
// // var tempName = x.templateName.substr(x.templateName.length - 4);
// if(x.templateName == ('增值税纳税申报表')){
// nameIndex = 0;
// } else if(x.templateName.search("一") != -1){
// nameIndex = 1;
// } else if(x.templateName.search("二") != -1){
// nameIndex = 2;
// } else if(x.templateName.search("三") != -1){
// nameIndex = 3;
// } else if(x.templateName.search("四") != -1){
// nameIndex = 4;
// } else if(x.templateName.search("五") != -1){
// nameIndex = 5;
// } else if(x.templateName.search('代扣代缴') != -1){
// nameIndex = 6;
// } else if(x.templateName.search('海关专用') != -1){
// nameIndex = 7;
// } else if(x.templateName.search('增值税减免税申报明细表') != -1){
// nameIndex = 8;
// } else if(x.templateName.search('营改增') != -1){
// nameIndex = 9;
// } else if(x.templateName.search('附加税报表') != -1){
// nameIndex = 10;
// } else {
// nameIndex = 20;
// if($.inArray(x.templateName, diffArr) != -1){
// diffRtnGrp.children.push(x);
// }
// }
// return {
// id:x.id,
// templateId:x.templateId,
// templateName:x.templateName,
// templateCode:x.templateCode,
// nameIndex:nameIndex
// }
// })
// .filter(function(x){
// return $.inArray(x.templateName, diffArr) == -1;
// })
// .sortBy(function(x){
// return x.nameIndex;
// })
// .map(function (x) {
// return {
// reportId: x.id,
// id: x.templateId,
// name: x.templateName,
// code: x.templateCode
// };
// }).value(),
// orderIndex: grps.length
// };
// diffRtnGrp.children = _.chain(diffRtnGrp.children)
// .map(function(x){
// return {
// reportId: x.id,
// id: x.templateId,
// name: x.templateName,
// code: x.templateCode
// };
// }).value();
// grps.push(taxRtnGrp);
// grps.push(diffRtnGrp);
// }
$scope.groups = _.chain(grps).sortBy(function (x) {
return x.orderIndex;
// return x.children.name;
}).map(function (x) {
x.isExpand = true;
return x;
......
......@@ -16,7 +16,7 @@
<a ui-sref-active="active" data-template-id="{{menu.id}}"
ng-class="{'active':selectedTemplateId===menu.id}"
ui-sref=".reportView({ id: menu.reportId, templateid: menu.id, name:menu.name,templatecode:menu.code })"
ng-bind-html="::menu.name"></a>
ng-bind-html="::menu.code+'_'+menu.name"></a>
</div>
</div>
</li>
......
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