リビジョン 341
SQLカンマ整形
未作成台帳一覧:経費数可変対応・バグ修正
部署経費マスタ:経費名項目追加
部署経費取得ロジック:共通処理として追加
工事情報明細:登録時文字数0のデータが登録できるバグ修正
branches/src/ProcessManagement/ProcessManagement/Common/CommonMotions.cs | ||
---|---|---|
3062 | 3062 |
|
3063 | 3063 |
strSQL.Append(" Union Select"); |
3064 | 3064 |
strSQL.Append(" A2.ConstrDepCode As DEPARTMENTCODE"); |
3065 |
strSQL.Append(" , B2.DetailString As DEPARTMENTSTRING");
|
|
3066 |
strSQL.Append(" , ifnull(C2.DisplayOrder, 10) As DISPLAYORDER");
|
|
3065 |
strSQL.Append(", B2.DetailString As DEPARTMENTSTRING"); |
|
3066 |
strSQL.Append(", ifnull(C2.DisplayOrder, 10) As DISPLAYORDER"); |
|
3067 | 3067 |
strSQL.Append(" From Constructionbaseinfo As A2"); |
3068 | 3068 |
strSQL.Append(" Inner Join constructionbaseinfodetail As B2"); |
3069 | 3069 |
strSQL.Append(" On B2.ConstructionCode = A2.ConstructionCode"); |
... | ... | |
3241 | 3241 |
} |
3242 | 3242 |
#endregion |
3243 | 3243 |
|
3244 |
#region 経費率リスト取得処理 |
|
3245 |
/// <summary> |
|
3246 |
/// 経費率リストを取得する |
|
3247 |
/// </summary> |
|
3248 |
/// <returns></returns> |
|
3249 |
public static bool GetExpensesList(int Preiod, int DepartmentCode, ref ArrayList ExpensesList) |
|
3250 |
{ |
|
3251 |
IOMDepartmentExpenses expDB = new IOMDepartmentExpenses(); |
|
3252 |
try |
|
3253 |
{ |
|
3254 |
// 部署経費率マスタ取得 |
|
3255 |
StringBuilder strSQL = new StringBuilder(); |
|
3256 |
if (CheckNowSeason(Preiod)) |
|
3257 |
{ // 今期データ |
|
3258 |
strSQL.Append("SELECT"); |
|
3259 |
strSQL.Append(" A.NAMESTRING"); |
|
3260 |
strSQL.Append(", IFNULL(B.EXPENSESRAITO, 0)"); |
|
3261 |
strSQL.Append(", A.NAMECODE"); |
|
3262 |
strSQL.Append(" FROM"); |
|
3263 |
strSQL.Append(" DIVISIONMASTER AS A"); |
|
3264 |
strSQL.Append(" LEFT JOIN ("); |
|
3265 |
strSQL.Append("SELECT"); |
|
3266 |
strSQL.Append(" NAMECODE"); |
|
3267 |
strSQL.Append(", DEPARTMENTCODE"); |
|
3268 |
strSQL.Append(", EXPENSESRAITO"); |
|
3269 |
strSQL.Append(", EXPENSESPERIOD"); |
|
3270 |
strSQL.Append(" FROM"); |
|
3271 |
strSQL.Append(" DEPARTMENTEXPENSESMASTER) AS B"); |
|
3272 |
strSQL.Append(" ON A.NAMECODE = B.NAMECODE"); |
|
3273 |
strSQL.AppendFormat(" AND B.EXPENSESPERIOD = {0}", Preiod); |
|
3274 |
strSQL.AppendFormat(" AND B.DEPARTMENTCODE = {0}", DepartmentCode); |
|
3275 |
strSQL.AppendFormat(" WHERE A.DIVISIONCODE = {0}", (int)DivisionMaster.DivisionMasterCodeDef.ConstructionExpenses); |
|
3276 |
strSQL.Append(" ORDER BY A.DISPLAYORDER"); |
|
3277 |
} |
|
3278 |
else |
|
3279 |
{ // 以前のデータ |
|
3280 |
strSQL.Append("SELECT"); |
|
3281 |
strSQL.Append(" NAMESTRING"); |
|
3282 |
strSQL.Append(", EXPENSESRAITO"); |
|
3283 |
strSQL.Append(", NAMECODE"); |
|
3284 |
strSQL.Append(" FROM"); |
|
3285 |
strSQL.Append(" DEPARTMENTEXPENSESMASTER AS B"); |
|
3286 |
strSQL.AppendFormat(" WHERE B.EXPENSESPERIOD = {0}", Preiod); |
|
3287 |
strSQL.AppendFormat(" AND B.DEPARTMENTCODE = {0}", DepartmentCode); |
|
3288 |
strSQL.Append(" ORDER BY B.DISPLAYORDER"); |
|
3289 |
} |
|
3290 |
|
|
3291 |
ExpensesList.Clear(); |
|
3292 |
if (!expDB.ExecuteReader(strSQL.ToString(), ref ExpensesList)) return false; |
|
3293 |
if (ExpensesList.Count == 0) return false; |
|
3294 |
|
|
3295 |
return true; |
|
3296 |
} |
|
3297 |
catch (Exception ex) |
|
3298 |
{ |
|
3299 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(), ex.Message); |
|
3300 |
return false; |
|
3301 |
} |
|
3302 |
finally |
|
3303 |
{ |
|
3304 |
expDB.close(); expDB = null; |
|
3305 |
} |
|
3306 |
} |
|
3244 | 3307 |
#endregion |
3245 | 3308 |
|
3309 |
#endregion |
|
3310 |
|
|
3246 | 3311 |
#region ---------- Excel向け操作メソッド |
3247 | 3312 |
#region オブジェクト開放 |
3248 | 3313 |
/// <summary> |
branches/src/ProcessManagement/ProcessManagement/Common/CommonVersion.cs | ||
---|---|---|
14 | 14 |
/// <summary> |
15 | 15 |
/// 本体バージョン |
16 | 16 |
/// </summary> |
17 |
public static int s_SystemVersion = 178;
|
|
17 |
public static int s_SystemVersion = 180;
|
|
18 | 18 |
|
19 | 19 |
/// <summary> |
20 | 20 |
/// コピー・環境バージョン |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeBaseInfoData.cs | ||
---|---|---|
362 | 362 |
strParent += " FROM CONSTRUCTIONLINK A"; |
363 | 363 |
strParent += " LEFT OUTER JOIN CONSTRUCTIONBASEINFODETAIL F ON F.CONSTRUCTIONCODE = A.CONSTRUCTIONCODE"; |
364 | 364 |
strParent += string.Format(" AND F.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName); |
365 |
strParent += " , CONSTRUCTIONBASEINFO B";
|
|
365 |
strParent += ", CONSTRUCTIONBASEINFO B"; |
|
366 | 366 |
|
367 | 367 |
strParent += string.Format(" WHERE A.FLUCTUATIONCODE = {0}", SearchCode); |
368 | 368 |
|
... | ... | |
442 | 442 |
strSQL = "SELECT A.CONSTRUCTIONCODE, A.FLUCTUATIONCODE, D.JOINFLG, B.FLUCTUATIONCODE, C.JOINFLG FROM CONSTRUCTIONLINK A"; |
443 | 443 |
strSQL += " LEFT JOIN CONSTRUCTIONLINK B ON B.CONSTRUCTIONCODE = A.FLUCTUATIONCODE"; |
444 | 444 |
strSQL += " LEFT JOIN CONSTRUCTIONBASEINFO C ON C.CONSTRUCTIONCODE = B.CONSTRUCTIONCODE"; |
445 |
strSQL += " , CONSTRUCTIONBASEINFO D";
|
|
445 |
strSQL += ", CONSTRUCTIONBASEINFO D"; |
|
446 | 446 |
strSQL += string.Format(" WHERE A.CONSTRUCTIONCODE = {0}", ParentCode); |
447 | 447 |
strSQL += " AND D.CONSTRUCTIONCODE = A.FLUCTUATIONCODE"; |
448 | 448 |
strSQL += " ORDER BY D.JOINFLG ASC, C.JOINFLG ASC"; |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsChangeLedgerData.cs | ||
---|---|---|
339 | 339 |
strSQL.Clear(); |
340 | 340 |
strSQL.Append("UPDATE CONSTRUCTIONLEDGER SET"); |
341 | 341 |
strSQL.AppendFormat(" TOTALPAYMENT = {0}", Payment); |
342 |
strSQL.AppendFormat(" , GROSSPROFIT = {0}", (Billing - Payment));
|
|
343 |
strSQL.AppendFormat(" , Allowance = {0}", Allowance);
|
|
344 |
strSQL.AppendFormat(" , NETPROFIT = {0}", (Billing - (Payment + Allowance + PExpenses)));
|
|
342 |
strSQL.AppendFormat(", GROSSPROFIT = {0}", (Billing - Payment)); |
|
343 |
strSQL.AppendFormat(", Allowance = {0}", Allowance); |
|
344 |
strSQL.AppendFormat(", NETPROFIT = {0}", (Billing - (Payment + Allowance + PExpenses))); |
|
345 | 345 |
strSQL.AppendFormat(" WHERE CONSTRUCTIONCODE = {0}", ConstrCode); |
346 | 346 |
if (!LedgerExcuteDB.ExecuteNonQuery(strSQL.ToString(), false)) |
347 | 347 |
{ |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsCommonCosts.cs | ||
---|---|---|
49 | 49 |
#region 積み上げ共通仮設費 |
50 | 50 |
/// <summary> |
51 | 51 |
/// 積み上げ共通仮設費[工種キー] |
52 |
/// 10 積み上げ共通仮設費 ※公共工事
|
|
52 |
/// 11 積み上げ共通仮設費 ※公共工事
|
|
53 | 53 |
/// </summary> |
54 |
public static int s_PileUpCommonTempory = 10;
|
|
54 |
public static int s_PileUpCommonTempory = 11;
|
|
55 | 55 |
#endregion |
56 | 56 |
|
57 | 57 |
#region 共通仮設算定率 |
branches/src/ProcessManagement/ProcessManagement/Common/Process/ClsSystemOnceExecute.cs | ||
---|---|---|
311 | 311 |
string strSQL = "SELECT A.DETAILSTRING, C.PERSONCODE CCODE, C.PERSONNAME CNAME"; |
312 | 312 |
strSQL += " FROM ConstructionBaseInfo P"; |
313 | 313 |
strSQL += string.Format(" LEFT JOIN PERSONINCHARGEMASTER C ON C.PERSONCODE = {0}", wrkRec.PersonCode); |
314 |
strSQL += " , CONSTRUCTIONBASEINFODETAIL A";
|
|
314 |
strSQL += ", CONSTRUCTIONBASEINFODETAIL A"; |
|
315 | 315 |
strSQL += string.Format(" WHERE P.CONSTRUCTIONCODE = {0}", wrkRec.ConstructionCode); |
316 | 316 |
strSQL += string.Format(" AND A.CONSTRUCTIONCODE = P.CONSTRUCTIONCODE AND A.DETAILNO = {0}", (int)ConstructionBaseInfoDetail.DataNoDef.ConstructionName); |
317 | 317 |
ArrayList arList = new ArrayList(); |
... | ... | |
502 | 502 |
strSQL.Append(", t1.PERSONCODE"); |
503 | 503 |
strSQL.Append(" ORDER BY"); |
504 | 504 |
strSQL.Append(" t1.CONSTRUCTIONCODE"); |
505 |
strSQL.Append(" , t1.REPAYPLANDATE");
|
|
505 |
strSQL.Append(", t1.REPAYPLANDATE"); |
|
506 | 506 |
} |
507 | 507 |
catch (Exception ex) |
508 | 508 |
{ |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOActionScheduleData.cs | ||
---|---|---|
74 | 74 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
75 | 75 |
strcmd.Append("SELECT"); |
76 | 76 |
strcmd.Append(" DATE_FORMAT(TargetDate, '%Y/%m/%d')"); |
77 |
strcmd.Append(" ,PersonCode");
|
|
78 |
strcmd.Append(" ,ActionSchedule");
|
|
79 |
strcmd.Append(" ,TargetYear");
|
|
80 |
strcmd.Append(" ,TargetMonth");
|
|
81 |
strcmd.Append(" ,TargetDay");
|
|
82 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
83 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
77 |
strcmd.Append(", PersonCode");
|
|
78 |
strcmd.Append(", ActionSchedule");
|
|
79 |
strcmd.Append(", TargetYear");
|
|
80 |
strcmd.Append(", TargetMonth");
|
|
81 |
strcmd.Append(", TargetDay");
|
|
82 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
83 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
84 | 84 |
strcmd.Append(" FROM ActionScheduleData"); |
85 | 85 |
strcmd.Append(AddSQLString); |
86 | 86 |
|
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceDailyData.cs | ||
---|---|---|
106 | 106 |
StringBuilder strcmd = new StringBuilder(); |
107 | 107 |
strcmd.Append("SELECT"); |
108 | 108 |
strcmd.Append(" PersonCode"); // 担当者コード |
109 |
strcmd.Append(" ,DATE_FORMAT(AttendanceDate, '%Y/%m/%d')"); // 日報作成日
|
|
110 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
111 |
strcmd.Append(" ,ActionResult"); // 行動実績
|
|
112 |
strcmd.Append(" ,ConstructionCode"); // 工事コード
|
|
113 |
strcmd.Append(" ,DATE_FORMAT(StartTime, '%Y/%m/%d %H:%i:%s')"); // 開始時間
|
|
114 |
strcmd.Append(" ,DATE_FORMAT(CompTime, '%Y/%m/%d %H:%i:%s')"); // 終了時間
|
|
115 |
strcmd.Append(" ,DayTimes"); // 日稼働合計時間
|
|
116 |
strcmd.Append(" ,WorkingComment"); // コメント
|
|
117 |
strcmd.Append(" ,WorkKindFlg"); // 作業区分フラグ
|
|
109 |
strcmd.Append(", DATE_FORMAT(AttendanceDate, '%Y/%m/%d')"); // 日報作成日
|
|
110 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
111 |
strcmd.Append(", ActionResult"); // 行動実績
|
|
112 |
strcmd.Append(", ConstructionCode"); // 工事コード
|
|
113 |
strcmd.Append(", DATE_FORMAT(StartTime, '%Y/%m/%d %H:%i:%s')"); // 開始時間
|
|
114 |
strcmd.Append(", DATE_FORMAT(CompTime, '%Y/%m/%d %H:%i:%s')"); // 終了時間
|
|
115 |
strcmd.Append(", DayTimes"); // 日稼働合計時間
|
|
116 |
strcmd.Append(", WorkingComment"); // コメント
|
|
117 |
strcmd.Append(", WorkKindFlg"); // 作業区分フラグ
|
|
118 | 118 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
119 | 119 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
120 | 120 |
strcmd.Append(" FROM AttendanceDailyData"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOAttendanceData.cs | ||
---|---|---|
95 | 95 |
StringBuilder strcmd = new StringBuilder(); |
96 | 96 |
strcmd.Append("SELECT"); |
97 | 97 |
strcmd.Append(" PersonCode"); // 担当者コード |
98 |
strcmd.Append(" ,DATE_FORMAT(AttendanceMonth, '%Y/%m/%d')"); // 出勤管理年月
|
|
99 |
strcmd.Append(" ,LastDays"); // 当月最終日
|
|
100 |
strcmd.Append(" ,AttendDayCount"); // 出勤日数
|
|
101 |
strcmd.Append(" ,TotalOverTimes"); // 残業時間数
|
|
102 |
strcmd.Append(" ,DATE_FORMAT(OrderDate, '%Y/%m/%d')"); // 申請日
|
|
103 |
strcmd.Append(" ,OrderNo"); // 申請受付番号
|
|
98 |
strcmd.Append(", DATE_FORMAT(AttendanceMonth, '%Y/%m/%d')"); // 出勤管理年月
|
|
99 |
strcmd.Append(", LastDays"); // 当月最終日
|
|
100 |
strcmd.Append(", AttendDayCount"); // 出勤日数
|
|
101 |
strcmd.Append(", TotalOverTimes"); // 残業時間数
|
|
102 |
strcmd.Append(", DATE_FORMAT(OrderDate, '%Y/%m/%d')"); // 申請日
|
|
103 |
strcmd.Append(", OrderNo"); // 申請受付番号
|
|
104 | 104 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
105 | 105 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
106 | 106 |
strcmd.Append(" FROM AttendanceData"); |
... | ... | |
193 | 193 |
bool bFirst = true; |
194 | 194 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
195 | 195 |
{ |
196 |
if (!bFirst) strcmd.Append(" ,");
|
|
196 |
if (!bFirst) strcmd.Append(", ");
|
|
197 | 197 |
strcmd.Append(gender.ToString()); |
198 | 198 |
bFirst = false; |
199 | 199 |
} |
... | ... | |
295 | 295 |
strcmd.Append(" SET"); |
296 | 296 |
|
297 | 297 |
strcmd.AppendFormat(" PersonCode = {0}", data.PersonCode); // 担当者コード |
298 |
strcmd.AppendFormat(" ,AttendanceMonth = STR_TO_DATE('{0}','%Y/%m/%d')",
|
|
298 |
strcmd.AppendFormat(", AttendanceMonth = STR_TO_DATE('{0}','%Y/%m/%d')",
|
|
299 | 299 |
data.AttendanceMonth.ToShortDateString()); // 出勤管理年月 |
300 |
strcmd.AppendFormat(" ,LastDays = {0} ", data.LastDays); // 当月最終日
|
|
301 |
strcmd.AppendFormat(" ,AttendDayCount = {0} ", data.AttendDayCount); // 出勤日数
|
|
302 |
strcmd.AppendFormat(" ,TotalOverTimes = {0} ", data.TotalOverTimes); // 残業時間数
|
|
303 |
strcmd.AppendFormat(" ,OrderDate = STR_TO_DATE('{0}','%Y/%m/%d')",
|
|
300 |
strcmd.AppendFormat(", LastDays = {0} ", data.LastDays); // 当月最終日
|
|
301 |
strcmd.AppendFormat(", AttendDayCount = {0} ", data.AttendDayCount); // 出勤日数
|
|
302 |
strcmd.AppendFormat(", TotalOverTimes = {0} ", data.TotalOverTimes); // 残業時間数
|
|
303 |
strcmd.AppendFormat(", OrderDate = STR_TO_DATE('{0}','%Y/%m/%d')",
|
|
304 | 304 |
data.OrderDate.ToShortDateString()); // 申請日 |
305 |
strcmd.AppendFormat(" ,OrderNo = {0} ", data.OrderNo); // 申請受付番号
|
|
305 |
strcmd.AppendFormat(", OrderNo = {0} ", data.OrderNo); // 申請受付番号
|
|
306 | 306 |
|
307 | 307 |
strcmd.Append(", UpdateDate = NOW()"); |
308 | 308 |
strcmd.Append(AddSQLString); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingData.cs | ||
---|---|---|
123 | 123 |
bool bFirst = true; |
124 | 124 |
foreach (var gender in Enum.GetValues(typeof(NameColumn))) |
125 | 125 |
{ |
126 |
if (!bFirst) strcmd.Append(" ,");
|
|
126 |
if (!bFirst) strcmd.Append(", ");
|
|
127 | 127 |
strcmd.Append(gender.ToString()); |
128 | 128 |
bFirst = false; |
129 | 129 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingDataDetail.cs | ||
---|---|---|
95 | 95 |
strcmd.Append(", IndsWasteTax"); |
96 | 96 |
strcmd.Append(", Note"); |
97 | 97 |
|
98 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
99 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
98 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
99 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
100 | 100 |
strcmd.Append(" FROM BillingDataDetail"); |
101 | 101 |
strcmd.Append(AddSQLString); |
102 | 102 |
|
... | ... | |
142 | 142 |
bool bFirst = true; |
143 | 143 |
foreach (var gender in Enum.GetValues(typeof(NameColumn))) |
144 | 144 |
{ |
145 |
if (!bFirst) strcmd.Append(" ,");
|
|
145 |
if (!bFirst) strcmd.Append(", ");
|
|
146 | 146 |
strcmd.Append(gender.ToString()); |
147 | 147 |
bFirst = false; |
148 | 148 |
} |
... | ... | |
198 | 198 |
bool bFirst = true; |
199 | 199 |
foreach (var gender in Enum.GetValues(typeof(NameColumn))) |
200 | 200 |
{ |
201 |
if (!bFirst) strcmd.Append(" ,");
|
|
201 |
if (!bFirst) strcmd.Append(", ");
|
|
202 | 202 |
strcmd.Append(gender.ToString()); |
203 | 203 |
bFirst = false; |
204 | 204 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOBillingPaymentSummary.cs | ||
---|---|---|
95 | 95 |
strcmd.Append(", CnstrPriceStotal"); |
96 | 96 |
strcmd.Append(", BillingPriceTotal"); |
97 | 97 |
|
98 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
99 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
98 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
99 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
100 | 100 |
strcmd.Append(" FROM BillingPaymentSummary"); |
101 | 101 |
strcmd.Append(AddSQLString); |
102 | 102 |
|
... | ... | |
141 | 141 |
bool bFirst = true; |
142 | 142 |
foreach (var gender in Enum.GetValues(typeof(NameColumn))) |
143 | 143 |
{ |
144 |
if (!bFirst) strcmd.Append(" ,");
|
|
144 |
if (!bFirst) strcmd.Append(", ");
|
|
145 | 145 |
strcmd.Append(gender.ToString()); |
146 | 146 |
bFirst = false; |
147 | 147 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstrLedgerExpenses.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Data; |
|
6 |
using System.Collections; |
|
7 |
|
|
8 |
using log4net; |
|
9 |
using MySql.Data.MySqlClient; // Data Provider for MySql |
|
10 |
|
|
11 |
using ProcessManagement.DB.MySql; |
|
12 |
using ProcessManagement.DB.Core; |
|
13 |
using ProcessManagement.DataModel; |
|
14 |
using ProcessManagement.Common; |
|
15 |
|
|
16 |
namespace ProcessManagement.DB.IOAccess |
|
17 |
{ |
|
18 |
/// <summary> |
|
19 |
/// 工事詳細台帳経費データ |
|
20 |
/// </summary> |
|
21 |
public class IOConstrLedgerExpenses : MySqlProcess |
|
22 |
{ |
|
23 |
#region 定義部 |
|
24 |
/// <summary> |
|
25 |
/// log4netログを使用する |
|
26 |
/// </summary> |
|
27 |
private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
|
28 |
#endregion |
|
29 |
|
|
30 |
#region 定数 |
|
31 |
/// <summary> |
|
32 |
/// 工事詳細台帳経費データフィールド並び |
|
33 |
/// </summary> |
|
34 |
public enum TableColumn |
|
35 |
{ |
|
36 |
ConstructionCode = 0, // 工事番号 |
|
37 |
|
|
38 |
SeqNo, // 枝番 |
|
39 |
NameCode, // 経費名称コード |
|
40 |
ExpensesRaito, // 経費率 |
|
41 |
ExpensesValue, // 会社経費合計 |
|
42 |
|
|
43 |
EntryDate, |
|
44 |
UpdateDate, |
|
45 |
} |
|
46 |
#endregion |
|
47 |
|
|
48 |
#region コンストラクタ |
|
49 |
/// <summary> |
|
50 |
/// コンストラクタ |
|
51 |
/// </summary> |
|
52 |
/// <param name="ConnectionString"></param> |
|
53 |
public IOConstrLedgerExpenses() |
|
54 |
: base(DBCommon.Instance.DBConnectString) |
|
55 |
{ |
|
56 |
} |
|
57 |
|
|
58 |
#endregion |
|
59 |
|
|
60 |
#region 工事詳細台帳経費データ検索SQL作成 |
|
61 |
/// <summary> |
|
62 |
/// 工事詳細台帳経費データ検索SQL作成 |
|
63 |
/// </summary> |
|
64 |
/// <returns></returns> |
|
65 |
private string CreateSelectSQL() |
|
66 |
{ |
|
67 |
StringBuilder strcmd = new StringBuilder(); |
|
68 |
strcmd.Append("SELECT"); |
|
69 |
|
|
70 |
strcmd.Append(" ConstructionCode"); // 工事番号 |
|
71 |
|
|
72 |
strcmd.Append(", SeqNo"); // 枝番 |
|
73 |
strcmd.Append(", NameCode"); // 経費名称コード |
|
74 |
strcmd.Append(", ExpensesRaito"); // 経費率 |
|
75 |
strcmd.Append(", ExpensesValue"); // 会社経費合計 |
|
76 |
|
|
77 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
|
78 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
|
79 |
strcmd.Append(" FROM ConstrLedgerExpenses"); |
|
80 |
|
|
81 |
return strcmd.ToString(); |
|
82 |
} |
|
83 |
#endregion |
|
84 |
|
|
85 |
#region 工事詳細台帳経費データ複数検索 |
|
86 |
/// <summary> |
|
87 |
/// 工事詳細台帳経費データ複数検索 |
|
88 |
/// </summary> |
|
89 |
/// <param name="AddSQLString"></param> |
|
90 |
/// <param name="data"></param> |
|
91 |
/// <param name="bConnect"></param> |
|
92 |
/// <returns></returns> |
|
93 |
public bool SelectAction(string AddSQLString, ref List<ConstrLedgerExpenses> data, bool bConnect = true) |
|
94 |
{ |
|
95 |
// インターフェース |
|
96 |
StringBuilder strcmd = new StringBuilder(); |
|
97 |
ArrayList arData = new ArrayList(); |
|
98 |
|
|
99 |
try |
|
100 |
{ |
|
101 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
|
102 |
strcmd.Append(CreateSelectSQL()); |
|
103 |
strcmd.Append(AddSQLString); |
|
104 |
|
|
105 |
// SQL実行 |
|
106 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false; |
|
107 |
|
|
108 |
// データセット |
|
109 |
foreach (object[] objwrk in arData) |
|
110 |
{ |
|
111 |
ConstrLedgerExpenses work = new ConstrLedgerExpenses(); |
|
112 |
Reader2Struct(objwrk, ref work); |
|
113 |
data.Add(work); |
|
114 |
} |
|
115 |
|
|
116 |
return true; |
|
117 |
} |
|
118 |
catch (Exception ex) |
|
119 |
{ |
|
120 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
121 |
return false; |
|
122 |
} |
|
123 |
} |
|
124 |
#endregion |
|
125 |
|
|
126 |
#region 工事詳細台帳経費データ1件検索 |
|
127 |
/// <summary> |
|
128 |
/// 工事詳細台帳経費データ1件検索 |
|
129 |
/// </summary> |
|
130 |
/// <param name="AddSQLString"></param> |
|
131 |
/// <param name="data"></param> |
|
132 |
/// <param name="bConnect"></param> |
|
133 |
/// <returns></returns> |
|
134 |
public bool SelectAction(string AddSQLString, ref ConstrLedgerExpenses data, bool bConnect = true) |
|
135 |
{ |
|
136 |
// インターフェース |
|
137 |
StringBuilder strcmd = new StringBuilder(); |
|
138 |
ArrayList arData = new ArrayList(); |
|
139 |
|
|
140 |
try |
|
141 |
{ |
|
142 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
|
143 |
strcmd.Append(CreateSelectSQL()); |
|
144 |
strcmd.Append(AddSQLString); |
|
145 |
|
|
146 |
// SQL実行 |
|
147 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return false; |
|
148 |
if (arData.Count == 0) return false; |
|
149 |
|
|
150 |
// データセット |
|
151 |
foreach (object[] objwrk in arData) |
|
152 |
{ |
|
153 |
Reader2Struct(objwrk, ref data); |
|
154 |
break; |
|
155 |
} |
|
156 |
|
|
157 |
return true; |
|
158 |
} |
|
159 |
catch (Exception ex) |
|
160 |
{ |
|
161 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
162 |
return false; |
|
163 |
} |
|
164 |
} |
|
165 |
#endregion |
|
166 |
|
|
167 |
#region 工事詳細台帳経費データ1件追加 |
|
168 |
/// <summary> |
|
169 |
/// 工事詳細台帳経費データ1件追加 |
|
170 |
/// </summary> |
|
171 |
/// <param name="data">工事詳細台帳経費データデータ</param> |
|
172 |
/// <returns>true:成功 false:失敗</returns> |
|
173 |
public bool InsertAction(ConstrLedgerExpenses work, bool bConnect = true) |
|
174 |
{ |
|
175 |
StringBuilder strcmd = new StringBuilder(); |
|
176 |
try |
|
177 |
{ |
|
178 |
bool bColFirst = true; |
|
179 |
strcmd.Append("INSERT INTO ConstrLedgerExpenses"); |
|
180 |
strcmd.Append(" ("); |
|
181 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
|
182 |
{ |
|
183 |
if (!bColFirst) strcmd.Append(", "); |
|
184 |
strcmd.Append(gender.ToString()); |
|
185 |
bColFirst = false; |
|
186 |
} |
|
187 |
strcmd.Append(") VALUES ("); |
|
188 |
|
|
189 |
strcmd.AppendFormat(" {0}", work.ConstructionCode); // 工事番号 |
|
190 |
|
|
191 |
strcmd.AppendFormat(", {0}", work.SeqNo); // 枝番 |
|
192 |
strcmd.AppendFormat(", {0}", work.NameCode); // 経費名称コード |
|
193 |
strcmd.AppendFormat(", {0}", work.ExpensesRaito); // 経費率 |
|
194 |
strcmd.AppendFormat(", {0}", work.ExpensesValue); // 会社経費合計 |
|
195 |
|
|
196 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
|
197 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
|
198 |
strcmd.Append(")"); |
|
199 |
|
|
200 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
201 |
|
|
202 |
return true; |
|
203 |
} |
|
204 |
catch (Exception ex) |
|
205 |
{ |
|
206 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
207 |
return false; |
|
208 |
} |
|
209 |
} |
|
210 |
#endregion |
|
211 |
|
|
212 |
#region 工事詳細台帳経費データ複数追加 |
|
213 |
/// <summary> |
|
214 |
/// 工事詳細台帳経費データ複数追加 |
|
215 |
/// </summary> |
|
216 |
/// <param name="data">工事詳細台帳経費データデータ</param> |
|
217 |
/// <returns>true:成功 false:失敗</returns> |
|
218 |
public bool InsertAction(List<ConstrLedgerExpenses> data, bool bConnect = true) |
|
219 |
{ |
|
220 |
StringBuilder strcmd = new StringBuilder(); |
|
221 |
try |
|
222 |
{ |
|
223 |
bool bColFirst = true; |
|
224 |
strcmd.Append("INSERT INTO ConstrLedgerExpenses"); |
|
225 |
strcmd.Append(" ("); |
|
226 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
|
227 |
{ |
|
228 |
if (!bColFirst) strcmd.Append(", "); |
|
229 |
strcmd.Append(gender.ToString()); |
|
230 |
bColFirst = false; |
|
231 |
} |
|
232 |
strcmd.Append(") VALUES"); |
|
233 |
|
|
234 |
bool bDataFirst = true; |
|
235 |
foreach (ConstrLedgerExpenses work in data) |
|
236 |
{ |
|
237 |
if (bDataFirst) strcmd.Append(" ("); |
|
238 |
else strcmd.Append(", ("); |
|
239 |
|
|
240 |
strcmd.AppendFormat(" {0}", work.ConstructionCode); // 工事番号 |
|
241 |
|
|
242 |
strcmd.AppendFormat(", {0}", work.SeqNo); // 枝番 |
|
243 |
strcmd.AppendFormat(", {0}", work.NameCode); // 経費名称コード |
|
244 |
strcmd.AppendFormat(", {0}", work.ExpensesRaito); // 経費率 |
|
245 |
strcmd.AppendFormat(", {0}", work.ExpensesValue); // 会社経費合計 |
|
246 |
|
|
247 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.EntryDate); |
|
248 |
strcmd.AppendFormat(", STR_TO_DATE('{0}','%Y/%m/%d %H:%i:%s')", work.UpdateDate); |
|
249 |
strcmd.Append(")"); |
|
250 |
|
|
251 |
bDataFirst = false; |
|
252 |
} |
|
253 |
|
|
254 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
255 |
|
|
256 |
return true; |
|
257 |
} |
|
258 |
catch (Exception ex) |
|
259 |
{ |
|
260 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
261 |
return false; |
|
262 |
} |
|
263 |
} |
|
264 |
#endregion |
|
265 |
|
|
266 |
#region 工事詳細台帳経費データ更新 |
|
267 |
/// <summary> |
|
268 |
/// 工事詳細台帳経費データ更新 |
|
269 |
/// </summary> |
|
270 |
/// <param name="AddSQLString">更新条件SQL文字列</param> |
|
271 |
/// <param name="data">工事詳細台帳経費データデータ</param> |
|
272 |
/// <returns>true:成功 false:失敗</returns> |
|
273 |
public bool UpdateAction(string AddSQLString, ConstrLedgerExpenses data, bool bConnect = true) |
|
274 |
{ |
|
275 |
StringBuilder strcmd = new StringBuilder(); |
|
276 |
try |
|
277 |
{ |
|
278 |
strcmd.Append("UPDATE ConstrLedgerExpenses"); |
|
279 |
|
|
280 |
strcmd.Append(" SET"); |
|
281 |
|
|
282 |
strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode); // 工事番号 |
|
283 |
|
|
284 |
strcmd.AppendFormat(", SeqNo = {0}", data.SeqNo); // 枝番 |
|
285 |
strcmd.AppendFormat(", NameCode = {0}", data.NameCode); // 経費名称コード |
|
286 |
strcmd.AppendFormat(", ExpensesRaito = {0}", data.ExpensesRaito); // 経費率 |
|
287 |
strcmd.AppendFormat(", ExpensesValue = {0}", data.ExpensesValue); // 会社経費合計 |
|
288 |
|
|
289 |
strcmd.Append(", UpdateDate = NOW()"); |
|
290 |
strcmd.Append(AddSQLString); |
|
291 |
|
|
292 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
293 |
|
|
294 |
return true; |
|
295 |
} |
|
296 |
catch (Exception ex) |
|
297 |
{ |
|
298 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
299 |
return false; |
|
300 |
} |
|
301 |
} |
|
302 |
#endregion |
|
303 |
|
|
304 |
#region 工事詳細台帳経費データ削除 |
|
305 |
/// <summary> |
|
306 |
/// 工事詳細台帳経費データ削除 |
|
307 |
/// </summary> |
|
308 |
/// <param name="AddSQLString">削除条件SQL文字列</param> |
|
309 |
/// <param name="data">工事詳細台帳経費データデータ</param> |
|
310 |
/// <returns>true:成功 false:失敗</returns> |
|
311 |
public bool DeleteAction(string AddSQLString, bool bConnect = true) |
|
312 |
{ |
|
313 |
// インターフェース |
|
314 |
StringBuilder strcmd = new StringBuilder(); |
|
315 |
try |
|
316 |
{ |
|
317 |
strcmd.AppendFormat("{0}{1}", "DELETE FROM ConstrLedgerExpenses", AddSQLString); |
|
318 |
|
|
319 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
320 |
|
|
321 |
return true; |
|
322 |
} |
|
323 |
catch (Exception ex) |
|
324 |
{ |
|
325 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strcmd.ToString()); |
|
326 |
return false; |
|
327 |
} |
|
328 |
} |
|
329 |
#endregion |
|
330 |
|
|
331 |
#region 1項目の更新を行う |
|
332 |
/// <summary> |
|
333 |
/// 1項目の更新を行う |
|
334 |
/// </summary> |
|
335 |
/// <returns></returns> |
|
336 |
public bool UpdateFeild(int ConstructionCode, int SeqNo, int NameCode |
|
337 |
, int FeildNo, object value, bool bConnect = true) |
|
338 |
{ |
|
339 |
StringBuilder strcmd = new StringBuilder(); |
|
340 |
try |
|
341 |
{ |
|
342 |
strcmd.Append("UPDATE ConstrLedgerExpenses"); |
|
343 |
|
|
344 |
strcmd.Append(" SET"); |
|
345 |
switch (FeildNo) |
|
346 |
{ |
|
347 |
case (int)TableColumn.ConstructionCode: // 工事番号 |
|
348 |
strcmd.AppendFormat(" ConstructionCode = {0}", ((int)value).ToString()); |
|
349 |
break; |
|
350 |
case (int)TableColumn.SeqNo: // 枝番 |
|
351 |
strcmd.AppendFormat(" SeqNo = {0}", ((int)value).ToString()); |
|
352 |
break; |
|
353 |
case (int)TableColumn.NameCode: // 経費名称コード |
|
354 |
strcmd.AppendFormat(" NameCode = {0}", ((int)value).ToString()); |
|
355 |
break; |
|
356 |
case (int)TableColumn.ExpensesRaito: // 経費率 |
|
357 |
strcmd.AppendFormat(" ExpensesRaito = {0}", ((double)value).ToString()); |
|
358 |
break; |
|
359 |
case (int)TableColumn.ExpensesValue: // 会社経費合計 |
|
360 |
strcmd.AppendFormat(" ExpensesValue = {0}", ((long)value).ToString()); |
|
361 |
break; |
|
362 |
default: |
|
363 |
break; |
|
364 |
} |
|
365 |
|
|
366 |
strcmd.Append(", UpdateDate = NOW()"); |
|
367 |
strcmd.Append(CreatePrimarykeyString(ConstructionCode, SeqNo, NameCode)); |
|
368 |
|
|
369 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
|
370 |
|
|
371 |
return true; |
|
372 |
} |
|
373 |
catch (MySqlException myex) |
|
374 |
{ |
|
375 |
logger.ErrorFormat("MySQLエラー:{0}:{1}", CommonMotions.GetMethodName(2), myex.Message); |
|
376 |
return false; |
|
377 |
} |
|
378 |
} |
|
379 |
#endregion |
|
380 |
|
|
381 |
#region MySQLDataReaderより構造体へセットする |
|
382 |
/// <summary> |
|
383 |
/// MySQLDataReaderより構造体へセットする |
|
384 |
/// </summary> |
|
385 |
/// <param name="reader">MySQLDataReader</param> |
|
386 |
/// <param name="wrk">構造体</param> |
|
387 |
public void Reader2Struct(object[] objwrk, ref ConstrLedgerExpenses wrk) |
|
388 |
{ |
|
389 |
try |
|
390 |
{ |
|
391 |
// データ取得 |
|
392 |
|
|
393 |
wrk.ConstructionCode = int.Parse(objwrk[(int)TableColumn.ConstructionCode].ToString()); // 工事番号 |
|
394 |
|
|
395 |
wrk.SeqNo = int.Parse(objwrk[(int)TableColumn.SeqNo].ToString()); // 枝番 |
|
396 |
wrk.NameCode = int.Parse(objwrk[(int)TableColumn.NameCode].ToString()); // 経費名称コード |
|
397 |
wrk.ExpensesRaito = double.Parse(objwrk[(int)TableColumn.ExpensesRaito].ToString()); // 経費率 |
|
398 |
wrk.ExpensesValue = long.Parse(objwrk[(int)TableColumn.ExpensesValue].ToString()); // 会社経費合計 |
|
399 |
|
|
400 |
wrk.EntryDate = DateTime.Parse(objwrk[(int)TableColumn.EntryDate].ToString()); |
|
401 |
wrk.UpdateDate = DateTime.Parse(objwrk[(int)TableColumn.UpdateDate].ToString()); |
|
402 |
} |
|
403 |
catch (MySqlException myex) |
|
404 |
{ |
|
405 |
logger.ErrorFormat("MySQLエラー:{0}:{1}", CommonMotions.GetMethodName(2), myex.Message); |
|
406 |
} |
|
407 |
catch (Exception ex) |
|
408 |
{ |
|
409 |
logger.ErrorFormat("システムエラー:{0}:{1}", CommonMotions.GetMethodName(2), ex.Message); |
|
410 |
} |
|
411 |
} |
|
412 |
#endregion |
|
413 |
|
|
414 |
#region 主キー検索の文字列を返す |
|
415 |
/// <summary> |
|
416 |
/// 主キー検索の文字列を返す |
|
417 |
/// </summary> |
|
418 |
/// <returns></returns> |
|
419 |
public string CreatePrimarykeyString(int ConstructionCode, int SeqNo = 0, int NameCode = 0) |
|
420 |
{ |
|
421 |
StringBuilder strWork = new StringBuilder(); |
|
422 |
try |
|
423 |
{ |
|
424 |
strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode); |
|
425 |
if (SeqNo > 0) |
|
426 |
strWork.AppendFormat(" And SeqNo = {0}", SeqNo); |
|
427 |
if (NameCode > 0) |
|
428 |
strWork.AppendFormat(" And NameCode = {0}", NameCode); |
|
429 |
} |
|
430 |
catch (Exception ex) |
|
431 |
{ |
|
432 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString()); |
|
433 |
} |
|
434 |
|
|
435 |
return strWork.ToString(); |
|
436 |
} |
|
437 |
#endregion |
|
438 |
} |
|
439 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfo.cs | ||
---|---|---|
53 | 53 |
OrdersDecisionPriceInTax, |
54 | 54 |
SalesDepCode, |
55 | 55 |
SalesPersonCode, |
56 |
SalesSubDepCode, |
|
57 |
SalesSubPersonCode, |
|
56 |
SalesSubDepCode, |
|
57 |
SalesSubPersonCode, |
|
58 | 58 |
ConstrDepCode, |
59 | 59 |
ConstructionPersonCode, |
60 | 60 |
ConstrSubDepCode, |
... | ... | |
271 | 271 |
bool bFirst = true; |
272 | 272 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
273 | 273 |
{ |
274 |
if (!bFirst) strcmd.Append(" ,");
|
|
274 |
if (!bFirst) strcmd.Append(", ");
|
|
275 | 275 |
strcmd.Append(gender.ToString()); |
276 | 276 |
bFirst = false; |
277 | 277 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBaseInfoDetail.cs | ||
---|---|---|
264 | 264 |
strcmd.Append(" SET"); |
265 | 265 |
|
266 | 266 |
strcmd.AppendFormat(" ConstructionCode = {0}", data.ConstructionCode); |
267 |
strcmd.AppendFormat(" ,DetailNo = {0}", data.DetailNo);
|
|
268 |
strcmd.AppendFormat(" ,DetailString = '{0}'", data.DetailString);
|
|
267 |
strcmd.AppendFormat(", DetailNo = {0}", data.DetailNo);
|
|
268 |
strcmd.AppendFormat(", DetailString = '{0}'", data.DetailString);
|
|
269 | 269 |
|
270 | 270 |
strcmd.Append(", UpdateDate = NOW()"); |
271 | 271 |
strcmd.Append(AddSQLString); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionBudget.cs | ||
---|---|---|
93 | 93 |
|
94 | 94 |
strcmd.Append(" ConstructionCode"); // 工事番号 |
95 | 95 |
|
96 |
strcmd.Append(" ,CreatorCode"); // 作成者コード
|
|
97 |
strcmd.Append(" ,CreatorName"); // 作成者名
|
|
98 |
strcmd.Append(" ,CreatorCosts"); // 作成者給与
|
|
99 |
strcmd.Append(" ,AssistantCode"); // 副担当者コード
|
|
100 |
strcmd.Append(" ,AssistantName"); // 副担当者名
|
|
101 |
strcmd.Append(" ,AssistantCosts"); // 副担当者給与
|
|
102 |
strcmd.Append(" ,InstructorCode"); // 工事指導員コード
|
|
103 |
strcmd.Append(" ,InstructorName"); // 工事指導員名
|
|
104 |
strcmd.Append(" ,InstructorCosts"); // 工事指導員給与
|
|
105 |
strcmd.Append(" ,DATE_FORMAT(CreateDate, '%Y/%m/%d')"); // 作成日
|
|
106 |
strcmd.Append(" ,ConstructionTimes"); // 工期(単位・月)
|
|
107 |
strcmd.Append(" ,DATE_FORMAT(ConstructionStart, '%Y/%m/%d')"); // 契約工期開始
|
|
108 |
strcmd.Append(" ,DATE_FORMAT(ConstructionEnd, '%Y/%m/%d')"); // 契約工期完了
|
|
109 |
strcmd.Append(" ,InstructorTimes"); // 指導員稼働月数
|
|
110 |
strcmd.Append(" ,SalaryFlg"); // 給与振分区分
|
|
111 |
strcmd.Append(" ,SalaryDays"); // 振分日数
|
|
112 |
strcmd.Append(" ,A_SalaryFlg"); // 副担当者給与振分区分
|
|
113 |
strcmd.Append(" ,A_SalaryDays"); // 副担当者振分日数
|
|
114 |
strcmd.Append(" ,I_SalaryFlg"); // 指導員給与振分区分
|
|
115 |
strcmd.Append(" ,I_SalaryDays"); // 指導員振分日数
|
|
116 |
strcmd.Append(" ,OrdersDecisionPrice"); // 税抜受注決定金額
|
|
96 |
strcmd.Append(", CreatorCode"); // 作成者コード
|
|
97 |
strcmd.Append(", CreatorName"); // 作成者名
|
|
98 |
strcmd.Append(", CreatorCosts"); // 作成者給与
|
|
99 |
strcmd.Append(", AssistantCode"); // 副担当者コード
|
|
100 |
strcmd.Append(", AssistantName"); // 副担当者名
|
|
101 |
strcmd.Append(", AssistantCosts"); // 副担当者給与
|
|
102 |
strcmd.Append(", InstructorCode"); // 工事指導員コード
|
|
103 |
strcmd.Append(", InstructorName"); // 工事指導員名
|
|
104 |
strcmd.Append(", InstructorCosts"); // 工事指導員給与
|
|
105 |
strcmd.Append(", DATE_FORMAT(CreateDate, '%Y/%m/%d')"); // 作成日
|
|
106 |
strcmd.Append(", ConstructionTimes"); // 工期(単位・月)
|
|
107 |
strcmd.Append(", DATE_FORMAT(ConstructionStart, '%Y/%m/%d')"); // 契約工期開始
|
|
108 |
strcmd.Append(", DATE_FORMAT(ConstructionEnd, '%Y/%m/%d')"); // 契約工期完了
|
|
109 |
strcmd.Append(", InstructorTimes"); // 指導員稼働月数
|
|
110 |
strcmd.Append(", SalaryFlg"); // 給与振分区分
|
|
111 |
strcmd.Append(", SalaryDays"); // 振分日数
|
|
112 |
strcmd.Append(", A_SalaryFlg"); // 副担当者給与振分区分
|
|
113 |
strcmd.Append(", A_SalaryDays"); // 副担当者振分日数
|
|
114 |
strcmd.Append(", I_SalaryFlg"); // 指導員給与振分区分
|
|
115 |
strcmd.Append(", I_SalaryDays"); // 指導員振分日数
|
|
116 |
strcmd.Append(", OrdersDecisionPrice"); // 税抜受注決定金額
|
|
117 | 117 |
|
118 | 118 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
119 | 119 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionLedger.cs | ||
---|---|---|
80 | 80 |
StringBuilder strcmd = new StringBuilder(); |
81 | 81 |
strcmd.Append("SELECT"); |
82 | 82 |
|
83 |
strcmd.Append(" ConstructionCode"); // 工事番号 |
|
83 |
strcmd.Append(" ConstructionCode"); // 工事番号 |
|
84 |
strcmd.Append(", ConstructionPeriod"); // 事業期 |
|
85 |
strcmd.Append(", CreatorCode"); // 作成者コード |
|
86 |
strcmd.Append(", CreatorName"); // 作成者名 |
|
87 |
strcmd.Append(", DATE_FORMAT(CreateDate, '%Y/%m/%d')"); // 作成日 |
|
88 |
strcmd.Append(", ConstructionTimes"); // 工期(単位・月) |
|
89 |
strcmd.Append(", DATE_FORMAT(ConstructionStart, '%Y/%m/%d')"); // 契約工期開始 |
|
90 |
strcmd.Append(", DATE_FORMAT(ConstructionEnd, '%Y/%m/%d')"); // 契約工期完了 |
|
91 |
strcmd.Append(", OrdersDecisionPrice"); // 税抜受注決定金額 |
|
92 |
strcmd.Append(", CompanyExpenses"); // 会社経費合計 |
|
93 |
strcmd.Append(", DepartmentExpenses"); // 部署経費合計 |
|
94 |
strcmd.Append(", SalesExpenses"); // 営業経費合計 |
|
95 |
strcmd.Append(", TotalPayment"); // 総支払額 |
|
96 |
strcmd.Append(", GrossProfit"); // 粗利 |
|
97 |
strcmd.Append(", Allowance"); // 給与 |
|
98 |
strcmd.Append(", NetProfit"); // 純利益 |
|
99 |
strcmd.Append(", ComplateFlg"); // 入力完了フラグ |
|
100 |
strcmd.Append(", IntegrationFlg"); // 受注金額積算フラグ |
|
84 | 101 |
|
85 |
strcmd.Append(" ,ConstructionPeriod"); // 事業期 |
|
86 |
strcmd.Append(" ,CreatorCode"); // 作成者コード |
|
87 |
strcmd.Append(" ,CreatorName"); // 作成者名 |
|
88 |
strcmd.Append(" ,DATE_FORMAT(CreateDate, '%Y/%m/%d')"); |
|
89 |
// 作成日 |
|
90 |
strcmd.Append(" ,ConstructionTimes"); // 工期(単位・月) |
|
91 |
strcmd.Append(" ,DATE_FORMAT(ConstructionStart, '%Y/%m/%d')"); |
|
92 |
// 契約工期開始 |
|
93 |
strcmd.Append(" ,DATE_FORMAT(ConstructionEnd, '%Y/%m/%d')"); |
|
94 |
// 契約工期完了 |
|
95 |
strcmd.Append(" ,OrdersDecisionPrice"); // 税抜受注決定金額 |
|
96 |
strcmd.Append(" ,CompanyExpenses"); // 会社経費合計 |
|
97 |
strcmd.Append(" ,DepartmentExpenses"); // 部署経費合計 |
|
98 |
strcmd.Append(" ,SalesExpenses"); // 営業経費合計 |
|
99 |
strcmd.Append(" ,TotalPayment"); // 総支払額 |
|
100 |
strcmd.Append(" ,GrossProfit"); // 粗利 |
|
101 |
strcmd.Append(" ,Allowance"); // 給与 |
|
102 |
strcmd.Append(" ,NetProfit"); // 純利益 |
|
103 |
strcmd.Append(" ,ComplateFlg"); // 入力完了フラグ |
|
104 |
strcmd.Append(" ,IntegrationFlg"); // 受注金額積算フラグ |
|
105 |
|
|
106 | 102 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
107 | 103 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
108 | 104 |
strcmd.Append(" FROM ConstructionLedger"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOConstructionProgressDate.cs | ||
---|---|---|
281 | 281 |
/// 1項目の更新を行う |
282 | 282 |
/// </summary> |
283 | 283 |
/// <returns></returns> |
284 |
public bool UpdateFeild(int ConstructionCode, int FeildNo, object value, bool bConnect = true) |
|
284 |
public bool UpdateFeild(int ConstructionCode, DateTime ChangeDate, int FeildNo, object value, bool bConnect = true)
|
|
285 | 285 |
{ |
286 | 286 |
StringBuilder strcmd = new StringBuilder(); |
287 | 287 |
try |
... | ... | |
309 | 309 |
} |
310 | 310 |
|
311 | 311 |
strcmd.Append(", UpdateDate = NOW()"); |
312 |
strcmd.Append(CreatePrimarykeyString(ConstructionCode)); |
|
312 |
strcmd.Append(CreatePrimarykeyString(ConstructionCode, ChangeDate));
|
|
313 | 313 |
|
314 | 314 |
if (!ExecuteNonQuery(strcmd.ToString(), bConnect)) return false; |
315 | 315 |
|
... | ... | |
361 | 361 |
/// </summary> |
362 | 362 |
/// <param name="BusinessTypeCode"></param> |
363 | 363 |
/// <returns>Where文字列</returns> |
364 |
public string CreatePrimarykeyString(int ConstructionCode, int ConstructionStatusFlg = -1)
|
|
364 |
public string CreatePrimarykeyString(int ConstructionCode) |
|
365 | 365 |
{ |
366 | 366 |
StringBuilder strWork = new StringBuilder(); |
367 | 367 |
try |
368 | 368 |
{ |
369 | 369 |
strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode.ToString()); |
370 |
if (ConstructionStatusFlg != -1) |
|
371 |
strWork.AppendFormat(" And ConstructionStatusFlg = {0}", ConstructionStatusFlg.ToString()); |
|
372 | 370 |
|
373 | 371 |
return strWork.ToString(); |
374 | 372 |
} |
... | ... | |
378 | 376 |
return string.Empty; |
379 | 377 |
} |
380 | 378 |
} |
379 |
public string CreatePrimarykeyString(int ConstructionCode, DateTime ChangeDate) |
|
380 |
{ |
|
381 |
StringBuilder strWork = new StringBuilder(); |
|
382 |
try |
|
383 |
{ |
|
384 |
strWork.AppendFormat(" Where ConstructionCode = {0}", ConstructionCode.ToString()); |
|
385 |
strWork.AppendFormat(" And ChangeDate = STR_TO_DATE('{0}', '%Y/%m/%d %H:%i:%s')", ChangeDate.ToString()); |
|
386 |
|
|
387 |
return strWork.ToString(); |
|
388 |
} |
|
389 |
catch (Exception ex) |
|
390 |
{ |
|
391 |
logger.ErrorFormat("システムエラー:{0}:{1}:{2}", CommonMotions.GetMethodName(2), ex.Message, strWork.ToString()); |
|
392 |
return string.Empty; |
|
393 |
} |
|
394 |
} |
|
381 | 395 |
#endregion |
382 | 396 |
} |
383 | 397 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostDataOfPerson.cs | ||
---|---|---|
77 | 77 |
StringBuilder strcmd = new StringBuilder(); |
78 | 78 |
strcmd.Append("SELECT"); |
79 | 79 |
|
80 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
81 |
strcmd.Append(" ,DATE_FORMAT(ActionDate, '%Y/%m/%d')"); // 対象日付
|
|
82 |
strcmd.Append(" ,DataType"); // データ区分
|
|
83 |
strcmd.Append(" ,DataAddCount"); // データ追加番号
|
|
84 |
strcmd.Append(" ,TargetMonth"); // 対象年月
|
|
85 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
86 |
strcmd.Append(" ,SuppliersCode"); // 支払先コード
|
|
87 |
strcmd.Append(" ,SuppliersName"); // 支払先名称
|
|
88 |
strcmd.Append(" ,PaymentContent"); // 支払内容
|
|
89 |
strcmd.Append(" ,PaymentType"); // 支払方法フラグ
|
|
90 |
strcmd.Append(" ,EntryPrice"); // 金額(税抜)
|
|
91 |
strcmd.Append(" ,EntryPriceInTax"); // 金額(税込)
|
|
92 |
strcmd.Append(" ,SlipNumber"); // 伝票番号
|
|
80 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
81 |
strcmd.Append(", DATE_FORMAT(ActionDate, '%Y/%m/%d')"); // 対象日付
|
|
82 |
strcmd.Append(", DataType"); // データ区分
|
|
83 |
strcmd.Append(", DataAddCount"); // データ追加番号
|
|
84 |
strcmd.Append(", TargetMonth"); // 対象年月
|
|
85 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
86 |
strcmd.Append(", SuppliersCode"); // 支払先コード
|
|
87 |
strcmd.Append(", SuppliersName"); // 支払先名称
|
|
88 |
strcmd.Append(", PaymentContent"); // 支払内容
|
|
89 |
strcmd.Append(", PaymentType"); // 支払方法フラグ
|
|
90 |
strcmd.Append(", EntryPrice"); // 金額(税抜)
|
|
91 |
strcmd.Append(", EntryPriceInTax"); // 金額(税込)
|
|
92 |
strcmd.Append(", SlipNumber"); // 伝票番号
|
|
93 | 93 |
|
94 |
strcmd.Append(" ,ComplateFlg"); // 引込済みフラグ
|
|
95 |
strcmd.Append(" ,ApprovalFlg"); // 承認フラグ
|
|
94 |
strcmd.Append(", ComplateFlg"); // 引込済みフラグ
|
|
95 |
strcmd.Append(", ApprovalFlg"); // 承認フラグ
|
|
96 | 96 |
|
97 | 97 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
98 | 98 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOCostomerRegist.cs | ||
---|---|---|
223 | 223 |
bool bFirst = true; |
224 | 224 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
225 | 225 |
{ |
226 |
if (!bFirst) strcmd.Append(" ,");
|
|
226 |
if (!bFirst) strcmd.Append(", ");
|
|
227 | 227 |
strcmd.Append(gender.ToString()); |
228 | 228 |
bFirst = false; |
229 | 229 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataConstruction.cs | ||
---|---|---|
83 | 83 |
strcmd.Append("SELECT"); |
84 | 84 |
|
85 | 85 |
strcmd.Append(" PersonCode"); // 担当者コード |
86 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
87 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
88 |
strcmd.Append(" ,Weather"); // 天気
|
|
86 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
87 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
88 |
strcmd.Append(", Weather"); // 天気
|
|
89 | 89 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
90 | 90 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
91 | 91 |
strcmd.Append(" FROM DailyDataConstruction"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataDetail.cs | ||
---|---|---|
110 | 110 |
StringBuilder strcmd = new StringBuilder(); |
111 | 111 |
strcmd.Append("SELECT"); |
112 | 112 |
|
113 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
114 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
115 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
116 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
117 |
strcmd.Append(" ,JobCategoryCode"); // 職種キー
|
|
118 |
strcmd.Append(" ,CompanyCode"); // 協力会社コード
|
|
119 |
strcmd.Append(" ,TodayHeadCount"); // 当日人員数
|
|
120 |
strcmd.Append(" ,TotalHeadCount"); // 累計人員数
|
|
121 |
strcmd.Append(" ,TodayWork"); // 当日作業内容
|
|
122 |
strcmd.Append(" ,NextdayWork"); // 翌日作業内容
|
|
123 |
strcmd.Append(" ,NextdayHeadCount"); // 翌日人員数
|
|
124 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日
|
|
125 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日
|
|
113 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
114 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
115 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
116 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
117 |
strcmd.Append(", JobCategoryCode"); // 職種キー
|
|
118 |
strcmd.Append(", CompanyCode"); // 協力会社コード
|
|
119 |
strcmd.Append(", TodayHeadCount"); // 当日人員数
|
|
120 |
strcmd.Append(", TotalHeadCount"); // 累計人員数
|
|
121 |
strcmd.Append(", TodayWork"); // 当日作業内容
|
|
122 |
strcmd.Append(", NextdayWork"); // 翌日作業内容
|
|
123 |
strcmd.Append(", NextdayHeadCount"); // 翌日人員数
|
|
124 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
|
125 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
|
126 | 126 |
strcmd.Append(" FROM DailyDataDetail"); |
127 | 127 |
|
128 | 128 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataField.cs | ||
---|---|---|
90 | 90 |
StringBuilder strcmd = new StringBuilder(); |
91 | 91 |
strcmd.Append("SELECT"); |
92 | 92 |
|
93 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
94 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
95 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
96 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
93 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
94 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
95 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
96 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
97 | 97 |
|
98 |
strcmd.Append(" ,DATE_FORMAT(PatrolTime, '%Y/%m/%d %H:%i:%s')"); // 巡回時間
|
|
99 |
strcmd.Append(" ,ContentsText"); // 内容
|
|
98 |
strcmd.Append(", DATE_FORMAT(PatrolTime, '%Y/%m/%d %H:%i:%s')"); // 巡回時間
|
|
99 |
strcmd.Append(", ContentsText"); // 内容
|
|
100 | 100 |
|
101 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日
|
|
102 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日
|
|
101 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
|
102 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
|
103 | 103 |
strcmd.Append(" FROM DailyDataField"); |
104 | 104 |
|
105 | 105 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataMaterials.cs | ||
---|---|---|
102 | 102 |
StringBuilder strcmd = new StringBuilder(); |
103 | 103 |
strcmd.Append("SELECT"); |
104 | 104 |
|
105 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
106 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
107 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
108 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
105 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
106 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
107 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
108 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
109 | 109 |
|
110 |
strcmd.Append(" ,Materials"); // 資材名
|
|
111 |
strcmd.Append(" ,Quantity"); // 数量
|
|
112 |
strcmd.Append(" ,Production"); // 制作会社
|
|
113 |
strcmd.Append(" ,Delivery"); // 納入業者
|
|
114 |
strcmd.Append(" ,QualityControl"); // 品質管理事項
|
|
110 |
strcmd.Append(", Materials"); // 資材名
|
|
111 |
strcmd.Append(", Quantity"); // 数量
|
|
112 |
strcmd.Append(", Production"); // 制作会社
|
|
113 |
strcmd.Append(", Delivery"); // 納入業者
|
|
114 |
strcmd.Append(", QualityControl"); // 品質管理事項
|
|
115 | 115 |
|
116 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日
|
|
117 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日
|
|
116 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
|
117 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
|
118 | 118 |
strcmd.Append(" FROM DailyDataMaterials"); |
119 | 119 |
|
120 | 120 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataSubcontractors.cs | ||
---|---|---|
90 | 90 |
StringBuilder strcmd = new StringBuilder(); |
91 | 91 |
strcmd.Append("SELECT"); |
92 | 92 |
|
93 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
94 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
95 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
96 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
93 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
94 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
95 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
96 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
97 | 97 |
|
98 |
strcmd.Append(" ,Attendee"); // 出席者
|
|
99 |
strcmd.Append(" ,ContentsText"); // 内容
|
|
98 |
strcmd.Append(", Attendee"); // 出席者
|
|
99 |
strcmd.Append(", ContentsText"); // 内容
|
|
100 | 100 |
|
101 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日
|
|
102 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日
|
|
101 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
|
102 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
|
103 | 103 |
strcmd.Append(" FROM DailyDataSubcontractors"); |
104 | 104 |
|
105 | 105 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODailyDataVehicles.cs | ||
---|---|---|
106 | 106 |
StringBuilder strcmd = new StringBuilder(); |
107 | 107 |
strcmd.Append("SELECT"); |
108 | 108 |
|
109 |
strcmd.Append(" PersonCode"); // 担当者コード |
|
110 |
strcmd.Append(" ,DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
111 |
strcmd.Append(" ,ConstructionCode"); // 工事番号
|
|
112 |
strcmd.Append(" ,SeqNo"); // 明細行番号
|
|
109 |
strcmd.Append(" PersonCode"); // 担当者コード
|
|
110 |
strcmd.Append(", DATE_FORMAT(DailyDataDate, '%Y/%m/%d')"); // 日報作成日
|
|
111 |
strcmd.Append(", ConstructionCode"); // 工事番号
|
|
112 |
strcmd.Append(", SeqNo"); // 明細行番号
|
|
113 | 113 |
|
114 |
strcmd.Append(" ,Model"); // 機種
|
|
115 |
strcmd.Append(" ,Performance"); // 性能
|
|
116 |
strcmd.Append(" ,Owner"); // 所有会社
|
|
117 |
strcmd.Append(" ,Driver"); // 当日運転者
|
|
118 |
strcmd.Append(" ,DATE_FORMAT(StartWorkingTime, '%Y/%m/%d %H:%i:%s')"); // 作業時間開始
|
|
119 |
strcmd.Append(" ,DATE_FORMAT(EndWorkingTime, '%Y/%m/%d %H:%i:%s')"); // 作業時間終了
|
|
114 |
strcmd.Append(", Model"); // 機種
|
|
115 |
strcmd.Append(", Performance"); // 性能
|
|
116 |
strcmd.Append(", Owner"); // 所有会社
|
|
117 |
strcmd.Append(", Driver"); // 当日運転者
|
|
118 |
strcmd.Append(", DATE_FORMAT(StartWorkingTime, '%Y/%m/%d %H:%i:%s')"); // 作業時間開始
|
|
119 |
strcmd.Append(", DATE_FORMAT(EndWorkingTime, '%Y/%m/%d %H:%i:%s')"); // 作業時間終了
|
|
120 | 120 |
|
121 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日 |
|
122 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日 |
|
121 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); // 登録年月日
|
|
122 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); // 更新年月日
|
|
123 | 123 |
strcmd.Append(" FROM DailyDataVehicles"); |
124 | 124 |
|
125 | 125 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IODepositDataDetail.cs | ||
---|---|---|
85 | 85 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
86 | 86 |
strcmd.Append("SELECT"); |
87 | 87 |
strcmd.Append(" OrderersDivision"); |
88 |
strcmd.Append(" ,OrderersCode");
|
|
89 |
strcmd.Append(" ,CAST(TargetDate As Char)");
|
|
90 |
strcmd.Append(" ,RequestNo");
|
|
91 |
strcmd.Append(" ,OrderNo");
|
|
92 |
strcmd.Append(" ,DepositAmount");
|
|
93 |
strcmd.Append(" ,DiscountAmount");
|
|
94 |
strcmd.Append(" ,CnstrPrice");
|
|
95 |
strcmd.Append(" ,Fees");
|
|
96 |
strcmd.Append(" ,OtherAdjustments");
|
|
97 |
strcmd.Append(" ,DifferenceAmount");
|
|
98 |
strcmd.Append(" ,ConfirmationPersonCode");
|
|
99 |
strcmd.Append(" ,DATE_FORMAT(ConfirmationDate, '%Y/%m/%d')");
|
|
100 |
strcmd.Append(" ,ConfirmationEndFlg");
|
|
101 |
strcmd.Append(" ,Note");
|
|
102 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
103 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
88 |
strcmd.Append(", OrderersCode");
|
|
89 |
strcmd.Append(", CAST(TargetDate As Char)");
|
|
90 |
strcmd.Append(", RequestNo");
|
|
91 |
strcmd.Append(", OrderNo");
|
|
92 |
strcmd.Append(", DepositAmount");
|
|
93 |
strcmd.Append(", DiscountAmount");
|
|
94 |
strcmd.Append(", CnstrPrice");
|
|
95 |
strcmd.Append(", Fees");
|
|
96 |
strcmd.Append(", OtherAdjustments");
|
|
97 |
strcmd.Append(", DifferenceAmount");
|
|
98 |
strcmd.Append(", ConfirmationPersonCode");
|
|
99 |
strcmd.Append(", DATE_FORMAT(ConfirmationDate, '%Y/%m/%d')");
|
|
100 |
strcmd.Append(", ConfirmationEndFlg");
|
|
101 |
strcmd.Append(", Note");
|
|
102 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
103 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
104 | 104 |
strcmd.Append(" FROM DepositDataDetail"); |
105 | 105 |
strcmd.Append(AddSQLString); |
106 | 106 |
|
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateBudget.cs | ||
---|---|---|
68 | 68 |
StringBuilder strcmd = new StringBuilder(); |
69 | 69 |
strcmd.Append("SELECT"); |
70 | 70 |
|
71 |
strcmd.Append(" ConstructionCode"); // 工事番号 |
|
72 |
strcmd.Append(" ,ConstructionTime"); // 工期
|
|
73 |
strcmd.Append(" ,IntegratedCode"); // 積算者
|
|
74 |
strcmd.Append(" ,DATE_FORMAT(DataCreateDate, '%Y/%m/%d %H:%i:%s')"); // データ引込日
|
|
75 |
strcmd.Append(" ,RetValue1"); // 予定価格
|
|
76 |
strcmd.Append(" ,RetValue2"); // 直接工事費
|
|
77 |
strcmd.Append(" ,RetValue3"); // 積み上げ共通仮設費
|
|
78 |
strcmd.Append(" ,RetValue4"); // 積み上げ現場管理費
|
|
79 |
strcmd.Append(" ,RetPercent"); // 一般管理費率
|
|
71 |
strcmd.Append(" ConstructionCode"); // 工事番号
|
|
72 |
strcmd.Append(", ConstructionTime"); // 工期
|
|
73 |
strcmd.Append(", IntegratedCode"); // 積算者
|
|
74 |
strcmd.Append(", DATE_FORMAT(DataCreateDate, '%Y/%m/%d %H:%i:%s')"); // データ引込日
|
|
75 |
strcmd.Append(", RetValue1"); // 予定価格
|
|
76 |
strcmd.Append(", RetValue2"); // 直接工事費
|
|
77 |
strcmd.Append(", RetValue3"); // 積み上げ共通仮設費
|
|
78 |
strcmd.Append(", RetValue4"); // 積み上げ現場管理費
|
|
79 |
strcmd.Append(", RetPercent"); // 一般管理費率
|
|
80 | 80 |
|
81 | 81 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')"); |
82 | 82 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')"); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOEstimateData.cs | ||
---|---|---|
174 | 174 |
bool bFirst = true; |
175 | 175 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
176 | 176 |
{ |
177 |
if (!bFirst) strcmd.Append(" ,");
|
|
177 |
if (!bFirst) strcmd.Append(", ");
|
|
178 | 178 |
strcmd.Append(gender.ToString()); |
179 | 179 |
bFirst = false; |
180 | 180 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOInvoiceData.cs | ||
---|---|---|
533 | 533 |
StringBuilder strcmd = new StringBuilder(); |
534 | 534 |
strcmd.Append("SELECT"); |
535 | 535 |
strcmd.Append(" InvoiceNo"); |
536 |
strcmd.Append(" ,OrderersDivision");
|
|
537 |
strcmd.Append(" ,OrderersCode");
|
|
538 |
strcmd.Append(" ,RequestMonth");
|
|
539 |
strcmd.Append(" ,SeqNo");
|
|
540 |
strcmd.Append(" ,DATE_FORMAT(CretateDate, '%Y/%m/%d')");
|
|
541 |
strcmd.Append(" ,DATE_FORMAT(RequestDate, '%Y/%m/%d')");
|
|
542 |
strcmd.Append(" ,RequestName");
|
|
543 |
strcmd.Append(" ,TotalAmount");
|
|
544 |
strcmd.Append(" ,TaxAmount");
|
|
545 |
strcmd.Append(" ,Comment1");
|
|
546 |
strcmd.Append(" ,Comment2");
|
|
547 |
strcmd.Append(" ,Comment3");
|
|
548 |
strcmd.Append(" ,Comment4");
|
|
549 |
strcmd.Append(" ,Comment5");
|
|
550 |
strcmd.Append(" ,CompleteFlg");
|
|
551 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
552 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
536 |
strcmd.Append(", OrderersDivision");
|
|
537 |
strcmd.Append(", OrderersCode");
|
|
538 |
strcmd.Append(", RequestMonth");
|
|
539 |
strcmd.Append(", SeqNo");
|
|
540 |
strcmd.Append(", DATE_FORMAT(CretateDate, '%Y/%m/%d')");
|
|
541 |
strcmd.Append(", DATE_FORMAT(RequestDate, '%Y/%m/%d')");
|
|
542 |
strcmd.Append(", RequestName");
|
|
543 |
strcmd.Append(", TotalAmount");
|
|
544 |
strcmd.Append(", TaxAmount");
|
|
545 |
strcmd.Append(", Comment1");
|
|
546 |
strcmd.Append(", Comment2");
|
|
547 |
strcmd.Append(", Comment3");
|
|
548 |
strcmd.Append(", Comment4");
|
|
549 |
strcmd.Append(", Comment5");
|
|
550 |
strcmd.Append(", CompleteFlg");
|
|
551 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
552 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
553 | 553 |
strcmd.Append(" FROM InvoiceData"); |
554 | 554 |
|
555 | 555 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMApproval.cs | ||
---|---|---|
338 | 338 |
try |
339 | 339 |
{ |
340 | 340 |
// SQL作成 |
341 |
strcmd.AppendFormat("SELECT IFNULL(MAX(SeqNo), 0) FROM ApprovalMaster{0}" , AddSQLString);
|
|
341 |
strcmd.AppendFormat("SELECT IFNULL(MAX(SeqNo), 0) FROM ApprovalMaster{0}", AddSQLString); |
|
342 | 342 |
|
343 | 343 |
// SQL実行 |
344 | 344 |
if (!ExecuteReader(strcmd.ToString(), ref arData, bConnect)) return iRet; |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBizPeriodHistory.cs | ||
---|---|---|
177 | 177 |
bool bFirst = true; |
178 | 178 |
foreach (var gender in Enum.GetValues(typeof(TableColumn))) |
179 | 179 |
{ |
180 |
if (!bFirst) strcmd.Append(" ,");
|
|
180 |
if (!bFirst) strcmd.Append(", ");
|
|
181 | 181 |
strcmd.Append(gender.ToString()); |
182 | 182 |
bFirst = false; |
183 | 183 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMBusinessType.cs | ||
---|---|---|
71 | 71 |
// SQL作成(DateTime型が変換できないのでCharに変換しておく) |
72 | 72 |
strcmd.Append("SELECT"); |
73 | 73 |
strcmd.Append(" BusinessTypeCode, DisplayOrder, BusinessTypeName"); |
74 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
75 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
74 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
75 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
76 | 76 |
strcmd.Append(" FROM BusinessTypeMaster"); |
77 | 77 |
strcmd.Append(AddSQLString); |
78 | 78 |
|
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCategoryName.cs | ||
---|---|---|
74 | 74 |
strcmd.Append("SELECT"); |
75 | 75 |
|
76 | 76 |
strcmd.Append(" NameCode"); |
77 |
strcmd.Append(" ,CategoryCode");
|
|
78 |
strcmd.Append(" ,DisplayOrder");
|
|
79 |
strcmd.Append(" ,CategoryName");
|
|
80 |
strcmd.Append(" ,DeleteFlg");
|
|
77 |
strcmd.Append(", CategoryCode");
|
|
78 |
strcmd.Append(", DisplayOrder");
|
|
79 |
strcmd.Append(", CategoryName");
|
|
80 |
strcmd.Append(", DeleteFlg");
|
|
81 | 81 |
|
82 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
83 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
82 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
83 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
84 | 84 |
strcmd.Append(" FROM CategoryNameMaster"); |
85 | 85 |
strcmd.Append(AddSQLString); |
86 | 86 |
|
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMChgChargeDep.cs | ||
---|---|---|
180 | 180 |
bool bFirst = true; |
181 | 181 |
foreach (var gender in Enum.GetValues(typeof(ColumnCnt))) |
182 | 182 |
{ |
183 |
if (!bFirst) strcmd.Append(" ,");
|
|
183 |
if (!bFirst) strcmd.Append(", ");
|
|
184 | 184 |
strcmd.Append(gender.ToString()); |
185 | 185 |
bFirst = false; |
186 | 186 |
} |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostLarge.cs | ||
---|---|---|
68 | 68 |
StringBuilder strcmd = new StringBuilder(); |
69 | 69 |
strcmd.Append("SELECT"); |
70 | 70 |
strcmd.Append(" LargeCode"); |
71 |
strcmd.Append(" ,DisplayOrder");
|
|
72 |
strcmd.Append(" ,LargeName");
|
|
73 |
strcmd.Append(" ,CommentText");
|
|
74 |
strcmd.Append(" ,DeleteFlg");
|
|
75 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
76 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
71 |
strcmd.Append(", DisplayOrder");
|
|
72 |
strcmd.Append(", LargeName");
|
|
73 |
strcmd.Append(", CommentText");
|
|
74 |
strcmd.Append(", DeleteFlg");
|
|
75 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
76 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
77 | 77 |
strcmd.Append(" FROM CommonCostLarge"); |
78 | 78 |
|
79 | 79 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostLinkMS.cs | ||
---|---|---|
66 | 66 |
StringBuilder strcmd = new StringBuilder(); |
67 | 67 |
strcmd.Append("SELECT"); |
68 | 68 |
strcmd.Append(" LargeCode"); |
69 |
strcmd.Append(" ,MiddleCode");
|
|
70 |
strcmd.Append(" ,ItemCode");
|
|
71 |
strcmd.Append(" ,DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
72 |
strcmd.Append(" ,DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
69 |
strcmd.Append(", MiddleCode");
|
|
70 |
strcmd.Append(", ItemCode");
|
|
71 |
strcmd.Append(", DATE_FORMAT(EntryDate, '%Y/%m/%d %H:%i:%s')");
|
|
72 |
strcmd.Append(", DATE_FORMAT(UpdateDate, '%Y/%m/%d %H:%i:%s')");
|
|
73 | 73 |
strcmd.Append(" FROM CommonCostLinkMS"); |
74 | 74 |
|
75 | 75 |
return strcmd.ToString(); |
branches/src/ProcessManagement/ProcessManagement/DB/IOAccess/IOMCommonCostMiddle.cs | ||
---|---|---|
69 | 69 |
StringBuilder strcmd = new StringBuilder(); |
70 | 70 |
strcmd.Append("SELECT"); |
他の形式にエクスポート: Unified diff