프로젝트

일반

사용자정보

개정판 817531e4

ID817531e46193650e1f1733a1080ef65b5692ca2e
상위 f38fed51
하위 53393bae

KangIngu 이(가) 6년 이상 전에 추가함

Converter 최신 버전 업로드

차이점 보기:

ConvertService/ConverterService/ConvertionWebService/Conversion.asmx.cs
98 98
            }
99 99
            else
100 100
            {
101
                string _id = GetGuid(0, GuidGenerator.GetUniqueGuid()).ToString();
101
                //string _id = GetGuid(0, GuidGenerator.GetUniqueGuid()).ToString();
102
                string _id = shortGuid();
102 103

  
103 104
                using (DeepView_Entity _entity = new DeepView_Entity(ConnectStringBuilder.DeepViewConnectionString().ToString()))
104 105
                {
......
123 124
            }
124 125
        }
125 126

  
126
        private Guid GetGuid(int Count,Guid ID)
127
        {
128
            Guid _ID = ID;
129
            string _id = _ID.ToString();
130
            DeepView_Entity _entity = new DeepView_Entity(ConnectStringBuilder.DeepViewConnectionString().ToString());
127
        //private Guid GetGuid(int Count,Guid ID)
128
        //{
129
        //    Guid _ID = ID;
130
        //    string _id = _ID.ToString();
131
        //    DeepView_Entity _entity = new DeepView_Entity(ConnectStringBuilder.DeepViewConnectionString().ToString());
131 132

  
132
            if (_entity.CONVERTER_DOC.Where(c => c.ID == _id).Count() > 0)
133
            {
134
                _entity.Dispose();
133
        //    if (_entity.CONVERTER_DOC.Where(c => c.ID == _id).Count() > 0)
134
        //    {
135
        //        _entity.Dispose();
135 136

  
136
                if (Count > 10)
137
                {
138
                    new Exception("GetGuid : Not Generator");
139
                }
137
        //        if (Count > 10)
138
        //        {
139
        //            new Exception("GetGuid : Not Generator");
140
        //        }
140 141

  
141
                if (Count < 3)
142
                {
143
                    System.Threading.Thread.Sleep(3);
144
                }
142
        //        if (Count < 3)
143
        //        {
144
        //            System.Threading.Thread.Sleep(3);
145
        //        }
145 146

  
146
                GetGuid(Count++,GuidGenerator.GetUniqueGuid());
147
        //        GetGuid(Count++,GuidGenerator.GetUniqueGuid());
148
        //    }
149

  
150
        //    return ID;
151
        //}
152

  
153
        //GUID생성(최민수 사원 수정)
154
        public string shortGuid()
155
        {
156
            byte[] bytes = new byte[16];
157
            using (var provider = System.Security.Cryptography.RandomNumberGenerator.Create())
158
            {
159
                provider.GetBytes(bytes);
147 160
            }
148 161

  
149
            return ID;
162
            var guid = new Guid(bytes);
163

  
164
            return Convert.ToBase64String(guid.ToByteArray())
165
                .Substring(0, 10)
166
                .Replace("/", "")
167
                .Replace("+", "") + DateTime.UtcNow.Ticks.ToString("x");
150 168
        }
151 169
    }
152 170
}
ConvertService/ConverterService/DZConverterLib/DZConverter.cs
74 74
                ConverterMakeError(this, new MakeConverterErrorArgs
75 75
                {
76 76
                    ThreadStop = ThreadStop,
77
                    ConverterID = Guid.Parse(ConverterItem.ID),
77
                    ConverterID = ConverterItem.ID,
78 78
                    _Exception = _Exception,
79 79
                    ErrorCode = ErrorCode,
80 80
                    Level = Level
ConvertService/ConverterService/DZConverterLib/Enums/FinalStatus.cs
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5

  
6
namespace DZConverterLib.Enums
7
{
8
    public enum FinalStatus
9
    {
10
        /// <summary>
11
        /// Final PDF를 만들기 위한 순서에 추가
12
        /// </summary>
13
        Insert = 0,
14

  
15
        /// <summary>
16
        /// 앞의 final이 처리중일때 대기
17
        /// </summary>
18
        Wait = 1,
19

  
20
        /// <summary>
21
        /// 만들고 있는중
22
        /// 이때 데이터베이스에 Current Page는 만들고 있는 페이지
23
        /// </summary>
24
        Create = 2,
25

  
26
        /// <summary>
27
        /// final pdf 완료시
28
        /// </summary>
29
        Seccess = 99,
30

  
31
        /// <summary>
32
        /// 에러
33
        /// </summary>
34
        Error = 88
35
    }
36
}
ConvertService/ConverterService/DZConverterLib/Events/EventMembers.cs
17 17
    {
18 18
        public int Level { get; set; }
19 19
        public bool ThreadStop { get; set; }
20
        public Guid ConverterID { get; set; }
20
        public string ConverterID { get; set; }
21 21
        public string ErrorCode { get; set; }
22 22
        public string _Exception{get;set;}
23 23
    }

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)