添加牛只离场信息查询方法

This commit is contained in:
zyq 2024-03-07 11:37:55 +08:00
parent ed5173a84b
commit b7865c8299
1 changed files with 12 additions and 0 deletions

View File

@ -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"; 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); return Db.findFirst(sql);
} }
/**
* 根据牛场ID日期查询离场牛只信息
* @param sourceCow
* @param startDate
* @param endDate
* @return
*/
public static List<Record> 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);
}
} }