templateGroup.svc.js 2.97 KB
Newer Older
eddie.woo's avatar
eddie.woo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
// web service proxy for standard account
webservices.factory('templateGroupService', ['$http', 'apiConfig', 'httpCacheService', function ($http, apiConfig, httpCacheService) {
    'use strict';
    return {
        getall: function () {
            return $http.get('/templateGroup/getall', apiConfig.create());
        },
        getByServiceType: function (serviceTypeID,taxPayType) {
            return $http.get('/templateGroup/getByServiceType/' + serviceTypeID + '/' + taxPayType , apiConfig.create());
        },
        addTemplateGroup: function (templateGroup) {
            return $http.post('/templateGroup/addTemplateGroup', templateGroup, apiConfig.create());
        },
        addTemplateGroupWithoutTemplate: function (templateGroup) {
            return $http.post('/templateGroup/templateGroup/withoutTemplate', templateGroup, apiConfig.create());
        },
        getTemplateList: function (templateGroupID, reportType) {
            return $http.get('/template/get?templateGroupID=' + templateGroupID + '&reportType=' + reportType, apiConfig.create());
        },
        getGroupTemplate: function (projectID, serviceType) {
            return $http.get('/template/getGroupTemplate?projectID=' + projectID + '&serviceType=' + serviceType, apiConfig.create());
        },
        getGroupTemplateByGroupID: function (templateGroupID, projectID) {
            return $http.get('/template/getGroupTemplateByGroupID?templateGroupID=' + templateGroupID + '&projectID=' + projectID, apiConfig.create());
        },
        getTemplateByTree:function (projectID, serviceType) {
            return $http.get('/template/getGroupTemplateTree?projectID=' + projectID + '&serviceType=' + serviceType, apiConfig.create());
        },
        getByIndustry: function (serviceTypeID, taxPayType, industryID) {
            return $http.get('/templateGroup/getByIndustry/' + serviceTypeID + '/' + industryID + '?taxPayType=' + (taxPayType || ''), apiConfig.create());
        }
        ,
        getTemplateUniqList:function(serviceTypeID,payTaxType,reportType,industryIDs){
            return $http.get('/template/getTemplateUniqList?serviceTypeID=' + serviceTypeID + '&payTaxType='+payTaxType + '&reportType=' + reportType + '&industryIDs='+industryIDs , apiConfig.create());
        }
        ,addExistTemplate:function(model){
            return $http.post('/template/addExistTemplate', model, apiConfig.create());
        }
        ,deleteTemplate:function(model){
            return $http.post('/template/deleteTemplate', model, apiConfig.create());
        }
        ,updateTemplateName:function(model){
            return $http.post('/template/updateTemplateName', model, apiConfig.create());
        },
        deleteTemplateGroup:function(model){
            return $http.post('/templateGroup/deleteTemplateGroup', model, apiConfig.create());
        },
        updateTemplateGroupName:function(model){
            return $http.post('/templateGroup/updateTemplateGroupName', model, apiConfig.create());
        }
    };
}]);