h-you / branches / ddl / ProcessManagement.sql @ 92
履歴 | 表示 | アノテート | ダウンロード (90.3 KB)
1 | 84 | h-you | SET SESSION FOREIGN_KEY_CHECKS=0; |
---|---|---|---|
2 | |||
3 | /* Drop Indexes */
|
||
4 | |||
5 | DROP INDEX ActionScheduleData_Index1 ON ActionScheduleData; |
||
6 | DROP INDEX ActionScheduleData_Index2 ON ActionScheduleData; |
||
7 | DROP INDEX ActionScheduleData_Index3 ON ActionScheduleData; |
||
8 | DROP INDEX AttendDaily_Index1 ON AttendanceDailyData; |
||
9 | DROP INDEX AttendDaily_Index2 ON AttendanceDailyData; |
||
10 | DROP INDEX BusinessTypeMaster_Index1 ON BusinessTypeMaster; |
||
11 | DROP INDEX ComponentLinkMaster_Index1 ON ComponentLinkMaster; |
||
12 | DROP INDEX ComponentLinkMaster_Index2 ON ComponentLinkMaster; |
||
13 | DROP INDEX ComponentMaster_Index1 ON ComponentMaster; |
||
14 | DROP INDEX ComponentToTypeMaster_Index1 ON ComponentToTypeMaster; |
||
15 | DROP INDEX ComponentToTypeMaster_Index2 ON ComponentToTypeMaster; |
||
16 | DROP INDEX BaseInfo_Index1 ON ConstructionBaseInfo; |
||
17 | DROP INDEX BaseInfo_Index2 ON ConstructionBaseInfo; |
||
18 | DROP INDEX BaseInfo_Index3 ON ConstructionBaseInfo; |
||
19 | DROP INDEX BaseInfo_Index4 ON ConstructionBaseInfo; |
||
20 | DROP INDEX BaseInfo_Index5 ON ConstructionBaseInfo; |
||
21 | DROP INDEX BaseInfoDetail_Idx1 ON ConstructionBaseInfoDetail; |
||
22 | DROP INDEX BaseInfoDetail_Idx2 ON ConstructionBaseInfoDetail; |
||
23 | DROP INDEX LedgerDetail_Index01 ON ConstructionLedgerDetail; |
||
24 | DROP INDEX LedgerDetail_Index02 ON ConstructionLedgerDetail; |
||
25 | DROP INDEX LedgerDetail_Index03 ON ConstructionLedgerDetail; |
||
26 | DROP INDEX LedgerExcute_Index1 ON ConstructionLedgerExcute; |
||
27 | DROP INDEX ConstructionLink_Index1 ON ConstructionLink; |
||
28 | DROP INDEX ConstructionLink_Index2 ON ConstructionLink; |
||
29 | DROP INDEX ConstructionLink_Index3 ON ConstructionLink; |
||
30 | DROP INDEX ConstructionSpecMaster_Index1 ON ConstructionSpecMaster; |
||
31 | DROP INDEX CostDataOfPerson_Index1 ON CostDataOfPerson; |
||
32 | DROP INDEX CostDataOfPerson_Index2 ON CostDataOfPerson; |
||
33 | DROP INDEX CostomerRegist_Index1 ON CostomerRegist; |
||
34 | DROP INDEX DailyDataConstruction_Index1 ON DailyDataConstruction; |
||
35 | DROP INDEX DailyDataConstruction_Index2 ON DailyDataConstruction; |
||
36 | DROP INDEX DailyDataConstruction_Index3 ON DailyDataConstruction; |
||
37 | DROP INDEX DailyDataDetail_Index ON DailyDataDetail; |
||
38 | DROP INDEX DailyDataField_Index ON DailyDataField; |
||
39 | DROP INDEX DailyDataMaterials_Index ON DailyDataMaterials; |
||
40 | DROP INDEX DailyDataSubcontractors_Index ON DailyDataSubcontractors; |
||
41 | DROP INDEX DailyDataVehicles_Index ON DailyDataVehicles; |
||
42 | DROP INDEX DepartmentMaster_index1 ON DepartmentMaster; |
||
43 | DROP INDEX EstimateData_Index1 ON EstimateData; |
||
44 | DROP INDEX EstimateDataBody_Index1 ON EstimateDataBody; |
||
45 | DROP INDEX EstimateDataDetail_Index1 ON EstimateDataDetail; |
||
46 | DROP INDEX HolidayCalender_Index1 ON HolidayCalenderMaster; |
||
47 | DROP INDEX HolidayCalenderMaster_Index2 ON HolidayCalenderMaster; |
||
48 | DROP INDEX HolidayCalenderMaster_Index3 ON HolidayCalenderMaster; |
||
49 | DROP INDEX InputSearchLogData_Index1 ON InputSearchLogData; |
||
50 | DROP INDEX MessageBoardData_Index1 ON MessageBoardData; |
||
51 | DROP INDEX MessageBoardData_Index2 ON MessageBoardData; |
||
52 | DROP INDEX MessageBoardTerget_Index1 ON MessageBoardTerget; |
||
53 | DROP INDEX PersonDepartmentMaster_Index1 ON PersonDepartmentMaster; |
||
54 | DROP INDEX PersonDepartmentMaster_Index2 ON PersonDepartmentMaster; |
||
55 | DROP INDEX PersonInChargeMaster_Index1 ON PersonInChargeMaster; |
||
56 | DROP INDEX PersonInChargeMaster_Index2 ON PersonInChargeMaster; |
||
57 | DROP INDEX PersonSalaryMaster_Index1 ON PersonSalaryMaster; |
||
58 | DROP INDEX PersonSalaryMaster_Index2 ON PersonSalaryMaster; |
||
59 | DROP INDEX ProcessExcuteMaster_Index1 ON ProcessExcuteMaster; |
||
60 | DROP INDEX ProcessExcuteMaster_Index2 ON ProcessExcuteMaster; |
||
61 | DROP INDEX POrderDetail_Index1 ON PurchaseOrderDetail; |
||
62 | DROP INDEX SalesGraphData_Idx1 ON SalesGraphData; |
||
63 | DROP INDEX SalesGraphData_idx2 ON SalesGraphData; |
||
64 | DROP INDEX SecurityMaster_Index1 ON SecurityMaster; |
||
65 | DROP INDEX SecurityMaster_Index2 ON SecurityMaster; |
||
66 | DROP INDEX SecurityMaster_Index3 ON SecurityMaster; |
||
67 | DROP INDEX SubContractorJobItem_Index1 ON SubContractorJobItem; |
||
68 | DROP INDEX SubContractorJobItem_Index2 ON SubContractorJobItem; |
||
69 | DROP INDEX SubContractorJobLink_Index1 ON SubContractorJobLink; |
||
70 | DROP INDEX SubContractorJobLink_Index2 ON SubContractorJobLink; |
||
71 | DROP INDEX SubContractorMaster_Index1 ON SubContractorMaster; |
||
72 | DROP INDEX TermMaster_Index1 ON TermMaster; |
||
73 | DROP INDEX TranceportDailyData_Index1 ON TranceportDailyData; |
||
74 | DROP INDEX UnitMaster_Index1 ON UnitMaster; |
||
75 | DROP INDEX VehicleScheduleData_Index1 ON VehicleScheduleData; |
||
76 | DROP INDEX VehicleScheduleData_Index2 ON VehicleScheduleData; |
||
77 | DROP INDEX VehicleScheduleData_Index3 ON VehicleScheduleData; |
||
78 | |||
79 | |||
80 | |||
81 | /* Drop Tables */
|
||
82 | |||
83 | DROP TABLE IF EXISTS ActionScheduleData; |
||
84 | DROP TABLE IF EXISTS ApprovalMaster; |
||
85 | DROP TABLE IF EXISTS AttendanceDailyData; |
||
86 | DROP TABLE IF EXISTS AttendanceData; |
||
87 | DROP TABLE IF EXISTS BK_ConstructionLedger; |
||
88 | DROP TABLE IF EXISTS BK_ConstructionLedgerDetail; |
||
89 | DROP TABLE IF EXISTS BK_ConstructionLedgerExcute; |
||
90 | DROP TABLE IF EXISTS BK_EstimateData; |
||
91 | DROP TABLE IF EXISTS BK_EstimateDataBody; |
||
92 | DROP TABLE IF EXISTS BK_EstimateDataDetail; |
||
93 | DROP TABLE IF EXISTS BusinessTypeMaster; |
||
94 | DROP TABLE IF EXISTS CommonCostLarge; |
||
95 | DROP TABLE IF EXISTS CommonCostLinkMS; |
||
96 | DROP TABLE IF EXISTS CommonCostMiddle; |
||
97 | DROP TABLE IF EXISTS CommonCostMiddleSearchWord; |
||
98 | DROP TABLE IF EXISTS ComponentLinkMaster; |
||
99 | DROP TABLE IF EXISTS ComponentMaster; |
||
100 | DROP TABLE IF EXISTS ComponentToTypeMaster; |
||
101 | DROP TABLE IF EXISTS ConstructionBaseInfo; |
||
102 | DROP TABLE IF EXISTS ConstructionBaseInfoDetail; |
||
103 | DROP TABLE IF EXISTS ConstructionBudget; |
||
104 | DROP TABLE IF EXISTS ConstructionBudgetDetail; |
||
105 | DROP TABLE IF EXISTS ConstructionItemMaster; |
||
106 | DROP TABLE IF EXISTS ConstructionLedger; |
||
107 | DROP TABLE IF EXISTS ConstructionLedgerDetail; |
||
108 | DROP TABLE IF EXISTS ConstructionLedgerExcute; |
||
109 | DROP TABLE IF EXISTS ConstructionLink; |
||
110 | DROP TABLE IF EXISTS ConstructionProgressDate; |
||
111 | DROP TABLE IF EXISTS ConstructionSpecMaster; |
||
112 | DROP TABLE IF EXISTS ConstructionSpecUnitPrice; |
||
113 | DROP TABLE IF EXISTS ConstructionTypeMaster; |
||
114 | DROP TABLE IF EXISTS CostDataOfPerson; |
||
115 | DROP TABLE IF EXISTS CostomerRegist; |
||
116 | DROP TABLE IF EXISTS DailyDataConstruction; |
||
117 | DROP TABLE IF EXISTS DailyDataDetail; |
||
118 | DROP TABLE IF EXISTS DailyDataField; |
||
119 | DROP TABLE IF EXISTS DailyDataMaterials; |
||
120 | DROP TABLE IF EXISTS DailyDataSubcontractors; |
||
121 | DROP TABLE IF EXISTS DailyDataVehicles; |
||
122 | DROP TABLE IF EXISTS DepartmentExpensesMaster; |
||
123 | DROP TABLE IF EXISTS DepartmentMaster; |
||
124 | DROP TABLE IF EXISTS DivisionMaster; |
||
125 | DROP TABLE IF EXISTS EstimateBudget; |
||
126 | DROP TABLE IF EXISTS EstimateBudgetDetail; |
||
127 | DROP TABLE IF EXISTS EstimateData; |
||
128 | DROP TABLE IF EXISTS EstimateDataBody; |
||
129 | DROP TABLE IF EXISTS EstimateDataDetail; |
||
130 | DROP TABLE IF EXISTS HolidayCalenderMaster; |
||
131 | DROP TABLE IF EXISTS InputSearchLogData; |
||
132 | DROP TABLE IF EXISTS MessageBoardData; |
||
133 | DROP TABLE IF EXISTS MessageBoardTerget; |
||
134 | DROP TABLE IF EXISTS MessageBrowsingHistory; |
||
135 | DROP TABLE IF EXISTS OrderersMaster; |
||
136 | DROP TABLE IF EXISTS OrdersPriceData; |
||
137 | DROP TABLE IF EXISTS PersonApproval; |
||
138 | DROP TABLE IF EXISTS PersonApprovalComment; |
||
139 | DROP TABLE IF EXISTS PersonDepartmentMaster; |
||
140 | DROP TABLE IF EXISTS PersonInChargeMaster; |
||
141 | DROP TABLE IF EXISTS PersonSalaryMaster; |
||
142 | DROP TABLE IF EXISTS ProceedingsData; |
||
143 | DROP TABLE IF EXISTS ProceedingsDataAttend; |
||
144 | DROP TABLE IF EXISTS ProceedingsDataDetail; |
||
145 | DROP TABLE IF EXISTS ProcessApproval; |
||
146 | DROP TABLE IF EXISTS ProcessApprovalComment; |
||
147 | DROP TABLE IF EXISTS ProcessApprovalDetail; |
||
148 | DROP TABLE IF EXISTS ProcessExcuteMaster; |
||
149 | DROP TABLE IF EXISTS PurchaseOrder; |
||
150 | DROP TABLE IF EXISTS PurchaseOrderDetail; |
||
151 | DROP TABLE IF EXISTS SalesGraphData; |
||
152 | DROP TABLE IF EXISTS SecurityMaster; |
||
153 | DROP TABLE IF EXISTS SubConstrJobItemRegist; |
||
154 | DROP TABLE IF EXISTS SubConstrJobLinkRegist; |
||
155 | DROP TABLE IF EXISTS SubConstrRegist; |
||
156 | DROP TABLE IF EXISTS SubContractorItemMaster; |
||
157 | DROP TABLE IF EXISTS SubContractorJobCategory; |
||
158 | DROP TABLE IF EXISTS SubContractorJobItem; |
||
159 | DROP TABLE IF EXISTS SubContractorJobLink; |
||
160 | DROP TABLE IF EXISTS SubContractorMaster; |
||
161 | DROP TABLE IF EXISTS SuppliersMaster; |
||
162 | DROP TABLE IF EXISTS SystemExecute; |
||
163 | DROP TABLE IF EXISTS SystemMaster; |
||
164 | DROP TABLE IF EXISTS TermMaster; |
||
165 | DROP TABLE IF EXISTS TranceportDailyData; |
||
166 | DROP TABLE IF EXISTS TypeExpensesMaster; |
||
167 | DROP TABLE IF EXISTS UnitMaster; |
||
168 | DROP TABLE IF EXISTS VehicleMaster; |
||
169 | DROP TABLE IF EXISTS VehicleRecordData; |
||
170 | DROP TABLE IF EXISTS VehicleScheduleData; |
||
171 | |||
172 | |||
173 | |||
174 | |||
175 | /* Create Tables */
|
||
176 | |||
177 | -- 担当者行動予定データ
|
||
178 | CREATE TABLE ActionScheduleData |
||
179 | ( |
||
180 | TargetDate date NOT NULL COMMENT '対象日', |
||
181 | PersonCode decimal(8,0) NOT NULL COMMENT '担当者コード', |
||
182 | ActionSchedule varchar(30) COMMENT '行動予定', |
||
183 | TargetYear year(4) NOT NULL COMMENT '該当年', |
||
184 | TargetMonth year(2) NOT NULL COMMENT '該当月', |
||
185 | TargetDay year(2) NOT NULL COMMENT '該当日', |
||
186 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
187 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
188 | PRIMARY KEY (TargetDate, PersonCode) |
||
189 | ) COMMENT = '担当者行動予定データ'; |
||
190 | |||
191 | |||
192 | -- 承認経路マスタ
|
||
193 | CREATE TABLE ApprovalMaster |
||
194 | ( |
||
195 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
196 | DepartmentCode decimal(5,0) unsigned NOT NULL COMMENT '部署コード', |
||
197 | SeqNo decimal(2) NOT NULL COMMENT '枝番', |
||
198 | DisplayOrder decimal(2) NOT NULL COMMENT '表示順', |
||
199 | ApprovalPerson decimal(8) unsigned NOT NULL COMMENT '承認者コード', |
||
200 | ApprovalAuthority decimal(1) NOT NULL COMMENT '承認権限区分', |
||
201 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
202 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
203 | PRIMARY KEY (ApprovalCode, DepartmentCode, SeqNo) |
||
204 | ) COMMENT = '承認経路マスタ'; |
||
205 | |||
206 | |||
207 | -- 出勤日報データ
|
||
208 | CREATE TABLE AttendanceDailyData |
||
209 | ( |
||
210 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
211 | AttendanceDate date NOT NULL COMMENT '日報作成日', |
||
212 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
213 | ActionResult varchar(30) NOT NULL COMMENT '行動実績', |
||
214 | OvertimeHours decimal(4,1) NOT NULL COMMENT '残業時間', |
||
215 | WorkingComment varchar(120) COMMENT 'コメント', |
||
216 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
217 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
218 | PRIMARY KEY (PersonCode, AttendanceDate, SeqNo) |
||
219 | ) COMMENT = '出勤日報データ'; |
||
220 | |||
221 | |||
222 | -- 出勤管理データ
|
||
223 | CREATE TABLE AttendanceData |
||
224 | ( |
||
225 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
226 | AttendanceMonth date NOT NULL COMMENT '出勤管理年月', |
||
227 | LastDays decimal(2) unsigned NOT NULL COMMENT '当月最終日', |
||
228 | AttendDayCount decimal(2) unsigned NOT NULL COMMENT '出勤日数', |
||
229 | TotalOverTimes decimal(4,1) NOT NULL COMMENT '残業時間数', |
||
230 | OrderDate date NOT NULL COMMENT '申請日', |
||
231 | OrderNo decimal(2) unsigned NOT NULL COMMENT '申請受付番号', |
||
232 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
233 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
234 | PRIMARY KEY (PersonCode, AttendanceMonth) |
||
235 | ) COMMENT = '出勤管理データ'; |
||
236 | |||
237 | |||
238 | -- 工事詳細台帳データ【退避用】
|
||
239 | CREATE TABLE BK_ConstructionLedger |
||
240 | ( |
||
241 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
242 | ConstructionPeriod decimal(4) unsigned NOT NULL COMMENT '事業期', |
||
243 | CreatorCode decimal(8,0) COMMENT '作成者コード', |
||
244 | CreatorName varchar(60) COMMENT '作成者名', |
||
245 | CreateDate date NOT NULL COMMENT '作成日', |
||
246 | ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
||
247 | ConstructionStart date NOT NULL COMMENT '契約工期開始', |
||
248 | ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
||
249 | OrdersDecisionPrice decimal(14,0) NOT NULL COMMENT '税抜受注決定金額', |
||
250 | CompanyExpenses decimal(10,0) NOT NULL COMMENT '会社経費合計', |
||
251 | DepartmentExpenses decimal(10,0) NOT NULL COMMENT '部署経費合計', |
||
252 | SalesExpenses decimal(10,0) NOT NULL COMMENT '営業経費合計', |
||
253 | TotalPayment decimal(10,0) NOT NULL COMMENT '総支払額', |
||
254 | GrossProfit decimal(10,0) NOT NULL COMMENT '粗利', |
||
255 | Allowance decimal(10,0) NOT NULL COMMENT '給与', |
||
256 | NetProfit decimal(10,0) NOT NULL COMMENT '純利益', |
||
257 | ComplateFlg decimal(1) NOT NULL COMMENT '入力完了フラグ', |
||
258 | IntegrationFlg decimal(1) NOT NULL COMMENT '受注金額積算フラグ', |
||
259 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
260 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
261 | PRIMARY KEY (ConstructionCode) |
||
262 | ) COMMENT = '工事詳細台帳データ【退避用】'; |
||
263 | |||
264 | |||
265 | -- 工事詳細台帳明細データ【退避用】
|
||
266 | CREATE TABLE BK_ConstructionLedgerDetail |
||
267 | ( |
||
268 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
269 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
270 | LineCount decimal(5) unsigned NOT NULL COMMENT '行番号', |
||
271 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
272 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
273 | FirstString varchar(120) COMMENT '項目名称', |
||
274 | SecondString varchar(120) COMMENT '工事内容', |
||
275 | CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
||
276 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
277 | CompanyName varchar(120) COMMENT '協力会社名称', |
||
278 | EstimatePrice decimal(12,0) NOT NULL COMMENT '予算(見積)金額', |
||
279 | ExecutionAmount decimal(12,0) NOT NULL COMMENT '実行金額', |
||
280 | AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
||
281 | PaymentBurden decimal(12,0) NOT NULL COMMENT '支払補填額', |
||
282 | FixDataFlg decimal(1) NOT NULL COMMENT '固定データフラグ', |
||
283 | IndependentFlg decimal(1) NOT NULL COMMENT '独立データフラグ', |
||
284 | FluctuationFlg decimal(1) NOT NULL COMMENT '増減データフラグ', |
||
285 | SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
||
286 | SalaryDays decimal(4) NOT NULL COMMENT '給与振分日数', |
||
287 | OperatingFlg decimal(1) NOT NULL COMMENT '担当中フラグ', |
||
288 | SourceCode decimal(10) unsigned NOT NULL COMMENT '元工事番号', |
||
289 | JoinTitleFlg decimal(1) NOT NULL COMMENT '工事名称タイトル', |
||
290 | SalaryOnRegist decimal(12,0) NOT NULL COMMENT '登録時月額給与', |
||
291 | PurchaseOrderFlg decimal(2) NOT NULL COMMENT '注文書発行フラグ', |
||
292 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
293 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
294 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
||
295 | ) COMMENT = '工事詳細台帳明細データ【退避用】'; |
||
296 | |||
297 | |||
298 | -- 工事詳細台帳実行データ【退避用】
|
||
299 | CREATE TABLE BK_ConstructionLedgerExcute |
||
300 | ( |
||
301 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
302 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
303 | LineCount decimal(5) unsigned NOT NULL COMMENT '行番号', |
||
304 | ColumnCount decimal(3) NOT NULL COMMENT '列番号', |
||
305 | PaymentAmount decimal(12,0) NOT NULL COMMENT '支払金額', |
||
306 | TargetMonth date NOT NULL COMMENT '対象年月', |
||
307 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
308 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
309 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount, ColumnCount) |
||
310 | ) COMMENT = '工事詳細台帳実行データ【退避用】'; |
||
311 | |||
312 | |||
313 | -- 積算見積データ【退避用】
|
||
314 | CREATE TABLE BK_EstimateData |
||
315 | ( |
||
316 | SaveDate datetime NOT NULL COMMENT '退避日付', |
||
317 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
318 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
319 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
320 | FixedItemCode varchar(1) COMMENT '固定項目キー', |
||
321 | ItemName varchar(120) COMMENT '作業名称', |
||
322 | SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
||
323 | PriceValue decimal(14,0) NOT NULL COMMENT '金額', |
||
324 | note varchar(60) COMMENT '備考', |
||
325 | MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
||
326 | InputFlg decimal(1) NOT NULL COMMENT '入力フラグ', |
||
327 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
328 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
329 | PRIMARY KEY (SaveDate, ConstructionCode, LineCount) |
||
330 | ) COMMENT = '積算見積データ【退避用】'; |
||
331 | |||
332 | |||
333 | -- 積算見積ページデータ【退避用】
|
||
334 | CREATE TABLE BK_EstimateDataBody |
||
335 | ( |
||
336 | SaveDate datetime NOT NULL COMMENT '退避日付', |
||
337 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
338 | PageCount decimal(4) unsigned NOT NULL COMMENT 'ページ番号', |
||
339 | Category decimal(1) NOT NULL COMMENT 'ページ区分', |
||
340 | UnionComponentCode decimal(5) unsigned NOT NULL COMMENT '所属構成キー', |
||
341 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
342 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
343 | SelectComponent decimal(5) unsigned NOT NULL COMMENT '選択構成キー', |
||
344 | PageTitle varchar(120) NOT NULL COMMENT 'ページ表示名', |
||
345 | DetailLineCount decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
346 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
347 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
348 | PRIMARY KEY (SaveDate, ConstructionCode, PageCount) |
||
349 | ) COMMENT = '積算見積ページデータ【退避用】'; |
||
350 | |||
351 | |||
352 | -- 積算見積データ明細【退避用】
|
||
353 | CREATE TABLE BK_EstimateDataDetail |
||
354 | ( |
||
355 | SaveDate datetime NOT NULL COMMENT '退避日付', |
||
356 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
357 | PageCount decimal(4) unsigned NOT NULL COMMENT 'ページ番号', |
||
358 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
359 | DataType decimal(1) NOT NULL COMMENT 'データ種別', |
||
360 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
361 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
362 | SpecCode decimal(5,0) unsigned NOT NULL COMMENT '作業キー', |
||
363 | ItemName varchar(120) COMMENT '作業名称', |
||
364 | SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
||
365 | Unitcount decimal(8,2) NOT NULL COMMENT '数量', |
||
366 | UnitName varchar(30) COMMENT '単位名称', |
||
367 | UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
||
368 | LineTotal decimal(12,0) NOT NULL COMMENT '金額', |
||
369 | note varchar(60) COMMENT '備考', |
||
370 | CompanyCode decimal(8) NOT NULL COMMENT '協力会社コード', |
||
371 | MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
||
372 | InputFlg decimal(1) COMMENT '入力フラグ', |
||
373 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
374 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
375 | PRIMARY KEY (SaveDate, ConstructionCode, PageCount, LineCount) |
||
376 | ) COMMENT = '積算見積データ明細【退避用】'; |
||
377 | |||
378 | |||
379 | -- 法人格マスタ
|
||
380 | CREATE TABLE BusinessTypeMaster |
||
381 | ( |
||
382 | BusinessTypeCode decimal(5,0) unsigned NOT NULL COMMENT '法人格コード', |
||
383 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
384 | BusinessTypeName varchar(100) DEFAULT '' NOT NULL COMMENT '業種名', |
||
385 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
386 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
387 | PRIMARY KEY (BusinessTypeCode) |
||
388 | ) COMMENT = '法人格マスタ'; |
||
389 | |||
390 | |||
391 | -- 共通費大項目マスタ
|
||
392 | CREATE TABLE CommonCostLarge |
||
393 | ( |
||
394 | LargeCode decimal(5,0) unsigned NOT NULL COMMENT '大項目キー', |
||
395 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
396 | LargeName varchar(50) DEFAULT '' NOT NULL COMMENT '大項目名称', |
||
397 | CommentText varchar(120) COMMENT '説明書き', |
||
398 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
399 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
400 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
401 | PRIMARY KEY (LargeCode) |
||
402 | ) COMMENT = '共通費大項目マスタ'; |
||
403 | |||
404 | |||
405 | -- 共通費工種関連マスタ
|
||
406 | CREATE TABLE CommonCostLinkMS |
||
407 | ( |
||
408 | LargeCode decimal(5,0) unsigned NOT NULL COMMENT '大項目キー', |
||
409 | MiddleCode decimal(5,0) unsigned NOT NULL COMMENT '中項目キー', |
||
410 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
411 | EntryDate datetime COMMENT '登録日付', |
||
412 | UpdateDate datetime COMMENT '更新日付', |
||
413 | PRIMARY KEY (LargeCode, MiddleCode, ItemCode) |
||
414 | ) COMMENT = '共通費工種関連マスタ'; |
||
415 | |||
416 | |||
417 | -- 共通費中項目マスタ
|
||
418 | CREATE TABLE CommonCostMiddle |
||
419 | ( |
||
420 | LargeCode decimal(5,0) unsigned NOT NULL COMMENT '大項目キー', |
||
421 | MiddleCode decimal(5,0) unsigned NOT NULL COMMENT '中項目キー', |
||
422 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
423 | MiddleName varchar(50) DEFAULT '' NOT NULL COMMENT '中項目名称', |
||
424 | CommentText varchar(120) COMMENT '説明書き', |
||
425 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
426 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
427 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
428 | PRIMARY KEY (LargeCode, MiddleCode) |
||
429 | ) COMMENT = '共通費中項目マスタ'; |
||
430 | |||
431 | |||
432 | -- 共通費中項目キーマスタ
|
||
433 | CREATE TABLE CommonCostMiddleSearchWord |
||
434 | ( |
||
435 | LargeCode decimal(5,0) unsigned NOT NULL COMMENT '大項目キー', |
||
436 | MiddleCode decimal(5,0) unsigned NOT NULL COMMENT '中項目キー', |
||
437 | SeqNo decimal(5) unsigned NOT NULL COMMENT '順序', |
||
438 | SearchWord varchar(50) DEFAULT '' NOT NULL COMMENT '検索項目', |
||
439 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
440 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
441 | PRIMARY KEY (LargeCode, MiddleCode, SeqNo) |
||
442 | ) COMMENT = '共通費中項目キーマスタ'; |
||
443 | |||
444 | |||
445 | -- 構成工種関連マスタ
|
||
446 | CREATE TABLE ComponentLinkMaster |
||
447 | ( |
||
448 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
449 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
450 | DisplayOrder decimal(5) unsigned COMMENT '表示順', |
||
451 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
452 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
453 | PRIMARY KEY (ComponentCode, ItemCode) |
||
454 | ) COMMENT = '構成工種関連マスタ'; |
||
455 | |||
456 | |||
457 | -- 構成マスタ
|
||
458 | CREATE TABLE ComponentMaster |
||
459 | ( |
||
460 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
461 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
462 | ComponentName varchar(120) DEFAULT '' NOT NULL COMMENT '構成名称', |
||
463 | SubItemsFlg decimal(1) COMMENT '下位項目フラグ', |
||
464 | DirectInputFlg decimal(1) COMMENT '直接入力フラグ', |
||
465 | MyExpensesFlg decimal(1) COMMENT '自社経費フラグ', |
||
466 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
467 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
468 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
469 | PRIMARY KEY (ComponentCode) |
||
470 | ) COMMENT = '構成マスタ'; |
||
471 | |||
472 | |||
473 | -- 構成工事種別関連マスタ
|
||
474 | CREATE TABLE ComponentToTypeMaster |
||
475 | ( |
||
476 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
477 | TypeCode decimal(5,0) unsigned NOT NULL COMMENT '工事種別コード', |
||
478 | Dummy decimal(1) NOT NULL COMMENT 'ダミー項目', |
||
479 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
480 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
481 | PRIMARY KEY (ComponentCode, TypeCode) |
||
482 | ) COMMENT = '構成工事種別関連マスタ'; |
||
483 | |||
484 | |||
485 | -- 工事基本情報
|
||
486 | CREATE TABLE ConstructionBaseInfo |
||
487 | ( |
||
488 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
489 | TyingFlg decimal(1) NOT NULL COMMENT '紐付データフラグ', |
||
490 | JoinFlg decimal(1) NOT NULL COMMENT '結合契約工事フラグ', |
||
491 | ConstructionYear smallint unsigned NOT NULL COMMENT '工事年度', |
||
492 | ConstructionPeriod smallint unsigned NOT NULL COMMENT '工事期数', |
||
493 | RequestedDate date COMMENT '依頼受け日', |
||
494 | EstimatesSubmitDeadline date COMMENT '見積提出期限', |
||
495 | EstimatesSubmittedDate date COMMENT '見積提出日', |
||
496 | ProvisionalOrderDate date COMMENT '仮受注日', |
||
497 | OrderDate date COMMENT '受注日', |
||
498 | OrderStartingDate date COMMENT '開始予定日', |
||
499 | OrderCompletionDate date COMMENT '完了予定日', |
||
500 | PreparationStartDate date COMMENT '施工準備開始日', |
||
501 | ConstructionStartingDate date COMMENT '施工開始日', |
||
502 | ConstructionCompletionDate date COMMENT '施工完了日', |
||
503 | NonOrderDate date COMMENT '非受注日', |
||
504 | OrdersDecisionPrice decimal(12,0) NOT NULL COMMENT '税抜受注決定金額', |
||
505 | OrdersDecisionPriceInTax decimal(12,0) NOT NULL COMMENT '税込受注決定金額', |
||
506 | SalesPersonCode decimal(8,0) COMMENT '営業担当者名', |
||
507 | ConstructionPersonCode decimal(8,0) NOT NULL COMMENT '工事担当者', |
||
508 | ConstrSubPersonCode decimal(8,0) NOT NULL COMMENT '工事副担当者', |
||
509 | ConstructionInstructor decimal(8,0) NOT NULL COMMENT '工事指導員', |
||
510 | TransferConstruction decimal(8,0) NOT NULL COMMENT '工事移管先コード', |
||
511 | TransferConstructionDate date COMMENT '工事移管日', |
||
512 | OrderersDivision decimal(5) NOT NULL COMMENT '発注者区分', |
||
513 | OrderersCode decimal(5,0) unsigned NOT NULL COMMENT '発注者コード', |
||
514 | EstimatesExpirationDate date COMMENT '見積有効期限', |
||
515 | ConstructionPeriodStart date COMMENT '契約工期開始日', |
||
516 | ConstructionPeriodEnd date COMMENT '契約工期完了', |
||
517 | ConstructionPeriodStart2 date COMMENT '契約工期開始(延長時)', |
||
518 | ConstructionPeriodEnd2 date COMMENT '契約工期完了(延長時)', |
||
519 | StartDate date COMMENT '工事開始日', |
||
520 | EndDate date COMMENT '工事終了日', |
||
521 | PurchaseOrderMailingDate date COMMENT '注文書郵送日', |
||
522 | PurchaseOrderReturnDate date COMMENT '注文書返送日', |
||
523 | PurchaseOrderReturnCheckDate date COMMENT '注文書返送確認日', |
||
524 | ConsumptionTaxFlg decimal(1) NOT NULL COMMENT '消費税フラグ', |
||
525 | PrimeContractorFlg decimal(1) NOT NULL COMMENT '元請フラグ', |
||
526 | SalesCostFlg decimal(1) NOT NULL COMMENT '営業経費発生フラグ', |
||
527 | ConstructionStatusFlg decimal(2,0) NOT NULL COMMENT '工事状態フラグ', |
||
528 | ConstructionType decimal(5) NOT NULL COMMENT '工事種別コード', |
||
529 | EstimateType decimal(1) NOT NULL COMMENT '見積種別', |
||
530 | BillingStartDate date NOT NULL COMMENT '請求準備開始日', |
||
531 | BillingDate date NOT NULL COMMENT '請求日', |
||
532 | BillingSplitFlg decimal(1) NOT NULL COMMENT '請求回数フラグ', |
||
533 | BillingSendDate date COMMENT '請求書郵送/手渡し日', |
||
534 | LedgerComplateDate date NOT NULL COMMENT '工事詳細台帳入力完了日付', |
||
535 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
536 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
537 | PRIMARY KEY (ConstructionCode) |
||
538 | ) COMMENT = '工事基本情報'; |
||
539 | |||
540 | |||
541 | -- 工事基本情報明細
|
||
542 | CREATE TABLE ConstructionBaseInfoDetail |
||
543 | ( |
||
544 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
545 | DetailNo decimal(2) NOT NULL COMMENT '明細番号', |
||
546 | DetailString varchar(120) COMMENT '明細内容', |
||
547 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
548 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
549 | PRIMARY KEY (ConstructionCode, DetailNo) |
||
550 | ) COMMENT = '工事基本情報明細'; |
||
551 | |||
552 | |||
553 | -- 工事施工予算データ
|
||
554 | CREATE TABLE ConstructionBudget |
||
555 | ( |
||
556 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
557 | CreatorCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
||
558 | CreatorName varchar(60) COMMENT '作成者名', |
||
559 | CreatorCosts decimal(11,0) NOT NULL COMMENT '作成者給与', |
||
560 | AssistantCode decimal(8,0) NOT NULL COMMENT '副担当者コード', |
||
561 | AssistantName varchar(60) COMMENT '副担当者名', |
||
562 | AssistantCosts decimal(11,0) NOT NULL COMMENT '副担当者給与', |
||
563 | InstructorCode decimal(8,0) NOT NULL COMMENT '工事指導員コード', |
||
564 | InstructorName varchar(60) COMMENT '工事指導員名', |
||
565 | InstructorCosts decimal(11,0) NOT NULL COMMENT '工事指導員給与', |
||
566 | CreateDate date NOT NULL COMMENT '作成日', |
||
567 | ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
||
568 | ConstructionStart date NOT NULL COMMENT '契約工期開始', |
||
569 | ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
||
570 | InstructorTimes decimal(5,2) NOT NULL COMMENT '指導員稼働月数', |
||
571 | SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
||
572 | SalaryDays decimal(4) NOT NULL COMMENT '振分日数', |
||
573 | A_SalaryFlg decimal(1) NOT NULL COMMENT '副担当者給与振分区分', |
||
574 | A_SalaryDays decimal(4) NOT NULL COMMENT '副担当者振分日数', |
||
575 | I_SalaryFlg decimal(1) NOT NULL COMMENT '指導員給与振分区分', |
||
576 | I_SalaryDays decimal(4) NOT NULL COMMENT '指導員振分日数', |
||
577 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
578 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
579 | PRIMARY KEY (ConstructionCode) |
||
580 | ) COMMENT = '工事施工予算データ'; |
||
581 | |||
582 | |||
583 | -- 工事施工予算データ明細
|
||
584 | CREATE TABLE ConstructionBudgetDetail |
||
585 | ( |
||
586 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
587 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
588 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
589 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
590 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
591 | FirstString varchar(120) COMMENT '項目名称', |
||
592 | SecondString varchar(120) COMMENT '工事内容', |
||
593 | CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
||
594 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
595 | CompanyName varchar(120) COMMENT '協力会社名称', |
||
596 | EstimatePrice decimal(12,0) NOT NULL COMMENT '積算時見積金額', |
||
597 | NegotiationPrice decimal(12,0) NOT NULL COMMENT '積算時交渉金額', |
||
598 | OrderDesiredAmount decimal(12,0) NOT NULL COMMENT '発注希望金額', |
||
599 | ExecutionAmount decimal(12,0) NOT NULL COMMENT '実行金額', |
||
600 | AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
||
601 | NegotiateFlg decimal(1) NOT NULL COMMENT '協力業者交渉フラグ', |
||
602 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
603 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
604 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
||
605 | ) COMMENT = '工事施工予算データ明細'; |
||
606 | |||
607 | |||
608 | -- 工種マスタ
|
||
609 | CREATE TABLE ConstructionItemMaster |
||
610 | ( |
||
611 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
612 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
613 | ItemName varchar(120) DEFAULT '' NOT NULL COMMENT '工種名称', |
||
614 | SubItemsFlg decimal(1) COMMENT '下位項目フラグ', |
||
615 | MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
||
616 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
617 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
618 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
619 | PRIMARY KEY (ItemCode) |
||
620 | ) COMMENT = '工種マスタ'; |
||
621 | |||
622 | |||
623 | -- 工事詳細台帳データ
|
||
624 | CREATE TABLE ConstructionLedger |
||
625 | ( |
||
626 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
627 | ConstructionPeriod decimal(4) unsigned NOT NULL COMMENT '事業期', |
||
628 | CreatorCode decimal(8,0) COMMENT '作成者コード', |
||
629 | CreatorName varchar(60) COMMENT '作成者名', |
||
630 | CreateDate date NOT NULL COMMENT '作成日', |
||
631 | ConstructionTimes decimal(5,2) NOT NULL COMMENT '工期(単位・月)', |
||
632 | ConstructionStart date NOT NULL COMMENT '契約工期開始', |
||
633 | ConstructionEnd date NOT NULL COMMENT '契約工期完了', |
||
634 | OrdersDecisionPrice decimal(14,0) NOT NULL COMMENT '税抜受注決定金額', |
||
635 | CompanyExpenses decimal(10,0) NOT NULL COMMENT '会社経費合計', |
||
636 | DepartmentExpenses decimal(10,0) NOT NULL COMMENT '部署経費合計', |
||
637 | SalesExpenses decimal(10,0) NOT NULL COMMENT '営業経費合計', |
||
638 | TotalPayment decimal(10,0) NOT NULL COMMENT '総支払額', |
||
639 | GrossProfit decimal(10,0) NOT NULL COMMENT '粗利', |
||
640 | Allowance decimal(10,0) NOT NULL COMMENT '給与', |
||
641 | NetProfit decimal(10,0) NOT NULL COMMENT '純利益', |
||
642 | ComplateFlg decimal(1) NOT NULL COMMENT '入力完了フラグ', |
||
643 | IntegrationFlg decimal(1) NOT NULL COMMENT '受注金額積算フラグ', |
||
644 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
645 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
646 | PRIMARY KEY (ConstructionCode) |
||
647 | ) COMMENT = '工事詳細台帳データ'; |
||
648 | |||
649 | |||
650 | -- 工事詳細台帳明細データ
|
||
651 | CREATE TABLE ConstructionLedgerDetail |
||
652 | ( |
||
653 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
654 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
655 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
656 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
657 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
658 | FirstString varchar(120) COMMENT '項目名称', |
||
659 | SecondString varchar(120) COMMENT '工事内容', |
||
660 | CompanyType decimal(1) NOT NULL COMMENT '協力会社コードタイプ', |
||
661 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
662 | CompanyName varchar(120) COMMENT '協力会社名称', |
||
663 | EstimatePrice decimal(12,0) NOT NULL COMMENT '予算(見積)金額', |
||
664 | ExecutionAmount decimal(12,0) NOT NULL COMMENT '実行金額', |
||
665 | AmountConfigRate decimal(5,2) NOT NULL COMMENT '金額構成率', |
||
666 | PaymentBurden decimal(12,0) NOT NULL COMMENT '支払補填額', |
||
667 | FixDataFlg decimal(1) NOT NULL COMMENT '固定データフラグ', |
||
668 | IndependentFlg decimal(1) NOT NULL COMMENT '独立データフラグ', |
||
669 | FluctuationFlg decimal(1) NOT NULL COMMENT '増減データフラグ', |
||
670 | SalaryFlg decimal(1) NOT NULL COMMENT '給与振分区分', |
||
671 | SalaryDays decimal(4) NOT NULL COMMENT '給与振分日数', |
||
672 | OperatingFlg decimal(1) NOT NULL COMMENT '担当中フラグ', |
||
673 | SourceCode decimal(10) unsigned NOT NULL COMMENT '元工事番号', |
||
674 | JoinTitleFlg decimal(1) NOT NULL COMMENT '工事名称タイトル', |
||
675 | SalaryOnRegist decimal(12,0) NOT NULL COMMENT '登録時月額給与', |
||
676 | PurchaseOrderFlg decimal(2) NOT NULL COMMENT '注文書発行フラグ', |
||
677 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
678 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
679 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
||
680 | ) COMMENT = '工事詳細台帳明細データ'; |
||
681 | |||
682 | |||
683 | -- 工事詳細台帳実行データ
|
||
684 | CREATE TABLE ConstructionLedgerExcute |
||
685 | ( |
||
686 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
687 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
688 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
689 | ColumnCount decimal(3) NOT NULL COMMENT '列番号', |
||
690 | PaymentAmount decimal(12,0) NOT NULL COMMENT '支払金額', |
||
691 | TargetMonth date NOT NULL COMMENT '対象年月', |
||
692 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
693 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
694 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount, ColumnCount) |
||
695 | ) COMMENT = '工事詳細台帳実行データ'; |
||
696 | |||
697 | |||
698 | -- 工事リンク情報
|
||
699 | CREATE TABLE ConstructionLink |
||
700 | ( |
||
701 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
702 | FluctuationCode decimal(10,0) NOT NULL COMMENT '子工事番号', |
||
703 | LinkType decimal(1) NOT NULL COMMENT 'リンク種別', |
||
704 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
705 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
706 | PRIMARY KEY (ConstructionCode, FluctuationCode) |
||
707 | ) COMMENT = '工事リンク情報'; |
||
708 | |||
709 | |||
710 | -- 案件進捗日付データ
|
||
711 | CREATE TABLE ConstructionProgressDate |
||
712 | ( |
||
713 | ConstructionCode decimal(10,0) NOT NULL COMMENT '工事番号', |
||
714 | ConstructionStatusFlg decimal(2,0) NOT NULL COMMENT '設定工事状態', |
||
715 | PreviousStatusFlg decimal(2,0) COMMENT '変更前状態', |
||
716 | ChangeDate datetime NOT NULL COMMENT '設定日付', |
||
717 | ChangePersonCode decimal(8,0) NOT NULL COMMENT '設定担当者', |
||
718 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
719 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
720 | PRIMARY KEY (ConstructionCode, ConstructionStatusFlg) |
||
721 | ) COMMENT = '案件進捗日付データ'; |
||
722 | |||
723 | |||
724 | -- 作業マスタ
|
||
725 | CREATE TABLE ConstructionSpecMaster |
||
726 | ( |
||
727 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
728 | SpecCode decimal(5,0) unsigned NOT NULL COMMENT '作業キー', |
||
729 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
730 | ItemName varchar(120) DEFAULT '' COMMENT '作業名称', |
||
731 | SpecName varchar(120) COMMENT '作業名称', |
||
732 | UnitName varchar(30) COMMENT '単位名称', |
||
733 | UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
||
734 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
735 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
736 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
737 | PRIMARY KEY (ItemCode, SpecCode) |
||
738 | ) COMMENT = '作業マスタ'; |
||
739 | |||
740 | |||
741 | -- 作業単価マスタ
|
||
742 | CREATE TABLE ConstructionSpecUnitPrice |
||
743 | ( |
||
744 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
745 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
746 | SpecCode decimal(5,0) unsigned NOT NULL COMMENT '作業キー', |
||
747 | ConstructionTypeCode mediumint unsigned NOT NULL COMMENT '工事種別コード', |
||
748 | UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
||
749 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
750 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
751 | PRIMARY KEY (ComponentCode, ItemCode, SpecCode, ConstructionTypeCode) |
||
752 | ) COMMENT = '作業単価マスタ'; |
||
753 | |||
754 | |||
755 | -- 工事種別マスタ
|
||
756 | CREATE TABLE ConstructionTypeMaster |
||
757 | ( |
||
758 | TypeCode decimal(5,0) unsigned NOT NULL COMMENT '工事種別コード', |
||
759 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
760 | NameString varchar(100) DEFAULT '' NOT NULL COMMENT '名称', |
||
761 | PublicFlg decimal(1) NOT NULL COMMENT '工事種別フラグ', |
||
762 | SecRank decimal(1) NOT NULL COMMENT '保護区分ランク', |
||
763 | ExpensesLink decimal(1) NOT NULL COMMENT '経費使用区分', |
||
764 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
765 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
766 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
767 | PRIMARY KEY (TypeCode) |
||
768 | ) COMMENT = '工事種別マスタ'; |
||
769 | |||
770 | |||
771 | -- 担当者毎経費データ
|
||
772 | CREATE TABLE CostDataOfPerson |
||
773 | ( |
||
774 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
775 | ActionDate date NOT NULL COMMENT '対象日付', |
||
776 | DataType decimal(1) NOT NULL COMMENT 'データ区分', |
||
777 | DataAddCount decimal(5) unsigned NOT NULL COMMENT 'データ追加番号', |
||
778 | TargetMonth varchar(7) NOT NULL COMMENT '対象年月', |
||
779 | ConstructionCode decimal(10,0) unsigned COMMENT '工事コード', |
||
780 | SuppliersCode decimal(5) unsigned NOT NULL COMMENT '支払先コード', |
||
781 | SuppliersName varchar(120) COMMENT '支払先名称', |
||
782 | PaymentContent varchar(60) COMMENT '支払内容', |
||
783 | PaymentType decimal(1) NOT NULL COMMENT '支払方法フラグ', |
||
784 | EntryPrice decimal(12,0) NOT NULL COMMENT '金額(税抜)', |
||
785 | EntryPriceInTax decimal(12,0) NOT NULL COMMENT '金額(税込)', |
||
786 | SlipNumber varchar(12) COMMENT '伝票番号', |
||
787 | ComplateFlg decimal(1) NOT NULL COMMENT '引込済みフラグ', |
||
788 | ApprovalFlg decimal(1) NOT NULL COMMENT '承認フラグ', |
||
789 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
790 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
791 | PRIMARY KEY (PersonCode, ActionDate, DataType, DataAddCount) |
||
792 | ) COMMENT = '担当者毎経費データ'; |
||
793 | |||
794 | |||
795 | -- 発注者登録申請データ
|
||
796 | CREATE TABLE CostomerRegist |
||
797 | ( |
||
798 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '申請者番号', |
||
799 | CreateDate date NOT NULL COMMENT '作成日', |
||
800 | SeqNo decimal(2) NOT NULL COMMENT 'キー連番', |
||
801 | DataMode decimal(1) NOT NULL COMMENT 'データ区分', |
||
802 | SourceCotegory decimal(5) unsigned NOT NULL COMMENT '発注者区分', |
||
803 | SourceCode decimal(5) unsigned NOT NULL COMMENT '発注者コード', |
||
804 | PetitionPeriod decimal(4) unsigned NOT NULL COMMENT '事業期', |
||
805 | OrderFlg decimal(1) NOT NULL COMMENT '法人団体・個人フラグ', |
||
806 | CorporateStatusName varchar(100) COMMENT '法人格名称', |
||
807 | CorporateStatusPoint decimal(1) COMMENT '法人格名称位置', |
||
808 | OrderersName1 varchar(60) DEFAULT '' NOT NULL COMMENT '発注者名1', |
||
809 | OrderersName2 varchar(60) COMMENT '発注者名2', |
||
810 | DepartmentName varchar(60) COMMENT '部署名', |
||
811 | ChargePersonName varchar(60) COMMENT '担当者名', |
||
812 | ZipCode varchar(8) COMMENT '郵便番号', |
||
813 | Address1 varchar(60) COMMENT '住所1', |
||
814 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
815 | Address3 varchar(60) COMMENT '住所3', |
||
816 | PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
||
817 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
818 | MailAddress varchar(257) COMMENT 'メールアドレス', |
||
819 | Note varchar(300) DEFAULT '' COMMENT '備考', |
||
820 | OrderCotegory decimal(5,0) unsigned NOT NULL COMMENT '発注者区分', |
||
821 | OrderDate date NOT NULL COMMENT '申請日', |
||
822 | OrderNo decimal(2) unsigned NOT NULL COMMENT '申請受付番号', |
||
823 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
824 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
825 | PRIMARY KEY (PersonCode, CreateDate, SeqNo) |
||
826 | ) COMMENT = '発注者登録申請データ'; |
||
827 | |||
828 | |||
829 | -- 日報データ
|
||
830 | CREATE TABLE DailyDataConstruction |
||
831 | ( |
||
832 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
833 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
834 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
835 | Weather varchar(60) COMMENT '天気', |
||
836 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
837 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
838 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode) |
||
839 | ) COMMENT = '日報データ'; |
||
840 | |||
841 | |||
842 | -- 日報データ (明細)
|
||
843 | CREATE TABLE DailyDataDetail |
||
844 | ( |
||
845 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
846 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
847 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
848 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
849 | JobCategoryCode decimal(5,0) NOT NULL COMMENT '職種キー', |
||
850 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
851 | TodayHeadCount decimal(4,1) NOT NULL COMMENT '当日人員数', |
||
852 | TotalHeadCount decimal(5,1) NOT NULL COMMENT '累計人員数', |
||
853 | TodayWork varchar(100) COMMENT '当日作業内容', |
||
854 | NextdayWork varchar(100) COMMENT '翌日作業内容', |
||
855 | NextdayHeadCount decimal(4,1) NOT NULL COMMENT '翌日人員数', |
||
856 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
857 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
858 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
||
859 | ) COMMENT = '日報データ (明細)'; |
||
860 | |||
861 | |||
862 | -- 日報データ (現場巡回)
|
||
863 | CREATE TABLE DailyDataField |
||
864 | ( |
||
865 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
866 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
867 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
868 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
869 | PatrolTime datetime NOT NULL COMMENT '巡回時間', |
||
870 | ContentsText varchar(200) COMMENT '内容', |
||
871 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
872 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
873 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
||
874 | ) COMMENT = '日報データ (現場巡回)'; |
||
875 | |||
876 | |||
877 | -- 日報データ (資材)
|
||
878 | CREATE TABLE DailyDataMaterials |
||
879 | ( |
||
880 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
881 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
882 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
883 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
884 | Materials varchar(100) COMMENT '資材名', |
||
885 | Quantity varchar(100) COMMENT '数量', |
||
886 | Production varchar(100) COMMENT '制作会社', |
||
887 | Delivery varchar(100) COMMENT '納入業者', |
||
888 | QualityControl varchar(100) COMMENT '品質管理事項', |
||
889 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
890 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
891 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
||
892 | ) COMMENT = '日報データ (資材)'; |
||
893 | |||
894 | |||
895 | -- 日報データ (協力業者指示)
|
||
896 | CREATE TABLE DailyDataSubcontractors |
||
897 | ( |
||
898 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
899 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
900 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
901 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
902 | Attendee varchar(100) COMMENT '出席者', |
||
903 | ContentsText varchar(200) COMMENT '内容', |
||
904 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
905 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
906 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
||
907 | ) COMMENT = '日報データ (協力業者指示)'; |
||
908 | |||
909 | |||
910 | -- 日報データ (車両)
|
||
911 | CREATE TABLE DailyDataVehicles |
||
912 | ( |
||
913 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
914 | DailyDataDate date NOT NULL COMMENT '日報作成日', |
||
915 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
916 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
917 | Model varchar(100) COMMENT '機種', |
||
918 | Performance varchar(100) COMMENT '性能', |
||
919 | Owner varchar(100) COMMENT '所有会社', |
||
920 | Driver varchar(100) COMMENT '当日運転者', |
||
921 | StartWorkingTime datetime NOT NULL COMMENT '作業時間開始', |
||
922 | EndWorkingTime datetime NOT NULL COMMENT '作業時間終了', |
||
923 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
924 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
925 | PRIMARY KEY (PersonCode, DailyDataDate, ConstructionCode, SeqNo) |
||
926 | ) COMMENT = '日報データ (車両)'; |
||
927 | |||
928 | |||
929 | -- 部署経費率マスタ
|
||
930 | CREATE TABLE DepartmentExpensesMaster |
||
931 | ( |
||
932 | DepartmentCode decimal(5,0) unsigned NOT NULL COMMENT '部署コード', |
||
933 | ExpensesPeriod smallint NOT NULL COMMENT '事業期', |
||
934 | NameCode decimal(5,0) unsigned NOT NULL COMMENT '経費名称コード', |
||
935 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
936 | ExpensesRaito decimal(4,2) NOT NULL COMMENT '経費率', |
||
937 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
938 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
939 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
940 | PRIMARY KEY (DepartmentCode, ExpensesPeriod, NameCode) |
||
941 | ) COMMENT = '部署経費率マスタ'; |
||
942 | |||
943 | |||
944 | -- 部署マスタ
|
||
945 | CREATE TABLE DepartmentMaster |
||
946 | ( |
||
947 | DepartmentCode decimal(5,0) unsigned NOT NULL COMMENT '部署コード', |
||
948 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
949 | DepartmentString varchar(100) DEFAULT '' NOT NULL COMMENT '部署名', |
||
950 | ActionScheduleFlg decimal(1) NOT NULL COMMENT '行動予定表示フラグ', |
||
951 | StaffAssignFlg decimal(1) NOT NULL COMMENT '人員配置表示フラグ', |
||
952 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
953 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
954 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
955 | PRIMARY KEY (DepartmentCode) |
||
956 | ) COMMENT = '部署マスタ'; |
||
957 | |||
958 | |||
959 | -- 区分マスタ
|
||
960 | CREATE TABLE DivisionMaster |
||
961 | ( |
||
962 | DivisionCode decimal(5,0) unsigned NOT NULL COMMENT '区分コード', |
||
963 | NameCode decimal(5,0) unsigned NOT NULL COMMENT '名称コード', |
||
964 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
965 | NameString varchar(100) DEFAULT '' NOT NULL COMMENT '名称', |
||
966 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
967 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
968 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
969 | PRIMARY KEY (DivisionCode, NameCode) |
||
970 | ) COMMENT = '区分マスタ'; |
||
971 | |||
972 | |||
973 | -- 積算予算書データ
|
||
974 | CREATE TABLE EstimateBudget |
||
975 | ( |
||
976 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
977 | ConstructionTime decimal(5,2) unsigned NOT NULL COMMENT '工期', |
||
978 | IntegratedCode decimal(8) NOT NULL COMMENT '積算者', |
||
979 | DataCreateDate datetime NOT NULL COMMENT 'データ引込日', |
||
980 | RetValue1 decimal(12,0) NOT NULL COMMENT '予定価格', |
||
981 | RetValue2 decimal(12,0) NOT NULL COMMENT '直接工事費', |
||
982 | RetValue3 decimal(12,0) NOT NULL COMMENT '積み上げ共通仮設費', |
||
983 | RetValue4 decimal(12,0) NOT NULL COMMENT '積み上げ現場管理費', |
||
984 | RetPercent decimal(5,2) NOT NULL COMMENT '一般管理費率', |
||
985 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
986 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
987 | PRIMARY KEY (ConstructionCode) |
||
988 | ) COMMENT = '積算予算書データ'; |
||
989 | |||
990 | |||
991 | -- 積算予算内訳データ明細
|
||
992 | CREATE TABLE EstimateBudgetDetail |
||
993 | ( |
||
994 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
995 | GroupCount decimal(2,0) unsigned NOT NULL COMMENT 'グループ番号', |
||
996 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
997 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
998 | ItemCode decimal(5,0) unsigned COMMENT '工種キー', |
||
999 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1000 | FirstString varchar(120) COMMENT '大項目名称', |
||
1001 | SecondString varchar(120) COMMENT '工種名称・協力会社名', |
||
1002 | Content varchar(120) COMMENT '内容', |
||
1003 | EstimatePrice decimal(12,0) NOT NULL COMMENT '見積時金額', |
||
1004 | NegotiationPrice decimal(12,0) NOT NULL COMMENT '交渉時金額', |
||
1005 | Notes varchar(120) COMMENT '注意事項', |
||
1006 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1007 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1008 | PRIMARY KEY (ConstructionCode, GroupCount, LineCount) |
||
1009 | ) COMMENT = '積算予算内訳データ明細'; |
||
1010 | |||
1011 | |||
1012 | -- 積算見積データ
|
||
1013 | CREATE TABLE EstimateData |
||
1014 | ( |
||
1015 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1016 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
1017 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
1018 | FixedItemCode varchar(1) COMMENT '固定項目キー', |
||
1019 | ItemName varchar(120) COMMENT '作業名称', |
||
1020 | SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
||
1021 | PriceValue decimal(14,0) NOT NULL COMMENT '金額', |
||
1022 | note varchar(60) COMMENT '備考', |
||
1023 | MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
||
1024 | InputFlg decimal(1) NOT NULL COMMENT '入力フラグ', |
||
1025 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1026 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1027 | PRIMARY KEY (ConstructionCode, LineCount) |
||
1028 | ) COMMENT = '積算見積データ'; |
||
1029 | |||
1030 | |||
1031 | -- 積算見積ページデータ
|
||
1032 | CREATE TABLE EstimateDataBody |
||
1033 | ( |
||
1034 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1035 | PageCount decimal(4) unsigned NOT NULL COMMENT 'ページ番号', |
||
1036 | Category decimal(1) NOT NULL COMMENT 'ページ区分', |
||
1037 | UnionComponentCode decimal(5) unsigned NOT NULL COMMENT '所属構成キー', |
||
1038 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
1039 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1040 | SelectComponent decimal(5) unsigned NOT NULL COMMENT '選択構成キー', |
||
1041 | PageTitle varchar(120) NOT NULL COMMENT 'ページ表示名', |
||
1042 | DetailLineCount decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
1043 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1044 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1045 | PRIMARY KEY (ConstructionCode, PageCount) |
||
1046 | ) COMMENT = '積算見積ページデータ'; |
||
1047 | |||
1048 | |||
1049 | -- 積算見積データ明細
|
||
1050 | CREATE TABLE EstimateDataDetail |
||
1051 | ( |
||
1052 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1053 | PageCount decimal(4) unsigned NOT NULL COMMENT 'ページ番号', |
||
1054 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
1055 | DataType decimal(1) NOT NULL COMMENT 'データ種別', |
||
1056 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
1057 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1058 | SpecCode decimal(5,0) unsigned NOT NULL COMMENT '作業キー', |
||
1059 | ItemName varchar(120) COMMENT '作業名称', |
||
1060 | SpecName varchar(120) COMMENT '作業/品質・形状・寸法', |
||
1061 | Unitcount decimal(8,2) NOT NULL COMMENT '数量', |
||
1062 | UnitName varchar(30) COMMENT '単位名称', |
||
1063 | UnitPrice decimal(9,2) NOT NULL COMMENT '単価', |
||
1064 | LineTotal decimal(12,0) NOT NULL COMMENT '金額', |
||
1065 | note varchar(60) COMMENT '備考', |
||
1066 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1067 | MyExpensesFlg decimal(1) NOT NULL COMMENT '自社経費フラグ', |
||
1068 | InputFlg decimal(1) COMMENT '入力フラグ', |
||
1069 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1070 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1071 | PRIMARY KEY (ConstructionCode, PageCount, LineCount) |
||
1072 | ) COMMENT = '積算見積データ明細'; |
||
1073 | |||
1074 | |||
1075 | -- 会社休日マスタ
|
||
1076 | CREATE TABLE HolidayCalenderMaster |
||
1077 | ( |
||
1078 | Holiday date NOT NULL COMMENT '休日', |
||
1079 | BusinessYear smallint unsigned NOT NULL COMMENT '営業年度', |
||
1080 | TargetMonth tinyint unsigned NOT NULL COMMENT '該当月', |
||
1081 | TargetDay tinyint unsigned NOT NULL COMMENT '該当日', |
||
1082 | PRIMARY KEY (Holiday) |
||
1083 | ) COMMENT = '会社休日マスタ'; |
||
1084 | |||
1085 | |||
1086 | -- 入力時検索履歴
|
||
1087 | CREATE TABLE InputSearchLogData |
||
1088 | ( |
||
1089 | ConstructionCode decimal(10,0) NOT NULL COMMENT '工事コード', |
||
1090 | UsedProcessNo decimal(4,0) NOT NULL COMMENT '使用機能番号', |
||
1091 | DisplayOrder decimal(4) unsigned NOT NULL COMMENT '表示順', |
||
1092 | DataType decimal(1) NOT NULL COMMENT 'データ種別', |
||
1093 | InputCode decimal(10) COMMENT '入力コード', |
||
1094 | PRIMARY KEY (ConstructionCode, UsedProcessNo, DisplayOrder) |
||
1095 | ) COMMENT = '入力時検索履歴'; |
||
1096 | |||
1097 | |||
1098 | -- 掲示板メッセージ
|
||
1099 | CREATE TABLE MessageBoardData |
||
1100 | ( |
||
1101 | RecordNumber decimal(6) unsigned NOT NULL COMMENT 'レコード番号', |
||
1102 | BranchNumber decimal(3) unsigned NOT NULL COMMENT 'レコード枝番', |
||
1103 | FromCode decimal(8) unsigned NOT NULL COMMENT '書込み者コード', |
||
1104 | FromName varchar(60) NOT NULL COMMENT '書込み者', |
||
1105 | MessageTitile varchar(100) COMMENT '伝言タイトル', |
||
1106 | MessageContent varchar(1333) NOT NULL COMMENT '伝言内容', |
||
1107 | LinkType decimal(2) NOT NULL COMMENT 'リンク動作タイプ', |
||
1108 | LinkMessage varchar(200) COMMENT 'リンク文字列', |
||
1109 | LinkCode varchar(30) COMMENT 'リンクキー', |
||
1110 | WritingDate datetime NOT NULL COMMENT '書込み日時', |
||
1111 | PersonCode decimal(8,0) NOT NULL COMMENT '書込み担当者コード', |
||
1112 | ShareFlag decimal(2) NOT NULL COMMENT '管理者対象フラグ', |
||
1113 | MessageColor varchar(8) COMMENT '文字色', |
||
1114 | BackColor varchar(8) COMMENT 'バックカラー', |
||
1115 | MessageFlag decimal(1) NOT NULL COMMENT 'メッセージフラグ', |
||
1116 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1117 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1118 | PRIMARY KEY (RecordNumber, BranchNumber) |
||
1119 | ) COMMENT = '掲示板メッセージ'; |
||
1120 | |||
1121 | |||
1122 | -- 掲示板対象者テーブル
|
||
1123 | CREATE TABLE MessageBoardTerget |
||
1124 | ( |
||
1125 | RecordNumber decimal(6) unsigned NOT NULL COMMENT 'レコード番号', |
||
1126 | BranchNumber decimal(3) unsigned NOT NULL COMMENT 'レコード枝番', |
||
1127 | SeqNum decimal(3) unsigned NOT NULL COMMENT '順番', |
||
1128 | ToCode decimal(8) NOT NULL COMMENT '対象者コード', |
||
1129 | ToName varchar(60) NOT NULL COMMENT '対象者', |
||
1130 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1131 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1132 | PRIMARY KEY (RecordNumber, BranchNumber, SeqNum) |
||
1133 | ) COMMENT = '掲示板対象者テーブル'; |
||
1134 | |||
1135 | |||
1136 | -- 掲示板メッセージ閲覧履歴
|
||
1137 | CREATE TABLE MessageBrowsingHistory |
||
1138 | ( |
||
1139 | RecordNumber decimal(6) unsigned NOT NULL COMMENT 'レコード番号', |
||
1140 | BranchNumber decimal(3) unsigned NOT NULL COMMENT 'レコード枝番', |
||
1141 | SeqNum decimal(3) unsigned NOT NULL COMMENT '順番', |
||
1142 | BrowsingCode decimal(8) NOT NULL COMMENT '閲覧者コード', |
||
1143 | BrowsingDate datetime NOT NULL COMMENT '閲覧日付', |
||
1144 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1145 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1146 | PRIMARY KEY (RecordNumber, BranchNumber, SeqNum) |
||
1147 | ) COMMENT = '掲示板メッセージ閲覧履歴'; |
||
1148 | |||
1149 | |||
1150 | -- 発注者マスタ
|
||
1151 | CREATE TABLE OrderersMaster |
||
1152 | ( |
||
1153 | OrderCotegory decimal(5,0) unsigned NOT NULL COMMENT '発注者区分', |
||
1154 | OrderersCode decimal(5,0) unsigned NOT NULL COMMENT '発注者コード', |
||
1155 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1156 | OrderFlg decimal(1) NOT NULL COMMENT '法人団体・個人フラグ', |
||
1157 | CorporateStatusName varchar(100) COMMENT '法人格名称', |
||
1158 | CorporateStatusPoint decimal(1) COMMENT '法人格名称位置', |
||
1159 | OrderersName1 varchar(60) DEFAULT '' NOT NULL COMMENT '発注者名1', |
||
1160 | OrderersName2 varchar(60) COMMENT '発注者名2', |
||
1161 | DepartmentName varchar(60) COMMENT '部署名', |
||
1162 | ChargePersonName varchar(60) COMMENT '担当者名', |
||
1163 | ZipCode varchar(8) COMMENT '郵便番号', |
||
1164 | Address1 varchar(60) COMMENT '住所1', |
||
1165 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
1166 | Address3 varchar(60) COMMENT '住所3', |
||
1167 | PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
||
1168 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
1169 | MailAddress varchar(257) COMMENT 'メールアドレス', |
||
1170 | Note varchar(300) DEFAULT '' COMMENT '備考', |
||
1171 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1172 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1173 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1174 | PRIMARY KEY (OrderCotegory, OrderersCode) |
||
1175 | ) COMMENT = '発注者マスタ'; |
||
1176 | |||
1177 | |||
1178 | -- 受注金額データ
|
||
1179 | CREATE TABLE OrdersPriceData |
||
1180 | ( |
||
1181 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1182 | ChangeNo decimal(3) unsigned NOT NULL COMMENT '変更番号', |
||
1183 | ChangeDate date NOT NULL COMMENT '変更日', |
||
1184 | ChangePersonCode decimal(8) unsigned NOT NULL COMMENT '変更者コード', |
||
1185 | ChangePersonName varchar(60) COMMENT '変更者名', |
||
1186 | BeforeValue decimal(14,0) NOT NULL COMMENT '変更前税抜受注金額', |
||
1187 | BeforeValueInTax decimal(14,0) NOT NULL COMMENT '変更前税込受注金額', |
||
1188 | AfterValue decimal(14,0) NOT NULL COMMENT '変更後税抜受注金額', |
||
1189 | AfterValueInTax decimal(14,0) NOT NULL COMMENT '変更後税込受注金額', |
||
1190 | ChangeComment varchar(200) COMMENT '変更理由', |
||
1191 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1192 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1193 | PRIMARY KEY (ConstructionCode, ChangeNo) |
||
1194 | ) COMMENT = '受注金額データ'; |
||
1195 | |||
1196 | |||
1197 | -- 担当者承認データ
|
||
1198 | CREATE TABLE PersonApproval |
||
1199 | ( |
||
1200 | PersonCode decimal(8) unsigned NOT NULL COMMENT '担当者コード', |
||
1201 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
1202 | OrderDate date NOT NULL COMMENT '受付日', |
||
1203 | OrderNo decimal(2,0) unsigned NOT NULL COMMENT '受付番号', |
||
1204 | SeqNo decimal(2) NOT NULL COMMENT '枝番', |
||
1205 | PersonCodeApproval decimal(8) unsigned NOT NULL COMMENT '申請・承認者コード', |
||
1206 | PetitionApprovalDate datetime NOT NULL COMMENT '申請・承認日付', |
||
1207 | ApprovalLimitDates datetime NOT NULL COMMENT '承認希望日', |
||
1208 | ApprovalStatus decimal(1) NOT NULL COMMENT '承認状態', |
||
1209 | InputComment varchar(300) COMMENT 'コメント', |
||
1210 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1211 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1212 | PRIMARY KEY (PersonCode, ApprovalCode, OrderDate, OrderNo, SeqNo) |
||
1213 | ) COMMENT = '担当者承認データ'; |
||
1214 | |||
1215 | |||
1216 | -- 担当者承認コメントデータ
|
||
1217 | CREATE TABLE PersonApprovalComment |
||
1218 | ( |
||
1219 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
1220 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
1221 | OrderDate date NOT NULL COMMENT '受付日', |
||
1222 | OrderNo decimal(2,0) unsigned NOT NULL COMMENT '受付番号', |
||
1223 | CommentNo decimal(2) NOT NULL COMMENT 'コメント番号', |
||
1224 | ParentNo decimal(2) NOT NULL COMMENT '親コメント番号', |
||
1225 | ApproValComment varchar(300) COMMENT '指示・連絡コメント', |
||
1226 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1227 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1228 | PRIMARY KEY (PersonCode, ApprovalCode, OrderDate, OrderNo, CommentNo) |
||
1229 | ) COMMENT = '担当者承認コメントデータ'; |
||
1230 | |||
1231 | |||
1232 | -- 担当者対象部署マスタ
|
||
1233 | CREATE TABLE PersonDepartmentMaster |
||
1234 | ( |
||
1235 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
1236 | DepartmentCode decimal(5,0) unsigned NOT NULL COMMENT '部署コード', |
||
1237 | AffiliationFlg decimal(1) NOT NULL COMMENT '所属フラグ', |
||
1238 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1239 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1240 | PRIMARY KEY (PersonCode, DepartmentCode) |
||
1241 | ) COMMENT = '担当者対象部署マスタ'; |
||
1242 | |||
1243 | |||
1244 | -- 担当者マスタ
|
||
1245 | CREATE TABLE PersonInChargeMaster |
||
1246 | ( |
||
1247 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
1248 | DisplayOrder decimal(8) unsigned NOT NULL COMMENT '表示順', |
||
1249 | PersonName varchar(60) DEFAULT '' NOT NULL COMMENT '担当者名', |
||
1250 | StartDate date NOT NULL COMMENT '使用開始年月日', |
||
1251 | EndDate date COMMENT '使用終了年月日', |
||
1252 | PassWord varchar(16) COMMENT 'パスワード', |
||
1253 | SecurityManagement decimal(1) NOT NULL COMMENT '機密区分', |
||
1254 | SecCode decimal(2,0) unsigned NOT NULL COMMENT '保護区分番号', |
||
1255 | MsgBackColor varchar(8) COMMENT 'メッセージ背景色', |
||
1256 | DisplayString varchar(20) COMMENT '表示・印刷名称', |
||
1257 | DepartmentCode decimal(5,0) unsigned COMMENT '部署コード', |
||
1258 | MonthlySalary decimal(11,0) NOT NULL COMMENT '月給金額', |
||
1259 | YearSalary decimal(12,0) NOT NULL COMMENT '年俸金額', |
||
1260 | Qualification varchar(120) COMMENT '資格入力欄', |
||
1261 | SealPrintName varchar(5) COMMENT '印鑑表示名', |
||
1262 | EmployeeClassFlg decimal(1) NOT NULL COMMENT '社員区分', |
||
1263 | LedgerFlg decimal(1) NOT NULL COMMENT '台帳計算対象フラグ', |
||
1264 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1265 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1266 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1267 | PRIMARY KEY (PersonCode) |
||
1268 | ) COMMENT = '担当者マスタ'; |
||
1269 | |||
1270 | |||
1271 | -- 担当者給与マスタ
|
||
1272 | CREATE TABLE PersonSalaryMaster |
||
1273 | ( |
||
1274 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
1275 | StartDate date NOT NULL COMMENT '使用開始年月日', |
||
1276 | MonthlySalary decimal(11,0) NOT NULL COMMENT '月給金額', |
||
1277 | YearSalary decimal(12,0) NOT NULL COMMENT '年俸金額', |
||
1278 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1279 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1280 | PRIMARY KEY (PersonCode, StartDate) |
||
1281 | ) COMMENT = '担当者給与マスタ'; |
||
1282 | |||
1283 | |||
1284 | -- 発注者打ち合わせ議事録データ
|
||
1285 | CREATE TABLE ProceedingsData |
||
1286 | ( |
||
1287 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1288 | ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
||
1289 | StartMeetingTime decimal(4) unsigned NOT NULL COMMENT '会議時間開始', |
||
1290 | EndMeetingTime decimal(4) unsigned NOT NULL COMMENT '会議時間終了', |
||
1291 | CreatorCode decimal(8,0) NOT NULL COMMENT '作成者コード', |
||
1292 | PalceFlag decimal(1) NOT NULL COMMENT '現地フラグ', |
||
1293 | MeetingPalce varchar(120) COMMENT '打合せ場所', |
||
1294 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1295 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1296 | PRIMARY KEY (ConstructionCode, ProceedingsDataDate, StartMeetingTime) |
||
1297 | ) COMMENT = '発注者打ち合わせ議事録データ'; |
||
1298 | |||
1299 | |||
1300 | -- 発注者打ち合わせ議事録データ(出席者)
|
||
1301 | CREATE TABLE ProceedingsDataAttend |
||
1302 | ( |
||
1303 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1304 | ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
||
1305 | StartMeetingTime decimal(4) unsigned NOT NULL COMMENT '会議時間開始', |
||
1306 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
1307 | Department varchar(20) COMMENT '出席者所属', |
||
1308 | AttendName varchar(10) COMMENT '出席者氏名', |
||
1309 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1310 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1311 | PRIMARY KEY (ConstructionCode, ProceedingsDataDate, StartMeetingTime, SeqNo) |
||
1312 | ) COMMENT = '発注者打ち合わせ議事録データ(出席者)'; |
||
1313 | |||
1314 | |||
1315 | -- 発注者打ち合わせ議事録データ(明細)
|
||
1316 | CREATE TABLE ProceedingsDataDetail |
||
1317 | ( |
||
1318 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1319 | ProceedingsDataDate date NOT NULL COMMENT '議事録作成日', |
||
1320 | StartMeetingTime decimal(4) unsigned NOT NULL COMMENT '会議時間開始', |
||
1321 | SeqNo decimal(3) unsigned NOT NULL COMMENT '明細行番号', |
||
1322 | TitleNo varchar(5) COMMENT '議題番号', |
||
1323 | Title varchar(20) COMMENT '議題', |
||
1324 | ContentsText varchar(50) COMMENT '内容', |
||
1325 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1326 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1327 | PRIMARY KEY (ConstructionCode, ProceedingsDataDate, StartMeetingTime, SeqNo) |
||
1328 | ) COMMENT = '発注者打ち合わせ議事録データ(明細)'; |
||
1329 | |||
1330 | |||
1331 | -- 承認データ
|
||
1332 | CREATE TABLE ProcessApproval |
||
1333 | ( |
||
1334 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1335 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
1336 | OrderNo decimal(2,0) unsigned NOT NULL COMMENT '受付番号', |
||
1337 | SeqNo decimal(2) NOT NULL COMMENT '枝番', |
||
1338 | PersonCode decimal(8) unsigned NOT NULL COMMENT '申請・承認者コード', |
||
1339 | PetitionApprovalDate datetime NOT NULL COMMENT '申請・承認日付', |
||
1340 | ApprovalLimitDates datetime NOT NULL COMMENT '承認希望日', |
||
1341 | ApprovalStatus decimal(1) NOT NULL COMMENT '承認状態', |
||
1342 | InputComment varchar(300) COMMENT 'コメント', |
||
1343 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1344 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1345 | PRIMARY KEY (ConstructionCode, ApprovalCode, OrderNo, SeqNo) |
||
1346 | ) COMMENT = '承認データ'; |
||
1347 | |||
1348 | |||
1349 | -- 承認コメントデータ
|
||
1350 | CREATE TABLE ProcessApprovalComment |
||
1351 | ( |
||
1352 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1353 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
1354 | OrderNo decimal(2,0) unsigned NOT NULL COMMENT '受付番号', |
||
1355 | CommentNo decimal(2) NOT NULL COMMENT 'コメント番号', |
||
1356 | ParentNo decimal(2) NOT NULL COMMENT '親コメント番号', |
||
1357 | ApproValComment varchar(300) COMMENT '指示・連絡コメント', |
||
1358 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1359 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1360 | PRIMARY KEY (ConstructionCode, ApprovalCode, OrderNo, CommentNo) |
||
1361 | ) COMMENT = '承認コメントデータ'; |
||
1362 | |||
1363 | |||
1364 | -- 承認明細データ
|
||
1365 | CREATE TABLE ProcessApprovalDetail |
||
1366 | ( |
||
1367 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1368 | ApprovalCode decimal(3,0) unsigned NOT NULL COMMENT '承認機能番号', |
||
1369 | OrderNo decimal(2,0) unsigned NOT NULL COMMENT '受付番号', |
||
1370 | SerialNo decimal(2) unsigned NOT NULL COMMENT '枝番', |
||
1371 | LinkCode decimal(10) NOT NULL COMMENT 'リンク情報', |
||
1372 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1373 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1374 | PRIMARY KEY (ConstructionCode, ApprovalCode, OrderNo, SerialNo) |
||
1375 | ) COMMENT = '承認明細データ'; |
||
1376 | |||
1377 | |||
1378 | -- 起動対象マスタ
|
||
1379 | CREATE TABLE ProcessExcuteMaster |
||
1380 | ( |
||
1381 | SecCode decimal(2,0) unsigned NOT NULL COMMENT '保護区分番号', |
||
1382 | ExecCode decimal(4,0) unsigned NOT NULL COMMENT '起動処理番号', |
||
1383 | EditFlg decimal(1) NOT NULL COMMENT '編集フラグ', |
||
1384 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1385 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1386 | PRIMARY KEY (SecCode, ExecCode) |
||
1387 | ) COMMENT = '起動対象マスタ'; |
||
1388 | |||
1389 | |||
1390 | -- 注文書データ
|
||
1391 | CREATE TABLE PurchaseOrder |
||
1392 | ( |
||
1393 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1394 | SeqNo decimal(3) unsigned NOT NULL COMMENT '注文書枝番', |
||
1395 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1396 | CreateDate date COMMENT '作成日付', |
||
1397 | OrderPrice decimal(12,0) NOT NULL COMMENT '発注金額', |
||
1398 | LastRowStringDate date NOT NULL COMMENT '最終行表示日付', |
||
1399 | OrderSheetType decimal(1) NOT NULL COMMENT '簡易・本式フラグ', |
||
1400 | PaymentTerms decimal(1) NOT NULL COMMENT '支払い条件', |
||
1401 | CashRatio decimal(4,1) NOT NULL COMMENT '現金割合(%)', |
||
1402 | BillPeriod decimal(4) NOT NULL COMMENT '手形期間', |
||
1403 | PrePayments decimal(1) NOT NULL COMMENT '前金払', |
||
1404 | PrePaymentsDays decimal(3,0) NOT NULL COMMENT '前金払日数', |
||
1405 | PrePaymentsPrice decimal(12,0) NOT NULL COMMENT '前金払金額', |
||
1406 | PartialPayment decimal(1) NOT NULL COMMENT '部分払', |
||
1407 | PartialPaymentMounth decimal(2) unsigned NOT NULL COMMENT '部分払締切月', |
||
1408 | PartialPaymentDay1 decimal(2) unsigned NOT NULL COMMENT '部分払締切日', |
||
1409 | PartialPaymentDay2 decimal(2) unsigned NOT NULL COMMENT '部分払支払日', |
||
1410 | PartialPaymentPrice decimal(12,0) NOT NULL COMMENT '部分払金額', |
||
1411 | CompletionPayment decimal(1) NOT NULL COMMENT '引渡し時の支払', |
||
1412 | CompletionPaymentDays decimal(3) unsigned NOT NULL COMMENT '引渡し時の支払日数', |
||
1413 | CompletionPaymentPrice decimal(12,0) NOT NULL COMMENT '引渡し時の支払金額', |
||
1414 | LeadEngineerCode decimal(8,0) COMMENT '主任技術者コード', |
||
1415 | LeadEngineerName varchar(60) COMMENT 'LeadEngineerName', |
||
1416 | SafetyOfficerCode decimal(8) COMMENT '安全管理者コード', |
||
1417 | SafetyOfficerName varchar(60) COMMENT '安全管理者名', |
||
1418 | WorkersCount decimal(3) unsigned COMMENT '作業員数', |
||
1419 | PrintoutDate date NOT NULL COMMENT '印刷年月日', |
||
1420 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1421 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1422 | PRIMARY KEY (ConstructionCode, SeqNo) |
||
1423 | ) COMMENT = '注文書データ'; |
||
1424 | |||
1425 | |||
1426 | -- 注文書明細データ
|
||
1427 | CREATE TABLE PurchaseOrderDetail |
||
1428 | ( |
||
1429 | ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '工事コード', |
||
1430 | SeqNo decimal(3) unsigned NOT NULL COMMENT '注文書枝番', |
||
1431 | GroupCount decimal(1) NOT NULL COMMENT 'グループ番号', |
||
1432 | LineCount decimal(3) unsigned NOT NULL COMMENT '行番号', |
||
1433 | ComponentCode decimal(5,0) unsigned NOT NULL COMMENT '構成キー', |
||
1434 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1435 | FirstString varchar(120) COMMENT '工種・品名', |
||
1436 | SecondString varchar(120) COMMENT '内容内訳', |
||
1437 | UnitCount decimal(8,2) NOT NULL COMMENT '数量', |
||
1438 | UnitName varchar(30) COMMENT '単位', |
||
1439 | UnitPrice decimal(10,0) NOT NULL COMMENT '単価', |
||
1440 | OrdersLinePrice decimal(12,0) COMMENT '金額', |
||
1441 | SourceCode decimal(10) unsigned NOT NULL COMMENT '予算作成時工事番号', |
||
1442 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1443 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1444 | PRIMARY KEY (ConstructionCode, SeqNo, GroupCount, LineCount) |
||
1445 | ) COMMENT = '注文書明細データ'; |
||
1446 | |||
1447 | |||
1448 | -- 売上グラフデータ
|
||
1449 | CREATE TABLE SalesGraphData |
||
1450 | ( |
||
1451 | GraphDataCode decimal(8) NOT NULL COMMENT 'グラフデータコード', |
||
1452 | ConstructionPeriod decimal(4) unsigned NOT NULL COMMENT '事業期', |
||
1453 | SalesDataDays date NOT NULL COMMENT '売上年月', |
||
1454 | DisplayOrder decimal(8) unsigned NOT NULL COMMENT '表示順', |
||
1455 | DataName varchar(100) NOT NULL COMMENT 'データ表示名称', |
||
1456 | SalesAmount decimal(10,0) NOT NULL COMMENT '売上データ', |
||
1457 | AdministrativeExpense decimal(10,0) NOT NULL COMMENT '販管・部署経費', |
||
1458 | GrossProfit decimal(10,0) NOT NULL COMMENT '粗利益', |
||
1459 | NetIncome decimal(10,0) NOT NULL COMMENT '純利益(損益)', |
||
1460 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1461 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1462 | PRIMARY KEY (GraphDataCode, ConstructionPeriod, SalesDataDays) |
||
1463 | ) COMMENT = '売上グラフデータ'; |
||
1464 | |||
1465 | |||
1466 | -- 保護区分マスタ
|
||
1467 | CREATE TABLE SecurityMaster |
||
1468 | ( |
||
1469 | SecCode decimal(2,0) unsigned NOT NULL COMMENT '保護区分番号', |
||
1470 | DisplayOrder decimal(2) NOT NULL COMMENT '表示順', |
||
1471 | SecName varchar(60) NOT NULL COMMENT '保護区分名称', |
||
1472 | SecRank decimal(1) NOT NULL COMMENT '保護区分ランク', |
||
1473 | SecRange decimal(1) NOT NULL COMMENT '保護区分範囲', |
||
1474 | GeneralAffairs decimal(1) NOT NULL COMMENT '総務業務フラグ', |
||
1475 | SelectBackColor varchar(8) NOT NULL COMMENT '選択背景色', |
||
1476 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1477 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1478 | PRIMARY KEY (SecCode) |
||
1479 | ) COMMENT = '保護区分マスタ'; |
||
1480 | |||
1481 | |||
1482 | -- 協力業者施工工種登録申請データ
|
||
1483 | CREATE TABLE SubConstrJobItemRegist |
||
1484 | ( |
||
1485 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '申請者番号', |
||
1486 | CreateDate date NOT NULL COMMENT '作成日', |
||
1487 | SeqNo decimal(2) unsigned NOT NULL COMMENT '申請連番', |
||
1488 | DisplayOrder decimal(8) unsigned NOT NULL COMMENT '表示順', |
||
1489 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1490 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1491 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1492 | PRIMARY KEY (PersonCode, CreateDate, SeqNo, DisplayOrder) |
||
1493 | ) COMMENT = '協力業者施工工種登録申請データ'; |
||
1494 | |||
1495 | |||
1496 | -- 協力業者職種リンク登録申請データ
|
||
1497 | CREATE TABLE SubConstrJobLinkRegist |
||
1498 | ( |
||
1499 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '申請者番号', |
||
1500 | CreateDate date NOT NULL COMMENT '作成日', |
||
1501 | SeqNo decimal(2) unsigned NOT NULL COMMENT '申請連番', |
||
1502 | DisplayOrder decimal(8) unsigned NOT NULL COMMENT '表示順', |
||
1503 | JobCategoryCode decimal(5,0) NOT NULL COMMENT '職種キー', |
||
1504 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1505 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1506 | PRIMARY KEY (PersonCode, CreateDate, SeqNo, DisplayOrder) |
||
1507 | ) COMMENT = '協力業者職種リンク登録申請データ'; |
||
1508 | |||
1509 | |||
1510 | -- 協力業者登録申請データ
|
||
1511 | CREATE TABLE SubConstrRegist |
||
1512 | ( |
||
1513 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '申請者番号', |
||
1514 | CreateDate date NOT NULL COMMENT '作成日', |
||
1515 | SeqNo decimal(2) unsigned NOT NULL COMMENT '申請連番', |
||
1516 | DataMode decimal(1) COMMENT 'データ区分', |
||
1517 | SourceCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1518 | PetitionPeriod decimal(4) unsigned NOT NULL COMMENT '申請年度', |
||
1519 | CorporateStatusName varchar(40) DEFAULT '' COMMENT '法人格名称', |
||
1520 | CorporateStatusPoint decimal(1) NOT NULL COMMENT '法人格名称位置', |
||
1521 | CompanyName varchar(100) DEFAULT '' NOT NULL COMMENT '協力会社名', |
||
1522 | CEOPositionName varchar(60) DEFAULT '' COMMENT '代表者役職名', |
||
1523 | CEOName varchar(60) DEFAULT '' COMMENT '代表者氏名', |
||
1524 | ContactPersonName varchar(60) COMMENT '担当者氏名', |
||
1525 | ZipCode varchar(8) COMMENT '郵便番号', |
||
1526 | Address1 varchar(60) COMMENT '住所1', |
||
1527 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
1528 | Address3 varchar(60) COMMENT '住所3', |
||
1529 | CellPhoneNumber varchar(13) COMMENT '携帯電話番号', |
||
1530 | MailAddress varchar(257) COMMENT 'メールアドレス', |
||
1531 | PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
||
1532 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
1533 | JapaneseSyllabary varchar(2) COMMENT '50音読み', |
||
1534 | StartDate date NOT NULL COMMENT '取引開始年月日', |
||
1535 | Note varchar(300) DEFAULT '' COMMENT '備考', |
||
1536 | labourKind decimal(1) NOT NULL COMMENT '支払い通常・手間区分', |
||
1537 | OrderDate date COMMENT '申請日', |
||
1538 | OrderNo decimal(2) unsigned NOT NULL COMMENT '申請受付番号', |
||
1539 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1540 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1541 | PRIMARY KEY (PersonCode, CreateDate, SeqNo) |
||
1542 | ) COMMENT = '協力業者登録申請データ'; |
||
1543 | |||
1544 | |||
1545 | -- 協力会社工種マスタ
|
||
1546 | CREATE TABLE SubContractorItemMaster |
||
1547 | ( |
||
1548 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1549 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1550 | ItemName varchar(120) DEFAULT '' NOT NULL COMMENT '工種名称', |
||
1551 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1552 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1553 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1554 | PRIMARY KEY (ItemCode) |
||
1555 | ) COMMENT = '協力会社工種マスタ'; |
||
1556 | |||
1557 | |||
1558 | -- 協力会社職種マスタ
|
||
1559 | CREATE TABLE SubContractorJobCategory |
||
1560 | ( |
||
1561 | JobCategoryCode decimal(5,0) NOT NULL COMMENT '職種キー', |
||
1562 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1563 | JobCategoryName varchar(120) DEFAULT '' NOT NULL COMMENT '職種名称', |
||
1564 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1565 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1566 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1567 | PRIMARY KEY (JobCategoryCode) |
||
1568 | ) COMMENT = '協力会社職種マスタ'; |
||
1569 | |||
1570 | |||
1571 | -- 協力会社施工工種データ
|
||
1572 | CREATE TABLE SubContractorJobItem |
||
1573 | ( |
||
1574 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1575 | ItemCode decimal(5,0) unsigned NOT NULL COMMENT '工種キー', |
||
1576 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1577 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1578 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1579 | PRIMARY KEY (CompanyCode, ItemCode) |
||
1580 | ) COMMENT = '協力会社施工工種データ'; |
||
1581 | |||
1582 | |||
1583 | -- 協力会社職種リンクマスタ
|
||
1584 | CREATE TABLE SubContractorJobLink |
||
1585 | ( |
||
1586 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1587 | JobCategoryCode decimal(5,0) NOT NULL COMMENT '職種キー', |
||
1588 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1589 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1590 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1591 | PRIMARY KEY (CompanyCode, JobCategoryCode) |
||
1592 | ) COMMENT = '協力会社職種リンクマスタ'; |
||
1593 | |||
1594 | |||
1595 | -- 協力会社マスタ
|
||
1596 | CREATE TABLE SubContractorMaster |
||
1597 | ( |
||
1598 | CompanyCode decimal(8,0) NOT NULL COMMENT '協力会社コード', |
||
1599 | DisplayOrder decimal(8) unsigned NOT NULL COMMENT '表示順', |
||
1600 | CorporateStatusName varchar(40) DEFAULT '' COMMENT '法人格名称', |
||
1601 | CorporateStatusPoint decimal(1) NOT NULL COMMENT '法人格名称位置', |
||
1602 | CompanyName varchar(100) DEFAULT '' NOT NULL COMMENT '協力会社名', |
||
1603 | CEOPositionName varchar(60) DEFAULT '' COMMENT '代表者役職名', |
||
1604 | CEOName varchar(60) DEFAULT '' COMMENT '代表者氏名', |
||
1605 | ContactPersonName varchar(60) COMMENT '担当者氏名', |
||
1606 | ZipCode varchar(8) COMMENT '郵便番号', |
||
1607 | Address1 varchar(60) COMMENT '住所1', |
||
1608 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
1609 | Address3 varchar(60) COMMENT '住所3', |
||
1610 | CellPhoneNumber varchar(13) COMMENT '携帯電話番号', |
||
1611 | MailAddress varchar(257) COMMENT 'メールアドレス', |
||
1612 | PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
||
1613 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
1614 | JapaneseSyllabary varchar(2) COMMENT '50音読み', |
||
1615 | StartDate date NOT NULL COMMENT '取引開始年月日', |
||
1616 | Note varchar(300) DEFAULT '' COMMENT '備考', |
||
1617 | labourKind decimal(1) NOT NULL COMMENT '支払い通常・手間区分', |
||
1618 | DeleteFlg decimal(1) DEFAULT 0 NOT NULL COMMENT '削除フラグ', |
||
1619 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1620 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1621 | PRIMARY KEY (CompanyCode) |
||
1622 | ) COMMENT = '協力会社マスタ'; |
||
1623 | |||
1624 | |||
1625 | -- 仕入先マスタ
|
||
1626 | CREATE TABLE SuppliersMaster |
||
1627 | ( |
||
1628 | SuppliersCode decimal(5,0) unsigned NOT NULL COMMENT '仕入先コード', |
||
1629 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1630 | SuppliersName1 varchar(60) DEFAULT '' NOT NULL COMMENT '仕入先名1', |
||
1631 | SuppliersName2 varchar(60) COMMENT '仕入先名2', |
||
1632 | ZipCode varchar(8) COMMENT '郵便番号', |
||
1633 | Address1 varchar(60) COMMENT '住所1', |
||
1634 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
1635 | Address3 varchar(60) COMMENT '住所3', |
||
1636 | PhoneNumber varchar(13) DEFAULT '' COMMENT '電話番号', |
||
1637 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
1638 | Note varchar(300) DEFAULT '' COMMENT '備考', |
||
1639 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1640 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1641 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1642 | PRIMARY KEY (SuppliersCode) |
||
1643 | ) COMMENT = '仕入先マスタ'; |
||
1644 | |||
1645 | |||
1646 | -- システム起動確認データ
|
||
1647 | CREATE TABLE SystemExecute |
||
1648 | ( |
||
1649 | PrimaryCode tinyint NOT NULL COMMENT 'キー項目', |
||
1650 | TargetDate date NOT NULL COMMENT '起動日付', |
||
1651 | SystemVersion int NOT NULL COMMENT '本体・環境バージョン', |
||
1652 | UpDateCopyVersion int NOT NULL COMMENT 'コピーバージョン', |
||
1653 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1654 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1655 | PRIMARY KEY (PrimaryCode) |
||
1656 | ) COMMENT = 'システム起動確認データ'; |
||
1657 | |||
1658 | |||
1659 | -- 管理マスタ
|
||
1660 | CREATE TABLE SystemMaster |
||
1661 | ( |
||
1662 | SystemCode decimal(3,0) unsigned NOT NULL COMMENT '会社コード', |
||
1663 | CompanyName1 varchar(60) DEFAULT '' NOT NULL COMMENT '会社名1', |
||
1664 | CompanyName2 varchar(60) DEFAULT '' COMMENT '会社名2', |
||
1665 | CEOName varchar(60) DEFAULT '' NOT NULL COMMENT '代表者氏名', |
||
1666 | CEOPositionName varchar(60) DEFAULT '' COMMENT '代表者役職名', |
||
1667 | ZipCode varchar(8) NOT NULL COMMENT '郵便番号', |
||
1668 | Address1 varchar(60) NOT NULL COMMENT '住所1', |
||
1669 | Address2 varchar(60) DEFAULT '' COMMENT '住所2', |
||
1670 | Address3 varchar(60) COMMENT '住所3', |
||
1671 | PhoneNumber varchar(13) DEFAULT '' NOT NULL COMMENT '電話番号', |
||
1672 | FaxNumber varchar(13) DEFAULT '' COMMENT 'FAX番号', |
||
1673 | ConstructionExpenses decimal(4,2) NOT NULL COMMENT '工事部経費', |
||
1674 | OfficeExpenses decimal(4,2) NOT NULL COMMENT '事務所経費', |
||
1675 | OperatingExpenses decimal(4,2) NOT NULL COMMENT '営業経費', |
||
1676 | ConsumptionTax decimal(4,2) NOT NULL COMMENT '消費税', |
||
1677 | CooperationRate decimal(4,2) NOT NULL COMMENT '協力金比率', |
||
1678 | ExcelSavePath varchar(120) COMMENT 'Excel保存パス', |
||
1679 | BusinessPeriod smallint NOT NULL COMMENT '現在営業期数', |
||
1680 | ConstructionYear smallint NOT NULL COMMENT '現在工事年度', |
||
1681 | BusinessBeginningDate varchar(5) NOT NULL COMMENT '営業期期首日', |
||
1682 | ConstructionBeginningDate varchar(5) NOT NULL COMMENT '工事年度期首日', |
||
1683 | ConstructionNoBase decimal(1) NOT NULL COMMENT '工事番号基準値', |
||
1684 | SloganString1 varchar(100) COMMENT '標語1', |
||
1685 | SloganString2 varchar(100) COMMENT '標語2', |
||
1686 | SloganString3 varchar(100) COMMENT '標語3', |
||
1687 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1688 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1689 | PRIMARY KEY (SystemCode) |
||
1690 | ) COMMENT = '管理マスタ'; |
||
1691 | |||
1692 | |||
1693 | -- 期限マスタ
|
||
1694 | CREATE TABLE TermMaster |
||
1695 | ( |
||
1696 | ConstructionStatusFlg decimal(2,0) NOT NULL COMMENT '工事状態フラグ', |
||
1697 | FieldNo decimal(2) NOT NULL COMMENT 'チェック対象フィールド番号', |
||
1698 | SeqNo decimal(2) NOT NULL COMMENT '枝番', |
||
1699 | DisplayOrder decimal(2) NOT NULL COMMENT '表示順', |
||
1700 | CheckSchdule decimal(1) NOT NULL COMMENT 'チェックタイミング', |
||
1701 | TermDays decimal(3) NOT NULL COMMENT '経過日', |
||
1702 | SendTitile varchar(100) COMMENT 'タイトル', |
||
1703 | SendMessage varchar(100) COMMENT 'メッセージ', |
||
1704 | BackColor varchar(8) COMMENT '背景色', |
||
1705 | ForeColor varchar(8) COMMENT '文字色', |
||
1706 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1707 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1708 | PRIMARY KEY (ConstructionStatusFlg, FieldNo, SeqNo) |
||
1709 | ) COMMENT = '期限マスタ'; |
||
1710 | |||
1711 | |||
1712 | -- 出勤交通費データ
|
||
1713 | CREATE TABLE TranceportDailyData |
||
1714 | ( |
||
1715 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '作成者コード', |
||
1716 | AttendanceDate date NOT NULL COMMENT '日報作成日', |
||
1717 | StartDistance decimal(7,1) NOT NULL COMMENT '当日出発キロ数', |
||
1718 | ComplateDistance decimal(7,1) NOT NULL COMMENT '当日終了キロ数', |
||
1719 | TotalDistance decimal(6,1) NOT NULL COMMENT '当日合計キロ数', |
||
1720 | OfficeGoFlg decimal(1) NOT NULL COMMENT '事務所出勤フラグ', |
||
1721 | OfficeOutFlg decimal(1) NOT NULL COMMENT '事務所帰宅フラグ', |
||
1722 | TrancePayGoFlg decimal(1) NOT NULL COMMENT '有料通勤出勤フラグ', |
||
1723 | TrancePayOutFlg decimal(1) NOT NULL COMMENT '有料通勤帰宅フラグ', |
||
1724 | WareHouseFlg decimal(1) NOT NULL COMMENT '資材置場フラグ', |
||
1725 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1726 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1727 | PRIMARY KEY (PersonCode, AttendanceDate) |
||
1728 | ) COMMENT = '出勤交通費データ'; |
||
1729 | |||
1730 | |||
1731 | -- 工事種別経費率マスタ
|
||
1732 | CREATE TABLE TypeExpensesMaster |
||
1733 | ( |
||
1734 | TypeCode decimal(5,0) unsigned NOT NULL COMMENT '工事種別コード', |
||
1735 | ExpensesPeriod smallint NOT NULL COMMENT '事業期', |
||
1736 | NameCode decimal(5,0) unsigned NOT NULL COMMENT '経費名称コード', |
||
1737 | ExpensesRaito decimal(4,2) NOT NULL COMMENT '経費率', |
||
1738 | DeleteFlg decimal(1) NOT NULL COMMENT '削除フラグ', |
||
1739 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1740 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1741 | PRIMARY KEY (TypeCode, ExpensesPeriod, NameCode) |
||
1742 | ) COMMENT = '工事種別経費率マスタ'; |
||
1743 | |||
1744 | |||
1745 | -- 単位マスタ
|
||
1746 | CREATE TABLE UnitMaster |
||
1747 | ( |
||
1748 | UnitKey decimal(5,0) unsigned NOT NULL COMMENT '単位キー', |
||
1749 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1750 | UnitName varchar(30) NOT NULL COMMENT '単位名称', |
||
1751 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1752 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1753 | PRIMARY KEY (UnitKey) |
||
1754 | ) COMMENT = '単位マスタ'; |
||
1755 | |||
1756 | |||
1757 | -- 車両マスタ
|
||
1758 | CREATE TABLE VehicleMaster |
||
1759 | ( |
||
1760 | VehicleCode decimal(5,0) unsigned NOT NULL COMMENT '車両コード', |
||
1761 | DisplayOrder decimal(5) unsigned NOT NULL COMMENT '表示順', |
||
1762 | VehicleName varchar(100) NOT NULL COMMENT '車両名称', |
||
1763 | RegistrationNumber varchar(30) COMMENT '登録番号', |
||
1764 | IdentificationNumber varchar(30) COMMENT '車体番号', |
||
1765 | ModelCode varchar(30) COMMENT '型式', |
||
1766 | DepartmentCode decimal(5) unsigned NOT NULL COMMENT '管理部署', |
||
1767 | VehicleScheduleFlg decimal(1) NOT NULL COMMENT '車両予約表示フラグ', |
||
1768 | PurchaseDate date COMMENT '購入日', |
||
1769 | PurchaseName varchar(30) COMMENT '購入先', |
||
1770 | PurchaseContactPersons varchar(30) COMMENT '購入先担当者', |
||
1771 | PurchasePhone varchar(13) COMMENT '購入先電話番号', |
||
1772 | LeaseDate date COMMENT 'リース開始日', |
||
1773 | LeaseDestination varchar(30) COMMENT 'リース先', |
||
1774 | LeaseContactPersons varchar(30) COMMENT 'リース先担当者', |
||
1775 | LeasePhone varchar(13) COMMENT 'リース先電話番号', |
||
1776 | InsuranceCompany varchar(30) COMMENT '任意保険会社', |
||
1777 | InsuranceContactPersons varchar(30) COMMENT '任意保険会社担当者', |
||
1778 | InsurancePhone varchar(13) COMMENT '任意保険会社電話番号', |
||
1779 | Note varchar(300) COMMENT '備考', |
||
1780 | EntryDate datetime COMMENT '登録日付', |
||
1781 | UpdateDate datetime COMMENT '更新日付', |
||
1782 | PRIMARY KEY (VehicleCode) |
||
1783 | ) COMMENT = '車両マスタ'; |
||
1784 | |||
1785 | |||
1786 | -- 車両記録データ
|
||
1787 | CREATE TABLE VehicleRecordData |
||
1788 | ( |
||
1789 | VehicleCode decimal(5,0) unsigned NOT NULL COMMENT '車両コード', |
||
1790 | DivisionCode decimal(2,0) unsigned NOT NULL COMMENT 'データ区分', |
||
1791 | SeqNo decimal(2) NOT NULL COMMENT '枝番', |
||
1792 | RecordDate date COMMENT '実地日', |
||
1793 | Mileage mediumint COMMENT '走行距離', |
||
1794 | Content varchar(100) COMMENT '内容', |
||
1795 | PaymentCost decimal(10,0) COMMENT '費用', |
||
1796 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1797 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1798 | PRIMARY KEY (VehicleCode, DivisionCode, SeqNo) |
||
1799 | ) COMMENT = '車両記録データ'; |
||
1800 | |||
1801 | |||
1802 | -- 車両予約データ
|
||
1803 | CREATE TABLE VehicleScheduleData |
||
1804 | ( |
||
1805 | TargetDate date NOT NULL COMMENT '対象日', |
||
1806 | VehicleCode decimal(5,0) unsigned NOT NULL COMMENT '車両コード', |
||
1807 | MorningAfternoon decimal(1) NOT NULL COMMENT '午前・午後', |
||
1808 | PersonCode decimal(8,0) unsigned NOT NULL COMMENT '担当者コード', |
||
1809 | TargetYear year(4) NOT NULL COMMENT '該当年', |
||
1810 | TargetMonth tinyint unsigned NOT NULL COMMENT '該当月', |
||
1811 | TargetDay year(2) NOT NULL COMMENT '該当日', |
||
1812 | EntryDate datetime NOT NULL COMMENT '登録日付', |
||
1813 | UpdateDate datetime NOT NULL COMMENT '更新日付', |
||
1814 | PRIMARY KEY (TargetDate, VehicleCode, MorningAfternoon) |
||
1815 | ) COMMENT = '車両予約データ'; |
||
1816 | |||
1817 | |||
1818 | |||
1819 | /* Create Indexes */
|
||
1820 | |||
1821 | CREATE INDEX ActionScheduleData_Index1 ON ActionScheduleData (TargetYear ASC); |
||
1822 | CREATE INDEX ActionScheduleData_Index2 ON ActionScheduleData (TargetMonth ASC); |
||
1823 | CREATE INDEX ActionScheduleData_Index3 ON ActionScheduleData (TargetDay ASC); |
||
1824 | CREATE INDEX AttendDaily_Index1 ON AttendanceDailyData (ActionResult ASC); |
||
1825 | CREATE INDEX AttendDaily_Index2 ON AttendanceDailyData (AttendanceDate ASC); |
||
1826 | CREATE INDEX BusinessTypeMaster_Index1 ON BusinessTypeMaster (DisplayOrder ASC); |
||
1827 | CREATE INDEX ComponentLinkMaster_Index1 ON ComponentLinkMaster (ComponentCode ASC); |
||
1828 | CREATE INDEX ComponentLinkMaster_Index2 ON ComponentLinkMaster (ItemCode ASC); |
||
1829 | CREATE INDEX ComponentMaster_Index1 ON ComponentMaster (DisplayOrder ASC); |
||
1830 | CREATE INDEX ComponentToTypeMaster_Index1 ON ComponentToTypeMaster (ComponentCode ASC); |
||
1831 | CREATE INDEX ComponentToTypeMaster_Index2 ON ComponentToTypeMaster (TypeCode ASC); |
||
1832 | CREATE INDEX BaseInfo_Index1 ON ConstructionBaseInfo (ConstructionStatusFlg ASC); |
||
1833 | CREATE INDEX BaseInfo_Index2 ON ConstructionBaseInfo (EstimateType ASC); |
||
1834 | CREATE INDEX BaseInfo_Index3 ON ConstructionBaseInfo (SalesPersonCode ASC); |
||
1835 | CREATE INDEX BaseInfo_Index4 ON ConstructionBaseInfo (ConstructionPersonCode ASC); |
||
1836 | CREATE INDEX BaseInfo_Index5 ON ConstructionBaseInfo (ConstructionInstructor ASC); |
||
1837 | CREATE INDEX BaseInfoDetail_Idx1 ON ConstructionBaseInfoDetail (ConstructionCode ASC); |
||
1838 | CREATE INDEX BaseInfoDetail_Idx2 ON ConstructionBaseInfoDetail (DetailNo ASC); |
||
1839 | CREATE INDEX LedgerDetail_Index01 ON ConstructionLedgerDetail (ConstructionCode ASC); |
||
1840 | CREATE INDEX LedgerDetail_Index02 ON ConstructionLedgerDetail (GroupCount ASC); |
||
1841 | CREATE INDEX LedgerDetail_Index03 ON ConstructionLedgerDetail (SourceCode ASC); |
||
1842 | CREATE INDEX LedgerExcute_Index1 ON ConstructionLedgerExcute (ConstructionCode ASC, TargetMonth ASC, GroupCount ASC, LineCount ASC); |
||
1843 | CREATE INDEX ConstructionLink_Index1 ON ConstructionLink (ConstructionCode ASC); |
||
1844 | CREATE INDEX ConstructionLink_Index2 ON ConstructionLink (FluctuationCode ASC); |
||
1845 | CREATE INDEX ConstructionLink_Index3 ON ConstructionLink (LinkType ASC); |
||
1846 | CREATE INDEX ConstructionSpecMaster_Index1 ON ConstructionSpecMaster (DisplayOrder ASC); |
||
1847 | CREATE INDEX CostDataOfPerson_Index1 ON CostDataOfPerson (TargetMonth ASC); |
||
1848 | CREATE INDEX CostDataOfPerson_Index2 ON CostDataOfPerson (ConstructionCode ASC); |
||
1849 | CREATE INDEX CostomerRegist_Index1 ON CostomerRegist (PetitionPeriod ASC); |
||
1850 | CREATE INDEX DailyDataConstruction_Index1 ON DailyDataConstruction (PersonCode ASC); |
||
1851 | CREATE INDEX DailyDataConstruction_Index2 ON DailyDataConstruction (DailyDataDate ASC); |
||
1852 | CREATE INDEX DailyDataConstruction_Index3 ON DailyDataConstruction (ConstructionCode ASC); |
||
1853 | CREATE INDEX DailyDataDetail_Index ON DailyDataDetail (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
||
1854 | CREATE INDEX DailyDataField_Index ON DailyDataField (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
||
1855 | CREATE INDEX DailyDataMaterials_Index ON DailyDataMaterials (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
||
1856 | CREATE INDEX DailyDataSubcontractors_Index ON DailyDataSubcontractors (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
||
1857 | CREATE INDEX DailyDataVehicles_Index ON DailyDataVehicles (PersonCode ASC, DailyDataDate ASC, ConstructionCode ASC); |
||
1858 | CREATE INDEX DepartmentMaster_index1 ON DepartmentMaster (DisplayOrder ASC); |
||
1859 | CREATE INDEX EstimateData_Index1 ON EstimateData (ConstructionCode ASC, FixedItemCode ASC); |
||
1860 | CREATE INDEX EstimateDataBody_Index1 ON EstimateDataBody (ConstructionCode ASC, ComponentCode ASC, ItemCode ASC); |
||
1861 | CREATE INDEX EstimateDataDetail_Index1 ON EstimateDataDetail (ConstructionCode ASC, PageCount ASC); |
||
1862 | CREATE INDEX HolidayCalender_Index1 ON HolidayCalenderMaster (BusinessYear ASC); |
||
1863 | CREATE INDEX HolidayCalenderMaster_Index2 ON HolidayCalenderMaster (TargetMonth ASC); |
||
1864 | CREATE INDEX HolidayCalenderMaster_Index3 ON HolidayCalenderMaster (TargetDay ASC); |
||
1865 | CREATE INDEX InputSearchLogData_Index1 ON InputSearchLogData (ConstructionCode ASC, UsedProcessNo ASC, InputCode ASC); |
||
1866 | CREATE INDEX MessageBoardData_Index1 ON MessageBoardData (WritingDate ASC); |
||
1867 | CREATE INDEX MessageBoardData_Index2 ON MessageBoardData (MessageFlag ASC); |
||
1868 | CREATE INDEX MessageBoardTerget_Index1 ON MessageBoardTerget (RecordNumber ASC, BranchNumber ASC); |
||
1869 | CREATE INDEX PersonDepartmentMaster_Index1 ON PersonDepartmentMaster (PersonCode ASC); |
||
1870 | CREATE INDEX PersonDepartmentMaster_Index2 ON PersonDepartmentMaster (DepartmentCode ASC); |
||
1871 | CREATE INDEX PersonInChargeMaster_Index1 ON PersonInChargeMaster (StartDate ASC); |
||
1872 | CREATE INDEX PersonInChargeMaster_Index2 ON PersonInChargeMaster (DepartmentCode ASC); |
||
1873 | CREATE INDEX PersonSalaryMaster_Index1 ON PersonSalaryMaster (PersonCode ASC); |
||
1874 | CREATE INDEX PersonSalaryMaster_Index2 ON PersonSalaryMaster (StartDate ASC); |
||
1875 | CREATE INDEX ProcessExcuteMaster_Index1 ON ProcessExcuteMaster (SecCode ASC); |
||
1876 | CREATE INDEX ProcessExcuteMaster_Index2 ON ProcessExcuteMaster (ExecCode ASC); |
||
1877 | CREATE INDEX POrderDetail_Index1 ON PurchaseOrderDetail (SourceCode ASC); |
||
1878 | CREATE INDEX SalesGraphData_Idx1 ON SalesGraphData (DisplayOrder ASC); |
||
1879 | CREATE INDEX SalesGraphData_idx2 ON SalesGraphData (ConstructionPeriod ASC); |
||
1880 | CREATE INDEX SecurityMaster_Index1 ON SecurityMaster (DisplayOrder ASC); |
||
1881 | CREATE INDEX SecurityMaster_Index2 ON SecurityMaster (SecRank ASC); |
||
1882 | CREATE INDEX SecurityMaster_Index3 ON SecurityMaster (SecRange ASC); |
||
1883 | CREATE INDEX SubContractorJobItem_Index1 ON SubContractorJobItem (CompanyCode ASC); |
||
1884 | CREATE INDEX SubContractorJobItem_Index2 ON SubContractorJobItem (ItemCode ASC); |
||
1885 | CREATE INDEX SubContractorJobLink_Index1 ON SubContractorJobLink (CompanyCode ASC); |
||
1886 | CREATE INDEX SubContractorJobLink_Index2 ON SubContractorJobLink (JobCategoryCode ASC); |
||
1887 | CREATE INDEX SubContractorMaster_Index1 ON SubContractorMaster (JapaneseSyllabary ASC); |
||
1888 | CREATE INDEX TermMaster_Index1 ON TermMaster (DisplayOrder ASC); |
||
1889 | CREATE INDEX TranceportDailyData_Index1 ON TranceportDailyData (AttendanceDate ASC); |
||
1890 | CREATE INDEX UnitMaster_Index1 ON UnitMaster (DisplayOrder ASC); |
||
1891 | CREATE INDEX VehicleScheduleData_Index1 ON VehicleScheduleData (TargetYear ASC); |
||
1892 | CREATE INDEX VehicleScheduleData_Index2 ON VehicleScheduleData (TargetMonth ASC); |
||
1893 | CREATE INDEX VehicleScheduleData_Index3 ON VehicleScheduleData (TargetDay ASC); |
||
1894 | |||
1895 |