| | |
| | | /// </summary> |
| | | [Route("Pay_WorkTimesBill/GetWorkTimesBill")] |
| | | [HttpGet] |
| | | public object GetWorkTimesBill(string sWhere) |
| | | public object GetWorkTimesBill(string sWhere,string user) |
| | | { |
| | | try |
| | | { |
| | | |
| | | if (!DBUtility.ClsPub.Security_Log("Pay_WorkTimesBillList", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ æ¥çæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | ds = Sc_GetWorkTimesBill(sWhere); |
| | | |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è¿åè®°å½æåï¼"; |
| | |
| | | { |
| | | if (sWhere == null || sWhere.Equals("")) |
| | | { |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_WorkTimesBillList order by æ¥æ desc", "h_v_Pay_WorkTimesBillList"); |
| | | return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Pay_WorkTimesBillList order by hmainid desc", "h_v_Pay_WorkTimesBillList"); |
| | | } |
| | | else |
| | | { |
| | | string sql1 = "select * from h_v_Pay_WorkTimesBillList where 1 = 1 "; |
| | | string sql = sql1 + sWhere + "order by æ¥æ desc"; |
| | | string sql = sql1 + sWhere + " order by hmainid desc"; |
| | | return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Pay_WorkTimesBillList"); |
| | | } |
| | | |
| | |
| | | ",å®¡æ ¸æ¥æ,ä¿®æ¹äºº,ä¿®æ¹æ¥æ,å
³é人, å
³éæ¥æ,HEmpID" + |
| | | ",HEmpNumber,HEmpName,èåç³»æ° HEmpRate,åºæ¬å¤©æ° HBaseDays,åºæ¬å·¥æ¶ HBaseTimes,å çå·¥æ¶ HOverTimes,请åå·¥æ¶ HLeaveTimes,å çå¤©æ° HOverDays,请åå¤©æ° HLeaveDays,è¿å°æ¬¡æ° HLateQty" + |
| | | ",å
¬åº HOutForComQty,ç§åº HOutForEmpQty,å
¬åºæ¶é´ HOutForComTimes,ç§åºæ¶é´ HOutForEmpTimes,è¿å°æ¶é´ HLateTimes,æ©éæ¬¡æ° HEarlyQty,æ©éæ¶é´ HEarlyTimes" + |
| | | ",æ·å·¥å¤©æ° HAbsentDays,ä¸å HAMTimes,ä¸å HPMTimes, 表ä½å¤æ³¨ HRemark,HRestFlag,HSchClassID FROM h_v_Pay_WorkTimesBillList where 1 = 1 "; |
| | | ",æ·å·¥å¤©æ° HAbsentDays,ä¸å HAMTimes,ä¸å HPMTimes,HCTPrjID,HCTPrjNumber,HCTPrjName,HWorkTypeID,HWorkTypeNumber,HWorkTypeName,HPayMoney,HMoney" + |
| | | ",表ä½å¤æ³¨ HRemark,HRestFlag,HSchClassID FROM h_v_Pay_WorkTimesBillList where 1 = 1 "; |
| | | string sql = sql1 + sqlWhere; |
| | | ds = oCN.RunProcReturn(sql, "h_v_Pay_WorkTimesBillList"); |
| | | objJsonResult.code = "0"; |
| | |
| | | return objJsonResult; |
| | | } |
| | | #endregion |
| | | |
| | | /// <summary> |
| | | /// æ°å¢åæ®-ä¿åæé® |
| | | ///åæ°ï¼string sqlã |
| | |
| | | string msg2 = sArray[0].ToString(); |
| | | string msg3 = sArray[1].ToString(); |
| | | string refSav = sArray[2].ToString(); |
| | | //string msg4 = sArray[3].ToString(); |
| | | string msg4 = sArray[3].ToString(); |
| | | |
| | | string UserName = ""; |
| | | string s = ""; |
| | | ListModels oListModels = new ListModels(); |
| | | try |
| | | { |
| | | ////ç¼è¾æé |
| | | //if (!DBUtility.ClsPub.Security_Log_second("Pay_SingleBalBill_Edit", 1, true, msg4)) |
| | | //{ |
| | | // objJsonResult.code = "0"; |
| | | // objJsonResult.count = 0; |
| | | // objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | // objJsonResult.data = null; |
| | | // return objJsonResult; |
| | | //} |
| | | //ç¼è¾æé |
| | | if (!DBUtility.ClsPub.Security_Log_second("Pay_WorkTimesBill_Edit", 1, false, msg4)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ ä¿åæéï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | |
| | | DLL.ClsPay_WorkTimesBill oBill = new DLL.ClsPay_WorkTimesBill(); |
| | | List<Models.ClsPay_WorkTimesBillMain> lsmain = new List<Models.ClsPay_WorkTimesBillMain>(); |
| | |
| | | /// <returns></returns> |
| | | [Route("Pay_WorkTimesBill/DeltetWorkTimesBill")] |
| | | [HttpGet] |
| | | public object DeltetWorkTimesBill(string HInterID) |
| | | public object DeltetWorkTimesBill(string HInterID,string user) |
| | | { |
| | | try |
| | | { |
| | | if (!DBUtility.ClsPub.Security_Log("Pay_WorkTimesBill_Drop", 1, false, user)) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "æ å 餿éï¼"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | oCN.BeginTran(); |
| | | oCN.RunProc("Delete From Pay_WorkTimesBillMain where HInterID = " + HInterID); |
| | | oCN.RunProc("Delete From Pay_WorkTimesBillSub where HInterID = " + HInterID); |
| | |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | // |
| | | /// <summary> |
| | | /// éè¿çç»æ¥è¯¢èåä¿¡æ¯ |
| | | ///åæ°ï¼string sqlã |
| | | ///è¿åå¼ï¼objectã |
| | | /// </summary> |
| | | [Route("Pay_WorkTimesBill/GetEmployeeByHGroup")] |
| | | [HttpGet] |
| | | public object GetEmployeeByHGroup(int HGroupID) |
| | | { |
| | | if (HGroupID <= 0) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "çç»æªéæ©"; |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> list = new List<object>(); |
| | | DataSet ds1; |
| | | string sql1 = string.Format(@"select a.HItemID HEmpID,a.HNumber HEmpNumber,a.HName HEmpName,a.HEmpRate HEmpRate,a.HCTPrjID,b.HName HCTPrjName from Gy_Employee a |
| | | left join Gy_ClassTimePrjGroup b on a.HCTPrjID=b.HItemID |
| | | where a.HGroupID=" + HGroupID); |
| | | ds1 = oCN.RunProcReturn(sql1, "Gy_Employee"); |
| | | list.Add(ds1.Tables[0]); |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.list = list; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | |
| | | [Route("Pay_WorkTimesBill/calcAvgMoney")] |
| | | [HttpPost] |
| | | public object GetEmployeeByHGroup([FromBody] JObject msg) { |
| | | try |
| | | { |
| | | SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); |
| | | List<object> list = new List<object>(); |
| | | DataSet ds; |
| | | string sql = string.Format($"exec h_p_CalcAvgMoney '{msg["msg"]}'"); |
| | | ds = oCN.RunProcReturn(sql, "h_p_CalcAvgMoney"); |
| | | objJsonResult.code = "1"; |
| | | objJsonResult.count = 1; |
| | | objJsonResult.Message = "è·åä¿¡æ¯æåï¼"; |
| | | objJsonResult.data = ds.Tables[0]; |
| | | return objJsonResult; |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | objJsonResult.code = "0"; |
| | | objJsonResult.count = 0; |
| | | objJsonResult.Message = "没æè¿åä»»ä½è®°å½ï¼" + ex.ToString(); |
| | | objJsonResult.data = null; |
| | | return objJsonResult; |
| | | } |
| | | } |
| | | } |
| | | } |