• R/O
  • SSH
  • HTTPS

mlapplication: Commit


Commit MetaInfo

Revision73 (tree)
Time2018-02-28 15:46:18
Authoryukio_miura

Log Message

(empty log message)

Change Summary

Incremental Difference

--- trunk/ML.DBAccess/DataBase/01.SQL/03 TransactSQL/Z130_CMP.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/03 TransactSQL/Z130_CMP.sql (revision 73)
@@ -278,7 +278,7 @@
278278 WHERE M150_CODE1 NOT IN
279279 (SELECT Z130_M150CD1 FROM Z130_F
280280 WHERE Z130_DATE1 = @DT)
281- AND M150_KUBN4 = 0
281+ AND M150_KUBN14 = 0
282282
283283 OPEN Z130_CUR1
284284 FETCH NEXT FROM Z130_CUR1 INTO @CD1
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/C150_F.sql (revision 0)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/C150_F.sql (revision 73)
@@ -0,0 +1,74 @@
1+ --カレンダー設定
2+ --作成日:2018/02/28
3+ --更新日:
4+
5+CREATE TABLE C150_F
6+(
7+C150_CALNO nvarchar(2),
8+C150_YYMM1 datetime,
9+C150_DATE01 numeric(1),
10+C150_DATE02 numeric(1),
11+C150_DATE03 numeric(1),
12+C150_DATE04 numeric(1),
13+C150_DATE05 numeric(1),
14+C150_DATE06 numeric(1),
15+C150_DATE07 numeric(1),
16+C150_DATE08 numeric(1),
17+C150_DATE09 numeric(1),
18+C150_DATE10 numeric(1),
19+C150_DATE11 numeric(1),
20+C150_DATE12 numeric(1),
21+C150_DATE13 numeric(1),
22+C150_DATE14 numeric(1),
23+C150_DATE15 numeric(1),
24+C150_DATE16 numeric(1),
25+C150_DATE17 numeric(1),
26+C150_DATE18 numeric(1),
27+C150_DATE19 numeric(1),
28+C150_DATE20 numeric(1),
29+C150_DATE21 numeric(1),
30+C150_DATE22 numeric(1),
31+C150_DATE23 numeric(1),
32+C150_DATE24 numeric(1),
33+C150_DATE25 numeric(1),
34+C150_DATE26 numeric(1),
35+C150_DATE27 numeric(1),
36+C150_DATE28 numeric(1),
37+C150_DATE29 numeric(1),
38+C150_DATE30 numeric(1),
39+C150_DATE31 numeric(1),
40+C150_KUBN01 numeric(1),
41+C150_KUBN02 numeric(1),
42+C150_KUBN03 numeric(1),
43+C150_KUBN04 numeric(1),
44+C150_KUBN05 numeric(1),
45+C150_KUBN06 numeric(1),
46+C150_KUBN07 numeric(1),
47+C150_KUBN08 numeric(1),
48+C150_KUBN09 numeric(1),
49+C150_KUBN10 numeric(1),
50+C150_KUBN11 numeric(1),
51+C150_KUBN12 numeric(1),
52+C150_KUBN13 numeric(1),
53+C150_KUBN14 numeric(1),
54+C150_KUBN15 numeric(1),
55+C150_KUBN16 numeric(1),
56+C150_KUBN17 numeric(1),
57+C150_KUBN18 numeric(1),
58+C150_KUBN19 numeric(1),
59+C150_KUBN20 numeric(1),
60+C150_KUBN21 numeric(1),
61+C150_KUBN22 numeric(1),
62+C150_KUBN23 numeric(1),
63+C150_KUBN24 numeric(1),
64+C150_KUBN25 numeric(1),
65+C150_KUBN26 numeric(1),
66+C150_KUBN27 numeric(1),
67+C150_KUBN28 numeric(1),
68+C150_KUBN29 numeric(1),
69+C150_KUBN30 numeric(1),
70+C150_KUBN31 numeric(1),
71+C150_UPD1 nvarchar(40),
72+CONSTRAINT C150_PK PRIMARY KEY CLUSTERED (C150_CALNO,C150_YYMM1)
73+)
74+GO
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/Z121_F.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/Z121_F.sql (revision 73)
@@ -4,7 +4,7 @@
44
55 CREATE TABLE Z121_F
66 (
7-Z121_M130CD1 nvarchar(7),
7+Z121_M140CD1 nvarchar(7),
88 Z121_DATE1 datetime,
99 Z121_DATE2 datetime,
1010 Z121_DATE3 datetime,
@@ -17,6 +17,6 @@
1717 Z121_KING42 numeric(14,4),
1818 Z121_KING51 numeric(11),
1919 Z121_UPD1 nvarchar(40),
20-CONSTRAINT Z121_PK PRIMARY KEY CLUSTERED (Z121_M130CD1,Z121_DATE1)
20+CONSTRAINT Z121_PK PRIMARY KEY CLUSTERED (Z121_M140CD1,Z121_DATE1)
2121 )
2222 GO
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_C_Bat.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_C_Bat.sql (revision 73)
@@ -6,3 +6,8 @@
66 @C123_F
77 @C129_F
88 @C130_F
9+@C140_F
10+@C150_F
11+@Y110_F
12+@Y140_F
13+@Y141_F
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/C140_F.sql (revision 0)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/C140_F.sql (revision 73)
@@ -0,0 +1,18 @@
1+ --プリンタ設定
2+ --作成日:2018/02/26
3+ --更新日:
4+
5+CREATE TABLE C140_F
6+(
7+C140_CP1 nvarchar(128),
8+C140_REPID nvarchar(20),
9+C140_REPNM nvarchar(40),
10+C140_PRTNAME nvarchar(128),
11+C140_TOPM numeric(3,1),
12+C140_BTMM numeric(3,1),
13+C140_LFTM numeric(3,1),
14+C140_RGHM numeric(3,1),
15+C140_UPD1 nvarchar(40),
16+CONSTRAINT C140_PK PRIMARY KEY CLUSTERED (C140_CP1,C140_REPID)
17+)
18+GO
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_L_Bat.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_L_Bat.sql (revision 73)
@@ -7,10 +7,3 @@
77 @L140_F
88 @L150_F
99 @L151_F
10-@Z110_F
11-@Z111_F
12-@Z120_F
13-@Z121_F
14-@Z130_F
15-@Z131_F
16-@Z132_F
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_Y_Bat.sql (revision 0)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_Y_Bat.sql (revision 73)
@@ -0,0 +1,3 @@
1+@Y110_F
2+@Y140_F
3+@Y141_F
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_Z_Bat.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/_Z_Bat.sql (revision 73)
@@ -1,12 +1,3 @@
1-@L110_F
2-@L120_F
3-@L124_F
4-@L125_F
5-@L127_F
6-@L130_F
7-@L140_F
8-@L150_F
9-@L151_F
101 @Z110_F
112 @Z111_F
123 @Z120_F
--- trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/Z120_F.sql (revision 72)
+++ trunk/ML.DBAccess/DataBase/01.SQL/01 Create/02 Table/Z120_F.sql (revision 73)
@@ -4,7 +4,7 @@
44
55 CREATE TABLE Z120_F
66 (
7-Z120_M130CD1 nvarchar(7),
7+Z120_M140CD1 nvarchar(7),
88 Z120_DATE1 datetime,
99 Z120_DATE2 datetime,
1010 Z120_DATE3 datetime,
@@ -17,6 +17,6 @@
1717 Z120_KING42 numeric(14,4),
1818 Z120_KING51 numeric(11),
1919 Z120_UPD1 nvarchar(40),
20-CONSTRAINT Z120_PK PRIMARY KEY CLUSTERED (Z120_M130CD1,Z120_DATE1)
20+CONSTRAINT Z120_PK PRIMARY KEY CLUSTERED (Z120_M140CD1,Z120_DATE1)
2121 )
2222 GO
--- trunk/ML.Common.Function/Class/Path.vb (revision 72)
+++ trunk/ML.Common.Function/Class/Path.vb (revision 73)
@@ -15,7 +15,7 @@
1515 Public Class Path
1616
1717 ''' <summary>ClickOnceデータディレクトリパスを取得する</summary>
18- Public Shared Function GetClickOnceDataDirectory()
18+ Public Shared Function GetClickOnceDataDirectory() As String
1919 Dim sDataDir As String = ""
2020
2121 '' ClickOnceアプリケーションかチェックする
@@ -34,6 +34,7 @@
3434 Else
3535 Return String.Empty
3636 End If
37+
3738 End Function
3839
3940 End Class
--- trunk/ML.Convert/DataModel/LoginInfo.vb (revision 72)
+++ trunk/ML.Convert/DataModel/LoginInfo.vb (revision 73)
@@ -62,7 +62,11 @@
6262 Public Sub New()
6363
6464 '' ClickOnceデータディレクトリを取得
65- Me.m_ClickOnceDataDirectory = ML.Common.Function.Path.GetClickOnceDataDirectory
65+ Try
66+ Me.m_ClickOnceDataDirectory = ML.Common.Function.Path.GetClickOnceDataDirectory
67+ Catch ex As Deployment.Application.InvalidDeploymentException
68+ Me.m_ClickOnceDataDirectory = String.Empty
69+ End Try
6670
6771 End Sub
6872
--- trunk/MLApp.TRN0000/Form2.vb (revision 72)
+++ trunk/MLApp.TRN0000/Form2.vb (revision 73)
@@ -5,9 +5,12 @@
55 End Sub
66
77 Private Sub Uc6Button14_Click(sender As System.Object, e As System.EventArgs) Handles Uc6Button14.Click
8- Me.Uc6DateText1.Value = CDate("2017/04/26")
9- Me.Uc6DateText1.Value = Nothing
10- Me.Uc6DateText1.Value = CDate("2017/04/26")
8+ 'Me.Uc6DateText1.Value = CDate("2017/04/26")
9+ 'Me.Uc6DateText1.Value = Nothing
10+ 'Me.Uc6DateText1.Value = CDate("2017/04/26")
11+
12+ Me.Uc6DateText1.Value = TRNLib.BzLogic.GetCalDate("01", 5, Now.Date)
13+
1114 End Sub
1215
1316 Private Sub Uc6DateText1_AfterUpdate(sender As System.Object, e As System.EventArgs) Handles Uc6DateText1.AfterUpdate
--- trunk/MLApp.TRN8000/TRN8920.designer.vb (revision 72)
+++ trunk/MLApp.TRN8000/TRN8920.designer.vb (revision 73)
@@ -48,6 +48,7 @@
4848 Me.M921_ORDER1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
4949 Me.M921_UPD1 = New System.Windows.Forms.DataGridViewTextBoxColumn()
5050 Me.MenuBtnPanel.SuspendLayout()
51+ CType(Me.m_dtM9, System.ComponentModel.ISupportInitialize).BeginInit()
5152 CType(Me.dgvTRN8920S1, System.ComponentModel.ISupportInitialize).BeginInit()
5253 CType(Me.M9_TRNDataSet, System.ComponentModel.ISupportInitialize).BeginInit()
5354 Me.Uc6GroupBox2.SuspendLayout()
@@ -387,6 +388,7 @@
387388 Me.Controls.Add(Me.Uc6GroupBox2)
388389 Me.Controls.Add(Me.lblDispMode)
389390 Me.Controls.Add(Me.dgvTRN8920S1)
391+ Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.Sizable
390392 Me.Name = "TRN8920"
391393 Me.Text = "区分マスタ"
392394 Me.Controls.SetChildIndex(Me.MenuBtnPanel, 0)
@@ -395,6 +397,7 @@
395397 Me.Controls.SetChildIndex(Me.Uc6GroupBox2, 0)
396398 Me.Controls.SetChildIndex(Me.dgvTRN8920S2, 0)
397399 Me.MenuBtnPanel.ResumeLayout(False)
400+ CType(Me.m_dtM9, System.ComponentModel.ISupportInitialize).EndInit()
398401 CType(Me.dgvTRN8920S1, System.ComponentModel.ISupportInitialize).EndInit()
399402 CType(Me.M9_TRNDataSet, System.ComponentModel.ISupportInitialize).EndInit()
400403 Me.Uc6GroupBox2.ResumeLayout(False)
--- trunk/MLApp.TRNLib/Class/dba/Trigger.vb (revision 72)
+++ trunk/MLApp.TRNLib/Class/dba/Trigger.vb (revision 73)
@@ -237,25 +237,30 @@
237237 Me.m_dtM9.GetData()
238238 sBatTriggerFilePath = Me.m_dtM9.DLookUp("M921_KBVAL2", sWHR)
239239
240- '' トリガー作成バッチファイルを読み込みトリガーリストを作成する
241- Using sr As New System.IO.StreamReader(sBatTriggerFilePath,
242- System.Text.Encoding.GetEncoding(ML.Common.Const.ChrCode.SHIFT_JIS))
243- While sr.Peek > -1
240+ '' トリガー作成バッチファイルパスの存在チェック
241+ If IO.File.Exists(sBatTriggerFilePath) = True Then
244242
245- '' SQLファイル名を取得する
246- Dim sSQLFileName As String = sr.ReadLine.Replace("@", String.Empty) & ML.Common.Const.Ext.SQLFILE_EXT
247- '' SQLファイルが格納されているディレクトリを取得する
248- Dim sBatTriggerFileDir As String = System.IO.Path.GetDirectoryName(sBatTriggerFilePath)
249- '' SQLファイルパスを取得する
250- Dim sSQLFilePath As String = System.IO.Path.Combine(sBatTriggerFileDir, sSQLFileName)
243+ '' トリガー作成バッチファイルを読み込みトリガーリストを作成する
244+ Using sr As New System.IO.StreamReader(sBatTriggerFilePath,
245+ System.Text.Encoding.GetEncoding(ML.Common.Const.ChrCode.SHIFT_JIS))
246+ While sr.Peek > -1
251247
252- '' SQLファイルに記述されているトリガーを取得する
253- Me.GetTriggerList(sList, sSQLFilePath)
248+ '' SQLファイル名を取得する
249+ Dim sSQLFileName As String = sr.ReadLine.Replace("@", String.Empty) & ML.Common.Const.Ext.SQLFILE_EXT
250+ '' SQLファイルが格納されているディレクトリを取得する
251+ Dim sBatTriggerFileDir As String = System.IO.Path.GetDirectoryName(sBatTriggerFilePath)
252+ '' SQLファイルパスを取得する
253+ Dim sSQLFilePath As String = System.IO.Path.Combine(sBatTriggerFileDir, sSQLFileName)
254254
255- End While
255+ '' SQLファイルに記述されているトリガーを取得する
256+ Me.GetTriggerList(sList, sSQLFilePath)
256257
257- End Using
258+ End While
258259
260+ End Using
261+
262+ End If
263+
259264 Catch ex As Exception
260265
261266 '' エラーログを出力する
--- trunk/MLApp.TRNLib/Class/BzLogic.vb (revision 72)
+++ trunk/MLApp.TRNLib/Class/BzLogic.vb (revision 73)
@@ -11,6 +11,7 @@
1111 ''' |更新者 |日付 |連番 |変更内容 |
1212 ''' +------------+-----------+-----+-------------------------------------------+
1313 ''' y.miura 2015.09.29 001 新規作成
14+''' y.miura 2018.02.28 002 GetCalDateメソッド追加
1415 ''' </history>
1516 Public Class BzLogic
1617
@@ -77,21 +78,84 @@
7778 iReadTime As Integer,
7879 dteTargetDate As Date) As Date
7980
80- '' 基点日の日付を取得
81- Dim iTargetDD As Integer = CInt(dteTargetDate.ToString("DD"))
8281 Dim iStep As Integer
82+ Dim iKadouCnt As Integer = 0
83+ Dim iAddDate As Integer = 0
84+ Dim sC150YYMMcond As String = String.Empty
85+ Dim iCalDateMaxDD As Integer
86+ Dim dteRetCalDate As Date
87+ Dim sOrderBy As String
88+
89+ '' 変数初期化
8390 If iReadTime < 0 Then
8491 iStep = -1
92+ sC150YYMMcond = "<="
93+ iCalDateMaxDD = 1
94+ sOrderBy = "DESC"
8595 Else
8696 iStep = 1
97+ sC150YYMMcond = ">="
98+ iCalDateMaxDD = 31
99+ sOrderBy = "ASC"
87100 End If
88101
102+ '' 基点日の日付+1を取得
103+ Dim iTargetDD As Integer = CInt(dteTargetDate.ToString("dd")) + iStep
104+
89105 '' カレンダー設定取得
90106 Dim dtC150 As New DataModel.C1_TRNDataSet.C150_FDataTable
91- dtC150.GetData("C150_CALNO=" & sCalNo.ToTextStr)
107+ Dim sWHR_C150 As String = String.Empty
108+ sWHR_C150 = "C150_CALNO=" & sCalNo.ToTextStr
109+ sWHR_C150 &= " AND C150_YYMM1" & sC150YYMMcond & dteTargetDate.ToString("yyyy/MM/01").ToDateStr
110+ dtC150.GetData(sWHR_C150, "C150_YYMM1 " & sOrderBy)
92111
112+ '' カレンダー設定ループ
113+ Dim bGetFlg As Boolean = False
114+ For Each drC150 As DataModel.C1_TRNDataSet.C150_FRow In dtC150.Rows
115+
116+ For iC150DDLoop As Integer = iTargetDD To iCalDateMaxDD Step iStep
117+
118+ '' 稼働区分取得
119+ Dim iC150KB As Integer = drC150("C150_KUBN" & iC150DDLoop.ToString("00"))
120+
121+ '' 稼働区分判定
122+ If iC150KB = 0 Then
123+
124+ '' 稼働日数カウント
125+ iKadouCnt += 1
126+
127+ End If
128+ If iC150KB <> -1 Then
129+
130+ '' 加算日数カウント
131+ iAddDate += 1
132+
133+ End If
134+
135+ If iKadouCnt = Math.Abs(iReadTime) Then
136+ bGetFlg = True
137+ Exit For
138+ End If
139+
140+ Next
141+
142+ If bGetFlg = True Then
143+ Exit For
144+ End If
145+
146+ iTargetDD = iCalDateMaxDD
147+ Next
148+
149+ '' 基点日に加算日数を足す
150+ iAddDate = iAddDate * iStep
151+ If iAddDate <> 0 Then
152+ dteRetCalDate = dteTargetDate.AddDays(iAddDate)
153+ Else
154+ dteRetCalDate = dteTargetDate
155+ End If
156+
93157 '' 戻り値を返す
94- Return dteTargetDate
158+ Return dteRetCalDate
95159 End Function
96160
97161 End Class
Show on old repository browser