プロジェクト

全般

プロフィール

リビジョン 239

堀内7年以上前に追加

安全パトロールデータ追加

差分を表示:

branches/ddl/20170602_SQL.txt
19 19
CREATE TABLE RequestOrderDate
20 20
(
21 21
	ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '?H???R?[?h',
22
	RequestNo decimal(9,0) NOT NULL COMMENT '????No',
22
	InvoiceNo decimal(9,0) NOT NULL COMMENT '??????No',
23 23
	SendDate date NOT NULL COMMENT '???????????X????',
24
	PaymentDate date NOT NULL COMMENT '??????',
25 24
	EntryDate datetime NOT NULL COMMENT '?o?^???t',
26 25
	UpdateDate datetime NOT NULL COMMENT '?X?V???t'
27 26
) COMMENT = '?????????t?f?[?^';
branches/ddl/20170714_SQL.txt
1
drop table if exists SFPData cascade;
2

  
3
-- ???S?p?g???[???f?[?^
4
create table SFPData (
5
  ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '?H???R?[?h'
6
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
7
  , RequestDate datetime not null comment '?p?g???[???v??????'
8
  , PersonCode decimal(8,0) unsigned not null comment '?\????R?[?h'
9
  , StringValue varchar(300) COMMENT '?R?????g'
10
  , OrderNo decimal(2,0) unsigned not null comment '?\????t???'
11
  , EntryDate datetime NOT NULL COMMENT '?o?^???t'
12
  , UpdateDate datetime NOT NULL COMMENT '?X?V???t'
13
  , constraint SFPData_PKC primary key (ConstructionCode, DataCount)
14
) comment '???S?p?g???[???f?[?^' ;
15

  
16
create index SFPData_Index1
17
  on SFPData(RequestDate);
18

  
19
drop table if exists SFPDataDetail cascade;
20

  
21
-- ???S?p?g???[??????f?[?^
22
create table SFPDataDetail (
23
  ConstructionCode decimal(10,0) unsigned NOT NULL COMMENT '?H???R?[?h'
24
  , DataCount decimal(2,0) unsigned not null comment '?p?g???[????'
25
  , SeqNo decimal(2,0) unsigned not null comment '?f?[?^?}??'
26
  , CompanyCode decimal(8,0) unsigned not null comment '??????R?[?h'
27
  , EntryDate datetime NOT NULL COMMENT '?o?^???t'
28
  , UpdateDate datetime NOT NULL COMMENT '?X?V???t'
29
  , constraint SFPDataDetail_PKC primary key (ConstructionCode, DataCount, SeqNo)
30
) comment '???S?p?g???[??????f?[?^' ;
31

  
branches/ddl/ProcessManagement.sql
1 1
-- Project Name : noname
2
-- Date/Time    : 2017/06/14 16:16:18
2
-- Date/Time    : 2017/07/20 9:53:08
3 3
-- Author       : Horiuchi
4 4
-- RDBMS Type   : MySQL
5 5
-- Application  : A5:SQL Mk-2
6 6

  
7 7
-- 担当者行動予定データ
8
drop index ActionScheduleData_Index1 on actionscheduledata;
9
drop index ActionScheduleData_Index2 on actionscheduledata;
10
drop index ActionScheduleData_Index3 on actionscheduledata;
11

  
12 8
drop table if exists actionscheduledata cascade;
13 9

  
14 10
create table actionscheduledata (
......
48 44
) comment '承認経路マスタ' ;
49 45

  
50 46
-- 出勤日報データ
51
drop index AttendDaily_Index1 on attendancedailydata;
52
drop index AttendDaily_Index2 on attendancedailydata;
53

  
54 47
drop table if exists attendancedailydata cascade;
55 48

  
56 49
create table attendancedailydata (
......
297 290
) comment '積算見積データ明細【退避用】' ;
298 291

  
299 292
-- 法人格マスタ
300
drop index BusinessTypeMaster_Index1 on businesstypemaster;
301

  
302 293
drop table if exists businesstypemaster cascade;
303 294

  
304 295
create table businesstypemaster (
......
368 359
) comment '共通費中項目キーマスタ' ;
369 360

  
370 361
-- 構成工種関連マスタ
371
drop index ComponentLinkMaster_Index1 on componentlinkmaster;
372
drop index ComponentLinkMaster_Index2 on componentlinkmaster;
373

  
374 362
drop table if exists componentlinkmaster cascade;
375 363

  
376 364
create table componentlinkmaster (
......
389 377
  on componentlinkmaster(ItemCode);
390 378

  
391 379
-- 構成マスタ
392
drop index ComponentMaster_Index1 on componentmaster;
393

  
394 380
drop table if exists componentmaster cascade;
395 381

  
396 382
create table componentmaster (
......
410 396
  on componentmaster(DisplayOrder);
411 397

  
412 398
-- 構成工事種別関連マスタ
413
drop index ComponentToTypeMaster_Index1 on componenttotypemaster;
414
drop index ComponentToTypeMaster_Index2 on componenttotypemaster;
415

  
416 399
drop table if exists componenttotypemaster cascade;
417 400

  
418 401
create table componenttotypemaster (
......
431 414
  on componenttotypemaster(TypeCode);
432 415

  
433 416
-- 工事基本情報
434
drop index BaseInfo_Index1 on constructionbaseinfo;
435
drop index BaseInfo_Index2 on constructionbaseinfo;
436
drop index BaseInfo_Index3 on constructionbaseinfo;
437
drop index BaseInfo_Index4 on constructionbaseinfo;
438
drop index BaseInfo_Index5 on constructionbaseinfo;
439
drop index BaseInfo_Index6 on constructionbaseinfo;
440

  
441 417
drop table if exists constructionbaseinfo cascade;
442 418

  
443 419
create table constructionbaseinfo (
......
512 488
  on constructionbaseinfo(ConstructionPeriod);
513 489

  
514 490
-- 工事基本情報明細
515
drop index BaseInfoDetail_Idx1 on constructionbaseinfodetail;
516
drop index BaseInfoDetail_Idx2 on constructionbaseinfodetail;
517

  
518 491
drop table if exists constructionbaseinfodetail cascade;
519 492

  
520 493
create table constructionbaseinfodetail (
......
630 603
) comment '工事詳細台帳データ' ;
631 604

  
632 605
-- 工事詳細台帳明細データ
633
drop index LedgerDetail_Index01 on constructionledgerdetail;
634
drop index LedgerDetail_Index02 on constructionledgerdetail;
635
drop index LedgerDetail_Index03 on constructionledgerdetail;
636

  
637 606
drop table if exists constructionledgerdetail cascade;
638 607

  
639 608
create table constructionledgerdetail (
......
676 645
  on constructionledgerdetail(SourceCode);
677 646

  
678 647
-- 工事詳細台帳実行データ
679
drop index LedgerExcute_Index1 on constructionledgerexcute;
680

  
681 648
drop table if exists constructionledgerexcute cascade;
682 649

  
683 650
create table constructionledgerexcute (
......
696 663
  on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount);
697 664

  
698 665
-- 工事リンク情報
699
drop index ConstructionLink_Index1 on constructionlink;
700
drop index ConstructionLink_Index2 on constructionlink;
701
drop index ConstructionLink_Index3 on constructionlink;
702

  
703 666
drop table if exists constructionlink cascade;
704 667

  
705 668
create table constructionlink (
......
749 712
) comment '案件進捗日付データ' ;
750 713

  
751 714
-- 作業マスタ
752
drop index ConstructionSpecMaster_Index1 on constructionspecmaster;
753

  
754 715
drop table if exists constructionspecmaster cascade;
755 716

  
756 717
create table constructionspecmaster (
......
801 762
) comment '工事種別マスタ' ;
802 763

  
803 764
-- 担当者毎経費データ
804
drop index CostDataOfPerson_Index1 on costdataofperson;
805
drop index CostDataOfPerson_Index2 on costdataofperson;
806

  
807 765
drop table if exists costdataofperson cascade;
808 766

  
809 767
create table costdataofperson (
......
834 792
  on costdataofperson(ConstructionCode);
835 793

  
836 794
-- 発注者登録申請データ
837
drop index CostomerRegist_Index1 on costomerregist;
838

  
839 795
drop table if exists costomerregist cascade;
840 796

  
841 797
create table costomerregist (
......
873 829
  on costomerregist(PetitionPeriod);
874 830

  
875 831
-- 日報データ
876
drop index DailyDataConstruction_Index1 on dailydataconstruction;
877
drop index DailyDataConstruction_Index2 on dailydataconstruction;
878
drop index DailyDataConstruction_Index3 on dailydataconstruction;
879

  
880 832
drop table if exists dailydataconstruction cascade;
881 833

  
882 834
create table dailydataconstruction (
......
899 851
  on dailydataconstruction(ConstructionCode);
900 852

  
901 853
-- 日報データ (明細)
902
drop index DailyDataDetail_Index on dailydatadetail;
903

  
904 854
drop table if exists dailydatadetail cascade;
905 855

  
906 856
create table dailydatadetail (
......
924 874
  on dailydatadetail(PersonCode,DailyDataDate,ConstructionCode);
925 875

  
926 876
-- 日報データ (現場巡回)
927
drop index DailyDataField_Index on dailydatafield;
928

  
929 877
drop table if exists dailydatafield cascade;
930 878

  
931 879
create table dailydatafield (
......
944 892
  on dailydatafield(PersonCode,DailyDataDate,ConstructionCode);
945 893

  
946 894
-- 日報データ (資材)
947
drop index DailyDataMaterials_Index on dailydatamaterials;
948

  
949 895
drop table if exists dailydatamaterials cascade;
950 896

  
951 897
create table dailydatamaterials (
......
967 913
  on dailydatamaterials(PersonCode,DailyDataDate,ConstructionCode);
968 914

  
969 915
-- 日報データ (協力業者指示)
970
drop index DailyDataSubcontractors_Index on dailydatasubcontractors;
971

  
972 916
drop table if exists dailydatasubcontractors cascade;
973 917

  
974 918
create table dailydatasubcontractors (
......
987 931
  on dailydatasubcontractors(PersonCode,DailyDataDate,ConstructionCode);
988 932

  
989 933
-- 日報データ (車両)
990
drop index DailyDataVehicles_Index on dailydatavehicles;
991

  
992 934
drop table if exists dailydatavehicles cascade;
993 935

  
994 936
create table dailydatavehicles (
......
1011 953
  on dailydatavehicles(PersonCode,DailyDataDate,ConstructionCode);
1012 954

  
1013 955
-- 日マスタ
1014
drop index day_Index1 on daymaster;
1015

  
1016 956
drop table if exists daymaster cascade;
1017 957

  
1018 958
create table daymaster (
......
1052 992
) comment '部署経費率マスタ' ;
1053 993

  
1054 994
-- 部署マスタ
1055
drop index DepartmentMaster_index1 on departmentmaster;
1056

  
1057 995
drop table if exists departmentmaster cascade;
1058 996

  
1059 997
create table departmentmaster (
......
1098 1036
  , ORDERERSCODE decimal(5,0) not null comment '発注者コード'
1099 1037
  , TARGETDATE decimal(6,0) not null comment '対象年月'
1100 1038
  , SEQNO decimal(3,0) not null comment '連番'
1101
  , BusinessPeriod decimal(4,0) comment '営業期'
1039
  , BUSINESSPERIOD decimal(4,0) comment '営業期'
1102 1040
  , DEPOSITDATE date comment '入金日'
1103
  , DepositAmount decimal(12,0) comment '入金金額'
1041
  , DEPOSITAMOUNT decimal(12,0) comment '入金金額'
1104 1042
  , DEPOSITAMOUNTCASH decimal(10,0) comment '入金金額(現金)'
1105 1043
  , DEPOSITAMOUNTBILL decimal(10,0) comment '入金金額(手形)'
1106
  , DEPOSITPERSONCODE decimal(8,0) NOT NULL COMMENT '入金担当者コード'
1044
  , DEPOSITPERSONCODE decimal(8,0) not null comment '入金担当者コード'
1107 1045
  , NOTE varchar(120) comment '備考'
1108 1046
  , ENTRYDATE datetime comment '登録日付'
1109 1047
  , UPDATEDATE datetime comment '更新日付'
......
1188 1126
) comment '積算予算内訳データ明細' ;
1189 1127

  
1190 1128
-- 積算見積データ
1191
drop index EstimateData_Index1 on estimatedata;
1192

  
1193 1129
drop table if exists estimatedata cascade;
1194 1130

  
1195 1131
create table estimatedata (
......
1212 1148
  on estimatedata(ConstructionCode,FixedItemCode);
1213 1149

  
1214 1150
-- 積算見積ページデータ
1215
drop index EstimateDataBody_Index1 on estimatedatabody;
1216

  
1217 1151
drop table if exists estimatedatabody cascade;
1218 1152

  
1219 1153
create table estimatedatabody (
......
1235 1169
  on estimatedatabody(ConstructionCode,ComponentCode,ItemCode);
1236 1170

  
1237 1171
-- 積算見積データ明細
1238
drop index EstimateDataDetail_Index1 on estimatedatadetail;
1239

  
1240 1172
drop table if exists estimatedatadetail cascade;
1241 1173

  
1242 1174
create table estimatedatadetail (
......
1280 1212
) comment '経費率マスタ' ;
1281 1213

  
1282 1214
-- 会社休日マスタ
1283
drop index HolidayCalender_Index1 on holidaycalendermaster;
1284
drop index HolidayCalenderMaster_Index2 on holidaycalendermaster;
1285
drop index HolidayCalenderMaster_Index3 on holidaycalendermaster;
1286

  
1287 1215
drop table if exists holidaycalendermaster cascade;
1288 1216

  
1289 1217
create table holidaycalendermaster (
......
1304 1232
  on holidaycalendermaster(TargetDay);
1305 1233

  
1306 1234
-- 入力時検索履歴
1307
drop index InputSearchLogData_Index1 on inputsearchlogdata;
1308

  
1309 1235
drop table if exists inputsearchlogdata cascade;
1310 1236

  
1311 1237
create table inputsearchlogdata (
......
1407 1333
) comment '資材履歴情報' ;
1408 1334

  
1409 1335
-- 掲示板メッセージ
1410
drop index MessageBoardData_Index1 on messageboarddata;
1411
drop index MessageBoardData_Index2 on messageboarddata;
1412

  
1413 1336
drop table if exists messageboarddata cascade;
1414 1337

  
1415 1338
create table messageboarddata (
......
1440 1363
  on messageboarddata(MessageFlag);
1441 1364

  
1442 1365
-- 掲示板対象者テーブル
1443
drop index MessageBoardTerget_Index1 on messageboardterget;
1444

  
1445 1366
drop table if exists messageboardterget cascade;
1446 1367

  
1447 1368
create table messageboardterget (
......
1473 1394
) comment '掲示板メッセージ閲覧履歴' ;
1474 1395

  
1475 1396
-- 月マスタ
1476
drop index month_Index1 on monthmaster;
1477

  
1478 1397
drop table if exists monthmaster cascade;
1479 1398

  
1480 1399
create table monthmaster (
......
1610 1529
) comment '担当者承認コメントデータ' ;
1611 1530

  
1612 1531
-- 担当者対象部署マスタ
1613
drop index PersonDepartmentMaster_Index1 on persondepartmentmaster;
1614
drop index PersonDepartmentMaster_Index2 on persondepartmentmaster;
1615

  
1616 1532
drop table if exists persondepartmentmaster cascade;
1617 1533

  
1618 1534
create table persondepartmentmaster (
......
1631 1547
  on persondepartmentmaster(DepartmentCode);
1632 1548

  
1633 1549
-- 担当者マスタ
1634
drop index PersonInChargeMaster_Index1 on personinchargemaster;
1635
drop index PersonInChargeMaster_Index2 on personinchargemaster;
1636

  
1637 1550
drop table if exists personinchargemaster cascade;
1638 1551

  
1639 1552
create table personinchargemaster (
......
1669 1582
  on personinchargemaster(DepartmentCode);
1670 1583

  
1671 1584
-- 担当者給与マスタ
1672
drop index PersonSalaryMaster_Index1 on personsalarymaster;
1673
drop index PersonSalaryMaster_Index2 on personsalarymaster;
1674

  
1675 1585
drop table if exists personsalarymaster cascade;
1676 1586

  
1677 1587
create table personsalarymaster (
......
1822 1732
) comment '承認明細データ' ;
1823 1733

  
1824 1734
-- 起動対象マスタ
1825
drop index ProcessExcuteMaster_Index1 on processexcutemaster;
1826
drop index ProcessExcuteMaster_Index2 on processexcutemaster;
1827

  
1828 1735
drop table if exists processexcutemaster cascade;
1829 1736

  
1830 1737
create table processexcutemaster (
......
1894 1801
) comment '注文書日付データ' ;
1895 1802

  
1896 1803
-- 注文書明細データ
1897
drop index POrderDetail_Index1 on purchaseorderdetail;
1898

  
1899 1804
drop table if exists purchaseorderdetail cascade;
1900 1805

  
1901 1806
create table purchaseorderdetail (
......
1995 1900
  , InvoiceNo decimal(9,0) not null comment '請求書No'
1996 1901
  , SendDate date not null comment '請求書発給郵送日'
1997 1902
  , EntryDate datetime not null comment '登録日付'
1998
  , UpdateDate datetime not null comment '更新日付',
1999
	PRIMARY KEY (ConstructionCode, InvoiceNo)
1903
  , UpdateDate datetime not null comment '更新日付'
1904
  , constraint requestorderdate_PKC primary key (ConstructionCode,InvoiceNo)
2000 1905
) comment '請求書日付データ' ;
2001 1906

  
2002 1907
-- 売上グラフデータ
2003
drop index SalesGraphData_Idx1 on salesgraphdata;
2004
drop index SalesGraphData_idx2 on salesgraphdata;
2005

  
2006 1908
drop table if exists salesgraphdata cascade;
2007 1909

  
2008 1910
create table salesgraphdata (
......
2027 1929
  on salesgraphdata(ConstructionPeriod);
2028 1930

  
2029 1931
-- 保護区分マスタ
2030
drop index SecurityMaster_Index1 on securitymaster;
2031
drop index SecurityMaster_Index2 on securitymaster;
2032
drop index SecurityMaster_Index3 on securitymaster;
2033

  
2034 1932
drop table if exists securitymaster cascade;
2035 1933

  
2036 1934
create table securitymaster (
......
2055 1953
create index SecurityMaster_Index3
2056 1954
  on securitymaster(SecRange);
2057 1955

  
1956
-- 安全パトロールデータ
1957
drop table if exists sfpdata cascade;
1958

  
1959
create table sfpdata (
1960
  ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
1961
  , DataCount decimal(2,0) unsigned not null comment 'パトロール回数'
1962
  , RequestDate datetime not null comment 'パトロール要請日時'
1963
  , PersonCode decimal(8,0) unsigned not null comment '申請者コード'
1964
  , StringValue varchar(300) comment 'コメント'
1965
  , OrderNo decimal(2,0) unsigned not null comment '申請受付番号'
1966
  , EntryDate datetime not null comment '登録日付'
1967
  , UpdateDate datetime not null comment '更新日付'
1968
  , constraint sfpdata_PKC primary key (ConstructionCode,DataCount)
1969
) comment '安全パトロールデータ' ;
1970

  
1971
create index SFPData_Index1
1972
  on sfpdata(RequestDate);
1973

  
1974
-- 安全パトロール明細データ
1975
drop table if exists sfpdatadetail cascade;
1976

  
1977
create table sfpdatadetail (
1978
  ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
1979
  , DataCount decimal(2,0) unsigned not null comment 'パトロール回数'
1980
  , SeqNo decimal(2,0) unsigned not null comment 'データ枝番'
1981
  , CompanyCode decimal(8,0) unsigned not null comment '協力会社コード'
1982
  , EntryDate datetime not null comment '登録日付'
1983
  , UpdateDate datetime not null comment '更新日付'
1984
  , constraint sfpdatadetail_PKC primary key (ConstructionCode,DataCount,SeqNo)
1985
) comment '安全パトロール明細データ' ;
1986

  
2058 1987
-- 協力業者施工工種登録申請データ
2059 1988
drop table if exists subconstrjobitemregist cascade;
2060 1989

  
......
2145 2074
) comment '協力会社職種マスタ' ;
2146 2075

  
2147 2076
-- 協力会社施工工種データ
2148
drop index SubContractorJobItem_Index1 on subcontractorjobitem;
2149
drop index SubContractorJobItem_Index2 on subcontractorjobitem;
2150

  
2151 2077
drop table if exists subcontractorjobitem cascade;
2152 2078

  
2153 2079
create table subcontractorjobitem (
......
2166 2092
  on subcontractorjobitem(ItemCode);
2167 2093

  
2168 2094
-- 協力会社職種リンクマスタ
2169
drop index SubContractorJobLink_Index1 on subcontractorjoblink;
2170
drop index SubContractorJobLink_Index2 on subcontractorjoblink;
2171

  
2172 2095
drop table if exists subcontractorjoblink cascade;
2173 2096

  
2174 2097
create table subcontractorjoblink (
......
2187 2110
  on subcontractorjoblink(JobCategoryCode);
2188 2111

  
2189 2112
-- 協力会社マスタ
2190
drop index SubContractorMaster_Index1 on subcontractormaster;
2191

  
2192 2113
drop table if exists subcontractormaster cascade;
2193 2114

  
2194 2115
create table subcontractormaster (
......
2277 2198
  , ConsumptionTax decimal(4,2) not null comment '消費税'
2278 2199
  , CooperationRate decimal(4,2) not null comment '協力金比率'
2279 2200
  , StatutoryWelfareRate decimal(4,2) not null comment '法定福利費比率'
2280
  , FuelPrice decimal(5,2) NOT NULL COMMENT '燃料キロ単価'
2281
  , AreaDistance decimal(5,2) NOT NULL COMMENT '資材置場移動距離'
2201
  , FuelPrice decimal(5,2) not null comment '燃料キロ単価'
2202
  , AreaDistance decimal(5,2) not null comment '資材置場移動距離'
2282 2203
  , ExcelSavePath varchar(120) comment 'Excel保存パス'
2283 2204
  , BusinessPeriod smallint(6) not null comment '現在営業期数'
2284 2205
  , ConstructionYear smallint(6) not null comment '現在工事年度'
......
2294 2215
) comment '管理マスタ' ;
2295 2216

  
2296 2217
-- 期限マスタ
2297
drop index TermMaster_Index1 on termmaster;
2298

  
2299 2218
drop table if exists termmaster cascade;
2300 2219

  
2301 2220
create table termmaster (
......
2318 2237
  on termmaster(DisplayOrder);
2319 2238

  
2320 2239
-- 出勤交通費データ
2321
drop index TranceportDailyData_Index1 on tranceportdailydata;
2322

  
2323 2240
drop table if exists tranceportdailydata cascade;
2324 2241

  
2325 2242
create table tranceportdailydata (
......
2356 2273
) comment '工事種別経費率マスタ' ;
2357 2274

  
2358 2275
-- 単位マスタ
2359
drop index UnitMaster_Index1 on unitmaster;
2360

  
2361 2276
drop table if exists unitmaster cascade;
2362 2277

  
2363 2278
create table unitmaster (
......
2418 2333
) comment '車両記録データ' ;
2419 2334

  
2420 2335
-- 車両予約データ
2421
drop index VehicleScheduleData_Index1 on vehiclescheduledata;
2422
drop index VehicleScheduleData_Index2 on vehiclescheduledata;
2423
drop index VehicleScheduleData_Index3 on vehiclescheduledata;
2424

  
2425 2336
drop table if exists vehiclescheduledata cascade;
2426 2337

  
2427 2338
create table vehiclescheduledata (
......
2447 2358
  on vehiclescheduledata(TargetDay);
2448 2359

  
2449 2360
-- 年マスタ
2450
drop index year_Index1 on yearmaster;
2451

  
2452 2361
drop table if exists yearmaster cascade;
2453 2362

  
2454 2363
create table yearmaster (

他の形式にエクスポート: Unified diff