リビジョン 271
業者請求明細データ行・列カラム追加
支払明細データ、協力金有無の初期値-1に変更
工事施工予算データ、受注金額カラム追加
| branches/ddl/20170908_SQL.txt | ||
|---|---|---|
| 1 |
-- ??????????f?[?^ |
|
| 2 |
DROP TABLE IF EXISTS billingdatadetail_OLD; |
|
| 3 |
CREATE TABLE billingdatadetail_OLD As Select * from billingdatadetail; |
|
| 4 |
|
|
| 5 |
drop table if exists billingdatadetail cascade; |
|
| 6 |
|
|
| 7 |
create table billingdatadetail ( |
|
| 8 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
|
| 9 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
|
| 10 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
|
| 11 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???' |
|
| 12 |
, CONSTRUCTIONCODE decimal(10,0) comment '?H?????' |
|
| 13 |
, CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '?s???' |
|
| 14 |
, CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '????' |
|
| 15 |
, FIELDNAME varchar(120) comment '????' |
|
| 16 |
, BILLPRICE decimal(10,0) comment '???????z' |
|
| 17 |
, HIGHWPRICE decimal(10,0) comment '??????' |
|
| 18 |
, HARDWPRICE decimal(10,0) comment '??????' |
|
| 19 |
, INDSWASTETAX decimal(10,0) comment '?Y?p??' |
|
| 20 |
, NOTE varchar(120) comment '???l' |
|
| 21 |
, ENTRYDATE datetime comment '?o?^?N????' |
|
| 22 |
, UPDATEDATE datetime comment '?X?V?N????' |
|
| 23 |
, constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT) |
|
| 24 |
) comment '??????????f?[?^' ; |
|
| 25 |
|
|
| 26 |
|
|
| 27 |
Insert INTO billingdatadetail |
|
| 28 |
SELECT |
|
| 29 |
COMPANYCODE |
|
| 30 |
, TARGETDATE |
|
| 31 |
, SEQNO |
|
| 32 |
, LINECOUNT |
|
| 33 |
, CONSTRUCTIONCODE |
|
| 34 |
, 0 |
|
| 35 |
, 0 |
|
| 36 |
, FIELDNAME |
|
| 37 |
, BILLPRICE |
|
| 38 |
, HIGHWPRICE |
|
| 39 |
, HARDWPRICE |
|
| 40 |
, INDSWASTETAX |
|
| 41 |
, NOTE |
|
| 42 |
, ENTRYDATE |
|
| 43 |
, UPDATEDATE |
|
| 44 |
FROM billingdatadetail_OLD |
|
| 45 |
; |
|
| 46 |
commit; |
|
| 47 |
|
|
| 48 |
|
|
| 49 |
-- ?x??????f?[?^?X?V |
|
| 50 |
update paymentdatadetail AS A set A.CNSTRPRICEEXIST = -1 where A.CNSTRPRICEEXIST is null; |
|
| 51 |
commit; |
|
| 52 |
|
|
| 53 |
|
|
| 54 |
-- ?o?????f?[?^ |
|
| 55 |
drop table if exists attendancedailydata cascade; |
|
| 56 |
|
|
| 57 |
create table attendancedailydata ( |
|
| 58 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
|
| 59 |
, AttendanceDate date not null comment '???????' |
|
| 60 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
|
| 61 |
, ActionResult varchar(30) not null comment '?s??????' |
|
| 62 |
, StartTime datetime comment '?J?n????' |
|
| 63 |
, CompTime datetime comment '?I??????' |
|
| 64 |
, DayTimes decimal(4,1) not null comment '????????v????' |
|
| 65 |
, WorkingComment varchar(120) comment '?R?????g' |
|
| 66 |
, NightFlg decimal(1,0) not null comment '?????t???O' |
|
| 67 |
, EntryDate datetime not null comment '?o?^???t' |
|
| 68 |
, UpdateDate datetime not null comment '?X?V???t' |
|
| 69 |
, constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo) |
|
| 70 |
) comment '?o?????f?[?^' ; |
|
| 71 |
|
|
| 72 |
create index AttendDaily_Index1 |
|
| 73 |
on attendancedailydata(ActionResult); |
|
| 74 |
|
|
| 75 |
create index AttendDaily_Index2 |
|
| 76 |
on attendancedailydata(AttendanceDate); |
|
| 77 |
|
|
| 78 |
|
|
| 79 |
-- ?H???{?H?\?Z?f?[?^
|
|
| 80 |
DROP TABLE IF EXISTS constructionbudget_OLD; |
|
| 81 |
CREATE TABLE constructionbudget_OLD As Select * from constructionbudget; |
|
| 82 |
|
|
| 83 |
drop table if exists constructionbudget cascade; |
|
| 84 |
|
|
| 85 |
create table constructionbudget ( |
|
| 86 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
| 87 |
, CreatorCode decimal(8,0) not null comment '????R?[?h' |
|
| 88 |
, CreatorName varchar(60) comment '?????' |
|
| 89 |
, CreatorCosts decimal(11,0) not null comment '??????^' |
|
| 90 |
, AssistantCode decimal(8,0) not null comment '???S????R?[?h' |
|
| 91 |
, AssistantName varchar(60) comment '???S?????' |
|
| 92 |
, AssistantCosts decimal(11,0) not null comment '???S??????^' |
|
| 93 |
, InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h' |
|
| 94 |
, InstructorName varchar(60) comment '?H???w??????' |
|
| 95 |
, InstructorCosts decimal(11,0) not null comment '?H???w???????^' |
|
| 96 |
, CreateDate date not null comment '????' |
|
| 97 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j' |
|
| 98 |
, ConstructionStart date not null comment '?_??H???J?n' |
|
| 99 |
, ConstructionEnd date not null comment '?_??H??????' |
|
| 100 |
, InstructorTimes decimal(5,2) not null comment '?w???????????' |
|
| 101 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
|
| 102 |
, SalaryDays decimal(4,0) not null comment '?U??????' |
|
| 103 |
, A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????' |
|
| 104 |
, A_SalaryDays decimal(4,0) not null comment '???S????U??????' |
|
| 105 |
, I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????' |
|
| 106 |
, I_SalaryDays decimal(4,0) not null comment '?w?????U??????' |
|
| 107 |
, OrdersDecisionPrice decimal(12,0) not null comment '??????????z' |
|
| 108 |
, EntryDate datetime not null comment '?o?^???t' |
|
| 109 |
, UpdateDate datetime not null comment '?X?V???t' |
|
| 110 |
, constraint constructionbudget_PKC primary key (ConstructionCode) |
|
| 111 |
) comment '?H???{?H?\?Z?f?[?^' ;
|
|
| 112 |
|
|
| 113 |
Insert INTO constructionbudget |
|
| 114 |
SELECT |
|
| 115 |
ConstructionCode |
|
| 116 |
, CreatorCode |
|
| 117 |
, CreatorName |
|
| 118 |
, CreatorCosts |
|
| 119 |
, AssistantCode |
|
| 120 |
, AssistantName |
|
| 121 |
, AssistantCosts |
|
| 122 |
, InstructorCode |
|
| 123 |
, InstructorName |
|
| 124 |
, InstructorCosts |
|
| 125 |
, CreateDate |
|
| 126 |
, ConstructionTimes |
|
| 127 |
, ConstructionStart |
|
| 128 |
, ConstructionEnd |
|
| 129 |
, InstructorTimes |
|
| 130 |
, SalaryFlg |
|
| 131 |
, SalaryDays |
|
| 132 |
, A_SalaryFlg |
|
| 133 |
, A_SalaryDays |
|
| 134 |
, I_SalaryFlg |
|
| 135 |
, I_SalaryDays |
|
| 136 |
, 0 |
|
| 137 |
, EntryDate |
|
| 138 |
, UpdateDate |
|
| 139 |
FROM constructionbudget_OLD |
|
| 140 |
; |
|
| 141 |
commit; |
|
| branches/ddl/ProcessManagement.sql | ||
|---|---|---|
| 1 | 1 |
-- Project Name : noname |
| 2 |
-- Date/Time : 2017/07/20 9:53:08
|
|
| 2 |
-- Date/Time : 2017/09/16 11:05:22
|
|
| 3 | 3 |
-- Author : Horiuchi |
| 4 | 4 |
-- RDBMS Type : MySQL |
| 5 | 5 |
-- Application : A5:SQL Mk-2 |
| 6 | 6 |
|
| 7 |
-- 担当者行動予定データ
|
|
| 7 |
-- ?S????s???\??f?[?^
|
|
| 8 | 8 |
drop table if exists actionscheduledata cascade; |
| 9 | 9 |
|
| 10 | 10 |
create table actionscheduledata ( |
| 11 |
TargetDate date not null comment '対象日'
|
|
| 12 |
, PersonCode decimal(8,0) not null comment '担当者コード'
|
|
| 13 |
, ActionSchedule varchar(30) comment '行動予定'
|
|
| 14 |
, TargetYear year(4) not null comment '該当年'
|
|
| 15 |
, TargetMonth year(4) not null comment '該当月'
|
|
| 16 |
, TargetDay year(4) not null comment '該当日'
|
|
| 17 |
, EntryDate datetime not null comment '登録日付'
|
|
| 18 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 11 |
TargetDate date not null comment '????'
|
|
| 12 |
, PersonCode decimal(8,0) not null comment '?S????R?[?h'
|
|
| 13 |
, ActionSchedule varchar(30) comment '?s???\??'
|
|
| 14 |
, TargetYear year(4) not null comment '?Y???N'
|
|
| 15 |
, TargetMonth year(4) not null comment '?Y????'
|
|
| 16 |
, TargetDay year(4) not null comment '?Y????'
|
|
| 17 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 18 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 19 | 19 |
, constraint actionscheduledata_PKC primary key (TargetDate,PersonCode) |
| 20 |
) comment '担当者行動予定データ' ;
|
|
| 20 |
) comment '?S????s???\??f?[?^' ;
|
|
| 21 | 21 |
|
| 22 | 22 |
create index ActionScheduleData_Index1 |
| 23 | 23 |
on actionscheduledata(TargetYear); |
| ... | ... | |
| 28 | 28 |
create index ActionScheduleData_Index3 |
| 29 | 29 |
on actionscheduledata(TargetDay); |
| 30 | 30 |
|
| 31 |
-- 承認経路マスタ
|
|
| 31 |
-- ???F?o?H?}?X?^
|
|
| 32 | 32 |
drop table if exists approvalmaster cascade; |
| 33 | 33 |
|
| 34 | 34 |
create table approvalmaster ( |
| 35 |
ApprovalCode decimal(3,0) unsigned not null comment '承認機能番号'
|
|
| 36 |
, DepartmentCode decimal(5,0) unsigned not null comment '部署コード'
|
|
| 37 |
, SeqNo decimal(2,0) not null comment '枝番'
|
|
| 38 |
, DisplayOrder decimal(2,0) not null comment '表示順'
|
|
| 39 |
, ApprovalPerson decimal(8,0) unsigned not null comment '承認者コード'
|
|
| 40 |
, ApprovalAuthority decimal(1,0) not null comment '承認権限区分'
|
|
| 41 |
, EntryDate datetime not null comment '登録日付'
|
|
| 42 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 35 |
ApprovalCode decimal(3,0) unsigned not null comment '???F?@?\???'
|
|
| 36 |
, DepartmentCode decimal(5,0) unsigned not null comment '?????R?[?h'
|
|
| 37 |
, SeqNo decimal(2,0) not null comment '?}??'
|
|
| 38 |
, DisplayOrder decimal(2,0) not null comment '?\????'
|
|
| 39 |
, ApprovalPerson decimal(8,0) unsigned not null comment '???F??R?[?h'
|
|
| 40 |
, ApprovalAuthority decimal(1,0) not null comment '???F??????'
|
|
| 41 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 42 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 43 | 43 |
, constraint approvalmaster_PKC primary key (ApprovalCode,DepartmentCode,SeqNo) |
| 44 |
) comment '承認経路マスタ' ;
|
|
| 44 |
) comment '???F?o?H?}?X?^' ;
|
|
| 45 | 45 |
|
| 46 |
-- 出勤日報データ
|
|
| 46 |
-- ?o?????f?[?^
|
|
| 47 | 47 |
drop table if exists attendancedailydata cascade; |
| 48 | 48 |
|
| 49 | 49 |
create table attendancedailydata ( |
| 50 |
PersonCode decimal(8,0) unsigned not null comment '作成者コード' |
|
| 51 |
, AttendanceDate date not null comment '日報作成日' |
|
| 52 |
, SeqNo decimal(3,0) unsigned not null comment '明細行番号' |
|
| 53 |
, ActionResult varchar(30) not null comment '行動実績' |
|
| 54 |
, OvertimeHours decimal(4,1) not null comment '残業時間' |
|
| 55 |
, WorkingComment varchar(120) comment 'コメント' |
|
| 56 |
, EntryDate datetime not null comment '登録日付' |
|
| 57 |
, UpdateDate datetime not null comment '更新日付' |
|
| 50 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h' |
|
| 51 |
, AttendanceDate date not null comment '???????' |
|
| 52 |
, SeqNo decimal(3,0) unsigned not null comment '????s???' |
|
| 53 |
, ActionResult varchar(30) not null comment '?s??????' |
|
| 54 |
, StartTime datetime comment '?J?n????' |
|
| 55 |
, CompTime datetime comment '?I??????' |
|
| 56 |
, DayTimes decimal(4,1) not null comment '????????v????' |
|
| 57 |
, WorkingComment varchar(120) comment '?R?????g' |
|
| 58 |
, NightFlg decimal(1,0) not null comment '?????t???O' |
|
| 59 |
, EntryDate datetime not null comment '?o?^???t' |
|
| 60 |
, UpdateDate datetime not null comment '?X?V???t' |
|
| 58 | 61 |
, constraint attendancedailydata_PKC primary key (PersonCode,AttendanceDate,SeqNo) |
| 59 |
) comment '出勤日報データ' ;
|
|
| 62 |
) comment '?o?????f?[?^' ;
|
|
| 60 | 63 |
|
| 61 | 64 |
create index AttendDaily_Index1 |
| 62 | 65 |
on attendancedailydata(ActionResult); |
| ... | ... | |
| 64 | 67 |
create index AttendDaily_Index2 |
| 65 | 68 |
on attendancedailydata(AttendanceDate); |
| 66 | 69 |
|
| 67 |
-- 出勤管理データ
|
|
| 70 |
-- ?o?????f?[?^
|
|
| 68 | 71 |
drop table if exists attendancedata cascade; |
| 69 | 72 |
|
| 70 | 73 |
create table attendancedata ( |
| 71 |
PersonCode decimal(8,0) unsigned not null comment '作成者コード'
|
|
| 72 |
, AttendanceMonth date not null comment '出勤管理年月'
|
|
| 73 |
, LastDays decimal(2,0) unsigned not null comment '当月最終日'
|
|
| 74 |
, AttendDayCount decimal(2,0) unsigned not null comment '出勤日数'
|
|
| 75 |
, TotalOverTimes decimal(4,1) not null comment '残業時間数'
|
|
| 76 |
, OrderDate date not null comment '申請日'
|
|
| 77 |
, OrderNo decimal(2,0) unsigned not null comment '申請受付番号'
|
|
| 78 |
, EntryDate datetime not null comment '登録日付'
|
|
| 79 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 74 |
PersonCode decimal(8,0) unsigned not null comment '????R?[?h'
|
|
| 75 |
, AttendanceMonth date not null comment '?o?????N??'
|
|
| 76 |
, LastDays decimal(2,0) unsigned not null comment '??????I??'
|
|
| 77 |
, AttendDayCount decimal(2,0) unsigned not null comment '?o?????'
|
|
| 78 |
, TotalOverTimes decimal(4,1) not null comment '?c??????'
|
|
| 79 |
, OrderDate date not null comment '?\????'
|
|
| 80 |
, OrderNo decimal(2,0) unsigned not null comment '?\????t???'
|
|
| 81 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 82 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 80 | 83 |
, constraint attendancedata_PKC primary key (PersonCode,AttendanceMonth) |
| 81 |
) comment '出勤管理データ' ;
|
|
| 84 |
) comment '?o?????f?[?^' ;
|
|
| 82 | 85 |
|
| 83 |
-- 銀行営業日マスタ
|
|
| 86 |
-- ??s?c????}?X?^
|
|
| 84 | 87 |
drop table if exists bankbusinessdaymaster cascade; |
| 85 | 88 |
|
| 86 | 89 |
create table bankbusinessdaymaster ( |
| 87 |
YEARMONTH decimal(6,0) default '0' not null comment '年月'
|
|
| 88 |
, BANKBUSINESSDAY decimal(2,0) default '0' not null comment '銀行営業日'
|
|
| 89 |
, NOTE varchar(120) comment '備考'
|
|
| 90 |
, DELETEFLG decimal(1,0) comment '削除フラグ'
|
|
| 91 |
, ENTRYDATE datetime comment '登録年月日'
|
|
| 92 |
, UPDATEDATE datetime comment '更新年月日'
|
|
| 90 |
YEARMONTH decimal(6,0) default '0' not null comment '?N??'
|
|
| 91 |
, BANKBUSINESSDAY decimal(2,0) default '0' not null comment '??s?c???'
|
|
| 92 |
, NOTE varchar(120) comment '???l'
|
|
| 93 |
, DELETEFLG decimal(1,0) comment '???t???O'
|
|
| 94 |
, ENTRYDATE datetime comment '?o?^?N????'
|
|
| 95 |
, UPDATEDATE datetime comment '?X?V?N????'
|
|
| 93 | 96 |
, constraint bankbusinessdaymaster_PKC primary key (YEARMONTH,BANKBUSINESSDAY) |
| 94 |
) comment '銀行営業日マスタ' ;
|
|
| 97 |
) comment '??s?c????}?X?^' ;
|
|
| 95 | 98 |
|
| 96 |
-- 業者請求データ
|
|
| 99 |
-- ???????f?[?^
|
|
| 97 | 100 |
drop table if exists billingdata cascade; |
| 98 | 101 |
|
| 99 | 102 |
create table billingdata ( |
| 100 |
COMPANYCODE decimal(8,0) default '0' not null comment '協力会社コード'
|
|
| 101 |
, TARGETDATE decimal(6,0) default '0' not null comment '対象年月'
|
|
| 102 |
, SEQNO decimal(3,0) default '0' not null comment '連番'
|
|
| 103 |
, BILLPRICE decimal(10,0) comment '請求金額'
|
|
| 104 |
, ENTRYDATE datetime comment '登録年月日'
|
|
| 105 |
, UPDATEDATE datetime comment '更新年月日'
|
|
| 103 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
|
|
| 104 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??'
|
|
| 105 |
, SEQNO decimal(3,0) default '0' not null comment '?A??'
|
|
| 106 |
, BILLPRICE decimal(10,0) comment '???????z'
|
|
| 107 |
, ENTRYDATE datetime comment '?o?^?N????'
|
|
| 108 |
, UPDATEDATE datetime comment '?X?V?N????'
|
|
| 106 | 109 |
, constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO) |
| 107 |
) comment '業者請求データ' ;
|
|
| 110 |
) comment '???????f?[?^' ;
|
|
| 108 | 111 |
|
| 109 |
-- 業者請求明細データ
|
|
| 112 |
-- ??????????f?[?^
|
|
| 110 | 113 |
drop table if exists billingdatadetail cascade; |
| 111 | 114 |
|
| 112 | 115 |
create table billingdatadetail ( |
| 113 |
COMPANYCODE decimal(8,0) default '0' not null comment '協力会社コード' |
|
| 114 |
, TARGETDATE decimal(6,0) default '0' not null comment '対象年月' |
|
| 115 |
, SEQNO decimal(3,0) default '0' not null comment '連番' |
|
| 116 |
, LINECOUNT decimal(3,0) default '0' not null comment '行番号' |
|
| 117 |
, CONSTRUCTIONCODE decimal(10,0) comment '工事番号' |
|
| 118 |
, FIELDNAME varchar(120) comment '現場名' |
|
| 119 |
, BILLPRICE decimal(10,0) comment '請求金額' |
|
| 120 |
, HIGHWPRICE decimal(10,0) comment '高速代' |
|
| 121 |
, HARDWPRICE decimal(10,0) comment '金物代' |
|
| 122 |
, INDSWASTETAX decimal(10,0) comment '産廃税' |
|
| 123 |
, NOTE varchar(120) comment '備考' |
|
| 124 |
, ENTRYDATE datetime comment '登録年月日' |
|
| 125 |
, UPDATEDATE datetime comment '更新年月日' |
|
| 116 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
|
| 117 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
|
| 118 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
|
| 119 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???' |
|
| 120 |
, CONSTRUCTIONCODE decimal(10,0) comment '?H?????' |
|
| 121 |
, CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '?s???' |
|
| 122 |
, CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '????' |
|
| 123 |
, FIELDNAME varchar(120) comment '????' |
|
| 124 |
, BILLPRICE decimal(10,0) comment '???????z' |
|
| 125 |
, HIGHWPRICE decimal(10,0) comment '??????' |
|
| 126 |
, HARDWPRICE decimal(10,0) comment '??????' |
|
| 127 |
, INDSWASTETAX decimal(10,0) comment '?Y?p??' |
|
| 128 |
, NOTE varchar(120) comment '???l' |
|
| 129 |
, ENTRYDATE datetime comment '?o?^?N????' |
|
| 130 |
, UPDATEDATE datetime comment '?X?V?N????' |
|
| 126 | 131 |
, constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT) |
| 127 |
) comment '業者請求明細データ' ;
|
|
| 132 |
) comment '??????????f?[?^' ;
|
|
| 128 | 133 |
|
| 129 |
-- 業者請求支払サマリーデータ
|
|
| 134 |
-- ???????x???T?}???[?f?[?^
|
|
| 130 | 135 |
drop table if exists billingpaymentsummary cascade; |
| 131 | 136 |
|
| 132 | 137 |
create table billingpaymentsummary ( |
| 133 |
COMPANYCODE decimal(8,0) default '0' not null comment '協力会社コード'
|
|
| 134 |
, TARGETDATE decimal(6,0) default '0' not null comment '対象年月'
|
|
| 135 |
, CHARGEPAYMENTKIND decimal(1,0) default '0' not null comment '請求支払区分'
|
|
| 136 |
, PAYDAY date comment '支払日'
|
|
| 137 |
, BILLPRICESTOTAL decimal(10,0) comment '請求金額小計'
|
|
| 138 |
, CONSUMPTIONTAXRATE decimal(6,3) comment '消費税率'
|
|
| 139 |
, CONSUMPTIONTAXPRICE decimal(10,0) comment '消費税額'
|
|
| 140 |
, HIGHWPRICESTOTAL decimal(10,0) comment '高速代小計'
|
|
| 141 |
, HARDWPRICESTOTAL decimal(10,0) comment '金物代小計'
|
|
| 142 |
, INDSWASTETAXSTOTAL decimal(10,0) comment '産廃税小計'
|
|
| 143 |
, CNSTRPRICERATE decimal(6,3) comment '協力金比率'
|
|
| 144 |
, CNSTRPRICESTOTAL decimal(10,0) comment '協力金小計'
|
|
| 145 |
, BILLINGPRICETOTAL decimal(10,0) comment '請求金額合計'
|
|
| 146 |
, ENTRYDATE datetime comment '登録年月日'
|
|
| 147 |
, UPDATEDATE datetime comment '更新年月日'
|
|
| 138 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h'
|
|
| 139 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??'
|
|
| 140 |
, CHARGEPAYMENTKIND decimal(1,0) default '0' not null comment '?????x????'
|
|
| 141 |
, PAYDAY date comment '?x????'
|
|
| 142 |
, BILLPRICESTOTAL decimal(10,0) comment '???????z???v'
|
|
| 143 |
, CONSUMPTIONTAXRATE decimal(6,3) comment '??????'
|
|
| 144 |
, CONSUMPTIONTAXPRICE decimal(10,0) comment '?????z'
|
|
| 145 |
, HIGHWPRICESTOTAL decimal(10,0) comment '???????v'
|
|
| 146 |
, HARDWPRICESTOTAL decimal(10,0) comment '???????v'
|
|
| 147 |
, INDSWASTETAXSTOTAL decimal(10,0) comment '?Y?p????v'
|
|
| 148 |
, CNSTRPRICERATE decimal(6,3) comment '???????'
|
|
| 149 |
, CNSTRPRICESTOTAL decimal(10,0) comment '????????v'
|
|
| 150 |
, BILLINGPRICETOTAL decimal(10,0) comment '???????z???v'
|
|
| 151 |
, ENTRYDATE datetime comment '?o?^?N????'
|
|
| 152 |
, UPDATEDATE datetime comment '?X?V?N????'
|
|
| 148 | 153 |
, constraint billingpaymentsummary_PKC primary key (COMPANYCODE,TARGETDATE,CHARGEPAYMENTKIND) |
| 149 |
) comment '業者請求支払サマリーデータ' ;
|
|
| 154 |
) comment '???????x???T?}???[?f?[?^' ;
|
|
| 150 | 155 |
|
| 151 |
-- 工事詳細台帳データ【退避用】
|
|
| 156 |
-- ?H???????f?[?^?y???p?z
|
|
| 152 | 157 |
drop table if exists bk_constructionledger cascade; |
| 153 | 158 |
|
| 154 | 159 |
create table bk_constructionledger ( |
| 155 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 156 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '事業期'
|
|
| 157 |
, CreatorCode decimal(8,0) comment '作成者コード'
|
|
| 158 |
, CreatorName varchar(60) comment '作成者名'
|
|
| 159 |
, CreateDate date not null comment '作成日'
|
|
| 160 |
, ConstructionTimes decimal(5,2) not null comment '工期(単位・月)'
|
|
| 161 |
, ConstructionStart date not null comment '契約工期開始'
|
|
| 162 |
, ConstructionEnd date not null comment '契約工期完了'
|
|
| 163 |
, OrdersDecisionPrice decimal(14,0) not null comment '税抜受注決定金額'
|
|
| 164 |
, CompanyExpenses decimal(10,0) not null comment '会社経費合計'
|
|
| 165 |
, DepartmentExpenses decimal(10,0) not null comment '部署経費合計'
|
|
| 166 |
, SalesExpenses decimal(10,0) not null comment '営業経費合計'
|
|
| 167 |
, TotalPayment decimal(10,0) not null comment '総支払額'
|
|
| 168 |
, GrossProfit decimal(10,0) not null comment '粗利'
|
|
| 169 |
, Allowance decimal(10,0) not null comment '給与'
|
|
| 170 |
, NetProfit decimal(10,0) not null comment '純利益'
|
|
| 171 |
, ComplateFlg decimal(1,0) not null comment '入力完了フラグ'
|
|
| 172 |
, IntegrationFlg decimal(1,0) not null comment '受注金額積算フラグ'
|
|
| 173 |
, EntryDate datetime not null comment '登録日付'
|
|
| 174 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 160 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 161 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
|
|
| 162 |
, CreatorCode decimal(8,0) comment '????R?[?h'
|
|
| 163 |
, CreatorName varchar(60) comment '?????'
|
|
| 164 |
, CreateDate date not null comment '????'
|
|
| 165 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
|
|
| 166 |
, ConstructionStart date not null comment '?_??H???J?n'
|
|
| 167 |
, ConstructionEnd date not null comment '?_??H??????'
|
|
| 168 |
, OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
|
|
| 169 |
, CompanyExpenses decimal(10,0) not null comment '???o???v'
|
|
| 170 |
, DepartmentExpenses decimal(10,0) not null comment '?????o???v'
|
|
| 171 |
, SalesExpenses decimal(10,0) not null comment '?c??o???v'
|
|
| 172 |
, TotalPayment decimal(10,0) not null comment '???x???z'
|
|
| 173 |
, GrossProfit decimal(10,0) not null comment '?e??'
|
|
| 174 |
, Allowance decimal(10,0) not null comment '???^'
|
|
| 175 |
, NetProfit decimal(10,0) not null comment '?????v'
|
|
| 176 |
, ComplateFlg decimal(1,0) not null comment '????????t???O'
|
|
| 177 |
, IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
|
|
| 178 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 179 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 175 | 180 |
, constraint bk_constructionledger_PKC primary key (ConstructionCode) |
| 176 |
) comment '工事詳細台帳データ【退避用】' ;
|
|
| 181 |
) comment '?H???????f?[?^?y???p?z' ;
|
|
| 177 | 182 |
|
| 178 |
-- 工事詳細台帳明細データ【退避用】
|
|
| 183 |
-- ?H??????????f?[?^?y???p?z
|
|
| 179 | 184 |
drop table if exists bk_constructionledgerdetail cascade; |
| 180 | 185 |
|
| 181 | 186 |
create table bk_constructionledgerdetail ( |
| 182 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 183 |
, GroupCount decimal(2,0) unsigned not null comment 'グループ番号'
|
|
| 184 |
, LineCount decimal(5,0) unsigned not null comment '行番号'
|
|
| 185 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 186 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 187 |
, FirstString varchar(120) comment '項目名称'
|
|
| 188 |
, SecondString varchar(120) comment '工事内容'
|
|
| 189 |
, CompanyType decimal(1,0) not null comment '協力会社コードタイプ'
|
|
| 190 |
, CompanyCode decimal(8,0) not null comment '協力会社コード'
|
|
| 191 |
, CompanyName varchar(120) comment '協力会社名称'
|
|
| 192 |
, EstimatePrice decimal(12,0) not null comment '予算(見積)金額'
|
|
| 193 |
, ExecutionAmount decimal(12,0) not null comment '実行金額'
|
|
| 194 |
, AmountConfigRate decimal(5,2) not null comment '金額構成率'
|
|
| 195 |
, PaymentBurden decimal(12,0) not null comment '支払補填額'
|
|
| 196 |
, FixDataFlg decimal(1,0) not null comment '固定データフラグ'
|
|
| 197 |
, IndependentFlg decimal(1,0) not null comment '独立データフラグ'
|
|
| 198 |
, FluctuationFlg decimal(1,0) not null comment '増減データフラグ'
|
|
| 199 |
, SalaryFlg decimal(1,0) not null comment '給与振分区分'
|
|
| 200 |
, SalaryDays decimal(4,0) not null comment '給与振分日数'
|
|
| 201 |
, OperatingFlg decimal(1,0) not null comment '担当中フラグ'
|
|
| 202 |
, SourceCode decimal(10,0) unsigned not null comment '元工事番号'
|
|
| 203 |
, JoinTitleFlg decimal(1,0) not null comment '工事名称タイトル'
|
|
| 204 |
, SalaryOnRegist decimal(12,0) not null comment '登録時月額給与'
|
|
| 205 |
, PurchaseOrderFlg decimal(2,0) not null comment '注文書発行フラグ'
|
|
| 206 |
, EntryDate datetime not null comment '登録日付'
|
|
| 207 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 187 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 188 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
|
| 189 |
, LineCount decimal(5,0) unsigned not null comment '?s???'
|
|
| 190 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 191 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 192 |
, FirstString varchar(120) comment '???????'
|
|
| 193 |
, SecondString varchar(120) comment '?H?????e'
|
|
| 194 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
|
|
| 195 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
|
| 196 |
, CompanyName varchar(120) comment '?????????'
|
|
| 197 |
, EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
|
|
| 198 |
, ExecutionAmount decimal(12,0) not null comment '???s???z'
|
|
| 199 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????'
|
|
| 200 |
, PaymentBurden decimal(12,0) not null comment '?x????U?z'
|
|
| 201 |
, FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
|
|
| 202 |
, IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
|
|
| 203 |
, FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
|
|
| 204 |
, SalaryFlg decimal(1,0) not null comment '???^?U????'
|
|
| 205 |
, SalaryDays decimal(4,0) not null comment '???^?U??????'
|
|
| 206 |
, OperatingFlg decimal(1,0) not null comment '?S?????t???O'
|
|
| 207 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????'
|
|
| 208 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
|
|
| 209 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
|
|
| 210 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
|
|
| 211 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 212 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 208 | 213 |
, constraint bk_constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
| 209 |
) comment '工事詳細台帳明細データ【退避用】' ;
|
|
| 214 |
) comment '?H??????????f?[?^?y???p?z' ;
|
|
| 210 | 215 |
|
| 211 |
-- 工事詳細台帳実行データ【退避用】
|
|
| 216 |
-- ?H?????????s?f?[?^?y???p?z
|
|
| 212 | 217 |
drop table if exists bk_constructionledgerexcute cascade; |
| 213 | 218 |
|
| 214 | 219 |
create table bk_constructionledgerexcute ( |
| 215 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 216 |
, GroupCount decimal(2,0) unsigned not null comment 'グループ番号'
|
|
| 217 |
, LineCount decimal(5,0) unsigned not null comment '行番号'
|
|
| 218 |
, ColumnCount decimal(3,0) not null comment '列番号'
|
|
| 219 |
, PaymentAmount decimal(12,0) not null comment '支払金額'
|
|
| 220 |
, TargetMonth date not null comment '対象年月'
|
|
| 221 |
, EntryDate datetime not null comment '登録日付'
|
|
| 222 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 220 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 221 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
|
| 222 |
, LineCount decimal(5,0) unsigned not null comment '?s???'
|
|
| 223 |
, ColumnCount decimal(3,0) not null comment '????'
|
|
| 224 |
, PaymentAmount decimal(12,0) not null comment '?x?????z'
|
|
| 225 |
, TargetMonth date not null comment '???N??'
|
|
| 226 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 227 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 223 | 228 |
, constraint bk_constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount) |
| 224 |
) comment '工事詳細台帳実行データ【退避用】' ;
|
|
| 229 |
) comment '?H?????????s?f?[?^?y???p?z' ;
|
|
| 225 | 230 |
|
| 226 |
-- 積算見積データ【退避用】
|
|
| 231 |
-- ??Z????f?[?^?y???p?z
|
|
| 227 | 232 |
drop table if exists bk_estimatedata cascade; |
| 228 | 233 |
|
| 229 | 234 |
create table bk_estimatedata ( |
| 230 |
SaveDate datetime not null comment '退避日付'
|
|
| 231 |
, ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 232 |
, LineCount decimal(3,0) unsigned not null comment '行番号'
|
|
| 233 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 234 |
, FixedItemCode varchar(1) comment '固定項目キー'
|
|
| 235 |
, ItemName varchar(120) comment '作業名称'
|
|
| 236 |
, SpecName varchar(120) comment '作業/品質・形状・寸法'
|
|
| 237 |
, PriceValue decimal(14,0) not null comment '金額'
|
|
| 238 |
, note varchar(60) comment '備考'
|
|
| 239 |
, MyExpensesFlg decimal(1,0) not null comment '自社経費フラグ'
|
|
| 240 |
, InputFlg decimal(1,0) not null comment '入力フラグ'
|
|
| 241 |
, EntryDate datetime not null comment '登録日付'
|
|
| 242 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 235 |
SaveDate datetime not null comment '?????t'
|
|
| 236 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 237 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
| 238 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 239 |
, FixedItemCode varchar(1) comment '?????L?['
|
|
| 240 |
, ItemName varchar(120) comment '??????'
|
|
| 241 |
, SpecName varchar(120) comment '???^?i???E?`??E???@'
|
|
| 242 |
, PriceValue decimal(14,0) not null comment '???z'
|
|
| 243 |
, note varchar(60) comment '???l'
|
|
| 244 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
|
|
| 245 |
, InputFlg decimal(1,0) not null comment '????t???O'
|
|
| 246 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 247 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 243 | 248 |
, constraint bk_estimatedata_PKC primary key (SaveDate,ConstructionCode,LineCount) |
| 244 |
) comment '積算見積データ【退避用】' ;
|
|
| 249 |
) comment '??Z????f?[?^?y???p?z' ;
|
|
| 245 | 250 |
|
| 246 |
-- 積算見積ページデータ【退避用】
|
|
| 251 |
-- ??Z????y?[?W?f?[?^?y???p?z
|
|
| 247 | 252 |
drop table if exists bk_estimatedatabody cascade; |
| 248 | 253 |
|
| 249 | 254 |
create table bk_estimatedatabody ( |
| 250 |
SaveDate datetime not null comment '退避日付'
|
|
| 251 |
, ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 252 |
, PageCount decimal(4,0) unsigned not null comment 'ページ番号'
|
|
| 253 |
, Category decimal(1,0) not null comment 'ページ区分'
|
|
| 254 |
, UnionComponentCode decimal(5,0) unsigned not null comment '所属構成キー'
|
|
| 255 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 256 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 257 |
, SelectComponent decimal(5,0) unsigned not null comment '選択構成キー'
|
|
| 258 |
, PageTitle varchar(120) not null comment 'ページ表示名'
|
|
| 259 |
, DetailLineCount decimal(3,0) unsigned not null comment '明細行番号'
|
|
| 260 |
, EntryDate datetime not null comment '登録日付'
|
|
| 261 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 255 |
SaveDate datetime not null comment '?????t'
|
|
| 256 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 257 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
|
|
| 258 |
, Category decimal(1,0) not null comment '?y?[?W??'
|
|
| 259 |
, UnionComponentCode decimal(5,0) unsigned not null comment '?????\???L?['
|
|
| 260 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 261 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 262 |
, SelectComponent decimal(5,0) unsigned not null comment '?I???\???L?['
|
|
| 263 |
, PageTitle varchar(120) not null comment '?y?[?W?\????'
|
|
| 264 |
, DetailLineCount decimal(3,0) unsigned not null comment '????s???'
|
|
| 265 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 266 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 262 | 267 |
, constraint bk_estimatedatabody_PKC primary key (SaveDate,ConstructionCode,PageCount) |
| 263 |
) comment '積算見積ページデータ【退避用】' ;
|
|
| 268 |
) comment '??Z????y?[?W?f?[?^?y???p?z' ;
|
|
| 264 | 269 |
|
| 265 |
-- 積算見積データ明細【退避用】
|
|
| 270 |
-- ??Z????f?[?^????y???p?z
|
|
| 266 | 271 |
drop table if exists bk_estimatedatadetail cascade; |
| 267 | 272 |
|
| 268 | 273 |
create table bk_estimatedatadetail ( |
| 269 |
SaveDate datetime not null comment '退避日付'
|
|
| 270 |
, ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 271 |
, PageCount decimal(4,0) unsigned not null comment 'ページ番号'
|
|
| 272 |
, LineCount decimal(3,0) unsigned not null comment '行番号'
|
|
| 273 |
, DataType decimal(1,0) not null comment 'データ種別'
|
|
| 274 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 275 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 276 |
, SpecCode decimal(5,0) unsigned not null comment '作業キー'
|
|
| 277 |
, ItemName varchar(120) comment '作業名称'
|
|
| 278 |
, SpecName varchar(120) comment '作業/品質・形状・寸法'
|
|
| 279 |
, Unitcount decimal(8,2) not null comment '数量'
|
|
| 280 |
, UnitName varchar(30) comment '単位名称'
|
|
| 281 |
, UnitPrice decimal(9,2) not null comment '単価'
|
|
| 282 |
, LineTotal decimal(12,0) not null comment '金額'
|
|
| 283 |
, note varchar(60) comment '備考'
|
|
| 284 |
, CompanyCode decimal(8,0) not null comment '協力会社コード'
|
|
| 285 |
, MyExpensesFlg decimal(1,0) not null comment '自社経費フラグ'
|
|
| 286 |
, InputFlg decimal(1,0) comment '入力フラグ'
|
|
| 287 |
, EntryDate datetime not null comment '登録日付'
|
|
| 288 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 274 |
SaveDate datetime not null comment '?????t'
|
|
| 275 |
, ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 276 |
, PageCount decimal(4,0) unsigned not null comment '?y?[?W???'
|
|
| 277 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
| 278 |
, DataType decimal(1,0) not null comment '?f?[?^???'
|
|
| 279 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 280 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 281 |
, SpecCode decimal(5,0) unsigned not null comment '???L?['
|
|
| 282 |
, ItemName varchar(120) comment '??????'
|
|
| 283 |
, SpecName varchar(120) comment '???^?i???E?`??E???@'
|
|
| 284 |
, Unitcount decimal(8,2) not null comment '????'
|
|
| 285 |
, UnitName varchar(30) comment '?P?????'
|
|
| 286 |
, UnitPrice decimal(9,2) not null comment '?P??'
|
|
| 287 |
, LineTotal decimal(12,0) not null comment '???z'
|
|
| 288 |
, note varchar(60) comment '???l'
|
|
| 289 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
|
| 290 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
|
|
| 291 |
, InputFlg decimal(1,0) comment '????t???O'
|
|
| 292 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 293 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 289 | 294 |
, constraint bk_estimatedatadetail_PKC primary key (SaveDate,ConstructionCode,PageCount,LineCount) |
| 290 |
) comment '積算見積データ明細【退避用】' ;
|
|
| 295 |
) comment '??Z????f?[?^????y???p?z' ;
|
|
| 291 | 296 |
|
| 292 |
-- 法人格マスタ
|
|
| 297 |
-- ?@?l?i?}?X?^
|
|
| 293 | 298 |
drop table if exists businesstypemaster cascade; |
| 294 | 299 |
|
| 295 | 300 |
create table businesstypemaster ( |
| 296 |
BusinessTypeCode decimal(5,0) unsigned not null comment '法人格コード'
|
|
| 297 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 298 |
, BusinessTypeName varchar(100) not null comment '業種名'
|
|
| 299 |
, EntryDate datetime not null comment '登録日付'
|
|
| 300 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 301 |
BusinessTypeCode decimal(5,0) unsigned not null comment '?@?l?i?R?[?h'
|
|
| 302 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 303 |
, BusinessTypeName varchar(100) not null comment '???'
|
|
| 304 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 305 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 301 | 306 |
, constraint businesstypemaster_PKC primary key (BusinessTypeCode) |
| 302 |
) comment '法人格マスタ' ;
|
|
| 307 |
) comment '?@?l?i?}?X?^' ;
|
|
| 303 | 308 |
|
| 304 | 309 |
create index BusinessTypeMaster_Index1 |
| 305 | 310 |
on businesstypemaster(DisplayOrder); |
| 306 | 311 |
|
| 307 |
-- 共通費大項目マスタ
|
|
| 312 |
-- ????????}?X?^
|
|
| 308 | 313 |
drop table if exists commoncostlarge cascade; |
| 309 | 314 |
|
| 310 | 315 |
create table commoncostlarge ( |
| 311 |
LargeCode decimal(5,0) unsigned not null comment '大項目キー'
|
|
| 312 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 313 |
, LargeName varchar(50) not null comment '大項目名称'
|
|
| 314 |
, CommentText varchar(120) comment '説明書き'
|
|
| 315 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 316 |
, EntryDate datetime not null comment '登録日付'
|
|
| 317 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 316 |
LargeCode decimal(5,0) unsigned not null comment '????L?['
|
|
| 317 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 318 |
, LargeName varchar(50) not null comment '???????'
|
|
| 319 |
, CommentText varchar(120) comment '????????'
|
|
| 320 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 321 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 322 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 318 | 323 |
, constraint commoncostlarge_PKC primary key (LargeCode) |
| 319 |
) comment '共通費大項目マスタ' ;
|
|
| 324 |
) comment '????????}?X?^' ;
|
|
| 320 | 325 |
|
| 321 |
-- 共通費工種関連マスタ
|
|
| 326 |
-- ?????H???A?}?X?^
|
|
| 322 | 327 |
drop table if exists commoncostlinkms cascade; |
| 323 | 328 |
|
| 324 | 329 |
create table commoncostlinkms ( |
| 325 |
LargeCode decimal(5,0) unsigned not null comment '大項目キー'
|
|
| 326 |
, MiddleCode decimal(5,0) unsigned not null comment '中項目キー'
|
|
| 327 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 328 |
, EntryDate datetime comment '登録日付'
|
|
| 329 |
, UpdateDate datetime comment '更新日付'
|
|
| 330 |
LargeCode decimal(5,0) unsigned not null comment '????L?['
|
|
| 331 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?['
|
|
| 332 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 333 |
, EntryDate datetime comment '?o?^???t'
|
|
| 334 |
, UpdateDate datetime comment '?X?V???t'
|
|
| 330 | 335 |
, constraint commoncostlinkms_PKC primary key (LargeCode,MiddleCode,ItemCode) |
| 331 |
) comment '共通費工種関連マスタ' ;
|
|
| 336 |
) comment '?????H???A?}?X?^' ;
|
|
| 332 | 337 |
|
| 333 |
-- 共通費中項目マスタ
|
|
| 338 |
-- ?????????}?X?^
|
|
| 334 | 339 |
drop table if exists commoncostmiddle cascade; |
| 335 | 340 |
|
| 336 | 341 |
create table commoncostmiddle ( |
| 337 |
LargeCode decimal(5,0) unsigned not null comment '大項目キー'
|
|
| 338 |
, MiddleCode decimal(5,0) unsigned not null comment '中項目キー'
|
|
| 339 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 340 |
, MiddleName varchar(50) not null comment '中項目名称'
|
|
| 341 |
, CommentText varchar(120) comment '説明書き'
|
|
| 342 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 343 |
, EntryDate datetime not null comment '登録日付'
|
|
| 344 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 342 |
LargeCode decimal(5,0) unsigned not null comment '????L?['
|
|
| 343 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?['
|
|
| 344 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 345 |
, MiddleName varchar(50) not null comment '?????????'
|
|
| 346 |
, CommentText varchar(120) comment '????????'
|
|
| 347 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 348 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 349 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 345 | 350 |
, constraint commoncostmiddle_PKC primary key (LargeCode,MiddleCode) |
| 346 |
) comment '共通費中項目マスタ' ;
|
|
| 351 |
) comment '?????????}?X?^' ;
|
|
| 347 | 352 |
|
| 348 |
-- 共通費中項目キーマスタ
|
|
| 353 |
-- ?????????L?[?}?X?^
|
|
| 349 | 354 |
drop table if exists commoncostmiddlesearchword cascade; |
| 350 | 355 |
|
| 351 | 356 |
create table commoncostmiddlesearchword ( |
| 352 |
LargeCode decimal(5,0) unsigned not null comment '大項目キー'
|
|
| 353 |
, MiddleCode decimal(5,0) unsigned not null comment '中項目キー'
|
|
| 354 |
, SeqNo decimal(5,0) unsigned not null comment '順序'
|
|
| 355 |
, SearchWord varchar(50) not null comment '検索項目'
|
|
| 356 |
, EntryDate datetime not null comment '登録日付'
|
|
| 357 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 357 |
LargeCode decimal(5,0) unsigned not null comment '????L?['
|
|
| 358 |
, MiddleCode decimal(5,0) unsigned not null comment '??????L?['
|
|
| 359 |
, SeqNo decimal(5,0) unsigned not null comment '????'
|
|
| 360 |
, SearchWord varchar(50) not null comment '????????'
|
|
| 361 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 362 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 358 | 363 |
, constraint commoncostmiddlesearchword_PKC primary key (LargeCode,MiddleCode,SeqNo) |
| 359 |
) comment '共通費中項目キーマスタ' ;
|
|
| 364 |
) comment '?????????L?[?}?X?^' ;
|
|
| 360 | 365 |
|
| 361 |
-- 構成工種関連マスタ
|
|
| 366 |
-- ?\???H???A?}?X?^
|
|
| 362 | 367 |
drop table if exists componentlinkmaster cascade; |
| 363 | 368 |
|
| 364 | 369 |
create table componentlinkmaster ( |
| 365 |
ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 366 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 367 |
, DisplayOrder decimal(5,0) unsigned comment '表示順'
|
|
| 368 |
, EntryDate datetime not null comment '登録日付'
|
|
| 369 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 370 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 371 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 372 |
, DisplayOrder decimal(5,0) unsigned comment '?\????'
|
|
| 373 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 374 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 370 | 375 |
, constraint componentlinkmaster_PKC primary key (ComponentCode,ItemCode) |
| 371 |
) comment '構成工種関連マスタ' ;
|
|
| 376 |
) comment '?\???H???A?}?X?^' ;
|
|
| 372 | 377 |
|
| 373 | 378 |
create index ComponentLinkMaster_Index1 |
| 374 | 379 |
on componentlinkmaster(ComponentCode); |
| ... | ... | |
| 376 | 381 |
create index ComponentLinkMaster_Index2 |
| 377 | 382 |
on componentlinkmaster(ItemCode); |
| 378 | 383 |
|
| 379 |
-- 構成マスタ
|
|
| 384 |
-- ?\???}?X?^
|
|
| 380 | 385 |
drop table if exists componentmaster cascade; |
| 381 | 386 |
|
| 382 | 387 |
create table componentmaster ( |
| 383 |
ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 384 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 385 |
, ComponentName varchar(120) not null comment '構成名称'
|
|
| 386 |
, SubItemsFlg decimal(1,0) comment '下位項目フラグ'
|
|
| 387 |
, DirectInputFlg decimal(1,0) comment '直接入力フラグ'
|
|
| 388 |
, MyExpensesFlg decimal(1,0) comment '自社経費フラグ'
|
|
| 389 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 390 |
, EntryDate datetime not null comment '登録日付'
|
|
| 391 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 388 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 389 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 390 |
, ComponentName varchar(120) not null comment '?\??????'
|
|
| 391 |
, SubItemsFlg decimal(1,0) comment '???????t???O'
|
|
| 392 |
, DirectInputFlg decimal(1,0) comment '???????t???O'
|
|
| 393 |
, MyExpensesFlg decimal(1,0) comment '????o??t???O'
|
|
| 394 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 395 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 396 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 392 | 397 |
, constraint componentmaster_PKC primary key (ComponentCode) |
| 393 |
) comment '構成マスタ' ;
|
|
| 398 |
) comment '?\???}?X?^' ;
|
|
| 394 | 399 |
|
| 395 | 400 |
create index ComponentMaster_Index1 |
| 396 | 401 |
on componentmaster(DisplayOrder); |
| 397 | 402 |
|
| 398 |
-- 構成工事種別関連マスタ
|
|
| 403 |
-- ?\???H??????A?}?X?^
|
|
| 399 | 404 |
drop table if exists componenttotypemaster cascade; |
| 400 | 405 |
|
| 401 | 406 |
create table componenttotypemaster ( |
| 402 |
ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 403 |
, TypeCode decimal(5,0) unsigned not null comment '工事種別コード'
|
|
| 404 |
, Dummy decimal(1,0) not null comment 'ダミー項目'
|
|
| 405 |
, EntryDate datetime not null comment '登録日付'
|
|
| 406 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 407 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 408 |
, TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
|
|
| 409 |
, Dummy decimal(1,0) not null comment '?_?~?[????'
|
|
| 410 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 411 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 407 | 412 |
, constraint componenttotypemaster_PKC primary key (ComponentCode,TypeCode) |
| 408 |
) comment '構成工事種別関連マスタ' ;
|
|
| 413 |
) comment '?\???H??????A?}?X?^' ;
|
|
| 409 | 414 |
|
| 410 | 415 |
create index ComponentToTypeMaster_Index1 |
| 411 | 416 |
on componenttotypemaster(ComponentCode); |
| ... | ... | |
| 413 | 418 |
create index ComponentToTypeMaster_Index2 |
| 414 | 419 |
on componenttotypemaster(TypeCode); |
| 415 | 420 |
|
| 416 |
-- 工事基本情報
|
|
| 421 |
-- ?H????{???
|
|
| 417 | 422 |
drop table if exists constructionbaseinfo cascade; |
| 418 | 423 |
|
| 419 | 424 |
create table constructionbaseinfo ( |
| 420 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 421 |
, TyingFlg decimal(1,0) not null comment '紐付データフラグ'
|
|
| 422 |
, JoinFlg decimal(1,0) not null comment '結合契約工事フラグ'
|
|
| 423 |
, ConstructionYear smallint(5) unsigned not null comment '工事年度'
|
|
| 424 |
, ConstructionPeriod smallint(5) unsigned not null comment '工事期数'
|
|
| 425 |
, RequestedDate date comment '依頼受け日'
|
|
| 426 |
, EstimatesSubmitDeadline date comment '見積提出期限'
|
|
| 427 |
, EstimatesSubmittedDate date comment '見積提出日'
|
|
| 428 |
, ProvisionalOrderDate date comment '仮受注日'
|
|
| 429 |
, OrderDate date comment '受注日'
|
|
| 430 |
, OrderStartingDate date comment '開始予定日'
|
|
| 431 |
, OrderCompletionDate date comment '完了予定日'
|
|
| 432 |
, PreparationStartDate date comment '施工準備開始日'
|
|
| 433 |
, ConstructionStartingDate date comment '施工開始日'
|
|
| 434 |
, ConstructionCompletionDate date comment '施工完了日'
|
|
| 435 |
, NonOrderDate date comment '非受注日'
|
|
| 436 |
, OrdersDecisionPrice decimal(12,0) not null comment '税抜受注決定金額'
|
|
| 437 |
, OrdersDecisionPriceInTax decimal(12,0) not null comment '税込受注決定金額'
|
|
| 438 |
, SalesPersonCode decimal(8,0) comment '営業担当者名'
|
|
| 439 |
, ConstructionPersonCode decimal(8,0) not null comment '工事担当者'
|
|
| 440 |
, ConstrSubPersonCode decimal(8,0) not null comment '工事副担当者'
|
|
| 441 |
, ConstructionInstructor decimal(8,0) not null comment '工事指導員'
|
|
| 442 |
, TransferConstruction decimal(8,0) not null comment '工事移管先コード'
|
|
| 443 |
, TransferConstructionDate date comment '工事移管日'
|
|
| 444 |
, OrderersDivision decimal(5,0) not null comment '発注者区分'
|
|
| 445 |
, OrderersCode decimal(5,0) unsigned not null comment '発注者コード'
|
|
| 446 |
, EstimatesExpirationDate date comment '見積有効期限'
|
|
| 447 |
, ConstructionPeriodStart date comment '契約工期開始日'
|
|
| 448 |
, ConstructionPeriodEnd date comment '契約工期完了'
|
|
| 449 |
, ConstructionPeriodStart2 date comment '契約工期開始(延長時)'
|
|
| 450 |
, ConstructionPeriodEnd2 date comment '契約工期完了(延長時)'
|
|
| 451 |
, StartDate date comment '工事開始日'
|
|
| 452 |
, EndDate date comment '工事終了日'
|
|
| 453 |
, PurchaseOrderMailingDate date comment '注文書郵送日'
|
|
| 454 |
, PurchaseOrderReturnDate date comment '注文書返送日'
|
|
| 455 |
, PurchaseOrderReturnCheckDate date comment '注文書返送確認日'
|
|
| 456 |
, ConsumptionTaxFlg decimal(1,0) not null comment '消費税フラグ'
|
|
| 457 |
, PrimeContractorFlg decimal(1,0) not null comment '元請フラグ'
|
|
| 458 |
, SalesCostFlg decimal(1,0) not null comment '営業経費発生フラグ'
|
|
| 459 |
, ConstructionStatusFlg decimal(2,0) not null comment '工事状態フラグ'
|
|
| 460 |
, ConstructionType decimal(5,0) not null comment '工事種別コード'
|
|
| 461 |
, EstimateType decimal(1,0) not null comment '見積種別'
|
|
| 462 |
, BillingStartDate date not null comment '請求準備開始日'
|
|
| 463 |
, BillingDate date not null comment '請求日'
|
|
| 464 |
, BillingSplitFlg decimal(1,0) not null comment '請求回数フラグ'
|
|
| 465 |
, BillingSendDate date comment '請求書郵送/手渡し日'
|
|
| 466 |
, LedgerComplateDate date not null comment '工事詳細台帳入力完了日付'
|
|
| 467 |
, EntryDate datetime not null comment '登録日付'
|
|
| 468 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 425 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 426 |
, TyingFlg decimal(1,0) not null comment '?R?t?f?[?^?t???O'
|
|
| 427 |
, JoinFlg decimal(1,0) not null comment '?????_??H???t???O'
|
|
| 428 |
, ConstructionYear smallint(5) unsigned not null comment '?H???N?x'
|
|
| 429 |
, ConstructionPeriod smallint(5) unsigned not null comment '?H??????'
|
|
| 430 |
, RequestedDate date comment '??????'
|
|
| 431 |
, EstimatesSubmitDeadline date comment '?????o????'
|
|
| 432 |
, EstimatesSubmittedDate date comment '?????o??'
|
|
| 433 |
, ProvisionalOrderDate date comment '?????'
|
|
| 434 |
, OrderDate date comment '???'
|
|
| 435 |
, OrderStartingDate date comment '?J?n?\???'
|
|
| 436 |
, OrderCompletionDate date comment '?????\???'
|
|
| 437 |
, PreparationStartDate date comment '?{?H?????J?n??'
|
|
| 438 |
, ConstructionStartingDate date comment '?{?H?J?n??'
|
|
| 439 |
, ConstructionCompletionDate date comment '?{?H??????'
|
|
| 440 |
, NonOrderDate date comment '????'
|
|
| 441 |
, OrdersDecisionPrice decimal(12,0) not null comment '??????????z'
|
|
| 442 |
, OrdersDecisionPriceInTax decimal(12,0) not null comment '??????????z'
|
|
| 443 |
, SalesPersonCode decimal(8,0) comment '?c??S?????'
|
|
| 444 |
, ConstructionPersonCode decimal(8,0) not null comment '?H???S????'
|
|
| 445 |
, ConstrSubPersonCode decimal(8,0) not null comment '?H?????S????'
|
|
| 446 |
, ConstructionInstructor decimal(8,0) not null comment '?H???w????'
|
|
| 447 |
, TransferConstruction decimal(8,0) not null comment '?H??????R?[?h'
|
|
| 448 |
, TransferConstructionDate date comment '?H??????'
|
|
| 449 |
, OrderersDivision decimal(5,0) not null comment '???????'
|
|
| 450 |
, OrderersCode decimal(5,0) unsigned not null comment '??????R?[?h'
|
|
| 451 |
, EstimatesExpirationDate date comment '????L??????'
|
|
| 452 |
, ConstructionPeriodStart date comment '?_??H???J?n??'
|
|
| 453 |
, ConstructionPeriodEnd date comment '?_??H??????'
|
|
| 454 |
, ConstructionPeriodStart2 date comment '?_??H???J?n?i???????j'
|
|
| 455 |
, ConstructionPeriodEnd2 date comment '?_??H???????i???????j'
|
|
| 456 |
, StartDate date comment '?H???J?n??'
|
|
| 457 |
, EndDate date comment '?H???I????'
|
|
| 458 |
, PurchaseOrderMailingDate date comment '???????X????'
|
|
| 459 |
, PurchaseOrderReturnDate date comment '???????????'
|
|
| 460 |
, PurchaseOrderReturnCheckDate date comment '??????????m?F??'
|
|
| 461 |
, ConsumptionTaxFlg decimal(1,0) not null comment '?????t???O'
|
|
| 462 |
, PrimeContractorFlg decimal(1,0) not null comment '?????t???O'
|
|
| 463 |
, SalesCostFlg decimal(1,0) not null comment '?c??o?????t???O'
|
|
| 464 |
, ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O'
|
|
| 465 |
, ConstructionType decimal(5,0) not null comment '?H?????R?[?h'
|
|
| 466 |
, EstimateType decimal(1,0) not null comment '??????'
|
|
| 467 |
, BillingStartDate date not null comment '?????????J?n??'
|
|
| 468 |
, BillingDate date not null comment '??????'
|
|
| 469 |
, BillingSplitFlg decimal(1,0) not null comment '??????t???O'
|
|
| 470 |
, BillingSendDate date comment '???????X??/??n????'
|
|
| 471 |
, LedgerComplateDate date not null comment '?H????????????????t'
|
|
| 472 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 473 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 469 | 474 |
, constraint constructionbaseinfo_PKC primary key (ConstructionCode) |
| 470 |
) comment '工事基本情報' ;
|
|
| 475 |
) comment '?H????{???' ;
|
|
| 471 | 476 |
|
| 472 | 477 |
create index BaseInfo_Index1 |
| 473 | 478 |
on constructionbaseinfo(ConstructionStatusFlg); |
| ... | ... | |
| 487 | 492 |
create index BaseInfo_Index6 |
| 488 | 493 |
on constructionbaseinfo(ConstructionPeriod); |
| 489 | 494 |
|
| 490 |
-- 工事基本情報明細
|
|
| 495 |
-- ?H????{????
|
|
| 491 | 496 |
drop table if exists constructionbaseinfodetail cascade; |
| 492 | 497 |
|
| 493 | 498 |
create table constructionbaseinfodetail ( |
| 494 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 495 |
, DetailNo decimal(2,0) not null comment '明細番号'
|
|
| 496 |
, DetailString varchar(120) comment '明細内容'
|
|
| 497 |
, EntryDate datetime not null comment '登録日付'
|
|
| 498 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 499 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 500 |
, DetailNo decimal(2,0) not null comment '??????'
|
|
| 501 |
, DetailString varchar(120) comment '??????e'
|
|
| 502 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 503 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 499 | 504 |
, constraint constructionbaseinfodetail_PKC primary key (ConstructionCode,DetailNo) |
| 500 |
) comment '工事基本情報明細' ;
|
|
| 505 |
) comment '?H????{????' ;
|
|
| 501 | 506 |
|
| 502 | 507 |
create index BaseInfoDetail_Idx1 |
| 503 | 508 |
on constructionbaseinfodetail(ConstructionCode); |
| ... | ... | |
| 505 | 510 |
create index BaseInfoDetail_Idx2 |
| 506 | 511 |
on constructionbaseinfodetail(DetailNo); |
| 507 | 512 |
|
| 508 |
-- 工事施工予算データ
|
|
| 513 |
-- ?H???{?H?\?Z?f?[?^
|
|
| 509 | 514 |
drop table if exists constructionbudget cascade; |
| 510 | 515 |
|
| 511 | 516 |
create table constructionbudget ( |
| 512 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード' |
|
| 513 |
, CreatorCode decimal(8,0) not null comment '作成者コード' |
|
| 514 |
, CreatorName varchar(60) comment '作成者名' |
|
| 515 |
, CreatorCosts decimal(11,0) not null comment '作成者給与' |
|
| 516 |
, AssistantCode decimal(8,0) not null comment '副担当者コード' |
|
| 517 |
, AssistantName varchar(60) comment '副担当者名' |
|
| 518 |
, AssistantCosts decimal(11,0) not null comment '副担当者給与' |
|
| 519 |
, InstructorCode decimal(8,0) not null comment '工事指導員コード' |
|
| 520 |
, InstructorName varchar(60) comment '工事指導員名' |
|
| 521 |
, InstructorCosts decimal(11,0) not null comment '工事指導員給与' |
|
| 522 |
, CreateDate date not null comment '作成日' |
|
| 523 |
, ConstructionTimes decimal(5,2) not null comment '工期(単位・月)' |
|
| 524 |
, ConstructionStart date not null comment '契約工期開始' |
|
| 525 |
, ConstructionEnd date not null comment '契約工期完了' |
|
| 526 |
, InstructorTimes decimal(5,2) not null comment '指導員稼働月数' |
|
| 527 |
, SalaryFlg decimal(1,0) not null comment '給与振分区分' |
|
| 528 |
, SalaryDays decimal(4,0) not null comment '振分日数' |
|
| 529 |
, A_SalaryFlg decimal(1,0) not null comment '副担当者給与振分区分' |
|
| 530 |
, A_SalaryDays decimal(4,0) not null comment '副担当者振分日数' |
|
| 531 |
, I_SalaryFlg decimal(1,0) not null comment '指導員給与振分区分' |
|
| 532 |
, I_SalaryDays decimal(4,0) not null comment '指導員振分日数' |
|
| 533 |
, EntryDate datetime not null comment '登録日付' |
|
| 534 |
, UpdateDate datetime not null comment '更新日付' |
|
| 517 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
| 518 |
, CreatorCode decimal(8,0) not null comment '????R?[?h' |
|
| 519 |
, CreatorName varchar(60) comment '?????' |
|
| 520 |
, CreatorCosts decimal(11,0) not null comment '??????^' |
|
| 521 |
, AssistantCode decimal(8,0) not null comment '???S????R?[?h' |
|
| 522 |
, AssistantName varchar(60) comment '???S?????' |
|
| 523 |
, AssistantCosts decimal(11,0) not null comment '???S??????^' |
|
| 524 |
, InstructorCode decimal(8,0) not null comment '?H???w?????R?[?h' |
|
| 525 |
, InstructorName varchar(60) comment '?H???w??????' |
|
| 526 |
, InstructorCosts decimal(11,0) not null comment '?H???w???????^' |
|
| 527 |
, CreateDate date not null comment '????' |
|
| 528 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j' |
|
| 529 |
, ConstructionStart date not null comment '?_??H???J?n' |
|
| 530 |
, ConstructionEnd date not null comment '?_??H??????' |
|
| 531 |
, InstructorTimes decimal(5,2) not null comment '?w???????????' |
|
| 532 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
|
| 533 |
, SalaryDays decimal(4,0) not null comment '?U??????' |
|
| 534 |
, A_SalaryFlg decimal(1,0) not null comment '???S??????^?U????' |
|
| 535 |
, A_SalaryDays decimal(4,0) not null comment '???S????U??????' |
|
| 536 |
, I_SalaryFlg decimal(1,0) not null comment '?w???????^?U????' |
|
| 537 |
, I_SalaryDays decimal(4,0) not null comment '?w?????U??????' |
|
| 538 |
, OrdersDecisionPrice decimal(12,0) not null comment '??????????z' |
|
| 539 |
, EntryDate datetime not null comment '?o?^???t' |
|
| 540 |
, UpdateDate datetime not null comment '?X?V???t' |
|
| 535 | 541 |
, constraint constructionbudget_PKC primary key (ConstructionCode) |
| 536 |
) comment '工事施工予算データ' ;
|
|
| 542 |
) comment '?H???{?H?\?Z?f?[?^' ;
|
|
| 537 | 543 |
|
| 538 |
-- 工事施工予算データ明細
|
|
| 544 |
-- ?H???{?H?\?Z?f?[?^????
|
|
| 539 | 545 |
drop table if exists constructionbudgetdetail cascade; |
| 540 | 546 |
|
| 541 | 547 |
create table constructionbudgetdetail ( |
| 542 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 543 |
, GroupCount decimal(2,0) unsigned not null comment 'グループ番号'
|
|
| 544 |
, LineCount decimal(3,0) unsigned not null comment '行番号'
|
|
| 545 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 546 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 547 |
, FirstString varchar(120) comment '項目名称'
|
|
| 548 |
, SecondString varchar(120) comment '工事内容'
|
|
| 549 |
, CompanyType decimal(1,0) not null comment '協力会社コードタイプ'
|
|
| 550 |
, CompanyCode decimal(8,0) not null comment '協力会社コード'
|
|
| 551 |
, CompanyName varchar(120) comment '協力会社名称'
|
|
| 552 |
, EstimatePrice decimal(12,0) not null comment '積算時見積金額'
|
|
| 553 |
, NegotiationPrice decimal(12,0) not null comment '積算時交渉金額'
|
|
| 554 |
, OrderDesiredAmount decimal(12,0) not null comment '発注希望金額'
|
|
| 555 |
, ExecutionAmount decimal(12,0) not null comment '実行金額'
|
|
| 556 |
, AmountConfigRate decimal(5,2) not null comment '金額構成率'
|
|
| 557 |
, NegotiateFlg decimal(1,0) not null comment '協力業者交渉フラグ'
|
|
| 558 |
, EntryDate datetime not null comment '登録日付'
|
|
| 559 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 548 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 549 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
|
| 550 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
| 551 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 552 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 553 |
, FirstString varchar(120) comment '???????'
|
|
| 554 |
, SecondString varchar(120) comment '?H?????e'
|
|
| 555 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
|
|
| 556 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
|
| 557 |
, CompanyName varchar(120) comment '?????????'
|
|
| 558 |
, EstimatePrice decimal(12,0) not null comment '??Z????????z'
|
|
| 559 |
, NegotiationPrice decimal(12,0) not null comment '??Z????????z'
|
|
| 560 |
, OrderDesiredAmount decimal(12,0) not null comment '??????]???z'
|
|
| 561 |
, ExecutionAmount decimal(12,0) not null comment '???s???z'
|
|
| 562 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????'
|
|
| 563 |
, NegotiateFlg decimal(1,0) not null comment '?????????t???O'
|
|
| 564 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 565 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 560 | 566 |
, constraint constructionbudgetdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
| 561 |
) comment '工事施工予算データ明細' ;
|
|
| 567 |
) comment '?H???{?H?\?Z?f?[?^????' ;
|
|
| 562 | 568 |
|
| 563 |
-- 工種マスタ
|
|
| 569 |
-- ?H??}?X?^
|
|
| 564 | 570 |
drop table if exists constructionitemmaster cascade; |
| 565 | 571 |
|
| 566 | 572 |
create table constructionitemmaster ( |
| 567 |
ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 568 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 569 |
, ItemName varchar(120) not null comment '工種名称'
|
|
| 570 |
, SubItemsFlg decimal(1,0) comment '下位項目フラグ'
|
|
| 571 |
, MyExpensesFlg decimal(1,0) not null comment '自社経費フラグ'
|
|
| 572 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 573 |
, EntryDate datetime not null comment '登録日付'
|
|
| 574 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 573 |
ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 574 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 575 |
, ItemName varchar(120) not null comment '?H????'
|
|
| 576 |
, SubItemsFlg decimal(1,0) comment '???????t???O'
|
|
| 577 |
, MyExpensesFlg decimal(1,0) not null comment '????o??t???O'
|
|
| 578 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 579 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 580 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 575 | 581 |
, constraint constructionitemmaster_PKC primary key (ItemCode) |
| 576 |
) comment '工種マスタ' ;
|
|
| 582 |
) comment '?H??}?X?^' ;
|
|
| 577 | 583 |
|
| 578 |
-- 工事詳細台帳データ
|
|
| 584 |
-- ?H???????f?[?^
|
|
| 579 | 585 |
drop table if exists constructionledger cascade; |
| 580 | 586 |
|
| 581 | 587 |
create table constructionledger ( |
| 582 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 583 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '事業期'
|
|
| 584 |
, CreatorCode decimal(8,0) comment '作成者コード'
|
|
| 585 |
, CreatorName varchar(60) comment '作成者名'
|
|
| 586 |
, CreateDate date not null comment '作成日'
|
|
| 587 |
, ConstructionTimes decimal(5,2) not null comment '工期(単位・月)'
|
|
| 588 |
, ConstructionStart date not null comment '契約工期開始'
|
|
| 589 |
, ConstructionEnd date not null comment '契約工期完了'
|
|
| 590 |
, OrdersDecisionPrice decimal(14,0) not null comment '税抜受注決定金額'
|
|
| 591 |
, CompanyExpenses decimal(10,0) not null comment '会社経費合計'
|
|
| 592 |
, DepartmentExpenses decimal(10,0) not null comment '部署経費合計'
|
|
| 593 |
, SalesExpenses decimal(10,0) not null comment '営業経費合計'
|
|
| 594 |
, TotalPayment decimal(10,0) not null comment '総支払額'
|
|
| 595 |
, GrossProfit decimal(10,0) not null comment '粗利'
|
|
| 596 |
, Allowance decimal(10,0) not null comment '給与'
|
|
| 597 |
, NetProfit decimal(10,0) not null comment '純利益'
|
|
| 598 |
, ComplateFlg decimal(1,0) not null comment '入力完了フラグ'
|
|
| 599 |
, IntegrationFlg decimal(1,0) not null comment '受注金額積算フラグ'
|
|
| 600 |
, EntryDate datetime not null comment '登録日付'
|
|
| 601 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 588 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 589 |
, ConstructionPeriod decimal(4,0) unsigned not null comment '?????'
|
|
| 590 |
, CreatorCode decimal(8,0) comment '????R?[?h'
|
|
| 591 |
, CreatorName varchar(60) comment '?????'
|
|
| 592 |
, CreateDate date not null comment '????'
|
|
| 593 |
, ConstructionTimes decimal(5,2) not null comment '?H???i?P??E???j'
|
|
| 594 |
, ConstructionStart date not null comment '?_??H???J?n'
|
|
| 595 |
, ConstructionEnd date not null comment '?_??H??????'
|
|
| 596 |
, OrdersDecisionPrice decimal(14,0) not null comment '??????????z'
|
|
| 597 |
, CompanyExpenses decimal(10,0) not null comment '???o???v'
|
|
| 598 |
, DepartmentExpenses decimal(10,0) not null comment '?????o???v'
|
|
| 599 |
, SalesExpenses decimal(10,0) not null comment '?c??o???v'
|
|
| 600 |
, TotalPayment decimal(10,0) not null comment '???x???z'
|
|
| 601 |
, GrossProfit decimal(10,0) not null comment '?e??'
|
|
| 602 |
, Allowance decimal(10,0) not null comment '???^'
|
|
| 603 |
, NetProfit decimal(10,0) not null comment '?????v'
|
|
| 604 |
, ComplateFlg decimal(1,0) not null comment '????????t???O'
|
|
| 605 |
, IntegrationFlg decimal(1,0) not null comment '????z??Z?t???O'
|
|
| 606 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 607 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 602 | 608 |
, constraint constructionledger_PKC primary key (ConstructionCode) |
| 603 |
) comment '工事詳細台帳データ' ;
|
|
| 609 |
) comment '?H???????f?[?^' ;
|
|
| 604 | 610 |
|
| 605 |
-- 工事詳細台帳明細データ
|
|
| 611 |
-- ?H??????????f?[?^
|
|
| 606 | 612 |
drop table if exists constructionledgerdetail cascade; |
| 607 | 613 |
|
| 608 | 614 |
create table constructionledgerdetail ( |
| 609 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 610 |
, GroupCount decimal(2,0) unsigned not null comment 'グループ番号'
|
|
| 611 |
, LineCount decimal(3,0) unsigned not null comment '行番号'
|
|
| 612 |
, ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 613 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 614 |
, FirstString varchar(120) comment '項目名称'
|
|
| 615 |
, SecondString varchar(120) comment '工事内容'
|
|
| 616 |
, CompanyType decimal(1,0) not null comment '協力会社コードタイプ'
|
|
| 617 |
, CompanyCode decimal(8,0) not null comment '協力会社コード'
|
|
| 618 |
, CompanyName varchar(120) comment '協力会社名称'
|
|
| 619 |
, EstimatePrice decimal(12,0) not null comment '予算(見積)金額'
|
|
| 620 |
, ExecutionAmount decimal(12,0) not null comment '実行金額'
|
|
| 621 |
, AmountConfigRate decimal(5,2) not null comment '金額構成率'
|
|
| 622 |
, PaymentBurden decimal(12,0) not null comment '支払補填額'
|
|
| 623 |
, FixDataFlg decimal(1,0) not null comment '固定データフラグ'
|
|
| 624 |
, IndependentFlg decimal(1,0) not null comment '独立データフラグ'
|
|
| 625 |
, FluctuationFlg decimal(1,0) not null comment '増減データフラグ'
|
|
| 626 |
, SalaryFlg decimal(1,0) not null comment '給与振分区分'
|
|
| 627 |
, SalaryDays decimal(4,0) not null comment '給与振分日数'
|
|
| 628 |
, OperatingFlg decimal(1,0) not null comment '担当中フラグ'
|
|
| 629 |
, SourceCode decimal(10,0) unsigned not null comment '元工事番号'
|
|
| 630 |
, JoinTitleFlg decimal(1,0) not null comment '工事名称タイトル'
|
|
| 631 |
, SalaryOnRegist decimal(12,0) not null comment '登録時月額給与'
|
|
| 632 |
, PurchaseOrderFlg decimal(2,0) not null comment '注文書発行フラグ'
|
|
| 633 |
, EntryDate datetime not null comment '登録日付'
|
|
| 634 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 615 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 616 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
|
| 617 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
| 618 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 619 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 620 |
, FirstString varchar(120) comment '???????'
|
|
| 621 |
, SecondString varchar(120) comment '?H?????e'
|
|
| 622 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v'
|
|
| 623 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h'
|
|
| 624 |
, CompanyName varchar(120) comment '?????????'
|
|
| 625 |
, EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z'
|
|
| 626 |
, ExecutionAmount decimal(12,0) not null comment '???s???z'
|
|
| 627 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????'
|
|
| 628 |
, PaymentBurden decimal(12,0) not null comment '?x????U?z'
|
|
| 629 |
, FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O'
|
|
| 630 |
, IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O'
|
|
| 631 |
, FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O'
|
|
| 632 |
, SalaryFlg decimal(1,0) not null comment '???^?U????'
|
|
| 633 |
, SalaryDays decimal(4,0) not null comment '???^?U??????'
|
|
| 634 |
, OperatingFlg decimal(1,0) not null comment '?S?????t???O'
|
|
| 635 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????'
|
|
| 636 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??'
|
|
| 637 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^'
|
|
| 638 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O'
|
|
| 639 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 640 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 635 | 641 |
, constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
| 636 |
) comment '工事詳細台帳明細データ' ;
|
|
| 642 |
) comment '?H??????????f?[?^' ;
|
|
| 637 | 643 |
|
| 638 | 644 |
create index LedgerDetail_Index01 |
| 639 | 645 |
on constructionledgerdetail(ConstructionCode); |
| ... | ... | |
| 644 | 650 |
create index LedgerDetail_Index03 |
| 645 | 651 |
on constructionledgerdetail(SourceCode); |
| 646 | 652 |
|
| 647 |
-- 工事詳細台帳実行データ
|
|
| 653 |
-- ?H?????????s?f?[?^
|
|
| 648 | 654 |
drop table if exists constructionledgerexcute cascade; |
| 649 | 655 |
|
| 650 | 656 |
create table constructionledgerexcute ( |
| 651 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 652 |
, GroupCount decimal(2,0) unsigned not null comment 'グループ番号'
|
|
| 653 |
, LineCount decimal(3,0) unsigned not null comment '行番号'
|
|
| 654 |
, ColumnCount decimal(3,0) not null comment '列番号'
|
|
| 655 |
, PaymentAmount decimal(12,0) not null comment '支払金額'
|
|
| 656 |
, TargetMonth date not null comment '対象年月'
|
|
| 657 |
, EntryDate datetime not null comment '登録日付'
|
|
| 658 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 657 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 658 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???'
|
|
| 659 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
| 660 |
, ColumnCount decimal(3,0) not null comment '????'
|
|
| 661 |
, PaymentAmount decimal(12,0) not null comment '?x?????z'
|
|
| 662 |
, TargetMonth date not null comment '???N??'
|
|
| 663 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 664 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 659 | 665 |
, constraint constructionledgerexcute_PKC primary key (ConstructionCode,GroupCount,LineCount,ColumnCount) |
| 660 |
) comment '工事詳細台帳実行データ' ;
|
|
| 666 |
) comment '?H?????????s?f?[?^' ;
|
|
| 661 | 667 |
|
| 662 | 668 |
create index LedgerExcute_Index1 |
| 663 | 669 |
on constructionledgerexcute(ConstructionCode,TargetMonth,GroupCount,LineCount); |
| 664 | 670 |
|
| 665 |
-- 工事リンク情報
|
|
| 671 |
-- ?H???????N???
|
|
| 666 | 672 |
drop table if exists constructionlink cascade; |
| 667 | 673 |
|
| 668 | 674 |
create table constructionlink ( |
| 669 |
ConstructionCode decimal(10,0) unsigned not null comment '工事コード'
|
|
| 670 |
, FluctuationCode decimal(10,0) not null comment '子工事番号'
|
|
| 671 |
, LinkType decimal(1,0) not null comment 'リンク種別'
|
|
| 672 |
, EntryDate datetime not null comment '登録日付'
|
|
| 673 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 675 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h'
|
|
| 676 |
, FluctuationCode decimal(10,0) not null comment '?q?H?????'
|
|
| 677 |
, LinkType decimal(1,0) not null comment '?????N???'
|
|
| 678 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 679 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 674 | 680 |
, constraint constructionlink_PKC primary key (ConstructionCode,FluctuationCode) |
| 675 |
) comment '工事リンク情報' ;
|
|
| 681 |
) comment '?H???????N???' ;
|
|
| 676 | 682 |
|
| 677 | 683 |
create index ConstructionLink_Index1 |
| 678 | 684 |
on constructionlink(ConstructionCode); |
| ... | ... | |
| 683 | 689 |
create index ConstructionLink_Index3 |
| 684 | 690 |
on constructionlink(LinkType); |
| 685 | 691 |
|
| 686 |
-- 工事資材情報
|
|
| 692 |
-- ?H????????
|
|
| 687 | 693 |
drop table if exists constructionmaterialinfo cascade; |
| 688 | 694 |
|
| 689 | 695 |
create table constructionmaterialinfo ( |
| 690 |
CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '工事番号'
|
|
| 691 |
, MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '資材品目コード'
|
|
| 692 |
, RENTCOUNT smallint(5) unsigned comment '貸出数'
|
|
| 693 |
, REPAYCOUNT smallint(5) unsigned comment '返却数'
|
|
| 694 |
, COMPLETEFLG tinyint(3) unsigned comment '完了フラグ'
|
|
| 695 |
, ENTRYDATE datetime comment '登録日付'
|
|
| 696 |
, UPDATEDATE datetime comment '更新日付'
|
|
| 696 |
CONSTRUCTIONCODE int(10) unsigned default 0 not null comment '?H?????'
|
|
| 697 |
, MATERIALITEMCODE smallint(5) unsigned default 0 not null comment '????i??R?[?h'
|
|
| 698 |
, RENTCOUNT smallint(5) unsigned comment '??o??'
|
|
| 699 |
, REPAYCOUNT smallint(5) unsigned comment '??p??'
|
|
| 700 |
, COMPLETEFLG tinyint(3) unsigned comment '?????t???O'
|
|
| 701 |
, ENTRYDATE datetime comment '?o?^???t'
|
|
| 702 |
, UPDATEDATE datetime comment '?X?V???t'
|
|
| 697 | 703 |
, constraint constructionmaterialinfo_PKC primary key (CONSTRUCTIONCODE,MATERIALITEMCODE) |
| 698 |
) comment '工事資材情報' ;
|
|
| 704 |
) comment '?H????????' ;
|
|
| 699 | 705 |
|
| 700 |
-- 案件進捗日付データ
|
|
| 706 |
-- ????i?????t?f?[?^
|
|
| 701 | 707 |
drop table if exists constructionprogressdate cascade; |
| 702 | 708 |
|
| 703 | 709 |
create table constructionprogressdate ( |
| 704 |
ConstructionCode decimal(10,0) not null comment '工事番号'
|
|
| 705 |
, ConstructionStatusFlg decimal(2,0) not null comment '設定工事状態'
|
|
| 706 |
, PreviousStatusFlg decimal(2,0) comment '変更前状態'
|
|
| 707 |
, ChangeDate datetime not null comment '設定日付'
|
|
| 708 |
, ChangePersonCode decimal(8,0) not null comment '設定担当者'
|
|
| 709 |
, EntryDate datetime not null comment '登録日付'
|
|
| 710 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 710 |
ConstructionCode decimal(10,0) not null comment '?H?????'
|
|
| 711 |
, ConstructionStatusFlg decimal(2,0) not null comment '???H?????'
|
|
| 712 |
, PreviousStatusFlg decimal(2,0) comment '??X?O???'
|
|
| 713 |
, ChangeDate datetime not null comment '?????t'
|
|
| 714 |
, ChangePersonCode decimal(8,0) not null comment '???S????'
|
|
| 715 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 716 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 711 | 717 |
, constraint constructionprogressdate_PKC primary key (ConstructionCode,ConstructionStatusFlg) |
| 712 |
) comment '案件進捗日付データ' ;
|
|
| 718 |
) comment '????i?????t?f?[?^' ;
|
|
| 713 | 719 |
|
| 714 |
-- 作業マスタ
|
|
| 720 |
-- ???}?X?^
|
|
| 715 | 721 |
drop table if exists constructionspecmaster cascade; |
| 716 | 722 |
|
| 717 | 723 |
create table constructionspecmaster ( |
| 718 |
ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 719 |
, SpecCode decimal(5,0) unsigned not null comment '作業キー'
|
|
| 720 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 721 |
, ItemName varchar(120) comment '作業名称'
|
|
| 722 |
, SpecName varchar(120) comment '作業名称'
|
|
| 723 |
, UnitName varchar(30) comment '単位名称'
|
|
| 724 |
, UnitPrice decimal(9,2) not null comment '単価'
|
|
| 725 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 726 |
, EntryDate datetime not null comment '登録日付'
|
|
| 727 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 724 |
ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 725 |
, SpecCode decimal(5,0) unsigned not null comment '???L?['
|
|
| 726 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 727 |
, ItemName varchar(120) comment '??????'
|
|
| 728 |
, SpecName varchar(120) comment '??????'
|
|
| 729 |
, UnitName varchar(30) comment '?P?????'
|
|
| 730 |
, UnitPrice decimal(9,2) not null comment '?P??'
|
|
| 731 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 732 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 733 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 728 | 734 |
, constraint constructionspecmaster_PKC primary key (ItemCode,SpecCode) |
| 729 |
) comment '作業マスタ' ;
|
|
| 735 |
) comment '???}?X?^' ;
|
|
| 730 | 736 |
|
| 731 | 737 |
create index ConstructionSpecMaster_Index1 |
| 732 | 738 |
on constructionspecmaster(DisplayOrder); |
| 733 | 739 |
|
| 734 |
-- 作業単価マスタ
|
|
| 740 |
-- ???P???}?X?^
|
|
| 735 | 741 |
drop table if exists constructionspecunitprice cascade; |
| 736 | 742 |
|
| 737 | 743 |
create table constructionspecunitprice ( |
| 738 |
ComponentCode decimal(5,0) unsigned not null comment '構成キー'
|
|
| 739 |
, ItemCode decimal(5,0) unsigned not null comment '工種キー'
|
|
| 740 |
, SpecCode decimal(5,0) unsigned not null comment '作業キー'
|
|
| 741 |
, ConstructionTypeCode mediumint(8) unsigned not null comment '工事種別コード'
|
|
| 742 |
, UnitPrice decimal(9,2) not null comment '単価'
|
|
| 743 |
, EntryDate datetime not null comment '登録日付'
|
|
| 744 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 744 |
ComponentCode decimal(5,0) unsigned not null comment '?\???L?['
|
|
| 745 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?['
|
|
| 746 |
, SpecCode decimal(5,0) unsigned not null comment '???L?['
|
|
| 747 |
, ConstructionTypeCode mediumint(8) unsigned not null comment '?H?????R?[?h'
|
|
| 748 |
, UnitPrice decimal(9,2) not null comment '?P??'
|
|
| 749 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 750 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 745 | 751 |
, constraint constructionspecunitprice_PKC primary key (ComponentCode,ItemCode,SpecCode,ConstructionTypeCode) |
| 746 |
) comment '作業単価マスタ' ;
|
|
| 752 |
) comment '???P???}?X?^' ;
|
|
| 747 | 753 |
|
| 748 |
-- 工事種別マスタ
|
|
| 754 |
-- ?H?????}?X?^
|
|
| 749 | 755 |
drop table if exists constructiontypemaster cascade; |
| 750 | 756 |
|
| 751 | 757 |
create table constructiontypemaster ( |
| 752 |
TypeCode decimal(5,0) unsigned not null comment '工事種別コード'
|
|
| 753 |
, DisplayOrder decimal(5,0) unsigned not null comment '表示順'
|
|
| 754 |
, NameString varchar(100) not null comment '名称'
|
|
| 755 |
, PublicFlg decimal(1,0) not null comment '工事種別フラグ'
|
|
| 756 |
, SecRank decimal(1,0) not null comment '保護区分ランク'
|
|
| 757 |
, ExpensesLink decimal(1,0) not null comment '経費使用区分'
|
|
| 758 |
, DeleteFlg decimal(1,0) not null comment '削除フラグ'
|
|
| 759 |
, EntryDate datetime not null comment '登録日付'
|
|
| 760 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 758 |
TypeCode decimal(5,0) unsigned not null comment '?H?????R?[?h'
|
|
| 759 |
, DisplayOrder decimal(5,0) unsigned not null comment '?\????'
|
|
| 760 |
, NameString varchar(100) not null comment '????'
|
|
| 761 |
, PublicFlg decimal(1,0) not null comment '?H?????t???O'
|
|
| 762 |
, SecRank decimal(1,0) not null comment '?????????N'
|
|
| 763 |
, ExpensesLink decimal(1,0) not null comment '?o??g?p??'
|
|
| 764 |
, DeleteFlg decimal(1,0) not null comment '???t???O'
|
|
| 765 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 766 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 761 | 767 |
, constraint constructiontypemaster_PKC primary key (TypeCode) |
| 762 |
) comment '工事種別マスタ' ;
|
|
| 768 |
) comment '?H?????}?X?^' ;
|
|
| 763 | 769 |
|
| 764 |
-- 担当者毎経費データ
|
|
| 770 |
-- ?S??????o??f?[?^
|
|
| 765 | 771 |
drop table if exists costdataofperson cascade; |
| 766 | 772 |
|
| 767 | 773 |
create table costdataofperson ( |
| 768 |
PersonCode decimal(8,0) unsigned not null comment '担当者コード'
|
|
| 769 |
, ActionDate date not null comment '対象日付'
|
|
| 770 |
, DataType decimal(1,0) not null comment 'データ区分'
|
|
| 771 |
, DataAddCount decimal(5,0) unsigned not null comment 'データ追加番号'
|
|
| 772 |
, TargetMonth varchar(7) not null comment '対象年月'
|
|
| 773 |
, ConstructionCode decimal(10,0) unsigned comment '工事コード'
|
|
| 774 |
, SuppliersCode decimal(5,0) unsigned not null comment '支払先コード'
|
|
| 775 |
, SuppliersName varchar(120) comment '支払先名称'
|
|
| 776 |
, PaymentContent varchar(60) comment '支払内容'
|
|
| 777 |
, PaymentType decimal(1,0) not null comment '支払方法フラグ'
|
|
| 778 |
, EntryPrice decimal(12,0) not null comment '金額(税抜)'
|
|
| 779 |
, EntryPriceInTax decimal(12,0) not null comment '金額(税込)'
|
|
| 780 |
, SlipNumber varchar(12) comment '伝票番号'
|
|
| 781 |
, ComplateFlg decimal(1,0) not null comment '引込済みフラグ'
|
|
| 782 |
, ApprovalFlg decimal(1,0) not null comment '承認フラグ'
|
|
| 783 |
, EntryDate datetime not null comment '登録日付'
|
|
| 784 |
, UpdateDate datetime not null comment '更新日付'
|
|
| 774 |
PersonCode decimal(8,0) unsigned not null comment '?S????R?[?h'
|
|
| 775 |
, ActionDate date not null comment '?????t'
|
|
| 776 |
, DataType decimal(1,0) not null comment '?f?[?^??'
|
|
| 777 |
, DataAddCount decimal(5,0) unsigned not null comment '?f?[?^??????'
|
|
| 778 |
, TargetMonth varchar(7) not null comment '???N??'
|
|
| 779 |
, ConstructionCode decimal(10,0) unsigned comment '?H???R?[?h'
|
|
| 780 |
, SuppliersCode decimal(5,0) unsigned not null comment '?x????R?[?h'
|
|
| 781 |
, SuppliersName varchar(120) comment '?x??????'
|
|
| 782 |
, PaymentContent varchar(60) comment '?x?????e'
|
|
| 783 |
, PaymentType decimal(1,0) not null comment '?x?????@?t???O'
|
|
| 784 |
, EntryPrice decimal(12,0) not null comment '???z?i????j'
|
|
| 785 |
, EntryPriceInTax decimal(12,0) not null comment '???z?i????j'
|
|
| 786 |
, SlipNumber varchar(12) comment '?`?[???'
|
|
| 787 |
, ComplateFlg decimal(1,0) not null comment '???????t???O'
|
|
| 788 |
, ApprovalFlg decimal(1,0) not null comment '???F?t???O'
|
|
| 789 |
, EntryDate datetime not null comment '?o?^???t'
|
|
| 790 |
, UpdateDate datetime not null comment '?X?V???t'
|
|
| 785 | 791 |
, constraint costdataofperson_PKC primary key (PersonCode,ActionDate,DataType,DataAddCount) |
| 786 |
) comment '担当者毎経費データ' ;
|
|
| 792 |
) comment '?S??????o??f?[?^' ;
|
|
| 787 | 793 |
|
| 788 | 794 |
create index CostDataOfPerson_Index1 |
| 789 | 795 |
on costdataofperson(TargetMonth); |
| ... | ... | |
| 791 | 797 |
create index CostDataOfPerson_Index2 |
| 792 | 798 |
on costdataofperson(ConstructionCode); |
| 793 | 799 |
|
| 794 |
-- 発注者登録申請データ
|
|
| 800 |
-- ??????o?^?\???f?[?^
|
|
| 795 | 801 |
drop table if exists costomerregist cascade; |
| 796 | 802 |
|
| 797 | 803 |
create table costomerregist ( |
| 798 |
PersonCode decimal(8,0) unsigned not null comment '申請者番号' |
|
| 799 |
, CreateDate date not null comment '作成日' |
|
| 800 |
, SeqNo decimal(2,0) not null comment 'キー連番' |
|
| 801 |
, DataMode decimal(1,0) not null comment 'データ区分' |
|
| 802 |
, SourceCotegory decimal(5,0) unsigned not null comment '発注者区分' |
|
| 803 |
, SourceCode decimal(5,0) unsigned not null comment '発注者コード' |
|
| 804 |
, PetitionPeriod decimal(4,0) unsigned not null comment '事業期' |
|
| 805 |
, OrderFlg decimal(1,0) not null comment '法人団体・個人フラグ' |
|
| 806 |
, CorporateStatusName varchar(100) comment '法人格名称' |
|
| 807 |
, CorporateStatusPoint decimal(1,0) comment '法人格名称位置' |
|
| 808 |
, OrderersName1 varchar(60) 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) comment '住所2' |
|
| 815 |
, Address3 varchar(60) comment '住所3' |
|
| 816 |
, PhoneNumber varchar(13) comment '電話番号' |
|
| 817 |
, FaxNumber varchar(13) comment 'FAX番号' |
|
| 818 |
, MailAddress varchar(257) comment 'メールアドレス' |
|
| 819 |
, Note varchar(300) comment '備考' |
|
| 820 |
, OrderCotegory decimal(5,0) unsigned not null comment '発注者区分' |
|
| 821 |
, OrderDate date not null comment '申請日' |
|
| 822 |
, OrderNo decimal(2,0) unsigned not null comment '申請受付番号' |
|
| 823 |
, EntryDate datetime not null comment '登録日付' |
|
| 824 |
, UpdateDate datetime not null comment '更新日付' |
|
| 804 |
PersonCode decimal(8,0) unsigned not null comment '?\??????' |
|
| 805 |
, CreateDate date not null comment '????' |
|
| 806 |
, SeqNo decimal(2,0) not null comment '?L?[?A??' |
|
| 807 |
, DataMode decimal(1,0) not null comment '?f?[?^??' |
|
| 808 |
, SourceCotegory decimal(5,0) unsigned not null comment '???????' |
|
| 809 |
, SourceCode decimal(5,0) unsigned not null comment '??????R?[?h' |
|
| 810 |
, PetitionPeriod decimal(4,0) unsigned not null comment '?????' |
|
| 811 |
, OrderFlg decimal(1,0) not null comment '?@?l?c??E??l?t???O' |
|
| 812 |
, CorporateStatusName varchar(100) comment '?@?l?i????' |
|
| 813 |
, CorporateStatusPoint decimal(1,0) comment '?@?l?i?????u' |
|
| 814 |
, OrderersName1 varchar(60) not null comment '???????1' |
|
| 815 |
, OrderersName2 varchar(60) comment '????????Q' |
|
| 816 |
, DepartmentName varchar(60) comment '??????' |
|
| 817 |
, ChargePersonName varchar(60) comment '?S?????' |
|
| 818 |
, ZipCode varchar(8) comment '?X????' |
|
| 819 |
, Address1 varchar(60) comment '?Z???P' |
|
| 820 |
, Address2 varchar(60) comment '?Z??2' |
|
| 821 |
, Address3 varchar(60) comment '?Z??3' |
|
| 822 |
, PhoneNumber varchar(13) comment '?d?b???' |
|
| 823 |
, FaxNumber varchar(13) comment 'FAX???' |
|
| 824 |
, MailAddress varchar(257) comment '???[???A?h???X' |
|
| 825 |
, Note varchar(300) comment '???l' |
|
| 826 |
, OrderCotegory decimal(5,0) unsigned not null comment '???????' |
|
| 827 |
, OrderDate date not null comment '?\????' |
|
他の形式にエクスポート: Unified diff