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