| | |
| | | " HBillNo = '" + omodel.HBillNo + |
| | | "', HDate = '" + omodel.HDate + |
| | | "', HYear = " + omodel.HYear + |
| | | ", HPeriod = " + omodel.HPeriod + |
| | | ", HWeek = " + omodel.HWeek + |
| | | ", HRemark = '" + omodel.HRemark + |
| | | "', HUpDater = '" + omodel.HUpDater + |
| | | "', HUpDateDate = getdate()" + |
| | | //=============================================================== |
| | | ", HOrgID = " + omodel.HOrgID + |
| | | ", HYear = " + omodel.HYear + |
| | | ", HWeek = " + omodel.HWeek + |
| | | ", HBeginDate = '" + omodel.HBeginDate + |
| | | ", HWorkReport = '" + omodel.HWorkReport + |
| | | "', HNextPlan = '" + omodel.HNextPlan + |
| | | "', HWorkGain = '" + omodel.HWorkGain + |
| | | "', HBeginDate = '" + omodel.HBeginDate + |
| | | "', HEndDate = '" + omodel.HEndDate + |
| | | "', HPlanEmpID = " + omodel.HReportEmpID + |
| | | "', HReportEmpID = " + omodel.HReportEmpID + |
| | | " where HInterID = " + omodel.HInterID; |
| | | |
| | | oCn.RunProc(mainSql); |
| | | //å é¤å
³è |
| | | DeleteRelation(ref sReturn, lngBillKey); |
| | | //å é¤å表 |
| | |
| | | public string HMainSourceBillNo; |
| | | public string HMainSourceBillType; |
| | | public int HOrderLevID; |
| | | public int HHasten; |
| | | } |
| | | #endregion |
| | | |
| | |
| | | int HMainSourceEntryID = mainList[0].HMainSourceEntryID; |
| | | string HMainSourceBillNo = mainList[0].HMainSourceBillNo; |
| | | string HMainSourceBillType = mainList[0].HMainSourceBillType; |
| | | int HOrderLevID = mainList[0].HOrderLevID == null ? 0 : mainList[0].HOrderLevID; |
| | | int HHasten = mainList[0].HHasten == null ? 0 : mainList[0].HHasten; |
| | | 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,HOrderLevID,HHasten)" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID)" + |
| | | "values(" + |
| | | "" + HYear + |
| | | "," + HPeriod + |
| | |
| | | ",'" + HMainSourceBillNo + |
| | | "','" + HMainSourceBillType + |
| | | "','" + HOrderLevID + |
| | | "','" + HHasten + |
| | | "')"; |
| | | |
| | | //主表 |
| | |
| | | ",HMainSourceBillNo = '" + HMainSourceBillNo + |
| | | "',HMainSourceBillType = '" + HMainSourceBillType + |
| | | "',HOrderLevID = '" + HOrderLevID + |
| | | "',HHasten = '" + HHasten + |
| | | "' 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,HOrderLevID,HHasten )" + |
| | | ",HSelfTimes,HLastDate,HSendEmp,HReceiveEmp,HType,HCopyEmp,HRemark,HOrgID,HMaker,HMakeDate,HMainSourceInterID,HMainSourceEntryID,HMainSourceBillNo,HMainSourceBillType,HOrderLevID )" + |
| | | "values(" + |
| | | "" + HYear + |
| | | "," + HPeriod + |
| | |
| | | ",'" + HMainSourceBillNo + |
| | | "','" + HMainSourceBillType + |
| | | "','" + HOrderLevID + |
| | | "','" + HHasten + |
| | | "')"; |
| | | //主表 |
| | | oCN.RunProc(sql); |
| | |
| | | } |
| | | #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 |
| | |
| | | #endregion |
| | | |
| | | #region å·¥ä½å¨æ»ç» è·ååè¡¨æ°æ® |
| | | [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainList")] |
| | | [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillList")] |
| | | [HttpGet] |
| | | public object PM_WorkReportWeekBillMainList(string sWhere, string user) |
| | | public object PM_WorkReportWeekBillList(string sWhere, string user) |
| | | { |
| | | try |
| | | { |
| | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region å·¥ä½å¨æ»ç» å é¤ |
| | | /// <summary> |
| | | ///åæ°ï¼string HInterIDã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("PM_WorkTaskWeekBill/PM_WorkReportWeekBillMainDelete")] |
| | | [HttpGet] |
| | | public object PM_WorkReportWeekBillMainDelete(string HInterID, string user) |
| | | { |
| | | try |
| | | { |
| | | //æ¥çæé |
| | | if (!DBUtility.ClsPub.Security_Log("PM_WorkReportWeekBillMain_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | if (HInterID == null || HInterID.Equals("")) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "HInterIDä¸è½ä¸ºç©ºï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | oCn.BeginTran(); |
| | | |
| | | oCn.RunProc("delete from PM_WorkReportWeekBillMain where HInterID = " + HInterID); |
| | | //oCn.RunProc("delete from PM_WorkTaskWeekBillSub where HInterID='" + HInterID + "'"); |
| | | |
| | | oCn.Commit(); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | 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 |
| | | } |
| | | } |