| | |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 修改 |
| | | /// </summary> |
| | | /// <param name="model"></param> |
| | | /// <returns></returns> |
| | | public bool UpdateShifoushensu(Model.OA_WageAwardPunish model) |
| | | { |
| | | if (model == null) |
| | | { |
| | | return false; |
| | | } |
| | | IList<SqlParameter> sqlParms = new List<SqlParameter>() |
| | | { |
| | | new SqlParameter("@Keyid", model.Keyid) , |
| | | |
| | | new SqlParameter("@Shifoushensu", model.Shifoushensu.HasValue?model.Shifoushensu.Value:0) , |
| | | |
| | | }; |
| | | string sql = "Update OA_WageAwardPunish Set [Shifoushensu]=@Shifoushensu where [Keyid] =@Keyid "; |
| | | |
| | | try |
| | | { |
| | | _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 删除 |
| | | /// </summary> |
| | |
| | | /// <param name="PlanPeople"></param> |
| | | /// <param name="StatisticsTime"></param> |
| | | /// <returns></returns> |
| | | public IEnumerable<Model.OA_WageAwardPunish> SelectModelPageByWage(Infrastructure.Query.Pagination pagination, Guid MemberId, int? DepartmentId, string PlanPeople, string StatisticsTime) |
| | | public IEnumerable<Model.OA_WageAwardPunish> SelectModelPageByWage(Infrastructure.Query.Pagination pagination, Guid MemberId, int? DepartmentId, string PlanPeople, string StatisticsTime, string EndisticsTime, string selStatus = "") |
| | | { |
| | | try |
| | | { |
| | |
| | | if (DepartmentId.HasValue) |
| | | condition += " and a.DepartmentId = '" + DepartmentId + "' "; |
| | | |
| | | if (!string.IsNullOrEmpty(selStatus)) |
| | | condition += " and a.Status = '" + selStatus + "' "; |
| | | |
| | | |
| | | string condition1 = ""; |
| | | string condition2 = ""; |
| | |
| | | { |
| | | StatisticsTime = StatisticsTime.Replace("年", "-").Replace("月", "-") + "1"; |
| | | DateTime Time1 = DateTime.Parse(StatisticsTime); |
| | | DateTime Time2 = DateTime.Parse(StatisticsTime).AddMonths(1); |
| | | condition1 += " and ((b.RecTime >= '" + Time1 + "' and b.RecTime < '" + Time2 + "') or b.RecTime is null)"; |
| | | condition2 += " and ((c.RecTime >= '" + Time1 + "' and c.RecTime < '" + Time2 + "') or c.RecTime is null)"; |
| | | //DateTime Time2 = DateTime.Parse(StatisticsTime).AddMonths(1); |
| | | condition1 += " and ((b.RecTime >= '" + Time1 + "' ) or b.RecTime is null)";//and b.RecTime < '" + Time2 + "' |
| | | condition2 += " and ((c.RecTime >= '" + Time1 + "' ) or c.RecTime is null)";// and c.RecTime < '" + Time2 + "' |
| | | } |
| | | |
| | | |
| | | if (!string.IsNullOrEmpty(EndisticsTime)) |
| | | { |
| | | EndisticsTime = EndisticsTime.Replace("年", "-").Replace("月", "-") + "1"; |
| | | //DateTime Time1 = DateTime.Parse(StatisticsTime); |
| | | DateTime Time2 = DateTime.Parse(EndisticsTime).AddMonths(1); |
| | | condition1 += " and (( b.RecTime < '" + Time2 + "') or b.RecTime is null)";//b.RecTime >= '" + Time1 + "' and |
| | | condition2 += " and (( c.RecTime < '" + Time2 + "') or c.RecTime is null)";//c.RecTime >= '" + Time1 + "' and |
| | | } |
| | | |
| | | //condition += string.Format(" and ( a.Status='在职' OR ( a.Status ='离职' AND CAST(a.SM_EndWorkTime AS DATE) >'{0}' )) ", DateTime.Now); |