Index: ProcessManagement.sql
===================================================================
--- ProcessManagement.sql	(revision 331)
+++ ProcessManagement.sql	(revision 332)
@@ -1,5 +1,5 @@
 -- Project Name : noname
--- Date/Time    : 2018/03/01 9:40:48
+-- Date/Time    : 2018/03/28 9:13:42
 -- Author       : Horiuchi
 -- RDBMS Type   : MySQL
 -- Application  : A5:SQL Mk-2
@@ -323,6 +323,20 @@
 create index BusinessTypeMaster_Index1
   on businesstypemaster(DisplayOrder);
 
+-- ’S“–ŽÒ•”��—š—ðƒf�[ƒ^
+drop table if exists chgchargedep cascade;
+
+create table chgchargedep (
+  PersonCode decimal(8,0) not null comment '’S“–ŽÒƒR�[ƒh'
+  , StartDate date not null comment 'ŠJŽn”NŒŽ“ú'
+  , CompDate date not null comment '�I—¹”NŒŽ“ú'
+  , DepartmentCode decimal(5,0) unsigned not null comment '•”��ƒR�[ƒh'
+  , DepartmentName varchar(60) comment '•”��–¼'
+  , EntryDate datetime not null comment '“o˜^“ú•t'
+  , UpdateDate datetime not null comment '�X�V“ú•t'
+  , constraint chgchargedep_PKC primary key (PersonCode,StartDate)
+) comment '’S“–ŽÒ•”��—š—ðƒf�[ƒ^' ;
+
 -- ‹¤’Ê”ï‘å�€–Úƒ}ƒXƒ^
 drop table if exists commoncostlarge cascade;
 
@@ -432,6 +446,22 @@
 create index ComponentToTypeMaster_Index2
   on componenttotypemaster(TypeCode);
 
+-- �HŽ–’S“–—š—ðƒf�[ƒ^
+drop table if exists constrchgcharge cascade;
+
+create table constrchgcharge (
+  ConstructionCode decimal(10,0) unsigned not null comment '�HŽ–ƒR�[ƒh'
+  , Division decimal(1,0) not null comment '�Ý’è‹æ•ª'
+  , SeqNo smallint(5) unsigned not null comment '˜A”Ô'
+  , DepartmentCode decimal(5,0) unsigned not null comment '•”��ƒR�[ƒh'
+  , PersonCode decimal(8,0) not null comment '’S“–ŽÒƒR�[ƒh'
+  , StartDate date comment '’S“–ŠJŽn”NŒŽ“ú'
+  , CompDate date comment '’S“–�I—¹”NŒŽ“ú'
+  , EntryDate datetime not null comment '“o˜^“ú•t'
+  , UpdateDate datetime not null comment '�X�V“ú•t'
+  , constraint constrchgcharge_PKC primary key (ConstructionCode,Division,SeqNo)
+) comment '�HŽ–’S“–—š—ðƒf�[ƒ^' ;
+
 -- �HŽ–Šî–{�î•ñ
 drop table if exists constructionbaseinfo cascade;
 
@@ -454,13 +484,17 @@
   , NonOrderDate date comment '”ñŽó’�“ú'
   , OrdersDecisionPrice decimal(12,0) not null comment '�Å”²Žó’�Œˆ’è‹àŠz'
   , OrdersDecisionPriceInTax decimal(12,0) not null comment '�Å�žŽó’�Œˆ’è‹àŠz'
-  , SalesPersonCode decimal(8,0) comment '‰c‹Æ’S“–ŽÒ–¼'
-  , ConstructionPersonCode decimal(8,0) not null comment '�HŽ–’S“–ŽÒ'
-  , ConstrSubPersonCode decimal(8,0) not null comment '�HŽ–•›’S“–ŽÒ'
-  , ConstructionInstructor decimal(8,0) not null comment '�HŽ–Žw“±ˆõ'
+  , SalesDepCode decimal(5,0) unsigned not null comment '‰c‹Æ’S“–ŽÒ•”��ƒR�[ƒh'
+  , SalesPersonCode decimal(8,0) unsigned not null comment '‰c‹Æ’S“–ŽÒƒR�[ƒh'
+  , ConstrDepCode decimal(5,0) unsigned not null comment '�HŽ–’S“–ŽÒ•”��ƒR�[ƒh'
+  , ConstructionPersonCode decimal(8,0) not null comment '�HŽ–’S“–ŽÒƒR�[ƒh'
+  , ConstrSubDepCode decimal(5,0) unsigned not null comment '�HŽ–•›’S“–ŽÒ•”��ƒR�[ƒh'
+  , ConstrSubPersonCode decimal(8,0) not null comment '�HŽ–•›’S“–ŽÒƒR�[ƒh'
+  , ConstrInstrDepCode decimal(5,0) unsigned not null comment '�HŽ–Žw“±ˆõ•”��ƒR�[ƒh'
+  , ConstructionInstructor decimal(8,0) not null comment '�HŽ–Žw“±ˆõƒR�[ƒh'
   , TransferConstruction decimal(8,0) not null comment '�HŽ–ˆÚŠÇ�æƒR�[ƒh'
   , TransferConstructionDate date comment '�HŽ–ˆÚŠÇ“ú'
-  , OrderersDivision decimal(5,0) not null comment '”­’�ŽÒ‹æ•ª'
+  , OrderersDivision decimal(5,0) not null comment '”­’�ŽÒ‹æ•ªƒR�[ƒh'
   , OrderersCode decimal(5,0) unsigned not null comment '”­’�ŽÒƒR�[ƒh'
   , EstimatesExpirationDate date comment 'Œ©�Ï—LŒøŠúŒÀ'
   , ConstructionPeriodStart date comment 'Œ_–ñ�HŠúŠJŽn“ú'
@@ -514,7 +548,7 @@
 
 create table constructionbaseinfodetail (
   ConstructionCode decimal(10,0) unsigned not null comment '�HŽ–ƒR�[ƒh'
-  , DetailNo decimal(2,0) not null comment '–¾�×”Ô�†'
+  , DetailNo decimal(3,0) not null comment '–¾�×”Ô�†'
   , DetailString varchar(300) comment '–¾�×“à—e'
   , EntryDate datetime not null comment '“o˜^“ú•t'
   , UpdateDate datetime not null comment '�X�V“ú•t'
@@ -827,7 +861,7 @@
 drop table if exists costomerregist cascade;
 
 create table costomerregist (
-  PersonCode decimal(8,0) unsigned not null comment '�\�¿ŽÒ”Ô�†'
+  CreatePersonCode decimal(8,0) unsigned not null comment '�\�¿ŽÒ”Ô�†'
   , CreateDate date not null comment '�ì�¬“ú'
   , SeqNo decimal(2,0) not null comment 'ƒL�[˜A”Ô'
   , DataMode decimal(1,0) not null comment 'ƒf�[ƒ^‹æ•ª'
@@ -840,7 +874,7 @@
   , OrderersName1 varchar(60) not null comment '”­’�ŽÒ–¼1'
   , OrderersName2 varchar(60) comment '”­’�ŽÒ–¼‚Q'
   , DepartmentName varchar(60) comment '•”��–¼'
-  , ChargePersonName varchar(60) comment '’S“–ŽÒ–¼'
+  , PersonName varchar(60) comment '’S“–ŽÒ–¼'
   , ZipCode varchar(8) comment '—X•Ö”Ô�†'
   , Address1 varchar(60) comment '�Z�Š‚P'
   , Address2 varchar(60) comment '�Z�Š2'
@@ -852,14 +886,22 @@
   , OrderCotegory decimal(5,0) unsigned not null comment '”­’�ŽÒ‹æ•ª'
   , OrderDate date not null comment '�\�¿“ú'
   , OrderNo decimal(2,0) unsigned not null comment '�\�¿Žó•t”Ô�†'
+  , CreateDepartmentCode decimal(5,0) unsigned not null comment '�\�¿•”��ƒR�[ƒh'
+  , CreateDepartmentName varchar(60) comment '�\�¿•”��–¼'
   , EntryDate datetime not null comment '“o˜^“ú•t'
   , UpdateDate datetime not null comment '�X�V“ú•t'
-  , constraint costomerregist_PKC primary key (PersonCode,CreateDate,SeqNo)
+  , constraint costomerregist_PKC primary key (CreatePersonCode,CreateDate,SeqNo)
 ) comment '”­’�ŽÒ“o˜^�\�¿ƒf�[ƒ^' ;
 
 create index CostomerRegist_Index1
   on costomerregist(PetitionPeriod);
 
+create index CostomerRegist_Index2
+  on costomerregist(CreatePersonCode);
+
+create index CostomerRegist_Index3
+  on costomerregist(CreateDepartmentCode);
+
 -- “ú•ñƒf�[ƒ^
 drop table if exists dailydataconstruction cascade;
 
