リビジョン 302
工事台帳明細データ明細番号追加
IOクラスInsert:StringBuilder化時のバグ修正
注文書作成処理不具合修正
サブフォーム表示時の本体での位置修正を削除
銀行営業日マスタ追加
branches/ddl/20171024_SQL.txt | ||
---|---|---|
1 |
-- ???????f?[?^ |
|
2 |
DROP TABLE IF EXISTS billingdata_OLD; |
|
3 |
CREATE TABLE billingdata_OLD As Select * from billingdata; |
|
4 |
|
|
5 |
drop table if exists billingdata cascade; |
|
6 |
|
|
7 |
create table billingdata ( |
|
8 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
|
9 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
|
10 |
, PAYMENTKIND decimal(1,0) default '0' not null comment '?x????' |
|
11 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
|
12 |
, BILLPRICE decimal(10,0) comment '???????z' |
|
13 |
, ENTRYDATE datetime comment '?o?^?N????' |
|
14 |
, UPDATEDATE datetime comment '?X?V?N????' |
|
15 |
, constraint billingdata_PKC primary key (COMPANYCODE,TARGETDATE,PAYMENTKIND,SEQNO) |
|
16 |
) comment '???????f?[?^' ; |
|
17 |
|
|
18 |
Insert INTO billingdata |
|
19 |
SELECT |
|
20 |
COMPANYCODE |
|
21 |
, TARGETDATE |
|
22 |
, 0 |
|
23 |
, SEQNO |
|
24 |
, BILLPRICE |
|
25 |
, ENTRYDATE |
|
26 |
, UPDATEDATE |
|
27 |
FROM billingdata_OLD |
|
28 |
; |
|
29 |
commit; |
|
30 |
|
|
31 |
|
|
32 |
-- ??????????f?[?^ |
|
33 |
DROP TABLE IF EXISTS billingdatadetail_OLD; |
|
34 |
CREATE TABLE billingdatadetail_OLD As Select * from billingdatadetail; |
|
35 |
|
|
36 |
drop table if exists billingdatadetail cascade; |
|
37 |
|
|
38 |
create table billingdatadetail ( |
|
39 |
COMPANYCODE decimal(8,0) default '0' not null comment '??????R?[?h' |
|
40 |
, TARGETDATE decimal(6,0) default '0' not null comment '???N??' |
|
41 |
, PAYMENTKIND decimal(1,0) default '0' not null comment '?x????' |
|
42 |
, SEQNO decimal(3,0) default '0' not null comment '?A??' |
|
43 |
, LINECOUNT decimal(3,0) default '0' not null comment '?s???' |
|
44 |
, CONSTRUCTIONCODE decimal(10,0) comment '?H?????' |
|
45 |
, CONSTRUCTIONROWCNT decimal(3,0) default '0' not null comment '?s???' |
|
46 |
, CONSTRUCTIONCOLCNT decimal(3,0) default '0' not null comment '????' |
|
47 |
, FIELDNAME varchar(120) comment '????' |
|
48 |
, BILLPRICE decimal(10,0) comment '???????z' |
|
49 |
, HIGHWPRICE decimal(10,0) comment '??????' |
|
50 |
, HARDWPRICE decimal(10,0) comment '??????' |
|
51 |
, INDSWASTETAX decimal(10,0) comment '?Y?p??' |
|
52 |
, NOTE varchar(120) comment '???l' |
|
53 |
, ENTRYDATE datetime comment '?o?^?N????' |
|
54 |
, UPDATEDATE datetime comment '?X?V?N????' |
|
55 |
, constraint billingdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,PAYMENTKIND,SEQNO,LINECOUNT) |
|
56 |
) comment '??????????f?[?^' ; |
|
57 |
|
|
58 |
Insert INTO billingdatadetail |
|
59 |
SELECT |
|
60 |
COMPANYCODE |
|
61 |
, TARGETDATE |
|
62 |
, 0 |
|
63 |
, SEQNO |
|
64 |
, LINECOUNT |
|
65 |
, CONSTRUCTIONCODE |
|
66 |
, CONSTRUCTIONROWCNT |
|
67 |
, CONSTRUCTIONCOLCNT |
|
68 |
, FIELDNAME |
|
69 |
, BILLPRICE |
|
70 |
, HIGHWPRICE |
|
71 |
, HARDWPRICE |
|
72 |
, INDSWASTETAX |
|
73 |
, NOTE |
|
74 |
, ENTRYDATE |
|
75 |
, UPDATEDATE |
|
76 |
FROM billingdatadetail_OLD |
|
77 |
; |
|
78 |
commit; |
|
79 |
|
branches/ddl/20171130_SQL.txt | ||
---|---|---|
1 |
-- ?H??????????f?[?^ |
|
2 |
drop table if exists PeriodAvoidance cascade; |
|
3 |
|
|
4 |
create table PeriodAvoidance ( |
|
5 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
6 |
, ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O' |
|
7 |
, FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???' |
|
8 |
, EntryDate datetime not null comment '?o?^???t' |
|
9 |
, UpdateDate datetime not null comment '?X?V???t' |
|
10 |
, constraint PeriodAvoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo) |
|
11 |
) comment '?H??????????f?[?^' ; |
|
12 |
|
|
13 |
create index PeriodAvoidance_Index1 |
|
14 |
on PeriodAvoidance(ConstructionCode); |
|
15 |
|
|
16 |
create index PeriodAvoidance_Index2 |
|
17 |
on PeriodAvoidance(ConstructionStatusFlg); |
|
18 |
|
|
19 |
create index PeriodAvoidance_Index3 |
|
20 |
on PeriodAvoidance(FieldNo); |
|
21 |
|
branches/ddl/20171207_SQL.txt | ||
---|---|---|
1 |
-- ??????????f?[?^ |
|
2 |
DROP TABLE IF EXISTS purchaseorderdetail_OLD; |
|
3 |
CREATE TABLE purchaseorderdetail_OLD As Select * from purchaseorderdetail; |
|
4 |
|
|
5 |
drop table if exists purchaseorderdetail cascade; |
|
6 |
|
|
7 |
create table purchaseorderdetail ( |
|
8 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
9 |
, SeqNo decimal(3,0) unsigned not null comment '???????}??' |
|
10 |
, GroupCount decimal(1,0) not null comment '?O???[?v???' |
|
11 |
, LineCount decimal(3,0) unsigned not null comment '?s???' |
|
12 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
|
13 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
|
14 |
, FirstString varchar(120) comment '?H??E?i??' |
|
15 |
, SecondString varchar(120) comment '???e????' |
|
16 |
, UnitCount decimal(8,2) not null comment '????' |
|
17 |
, UnitName varchar(30) comment '?P??' |
|
18 |
, UnitPrice decimal(10,0) not null comment '?P??' |
|
19 |
, OrdersLinePrice decimal(12,0) comment '???z' |
|
20 |
, SourceCode decimal(10,0) unsigned not null comment '?\?Z?????H?????' |
|
21 |
, SourceLineCnt decimal(3,0) unsigned not null comment '?????????????s???' |
|
22 |
, DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O' |
|
23 |
, EntryDate datetime not null comment '?o?^???t' |
|
24 |
, UpdateDate datetime not null comment '?X?V???t' |
|
25 |
, constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount) |
|
26 |
) comment '??????????f?[?^' ; |
|
27 |
|
|
28 |
create index POrderDetail_Index1 |
|
29 |
on purchaseorderdetail(SourceCode); |
|
30 |
|
|
31 |
Insert INTO purchaseorderdetail |
|
32 |
SELECT |
|
33 |
ConstructionCode |
|
34 |
, SeqNo |
|
35 |
, GroupCount |
|
36 |
, LineCount |
|
37 |
, ComponentCode |
|
38 |
, ItemCode |
|
39 |
, FirstString |
|
40 |
, SecondString |
|
41 |
, UnitCount |
|
42 |
, UnitName |
|
43 |
, UnitPrice |
|
44 |
, OrdersLinePrice |
|
45 |
, SourceCode |
|
46 |
, SourceLineCnt |
|
47 |
, 0 |
|
48 |
, EntryDate |
|
49 |
, UpdateDate |
|
50 |
FROM purchaseorderdetail_OLD |
|
51 |
; |
|
52 |
update purchaseorderdetail set DataTypeFlag = 1 where FirstString like '%?@??%'; |
|
53 |
|
|
54 |
commit; |
branches/ddl/20171211_SQL.txt | ||
---|---|---|
1 |
-- ?H??????????f?[?^ |
|
2 |
DROP TABLE IF EXISTS constructionledgerdetail_OLD; |
|
3 |
CREATE TABLE constructionledgerdetail_OLD As Select * from constructionledgerdetail; |
|
4 |
|
|
5 |
drop table if exists constructionledgerdetail cascade; |
|
6 |
|
|
7 |
create table constructionledgerdetail ( |
|
8 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
9 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
|
10 |
, LineCount decimal(4,0) unsigned not null comment '?s???' |
|
11 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
|
12 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
|
13 |
, FirstString varchar(120) comment '???????' |
|
14 |
, SecondString varchar(120) comment '?H?????e' |
|
15 |
, CompanyType decimal(1,0) not null comment '??????R?[?h?^?C?v' |
|
16 |
, CompanyCode decimal(8,0) not null comment '??????R?[?h' |
|
17 |
, CompanyName varchar(120) comment '?????????' |
|
18 |
, EstimatePrice decimal(12,0) not null comment '?\?Z?i????j???z' |
|
19 |
, ExecutionAmount decimal(12,0) not null comment '???s???z' |
|
20 |
, AmountConfigRate decimal(5,2) not null comment '???z?\????' |
|
21 |
, PaymentBurden decimal(12,0) not null comment '?x????U?z' |
|
22 |
, FixDataFlg decimal(1,0) not null comment '???f?[?^?t???O' |
|
23 |
, IndependentFlg decimal(1,0) not null comment '????f?[?^?t???O' |
|
24 |
, FluctuationFlg decimal(1,0) not null comment '?????f?[?^?t???O' |
|
25 |
, SalaryFlg decimal(1,0) not null comment '???^?U????' |
|
26 |
, SalaryDays decimal(4,0) not null comment '???^?U??????' |
|
27 |
, OperatingFlg decimal(1,0) not null comment '?S?????t???O' |
|
28 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????' |
|
29 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??' |
|
30 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^' |
|
31 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O' |
|
32 |
, DetailCount decimal(4,0) unsigned not null comment '??????' |
|
33 |
, EntryDate datetime not null comment '?o?^???t' |
|
34 |
, UpdateDate datetime not null comment '?X?V???t' |
|
35 |
, constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
|
36 |
) comment '?H??????????f?[?^' ; |
|
37 |
|
|
38 |
create index LedgerDetail_Index01 |
|
39 |
on constructionledgerdetail(ConstructionCode); |
|
40 |
|
|
41 |
create index LedgerDetail_Index02 |
|
42 |
on constructionledgerdetail(GroupCount); |
|
43 |
|
|
44 |
create index LedgerDetail_Index03 |
|
45 |
on constructionledgerdetail(LineCount); |
|
46 |
|
|
47 |
create index LedgerDetail_Index04 |
|
48 |
on constructionledgerdetail(SourceCode); |
|
49 |
|
|
50 |
create index LedgerDetail_Index05 |
|
51 |
on constructionledgerdetail(DetailCount); |
|
52 |
|
|
53 |
Insert INTO constructionledgerdetail |
|
54 |
SELECT |
|
55 |
ConstructionCode |
|
56 |
, GroupCount |
|
57 |
, LineCount |
|
58 |
, ComponentCode |
|
59 |
, ItemCode |
|
60 |
, FirstString |
|
61 |
, SecondString |
|
62 |
, CompanyType |
|
63 |
, CompanyCode |
|
64 |
, CompanyName |
|
65 |
, EstimatePrice |
|
66 |
, ExecutionAmount |
|
67 |
, AmountConfigRate |
|
68 |
, PaymentBurden |
|
69 |
, FixDataFlg |
|
70 |
, IndependentFlg |
|
71 |
, FluctuationFlg |
|
72 |
, SalaryFlg |
|
73 |
, SalaryDays |
|
74 |
, OperatingFlg |
|
75 |
, SourceCode |
|
76 |
, JoinTitleFlg |
|
77 |
, SalaryOnRegist |
|
78 |
, PurchaseOrderFlg |
|
79 |
, 0 |
|
80 |
, EntryDate |
|
81 |
, UpdateDate |
|
82 |
FROM constructionledgerdetail_OLD |
|
83 |
; |
|
84 |
|
|
85 |
ALTER TABLE purchaseorderdetail |
|
86 |
CHANGE SourceCode SourceCode decimal(10,0) unsigned not null |
|
87 |
COMMENT '???H?????'; |
|
88 |
ALTER TABLE purchaseorderdetail |
|
89 |
CHANGE SourceLineCnt SourceDetailCnt decimal(4,0) unsigned not null |
|
90 |
COMMENT '????????'; |
|
91 |
|
|
92 |
ALTER TABLE constructionledgerexcute |
|
93 |
CHANGE LineCount LineCount decimal(4,0) unsigned not null |
|
94 |
comment '?s???'; |
|
95 |
|
|
96 |
Truncate table paymentapprovalinfo; |
|
97 |
Truncate table paymentdatadetail; |
|
98 |
Truncate table billingdata; |
|
99 |
Truncate table billingdatadetail; |
|
100 |
Truncate table billingpaymentsummary; |
|
101 |
commit; |
|
102 |
|
branches/ddl/ProcessManagement.sql | ||
---|---|---|
1 | 1 |
-- Project Name : noname |
2 |
-- Date/Time : 2017/10/05 15:29:38
|
|
2 |
-- Date/Time : 2017/12/12 10:48:17
|
|
3 | 3 |
-- Author : Horiuchi |
4 | 4 |
-- RDBMS Type : MySQL |
5 | 5 |
-- Application : A5:SQL Mk-2 |
... | ... | |
615 | 615 |
create table constructionledgerdetail ( |
616 | 616 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
617 | 617 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
618 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
618 |
, LineCount decimal(4,0) unsigned not null comment '?s???'
|
|
619 | 619 |
, ComponentCode decimal(5,0) unsigned not null comment '?\???L?[' |
620 | 620 |
, ItemCode decimal(5,0) unsigned not null comment '?H??L?[' |
621 | 621 |
, FirstString varchar(120) comment '???????' |
... | ... | |
637 | 637 |
, JoinTitleFlg decimal(1,0) not null comment '?H??????^?C?g??' |
638 | 638 |
, SalaryOnRegist decimal(12,0) not null comment '?o?^?????z???^' |
639 | 639 |
, PurchaseOrderFlg decimal(2,0) not null comment '?????????s?t???O' |
640 |
, DetailCount decimal(4,0) unsigned not null comment '??????' |
|
640 | 641 |
, EntryDate datetime not null comment '?o?^???t' |
641 | 642 |
, UpdateDate datetime not null comment '?X?V???t' |
642 | 643 |
, constraint constructionledgerdetail_PKC primary key (ConstructionCode,GroupCount,LineCount) |
... | ... | |
649 | 650 |
on constructionledgerdetail(GroupCount); |
650 | 651 |
|
651 | 652 |
create index LedgerDetail_Index03 |
653 |
on constructionledgerdetail(LineCount); |
|
654 |
|
|
655 |
create index LedgerDetail_Index04 |
|
652 | 656 |
on constructionledgerdetail(SourceCode); |
653 | 657 |
|
658 |
create index LedgerDetail_Index05 |
|
659 |
on constructionledgerdetail(DetailCount); |
|
660 |
|
|
654 | 661 |
-- ?H?????????s?f?[?^ |
655 | 662 |
drop table if exists constructionledgerexcute cascade; |
656 | 663 |
|
657 | 664 |
create table constructionledgerexcute ( |
658 | 665 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
659 | 666 |
, GroupCount decimal(2,0) unsigned not null comment '?O???[?v???' |
660 |
, LineCount decimal(3,0) unsigned not null comment '?s???'
|
|
667 |
, LineCount decimal(4,0) unsigned not null comment '?s???'
|
|
661 | 668 |
, ColumnCount decimal(3,0) not null comment '????' |
662 | 669 |
, PaymentAmount decimal(12,0) not null comment '?x?????z' |
663 | 670 |
, TargetMonth date not null comment '???N??' |
... | ... | |
1502 | 1509 |
, constraint paymentdatadetail_PKC primary key (COMPANYCODE,TARGETDATE,SEQNO,LINECOUNT) |
1503 | 1510 |
) comment '?x??????f?[?^' ; |
1504 | 1511 |
|
1512 |
-- ?H??????????f?[?^ |
|
1513 |
drop table if exists periodavoidance cascade; |
|
1514 |
|
|
1515 |
create table periodavoidance ( |
|
1516 |
ConstructionCode decimal(10,0) unsigned not null comment '?H???R?[?h' |
|
1517 |
, ConstructionStatusFlg decimal(2,0) not null comment '?H?????t???O' |
|
1518 |
, FieldNo decimal(2,0) not null comment '?`?F?b?N???t?B?[???h???' |
|
1519 |
, EntryDate datetime not null comment '?o?^???t' |
|
1520 |
, UpdateDate datetime not null comment '?X?V???t' |
|
1521 |
, constraint periodavoidance_PKC primary key (ConstructionCode,ConstructionStatusFlg,FieldNo) |
|
1522 |
) comment '?H??????????f?[?^' ; |
|
1523 |
|
|
1524 |
create index PeriodAvoidance_Index1 |
|
1525 |
on periodavoidance(ConstructionCode); |
|
1526 |
|
|
1527 |
create index PeriodAvoidance_Index2 |
|
1528 |
on periodavoidance(ConstructionStatusFlg); |
|
1529 |
|
|
1530 |
create index PeriodAvoidance_Index3 |
|
1531 |
on periodavoidance(FieldNo); |
|
1532 |
|
|
1505 | 1533 |
-- ?S??????F?f?[?^ |
1506 | 1534 |
drop table if exists personapproval cascade; |
1507 | 1535 |
|
... | ... | |
1662 | 1690 |
, constraint proceedingsdataattend_PKC primary key (ConstructionCode,ProceedingsDataDate,StartMeetingTime,SeqNo) |
1663 | 1691 |
) comment '?????????????c???^?f?[?^?i?o???j' ; |
1664 | 1692 |
|
1665 |
-- ?????????????c???^?f?[?^?i?o???j |
|
1666 |
drop table if exists proceedingsdataattendee cascade; |
|
1667 |
|
|
1668 |
create table proceedingsdataattendee ( |
|
1669 |
PersonCode decimal(8,0) not null comment '????R?[?h' |
|
1670 |
, ProceedingsDataDate date not null comment '?c???^????' |
|
1671 |
, ConstructionCode int(11) not null comment '?H?????' |
|
1672 |
, SeqNo smallint(6) not null comment '?f?[?^?s???' |
|
1673 |
, Department varchar(100) comment '?o??????' |
|
1674 |
, AttendeeName varchar(100) comment '?o??????' |
|
1675 |
, EntryDate datetime not null comment '?o?^?N????' |
|
1676 |
, UpdateDate datetime not null comment '?X?V?N????' |
|
1677 |
, constraint proceedingsdataattendee_PKC primary key (PersonCode,ProceedingsDataDate,ConstructionCode,SeqNo) |
|
1678 |
) comment '?????????????c???^?f?[?^?i?o???j' ; |
|
1679 |
|
|
1680 | 1693 |
-- ?????????????c???^?f?[?^?i????j |
1681 | 1694 |
drop table if exists proceedingsdatadetail cascade; |
1682 | 1695 |
|
... | ... | |
1825 | 1838 |
, UnitName varchar(30) comment '?P??' |
1826 | 1839 |
, UnitPrice decimal(10,0) not null comment '?P??' |
1827 | 1840 |
, OrdersLinePrice decimal(12,0) comment '???z' |
1828 |
, SourceCode decimal(10,0) unsigned not null comment '?\?Z?????H?????' |
|
1829 |
, SourceLineCnt decimal(3,0) unsigned not null comment '?????????????s???' |
|
1841 |
, SourceCode decimal(10,0) unsigned not null comment '???H?????' |
|
1842 |
, SourceDetailCnt decimal(4,0) unsigned not null comment '????????' |
|
1843 |
, DataTypeFlag decimal(1,0) unsigned not null comment '?f?[?^?^?C?v?t???O' |
|
1830 | 1844 |
, EntryDate datetime not null comment '?o?^???t' |
1831 | 1845 |
, UpdateDate datetime not null comment '?X?V???t' |
1832 | 1846 |
, constraint purchaseorderdetail_PKC primary key (ConstructionCode,SeqNo,GroupCount,LineCount) |
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 114;
|
|
17 |
public static int s_SystemVersion = 116;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs | ||
---|---|---|
92 | 92 |
|
93 | 93 |
for (int i = (int)CostDataOfPerson.DataNoDef.Transport; i <= (int)CostDataOfPerson.DataNoDef.DisposalCost; i++) |
94 | 94 |
{ |
95 |
string strSQL = "SELECT CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON"; |
|
96 |
strSQL += String.Format(" WHERE DATE_FORMAT(ACTIONDATE,'%Y/%m') = '{0}'", TargetMonth); |
|
97 |
strSQL += String.Format(" AND DATATYPE = {0}", i); |
|
98 |
strSQL += " AND CONSTRUCTIONCODE IN (SELECT A1.CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO A1"; |
|
99 |
strSQL += string.Format(" WHERE (A1.SALESPERSONCODE = {0} OR A1.CONSTRUCTIONPERSONCODE = {0} OR A1.CONSTRSUBPERSONCODE = {0} OR A1.CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode); |
|
100 |
strSQL += " GROUP BY CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m')"; |
|
101 |
strSQL += " ORDER BY CONSTRUCTIONCODE, DATATYPE"; |
|
95 |
StringBuilder strSQL = new StringBuilder(); |
|
96 |
strSQL.Append("SELECT CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m'), SUM(ENTRYPRICE) FROM COSTDATAOFPERSON"); |
|
97 |
strSQL.AppendFormat(" WHERE DATE_FORMAT(ACTIONDATE,'%Y/%m') = '{0}'", TargetMonth); |
|
98 |
strSQL.AppendFormat(" AND DATATYPE = {0}", i); |
|
99 |
strSQL.Append(" AND CONSTRUCTIONCODE IN (SELECT A1.CONSTRUCTIONCODE FROM CONSTRUCTIONBASEINFO A1"); |
|
100 |
strSQL.AppendFormat(" WHERE (A1.SALESPERSONCODE = {0} OR A1.CONSTRUCTIONPERSONCODE = {0} OR A1.CONSTRSUBPERSONCODE = {0} OR A1.CONSTRUCTIONINSTRUCTOR = {0}))", PersonCode); |
|
101 |
strSQL.Append(" GROUP BY CONSTRUCTIONCODE, DATATYPE, DATE_FORMAT(ACTIONDATE,'%Y/%m')"); |
|
102 |
strSQL.Append(" ORDER BY CONSTRUCTIONCODE, DATATYPE"); |
|
102 | 103 |
ArrayList arList = new ArrayList(); |
103 |
if (!CostDB.ExecuteReader(strSQL, ref arList, false)) continue; |
|
104 |
if (!CostDB.ExecuteReader(strSQL.ToString(), ref arList, false)) continue;
|
|
104 | 105 |
if (arList.Count == 0) continue; |
105 | 106 |
|
106 | 107 |
foreach (object[] wrkrec in arList) |
... | ... | |
996 | 997 |
/// </summary> |
997 | 998 |
/// <param name="EntryList"></param> |
998 | 999 |
/// <returns></returns> |
999 |
public static bool EntryExecuteData(List<ConstructionLedgerExcute> EntryList) |
|
1000 |
public static bool EntryExecuteData(IOConstructionLedgerDetail DetailDB |
|
1001 |
, IOConstructionLedgerExcute ExecDB |
|
1002 |
, ArrayList EntryList) |
|
1000 | 1003 |
{ |
1001 |
IOConstructionLedgerExcute ExecDB = new IOConstructionLedgerExcute(); |
|
1002 | 1004 |
try |
1003 | 1005 |
{ |
1004 |
ExecDB.connect(); ExecDB.beginTran(); |
|
1005 |
|
|
1006 | 1006 |
StringBuilder strSQL = new StringBuilder(); |
1007 | 1007 |
bool bExists = true; |
1008 | 1008 |
bool bRet = true; |
1009 | 1009 |
List<int> ConstrCodeList = new List<int>(); |
1010 |
List<ConstructionLedgerExcute> ExecList = new List<ConstructionLedgerExcute>(); |
|
1011 |
int nLineCount = 0; |
|
1010 |
ArrayList ExecList = new ArrayList(); |
|
1012 | 1011 |
|
1013 |
foreach (ConstructionLedgerExcute CurRec in EntryList)
|
|
1012 |
foreach (object[] CurData in EntryList)
|
|
1014 | 1013 |
{ |
1015 |
strSQL.Clear(); |
|
1016 | 1014 |
|
1015 |
ConstructionLedgerDetail DetailRec = (ConstructionLedgerDetail)CurData[0]; |
|
1016 |
ConstructionLedgerExcute ExcuteRec = (ConstructionLedgerExcute)CurData[1]; |
|
1017 |
|
|
1017 | 1018 |
// 工事番号が0の場合は処理しない |
1018 |
if (CurRec.ConstructionCode == 0) continue;
|
|
1019 |
if (ExcuteRec.ConstructionCode == 0) continue;
|
|
1019 | 1020 |
// グループ番号が0の場合は処理しない |
1020 |
if (CurRec.GroupCount == 0) continue; |
|
1021 |
// 行・列番号が0の場合は処理しない |
|
1022 |
if (CurRec.LineCount == 0 && CurRec.ColumnCount == 0) continue; |
|
1021 |
if (ExcuteRec.GroupCount == 0) continue; |
|
1023 | 1022 |
|
1024 |
// キー作成 |
|
1025 |
strSQL.AppendFormat(ExecDB.CreatePrimarykeyString(CurRec.ConstructionCode, |
|
1026 |
CurRec.GroupCount, |
|
1027 |
CurRec.LineCount, |
|
1028 |
CurRec.ColumnCount)); |
|
1023 |
// SQL作成 |
|
1024 |
strSQL.Clear(); |
|
1025 |
strSQL.Append("Select"); |
|
1026 |
strSQL.Append(" A.ConstructionCode"); |
|
1027 |
strSQL.Append(", A.GroupCount"); |
|
1028 |
strSQL.Append(", A.LineCount"); |
|
1029 |
strSQL.Append(", B.ColumnCount"); |
|
1030 |
strSQL.Append(", B.TargetMonth"); |
|
1031 |
strSQL.Append(" From"); |
|
1032 |
strSQL.Append(" constructionledgerdetail AS A"); |
|
1033 |
strSQL.Append(" Left Join constructionledgerexcute AS B"); |
|
1034 |
strSQL.Append(" On B.ConstructionCode = A.ConstructionCode"); |
|
1035 |
strSQL.Append(" And B.GroupCount = A.GroupCount"); |
|
1036 |
strSQL.Append(" And B.LineCount = A.LineCount"); |
|
1037 |
strSQL.AppendFormat(" And B.ColumnCount = {0}", ExcuteRec.ColumnCount); |
|
1038 |
|
|
1039 |
strSQL.AppendFormat(" Where A.ConstructionCode = {0}", ExcuteRec.ConstructionCode); |
|
1040 |
strSQL.AppendFormat(" And A.GroupCount = {0}", ExcuteRec.GroupCount); |
|
1041 |
strSQL.AppendFormat(" And A.DetailCount = {0}", DetailRec.DetailCount); |
|
1042 |
|
|
1029 | 1043 |
ExecList.Clear(); |
1030 |
if (!ExecDB.SelectAction(strSQL.ToString(), ref ExecList, false)) continue; |
|
1044 |
if (!ExecDB.ExecuteReader(strSQL.ToString(), ref ExecList, false)) continue; |
|
1045 |
if (ExcuteRec.ConstructionCode == 2017028801) { Debug.WriteLine(""); } |
|
1046 |
bExists = false; |
|
1047 |
object[] objRec = (object[])ExecList[0]; |
|
1048 |
// 明細データが存在する場合 |
|
1031 | 1049 |
if (ExecList.Count > 0) |
1032 |
bExists = true; |
|
1033 |
else |
|
1034 |
bExists = false; |
|
1050 |
{ |
|
1051 |
// 行番号をセットする |
|
1052 |
ExcuteRec.LineCount = CommonMotions.cnvInt(objRec[2]); |
|
1053 |
// 実行データも存在する場合 |
|
1054 |
if (CommonMotions.cnvInt(objRec[3]) != 0) |
|
1055 |
{ |
|
1056 |
bExists = true; |
|
1057 |
} |
|
1058 |
} |
|
1035 | 1059 |
|
1060 |
|
|
1036 | 1061 |
if (bExists) |
1037 | 1062 |
{ // データ存在時は支払金額更新 |
1038 |
if(!ExecDB.UpdateFeild(CurRec.ConstructionCode,
|
|
1039 |
CurRec.GroupCount,
|
|
1040 |
CurRec.LineCount,
|
|
1041 |
CurRec.ColumnCount,
|
|
1063 |
if (!ExecDB.UpdateFeild(ExcuteRec.ConstructionCode,
|
|
1064 |
ExcuteRec.GroupCount,
|
|
1065 |
ExcuteRec.LineCount,
|
|
1066 |
ExcuteRec.ColumnCount,
|
|
1042 | 1067 |
(int)IOConstructionLedgerExcute.TableColumn.PaymentAmount, |
1043 |
CurRec.PaymentAmount,
|
|
1068 |
ExcuteRec.PaymentAmount,
|
|
1044 | 1069 |
false)) |
1045 | 1070 |
{ |
1046 | 1071 |
bRet = false; |
... | ... | |
1049 | 1074 |
} |
1050 | 1075 |
else |
1051 | 1076 |
{ |
1052 |
// 行番号が設定されていない場合は新規に取得する |
|
1053 |
if (CurRec.LineCount == 0) |
|
1077 |
// キー項目取得条件作成 |
|
1078 |
strSQL.Clear(); |
|
1079 |
strSQL.Append(DetailDB.CreatePrimarykeyString(ExcuteRec.ConstructionCode, ExcuteRec.GroupCount)); |
|
1080 |
strSQL.AppendFormat(" And DetailCount = {0}", DetailRec.DetailCount); |
|
1081 |
|
|
1082 |
// データがない場合は新規行番号を取得する |
|
1083 |
ExcuteRec.LineCount = DetailDB.SelectMaxLineCount(strSQL.ToString(), false); |
|
1084 |
DetailRec.LineCount = ExcuteRec.LineCount; |
|
1085 |
|
|
1086 |
// 明細データも実行データも存在しない |
|
1087 |
if (ExecList.Count < 1) |
|
1054 | 1088 |
{ |
1055 |
nLineCount = 0; |
|
1056 |
if (GetNewLineNo(ExecDB, CurRec, ref nLineCount)) |
|
1089 |
// データがない場合は新規明細番号を取得する |
|
1090 |
DetailRec.DetailCount = DetailDB.SelectMaxDetailCount(strSQL.ToString(), false); |
|
1091 |
|
|
1092 |
// 明細データ新規作成 |
|
1093 |
if (!DetailDB.InsertAction(DetailRec, false)) |
|
1057 | 1094 |
{ |
1058 | 1095 |
bRet = false; |
1059 | 1096 |
break; |
1060 | 1097 |
} |
1061 |
CurRec.LineCount = nLineCount; |
|
1062 | 1098 |
} |
1063 |
// 新規作成 |
|
1064 |
if (!ExecDB.InsertAction(CurRec, false)) |
|
1099 |
|
|
1100 |
// 実行データ新規作成 |
|
1101 |
if (!ExecDB.InsertAction(ExcuteRec, false)) |
|
1065 | 1102 |
{ |
1066 | 1103 |
bRet = false; |
1067 | 1104 |
break; |
... | ... | |
1073 | 1110 |
foreach (int CurCode in ConstrCodeList) |
1074 | 1111 |
{ |
1075 | 1112 |
// 既に追加済みかを探す |
1076 |
if (CurCode == CurRec.ConstructionCode)
|
|
1113 |
if (CurCode == ExcuteRec.ConstructionCode)
|
|
1077 | 1114 |
{ |
1078 | 1115 |
bAddFlg = false; |
1079 | 1116 |
break; |
... | ... | |
1081 | 1118 |
} |
1082 | 1119 |
if (bAddFlg) |
1083 | 1120 |
{ // 更新対象リストへ追加 |
1084 |
ConstrCodeList.Add(CurRec.ConstructionCode);
|
|
1121 |
ConstrCodeList.Add(ExcuteRec.ConstructionCode);
|
|
1085 | 1122 |
} |
1086 | 1123 |
} |
1087 |
// ループ後エラーがあれば処理終了
|
|
1088 |
if (!bRet)
|
|
1124 |
// ループ後エラーが無ければ再計算処理
|
|
1125 |
if (bRet) |
|
1089 | 1126 |
{ |
1090 |
ExecDB.rollback(); |
|
1091 |
return bRet; |
|
1127 |
// 台帳再計算 |
|
1128 |
if (!LedgerRecalculate(ExecDB, ConstrCodeList)) |
|
1129 |
{ |
|
1130 |
bRet = false; |
|
1131 |
} |
|
1092 | 1132 |
} |
1093 |
|
|
1094 |
// 台帳再計算 |
|
1095 |
if (!LedgerRecalculate(ExecDB, ConstrCodeList)) |
|
1096 |
{ |
|
1097 |
bRet = false; |
|
1098 |
ExecDB.rollback(); |
|
1099 |
} |
|
1100 |
|
|
1101 | 1133 |
return bRet; |
1102 | 1134 |
} |
1103 | 1135 |
catch (System.Exception ex) |
1104 | 1136 |
{ |
1105 | 1137 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
1106 |
ExecDB.rollback(); |
|
1107 | 1138 |
return false; |
1108 | 1139 |
} |
1109 |
finally |
|
1110 |
{ |
|
1111 |
ExecDB.commit(); |
|
1112 |
ExecDB.close(); ExecDB = null; |
|
1113 |
} |
|
1114 | 1140 |
} |
1115 | 1141 |
#endregion |
1116 |
|
|
1117 |
#region 工事台帳より新規の行番号を取得する |
|
1118 |
/// <summary> |
|
1119 |
/// 工事台帳より新規の行番号を取得する |
|
1120 |
/// </summary> |
|
1121 |
private static bool GetNewLineNo(IOConstructionLedgerExcute ExecDB, ConstructionLedgerExcute CurRec, ref int nLineCount) |
|
1122 |
{ |
|
1123 |
try |
|
1124 |
{ |
|
1125 |
StringBuilder strSQL = new StringBuilder(); |
|
1126 |
ArrayList CountData = new ArrayList(); |
|
1127 |
|
|
1128 |
// 行番号が0の場合は施工費の最大行番号で新規データ作成 |
|
1129 |
strSQL.Clear(); |
|
1130 |
strSQL.Append("SELECT MAX(LINECOUNT) FROM CONSTRUCTIONLEDGERDETAIL"); |
|
1131 |
strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", CurRec.ConstructionCode); |
|
1132 |
strSQL.AppendFormat(" AND GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.ConstructionCosts); |
|
1133 |
strSQL.AppendFormat(" AND FLUCTUATIONFLG = {0}", (int)ConstructionLedgerDetail.FlucFlgDef.Normal); |
|
1134 |
|
|
1135 |
CountData.Clear(); |
|
1136 |
if (!ExecDB.ExecuteReader(strSQL.ToString(), ref CountData, false)) return false; |
|
1137 |
|
|
1138 |
object[] objRec = (object[])CountData[0]; |
|
1139 |
nLineCount = CommonMotions.cnvInt(objRec[0]) + 1; |
|
1140 |
|
|
1141 |
// ----- 取得行以下を1行下げる |
|
1142 |
// 工事詳細台帳明細データ |
|
1143 |
strSQL.Clear(); |
|
1144 |
strSQL.Append("UPDATE CONSTRUCTIONLEDGERDETAIL SET LineCount = (LineCount + 1)"); |
|
1145 |
strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", CurRec.ConstructionCode); |
|
1146 |
strSQL.AppendFormat(" AND LineCount >= {0}", nLineCount); |
|
1147 |
if (!ExecDB.ExecuteNonQuery(strSQL.ToString(), false)) return false; |
|
1148 |
|
|
1149 |
// 工事詳細台帳実行データ |
|
1150 |
strSQL.Clear(); |
|
1151 |
strSQL.Append("UPDATE CONSTRUCTIONLEDGEREXCUTE SET LineCount = (LineCount + 1)"); |
|
1152 |
strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", CurRec.ConstructionCode); |
|
1153 |
strSQL.AppendFormat(" AND LineCount >= {0}", nLineCount); |
|
1154 |
if (!ExecDB.ExecuteNonQuery(strSQL.ToString(), false)) return false; |
|
1155 |
|
|
1156 |
return true; |
|
1157 |
} |
|
1158 |
catch (System.Exception ex) |
|
1159 |
{ |
|
1160 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
1161 |
return false; |
|
1162 |
} |
|
1163 |
} |
|
1164 |
#endregion |
|
1165 | 1142 |
// ↑↑ ** ----- インターフェース ----- ** |
1166 | 1143 |
} |
1167 | 1144 |
} |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
---|---|---|
127 | 127 |
MaterialKind = 127, // 127:資材種類マスタ |
128 | 128 |
MaterialItem = 128, // 128:資材品目マスタ |
129 | 129 |
SalesConfirm = 129, // 129:売上確認 |
130 |
BankBusinessDay = 130, // 130:銀行営業日マスタ |
|
130 | 131 |
} |
131 | 132 |
#endregion |
132 | 133 |
|
... | ... | |
237 | 238 |
{ (int)MaintenanceExecuteNo.MaterialKind, "資材種類登録"}, // 127 |
238 | 239 |
{ (int)MaintenanceExecuteNo.MaterialItem, "資材品目登録"}, // 128 |
239 | 240 |
{ (int)MaintenanceExecuteNo.SalesConfirm, "売上順一覧"}, // 129 |
241 |
{ (int)MaintenanceExecuteNo.BankBusinessDay, "銀行営業日登録"}, // 130 |
|
242 |
|
|
240 | 243 |
}; |
241 | 244 |
#endregion |
242 | 245 |
|
... | ... | |
765 | 768 |
case (int)MaintenanceExecuteNo.SalesConfirm: // 129:売上確認 |
766 | 769 |
MaintenanceExecuteNo_SalesConfirm(m_ProcControlPara[NowPoint]); |
767 | 770 |
break; |
771 |
case (int)MaintenanceExecuteNo.BankBusinessDay: // 130:銀行営業日 |
|
772 |
MaintenanceExecuteNo_BBD(m_ProcControlPara[NowPoint]); |
|
773 |
break; |
|
768 | 774 |
|
769 | 775 |
|
770 | 776 |
#endregion |
... | ... | |
3611 | 3617 |
} |
3612 | 3618 |
#endregion |
3613 | 3619 |
|
3620 |
#region 銀行営業日マスタ |
|
3621 |
/// <summary> |
|
3622 |
/// 銀行営業日マスタ |
|
3623 |
/// </summary> |
|
3624 |
public static void MaintenanceExecuteNo_BBD(ProcessParameter CurrentPara) |
|
3625 |
{ |
|
3626 |
// 銀行営業日マスタ |
|
3627 |
FrmBBD frm = new FrmBBD(); |
|
3628 |
try |
|
3629 |
{ |
|
3630 |
// 起動・編集フラグ |
|
3631 |
int ProcessNo = (int)MaintenanceExecuteNo.BankBusinessDay; |
|
3632 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
3633 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
3634 |
{ |
|
3635 |
BackProcess(); |
|
3636 |
return; |
|
3637 |
} |
|
3638 |
if (EditFlg == (int)CommonDefine.ProcessDataEdit.Reference) frm.EditLock = true; |
|
3639 |
|
|
3640 |
frm.ShowDialog(); |
|
3641 |
} |
|
3642 |
catch (Exception ex) |
|
3643 |
{ |
|
3644 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3645 |
BackProcess(); |
|
3646 |
} |
|
3647 |
finally |
|
3648 |
{ |
|
3649 |
frm.Dispose(); frm = null; |
|
3650 |
} |
|
3651 |
} |
|
3614 | 3652 |
#endregion |
3615 | 3653 |
|
3654 |
#endregion |
|
3655 |
|
|
3616 | 3656 |
#region サブフォーム |
3617 | 3657 |
#region 掲示板メッセージ入力 |
3618 | 3658 |
/// <summary> |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBankBusinessDayMaster.cs | ||
---|---|---|
116 | 116 |
|
117 | 117 |
foreach (BankBusinessDayMaster work in data) |
118 | 118 |
{ |
119 |
strcmd.Clear(); |
|
119 | 120 |
strcmd.Append("INSERT INTO BankBusinessDayMaster"); |
120 | 121 |
|
121 | 122 |
strcmd.Append(" VALUES ("); |
... | ... | |
188 | 189 |
StringBuilder strcmd = new StringBuilder(); |
189 | 190 |
try |
190 | 191 |
{ |
191 |
strcmd.Append("Update BankBusinessDayMaster Set DeleteFlg = 1"); |
|
192 |
strcmd.Append(", UpdateDate = NOW()"); |
|
192 |
strcmd.Append("Delete From BankBusinessDayMaster"); |
|
193 | 193 |
strcmd.Append(AddSQLString); |
194 | 194 |
|
195 | 195 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs | ||
---|---|---|
113 | 113 |
|
114 | 114 |
foreach (BillingData work in data) |
115 | 115 |
{ |
116 |
strcmd.Clear(); |
|
116 | 117 |
strcmd.Append("INSERT INTO BillingData"); |
117 | 118 |
|
118 | 119 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs | ||
---|---|---|
137 | 137 |
|
138 | 138 |
foreach (BillingDataDetail work in data) |
139 | 139 |
{ |
140 |
strcmd.Clear(); |
|
140 | 141 |
strcmd.Append("INSERT INTO BillingDataDetail"); |
141 | 142 |
|
142 | 143 |
strcmd.Append("("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs | ||
---|---|---|
135 | 135 |
|
136 | 136 |
foreach (BillingPaymentSummary work in data) |
137 | 137 |
{ |
138 |
strcmd.Clear(); |
|
138 | 139 |
strcmd.Append("INSERT INTO BillingPaymentSummary"); |
139 | 140 |
|
140 | 141 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerDetail.cs | ||
---|---|---|
58 | 58 |
JoinTitleFlg, // 工事名称タイトル |
59 | 59 |
SalaryOnRegist, // 登録時月額給与 |
60 | 60 |
PurchaseOrderFlg, // 注文書発行フラグ |
61 |
DetailCount, // 明細番号 |
|
61 | 62 |
|
62 | 63 |
EntryDate, |
63 | 64 |
UpdateDate, |
... | ... | |
109 | 110 |
strcmd.Append(", JoinTitleFlg"); // 工事名称タイトル |
110 | 111 |
strcmd.Append(", SalaryOnRegist"); // 登録時月額給与 |
111 | 112 |
strcmd.Append(", PurchaseOrderFlg"); // 注文書発行フラグ |
113 |
strcmd.Append(", DetailCount"); // 明細番号 |
|
112 | 114 |
|
113 | 115 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
114 | 116 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
... | ... | |
242 | 244 |
strcmd.AppendFormat(", {0}", work.JoinTitleFlg); // 工事名称タイトル |
243 | 245 |
strcmd.AppendFormat(", {0}", work.SalaryOnRegist); // 登録時月額給与 |
244 | 246 |
strcmd.AppendFormat(", {0}", work.PurchaseOrderFlg); // 注文書発行フラグ |
247 |
strcmd.AppendFormat(", {0}", work.DetailCount); // 明細番号 |
|
245 | 248 |
|
246 | 249 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
247 | 250 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
... | ... | |
314 | 317 |
strcmd.AppendFormat(", {0}", work.JoinTitleFlg); // 工事名称タイトル |
315 | 318 |
strcmd.AppendFormat(", {0}", work.SalaryOnRegist); // 登録時月額給与 |
316 | 319 |
strcmd.AppendFormat(", {0}", work.PurchaseOrderFlg); // 注文書発行フラグ |
320 |
strcmd.AppendFormat(", {0}", work.DetailCount); // 明細番号 |
|
317 | 321 |
|
318 | 322 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
319 | 323 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
... | ... | |
377 | 381 |
strcmd.AppendFormat(", JoinTitleFlg = {0}", data.JoinTitleFlg); // 工事名称タイトルフラグ |
378 | 382 |
strcmd.AppendFormat(", SalaryOnRegist = {0}", data.SalaryOnRegist); // 登録時月額給与 |
379 | 383 |
strcmd.AppendFormat(", PurchaseOrderFlg = {0}", data.PurchaseOrderFlg); // 注文書発行フラグ |
384 |
strcmd.AppendFormat(", DetailCount = {0}", data.DetailCount); // 明細番号 |
|
380 | 385 |
|
381 | 386 |
strcmd.Append(", UpdateDate = NOW()"); |
382 | 387 |
strcmd.Append(AddSQLString); |
... | ... | |
458 | 463 |
wrk.JoinTitleFlg = int.Parse(objwrk[(int)TableColumn.JoinTitleFlg].ToString()); // 工事名称タイトルフラグ |
459 | 464 |
wrk.SalaryOnRegist = CommonMotions.cnvDouble(objwrk[(int)TableColumn.SalaryOnRegist]); // 登録時月額給与 |
460 | 465 |
wrk.PurchaseOrderFlg = int.Parse(objwrk[(int)TableColumn.PurchaseOrderFlg].ToString()); // 注文書発行フラグ |
466 |
wrk.DetailCount = int.Parse(objwrk[(int)TableColumn.DetailCount].ToString()); // 明細番号 |
|
461 | 467 |
|
462 | 468 |
wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.EntryDate].ToString()); |
463 | 469 |
wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UpdateDate].ToString()); |
... | ... | |
617 | 623 |
case (int)TableColumn.PurchaseOrderFlg: // 注文書発行フラグ |
618 | 624 |
strcmd.AppendFormat(" PurchaseOrderFlg = {0}", ((int)value).ToString()); |
619 | 625 |
break; |
626 |
case (int)TableColumn.DetailCount: // 明細番号 |
|
627 |
strcmd.AppendFormat(" DetailCount = {0}", ((int)value).ToString()); |
|
628 |
break; |
|
620 | 629 |
|
621 | 630 |
default: |
622 | 631 |
break; |
... | ... | |
637 | 646 |
/// <param name="OutsourcingFlg"></param> |
638 | 647 |
/// <param name="LineCount"></param> |
639 | 648 |
/// <returns></returns> |
640 |
public string CreatePrimarykeyString(int ConstructionCode, int GroupCount = 0, int LineCount = 0) |
|
649 |
public string CreatePrimarykeyString(int ConstructionCode, int GroupCount = 0, int LineCount = 0, string strArias = "")
|
|
641 | 650 |
{ |
642 | 651 |
StringBuilder strWork = new StringBuilder(); |
643 | 652 |
try |
644 | 653 |
{ |
645 |
strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode);
|
|
654 |
strWork.AppendFormat(" Where {0}ConstructionCode = {1}", strArias, ConstructionCode);
|
|
646 | 655 |
if (GroupCount != 0) |
647 |
strWork.AppendFormat(" And GroupCount = {0}", GroupCount);
|
|
656 |
strWork.AppendFormat(" And {0}GroupCount = {1}", strArias, GroupCount);
|
|
648 | 657 |
if (LineCount != 0) |
649 |
strWork.AppendFormat(" And LineCount = {0}", LineCount);
|
|
658 |
strWork.AppendFormat(" And {0}LineCount = {1}", strArias, LineCount);
|
|
650 | 659 |
|
651 | 660 |
return strWork.ToString(); |
652 | 661 |
} |
... | ... | |
697 | 706 |
return iRet; |
698 | 707 |
} |
699 | 708 |
#endregion |
709 |
|
|
710 |
#region 明細番号の最大値を取得 |
|
711 |
/// <summary> |
|
712 |
/// 明細の最大値を取得する |
|
713 |
/// </summary> |
|
714 |
/// <param name="AddSQLString"></param> |
|
715 |
/// <param name="bConnect"></param> |
|
716 |
/// <returns></returns> |
|
717 |
public int SelectMaxDetailCount(string AddSQLString, bool bConnect = true) |
|
718 |
{ |
|
719 |
// インターフェース |
|
720 |
StringBuilder strcmd = new StringBuilder(); |
|
721 |
ArrayList arData = new ArrayList(); |
|
722 |
int iRet = 0; |
|
723 |
try |
|
724 |
{ |
|
725 |
// SQL作成 |
|
726 |
strcmd.Append("SELECT IFNULL(MAX(DetailCount), 0) FROM ConstructionLedgerDetail"); |
|
727 |
strcmd.Append(AddSQLString); |
|
728 |
|
|
729 |
// SQL実行 |
|
730 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet; |
|
731 |
|
|
732 |
// データセット |
|
733 |
foreach (object[] objwrk in arData) |
|
734 |
{ |
|
735 |
if (objwrk[0].ToString().Equals("null")) |
|
736 |
iRet = 0; |
|
737 |
else |
|
738 |
iRet = int.Parse(objwrk[0].ToString()); |
|
739 |
} |
|
740 |
|
|
741 |
} |
|
742 |
catch (Exception ex) |
|
743 |
{ |
|
744 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
745 |
} |
|
746 |
return iRet; |
|
747 |
} |
|
748 |
#endregion |
|
700 | 749 |
} |
701 | 750 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedgerExcute.cs | ||
---|---|---|
352 | 352 |
/// 1項目の更新を行う |
353 | 353 |
/// </summary> |
354 | 354 |
/// <returns></returns> |
355 |
public bool UpdateFeild(int ConstructionCode, int FeildNo, object value, bool bConnect = true)
|
|
355 |
public bool UpdateFeild(string strWhere, int FeildNo, object value, bool bConnect = true)
|
|
356 | 356 |
{ |
357 | 357 |
StringBuilder strcmd = new StringBuilder(); |
358 | 358 |
try |
... | ... | |
389 | 389 |
} |
390 | 390 |
|
391 | 391 |
strcmd.Append(", UpdateDate = NOW()"); |
392 |
strcmd.Append(CreatePrimarykeyString(ConstructionCode));
|
|
392 |
strcmd.Append(strWhere);
|
|
393 | 393 |
|
394 | 394 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
395 | 395 |
|
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionMaterialInfo.cs | ||
---|---|---|
122 | 122 |
|
123 | 123 |
foreach (ConstructionMaterialInfo work in data) |
124 | 124 |
{ |
125 |
strcmd.Clear(); |
|
125 | 126 |
strcmd.Append("INSERT INTO ConstructionMaterialInfo"); |
126 | 127 |
|
127 | 128 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODeadLineMaster.cs | ||
---|---|---|
119 | 119 |
|
120 | 120 |
foreach (DeadLineMaster work in data) |
121 | 121 |
{ |
122 |
strcmd.Clear(); |
|
122 | 123 |
strcmd.Append("INSERT INTO DeadLineMaster"); |
123 | 124 |
|
124 | 125 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCategoryName.cs | ||
---|---|---|
120 | 120 |
|
121 | 121 |
foreach (CategoryNameMaster work in data) |
122 | 122 |
{ |
123 |
strcmd.Clear(); |
|
123 | 124 |
strcmd.Append("INSERT INTO CategoryNameMaster"); |
124 | 125 |
|
125 | 126 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMExpenses.cs | ||
---|---|---|
179 | 179 |
|
180 | 180 |
foreach (ExpensesMaster work in data) |
181 | 181 |
{ |
182 |
strcmd.Clear(); |
|
182 | 183 |
strcmd.Append("INSERT INTO ExpensesMaster"); |
183 | 184 |
|
184 | 185 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialInfo.cs | ||
---|---|---|
112 | 112 |
|
113 | 113 |
foreach (MaterialInfo work in data) |
114 | 114 |
{ |
115 |
strcmd.Clear(); |
|
115 | 116 |
strcmd.Append("INSERT INTO MaterialInfo"); |
116 | 117 |
|
117 | 118 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialItem.cs | ||
---|---|---|
120 | 120 |
|
121 | 121 |
foreach (MaterialItemMaster work in data) |
122 | 122 |
{ |
123 |
strcmd.Clear(); |
|
123 | 124 |
strcmd.Append("INSERT INTO MaterialItemMaster"); |
124 | 125 |
|
125 | 126 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialRecordInfo.cs | ||
---|---|---|
123 | 123 |
|
124 | 124 |
foreach (MaterialRecordInfo work in data) |
125 | 125 |
{ |
126 |
strcmd.Clear(); |
|
126 | 127 |
strcmd.Append("INSERT INTO MaterialRecordInfo"); |
127 | 128 |
|
128 | 129 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMaterialTypes.cs | ||
---|---|---|
111 | 111 |
|
112 | 112 |
foreach (MaterialKindMaster work in data) |
113 | 113 |
{ |
114 |
strcmd.Clear(); |
|
114 | 115 |
strcmd.Append("INSERT INTO MaterialKindMaster"); |
115 | 116 |
|
116 | 117 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentApprovalInfo.cs | ||
---|---|---|
201 | 201 |
|
202 | 202 |
foreach (PaymentApprovalInfo work in data) |
203 | 203 |
{ |
204 |
strcmd.Clear(); |
|
204 | 205 |
strcmd.Append("INSERT INTO PaymentApprovalInfo"); |
205 | 206 |
|
206 | 207 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPaymentDataDetail.cs | ||
---|---|---|
143 | 143 |
|
144 | 144 |
foreach (PaymentDataDetail work in data) |
145 | 145 |
{ |
146 |
strcmd.Clear(); |
|
146 | 147 |
strcmd.Append("INSERT INTO PaymentDataDetail"); |
147 | 148 |
|
148 | 149 |
strcmd.Append(" VALUES ("); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOPurchaseOrderDetail.cs | ||
---|---|---|
46 | 46 |
UnitName, // 単位 |
47 | 47 |
UnitPrice, // 単価 |
48 | 48 |
OrdersLinePrice, // 金額 |
49 |
SourceCode, // 予算作成時工事番号
|
|
50 |
SourceLineCnt, // 注文書作成時台帳行番号
|
|
49 |
SourceCode, // 台帳工事番号
|
|
50 |
SourceDetailCnt, // 台帳明細番号
|
|
51 | 51 |
DataTypeFlag, // 明細行データタイプフラグ |
52 | 52 |
|
53 | 53 |
EntryDate, |
... | ... | |
89 | 89 |
strcmd.Append(", UnitName"); // 単位 |
90 | 90 |
strcmd.Append(", UnitPrice"); // 単価 |
91 | 91 |
strcmd.Append(", OrdersLinePrice"); // 金額 |
92 |
strcmd.Append(", SourceCode"); // 予算作成時工事番号
|
|
93 |
strcmd.Append(", SourceLineCnt"); // 注文書作成時台帳行番号
|
|
92 |
strcmd.Append(", SourceCode"); // 台帳工事番号
|
|
93 |
strcmd.Append(", SourceDetailCnt"); // 台帳明細番号
|
|
94 | 94 |
strcmd.Append(", DataTypeFlag"); // 明細行データタイプフラグ |
95 | 95 |
|
96 | 96 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
... | ... | |
217 | 217 |
strcmd.AppendFormat(",'{0}'", work.UnitName); // 単位 |
218 | 218 |
strcmd.AppendFormat(", {0}", work.UnitPrice); // 単価 |
219 | 219 |
strcmd.AppendFormat(", {0}", work.OrdersLinePrice); // 金額 |
220 |
strcmd.AppendFormat(", {0}", work.SourceCode); // 予算作成時工事番号
|
|
221 |
strcmd.AppendFormat(", {0}", work.SourceLineCnt); // 注文書作成時台帳行番号
|
|
220 |
strcmd.AppendFormat(", {0}", work.SourceCode); // 台帳工事番号
|
|
221 |
strcmd.AppendFormat(", {0}", work.SourceDetailCnt); // 台帳明細番号
|
|
222 | 222 |
strcmd.AppendFormat(", {0}", work.DataTypeFlag); // 明細行データタイプフラグ |
223 | 223 |
|
224 | 224 |
|
... | ... | |
279 | 279 |
strcmd.AppendFormat(",'{0}'", work.UnitName); // 単位 |
280 | 280 |
strcmd.AppendFormat(", {0}", work.UnitPrice); // 単価 |
281 | 281 |
strcmd.AppendFormat(", {0}", work.OrdersLinePrice); // 金額 |
282 |
strcmd.AppendFormat(", {0}", work.SourceCode); // 予算作成時工事番号
|
|
283 |
strcmd.AppendFormat(", {0}", work.SourceLineCnt); // 注文書作成時台帳行番号
|
|
282 |
strcmd.AppendFormat(", {0}", work.SourceCode); // 台帳工事番号
|
|
283 |
strcmd.AppendFormat(", {0}", work.SourceDetailCnt); // 台帳明細番号
|
|
284 | 284 |
strcmd.AppendFormat(", {0}", work.DataTypeFlag); // 明細行データタイプフラグ |
285 | 285 |
|
286 | 286 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
... | ... | |
332 | 332 |
strcmd.AppendFormat(", UnitName = '{0}'", data.UnitName); // 単位 |
333 | 333 |
strcmd.AppendFormat(", UnitPrice = {0}", data.UnitPrice); // 単価 |
334 | 334 |
strcmd.AppendFormat(", OrdersLinePrice = {0}", data.OrdersLinePrice); // 金額 |
335 |
strcmd.AppendFormat(", SourceCode = {0}", data.SourceCode); // 予算作成時工事番号
|
|
336 |
strcmd.AppendFormat(", SourceLineCnt = {0}", data.SourceLineCnt); // 注文書作成時台帳行番号
|
|
335 |
strcmd.AppendFormat(", SourceCode = {0}", data.SourceCode); // 台帳工事番号
|
|
336 |
strcmd.AppendFormat(", SourceDetailCnt = {0}", data.SourceDetailCnt); // 台帳明細番号
|
|
337 | 337 |
strcmd.AppendFormat(", DataTypeFlag = {0}", data.DataTypeFlag); // 明細行データタイプフラグ |
338 | 338 |
|
339 | 339 |
strcmd.Append(", UpdateDate = NOW()"); |
... | ... | |
383 | 383 |
/// 1項目の更新を行う |
384 | 384 |
/// </summary> |
385 | 385 |
/// <returns></returns> |
386 |
public bool UpdateFeild(int ConstructionCode, int FeildNo, object value, bool bConnect = true)
|
|
386 |
public bool UpdateFeild(string strWhere, int FeildNo, object value, bool bConnect = true)
|
|
387 | 387 |
{ |
388 | 388 |
StringBuilder strcmd = new StringBuilder(); |
389 | 389 |
try |
... | ... | |
429 | 429 |
case (int)TableColumn.OrdersLinePrice: // 金額 |
430 | 430 |
strcmd.AppendFormat(" OrdersLinePrice = {0}", ((double)value).ToString()); |
431 | 431 |
break; |
432 |
case (int)TableColumn.SourceCode: // 予算作成時工事番号
|
|
432 |
case (int)TableColumn.SourceCode: // 台帳工事番号
|
|
433 | 433 |
strcmd.AppendFormat(" SourceCode = {0}", ((int)value).ToString()); |
434 | 434 |
break; |
435 |
case (int)TableColumn.SourceLineCnt: // 注文書作成時台帳行番号
|
|
436 |
strcmd.AppendFormat(" SourceLineCnt = {0}", ((int)value).ToString());
|
|
435 |
case (int)TableColumn.SourceDetailCnt: // 台帳明細番号
|
|
436 |
strcmd.AppendFormat(" SourceDetailCnt = {0}", ((int)value).ToString());
|
|
437 | 437 |
break; |
438 | 438 |
case (int)TableColumn.DataTypeFlag: // 明細行データタイプフラグ |
439 | 439 |
strcmd.AppendFormat(" DataTypeFlag = {0}", ((int)value).ToString()); |
... | ... | |
441 | 441 |
} |
442 | 442 |
|
443 | 443 |
strcmd.Append(", UpdateDate = NOW()"); |
444 |
strcmd.Append(CreatePrimarykeyString(ConstructionCode));
|
|
444 |
strcmd.Append(strWhere);
|
|
445 | 445 |
|
446 | 446 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
447 | 447 |
|
... | ... | |
480 | 480 |
wrk.UnitName = objwrk[(int)TableColumn.UnitName].ToString(); // 単位 |
481 | 481 |
wrk.UnitPrice = CommonMotions.cnvDouble(objwrk[(int)TableColumn.UnitPrice]); // 単価 |
482 | 482 |
wrk.OrdersLinePrice = CommonMotions.cnvDouble(objwrk[(int)TableColumn.OrdersLinePrice]); // 金額 |
483 |
wrk.SourceCode = int.Parse(objwrk[(int)TableColumn.SourceCode].ToString()); // 予算作成時工事番号
|
|
484 |
wrk.SourceLineCnt = int.Parse(objwrk[(int)TableColumn.SourceLineCnt].ToString()); // 注文書作成時台帳行番号
|
|
483 |
wrk.SourceCode = int.Parse(objwrk[(int)TableColumn.SourceCode].ToString()); // 台帳工事番号
|
|
484 |
wrk.SourceDetailCnt = int.Parse(objwrk[(int)TableColumn.SourceDetailCnt].ToString()); // 台帳明細番号
|
|
485 | 485 |
wrk.DataTypeFlag = int.Parse(objwrk[(int)TableColumn.DataTypeFlag].ToString()); // 明細行データタイプフラグ |
486 | 486 |
|
487 | 487 |
|
... | ... | |
509 | 509 |
/// <param name="OutsourcingFlg"></param> |
510 | 510 |
/// <param name="LineCount"></param> |
511 | 511 |
/// <returns></returns> |
512 |
public string CreatePrimarykeyString(int ConstructionCode, int SeqNo = 0, int GroupCount = 0, int LineCount = 0, string strArias = "")
|
|
512 |
public string CreatePrimarykeyString(int ConstructionCode, int SeqNo = 0, int GroupCount = -1, int LineCount = 0, string strArias = "")
|
|
513 | 513 |
{ |
514 | 514 |
StringBuilder strWork = new StringBuilder(); |
515 | 515 |
try |
... | ... | |
517 | 517 |
strWork.AppendFormat(" Where {0}ConstructionCode = {1}", strArias, ConstructionCode); |
518 | 518 |
if (SeqNo != 0) |
519 | 519 |
strWork.AppendFormat(" And {0}SEQNO = {1}", strArias, SeqNo); |
520 |
if (GroupCount != 0)
|
|
520 |
if (GroupCount != -1)
|
|
521 | 521 |
strWork.AppendFormat(" And {0}GROUPCOUNT = {1}", strArias, GroupCount); |
522 | 522 |
if (LineCount != 0) |
523 | 523 |
strWork.AppendFormat(" And {0}LineCount = {1}", strArias, LineCount); |
branches/src/ProcessManagement/ProcessManagement/DataModel/BankBusinessDayMaster.cs | ||
---|---|---|
9 | 9 |
public class BankBusinessDayMaster |
10 | 10 |
{ |
11 | 11 |
#region メンバ変数 |
12 |
private int m_YearMonth = 0; // 年月
|
|
13 |
private int m_BankBusinessDay = 0; // 銀行営業日
|
|
14 |
private string m_Note = ""; // 備考
|
|
15 |
private int m_DeleteFlg = 0; // 削除フラグ
|
|
16 |
private DateTime m_EntryDate = DateTime.Now; // 登録日付
|
|
17 |
private DateTime m_UpdateDate = DateTime.Now; // 更新日付
|
|
12 |
private int m_YearMonth = 0; // 年月
|
|
13 |
private int m_BankBusinessDay = 0; // 銀行営業日
|
|
14 |
private string m_Note = ""; // 備考
|
|
15 |
private int m_DeleteFlg = 0; // 削除フラグ
|
|
16 |
private DateTime m_EntryDate = DateTime.Now; // 登録日付
|
|
17 |
private DateTime m_UpdateDate = DateTime.Now; // 更新日付
|
|
18 | 18 |
#endregion |
19 | 19 |
|
20 | 20 |
#region コンストラクタ |
branches/src/ProcessManagement/ProcessManagement/DataModel/ConstructionLedgerDetail.cs | ||
---|---|---|
122 | 122 |
private int m_JoinTitleFlg = 0; // 工事名称タイトル |
123 | 123 |
private double m_SalaryOnRegist = 0; // 登録時月額給与 |
124 | 124 |
private int m_PurchaseOrderFlg = 0; // 注文書発行フラグ |
125 |
private int m_DetailCount = 0; // 明細番号 |
|
125 | 126 |
|
126 | 127 |
private DateTime m_EntryDate = DateTime.Now; // 登録日付 |
127 | 128 |
private DateTime m_UpdateDate = DateTime.Now; // 更新日付 |
... | ... | |
324 | 325 |
get { return m_PurchaseOrderFlg; } |
325 | 326 |
set { m_PurchaseOrderFlg = value; } |
326 | 327 |
} |
328 |
/// <summary> |
|
329 |
/// 明細番号 |
|
330 |
/// </summary> |
|
331 |
public int DetailCount |
|
332 |
{ |
|
333 |
get { return m_DetailCount; } |
|
334 |
set { m_DetailCount = value; } |
|
335 |
} |
|
327 | 336 |
|
328 | 337 |
/// <summary> |
329 | 338 |
/// 登録日付 |
branches/src/ProcessManagement/ProcessManagement/DataModel/PurchaseOrderDetail.cs | ||
---|---|---|
68 | 68 |
private string m_UnitName = string.Empty; // 単位 |
69 | 69 |
private double m_UnitPrice = 0; // 単価 |
70 | 70 |
private double m_OrdersLinePrice = 0; // 金額 |
71 |
private double m_SourceCode = 0; // 予算作成時工事番号
|
|
72 |
private int m_SourceLineCnt = 0; // 注文書作成時台帳行番号
|
|
71 |
private long m_SourceCode = 0; // 台帳工事番号
|
|
72 |
private int m_SourceDetailCnt = 0; // 台帳明細番号
|
|
73 | 73 |
|
74 | 74 |
private int m_DataTypeFlag = 0; // 明細行データタイプフラグ |
75 | 75 |
|
... | ... | |
179 | 179 |
set { m_OrdersLinePrice = value; } |
180 | 180 |
} |
181 | 181 |
/// <summary> |
182 |
/// 予算作成時工事番号
|
|
182 |
/// 台帳工事番号
|
|
183 | 183 |
/// </summary> |
184 |
public double SourceCode
|
|
184 |
public long SourceCode
|
|
185 | 185 |
{ |
186 | 186 |
get { return m_SourceCode; } |
187 | 187 |
set { m_SourceCode = value; } |
188 | 188 |
} |
189 | 189 |
/// <summary> |
190 |
/// 注文書作成時台帳行番号
|
|
190 |
/// 台帳明細番号
|
|
191 | 191 |
/// </summary> |
192 |
public int SourceLineCnt
|
|
192 |
public int SourceDetailCnt
|
|
193 | 193 |
{ |
194 |
get { return m_SourceLineCnt; }
|
|
195 |
set { m_SourceLineCnt = value; }
|
|
194 |
get { return m_SourceDetailCnt; }
|
|
195 |
set { m_SourceDetailCnt = value; }
|
|
196 | 196 |
} |
197 | 197 |
|
198 | 198 |
/// <summary> |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstractionList/FrmConstructionListAuxiliary.cs | ||
---|---|---|
1041 | 1041 |
strSQL.Append(" Left Join processapprovaldetail AS A3"); |
1042 | 1042 |
strSQL.Append(" On A3.ConstructionCode = A2.ConstructionCode"); |
1043 | 1043 |
strSQL.AppendFormat(" And A3.ApprovalCode = {0}", (int)ClsExcute.ApprovalListNo.PurchaseOrderEntryApproval); |
1044 |
strSQL.Append(" And A3.LinkCode = A2.SeqNo"); |
|
1044 |
strSQL.Append(" And A3.LinkCode = A2.SeqNo");
|
|
1045 | 1045 |
strSQL.Append(" Left Join processapproval AS A4"); |
1046 | 1046 |
strSQL.Append(" On A4.ConstructionCode = A3.ConstructionCode"); |
1047 | 1047 |
strSQL.Append(" And A4.ApprovalCode = A3.ApprovalCode"); |
... | ... | |
1056 | 1056 |
strSQL.AppendFormat(" WHERE A1.CONSTRUCTIONCODE = {0}", ParentCode); |
1057 | 1057 |
strSQL.AppendFormat(" And A1.SOURCECODE = {0}", SourceCode); |
1058 | 1058 |
strSQL.AppendFormat(" AND A1.GROUPCOUNT = {0}", (int)FrmConstructionLedger.DataGroup.ConstructionCosts); |
1059 |
strSQL.Append(" AND A1.COMPANYCODE > 0"); |
|
1060 |
strSQL.AppendFormat(" And A1.PurchaseOrderFlg <> {0}",(int)ConstructionLedgerDetail.PurOrderFlgDef.NotMakingData); |
|
1059 |
strSQL.Append(" AND A1.COMPANYCODE > 0"); |
|
1060 |
strSQL.AppendFormat(" And (A1.PurchaseOrderFlg > {0}", (int)ConstructionLedgerDetail.PurOrderFlgDef.ChangeOld); |
|
1061 |
strSQL.AppendFormat(" And A1.PurchaseOrderFlg <> {0})", (int)ConstructionLedgerDetail.PurOrderFlgDef.NotMakingData); |
|
1061 | 1062 |
|
1062 | 1063 |
strSQL.AppendFormat(" And ((ConstrType.PublicFlg != {0}", (int)ConstructionTypeMaster.ConstructionTypeDef.Community); |
1063 | 1064 |
strSQL.AppendFormat(" And A1.EXECUTIONAMOUNT >= {0})", CommonDefine.s_PrintOutPrice); |
... | ... | |
1069 | 1070 |
|
1070 | 1071 |
ArrayList arList = new ArrayList(); |
1071 | 1072 |
if (!OrderDB.ExecuteReader(strSQL.ToString(), ref arList)) return false; |
1072 |
if (arList.Count == 0) return false;
|
|
1073 |
|
|
1073 |
if (arList.Count == 0) return true;
|
|
1074 |
|
|
1074 | 1075 |
bool bRet = true; |
1075 | 1076 |
foreach (object[] objRec in arList) |
1076 | 1077 |
{ |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/DataChange.cs | ||
---|---|---|
206 | 206 |
return false; |
207 | 207 |
} |
208 | 208 |
|
209 |
LinkDB.commit(); |
|
210 |
BaseDB.commit(); |
|
211 |
DetailDB.commit(); |
|
212 |
PDateDB.commit(); |
|
213 |
|
|
214 |
|
|
215 | 209 |
// ???N???v???Z?X?Z?b?g |
216 | 210 |
int NowPoint = ClsExcute.NextProcess((int)ClsExcute.ProcessExecuteNo.EstimateInput); |
217 | 211 |
// ?I???H??????Z?b?g |
... | ... | |
226 | 220 |
} |
227 | 221 |
finally |
228 | 222 |
{ |
223 |
|
|
224 |
LinkDB.commit(); |
|
225 |
BaseDB.commit(); |
|
226 |
DetailDB.commit(); |
|
227 |
PDateDB.commit(); |
|
228 |
|
|
229 | 229 |
LinkDB.close(); LinkDB = null; |
230 | 230 |
BaseDB.close(); BaseDB = null; |
231 | 231 |
DetailDB.close(); DetailDB = null; |
... | ... | |
234 | 234 |
} |
235 | 235 |
#endregion |
236 | 236 |
|
237 |
#region ???z?????f?[?^?????????
|
|
237 |
#region ?????H???f?[?^?????????
|
|
238 | 238 |
/// <summary> |
239 |
/// ???z?????f?[?^?????????
|
|
239 |
/// ?????H???f?[?^?????????
|
|
240 | 240 |
/// </summary> |
241 | 241 |
/// <param name="Code"></param> |
242 | 242 |
/// <param name="DB1"></param> |
... | ... | |
246 | 246 |
{ |
247 | 247 |
try |
248 | 248 |
{ |
249 |
// ???z????????????????
|
|
249 |
// ?????H??????????????
|
|
250 | 250 |
StringBuilder strSQL = new StringBuilder(); |
251 | 251 |
strSQL.AppendFormat("SELECT COUNT(*) FROM CONSTRUCTIONBASEINFO A WHERE A.CONSTRUCTIONSTATUSFLG != {0}", |
252 | 252 |
CommonDefine.ProjectsStatus.First(x => x.Value.Equals("?? ?? ??")).Key); |
... | ... | |
284 | 284 |
} |
285 | 285 |
#endregion |
286 | 286 |
|
287 |
#region ???z???????F?H????{???????
|
|
287 |
#region ?????H?????F?H????{???????
|
|
288 | 288 |
/// <summary> |
289 |
/// ???z???????F?H????{???????
|
|
289 |
/// ?????H?????F?H????{???????
|
|
290 | 290 |
/// </summary> |
291 | 291 |
/// <param name="cbRec"></param> |
292 | 292 |
private bool InitSetBaseInfo(int ToCode, IOConstructionBaseInfo cbDB) |
293 | 293 |
{ |
294 | 294 |
try |
295 | 295 |
{ |
296 |
// ?H????{?????? |
|
296 |
// ?R?s?[???H????{??????
|
|
297 | 297 |
StringBuilder strSQL = new StringBuilder(); |
298 | 298 |
strSQL.Append(cbDB.CreatePrimarykeyString(ToCode)); |
299 | 299 |
ConstructionBaseInfo cbRec = new ConstructionBaseInfo(); |
300 | 300 |
if (!cbDB.SelectAction(strSQL.ToString(), ref cbRec, false)) return false; |
301 |
|
|
302 |
// ?R?s?[?????e?H??????? |
|
303 |
if (ToCode != m_ConstructionCode) |
|
304 |
{ |
|
305 |
StringBuilder strGetOrgSQL = new StringBuilder(); |
|
306 |
strGetOrgSQL.Append(cbDB.CreatePrimarykeyString(m_ConstructionCode)); |
|
307 |
ConstructionBaseInfo OrgRec = new ConstructionBaseInfo(); |
|
308 |
if (!cbDB.SelectAction(strGetOrgSQL.ToString(), ref OrgRec, false)) return false; |
|
309 |
// ?????_??H?????????Z?b?g???? |
|
310 |
cbRec.ConstructionPeriodEnd2 = OrgRec.ConstructionPeriodEnd2; |
|
311 |
} |
|
301 | 312 |
|
302 | 313 |
cbRec.TyingFlg = (int)ConstructionBaseInfo.TyingFlgDef.Tying; // ?R?t???t???O |
303 | 314 |
cbRec.ConstructionStatusFlg = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("??????")).Key; // ?H???i????? |
... | ... | |
321 | 332 |
cbRec.OrdersDecisionPriceInTax = 0; // ??????????z |
322 | 333 |
cbRec.TransferConstructionDate = DateTime.MinValue; // ?H?????? |
323 | 334 |
//cbRec.ConstructionPeriodStart = DateTime.MinValue; // ?_??H???J?n |
324 |
//cbRec.ConstructionPeriodEnd = DateTime.MinValue; // ?_??H?????? |
|
325 |
//cbRec.ConstructionPeriodStart2 = DateTime.MinValue; // ?_??H???J?n?i???????j |
|
326 |
//cbRec.ConstructionPeriodEnd2 = DateTime.MinValue; // ?_??H???????i???????j |
|
335 |
if (cbRec.ConstructionPeriodEnd2 != DateTime.MinValue) // ?????_??H?????????????_??H?????????X |
|
336 |
cbRec.ConstructionPeriodEnd = cbRec.ConstructionPeriodEnd2; // ?_??H?????? |
|
337 |
cbRec.ConstructionPeriodStart2 = DateTime.MinValue; // ?_??H???J?n?i???????j |
|
338 |
cbRec.ConstructionPeriodEnd2 = DateTime.MinValue; // ?_??H???????i???????j |
|
327 | 339 |
//cbRec.StartDate = DateTime.MinValue; // ?H???J?n?? |
328 | 340 |
//cbRec.EndDate = DateTime.MinValue; // ?H???I???? |
329 | 341 |
cbRec.PurchaseOrderMailingDate = DateTime.MinValue; // ???????X???? |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBaseInfo/FrmConstructionBaseInfo.cs | ||
---|---|---|
1377 | 1377 |
CreateProcessContextMenu(m_SubForm); |
1378 | 1378 |
// *-----* ????????{?^????? *-----* |
1379 | 1379 |
|
1380 |
// ?\????u???? |
|
1381 |
if (m_SubForm) |
|
1382 |
{ |
|
1383 |
this.StartPosition = FormStartPosition.CenterParent; |
|
1384 |
this.Top += CommonDefine.s_DefalutShiftValue; |
|
1385 |
this.Left += CommonDefine.s_DefalutShiftValue; |
|
1386 |
} |
|
1387 | 1380 |
|
1388 | 1381 |
// ?????t?H?[?J?X |
1389 | 1382 |
this.ActiveControl = m_DspCtrl[(int)DspCnt.ConstructionPeriod]; |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudget.cs | ||
---|---|---|
778 | 778 |
SeeModeLock(); |
779 | 779 |
} |
780 | 780 |
|
781 |
// ?\????u???? |
|
782 |
if (m_SubForm) |
|
783 |
{ |
|
784 |
this.StartPosition = FormStartPosition.CenterParent; |
|
785 |
this.Top += CommonDefine.s_DefalutShiftValue; |
|
786 |
this.Left += CommonDefine.s_DefalutShiftValue; |
|
787 |
} |
|
788 |
|
|
789 | 781 |
// ??X?t???OOFF |
790 | 782 |
m_bChengeAns = false; |
791 | 783 |
m_bInitFlg = false; |
branches/src/ProcessManagement/ProcessManagement/Forms/DataEntry/ConstructionBudget/FrmConstructionBudgetAuxiliary.cs | ||
---|---|---|
2777 | 2777 |
// 給与コンテンツセット |
2778 | 2778 |
Content = string.Format(CommonDefine.s_SalaryCostMonthlyFormat, CalcBetweenTimes.ToString("#,0"), CommonDefine.InstructorMonthryCost.ToString("#,0")); |
2779 | 2779 |
|
2780 |
// 差分日付 |
|
2781 |
int dDiffDays = 0; |
|
2782 |
// ----- 増減工事のこの場合は期間が同じかのチェックを行う |
|
2783 | 2780 |
if (m_ConstructionBaseInfo.TyingFlg == (int)ConstructionBaseInfo.TyingFlgDef.Tying) |
2784 | 2781 |
{ |
2782 |
// ----- 増減工事の場合は期間が同じかのチェックを行う |
|
2785 | 2783 |
// 親の期間を取得する |
2786 | 2784 |
DateTime StDate = m_ParentBaseInfo.ConstructionPeriodStart2; |
2787 | 2785 |
DateTime EdDate = m_ParentBaseInfo.ConstructionPeriodEnd2; |
... | ... | |
2792 | 2790 |
int MyMonths = DateTimeUtil.GetElapsedMonths(m_ConstructionBaseInfo.ConstructionPeriodStart |
2793 | 2791 |
, m_ConstructionBaseInfo.ConstructionPeriodEnd); |
2794 | 2792 |
// 期間が同じ場合は処理しない |
2795 |
if (StDate == m_ConstructionBaseInfo.ConstructionPeriodStart && EdDate == m_ConstructionBaseInfo.ConstructionPeriodEnd) |
|
2793 |
if (StDate.Date == m_ConstructionBaseInfo.ConstructionPeriodStart.Date |
|
2794 |
&& EdDate.Date == m_ConstructionBaseInfo.ConstructionPeriodEnd.Date) |
|
2796 | 2795 |
{ |
2797 | 2796 |
CostsValue = 0; |
2798 | 2797 |
Content = string.Empty; |
... | ... | |
2804 | 2803 |
} |
2805 | 2804 |
else |
2806 | 2805 |
{ |
2807 |
// 差分日付を取得する |
|
2808 |
dDiffDays = CalcDifferenceDate(m_ConstructionBaseInfo.ConstructionPeriodStart, |
他の形式にエクスポート: Unified diff