| | |
| | | " from [OA_DriverRecord] od " + |
| | | |
| | | " left join [OA_CarManage] ocar on od.[CarID] = ocar.Keyid " + |
| | | |
| | | " where 0=0 "; |
| | | |
| | | " where ClockType = 1 "; |
| | | const string FROMSOUCEEND = ") as t "; |
| | | /// <summary> |
| | | /// 分页默认排序字段 |
| | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 根据编号获得信息 |
| | | /// </summary> |
| | | /// <param name="Keyid">编号</param> |
| | | /// <returns></returns> |
| | | public OA_DriverRecord GetModelByTimeCarIDClockType(DateTime CreatTime, int CarID, int ClockType) |
| | | { |
| | | try |
| | | { |
| | | string condition = " "; |
| | | |
| | | condition = " CarID='" + CarID + "' and ClockType = 2 "; |
| | | |
| | | condition += " and DATEDIFF(DAY,'"+ CreatTime.ToString("yyyy-MM-dd") + "',[CreatTime])=0 "; |
| | | |
| | | // return null;//错误数据返会空 |
| | | |
| | | IList<OA_DriverRecord> result = _dataBase.SelectModel<OA_DriverRecord>("*", "OA_DriverRecord", condition) as IList<OA_DriverRecord>;//执行查询 |
| | | |
| | | return (null == result || result.Count == 0) ? null : result[0];//返回结果 |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | throw ex; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 全部查询 |
| | | /// </summary> |
| | | /// <param name="query"></param> |