From b7865c82992d11d79da1ba841f8ca5ce8cf5dee7 Mon Sep 17 00:00:00 2001 From: zyq Date: Thu, 7 Mar 2024 11:37:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=89=9B=E5=8F=AA=E7=A6=BB?= =?UTF-8?q?=E5=9C=BA=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/cyx/find/EventFind.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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); + } }