diff --git a/src/main/java/com/cyx/find/EventFind.java b/src/main/java/com/cyx/find/EventFind.java index 14c563d..8fc3155 100644 --- a/src/main/java/com/cyx/find/EventFind.java +++ b/src/main/java/com/cyx/find/EventFind.java @@ -175,4 +175,16 @@ public class EventFind { String sql = "select curr_cowshed_name as cowshed,out_cows_type_name as cowType from t_event_turn_group where source_cow='"+sourceCow+"' and cow_no='"+cowNo+"' and out_cows_type_name ='哺乳犊牛' order by event_date limit 1"; return Db.findFirst(sql); } + + /** + * 根据牛场ID、日期查询离场牛只信息 + * @param sourceCow + * @param startDate + * @param endDate + * @return + */ + public static List getOffCowByData(String sourceCow,String startDate,String endDate){ + String sql = "select cow_no as cowNo,event_date as eventDate,out_type as outType,oper_name as operName,create_time as createTime from t_event_out_group where source_cow='"+sourceCow+"' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d')"; + return Db.find(sql); + } }