| | |
| | | public int HMainSourceEntryID; |
| | | public string HMainSourceBillNo; |
| | | public string HMainSourceBillType; |
| | | public int HOrderLevID; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | int HMainSourceEntryID = mainList[0].HMainSourceEntryID; |
| | | string HMainSourceBillNo = mainList[0].HMainSourceBillNo; |
| | | string HMainSourceBillType = mainList[0].HMainSourceBillType; |
| | | int HOrderLevID = mainList[0].HOrderLevID; |
| | | |
| | | |
| | | |
| | | if (OperationType == 2) |
| | |
| | | { |
| | | string sql = "insert into PM_WorkTaskBillMain" + |
| | | "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" + |
| | | "values(" + |
| | | "" + HYear + |
| | | "," + HPeriod + |
| | |
| | | "','" + HReceiveEmp + |
| | | "','" + HType + |
| | | "','" + HCopyEmp + |
| | | "','" + HRemark + |
| | | "','" + HRemark + |
| | | "'," + HOrgID + |
| | | ",'" + HMaker + |
| | | "','" + HMakerDate + |
| | |
| | | "," + HMainSourceEntryID + |
| | | ",'" + HMainSourceBillNo + |
| | | "','" + HMainSourceBillType + |
| | | "','" + HOrderLevID + |
| | | "')"; |
| | | |
| | | //主表 |
| | |
| | | ",HMainSourceEntryID = " + HMainSourceEntryID + |
| | | ",HMainSourceBillNo = '" + HMainSourceBillNo + |
| | | "',HMainSourceBillType = '" + HMainSourceBillType + |
| | | "',HOrderLevID = '" + HOrderLevID + |
| | | "' where HInterID = " + HInterID; |
| | | |
| | | oCN.RunProc(sql); |
| | |
| | | { |
| | | string sql = "insert into PM_WorkTaskBillMain" + |
| | | "(HYear,HPeriod,HBillType,HBillSubType,HInterID,HBillNo,HProjectID,HProNumber,HProjectStageID,HName,HDate,HTaskNote,HPlanTimes" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType)" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID )" + |
| | | "values(" + |
| | | "" + HYear + |
| | | "," + HPeriod + |
| | |
| | | "," + HMainSourceEntryID + |
| | | ",'" + HMainSourceBillNo + |
| | | "','" + HMainSourceBillType + |
| | | "','" + HOrderLevID + |
| | | "')"; |
| | | //主表 |
| | | oCN.RunProc(sql); |
| | |
| | | string sql = sql1 + sWhere + " order by åæ®å· desc"; |
| | | ds = oCN.RunProcReturn(sql, "h_v_PM_WorkTaskBillList"); |
| | | } |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ä½ä»»å¡å表 䏿¨æ°æ®æ¥è¯¢ |
| | | /// <summary> |
| | | /// è¿å项ç®é¶æ®µå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_WorkTaskBill/XTList")] |
| | | [HttpGet] |
| | | public object XTList(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("select * from h_v_PM_WorkTaskBillMyList where HInterID ='"+ HInterID + "' and æ¥å人='"+user+"'", "h_v_PM_WorkTaskBillMyList"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 订åç级å表 æ¥è¯¢ |
| | | /// <summary> |
| | | /// è¿å项ç®é¶æ®µå表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_WorkTaskBill/getOrder")] |
| | | [HttpGet] |
| | | public object getOrder() |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | //if (HItemID == null || HItemID.Equals("")) |
| | | //{ |
| | | //ds = oCN.RunProcReturn("select * from Gy_OrderLev ", "Gy_OrderLev"); |
| | | //} |
| | | //else |
| | | //{ |
| | | // string sql = "select * from Gy_OrderLev where HItemID='"+ HItemID + "'"; |
| | | // ds = oCN.RunProcReturn(sql, "Gy_OrderLev"); |
| | | //} |
| | | ds = oCN.RunProcReturn("select * from Gy_OrderLev ", "Gy_OrderLev"); |
| | | |
| | | |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ä½ä»»å¡ å¼å§ä»»å¡/æ¤éå¼å§åè½ |
| | | [Route("PM_WorkTaskBill/BeginPM_WorkTaskBill")] |
| | | [HttpGet] |
| | | public object BeginPM_WorkTaskBill(string HInterID, int Type, string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "PM_WorkTaskBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | //Type 0 å¼å§ä»»å¡ 1 æ¤éä»»å¡ 2ç»æä»»å¡ |
| | | if (Type == 0) |
| | | { |
| | | //夿忮æ¯å¦åå¨ |
| | | DataSet ds; |
| | | string sql = "select * from PM_WorkTaskBillMain where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | if (DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HMainSourceBillType"])== "4759") |
| | | { |
| | | var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"]; |
| | | string sql1 = "update PM_WorkTaskBillMain set HTaskStatus='å·²å¼å§' where HinterID = " + HInterID; |
| | | oCN.RunProc(sql1); |
| | | string sql2 = "update PM_CustomerTaskBillMain set HTaskStatus='å·²å¼å§' where HinterID = " + lInterID; |
| | | oCN.RunProc(sql2); |
| | | } |
| | | else |
| | | { |
| | | string sql2 = "update PM_WorkTaskBillMain set HTaskStatus='å·²å¼å§' where HinterID = " + HInterID; |
| | | oCN.RunProc(sql2); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | else if(Type==1) |
| | | { |
| | | //夿忮æ¯å¦åå¨ |
| | | DataSet ds; |
| | | string sql = "select * from PM_WorkTaskBillMain where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"]; |
| | | string sql1 = "update PM_WorkTaskBillMain set HTaskStatus='æªå¼å§' where HinterID = " + HInterID; |
| | | oCN.RunProc(sql1); |
| | | string sql2 = "update PM_CustomerTaskBillMain set HTaskStatus='æªå¼å§' where HinterID = " + lInterID; |
| | | oCN.RunProc(sql2); |
| | | } |
| | | } |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | oCN.RollBack(); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ§è¡å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ä½ä»»å¡ å¬ä¿æ¬¡æ°åè½ |
| | | [Route("PM_WorkTaskBill/UpdateHHasten")] |
| | | [HttpGet] |
| | | public object UpdateHHasten(string HInterID, int HHasten, string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (string.IsNullOrWhiteSpace(HInterID)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterID为空ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | ClsPub.CurUserName = user; |
| | | BillOld.MvarItemKey = "PM_WorkTaskBillMain"; |
| | | oCN.BeginTran();//å¼å§äºå¡ |
| | | |
| | | DataSet ds; |
| | | string sql = "select * from PM_WorkTaskBillMain where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql, "PM_WorkTaskBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | string sql1 = "update PM_WorkTaskBillMain set HHasten='"+ HHasten+ "' where HinterID = " + HInterID; |
| | | ds = oCN.RunProcReturn(sql1, "PM_WorkTaskBillMain"); |
| | | } |
| | | |
| | | oCN.Commit();//æäº¤äºå¡ |
| | | |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "æ§è¡æåï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; ; |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ§è¡å¤±è´¥ï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 任塿±æ¥ æ°å¢/ç¼è¾-ä¿å |
| | | #region 任塿±æ¥ è¡¨å¤´æ°æ® |
| | | public class PM_WorkTaskReportBill_Main |
| | |
| | | public class PM_WorkTaskReportBill_Sub |
| | | { |
| | | public int RowID; |
| | | public int HProjectID; |
| | | public string HProNumber; |
| | | public int HProjectStageID; |
| | | public string HProjectStageName; |
| | |
| | | public int HSourceEntryID; |
| | | public string HSourceBillNo; |
| | | public string HSourceBillType; |
| | | public bool HFinishFlag; |
| | | } |
| | | #endregion |
| | | #region 项ç®é¶æ®µæ¸
å æ°å¢/ç¼è¾-ä¿å |
| | | #region 任塿±æ¥ æ°å¢/ç¼è¾-ä¿å |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | #region æ·»å 项ç®é¶æ®µæ¸
å 主表 |
| | | #region æ·»å 任塿±æ¥ 主表 |
| | | public json AddBillMain_WorkTaskReportBill(string msg1) |
| | | { |
| | | string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); |
| | |
| | | string HUpdater = mainList[0].HUpdater; |
| | | string HUpdaterDate = mainList[0].HUpdaterDate; |
| | | |
| | | |
| | | |
| | | if (OperationType == 2) |
| | | //ä¿ååæ§å¶ |
| | | DataSet BeforeDs = oCN.RunProcReturn("Exec h_p_PM_WorkTaskReportBill_BeforeSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_PM_WorkTaskReportBill_BeforeSaveCtrl"); |
| | | if (BeforeDs == null || BeforeDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | ds = oCN.RunProcReturn("select * from PM_WorkTaskReportBillMain where HBillNo ='" + HBillNo + "'", "PM_WorkTaskReportBillMain"); |
| | | if (ds.Tables[0].Rows.Count > 0) |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(BeforeDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®å·éå¤,è¯·éæ°è¾å
¥!"; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(BeforeDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | |
| | | oCN.RunProc(sql); |
| | | |
| | | //å é¤åè¡¨æ¶ åå¡«å·¥ä½ä»»å¡åå
³èæ°éãåæ®ç¶æ |
| | | oCN.RunProc("exec h_p_PM_UpDateRelation_WorkTaskToWorkTaskReport_Delete " + HInterID.ToString()); |
| | | //å é¤å表 |
| | | oCN.RunProc("delete from PM_WorkTaskReportBillSub where HInterID='" + HInterID + "'"); |
| | | //è®°å½æ¥å¿ |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | #region æ·»å 项ç®é¶æ®µæ¸
å å表 |
| | | #region æ·»å 任塿±æ¥ å表 |
| | | 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); |
| | |
| | | i++; //åä¸ä¸ªä¸»è¡¨ä¸çå表çå
ç èªå¢ |
| | | |
| | | int HEntryID = i; |
| | | int HProjectID = oSub.HProjectID; |
| | | string HProNumber = oSub.HProNumber; |
| | | int HProjectStageID = oSub.HProjectStageID; |
| | | string HName = oSub.HName; |
| | |
| | | int HSourceEntryID = oSub.HSourceEntryID; |
| | | string HSourceBillNo = oSub.HSourceBillNo; |
| | | string HSourceBillType = oSub.HSourceBillType; |
| | | bool HFinishFlag = oSub.HFinishFlag; |
| | | |
| | | if (HFinishFlag==true) |
| | | { |
| | | //夿忮æ¯å¦åå¨ |
| | | DataSet ds; |
| | | string sqls = "select * from PM_WorkTaskBillMain where HinterID = " + HSourceInterID; |
| | | ds = oCN.RunProcReturn(sqls, "PM_WorkTaskBillMain"); |
| | | if (ds == null || ds.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "åæ®ä¸åå¨ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0) |
| | | { |
| | | var lInterID = ds.Tables[0].Rows[0]["HMainSourceInterID"]; |
| | | string sql1 = "update PM_WorkTaskBillMain set HTaskStatus='已宿' where HinterID = " + HSourceInterID; |
| | | oCN.RunProc(sql1); |
| | | string sql2 = "update PM_CustomerTaskBillMain set HTaskStatus='已宿' where HinterID = " + lInterID; |
| | | oCN.RunProc(sql2); |
| | | } |
| | | } |
| | | |
| | | string sql = "insert into PM_WorkTaskReportBillSub" + |
| | | "(HInterID,HBillNo_bak,HEntryID,HRemark,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo) " + |
| | | "(HInterID,HBillNo_bak,HEntryID,HRemark,HProjectID,HProNumber,HProjectStageID,HName,HTaskNote,HType,HRelTimes,HReportNote,HAdv,HSourceInterID,HSourceEntryID,HSourceBillType,HSourceBillNo,HFinishFlag) " + |
| | | "values(" + |
| | | "" + HInterID + |
| | | ",'" + HBillNo + |
| | | "'," + HEntryID + |
| | | ",'" + HRemark + |
| | | "','" + HProNumber + |
| | | "'," + HProjectID + |
| | | ",'" + HProNumber + |
| | | "'," + HProjectStageID + |
| | | ",'" + HName + |
| | | "','" + HTaskNote + |
| | |
| | | "," + HSourceEntryID + |
| | | ",'" + HSourceBillType + |
| | | "','" + HSourceBillNo + |
| | | "')"; |
| | | "'," + DBUtility.ClsPub.BoolToString(HFinishFlag) + |
| | | ")"; |
| | | |
| | | oCN.RunProc(sql); |
| | | } |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | //ä¿ååæ§å¶ |
| | | DataSet AfterDs = oCN.RunProcReturn("Exec h_p_PM_WorkTaskReportBill_AfterSaveCtrl " + HInterID.ToString() + ",'" + HBillNo + "'," + OperationType.ToString(), "h_p_PM_WorkTaskReportBill_AfterSaveCtrl"); |
| | | if (AfterDs == null || AfterDs.Tables[0].Rows.Count == 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿ååå¤æå¤±è´¥ï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | if (DBUtility.ClsPub.isLong(AfterDs.Tables[0].Rows[0]["HBack"]) == 1) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "ä¿å失败ï¼" + DBUtility.ClsPub.isStrNull(AfterDs.Tables[0].Rows[0]["HRemark"]); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | //åå¡«å·¥ä½ä»»å¡åå
³èæ°éãåæ®ç¶æ |
| | | oCN.RunProc("exec h_p_PM_UpDateRelation_WorkTaskToWorkTaskReport_Add " + HInterID.ToString()); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = null; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | #endregion |
| | |
| | | |
| | | oCN.BeginTran(); |
| | | |
| | | //å é¤åè¡¨æ¶ åå¡«å·¥ä½ä»»å¡åå
³èæ°éãåæ®ç¶æ |
| | | oCN.RunProc("exec h_p_PM_UpDateRelation_WorkTaskToWorkTaskReport_Delete " + HInterID.ToString()); |
| | | oCN.RunProc("delete from PM_WorkTaskReportBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("delete from PM_WorkTaskReportBillSub where HInterID='" + HInterID + "'"); |
| | | |
| | |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.Message = "å 餿åï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region æçä»»å¡åè¡¨ï¼æªå®æï¼å·²å®æï¼æ£å¨è¿è¡ï¼ |
| | | /// <summary> |
| | | /// è¿åæçä»»å¡å表 |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_WorkTaskBill/PM_WorkTaskBillMainList")] |
| | | [HttpGet] |
| | | public object PM_WorkTaskBillMainList( string user) |
| | | { |
| | | try |
| | | { |
| | | List<object> columnNameList = new List<object>(); |
| | | |
| | | ds = oCN.RunProcReturn("exec h_p_PM_WorkTaskBillMyList " + user, "h_p_PM_WorkTaskBillMyList"); |
| | | |
| | | if (ds.Tables[0].Rows.Count != 0 || ds != null) |
| | | { |
| | | //æ·»å åå |
| | | foreach (DataColumn col in ds.Tables[0].Columns) |
| | | { |
| | | Type dataType = col.DataType; |
| | | string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; |
| | | columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//è·åå°DataColumnå对象çåå |
| | | } |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "Sucessï¼"; |
| | | objJsonResult.data = ds; |
| | | objJsonResult.list = columnNameList; |
| | | return objJsonResult; |
| | | } |
| | | else |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ°æ®"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "Exceptionï¼" + e.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | } |
| | | } |