リビジョン 39
201/02/15現在 最新ソース
| trunk/src/ProcessManagement/ProcessManagement/Common/CommonDefine.cs | ||
|---|---|---|
| 510 | 510 |
public static readonly string[] ApprovalButtonString = new string[] { "未承認", "承認済", "不承認" };
|
| 511 | 511 |
#endregion |
| 512 | 512 |
|
| 513 |
#region 承認処理:デフォルト承認受付番号 |
|
| 514 |
/// <summary> |
|
| 515 |
/// 承認処理:デフォルト承認受付番号 |
|
| 516 |
/// </summary> |
|
| 517 |
public static int s_Default_OrderNo = 1; |
|
| 518 |
#endregion |
|
| 519 |
|
|
| 513 | 520 |
#region 起動時チェック:関連定義 |
| 514 | 521 |
/// <summary> |
| 515 | 522 |
/// 起動時日付チェックを必要とする処理のキー |
| ... | ... | |
| 961 | 968 |
public static int s_EstimatesExpirationDeadline = 3; |
| 962 | 969 |
#endregion |
| 963 | 970 |
|
| 971 |
#region 見積書入力:固定項目キー |
|
| 972 |
/// <summary> |
|
| 973 |
/// 見積書入力:固定項目キー |
|
| 974 |
/// </summary> |
|
| 975 |
public enum EstimateTotalSeqNo |
|
| 976 |
{
|
|
| 977 |
/// <summary> |
|
| 978 |
/// 合計:'A' |
|
| 979 |
/// </summary> |
|
| 980 |
ToTal1 = 0, |
|
| 981 |
/// <summary> |
|
| 982 |
/// 端数処理:'B' |
|
| 983 |
/// </summary> |
|
| 984 |
ToTal2, |
|
| 985 |
/// <summary> |
|
| 986 |
/// 改め合計:'C' |
|
| 987 |
/// </summary> |
|
| 988 |
ToTal3, |
|
| 989 |
/// <summary> |
|
| 990 |
/// 消費税相当額:'D' |
|
| 991 |
/// </summary> |
|
| 992 |
ToTal4, |
|
| 993 |
/// <summary> |
|
| 994 |
/// 総計:'E' |
|
| 995 |
/// </summary> |
|
| 996 |
ToTal5, |
|
| 997 |
} |
|
| 998 |
#endregion |
|
| 999 |
|
|
| 1000 |
#region 見積書入力:固定項目キー文字列 |
|
| 1001 |
/// <summary> |
|
| 1002 |
/// 見積書入力:固定項目キー文字列 |
|
| 1003 |
/// </summary> |
|
| 1004 |
/// <param name="estimatetotalseqNo"></param> |
|
| 1005 |
/// <returns></returns> |
|
| 1006 |
public static string GetEstimateTotalSeqNo(this EstimateTotalSeqNo estimatetotalseqNo) |
|
| 1007 |
{
|
|
| 1008 |
string[] names = { "A", "B", "C", "D", "E" };
|
|
| 1009 |
return names[(int)estimatetotalseqNo]; |
|
| 1010 |
} |
|
| 1011 |
#endregion |
|
| 1012 |
|
|
| 964 | 1013 |
#region 見積書入力:タブカテゴリ定義値 |
| 965 | 1014 |
/// <summary> |
| 966 | 1015 |
/// 見積入力:大項目・中項目・小項目 |
| ... | ... | |
| 1086 | 1135 |
"公共工事標準仕様書(最新版)に則り施工のこと。"}; |
| 1087 | 1136 |
#endregion |
| 1088 | 1137 |
|
| 1138 |
#region 注文書入力:印刷対象金額 |
|
| 1139 |
/// <summary> |
|
| 1140 |
/// 印刷対象金額 |
|
| 1141 |
/// </summary> |
|
| 1142 |
public static int s_PrintOutPrice = 300000; |
|
| 1143 |
#endregion |
|
| 1144 |
|
|
| 1089 | 1145 |
#region 交通費及び購入品等入力:データ種別 |
| 1090 | 1146 |
/// <summary> |
| 1091 | 1147 |
/// 交通費及び購入品等入力:データ種別 |
| ... | ... | |
| 1120 | 1176 |
public static readonly string[] CostDataNoString = new string[] { "", "交 通 費", "購入品費", "車両リース代", "駐車場・資材置き場代", "宿泊費" };
|
| 1121 | 1177 |
#endregion |
| 1122 | 1178 |
|
| 1123 |
#region 入力履歴等:データ種別
|
|
| 1179 |
#region 汎用データ:コードデータ種別
|
|
| 1124 | 1180 |
/// <summary> |
| 1125 |
/// 入力履歴等:データ種別
|
|
| 1181 |
/// 汎用データ:コードデータ種別
|
|
| 1126 | 1182 |
/// </summary> |
| 1127 |
public enum SearchLogDataType
|
|
| 1183 |
public enum CodeDataType
|
|
| 1128 | 1184 |
{
|
| 1129 | 1185 |
/// <summary> |
| 1130 | 1186 |
/// 固定コード |
| ... | ... | |
| 1380 | 1436 |
} |
| 1381 | 1437 |
#endregion |
| 1382 | 1438 |
|
| 1439 |
#region 工事リンク情報:リンク種別 |
|
| 1440 |
/// <summary> |
|
| 1441 |
/// 工事リンク情報:リンク種別 |
|
| 1442 |
/// </summary> |
|
| 1443 |
public enum LinkDataType |
|
| 1444 |
{
|
|
| 1445 |
/// <summary> |
|
| 1446 |
/// 0:増減工事 |
|
| 1447 |
/// </summary> |
|
| 1448 |
FluctuationType = 0, |
|
| 1449 |
/// <summary> |
|
| 1450 |
/// 1:結合工事 |
|
| 1451 |
/// </summary> |
|
| 1452 |
JoinType, |
|
| 1453 |
} |
|
| 1454 |
#endregion |
|
| 1455 |
|
|
| 1383 | 1456 |
#region 工事基本情報:紐付データフラグ |
| 1457 |
/// <summary> |
|
| 1458 |
/// 工事基本情報:紐付データフラグ |
|
| 1459 |
/// </summary> |
|
| 1384 | 1460 |
public enum BaseInfoTyingFlg |
| 1385 | 1461 |
{
|
| 1386 | 1462 |
/// <summary> |
| ... | ... | |
| 1388 | 1464 |
/// </summary> |
| 1389 | 1465 |
Standard = 0, |
| 1390 | 1466 |
/// <summary> |
| 1391 |
/// 1:親データ |
|
| 1467 |
/// 1:増減親データ
|
|
| 1392 | 1468 |
/// </summary> |
| 1393 | 1469 |
Parent, |
| 1394 | 1470 |
/// <summary> |
| 1395 |
/// 2:紐付きデータ
|
|
| 1471 |
/// 2:増減子データ
|
|
| 1396 | 1472 |
/// </summary> |
| 1397 | 1473 |
Tying, |
| 1398 | 1474 |
} |
| 1399 | 1475 |
#endregion |
| 1400 | 1476 |
|
| 1401 |
#region 工事詳細台帳:担当中フラグ
|
|
| 1477 |
#region 工事基本情報:結合工事フラグ
|
|
| 1402 | 1478 |
/// <summary> |
| 1403 |
/// 担当中フラグ
|
|
| 1479 |
/// 工事基本情報:結合工事フラグ
|
|
| 1404 | 1480 |
/// </summary> |
| 1405 |
public enum SalaryOperateKind
|
|
| 1481 |
public enum BaseInfoJoinFlg
|
|
| 1406 | 1482 |
{
|
| 1407 | 1483 |
/// <summary> |
| 1408 |
/// 担当終了
|
|
| 1484 |
/// 0:結合無通常データ
|
|
| 1409 | 1485 |
/// </summary> |
| 1410 |
Complate = 0,
|
|
| 1486 |
Standard = 0,
|
|
| 1411 | 1487 |
/// <summary> |
| 1412 |
/// 担当中
|
|
| 1488 |
/// 1:結合親データ
|
|
| 1413 | 1489 |
/// </summary> |
| 1414 |
Oparateing, |
|
| 1490 |
JoinParent, |
|
| 1491 |
/// <summary> |
|
| 1492 |
/// 2:結合子データ |
|
| 1493 |
/// </summary> |
|
| 1494 |
JoinChildren, |
|
| 1415 | 1495 |
} |
| 1416 | 1496 |
#endregion |
| 1417 | 1497 |
|
| ... | ... | |
| 1432 | 1512 |
} |
| 1433 | 1513 |
#endregion |
| 1434 | 1514 |
|
| 1435 |
#region 工事詳細台帳:増減工事フラグ
|
|
| 1515 |
#region 工事詳細台帳明細:担当中フラグ
|
|
| 1436 | 1516 |
/// <summary> |
| 1517 |
/// 担当中フラグ |
|
| 1518 |
/// </summary> |
|
| 1519 |
public enum SalaryOperateKind |
|
| 1520 |
{
|
|
| 1521 |
/// <summary> |
|
| 1522 |
/// 担当終了 |
|
| 1523 |
/// </summary> |
|
| 1524 |
Complate = 0, |
|
| 1525 |
/// <summary> |
|
| 1526 |
/// 担当中 |
|
| 1527 |
/// </summary> |
|
| 1528 |
Oparateing, |
|
| 1529 |
} |
|
| 1530 |
#endregion |
|
| 1531 |
|
|
| 1532 |
#region 工事詳細台帳明細:増減工事フラグ |
|
| 1533 |
/// <summary> |
|
| 1437 | 1534 |
/// 工事詳細台帳:増減工事フラグ |
| 1438 | 1535 |
/// </summary> |
| 1439 | 1536 |
public enum FluctuatesFlg |
| ... | ... | |
| 1441 | 1538 |
/// <summary> |
| 1442 | 1539 |
/// 0:通常データ |
| 1443 | 1540 |
/// </summary> |
| 1444 |
Normal =0, |
|
| 1541 |
Normal = 0,
|
|
| 1445 | 1542 |
/// <summary> |
| 1446 | 1543 |
/// 1:増減データ |
| 1447 | 1544 |
/// </summary> |
| ... | ... | |
| 1449 | 1546 |
} |
| 1450 | 1547 |
#endregion |
| 1451 | 1548 |
|
| 1549 |
#region 工事詳細台帳明細:注文書発行フラグ |
|
| 1550 |
/// <summary> |
|
| 1551 |
/// 工事詳細台帳明細:注文書発行フラグ |
|
| 1552 |
/// </summary> |
|
| 1553 |
public enum PurchaseOrderFlg |
|
| 1554 |
{
|
|
| 1555 |
/// <summary> |
|
| 1556 |
/// 未作成 |
|
| 1557 |
/// </summary> |
|
| 1558 |
NoCreate = 0, |
|
| 1559 |
/// <summary> |
|
| 1560 |
/// 作成中 |
|
| 1561 |
/// </summary> |
|
| 1562 |
Making = 1, |
|
| 1563 |
} |
|
| 1564 |
#endregion |
|
| 1565 |
|
|
| 1452 | 1566 |
#region 担当者マスタ:工事詳細台帳計算対象フラグ |
| 1453 | 1567 |
/// <summary> |
| 1454 | 1568 |
/// 担当者マスタ:工事詳細台帳計算対象フラグ |
| trunk/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
|---|---|---|
| 2473 | 2473 |
} |
| 2474 | 2474 |
#endregion |
| 2475 | 2475 |
|
| 2476 |
#region 登録完了メッセージ表示 |
|
| 2477 |
/// <summary> |
|
| 2478 |
/// 登録完了メッセージ表示 |
|
| 2479 |
/// </summary> |
|
| 2480 |
/// <param name="strTitle"></param> |
|
| 2481 |
public static void EntryEndMessage(string strTitle) |
|
| 2482 |
{
|
|
| 2483 |
try |
|
| 2484 |
{
|
|
| 2485 |
string strMes = string.Format("{0} 登録完了しました。", strTitle);
|
|
| 2486 |
|
|
| 2487 |
MessageBox.Show(strMes, "登録完了メッセージ", MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
| 2488 |
} |
|
| 2489 |
catch (Exception ex) |
|
| 2490 |
{
|
|
| 2491 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 2492 |
} |
|
| 2493 |
} |
|
| 2494 |
public static void EntryEndMessage(string strTitle, string strTitle2) |
|
| 2495 |
{
|
|
| 2496 |
try |
|
| 2497 |
{
|
|
| 2498 |
string strMes = string.Format("{0} {1}完了しました。", strTitle, strTitle2);
|
|
| 2499 |
string strGuidance = string.Format("{0}完了メッセージ", strTitle2);
|
|
| 2500 |
|
|
| 2501 |
MessageBox.Show(strMes, strGuidance, MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
| 2502 |
} |
|
| 2503 |
catch (Exception ex) |
|
| 2504 |
{
|
|
| 2505 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 2506 |
} |
|
| 2507 |
} |
|
| 2476 | 2508 |
#endregion |
| 2477 | 2509 |
|
| 2510 |
#region 削除完了メッセージ表示 |
|
| 2511 |
/// <summary> |
|
| 2512 |
/// 削除完了メッセージ表示 |
|
| 2513 |
/// </summary> |
|
| 2514 |
/// <param name="strTitle"></param> |
|
| 2515 |
public static void RemoveEndMessage(string strTitle) |
|
| 2516 |
{
|
|
| 2517 |
try |
|
| 2518 |
{
|
|
| 2519 |
string strMes = string.Format("{0} 削除完了しました。", strTitle);
|
|
| 2520 |
|
|
| 2521 |
MessageBox.Show(strMes, "削除完了メッセージ", MessageBoxButtons.OK, MessageBoxIcon.Information); |
|
| 2522 |
} |
|
| 2523 |
catch (Exception ex) |
|
| 2524 |
{
|
|
| 2525 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 2526 |
} |
|
| 2527 |
} |
|
| 2528 |
#endregion |
|
| 2529 |
|
|
| 2530 |
#endregion |
|
| 2531 |
|
|
| 2478 | 2532 |
#region Excel向け操作メソッド |
| 2479 | 2533 |
#region オブジェクト開放 |
| 2480 | 2534 |
/// <summary> |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsApprovalPermission.cs | ||
|---|---|---|
| 39 | 39 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
| 40 | 40 |
try |
| 41 | 41 |
{
|
| 42 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.ConstructionCode, Rec.ApprovalCode, Rec.SeqNo); |
|
| 42 |
string strSQL = ApprDB.CreatePrimarykeyString(Rec.ConstructionCode, Rec.ApprovalCode, Rec.OrderNo, Rec.SeqNo);
|
|
| 43 | 43 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
| 44 | 44 |
// データがあるかをチェックする |
| 45 | 45 |
if (!ApprDB.SelectAction(strSQL, ref DataList)) return false; |
| ... | ... | |
| 76 | 76 |
/// <param name="ApprovalCode"></param> |
| 77 | 77 |
/// <param name="Status"></param> |
| 78 | 78 |
/// <returns></returns> |
| 79 |
public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, int Status) |
|
| 79 |
public static bool SetPrimaryRecStatus(int ConstructionCode, int ApprovalCode, int OrderNO, int Status)
|
|
| 80 | 80 |
{
|
| 81 | 81 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
| 82 | 82 |
try |
| 83 | 83 |
{
|
| 84 | 84 |
// 申請レコードを取得する |
| 85 |
string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, 1);
|
|
| 86 |
ProcessApproval DataRec = new ProcessApproval(); |
|
| 87 |
// データがあるかをチェックする |
|
| 88 |
if (!ApprDB.SelectAction(strSQL, ref DataRec)) return false; |
|
| 85 |
//string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNO, 1);
|
|
| 86 |
//ProcessApproval DataRec = new ProcessApproval();
|
|
| 87 |
//// データがあるかをチェックする
|
|
| 88 |
//if (!ApprDB.SelectAction(strSQL, ref DataRec)) return false;
|
|
| 89 | 89 |
|
| 90 | 90 |
// レコードのステータスを変える |
| 91 |
DataRec.ApprovalStatus = Status; |
|
| 92 |
if (!ApprDB.UpdateAction(strSQL, DataRec)) return false; |
|
| 91 |
//DataRec.ApprovalStatus = Status; |
|
| 92 |
//if (!ApprDB.UpdateAction(strSQL, DataRec)) return false; |
|
| 93 |
if (!ApprDB.UpdateFeild(ConstructionCode, |
|
| 94 |
(int)IOProcessApproval.ColumnName.ApprovalStatus, |
|
| 95 |
Status, |
|
| 96 |
true, |
|
| 97 |
ApprovalCode, |
|
| 98 |
OrderNO, |
|
| 99 |
1)) return false; |
|
| 93 | 100 |
|
| 94 | 101 |
return true; |
| 95 | 102 |
} |
| ... | ... | |
| 112 | 119 |
/// <param name="ConstructionCode"></param> |
| 113 | 120 |
/// <param name="ApprovalCode"></param> |
| 114 | 121 |
/// <returns></returns> |
| 115 |
public static bool CheckPetition(int ConstructionCode, int ApprovalCode) |
|
| 122 |
public static bool CheckPetition(int ConstructionCode, int ApprovalCode, int ApprovalCount)
|
|
| 116 | 123 |
{
|
| 117 | 124 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
| 118 | 125 |
try |
| 119 | 126 |
{
|
| 120 | 127 |
bool bPetition = false; |
| 121 | 128 |
// 申請データ取得 |
| 122 |
string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, 1); |
|
| 129 |
string strSQL = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount, 1);
|
|
| 123 | 130 |
List<ProcessApproval> PetitionList = new List<ProcessApproval>(); |
| 124 | 131 |
if (!ApprDB.SelectAction(strSQL, ref PetitionList)) return bPetition; |
| 125 | 132 |
// 申請データが無い場合 |
| ... | ... | |
| 146 | 153 |
/// <param name="ConstructionCode"></param> |
| 147 | 154 |
/// <param name="ApprovalCode"></param> |
| 148 | 155 |
/// <returns></returns> |
| 149 |
public static bool CheckApproval(int ConstructionCode, int ApprovalCode) |
|
| 156 |
public static bool CheckApproval(int ConstructionCode, int ApprovalCode, int Approvalcount)
|
|
| 150 | 157 |
{
|
| 151 | 158 |
IOMApproval mApprDB = new IOMApproval(); |
| 152 | 159 |
IOProcessApproval ApprDB = new IOProcessApproval(); |
| 153 | 160 |
try |
| 154 | 161 |
{
|
| 155 | 162 |
// 承認データを取得する(申請データを除く) |
| 156 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, 1); |
|
| 163 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, Approvalcount, 1);
|
|
| 157 | 164 |
ProcessApproval DataRec = new ProcessApproval(); |
| 158 | 165 |
if (!ApprDB.SelectAction(strData, ref DataRec)) return false; |
| 159 | 166 |
|
| ... | ... | |
| 181 | 188 |
/// <param name="ConstructionCode"></param> |
| 182 | 189 |
/// <param name="ApprovalCode"></param> |
| 183 | 190 |
/// <returns></returns> |
| 184 |
public static bool CheckApprovalData(int ConstructionCode, int ApprovalCode) |
|
| 191 |
public static bool CheckApprovalData(int ConstructionCode, int ApprovalCode, int OrderNo)
|
|
| 185 | 192 |
{
|
| 186 | 193 |
IOConstructionBaseInfo cbiDB = new IOConstructionBaseInfo(); |
| 187 | 194 |
IOMApproval mApprDB = new IOMApproval(); |
| ... | ... | |
| 193 | 200 |
string strSQL = cbiDB.CreatePrimarykeyString(ConstructionCode); |
| 194 | 201 |
ConstructionBaseInfo cbiData = new ConstructionBaseInfo(); |
| 195 | 202 |
if (!cbiDB.SelectAction(strSQL, ref cbiData)) return false; |
| 196 |
int DepartmentCode = GetFromConstructionAndApprovalTheDepartment(ConstructionCode, ApprovalCode); |
|
| 203 |
int DepartmentCode = GetFromConstructionAndApprovalTheDepartment(ConstructionCode, ApprovalCode, OrderNo);
|
|
| 197 | 204 |
|
| 198 | 205 |
// 承認データを取得する(申請データを除く) |
| 199 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode); |
|
| 206 |
string strData = ApprDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo);
|
|
| 200 | 207 |
strData += string.Format(" And SeqNo != 1 And ApprovalStatus = {0}", (int)CommonDefine.ApprovalStatus.Approval);
|
| 201 | 208 |
List<ProcessApproval> DataList = new List<ProcessApproval>(); |
| 202 | 209 |
if (!ApprDB.SelectAction(strData, ref DataList)) return false; |
| ... | ... | |
| 365 | 372 |
/// </summary> |
| 366 | 373 |
/// <param name="PersonCode"></param> |
| 367 | 374 |
/// <returns></returns> |
| 368 |
public static int GetFromConstructionAndApprovalTheDepartment(int ConstructionCode, int ApprovalCode) |
|
| 375 |
public static int GetFromConstructionAndApprovalTheDepartment(int ConstructionCode, int ApprovalCode, int OrderNo)
|
|
| 369 | 376 |
{
|
| 370 | 377 |
IOMPersonInCharge picDB = new IOMPersonInCharge(); |
| 371 | 378 |
IOProcessApproval ApprovalDB = new IOProcessApproval(); |
| 372 | 379 |
try |
| 373 | 380 |
{
|
| 374 | 381 |
// 管理担当者コードを取得する |
| 375 |
string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode); |
|
| 376 |
strSQL += " AND SEQNO = 1"; |
|
| 382 |
string strSQL = ApprovalDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, OrderNo, 1); |
|
| 377 | 383 |
ProcessApproval ApprovalRec = new ProcessApproval(); |
| 378 | 384 |
int CurrentPersonCode = 0; |
| 379 | 385 |
if (ApprovalDB.SelectAction(strSQL, ref ApprovalRec)) |
| ... | ... | |
| 480 | 486 |
/// 該当工事より承認数取得する |
| 481 | 487 |
/// </summary> |
| 482 | 488 |
/// <returns></returns> |
| 483 |
public static int GetApprovalDataCount(int ConstructionCode, int ApprovalCode) |
|
| 489 |
public static int GetApprovalDataCount(int ConstructionCode, int ApprovalCode, int ApprovalCount)
|
|
| 484 | 490 |
{
|
| 485 | 491 |
IOProcessApproval paDB = new IOProcessApproval(); |
| 486 | 492 |
try |
| 487 | 493 |
{
|
| 488 | 494 |
// 承認データ取得 |
| 489 |
string strSQL = paDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode); |
|
| 495 |
string strSQL = paDB.CreatePrimarykeyString(ConstructionCode, ApprovalCode, ApprovalCount);
|
|
| 490 | 496 |
strSQL += " And SeqNo != 1 And ApprovalStatus = 2"; |
| 491 | 497 |
List<ProcessApproval> ApprovalList = new List<ProcessApproval>(); |
| 492 | 498 |
if (!paDB.SelectAction(strSQL, ref ApprovalList)) return 0; |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsCalendar.cs | ||
|---|---|---|
| 147 | 147 |
} |
| 148 | 148 |
} |
| 149 | 149 |
#endregion |
| 150 |
|
|
| 151 |
#region 差分の日数を返す |
|
| 152 |
/// <summary> |
|
| 153 |
/// 差分の日数を返す |
|
| 154 |
/// </summary> |
|
| 155 |
/// <returns></returns> |
|
| 156 |
public static int CalcDifferenceDate(DateTime OrgStDate, DateTime OrgEdDate, DateTime ChgStDate, DateTime ChgEdDate) |
|
| 157 |
{
|
|
| 158 |
try |
|
| 159 |
{
|
|
| 160 |
int iRet = 0; |
|
| 161 |
|
|
| 162 |
// ----- 当初日数 |
|
| 163 |
// 経過日数を求める |
|
| 164 |
TimeSpan tsOrgdays = OrgEdDate.Date - OrgStDate.Date; |
|
| 165 |
// 計算では当日の時間引くので+1する |
|
| 166 |
int OrgDays = (int)(tsOrgdays.Days + 1.0); |
|
| 167 |
|
|
| 168 |
// ----- 変更日数 |
|
| 169 |
// 経過日数を求める |
|
| 170 |
TimeSpan tsChgdays = ChgEdDate.Date - ChgStDate.Date; |
|
| 171 |
// 計算では当日の時間引くので+1する |
|
| 172 |
int ChgDays = (int)(tsChgdays.Days + 1.0); |
|
| 173 |
|
|
| 174 |
// 差分計算 |
|
| 175 |
iRet = ChgDays - OrgDays; |
|
| 176 |
|
|
| 177 |
return iRet; |
|
| 178 |
} |
|
| 179 |
catch (Exception ex) |
|
| 180 |
{
|
|
| 181 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 182 |
return 0; |
|
| 183 |
} |
|
| 184 |
} |
|
| 185 |
#endregion |
|
| 186 | 150 |
} |
| 187 | 151 |
} |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs | ||
|---|---|---|
| 75 | 75 |
} |
| 76 | 76 |
} |
| 77 | 77 |
#endregion |
| 78 |
|
|
| 79 |
#region 関連データすべて削除 |
|
| 80 |
/// <summary> |
|
| 81 |
/// 関連データすべて削除 |
|
| 82 |
/// </summary> |
|
| 83 |
/// <returns></returns> |
|
| 84 |
public static bool RemoveAllelationData(int RemoveCode) |
|
| 85 |
{
|
|
| 86 |
IOConstructionBaseInfo DB01 = new IOConstructionBaseInfo(); // 工事基本情報 |
|
| 87 |
IOConstructionBaseInfoDetail DB02 = new IOConstructionBaseInfoDetail(); // 工事基本情報明細 |
|
| 88 |
IOConstructionLink DB03 = new IOConstructionLink(); // 工事増減情報 |
|
| 89 |
IOProcessApproval DB04 = new IOProcessApproval(); // 承認データ |
|
| 90 |
IOConstructionProgressDate DB05 = new IOConstructionProgressDate(); // 案件進捗日付データ |
|
| 91 |
IOEstimateData DB06 = new IOEstimateData(); // 積算見積書データ |
|
| 92 |
IOEstimateDataBody DB07 = new IOEstimateDataBody(); // 積算見積書ページデータ |
|
| 93 |
IOEstimateDataDetail DB08 = new IOEstimateDataDetail(); // 積算見積書明細データ |
|
| 94 |
IOEstimateBudget DB09 = new IOEstimateBudget(); // 積算予算書データ |
|
| 95 |
IOEstimateBudgetDetail DB10 = new IOEstimateBudgetDetail(); // 積算予算書明細データ |
|
| 96 |
IOConstructionBudget DB11 = new IOConstructionBudget(); // 工事予算書データ |
|
| 97 |
IOOrdersPriceData DB12 = new IOOrdersPriceData(); // 受注金額データ |
|
| 98 |
IOConstructionBudgetDetail DB13 = new IOConstructionBudgetDetail(); // 工事予算書明細データ |
|
| 99 |
IOConstructionLedger DB14 = new IOConstructionLedger(); // 工事詳細台帳データ |
|
| 100 |
IOConstructionLedgerDetail DB15 = new IOConstructionLedgerDetail(); // 工事詳細台帳明細データ |
|
| 101 |
IOConstructionLedgerExcute DB16 = new IOConstructionLedgerExcute(); // 工事詳細台帳実行データ |
|
| 102 |
IOPurchaseOrder DB17 = new IOPurchaseOrder(); // 注文書データ |
|
| 103 |
IOPurchaseOrderDetail DB18 = new IOPurchaseOrderDetail(); // 注文書明細データ |
|
| 104 |
|
|
| 105 |
IOProceedingsData DB19 = new IOProceedingsData(); // 発注者打ち合わせ議事録データ |
|
| 106 |
IOProceedingsDataAttendee DB20 = new IOProceedingsDataAttendee(); // 発注者打ち合わせ議事録データ(出席者) |
|
| 107 |
IOProceedingsDataDetail DB21 = new IOProceedingsDataDetail(); // 発注者打ち合わせ議事録データ(明細) |
|
| 108 |
IODailyDataConstruction DB22 = new IODailyDataConstruction(); // 日報データ |
|
| 109 |
IODailyDataDetail DB23 = new IODailyDataDetail(); // 日報データ (明細) |
|
| 110 |
IODailyDataVehicles DB24 = new IODailyDataVehicles(); // 日報データ (車両) |
|
| 111 |
IODailyDataMaterials DB25 = new IODailyDataMaterials(); // 日報データ (資材) |
|
| 112 |
IODailyDataSubcontractors DB26 = new IODailyDataSubcontractors(); // 日報データ (協力業者指示) |
|
| 113 |
IODailyDataField DB27 = new IODailyDataField(); // 日報データ (現場巡回) |
|
| 114 |
try |
|
| 115 |
{
|
|
| 116 |
// 工事情報存在確認 |
|
| 117 |
string strExists = DB01.CreatePrimarykeyString(RemoveCode); |
|
| 118 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
|
| 119 |
if (!DB01.SelectAction(strExists, ref BaseRec)) return false; |
|
| 120 |
|
|
| 121 |
List<int> RemoveList = new List<int>(); |
|
| 122 |
List<int> UpdateLinkList = new List<int>(); |
|
| 123 |
RemoveList.Add(RemoveCode); |
|
| 124 |
// 増減工事親確認 |
|
| 125 |
if (BaseRec.TyingFlg == (int)CommonDefine.BaseInfoTyingFlg.Parent) |
|
| 126 |
{
|
|
| 127 |
GetLinkageCode(RemoveCode, DB03, ref RemoveList, false); |
|
| 128 |
} |
|
| 129 |
// 結合工事親確認 |
|
| 130 |
if (BaseRec.JoinFlg == (int)CommonDefine.BaseInfoJoinFlg.JoinParent) |
|
| 131 |
{
|
|
| 132 |
GetLinkageCode(RemoveCode, DB03, ref UpdateLinkList, true); |
|
| 133 |
} |
|
| 134 |
|
|
| 135 |
DB01.connect(); DB02.connect(); DB03.connect(); DB04.connect(); DB05.connect(); DB06.connect(); |
|
| 136 |
DB07.connect(); DB08.connect(); DB09.connect(); DB10.connect(); DB11.connect(); DB12.connect(); |
|
| 137 |
DB13.connect(); DB14.connect(); DB15.connect(); DB16.connect(); DB17.connect(); DB18.connect(); |
|
| 138 |
DB19.connect(); DB20.connect(); DB21.connect(); DB22.connect(); DB23.connect(); DB24.connect(); |
|
| 139 |
DB25.connect(); DB26.connect(); DB27.connect(); |
|
| 140 |
|
|
| 141 |
DB01.beginTran(); DB02.beginTran(); DB03.beginTran(); DB04.beginTran(); DB05.beginTran(); DB06.beginTran(); |
|
| 142 |
DB07.beginTran(); DB08.beginTran(); DB09.beginTran(); DB10.beginTran(); DB11.beginTran(); DB12.beginTran(); |
|
| 143 |
DB13.beginTran(); DB14.beginTran(); DB15.beginTran(); DB16.beginTran(); DB17.beginTran(); DB18.beginTran(); |
|
| 144 |
DB19.beginTran(); DB20.beginTran(); DB21.beginTran(); DB22.beginTran(); DB23.beginTran(); DB24.beginTran(); |
|
| 145 |
DB25.beginTran(); DB26.beginTran(); DB27.beginTran(); |
|
| 146 |
|
|
| 147 |
bool ProcSuccess = true; |
|
| 148 |
string strRemove = string.Empty; |
|
| 149 |
for (int i = 0; i < RemoveList.Count; i++) |
|
| 150 |
{
|
|
| 151 |
strRemove = DB01.CreatePrimarykeyString(RemoveList[i]); |
|
| 152 |
if (!DB01.DeleteAction(strRemove, false)) { ProcSuccess = false; break; }
|
|
| 153 |
if (!DB02.DeleteAction(strRemove, false)) { ProcSuccess = false; break; }
|
|
| 154 |
DB03.DeleteAction(strRemove, false); |
|
| 155 |
DB04.DeleteAction(strRemove, false); |
|
| 156 |
DB05.DeleteAction(strRemove, false); |
|
| 157 |
DB06.DeleteAction(strRemove, false); |
|
| 158 |
DB07.DeleteAction(strRemove, false); |
|
| 159 |
DB08.DeleteAction(strRemove, false); |
|
| 160 |
DB09.DeleteAction(strRemove, false); |
|
| 161 |
DB10.DeleteAction(strRemove, false); |
|
| 162 |
DB11.DeleteAction(strRemove, false); |
|
| 163 |
DB12.DeleteAction(strRemove, false); |
|
| 164 |
DB13.DeleteAction(strRemove, false); |
|
| 165 |
DB14.DeleteAction(strRemove, false); |
|
| 166 |
DB15.DeleteAction(strRemove, false); |
|
| 167 |
DB16.DeleteAction(strRemove, false); |
|
| 168 |
DB17.DeleteAction(strRemove, false); |
|
| 169 |
DB18.DeleteAction(strRemove, false); |
|
| 170 |
DB19.DeleteAction(strRemove, false); |
|
| 171 |
DB20.DeleteAction(strRemove, false); |
|
| 172 |
DB21.DeleteAction(strRemove, false); |
|
| 173 |
DB22.DeleteAction(strRemove, false); |
|
| 174 |
DB23.DeleteAction(strRemove, false); |
|
| 175 |
DB24.DeleteAction(strRemove, false); |
|
| 176 |
DB25.DeleteAction(strRemove, false); |
|
| 177 |
DB26.DeleteAction(strRemove, false); |
|
| 178 |
DB27.DeleteAction(strRemove, false); |
|
| 179 |
} |
|
| 180 |
|
|
| 181 |
// 結合工事リンク情報更新(1件目は削除済み) |
|
| 182 |
if (ProcSuccess) |
|
| 183 |
{
|
|
| 184 |
// 増減工事親確認 |
|
| 185 |
if (BaseRec.TyingFlg == (int)CommonDefine.BaseInfoTyingFlg.Parent) |
|
| 186 |
{
|
|
| 187 |
for (int i = 1; i < RemoveList.Count; i++) |
|
| 188 |
{
|
|
| 189 |
if (!DB01.UpdateFeild(RemoveList[i] |
|
| 190 |
, (int)IOConstructionBaseInfo.TableColumn.TyingFlg |
|
| 191 |
, (int)CommonDefine.BaseInfoTyingFlg.Standard |
|
| 192 |
, false)) |
|
| 193 |
{
|
|
| 194 |
ProcSuccess = false; |
|
| 195 |
break; |
|
| 196 |
} |
|
| 197 |
} |
|
| 198 |
} |
|
| 199 |
// 結合工事親確認 |
|
| 200 |
if (BaseRec.JoinFlg == (int)CommonDefine.BaseInfoJoinFlg.JoinParent) |
|
| 201 |
{
|
|
| 202 |
for (int i = 1; i < UpdateLinkList.Count; i++) |
|
| 203 |
{
|
|
| 204 |
if (!DB01.UpdateFeild(UpdateLinkList[i] |
|
| 205 |
, (int)IOConstructionBaseInfo.TableColumn.JoinFlg |
|
| 206 |
, (int)CommonDefine.BaseInfoJoinFlg.Standard |
|
| 207 |
, false)) |
|
| 208 |
{
|
|
| 209 |
ProcSuccess = false; |
|
| 210 |
break; |
|
| 211 |
} |
|
| 212 |
} |
|
| 213 |
} |
|
| 214 |
} |
|
| 215 |
// DB終了処理 |
|
| 216 |
if (ProcSuccess) |
|
| 217 |
{
|
|
| 218 |
DB01.commit(); DB02.commit(); DB03.commit(); DB04.commit(); DB05.commit(); DB06.commit(); |
|
| 219 |
DB07.commit(); DB08.commit(); DB09.commit(); DB10.commit(); DB11.commit(); DB12.commit(); |
|
| 220 |
DB13.commit(); DB14.commit(); DB15.commit(); DB16.commit(); DB17.commit(); DB18.commit(); |
|
| 221 |
DB19.commit(); DB20.commit(); DB21.commit(); DB22.commit(); DB23.commit(); DB24.commit(); |
|
| 222 |
DB25.commit(); DB26.commit(); DB27.commit(); |
|
| 223 |
} |
|
| 224 |
else |
|
| 225 |
{
|
|
| 226 |
DB01.rollback(); DB02.rollback(); DB03.rollback(); DB04.rollback(); DB05.rollback(); DB06.rollback(); |
|
| 227 |
DB07.rollback(); DB08.rollback(); DB09.rollback(); DB10.rollback(); DB11.rollback(); DB12.rollback(); |
|
| 228 |
DB13.rollback(); DB14.rollback(); DB15.rollback(); DB16.rollback(); DB17.rollback(); DB18.rollback(); |
|
| 229 |
DB19.rollback(); DB20.rollback(); DB21.rollback(); DB22.rollback(); DB23.rollback(); DB24.rollback(); |
|
| 230 |
DB25.rollback(); DB26.rollback(); DB27.rollback(); |
|
| 231 |
} |
|
| 232 |
|
|
| 233 |
return ProcSuccess; |
|
| 234 |
} |
|
| 235 |
catch (Exception ex) |
|
| 236 |
{
|
|
| 237 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 238 |
return false; |
|
| 239 |
} |
|
| 240 |
finally |
|
| 241 |
{
|
|
| 242 |
DB01.close(); DB02.close(); DB03.close(); DB04.close(); DB05.close(); DB06.close(); |
|
| 243 |
DB07.close(); DB08.close(); DB09.close(); DB10.close(); DB11.close(); DB12.close(); |
|
| 244 |
DB13.close(); DB14.close(); DB15.close(); DB16.close(); DB17.close(); DB18.close(); |
|
| 245 |
DB19.close(); DB20.close(); DB21.close(); DB22.close(); DB23.close(); DB24.close(); |
|
| 246 |
DB25.close(); DB26.close(); DB27.close(); |
|
| 247 |
|
|
| 248 |
DB01 = null; DB02 = null; DB03 = null; DB04 = null; DB05 = null; DB06 = null; |
|
| 249 |
DB07 = null; DB08 = null; DB09 = null; DB10 = null; DB11 = null; DB12 = null; |
|
| 250 |
DB13 = null; DB14 = null; DB15 = null; DB16 = null; DB17 = null; DB18 = null; |
|
| 251 |
DB19 = null; DB20 = null; DB21 = null; DB22 = null; DB23 = null; DB24 = null; |
|
| 252 |
DB25 = null; DB26 = null; DB27 = null; |
|
| 253 |
} |
|
| 254 |
} |
|
| 255 |
#endregion |
|
| 256 |
|
|
| 257 |
#region 工事リンクコード取得 |
|
| 258 |
/// <summary> |
|
| 259 |
/// 工事リンクコード取得 |
|
| 260 |
/// </summary> |
|
| 261 |
private static void GetLinkageCode(int RemoveCode, IOConstructionLink LinkDB, ref List<int> RemoveList, bool bJoin = true) |
|
| 262 |
{
|
|
| 263 |
try |
|
| 264 |
{
|
|
| 265 |
string strSQL = "SELECT FLUCTUATIONCODE FROM CONSTRUCTIONLINK"; |
|
| 266 |
strSQL += LinkDB.CreatePrimarykeyString(RemoveCode); |
|
| 267 |
if (bJoin) |
|
| 268 |
strSQL += string.Format(" AND LINKTYPE = {0}", (int)CommonDefine.LinkDataType.JoinType);
|
|
| 269 |
else |
|
| 270 |
strSQL += string.Format(" AND LINKTYPE = {0}", (int)CommonDefine.LinkDataType.FluctuationType);
|
|
| 271 |
ArrayList arList = new ArrayList(); |
|
| 272 |
if (!LinkDB.ExecuteReader(strSQL, ref arList)) return; |
|
| 273 |
foreach (object[] CurRec in arList) |
|
| 274 |
{
|
|
| 275 |
RemoveList.Add(CommonMotions.cnvInt(CurRec[0])); |
|
| 276 |
} |
|
| 277 |
} |
|
| 278 |
catch (Exception ex) |
|
| 279 |
{
|
|
| 280 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 281 |
} |
|
| 282 |
} |
|
| 283 |
#endregion |
|
| 284 |
|
|
| 285 |
#region 結合親工事番号取得処理 |
|
| 286 |
/// <summary> |
|
| 287 |
/// 結合親工事番号取得処理 |
|
| 288 |
/// </summary> |
|
| 289 |
/// <param name="DataList"></param> |
|
| 290 |
/// <param name="bFirst"></param> |
|
| 291 |
public static void GetParentData(int SearchCode, ref ArrayList DataList, ref int FuncCnt) |
|
| 292 |
{
|
|
| 293 |
IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo(); |
|
| 294 |
try |
|
| 295 |
{
|
|
| 296 |
int iStatus = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
|
|
| 297 |
|
|
| 298 |
DataList.Clear(); |
|
| 299 |
// 結合工事表示 |
|
| 300 |
string strParent = "SELECT DISTINCT(A.CONSTRUCTIONCODE), B.REQUESTEDDATE, 0, 0, 0, 0, F.DETAILSTRING, B.JOINFLG"; |
|
| 301 |
strParent += " FROM CONSTRUCTIONLINK A"; |
|
| 302 |
strParent += " LEFT OUTER JOIN CONSTRUCTIONBASEINFODETAIL F ON (F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"; |
|
| 303 |
strParent += string.Format(" AND F.DETAILNO = {0})", (int)ConstructionBaseInfoDetail.DetailDataNo.ConstructionName);
|
|
| 304 |
strParent += " , CONSTRUCTIONBASEINFO B"; |
|
| 305 |
|
|
| 306 |
strParent += string.Format(" WHERE A.FLUCTUATIONCODE = {0}", SearchCode);
|
|
| 307 |
|
|
| 308 |
switch (FuncCnt) |
|
| 309 |
{
|
|
| 310 |
case 0: |
|
| 311 |
case 2: |
|
| 312 |
// 結合タイプよりデータを検索 |
|
| 313 |
strParent += string.Format(" AND A.LINKTYPE = {0}", (int)CommonDefine.LinkDataType.JoinType);
|
|
| 314 |
break; |
|
| 315 |
case 1: |
|
| 316 |
// 増減タイプよりデータを検索 |
|
| 317 |
strParent += string.Format(" AND A.LINKTYPE = {0}", (int)CommonDefine.LinkDataType.FluctuationType);
|
|
| 318 |
break; |
|
| 319 |
} |
|
| 320 |
|
|
| 321 |
strParent += " AND B.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"; |
|
| 322 |
strParent += string.Format(" AND B.CONSTRUCTIONSTATUSFLG != {0}", iStatus);
|
|
| 323 |
|
|
| 324 |
if (!BaseDB.ExecuteReader(strParent, ref DataList)) |
|
| 325 |
{
|
|
| 326 |
FuncCnt = 3; |
|
| 327 |
return; |
|
| 328 |
} |
|
| 329 |
|
|
| 330 |
FuncCnt++; |
|
| 331 |
|
|
| 332 |
if (DataList.Count == 0) |
|
| 333 |
{
|
|
| 334 |
if (FuncCnt > 2) return; |
|
| 335 |
|
|
| 336 |
// 3回目までは再起呼出 |
|
| 337 |
GetParentData(SearchCode, ref DataList, ref FuncCnt); |
|
| 338 |
return; |
|
| 339 |
} |
|
| 340 |
|
|
| 341 |
// 結合の元データ以外はクリア |
|
| 342 |
object[] objRec = (object[])DataList[0]; |
|
| 343 |
if (CommonMotions.cnvInt(objRec[7]) != (int)CommonDefine.BaseInfoJoinFlg.JoinParent) |
|
| 344 |
{
|
|
| 345 |
int SecondCode = CommonMotions.cnvInt(objRec[0]); |
|
| 346 |
DataList.Clear(); |
|
| 347 |
GetParentData(SecondCode, ref DataList, ref FuncCnt); |
|
| 348 |
} |
|
| 349 |
} |
|
| 350 |
catch (Exception ex) |
|
| 351 |
{
|
|
| 352 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 353 |
} |
|
| 354 |
finally |
|
| 355 |
{
|
|
| 356 |
BaseDB.close(); BaseDB = null; |
|
| 357 |
} |
|
| 358 |
} |
|
| 359 |
#endregion |
|
| 360 |
|
|
| 361 |
#region 結合親工事の工事進捗状態をセットする |
|
| 362 |
/// <summary> |
|
| 363 |
/// 結合親工事の工事進捗状態をセットする |
|
| 364 |
/// </summary> |
|
| 365 |
public static bool SetParentConstrStatus(IOConstructionBaseInfo BaseDB, int TargetCode) |
|
| 366 |
{
|
|
| 367 |
try |
|
| 368 |
{
|
|
| 369 |
// 対象の工事情報を取得する |
|
| 370 |
string strSQL = BaseDB.CreatePrimarykeyString(TargetCode); |
|
| 371 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
|
| 372 |
if (!BaseDB.SelectAction(strSQL, ref BaseRec, false)) return false; |
|
| 373 |
|
|
| 374 |
// 結合工事では無ければ処理しない |
|
| 375 |
if (BaseRec.JoinFlg == (int)CommonDefine.BaseInfoJoinFlg.Standard) return true; |
|
| 376 |
|
|
| 377 |
// 対象の親番号を取得する |
|
| 378 |
int ParentCode = ClsProcessExist.GetParentConstrCode(TargetCode); |
|
| 379 |
|
|
| 380 |
// 結合している工事番号をすべて取得する |
|
| 381 |
strSQL = "SELECT A.CONSTRUCTIONCODE, A.FLUCTUATIONCODE, D.JOINFLG, B.FLUCTUATIONCODE, C.JOINFLG FROM CONSTRUCTIONLINK A"; |
|
| 382 |
strSQL += " LEFT JOIN CONSTRUCTIONLINK B ON B.CONSTRUCTIONCODE = A.FLUCTUATIONCODE"; |
|
| 383 |
strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO C ON C.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE"; |
|
| 384 |
strSQL += " , CONSTRUCTIONBASEINFO D"; |
|
| 385 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", ParentCode);
|
|
| 386 |
strSQL += " AND D.CONSTRUCTIONCODE = A.FLUCTUATIONCODE"; |
|
| 387 |
strSQL += " ORDER BY D.JOINFLG ASC, C.JOINFLG ASC"; |
|
| 388 |
|
|
| 389 |
ArrayList arList = new ArrayList(); |
|
| 390 |
if (!BaseDB.ExecuteReader(strSQL, ref arList, false)) return false; |
|
| 391 |
if (arList.Count == 0) return false; |
|
| 392 |
|
|
| 393 |
List<int> CodeList = new List<int>(); |
|
| 394 |
int FCode = 0; |
|
| 395 |
int SCode = 0; |
|
| 396 |
foreach (object[] objRec in arList) |
|
| 397 |
{
|
|
| 398 |
FCode = CommonMotions.cnvInt(objRec[1]); |
|
| 399 |
SCode = CommonMotions.cnvInt(objRec[3]); |
|
| 400 |
|
|
| 401 |
if (FCode != 0) CodeList.Add(FCode); |
|
| 402 |
if (SCode != 0) CodeList.Add(SCode); |
|
| 403 |
} |
|
| 404 |
|
|
| 405 |
// 工事進捗を取得する |
|
| 406 |
strSQL = "SELECT MIN(CONSTRUCTIONSTATUSFLG), MAX(CONSTRUCTIONSTATUSFLG)"; |
|
| 407 |
strSQL += " FROM CONSTRUCTIONBASEINFO"; |
|
| 408 |
strSQL += " WHERE CONSTRUCTIONCODE IN (";
|
|
| 409 |
for (int i = 0; i < CodeList.Count; i++) |
|
| 410 |
{
|
|
| 411 |
if (i != 0) strSQL += ", "; |
|
| 412 |
strSQL += CodeList[i].ToString(); |
|
| 413 |
} |
|
| 414 |
strSQL += ")"; |
|
| 415 |
|
|
| 416 |
arList.Clear(); |
|
| 417 |
if (!BaseDB.ExecuteReader(strSQL, ref arList, false)) return false; |
|
| 418 |
if (arList.Count == 0) return false; |
|
| 419 |
object[] StatRec = (object[])arList[0]; |
|
| 420 |
|
|
| 421 |
int MinStat = CommonMotions.cnvInt(StatRec[0]); |
|
| 422 |
int MaxStat = CommonMotions.cnvInt(StatRec[1]); |
|
| 423 |
|
|
| 424 |
// 親工事進捗更新 |
|
| 425 |
if (!BaseDB.UpdateFeild(ParentCode, (int)IOConstructionBaseInfo.TableColumn.ConstructionStatusFlg, MinStat, false)) |
|
| 426 |
{
|
|
| 427 |
return false; |
|
| 428 |
} |
|
| 429 |
|
|
| 430 |
return true; |
|
| 431 |
} |
|
| 432 |
catch (Exception ex) |
|
| 433 |
{
|
|
| 434 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 435 |
return false; |
|
| 436 |
} |
|
| 437 |
} |
|
| 438 |
#endregion |
|
| 78 | 439 |
} |
| 79 | 440 |
} |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs | ||
|---|---|---|
| 527 | 527 |
foreach (ConstructionLedgerDetail CurRec in DetailList) |
| 528 | 528 |
{
|
| 529 | 529 |
// コードが担当者ではない場合は処理しない |
| 530 |
if (CurRec.CompanyType != (int)CommonDefine.SearchLogDataType.Person) continue;
|
|
| 530 |
if (CurRec.CompanyType != (int)CommonDefine.CodeDataType.Person) continue;
|
|
| 531 | 531 |
// コードがない場合は処理しない |
| 532 | 532 |
if (CurRec.CompanyCode == 0) continue; |
| 533 | 533 |
// 施工管理中担当者ではない場合は処理しない |
| ... | ... | |
| 806 | 806 |
} |
| 807 | 807 |
} |
| 808 | 808 |
#endregion |
| 809 |
|
|
| 810 |
#region 結合工事作成処理 |
|
| 811 |
/// <summary> |
|
| 812 |
/// 結合工事作成処理 |
|
| 813 |
/// </summary> |
|
| 814 |
/// <returns></returns> |
|
| 815 |
public static bool MakeJoinForBudgetData(int ConstructionCode, List<int> DateCodeList) |
|
| 816 |
{
|
|
| 817 |
FrmConstructionLedger frm = new FrmConstructionLedger(); |
|
| 818 |
try |
|
| 819 |
{
|
|
| 820 |
// 工事番号が存在しないデータは更新しない |
|
| 821 |
if (ConstructionCode == 0) return false; |
|
| 822 |
|
|
| 823 |
// 工事コードのセット |
|
| 824 |
frm.ConstructionCode = ConstructionCode; |
|
| 825 |
|
|
| 826 |
// 見えない画面を出す |
|
| 827 |
frm.WindowState = FormWindowState.Minimized; |
|
| 828 |
frm.Hide(); |
|
| 829 |
// フォーム非表示 |
|
| 830 |
frm.Visible = false; |
|
| 831 |
|
|
| 832 |
bool bSuccess = true; |
|
| 833 |
|
|
| 834 |
// データ追加処理 |
|
| 835 |
frm.JoiningCodeList = DateCodeList; |
|
| 836 |
if (!frm.JoinDataLedger) |
|
| 837 |
{
|
|
| 838 |
bSuccess = false; |
|
| 839 |
return bSuccess; |
|
| 840 |
} |
|
| 841 |
|
|
| 842 |
// データ保存処理 |
|
| 843 |
if (!frm.SaveLedgerData) |
|
| 844 |
{
|
|
| 845 |
bSuccess = false; |
|
| 846 |
return bSuccess; |
|
| 847 |
} |
|
| 848 |
|
|
| 849 |
// データ削除処理 |
|
| 850 |
if (!frm.RemoveJoinLedger) |
|
| 851 |
{
|
|
| 852 |
bSuccess = false; |
|
| 853 |
return bSuccess; |
|
| 854 |
} |
|
| 855 |
|
|
| 856 |
return bSuccess; |
|
| 857 |
} |
|
| 858 |
catch (System.Exception ex) |
|
| 859 |
{
|
|
| 860 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 861 |
return false; |
|
| 862 |
} |
|
| 863 |
finally |
|
| 864 |
{
|
|
| 865 |
// 画面を閉じる |
|
| 866 |
frm.Close(); |
|
| 867 |
|
|
| 868 |
frm.Dispose(); frm = null; |
|
| 869 |
} |
|
| 870 |
} |
|
| 871 |
#endregion |
|
| 872 |
|
|
| 873 |
#region 結合工事疑似ロールバック処理 |
|
| 874 |
/// <summary> |
|
| 875 |
/// 結合工事疑似ロールバック処理 |
|
| 876 |
/// </summary> |
|
| 877 |
/// <returns></returns> |
|
| 878 |
public static bool PseudoRollBackForBudgetData(int ConstructionCode, List<int> DateCodeList) |
|
| 879 |
{
|
|
| 880 |
FrmConstructionLedger frm = new FrmConstructionLedger(); |
|
| 881 |
try |
|
| 882 |
{
|
|
| 883 |
// 工事番号が存在しないデータは更新しない |
|
| 884 |
if (ConstructionCode == 0) return false; |
|
| 885 |
|
|
| 886 |
bool bSuccess = true; |
|
| 887 |
|
|
| 888 |
// 工事コードのセット |
|
| 889 |
frm.ConstructionCode = ConstructionCode; |
|
| 890 |
|
|
| 891 |
// データ追加処理 |
|
| 892 |
frm.JoiningCodeList = DateCodeList; |
|
| 893 |
frm.SetRollBackFlg = true; |
|
| 894 |
|
|
| 895 |
// データ削除処理 |
|
| 896 |
if (!frm.RemoveJoinLedger) |
|
| 897 |
{
|
|
| 898 |
bSuccess = false; |
|
| 899 |
return bSuccess; |
|
| 900 |
} |
|
| 901 |
|
|
| 902 |
return bSuccess; |
|
| 903 |
} |
|
| 904 |
catch (System.Exception ex) |
|
| 905 |
{
|
|
| 906 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 907 |
return false; |
|
| 908 |
} |
|
| 909 |
finally |
|
| 910 |
{
|
|
| 911 |
frm.Dispose(); frm = null; |
|
| 912 |
} |
|
| 913 |
} |
|
| 914 |
#endregion |
|
| 809 | 915 |
} |
| 810 | 916 |
} |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsExcute.cs | ||
|---|---|---|
| 61 | 61 |
TAndPCosts = 14, // 14:交通費及び購入品入力 |
| 62 | 62 |
DRList = 15, // 15:日報一覧 |
| 63 | 63 |
DRConstruction = 16, // 16:工事日報入力 |
| 64 |
Proceedings = 17, // 17:発注者打ち合わせ議事録入力 |
|
| 65 |
DailyReportList = 18, // 18:日報一覧 |
|
| 66 |
DailyReport = 19, // 19:日報全般 |
|
| 64 |
Proceedings = 17, // 17:打合せ議事録入力 |
|
| 65 |
DRWork = 18, // 18:出勤日報 |
|
| 66 |
PurchaseOrderStatus = 19, // 19:注文書発給一覧 |
|
| 67 |
OrderJoin = 20, // 20:工事結合 |
|
| 68 |
ConstructionSplit = 21, // 21:工事分割 |
|
| 67 | 69 |
} |
| 68 | 70 |
#endregion |
| 69 | 71 |
|
| ... | ... | |
| 84 | 86 |
SubContractor = 109, // 109:協力会社マスタ |
| 85 | 87 |
Orderers = 110, // 110:発注者マスタ |
| 86 | 88 |
BusinessType = 111, // 111:法人格マスタ |
| 87 |
Division = 112, // 112:区分マスタ
|
|
| 89 |
//Division = 112, // 112:区分マスタ
|
|
| 88 | 90 |
//Expenses = 113, // 113:経費率マスタ |
| 89 | 91 |
SubContractorItem = 114, // 114:協力会社工種マスタ |
| 90 | 92 |
Calender = 115, // 115:カレンダーマスタ |
| ... | ... | |
| 141 | 143 |
{ (int)ProcessExecuteNo.TAndPCosts, "交通費及び購入品等-入力"},
|
| 142 | 144 |
{ (int)ProcessExecuteNo.DRList, "工事日報-一覧"},
|
| 143 | 145 |
{ (int)ProcessExecuteNo.DRConstruction, "工事日報-入力"},
|
| 144 |
//{ (int)ProcessExecuteNo.Proceedings, "発注者打ち合わせ議事録-入力"},
|
|
| 145 |
//{ (int)ProcessExecuteNo.DailyReportList, "日報-一覧"},
|
|
| 146 |
//{ (int)ProcessExecuteNo.DailyReport, "日報全般"},
|
|
| 146 |
{ (int)ProcessExecuteNo.Proceedings, "打合せ議事録-入力"},
|
|
| 147 |
//{ (int)ProcessExecuteNo.DailyReportList, "出勤日報-入力"},
|
|
| 147 | 148 |
}; |
| 148 | 149 |
|
| 149 | 150 |
#endregion |
| ... | ... | |
| 364 | 365 |
ProcessExecuteNo_PurchaseOrderPrint(m_ProcControlPara[NowPoint]); |
| 365 | 366 |
break; |
| 366 | 367 |
|
| 367 |
case (int)ProcessExecuteNo.ConstructionLedgerList: // 11:工事詳細台帳一覧 |
|
| 368 |
case (int)ProcessExecuteNo.DepartmentExpenssList: // 11:部署別台帳一覧 |
|
| 369 |
ProcessExecuteNo_DepartmentExpenssList(m_ProcControlPara[NowPoint]); |
|
| 370 |
break; |
|
| 371 |
|
|
| 372 |
case (int)ProcessExecuteNo.ConstructionLedgerList: // 12:工事詳細台帳一覧 |
|
| 368 | 373 |
ProcessExecuteNo_ConstructionLedgerList(m_ProcControlPara[NowPoint]); |
| 369 | 374 |
break; |
| 370 | 375 |
|
| 371 |
case (int)ProcessExecuteNo.ConstructionLedger: // 12:工事詳細台帳
|
|
| 376 |
case (int)ProcessExecuteNo.ConstructionLedger: // 13:工事詳細台帳
|
|
| 372 | 377 |
ProcessExecuteNo_ConstructionLedger(m_ProcControlPara[NowPoint]); |
| 373 | 378 |
break; |
| 374 | 379 |
|
| 375 |
case (int)ProcessExecuteNo.TAndPCosts: // 13:交通費及び購入品入力
|
|
| 380 |
case (int)ProcessExecuteNo.TAndPCosts: // 14:交通費及び購入品入力
|
|
| 376 | 381 |
ProcessExecuteNo_TAndPCosts(m_ProcControlPara[NowPoint]); |
| 377 | 382 |
break; |
| 378 | 383 |
|
| 379 |
case (int)ProcessExecuteNo.DRList: // 14:工事日報一覧
|
|
| 384 |
case (int)ProcessExecuteNo.DRList: // 15:工事日報一覧
|
|
| 380 | 385 |
ProcessExecuteNo_DRList(m_ProcControlPara[NowPoint]); |
| 381 | 386 |
break; |
| 382 | 387 |
|
| 383 |
case (int)ProcessExecuteNo.DRConstruction: // 15:工事日報入力
|
|
| 388 |
case (int)ProcessExecuteNo.DRConstruction: // 16:工事日報入力
|
|
| 384 | 389 |
ProcessExecuteNo_DRConstruction(m_ProcControlPara[NowPoint]); |
| 385 | 390 |
break; |
| 386 | 391 |
|
| 387 |
case (int)ProcessExecuteNo.Proceedings: // 16:発注者打ち合わせ議事録入力
|
|
| 392 |
case (int)ProcessExecuteNo.Proceedings: // 17:打合せ議事録入力
|
|
| 388 | 393 |
ProcessExecuteNo_Proceedings(m_ProcControlPara[NowPoint]); |
| 389 | 394 |
break; |
| 390 | 395 |
|
| 391 |
case (int)ProcessExecuteNo.DailyReportList: // 17:日報一覧
|
|
| 392 |
ProcessExecuteNo_DailyReportList(m_ProcControlPara[NowPoint]); |
|
| 396 |
case (int)ProcessExecuteNo.DRWork: // 18:出勤日報入力
|
|
| 397 |
|
|
| 393 | 398 |
break; |
| 394 | 399 |
|
| 395 |
case (int)ProcessExecuteNo.DailyReport: // 18:日報等
|
|
| 396 |
ProcessExecuteNo_DailyReport(m_ProcControlPara[NowPoint]);
|
|
| 400 |
case (int)ProcessExecuteNo.PurchaseOrderStatus: // 19:注文書発給一覧
|
|
| 401 |
ProcessExecuteNo_PurchaseOrderStatus(m_ProcControlPara[NowPoint]);
|
|
| 397 | 402 |
break; |
| 398 | 403 |
|
| 399 |
case (int)ProcessExecuteNo.DepartmentExpenssList: // 19:部署別台帳一覧
|
|
| 400 |
ProcessExecuteNo_DepartmentExpenssList(m_ProcControlPara[NowPoint]);
|
|
| 404 |
case (int)ProcessExecuteNo.OrderJoin: // 20:工事結合
|
|
| 405 |
ProcessExecuteNo_OrderJoin(m_ProcControlPara[NowPoint]);
|
|
| 401 | 406 |
break; |
| 402 | 407 |
|
| 408 |
case (int)ProcessExecuteNo.ConstructionSplit: // 21:工事分割 |
|
| 409 |
ProcessExecuteNo_ConstructionSplit(m_ProcControlPara[NowPoint]); |
|
| 410 |
break; |
|
| 411 |
|
|
| 403 | 412 |
#endregion |
| 404 | 413 |
|
| 405 | 414 |
#region マスタメンテ |
| ... | ... | |
| 939 | 948 |
|
| 940 | 949 |
// パラメータセット |
| 941 | 950 |
frm.ConstructionCode = CurrentPara.IntExecParameter[0]; |
| 951 |
if (CurrentPara.IntExecParameter.Count > 2) frm.OrderNo = CurrentPara.IntExecParameter[2]; |
|
| 942 | 952 |
|
| 953 |
// 直接表示フラグのセット |
|
| 954 |
if (CurrentPara.BoolExecParameter.Count > 0) |
|
| 955 |
{
|
|
| 956 |
frm.DirectFlg = CurrentPara.BoolExecParameter[0]; |
|
| 957 |
} |
|
| 958 |
|
|
| 943 | 959 |
// フォーム表示 |
| 944 | 960 |
frm.ShowDialog(); |
| 945 | 961 |
} |
| ... | ... | |
| 1333 | 1349 |
} |
| 1334 | 1350 |
#endregion |
| 1335 | 1351 |
|
| 1336 |
#region 日報一覧
|
|
| 1352 |
#region 部署別台帳一覧
|
|
| 1337 | 1353 |
/// <summary> |
| 1338 |
/// 日報一覧
|
|
| 1354 |
/// 部署別台帳一覧
|
|
| 1339 | 1355 |
/// </summary> |
| 1340 | 1356 |
/// <returns></returns> |
| 1341 |
public static void ProcessExecuteNo_DailyReportList(ProcessParameter CurrentPara)
|
|
| 1357 |
public static void ProcessExecuteNo_DepartmentExpenssList(ProcessParameter CurrentPara)
|
|
| 1342 | 1358 |
{
|
| 1343 |
// 日報一覧
|
|
| 1344 |
FrmDailyReportList frm = new FrmDailyReportList();
|
|
| 1359 |
// 部署別台帳一覧
|
|
| 1360 |
FrmDepExpenssList frm = new FrmDepExpenssList();
|
|
| 1345 | 1361 |
try |
| 1346 | 1362 |
{
|
| 1347 |
// 次起動プロセスセット |
|
| 1348 |
frm.ProcessNo = CurrentPara.IntExecParameter[0]; |
|
| 1363 |
int ProcessNo = (int)ProcessExecuteNo.DepartmentExpenssList; |
|
| 1364 |
// 起動・編集フラグ |
|
| 1365 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 1366 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
| 1367 |
{
|
|
| 1368 |
BackProcess(); |
|
| 1369 |
return; |
|
| 1370 |
} |
|
| 1349 | 1371 |
|
| 1350 | 1372 |
// フォーム表示 |
| 1351 | 1373 |
frm.ShowDialog(); |
| 1352 |
|
|
| 1353 | 1374 |
} |
| 1354 | 1375 |
catch (Exception ex) |
| 1355 | 1376 |
{
|
| ... | ... | |
| 1363 | 1384 |
} |
| 1364 | 1385 |
#endregion |
| 1365 | 1386 |
|
| 1366 |
#region 日報入力
|
|
| 1387 |
#region 工事詳細台帳一覧(個人指定)
|
|
| 1367 | 1388 |
/// <summary> |
| 1368 |
/// 工事日報入力
|
|
| 1389 |
/// 工事詳細台帳一覧(個人指定)
|
|
| 1369 | 1390 |
/// </summary> |
| 1370 | 1391 |
/// <returns></returns> |
| 1371 |
public static void ProcessExecuteNo_DailyReport(ProcessParameter CurrentPara)
|
|
| 1392 |
public static void ProcessExecuteNo_ConstrLedgerPersonList(ProcessParameter CurrentPara)
|
|
| 1372 | 1393 |
{
|
| 1373 |
// 日報入力
|
|
| 1374 |
FrmDailyReport frm = new FrmDailyReport();
|
|
| 1394 |
// 工事詳細台帳一覧
|
|
| 1395 |
FrmLedgerStatus frm = new FrmLedgerStatus();
|
|
| 1375 | 1396 |
try |
| 1376 | 1397 |
{
|
| 1377 |
// ----- パラメータセット |
|
| 1378 |
// 選択工事番号セット |
|
| 1379 |
frm.ConstructionCode = CurrentPara.IntExecParameter[0]; |
|
| 1398 |
int ProcessNo = (int)ProcessExecuteNo.ConstructionLedgerList; |
|
| 1399 |
// 起動・編集フラグ |
|
| 1400 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 1401 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
| 1402 |
{
|
|
| 1403 |
BackProcess(); |
|
| 1404 |
return; |
|
| 1405 |
} |
|
| 1380 | 1406 |
|
| 1381 |
// 選択行担当者セット
|
|
| 1382 |
frm.PersonCode = CurrentPara.IntExecParameter[1];
|
|
| 1407 |
// 次起動プロセスセット
|
|
| 1408 |
frm.ExecuteFlg = CurrentPara.IntExecParameter[0];
|
|
| 1383 | 1409 |
|
| 1384 |
// 選択行作成日セット
|
|
| 1385 |
frm.ReportDate = CommonMotions.cnvDate(CurrentPara.StringExecParameter[0]);
|
|
| 1410 |
// 初期選択無しフラグ
|
|
| 1411 |
frm.FirstStartFlg = false;
|
|
| 1386 | 1412 |
|
| 1413 |
// 初期選択年度 |
|
| 1414 |
frm.FirstStartPeriod = CurrentPara.IntExecParameter[1]; |
|
| 1415 |
|
|
| 1416 |
// 初期選択部署コード |
|
| 1417 |
frm.FirstStartDepartmentCode = CurrentPara.IntExecParameter[2]; |
|
| 1418 |
|
|
| 1419 |
// 初期選択担当者コード |
|
| 1420 |
frm.FirstStartPersonCode = CurrentPara.IntExecParameter[3]; |
|
| 1421 |
|
|
| 1387 | 1422 |
// フォーム表示 |
| 1388 | 1423 |
frm.ShowDialog(); |
| 1389 | 1424 |
} |
| ... | ... | |
| 1399 | 1434 |
} |
| 1400 | 1435 |
#endregion |
| 1401 | 1436 |
|
| 1402 |
#region 部署別台帳一覧
|
|
| 1437 |
#region 注文書発給一覧
|
|
| 1403 | 1438 |
/// <summary> |
| 1404 |
/// 部署別台帳一覧
|
|
| 1439 |
/// 注文書発給一覧
|
|
| 1405 | 1440 |
/// </summary> |
| 1406 |
/// <returns></returns>
|
|
| 1407 |
public static void ProcessExecuteNo_DepartmentExpenssList(ProcessParameter CurrentPara)
|
|
| 1441 |
/// <param name="CurrentPara"></param>
|
|
| 1442 |
public static void ProcessExecuteNo_PurchaseOrderStatus(ProcessParameter CurrentPara)
|
|
| 1408 | 1443 |
{
|
| 1409 |
// 部署別台帳一覧
|
|
| 1410 |
FrmDepExpenssList frm = new FrmDepExpenssList();
|
|
| 1444 |
// 注文書発給一覧
|
|
| 1445 |
FrmPurchaseOrderStatus frm = new FrmPurchaseOrderStatus();
|
|
| 1411 | 1446 |
try |
| 1412 | 1447 |
{
|
| 1413 |
int ProcessNo = (int)ProcessExecuteNo.DepartmentExpenssList; |
|
| 1414 |
// 起動・編集フラグ |
|
| 1415 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 1416 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
| 1417 |
{
|
|
| 1418 |
BackProcess(); |
|
| 1419 |
return; |
|
| 1420 |
} |
|
| 1421 |
|
|
| 1422 | 1448 |
// フォーム表示 |
| 1423 | 1449 |
frm.ShowDialog(); |
| 1450 |
|
|
| 1424 | 1451 |
} |
| 1425 | 1452 |
catch (Exception ex) |
| 1426 | 1453 |
{
|
| ... | ... | |
| 1434 | 1461 |
} |
| 1435 | 1462 |
#endregion |
| 1436 | 1463 |
|
| 1437 |
#region 工事詳細台帳一覧(個人指定)
|
|
| 1464 |
#region 工事結合
|
|
| 1438 | 1465 |
/// <summary> |
| 1439 |
/// 工事詳細台帳一覧(個人指定)
|
|
| 1466 |
/// 工事結合
|
|
| 1440 | 1467 |
/// </summary> |
| 1441 |
/// <returns></returns>
|
|
| 1442 |
public static void ProcessExecuteNo_ConstrLedgerPersonList(ProcessParameter CurrentPara)
|
|
| 1468 |
/// <param name="CurrentPara"></param>
|
|
| 1469 |
public static void ProcessExecuteNo_OrderJoin(ProcessParameter CurrentPara)
|
|
| 1443 | 1470 |
{
|
| 1444 |
// 工事詳細台帳一覧
|
|
| 1445 |
FrmLedgerStatus frm = new FrmLedgerStatus();
|
|
| 1471 |
// 工事結合
|
|
| 1472 |
FrmConstructionJoin frm = new FrmConstructionJoin();
|
|
| 1446 | 1473 |
try |
| 1447 | 1474 |
{
|
| 1448 |
int ProcessNo = (int)ProcessExecuteNo.ConstructionLedgerList; |
|
| 1449 |
// 起動・編集フラグ |
|
| 1450 |
int EditFlg = (int)CommonDefine.ProcessDataEdit.Reference; |
|
| 1451 |
if (!ClsSecurityPermission.GetExecutePermission(ProcessNo, ref EditFlg)) |
|
| 1452 |
{
|
|
| 1453 |
BackProcess(); |
|
| 1454 |
return; |
|
| 1455 |
} |
|
| 1475 |
// フォーム表示 |
|
| 1476 |
frm.ShowDialog(); |
|
| 1456 | 1477 |
|
| 1457 |
// 次起動プロセスセット |
|
| 1458 |
frm.ExecuteFlg = CurrentPara.IntExecParameter[0]; |
|
| 1478 |
} |
|
| 1479 |
catch (Exception ex) |
|
| 1480 |
{
|
|
| 1481 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
|
| 1482 |
BackProcess(); |
|
| 1483 |
} |
|
| 1484 |
finally |
|
| 1485 |
{
|
|
| 1486 |
frm.Dispose(); frm = null; |
|
| 1487 |
} |
|
| 1488 |
} |
|
| 1489 |
#endregion |
|
| 1459 | 1490 |
|
| 1460 |
// 初期選択無しフラグ |
|
| 1461 |
frm.FirstStartFlg = false; |
|
| 1462 |
|
|
| 1463 |
// 初期選択年度 |
|
| 1464 |
frm.FirstStartPeriod = CurrentPara.IntExecParameter[1]; |
|
| 1465 |
|
|
| 1466 |
// 初期選択部署コード |
|
| 1467 |
frm.FirstStartDepartmentCode = CurrentPara.IntExecParameter[2]; |
|
| 1468 |
|
|
| 1469 |
// 初期選択担当者コード |
|
| 1470 |
frm.FirstStartPersonCode = CurrentPara.IntExecParameter[3]; |
|
| 1471 |
|
|
| 1491 |
#region 工事分割 |
|
| 1492 |
/// <summary> |
|
| 1493 |
/// 工事分割 |
|
| 1494 |
/// </summary> |
|
| 1495 |
/// <param name="CurrentPara"></param> |
|
| 1496 |
public static void ProcessExecuteNo_ConstructionSplit(ProcessParameter CurrentPara) |
|
| 1497 |
{
|
|
| 1498 |
// 工事分割 |
|
| 1499 |
FrmConstructionSplit frm = new FrmConstructionSplit(); |
|
| 1500 |
try |
|
| 1501 |
{
|
|
| 1472 | 1502 |
// フォーム表示 |
| 1473 | 1503 |
frm.ShowDialog(); |
| 1504 |
|
|
| 1474 | 1505 |
} |
| 1475 | 1506 |
catch (Exception ex) |
| 1476 | 1507 |
{
|
| ... | ... | |
| 2457 | 2488 |
{
|
| 2458 | 2489 |
frm.ConstructionCode = CurrentPara.IntExecParameter[0]; |
| 2459 | 2490 |
frm.ApprovalCode = CurrentPara.IntExecParameter[1]; |
| 2491 |
frm.OrderNo = CurrentPara.IntExecParameter[2]; |
|
| 2492 |
for (int i = 3; i < CurrentPara.IntExecParameter.Count; i++) |
|
| 2493 |
{
|
|
| 2494 |
frm.PurchaseOrderSeqNo.Add(CurrentPara.IntExecParameter[i]); |
|
| 2495 |
} |
|
| 2460 | 2496 |
|
| 2461 | 2497 |
// フォーム表示 |
| 2462 | 2498 |
frm.ShowDialog(); |
| trunk/src/ProcessManagement/ProcessManagement/Common/Process/ClsProcessExist.cs | ||
|---|---|---|
| 50 | 50 |
private static int m_ConstructionCode = 0; |
| 51 | 51 |
#endregion |
| 52 | 52 |
|
| 53 |
#region 結合工事フラグ |
|
| 54 |
/// <summary> |
|
| 55 |
/// 結合工事フラグ |
|
| 56 |
/// </summary> |
|
| 57 |
private static int m_BaseInfoJoinFlg = 0; |
|
| 53 | 58 |
#endregion |
| 54 | 59 |
|
| 60 |
#region 増減工事フラグ |
|
| 61 |
/// <summary> |
|
| 62 |
/// 増減工事フラグ |
|
| 63 |
/// </summary> |
|
| 64 |
private static int m_BaseInfoTyingFlg = 0; |
|
| 65 |
#endregion |
|
| 66 |
|
|
| 67 |
#region 結合親工事コード |
|
| 68 |
/// <summary> |
|
| 69 |
/// 結合親工事コード |
|
| 70 |
/// </summary> |
|
| 71 |
private static int m_SearchCode = 0; |
|
| 72 |
#endregion |
|
| 73 |
|
|
| 74 |
#region 結合構成工事コード |
|
| 75 |
/// <summary> |
|
| 76 |
/// 結合構成工事コード |
|
| 77 |
/// </summary> |
|
| 78 |
private static List<int> m_CodeList = new List<int>(); |
|
| 79 |
#endregion |
|
| 80 |
|
|
| 81 |
#region 機能承認回数 |
|
| 82 |
/// <summary> |
|
| 83 |
/// 機能承認回数 |
|
| 84 |
/// </summary> |
|
| 85 |
private static int m_OrderNo = 1; |
|
| 86 |
#endregion |
|
| 87 |
|
|
| 88 |
#endregion |
|
| 89 |
|
|
| 55 | 90 |
#region プロパティ |
| 56 | 91 |
|
| 57 | 92 |
#region 工事番号 |
| ... | ... | |
| 65 | 100 |
} |
| 66 | 101 |
#endregion |
| 67 | 102 |
|
| 103 |
#region 機能承認回数 |
|
| 104 |
/// <summary> |
|
| 105 |
/// 機能承認回数 |
|
| 106 |
/// </summary> |
|
| 107 |
public static int OrderNo |
|
| 108 |
{
|
|
| 109 |
get { return m_OrderNo; }
|
|
| 110 |
set { m_OrderNo = value; }
|
|
| 111 |
} |
|
| 68 | 112 |
#endregion |
| 69 | 113 |
|
| 70 |
#region 紐付きの場合は親コードを返す |
|
| 114 |
#endregion |
|
| 115 |
|
|
| 116 |
#region 増減工事・結合工事の場合は親コードを返す |
|
| 71 | 117 |
/// <summary> |
| 72 |
/// 紐付きの場合は親コードを返す
|
|
| 118 |
/// 増減工事・結合工事の場合は親コードを返す
|
|
| 73 | 119 |
/// </summary> |
| 74 |
/// <param name="MyType"></param> |
|
| 75 |
/// <param name="MyCode"></param> |
|
| 120 |
/// <param name="InputCode"></param> |
|
| 76 | 121 |
/// <returns></returns> |
| 77 |
public static int GetParentConstrCode(int MyCode)
|
|
| 122 |
public static int GetParentConstrCode(int InputCode)
|
|
| 78 | 123 |
{
|
| 79 | 124 |
IOConstructionBaseInfo BaseDB = new IOConstructionBaseInfo(); |
| 80 | 125 |
IOConstructionLink LinkDB = new IOConstructionLink(); |
| 81 | 126 |
try |
| 82 | 127 |
{
|
| 83 |
|
|
| 84 |
string strBase = BaseDB.CreatePrimarykeyString(MyCode);
|
|
| 128 |
// 工事情報取得 |
|
| 129 |
string strBase = BaseDB.CreatePrimarykeyString(InputCode);
|
|
| 85 | 130 |
ConstructionBaseInfo BaseRec = new ConstructionBaseInfo(); |
| 86 |
if (!BaseDB.SelectAction(strBase, ref BaseRec)) return MyCode;
|
|
| 131 |
if (!BaseDB.SelectAction(strBase, ref BaseRec)) return InputCode;
|
|
| 87 | 132 |
|
| 88 |
// 紐付きでない場合は工事コードを返す |
|
| 89 |
if (BaseRec.TyingFlg != (int)CommonDefine.BaseInfoTyingFlg.Tying) return MyCode; |
|
| 133 |
// 結合工事のチェック |
|
| 134 |
if (BaseRec.JoinFlg != (int)CommonDefine.BaseInfoJoinFlg.Standard) |
|
| 135 |
{
|
|
| 136 |
// 結合工事は結合親工事番号を返す |
|
| 137 |
int FuncCnt = 0; |
|
| 138 |
ArrayList ParList = new ArrayList(); |
|
| 139 |
ClsChangeBaseInfoData.GetParentData(InputCode, ref ParList, ref FuncCnt); |
|
| 140 |
// データ無はエラー |
|
| 141 |
if (ParList.Count == 0) return InputCode; |
|
| 90 | 142 |
|
| 91 |
string strLink = string.Format(" WHERE FluctuationCode = {0}", MyCode);
|
|
| 143 |
object[] objRec = (object[])ParList[0]; |
|
| 144 |
return CommonMotions.cnvInt(objRec[0]); |
|
| 145 |
} |
|
| 146 |
else |
|
| 147 |
{
|
|
| 148 |
// 増減工事でない場合はそのまま工事コードを返す |
|
| 149 |
if (BaseRec.TyingFlg != (int)CommonDefine.BaseInfoTyingFlg.Tying) return InputCode; |
|
| 150 |
} |
|
| 151 |
// 増減工事の場合は親コードを検索する |
|
| 152 |
string strLink = string.Format(" WHERE FluctuationCode = {0}", InputCode);
|
|
| 92 | 153 |
ConstructionLink LinkRec = new ConstructionLink(); |
| 93 |
if (!LinkDB.SelectAction(strLink, ref LinkRec)) return MyCode;
|
|
| 154 |
if (!LinkDB.SelectAction(strLink, ref LinkRec)) return InputCode;
|
|
| 94 | 155 |
|
| 95 | 156 |
return LinkRec.ConstructionCode; |
| 96 | 157 |
} |
| 97 | 158 |
catch (Exception ex) |
| 98 | 159 |
{
|
| 99 | 160 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message);
|
| 100 |
return MyCode;
|
|
| 161 |
return InputCode;
|
|
| 101 | 162 |
} |
| 102 | 163 |
finally |
| 103 | 164 |
{
|
| ... | ... | |
| 107 | 168 |
} |
| 108 | 169 |
#endregion |
| 109 | 170 |
|
| 171 |
#region 結合・増減の対象リストを作成する |
|
| 172 |
/// <summary> |
|
| 173 |
/// 結合・増減の対象リストを作成する |
|
| 174 |
/// </summary> |
|
| 175 |
/// <param name="CodeList"></param> |
|
| 176 |
public static void GetTargetList(IOConstructionBaseInfo BaseDB, ref List<int> CodeList, bool ParentAdd) |
|
| 177 |
{
|
|
| 178 |
try |
|
| 179 |
{
|
|
| 180 |
// 親工事番号を取得する |
|
| 181 |
int ParentCode = ClsProcessExist.GetParentConstrCode(m_ConstructionCode); |
|
| 182 |
// データ無はエラー |
|
| 183 |
if (ParentCode == 0) return; |
|
| 184 |
|
|
| 185 |
// 対象工事の結合・増減を確認する |
|
| 186 |
string strSQL = "SELECT CONSTRUCTIONCODE, JoinFlg FROM CONSTRUCTIONBASEINFO A"; |
|
| 187 |
strSQL += BaseDB.CreatePrimarykeyString(m_ConstructionCode); |
|
| 188 |
ArrayList BaseList = new ArrayList(); |
|
| 189 |
|
|
| 190 |
if (!BaseDB.ExecuteReader(strSQL, ref BaseList)) return; |
|
| 191 |
if (BaseList.Count == 0) return; |
|
| 192 |
|
|
| 193 |
bool bJoinFlg = true; |
|
| 194 |
object[] objRec1 = (object[])BaseList[0]; |
|
| 195 |
if (CommonMotions.cnvInt(objRec1[1]) == (int)CommonDefine.BaseInfoJoinFlg.Standard) bJoinFlg = false; |
|
| 196 |
|
|
| 197 |
int iCode = CommonDefine.ProjectsStatus.First(x => x.Value.Equals("非 受 注")).Key;
|
|
| 198 |
int LinkJoin = (int)CommonDefine.LinkDataType.JoinType; |
|
| 199 |
int LinkFluctuation = (int)CommonDefine.LinkDataType.FluctuationType; |
|
| 200 |
|
|
| 201 |
if (bJoinFlg) |
|
| 202 |
{
|
|
| 203 |
// 結合工事 |
|
| 204 |
strSQL = "SELECT A.FLUCTUATIONCODE, D.FLUCTUATIONCODE"; |
|
| 205 |
strSQL += " FROM CONSTRUCTIONLINK A"; |
|
| 206 |
strSQL += string.Format(" LEFT OUTER JOIN CONSTRUCTIONBASEINFO B ON B.CONSTRUCTIONCODE = A.FLUCTUATIONCODE AND B.CONSTRUCTIONSTATUSFLG != {0}", iCode);
|
|
| 207 |
strSQL += string.Format(" LEFT JOIN CONSTRUCTIONLINK D ON D.CONSTRUCTIONCODE = A.FLUCTUATIONCODE AND D.LINKTYPE = {0}", LinkFluctuation);
|
|
| 208 |
strSQL += string.Format(" LEFT OUTER JOIN CONSTRUCTIONBASEINFO F ON F.CONSTRUCTIONCODE = D.CONSTRUCTIONCODE AND F.CONSTRUCTIONSTATUSFLG != {0}", iCode);
|
|
| 209 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", ParentCode);
|
|
| 210 |
strSQL += string.Format(" AND A.LINKTYPE = {0}", LinkJoin);
|
|
| 211 |
strSQL += " ORDER BY A.FLUCTUATIONCODE ASC"; |
|
| 212 |
|
|
| 213 |
// 親工事の追加 |
|
| 214 |
if (ParentAdd) CodeList.Add(ParentCode); |
|
| 215 |
} |
|
| 216 |
else |
|
| 217 |
{
|
|
| 218 |
// 増減工事 |
|
| 219 |
strSQL = "SELECT A.CONSTRUCTIONCODE, A.FLUCTUATIONCODE"; |
|
| 220 |
strSQL += " FROM CONSTRUCTIONLINK A"; |
|
| 221 |
strSQL += string.Format(" LEFT OUTER JOIN CONSTRUCTIONBASEINFO B ON B.CONSTRUCTIONCODE = A.FLUCTUATIONCODE AND B.CONSTRUCTIONSTATUSFLG != {0}", iCode);
|
|
| 222 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", ParentCode);
|
|
| 223 |
strSQL += string.Format(" AND A.LINKTYPE = {0}", LinkFluctuation);
|
|
| 224 |
strSQL += " ORDER BY A.FLUCTUATIONCODE ASC"; |
|
| 225 |
|
|
| 226 |
// 親工事の追加 |
|
| 227 |
CodeList.Add(ParentCode); |
|
| 228 |
} |
|
他の形式にエクスポート: Unified diff