//*********************************APP Service************************************* public List <DebtSelResultModel> GetDebtTime(DebtSelModel model, int user_id, List <string> orgid) { //1:判断是否分配范围 if (null != orgid || orgid.Count > 0) { _param.Clear(); _param.Add("@UnitID", string.Join(",", orgid)); _param.Add("@startDate", model.startDate); _param.Add("@endDate", model.endDate); DataTable dt = SqlHelper.ExecuteDataTable("exec P_GetQianXin_ShiJian @UnitID,@startDate,@endDate", CommandType.Text, SqlHelper.GetParameters(_param)); return(HCQ2_Common.Data.DataTableHelper.DataTableToIList <DebtSelResultModel>(dt)); } //2:没有分配范围获取所在单位数据 List <T_Org_User> oList = new T_Org_UserDAL().Select(s => s.user_id == user_id); if (null != oList && oList.Count > 0) { _param.Clear(); _param.Add("@UnitID", oList[0].UnitID); _param.Add("@startDate", model.startDate); _param.Add("@endDate", model.endDate); DataTable dt = SqlHelper.ExecuteDataTable("exec P_GetQianXin_ShiJian @UnitID,@startDate,@endDate", CommandType.Text, SqlHelper.GetParameters(_param)); return(HCQ2_Common.Data.DataTableHelper.DataTableToIList <DebtSelResultModel>(dt)); } return(null); }
/// <summary> /// 获取欠薪时间 /// </summary> /// <param name="model"></param> /// <returns></returns> public List <DebtSelResultModel> GetDebtTime(DebtSelModel model) { T_User user = DBSession.IT_UserDAL.Select(s => s.user_guid.Equals(model.userid)).FirstOrDefault(); if (null == user) { return(null); } List <B01> list = DBSession.IB01DAL.GetB01Info(user.user_id); return(DBSession.IView_QXTJDAL.GetDebtTime(model, user.user_id, list?.Select(s => s.UnitID).ToList())); }
public object GetDebtTime(DebtSelModel model) { if (!ModelState.IsValid) { return(operateContext.RedirectWebApi(WebResultCode.Exception, GlobalConstant.参数异常.ToString(), false)); } List <DebtSelResultModel> uModel = operateContext.bllSession.View_QXTJ.GetDebtTime(model); if (null == uModel || uModel.Count <= 0) { return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据为空.ToString(), "")); } return(operateContext.RedirectWebApi(WebResultCode.Ok, GlobalConstant.数据获取成功.ToString(), uModel)); }