public List <WorkAllResult> GetAllWorkDays(WorkAllList model) { if (null == model) { return(null); } return(DBSession.IView_A02DAL.GetAllWorkDays(model)); }
/// <summary> /// 获取个人拖欠薪资 /// </summary> /// <param name="model"></param> /// <returns></returns> public List <WorkMoneyResult> GetTradyWageByYear(WorkAllList model) { if (null == model) { return(null); } return(DBSession.IWGJG02DAL.GetTradyWageByYear(model)); }
/// <summary> /// 根据年份统计具体人员每月出工情况 /// </summary> /// <param name="model"></param> /// <returns></returns> public List <WorkAllResult> GetAllWorkDays(WorkAllList model) { sb?.Clear(); sb.Append(string.Format(@"SELECT COUNT(T1.checkDate) AS work_days,work_date FROM (SELECT DISTINCT CONVERT(varchar(100), A0201, 23) AS checkDate,convert(varchar(7),A0201,120) AS work_date FROM View_A02 WHERE A0177=(SELECT user_identify FROM dbo.T_User WHERE user_guid=@userid) AND YEAR(A0201)={0}) T1 GROUP BY T1.work_date ORDER BY T1.work_date ASC;", model.year)); _param?.Clear(); _param.Add("@userid", model.userid); DataTable dt = SqlHelper.ExecuteDataTable(sb.ToString(), CommandType.Text, SqlHelper.GetParameters(_param)); return(HCQ2_Common.Data.DataTableHelper.DataTableToIList <WorkAllResult>(dt)); }
public object GetWorkAllList(WorkAllList model) { if (!ModelState.IsValid) { return(operateContext.RedirectWebApi(WebResultCode.Exception, GlobalConstant.参数异常.ToString(), false)); } List <WorkAllResult> uResult = operateContext.bllSession.View_A02.GetAllWorkDays(model); if (null == uResult || uResult.Count <= 0) { return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据为空.ToString(), "")); } return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据获取成功.ToString(), uResult)); }
public object GetBackWorkMoneyList(WorkAllList model) { if (!ModelState.IsValid) { return(operateContext.RedirectWebApi(WebResultCode.Exception, GlobalConstant.参数异常.ToString(), false)); } List <WorkMoneyResult> uResult = operateContext.bllSession.WGJG02.GetTradyWageByYear(model); if (null == uResult || uResult.Count <= 0) { return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据为空.ToString(), "")); } return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据获取成功.ToString(), uResult)); }
/// <summary> /// 获取个人拖欠薪资 /// </summary> /// <param name="model"></param> /// <returns></returns> public List <WorkMoneyResult> GetTradyWageByYear(WorkAllList model) { sb?.Clear(); sb.Append(string.Format(@"SELECT CONVERT(varchar(100), pay_date, 23) AS pay_date,WGJG0207,WGJG0208,code.WGJG0211 FROM (SELECT pay_date=(CASE WHEN ISNULL(WGJG0201,'')='' THEN WGJG0202 ELSE WGJG0201 END), ISNULL(WGJG0207,0) AS WGJG0207,ISNULL(WGJG0208,0) AS WGJG0208,WGJG0211,A0177 FROM dbo.WGJG02 WHERE ISNULL(WGJG0211,'2')='2' AND ISNULL(WGJG0207,0)<>0 AND ISNULL(WGJG0208,0)<>0)wg INNER JOIN (SELECT CodeItemID, CodeItemName AS WGJG0211 FROM dbo.SM_CodeItems WHERE CodeID = '45') code ON wg.WGJG0211=code.CodeItemID INNER JOIN (SELECT user_identify FROM dbo.T_User WHERE user_guid=@userid) u ON wg.A0177=u.user_identify WHERE YEAR(pay_date)={0} ORDER BY pay_date;", model.year)); _param?.Clear(); _param.Add("@userid", model.userid); DataTable dt = SqlHelper.ExecuteDataTable(sb.ToString(), CommandType.Text, SqlHelper.GetParameters(_param)); return(HCQ2_Common.Data.DataTableHelper.DataTableToIList <WorkMoneyResult>(dt)); }