| | |
| | | public string HReportNote; |
| | | public string HAdv; |
| | | public string HRemarkSub; |
| | | public int HSourceInterID; |
| | | public int HSourceEntryID; |
| | | public string HSourceBillNo; |
| | | public string HSourceBillType; |
| | | } |
| | | #endregion |
| | | #region 项ç®é¶æ®µæ¸
å æ°å¢/ç¼è¾-ä¿å |
| | |
| | | oCN.RunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + user + "','" + HComputerName + "','" + "æ°å¢ä»»å¡æ±æ¥ï¼" + HBillNo + "','LMES-任塿±æ¥æ¨¡å','" + DBUtility.ClsPub.IPAddress + "','æ°å¢åæ®'", ref DBUtility.ClsPub.sExeReturnInfo); |
| | | } |
| | | //ä¿åå表 |
| | | objJsonResult = AddBillSub_WorkTaskReportBill(msg3, HInterID, HBillNo, OperationType, HProID, HProjectStageID, HMainSourceBillType, HMainSourceBillNo); |
| | | objJsonResult = AddBillSub_WorkTaskReportBill(msg3, HInterID, HBillNo, OperationType); |
| | | |
| | | if (objJsonResult.code == "0") |
| | | { |
| | |
| | | } |
| | | #endregion |
| | | #region æ·»å 项ç®é¶æ®µæ¸
å å表 |
| | | public json AddBillSub_WorkTaskReportBill(string msg3, long HInterID, string HBillNo, int OperationType, int HSourceInterID, int HSourceEntryID, string HSourceBillType, string HSourceBillNo) |
| | | public json AddBillSub_WorkTaskReportBill(string msg3, long HInterID, string HBillNo, int OperationType) |
| | | { |
| | | List<PM_WorkTaskReportBill_Sub> DetailColl = Newtonsoft.Json.JsonConvert.DeserializeObject<List<PM_WorkTaskReportBill_Sub>>(msg3); |
| | | int i = 0; //ä½ä¸ºå表å
ç |
| | | if(OperationType == 4) { |
| | | foreach (PM_WorkTaskReportBill_Sub oSub in DetailColl) |
| | | { |
| | | i++; //åä¸ä¸ªä¸»è¡¨ä¸çå表çå
ç èªå¢ |
| | | |
| | | int HEntryID = i; |
| | | string HProNumber = oSub.HProNumber; |
| | | int HProjectStageID = oSub.HProjectStageID; |
| | | string HName = oSub.HName; |
| | | string HTaskNote = oSub.HTaskNote; |
| | | string HType = oSub.HType; |
| | | double HRelTimes = oSub.HRelTimes; |
| | | string HReportNote = oSub.HReportNote; |
| | | string HAdv = oSub.HAdv; |
| | | string HRemark = oSub.HRemarkSub; |
| | | |
| | | string sql = "insert into PM_WorkTaskReportBillSub" + |
| | | "(HInterID,HBillNo_bak,HEntryID,HRemark,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo) " + |
| | | "values(" + |
| | | "" + HInterID + |
| | | ",'" + HBillNo + |
| | | "'," + HEntryID + |
| | | ",'" + HRemark + |
| | | "','" + HProNumber + |
| | | "'," + HProjectStageID + |
| | | ",'" + HName + |
| | | "','" + HTaskNote + |
| | | "','" + HType + |
| | | "'," + HRelTimes + |
| | | ",'" + HReportNote + |
| | | "','" + HAdv + |
| | | "'," + HSourceInterID + |
| | | "," + HSourceEntryID + |
| | | ",'" + HSourceBillType + |
| | | "','" + HSourceBillNo + |
| | | "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | } |
| | | } |
| | | else |
| | | foreach (PM_WorkTaskReportBill_Sub oSub in DetailColl) |
| | | { |
| | | foreach (PM_WorkTaskReportBill_Sub oSub in DetailColl) |
| | | { |
| | | i++; //åä¸ä¸ªä¸»è¡¨ä¸çå表çå
ç èªå¢ |
| | | i++; //åä¸ä¸ªä¸»è¡¨ä¸çå表çå
ç èªå¢ |
| | | |
| | | int HEntryID = i; |
| | | string HProNumber = oSub.HProNumber; |
| | | int HProjectStageID = oSub.HProjectStageID; |
| | | string HName = oSub.HName; |
| | | string HTaskNote = oSub.HTaskNote; |
| | | string HType = oSub.HType; |
| | | double HRelTimes = oSub.HRelTimes; |
| | | string HReportNote = oSub.HReportNote; |
| | | string HAdv = oSub.HAdv; |
| | | string HRemark = oSub.HRemarkSub; |
| | | int HEntryID = i; |
| | | string HProNumber = oSub.HProNumber; |
| | | int HProjectStageID = oSub.HProjectStageID; |
| | | string HName = oSub.HName; |
| | | string HTaskNote = oSub.HTaskNote; |
| | | string HType = oSub.HType; |
| | | double HRelTimes = oSub.HRelTimes; |
| | | string HReportNote = oSub.HReportNote; |
| | | string HAdv = oSub.HAdv; |
| | | string HRemark = oSub.HRemarkSub; |
| | | int HSourceInterID = oSub.HSourceInterID; |
| | | int HSourceEntryID = oSub.HSourceEntryID; |
| | | string HSourceBillNo = oSub.HSourceBillNo; |
| | | string HSourceBillType = oSub.HSourceBillType; |
| | | |
| | | string sql = "insert into PM_WorkTaskReportBillSub" + |
| | | "(HInterID,HBillNo_bak,HEntryID,HRemark,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv) " + |
| | | "values(" + |
| | | "" + HInterID + |
| | | ",'" + HBillNo + |
| | | "'," + HEntryID + |
| | | ",'" + HRemark + |
| | | "','" + HProNumber + |
| | | "'," + HProjectStageID + |
| | | ",'" + HName + |
| | | "','" + HTaskNote + |
| | | "','" + HType + |
| | | "'," + HRelTimes + |
| | | ",'" + HReportNote + |
| | | "','" + HAdv + |
| | | "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | } |
| | | string sql = "insert into PM_WorkTaskReportBillSub" + |
| | | "(HInterID,HBillNo_bak,HEntryID,HRemark,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo) " + |
| | | "values(" + |
| | | "" + HInterID + |
| | | ",'" + HBillNo + |
| | | "'," + HEntryID + |
| | | ",'" + HRemark + |
| | | "','" + HProNumber + |
| | | "'," + HProjectStageID + |
| | | ",'" + HName + |
| | | "','" + HTaskNote + |
| | | "','" + HType + |
| | | "'," + HRelTimes + |
| | | ",'" + HReportNote + |
| | | "','" + HAdv + |
| | | "'," + HSourceInterID + |
| | | "," + HSourceEntryID + |
| | | ",'" + HSourceBillType + |
| | | "','" + HSourceBillNo + |
| | | "')"; |
| | | |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |