Commit b2010dc5 authored by frank.xa.zhang's avatar frank.xa.zhang

add report configuration

parent b28f9fe8
package pwc.taxtech.atms.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import pwc.taxtech.atms.entitiy.ServiceType;
import pwc.taxtech.atms.service.ServiceTypeService;
@RestController
@RequestMapping("api/v1/servicetype")
public class ServiceTypeController {
@Autowired
private ServiceTypeService serviceTypeService;
@RequestMapping(value="getlist",method=RequestMethod.GET, produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
public @ResponseBody List<ServiceType> GetServiceTypes(){
return serviceTypeService.GetServiceTypes();
}
}
package pwc.taxtech.atms.service;
import java.util.List;
import pwc.taxtech.atms.entitiy.ServiceType;
public interface ServiceTypeService {
List<ServiceType> GetServiceTypes();
}
package pwc.taxtech.atms.service.impl;
import java.util.List;
import org.springframework.stereotype.Service;
import pwc.taxtech.atms.entitiy.ServiceType;
import pwc.taxtech.atms.entitiy.ServiceTypeExample;
import pwc.taxtech.atms.service.ServiceTypeService;
@Service
public class ServiceTypeServiceImpl extends AbstractService implements ServiceTypeService {
@Override
public List<ServiceType> GetServiceTypes() {
return serviceTypeMapper.selectByExample(new ServiceTypeExample());
}
}
systemConfigurationModule.directive('declarationFormConfiguration', ['$log',
function ($log) {
'use strict';
$log.debug('declarationFormConfiguration.ctor()...');
return {
restrict: 'E',
templateUrl: '/app/admin/systemConfiguration/declarationFormConfiguration/declaration-form-configuration.html' + '?_=' + Math.random(),
replace: true,
scope: {
templateGroupId: '@',
templateId: '@',
cellTemplateId: '@'
},
controller: 'DeclarationFormConfigurationController',
link: function (scope, element) {
$("#editReportFormulaPop").draggable({ cursor: "cursor", scroll: true, cancel: 'input, label, .btn, .form-control, .close, div.label, .has-error' });
$("#editReportFormulaPop").resizable({
minHeight: 610,
maxHeight: 610,
minWidth: 500
});
//$(".editReportFormulaPop-modal-content").draggable({ cursor: "cursor", scroll: true, cancel: 'input, label, .btn, .form-control, .close, div.label, .has-error' });
$(".left").on("click", function (e) {
e.stopPropagation();
});
$('#btnCancel').on('click', function () {
$('.templates-save-form').css('display', 'none');
});
// Work-around for DX grid height issue.
$('#editReportFormulaPop').on('shown.bs.modal', function () {
scope.refreshGrids();
});
scope.refreshGrids = function () {
$("#voucherGrid").dxDataGrid("instance").refresh();
$("#modelGrid").dxDataGrid("instance").refresh();
};
scope.toggleSaveAs = function () {
$('.templates-save-form').css('display', 'block');
};
scope.showLeftMenu = function () {
if ($('.left').is(":hidden")) {
$(".left").slideDown('slow');
} else {
$(".left").slideUp('slow');
}
$(document).one("click", function () {
$(".left").slideUp('slow');
});
event.stopPropagation();
};
scope.renderFinish = function () {
$('.templates-menus').first().addClass('active');
};
scope.refreshCategorySelect = function (data) {
// Change the appearance of isteven-multi-select, show the checkboxes of the
// options which were hidden, but the checkboxes always toggle twice.
// Add this to make checkboxes which were hidden work correctly.
var idx = _.findIndex(scope.invoiceOption.categoryOptions, { 'key': data.key });
if (idx >= 0) {
var chkbox = element.find('.invoice-category-select .multiSelectItem .checkbox:eq(' + idx + ')');
if (data.ticked && !chkbox.prop('checked')) {
chkbox.prop('checked', true);
}
else if (!data.ticked && chkbox.prop('checked')) {
chkbox.prop('checked', false);
}
}
};
scope.refreshTaxRateSelect = function (data) {
// Change the appearance of isteven-multi-select, show the checkboxes of the
// options which were hidden, but the checkboxes always toggle twice.
// Add this to make checkboxes which were hidden work correctly.
var idx = _.findIndex(scope.invoiceOption.rateOptions, { 'key': data.key });
if (idx >= 0) {
var chkbox = element.find('.tax-rate-select .multiSelectItem .checkbox:eq(' + idx + ')');
if (data.ticked && !chkbox.prop('checked')) {
chkbox.prop('checked', true);
}
else if (!data.ticked && chkbox.prop('checked')) {
chkbox.prop('checked', false);
}
}
};
}
};
}
]).directive('repeatDone', function () {
return {
link: function (scope, element, attrs) {
if (scope.$last) {
scope.$eval(attrs.repeatDone);
$('.template-menu').on('click', function () {
$(this).parent().parent().parent().children().each(function () {
$(this).removeClass('active');
});
$(this).parent().parent().addClass('active');
});
$('.templates-menu').on('click', function () {
$(this).parent().parent().children().each(function () {
$(this).removeClass('active');
});
$(this).parent().addClass('active');
});
$('.templates-menus').on('click', function () {
$(this).parent().children().each(function () {
$(this).removeClass('active');
});
$(this).addClass('active');
});
}
}
}
});
\ No newline at end of file
...@@ -764,59 +764,59 @@ var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMe ...@@ -764,59 +764,59 @@ var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMe
// this is required to add controller/directive/filter/service after angular bootstrap // this is required to add controller/directive/filter/service after angular bootstrap
bindModule(systemConfigurationModule, $controllerProvider, $compileProvider, $filterProvider, $provide); bindModule(systemConfigurationModule, $controllerProvider, $compileProvider, $filterProvider, $provide);
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationFormConfiguration', name: 'declarationFormConfiguration',
// url: '/declarationFormConfiguration', url: '/declarationFormConfiguration',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// }], }],
// template: '<declaration-form-configuration></declaration-form-configuration>' template: '<declaration-form-configuration></declaration-form-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
//
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationTemplateConfiguration', name: 'declarationTemplateConfiguration',
// url: '/declarationTemplateConfiguration', url: '/declarationTemplateConfiguration',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// }], }],
// template: '<declaration-template-configuration></declaration-template-configuration>' template: '<declaration-template-configuration></declaration-template-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
//
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationFormConfigurationLocation', name: 'declarationFormConfigurationLocation',
// url: '/declarationFormConfiguration/{templateGroupId}/{templateId}/{cellTemplateId}', url: '/declarationFormConfiguration/{templateGroupId}/{templateId}/{cellTemplateId}',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// $scope.templateGroupId = $stateParams.templateGroupId; $scope.templateGroupId = $stateParams.templateGroupId;
// $scope.templateId = $stateParams.templateId; $scope.templateId = $stateParams.templateId;
// $scope.cellTemplateId = $stateParams.cellTemplateId; $scope.cellTemplateId = $stateParams.cellTemplateId;
// }], }],
// template: '<declaration-form-configuration template-group-id="{{templateGroupId}}" template-id="{{templateId}}" cell-template-id="{{cellTemplateId}}"></declaration-form-configuration>' template: '<declaration-form-configuration template-group-id="{{templateGroupId}}" template-id="{{templateId}}" cell-template-id="{{cellTemplateId}}"></declaration-form-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
// //
// $stateProvider.state({ // $stateProvider.state({
// name: 'subjectCorresponding', // name: 'subjectCorresponding',
......
...@@ -1217,59 +1217,59 @@ var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMe ...@@ -1217,59 +1217,59 @@ var systemConfigurationModule = angular.module('app.systemConfiguration', ['ngMe
// this is required to add controller/directive/filter/service after angular bootstrap // this is required to add controller/directive/filter/service after angular bootstrap
bindModule(systemConfigurationModule, $controllerProvider, $compileProvider, $filterProvider, $provide); bindModule(systemConfigurationModule, $controllerProvider, $compileProvider, $filterProvider, $provide);
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationFormConfiguration', name: 'declarationFormConfiguration',
// url: '/declarationFormConfiguration', url: '/declarationFormConfiguration',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// }], }],
// template: '<declaration-form-configuration></declaration-form-configuration>' template: '<declaration-form-configuration></declaration-form-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
//
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationTemplateConfiguration', name: 'declarationTemplateConfiguration',
// url: '/declarationTemplateConfiguration', url: '/declarationTemplateConfiguration',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// }], }],
// template: '<declaration-template-configuration></declaration-template-configuration>' template: '<declaration-template-configuration></declaration-template-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
//
// $stateProvider.state({ $stateProvider.state({
// name: 'declarationFormConfigurationLocation', name: 'declarationFormConfigurationLocation',
// url: '/declarationFormConfiguration/{templateGroupId}/{templateId}/{cellTemplateId}', url: '/declarationFormConfiguration/{templateGroupId}/{templateId}/{cellTemplateId}',
// views: { views: {
// '@': { '@': {
// controller: ['$scope', '$stateParams', 'appTranslation', controller: ['$scope', '$stateParams', 'appTranslation',
// function ($scope, $stateParams, appTranslation) { function ($scope, $stateParams, appTranslation) {
// appTranslation.load([appTranslation.systemConfiguration]); appTranslation.load([appTranslation.systemConfiguration]);
// $scope.templateGroupId = $stateParams.templateGroupId; $scope.templateGroupId = $stateParams.templateGroupId;
// $scope.templateId = $stateParams.templateId; $scope.templateId = $stateParams.templateId;
// $scope.cellTemplateId = $stateParams.cellTemplateId; $scope.cellTemplateId = $stateParams.cellTemplateId;
// }], }],
// template: '<declaration-form-configuration template-group-id="{{templateGroupId}}" template-id="{{templateId}}" cell-template-id="{{cellTemplateId}}"></declaration-form-configuration>' template: '<declaration-form-configuration template-group-id="{{templateGroupId}}" template-id="{{templateId}}" cell-template-id="{{cellTemplateId}}"></declaration-form-configuration>'
// } }
// }, },
// resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration), resolve: scriptDependencyProvider.createDependenciesMap(scriptDependencyProvider.systemConfiguration),
// deepStateRedirect: true, deepStateRedirect: true,
// sticky: true sticky: true
// }); });
// //
// $stateProvider.state({ // $stateProvider.state({
// name: 'subjectCorresponding', // name: 'subjectCorresponding',
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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