OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-13 4545664bbece1b1b185945376b344b1660669a53
src/main/webapp/scripts/components/companyField/companyField.service.js
@@ -6,13 +6,44 @@
define([
    'app'
], function (app) {
    app.factory("CompanyField", ['$http', '$log', function ($http, $log) {
    app.factory("CompanyField", ['$http', '$log', '$upload', function ($http, $log, $upload) {
        return {
            find : function (conditions) {
                return $http.post("companyField/find", conditions).then(function (response) {
                    $log.debug("업체 필드 목록 데이터 : ", response);
                    return response;
                });
            },
            add : function (conditions) {
                return $http.post("companyField/add", conditions).then(function (response) {
                    $log.debug("업체 생성 결과 : ", response);
                    return response;
                });
            },
            modify : function (conditions) {
                return $http.post("companyField/modify", conditions).then(function (response) {
                    $log.debug("업체 수정 결과 : ", response);
                    return response;
                });
            },
            detail : function (conditions) {
                return $http.post("companyField/detail", conditions).then(function (response) {
                    $log.debug("업체 상세 : ", response);
                    return response;
                });
            },
            importExcel : function (conditions) {
                conditions.url = "companyField/importExcel";
                return $upload.upload(conditions).then(function (response) {
                    $log.debug("업체 Import 결과 : ", response);
                    return response;
                });
            },
            removes : function (conditions) {
                return $http.post("companyField/remove", conditions).then(function (response) {
                    $log.debug("업체 삭제 결과 : ", response);
                    return response;
                });
            }
        }
    }