OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-06 6adb341db180240e0af34ace40100912d4ed5257
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
/**
 * Created by wisestone on 2018-01-04.
 */
'use strict';
 
define(['app'], function (app) {
    app.factory("Issue", ['$http', '$log', '$upload', '$rootScope', function ($http, $log, $upload, $rootScope) {
 
        //  파일 업로드 진행율을 표시해준다.
        function fileUploadProgress(evt) {
            if (evt.config.file.length > 0) {
 
                var progress = parseInt(100.0 * evt.loaded / evt.total);
 
                var body = {
                    display : progress < 100,    //  표시 여부
                    clientFileCount : evt.config.file.length,  //  클라이언트 업로드 파일 개수
                    clientProgress: progress + "%", //  진행률
                    serverFileName : null,    //  서버 업로드 파일 명
                    serverProgress : null,
                    totalFileCount : null, //  전체 업로드 개수
                    uploadFileCount : null //  진행중인 업로드 파일 개수
                };
 
                $rootScope.$broadcast("displayFileUpload", body);
            }
        }
 
        return {
            find : function (conditions) {
                return $http.post("issue/find", conditions).then(function (response) {
                    $log.debug("이슈 목록 데이터 : ", response);
                    return response;
                });
            },
            findPartners : function (conditions) {
                return $http.post("issue/findPartner", conditions).then(function (response) {
                    $log.debug("사용하는 파트너 목록 데이터 : ", response);
                    return response;
                });
            },
            findReadyDepartments : function (conditions) {
                return $http.post("issue/findReadyDepartments", conditions).then(function (response) {
                    $log.debug("워크플로우의 생성 상태의 담당부서 목록 데이터 : ", response);
                    return response;
                });
            },
            add : function (conditions) {
                conditions.url = "issue/add";
                return $upload.upload(conditions).progress(function (evt) {
                    //  파일 업로드 진행율을 표시해준다.
                    fileUploadProgress(evt);
 
                }).then(function (response) {
                    $log.debug("이슈 생성 결과 : ", response);
                    return response;
                });
            },
            relAdd : function (conditions) {
                conditions.url = "issue/relIssueAdd";
                return $upload.upload(conditions).progress(function (evt) {
                    //  파일 업로드 진행율을 표시해준다.
                    fileUploadProgress(evt);
 
                }).then(function (response) {
                    $log.debug("이슈 생성 결과 : ", response);
                    return response;
                });
            },
            downAdd : function (conditions) {
                conditions.url = "issue/downIssueAdd";
                return $upload.upload(conditions).progress(function (evt) {
                    //  파일 업로드 진행율을 표시해준다.
                    fileUploadProgress(evt);
 
                }).then(function (response) {
                    $log.debug("이슈 생성 결과 : ", response);
                    return response;
                });
            },
            modifyParentIssue : function (conditions) {
                return $http.post("issue/modifyParentIssue", conditions).then(function (response) {
                    $log.debug("상위 일감 수정 결과 : ", response);
                    return response;
                });
            },
            modify : function (conditions) {
                conditions.url = "issue/modify";
                return $upload.upload(conditions).progress(function (evt) {
                    //  파일 업로드 진행율을 표시해준다.
                    fileUploadProgress(evt);
 
                }).then(function (response) {
                    $log.debug("이슈 수정 결과 : ", response);
                    return response;
                });
            },
 
            detail : function (conditions) {
                return $http.post("issue/detail", conditions).then(function (response) {
                    $log.debug("이슈 상세 데이터 : ", response);
                    return response;
                });
            },
            remove : function (conditions) {
                return $http.post("issue/remove", conditions).then(function (response) {
                    $log.debug("이슈 삭제 결과 : ", response);
                    return response;
                });
            },
            removeAllIssues : function (conditions) {
                return $http.post("issue/removeAll", conditions).then(function (response) {
                    $log.debug("하위이슈 삭제 결과 : ", response);
                    return response;
                });
            },
            /*removeDownIssues : function (conditions) {
                return $http.post("issue/removeDown", conditions).then(function (response) {
                    $log.debug("하위이슈 삭제 결과 : ", response);
                    return response;
                });
            },*/
            importExcel : function (conditions) {
                conditions.url = "issue/importExcel";
                return $upload.upload(conditions).then(function (response) {
                    $log.debug("이슈 Import 결과 : ", response);
                    return response;
                });
            },
            modifyMultiIssueStatus : function (conditions) {
                return $http.post("issue/modifyMultiIssueStatus", conditions).then(function (response) {
                    $log.debug("다중 이슈 상태 변경 결과 : ", response);
                    return response;
                });
            },
            sendEmail : function (conditions) {
                return $http.post("issue/sendEmail", conditions).then(function (response) {
                    $log.debug("이슈 이메일 발송 결과 : ", response);
                    return response;
                });
            },
            sendEmailPartners : function (conditions) {
                return $http.post("issue/sendEmailPartners", conditions).then(function (response) {
                    $log.debug("이슈 이메일 발송 결과 : ", response);
                    return response;
                });
            },
            sendCommonEmail : function (conditions) {
                return $http.post("issue/sendCommonEmail", conditions).then(function (response) {
                    $log.debug("이슈 이메일 발송 결과 : ", response);
                    return response;
                });
            }
        }
    }
    ])
});