inta=Db.update("update t_base_cow set del_flag = '1',is_out = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inta=Db.update("update t_base_cow set del_flag = '1',is_out = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...基础("+a+")");
EventLog.info("判决淘汰...基础("+a+")");
//修改繁育主表状态
//修改繁育主表状态
intb=Db.update("update t_breed_main set breed_code = '7',breed_status='3',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intb=Db.update("update t_breed_main set breed_code = '7',breed_status='3',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...繁育("+b+")");
EventLog.info("判决淘汰...繁育("+b+")");
//修改转群转圈状态
//修改转群转圈状态
intc=Db.update("update t_event_turn_group set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intc=Db.update("update t_event_turn_group set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...转群("+c+")");
EventLog.info("判决淘汰...转群("+c+")");
//修改参保状态
//修改参保状态
intd=Db.update("update t_event_insured set status = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intd=Db.update("update t_event_insured set status = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...参保("+d+")");
EventLog.info("判决淘汰...参保("+d+")");
/**
/**
*繁育
*繁育
*/
*/
//修改配种状态
//修改配种状态
inte=Db.update("update t_event_breed set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inte=Db.update("update t_event_breed set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...配种...("+e+")");
EventLog.info("判决淘汰...配种...("+e+")");
//修改初检状态
//修改初检状态
intf=Db.update("update t_event_first_inspect set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intf=Db.update("update t_event_first_inspect set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...初检...("+f+")");
EventLog.info("判决淘汰...初检...("+f+")");
//修改复检状态
//修改复检状态
intg=Db.update("update t_event_gestation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intg=Db.update("update t_event_gestation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...复检...("+g+")");
EventLog.info("判决淘汰...复检...("+g+")");
//修改干奶状态
//修改干奶状态
inth=Db.update("update t_event_dried set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inth=Db.update("update t_event_dried set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...干奶...("+h+")");
EventLog.info("判决淘汰...干奶...("+h+")");
//修改围产状态
//修改围产状态
inti=Db.update("update t_event_peripartum set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inti=Db.update("update t_event_peripartum set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...围产...("+i+")");
EventLog.info("判决淘汰...围产...("+i+")");
//修改禁配状态
//修改禁配状态
intj=Db.update("update t_event_no_mating set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intj=Db.update("update t_event_no_mating set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...禁配...("+j+")");
EventLog.info("判决淘汰...禁配...("+j+")");
//修改解禁状态
//修改解禁状态
intk=Db.update("update t_event_unban set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intk=Db.update("update t_event_unban set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...解禁...("+k+")");
EventLog.info("判决淘汰...解禁...("+k+")");
//修改流产状态
//修改流产状态
intl=Db.update("update t_event_abortion set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intl=Db.update("update t_event_abortion set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...流产...("+l+")");
EventLog.info("判决淘汰...流产...("+l+")");
//修改同期状态
//修改同期状态
intm=Db.update("update t_event_sync_record set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intm=Db.update("update t_event_sync_record set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...同期...("+m+")");
EventLog.info("判决淘汰...同期...("+m+")");
/**
/**
*产房
*产房
*/
*/
//修改产犊状态
//修改产犊状态
intn=Db.update("update t_event_calving set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intn=Db.update("update t_event_calving set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...产犊...("+n+")");
EventLog.info("判决淘汰...产犊...("+n+")");
//修改产犊(母牛)状态
//修改产犊(母牛)状态
into=Db.update("update t_event_calfinfo set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
into=Db.update("update t_event_calfinfo set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...犊牛...("+o+")");
EventLog.info("判决淘汰...犊牛...("+o+")");
//修改产后护理(保健)状态
//修改产后护理(保健)状态
intp=Db.update("update t_event_postpartum_care set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intp=Db.update("update t_event_postpartum_care set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...产后护理...("+p+")");
EventLog.info("判决淘汰...产后护理...("+p+")");
//修改产前60天状态
//修改产前60天状态
intq=Db.update("update t_event_prenatal_evaluation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intq=Db.update("update t_event_prenatal_evaluation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...产前60天...("+q+")");
EventLog.info("判决淘汰...产前60天...("+q+")");
//修改产后21天状态
//修改产后21天状态
intr=Db.update("update t_event_postpartum_evaluation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intr=Db.update("update t_event_postpartum_evaluation set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...产后21天...("+r+")");
EventLog.info("判决淘汰...产后21天...("+r+")");
//修改初乳收集状态
//修改初乳收集状态
ints=Db.update("update t_event_collect_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
ints=Db.update("update t_event_collect_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...初乳收集...("+s+")");
EventLog.info("判决淘汰...初乳收集...("+s+")");
//修改初乳灌服状态
//修改初乳灌服状态
intt=Db.update("update t_event_feed_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intt=Db.update("update t_event_feed_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...初乳灌服...("+t+")");
EventLog.info("判决淘汰...初乳灌服...("+t+")");
/**
/**
*犊牛
*犊牛
*/
*/
//修改去角状态
//修改去角状态
intu=Db.update("update t_event_exfoliator set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intu=Db.update("update t_event_exfoliator set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...去角...("+u+")");
EventLog.info("判决淘汰...去角...("+u+")");
//修改断奶状态
//修改断奶状态
intv=Db.update("update t_event_weaning set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intv=Db.update("update t_event_weaning set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...断奶...("+v+")");
EventLog.info("判决淘汰...断奶...("+v+")");
//修改出岛状态
//修改出岛状态
intw=Db.update("update t_event_out_isle set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intw=Db.update("update t_event_out_isle set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...出岛...("+w+")");
EventLog.info("判决淘汰...出岛...("+w+")");
/**
/**
*健康
*健康
*/
*/
//修改盲乳状态
//修改盲乳状态
intx=Db.update("update t_event_register_blindmilk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intx=Db.update("update t_event_register_blindmilk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...盲乳...("+x+")");
EventLog.info("判决淘汰...盲乳...("+x+")");
//修改修蹄状态
//修改修蹄状态
inty=Db.update("update t_event_register_hoof set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inty=Db.update("update t_event_register_hoof set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...修蹄...("+y+")");
EventLog.info("判决淘汰...修蹄...("+y+")");
//修改免疫状态
//修改免疫状态
intz=Db.update("update t_event_register_immune set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intz=Db.update("update t_event_register_immune set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...免疫...("+z+")");
EventLog.info("判决淘汰...免疫...("+z+")");
//修改细菌培养状态
//修改细菌培养状态
intaa=Db.update("update t_event_germ_cultivate set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intaa=Db.update("update t_event_germ_cultivate set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...细菌...("+aa+")");
EventLog.info("判决淘汰...细菌...("+aa+")");
//修改驱虫状态
//修改驱虫状态
intbb=Db.update("update t_event_expel_insect set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intbb=Db.update("update t_event_expel_insect set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...驱虫...("+bb+")");
EventLog.info("判决淘汰...驱虫...("+bb+")");
//修改投喂状态
//修改投喂状态
intcc=Db.update("update t_event_feed_magnet set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intcc=Db.update("update t_event_feed_magnet set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...投喂...("+cc+")");
EventLog.info("判决淘汰...投喂...("+cc+")");
//修改亚临床酮病状态
//修改亚临床酮病状态
intdd=Db.update("update t_event_ketosis set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intdd=Db.update("update t_event_ketosis set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...酮病...("+dd+")");
EventLog.info("判决淘汰...酮病...("+dd+")");
//修改亚临床乳房炎状态
//修改亚临床乳房炎状态
intee=Db.update("update t_event_mastitis set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intee=Db.update("update t_event_mastitis set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...乳房炎...("+ee+")");
EventLog.info("判决淘汰...乳房炎...("+ee+")");
//修改产后牛身检测状态
//修改产后牛身检测状态
intff=Db.update("update t_event_cowcheck set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intff=Db.update("update t_event_cowcheck set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...产后牛身体检查...("+ff+")");
EventLog.info("判决淘汰...产后牛身体检查...("+ff+")");
/**
/**
*评分
*评分
*/
*/
//修改乳头评分状态
//修改乳头评分状态
intgg=Db.update("update t_event_nipple_score set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intgg=Db.update("update t_event_nipple_score set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...乳头...("+gg+")");
EventLog.info("判决淘汰...乳头...("+gg+")");
//修改子宫评分状态
//修改子宫评分状态
inthh=Db.update("update t_event_uterine_score set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inthh=Db.update("update t_event_uterine_score set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...子宫...("+hh+")");
EventLog.info("判决淘汰...子宫...("+hh+")");
/**
/**
*化验
*化验
*/
*/
//修改隐乳检测状态
//修改隐乳检测状态
intii=Db.update("update t_event_hide_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intii=Db.update("update t_event_hide_milk set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...隐乳...("+ii+")");
EventLog.info("判决淘汰...隐乳...("+ii+")");
//修改抗生素检测状态
//修改抗生素检测状态
intjj=Db.update("update t_event_antibiotic set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intjj=Db.update("update t_event_antibiotic set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...抗生素...("+jj+")");
EventLog.info("判决淘汰...抗生素...("+jj+")");
//修改血酮检测状
//修改血酮检测状
intkk=Db.update("update t_event_blood_ketone set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intkk=Db.update("update t_event_blood_ketone set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...血酮...("+kk+")");
EventLog.info("判决淘汰...血酮...("+kk+")");
//修改尿液PH状态
//修改尿液PH状态
intll=Db.update("update t_event_urine_ph set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intll=Db.update("update t_event_urine_ph set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...尿液...("+ll+")");
EventLog.info("判决淘汰...尿液...("+ll+")");
//修改免疫球蛋白状态
//修改免疫球蛋白状态
intmm=Db.update("update t_event_immunoglobulin set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intmm=Db.update("update t_event_immunoglobulin set is_out = '淘汰' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...蛋白...("+mm+")");
EventLog.info("判决淘汰...蛋白...("+mm+")");
//修改体况状态
//修改体况状态
intnn=Db.update("update t_event_body_score set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intnn=Db.update("update t_event_body_score set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...体况...("+nn+")");
EventLog.info("判决淘汰...体况...("+nn+")");
//修改体测状态
//修改体测状态
intoo=Db.update("update t_event_body_measure set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intoo=Db.update("update t_event_body_measure set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决淘汰...体测...("+oo+")");
EventLog.info("判决淘汰...体测...("+oo+")");
//修改步态状态
//修改步态状态
intpp=Db.update("update t_event_gait_score set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intpp=Db.update("update t_event_gait_score set is_out = '淘汰',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '淘汰' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...步态...("+pp+")");
EventLog.info("判决死亡...步态...("+pp+")");
EventLog.info("..........等待2秒..........");
EventLog.info("..........等待2秒..........");
try{
try{
@ -218,148 +210,148 @@ public class Edit {
*/
*/
//修改牛只基础信息状态
//修改牛只基础信息状态
inta=Db.update("update t_base_cow set del_flag = '1',is_out = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inta=Db.update("update t_base_cow set del_flag = '1',is_out = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...基础("+a+")");
EventLog.info("判决死亡...基础("+a+")");
//修改繁育主表状态
//修改繁育主表状态
intb=Db.update("update t_breed_main set breed_code = '8',breed_status='3',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intb=Db.update("update t_breed_main set breed_code = '8',breed_status='3',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...繁育("+b+")");
EventLog.info("判决死亡...繁育("+b+")");
//修改转群转圈状态
//修改转群转圈状态
intc=Db.update("update t_event_turn_group set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intc=Db.update("update t_event_turn_group set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...转群("+c+")");
EventLog.info("判决死亡...转群("+c+")");
//修改参保状态
//修改参保状态
intd=Db.update("update t_event_insured set status = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intd=Db.update("update t_event_insured set status = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...参保("+d+")");
EventLog.info("判决死亡...参保("+d+")");
/**
/**
*繁育
*繁育
*/
*/
//修改配种状态
//修改配种状态
inte=Db.update("update t_event_breed set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inte=Db.update("update t_event_breed set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...配种...("+e+")");
EventLog.info("判决死亡...配种...("+e+")");
//修改初检状态
//修改初检状态
intf=Db.update("update t_event_first_inspect set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intf=Db.update("update t_event_first_inspect set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...初检...("+f+")");
EventLog.info("判决死亡...初检...("+f+")");
//修改复检状态
//修改复检状态
intg=Db.update("update t_event_gestation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intg=Db.update("update t_event_gestation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...复检...("+g+")");
EventLog.info("判决死亡...复检...("+g+")");
//修改干奶状态
//修改干奶状态
inth=Db.update("update t_event_dried set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inth=Db.update("update t_event_dried set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...干奶...("+h+")");
EventLog.info("判决死亡...干奶...("+h+")");
//修改围产状态
//修改围产状态
inti=Db.update("update t_event_peripartum set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inti=Db.update("update t_event_peripartum set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...围产...("+i+")");
EventLog.info("判决死亡...围产...("+i+")");
//修改禁配状态
//修改禁配状态
intj=Db.update("update t_event_no_mating set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intj=Db.update("update t_event_no_mating set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...禁配...("+j+")");
EventLog.info("判决死亡...禁配...("+j+")");
//修改解禁状态
//修改解禁状态
intk=Db.update("update t_event_unban set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intk=Db.update("update t_event_unban set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...解禁...("+k+")");
EventLog.info("判决死亡...解禁...("+k+")");
//修改流产状态
//修改流产状态
intl=Db.update("update t_event_abortion set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intl=Db.update("update t_event_abortion set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...流产...("+l+")");
EventLog.info("判决死亡...流产...("+l+")");
//修改同期状态
//修改同期状态
intm=Db.update("update t_event_sync_record set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intm=Db.update("update t_event_sync_record set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...同期...("+m+")");
EventLog.info("判决死亡...同期...("+m+")");
/**
/**
*产房
*产房
*/
*/
//修改产犊状态
//修改产犊状态
intn=Db.update("update t_event_calving set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intn=Db.update("update t_event_calving set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...产犊...("+n+")");
EventLog.info("判决死亡...产犊...("+n+")");
//修改产犊(母牛)状态
//修改产犊(母牛)状态
into=Db.update("update t_event_calfinfo set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
into=Db.update("update t_event_calfinfo set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...犊牛...("+o+")");
EventLog.info("判决死亡...犊牛...("+o+")");
//修改产后护理(保健)状态
//修改产后护理(保健)状态
intp=Db.update("update t_event_postpartum_care set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intp=Db.update("update t_event_postpartum_care set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...产后护理...("+p+")");
EventLog.info("判决死亡...产后护理...("+p+")");
//修改产前60天状态
//修改产前60天状态
intq=Db.update("update t_event_prenatal_evaluation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intq=Db.update("update t_event_prenatal_evaluation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...产前60天...("+q+")");
EventLog.info("判决死亡...产前60天...("+q+")");
//修改产后21天状态
//修改产后21天状态
intr=Db.update("update t_event_postpartum_evaluation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intr=Db.update("update t_event_postpartum_evaluation set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...产后21天...("+r+")");
EventLog.info("判决死亡...产后21天...("+r+")");
//修改初乳收集状态
//修改初乳收集状态
ints=Db.update("update t_event_collect_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
ints=Db.update("update t_event_collect_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...初乳收集...("+s+")");
EventLog.info("判决死亡...初乳收集...("+s+")");
//修改初乳灌服状态
//修改初乳灌服状态
intt=Db.update("update t_event_feed_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intt=Db.update("update t_event_feed_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...初乳灌服...("+t+")");
EventLog.info("判决死亡...初乳灌服...("+t+")");
/**
/**
*犊牛
*犊牛
*/
*/
//修改去角状态
//修改去角状态
intu=Db.update("update t_event_exfoliator set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intu=Db.update("update t_event_exfoliator set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...去角...("+u+")");
EventLog.info("判决死亡...去角...("+u+")");
//修改断奶状态
//修改断奶状态
intv=Db.update("update t_event_weaning set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intv=Db.update("update t_event_weaning set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...断奶...("+v+")");
EventLog.info("判决死亡...断奶...("+v+")");
//修改出岛状态
//修改出岛状态
intw=Db.update("update t_event_out_isle set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intw=Db.update("update t_event_out_isle set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...出岛...("+w+")");
EventLog.info("判决死亡...出岛...("+w+")");
/**
/**
*健康
*健康
*/
*/
//修改盲乳状态
//修改盲乳状态
intx=Db.update("update t_event_register_blindmilk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intx=Db.update("update t_event_register_blindmilk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...盲乳...("+x+")");
EventLog.info("判决死亡...盲乳...("+x+")");
//修改修蹄状态
//修改修蹄状态
inty=Db.update("update t_event_register_hoof set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inty=Db.update("update t_event_register_hoof set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...修蹄...("+y+")");
EventLog.info("判决死亡...修蹄...("+y+")");
//修改免疫状态
//修改免疫状态
intz=Db.update("update t_event_register_immune set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intz=Db.update("update t_event_register_immune set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...免疫...("+z+")");
EventLog.info("判决死亡...免疫...("+z+")");
//修改细菌培养状态
//修改细菌培养状态
intaa=Db.update("update t_event_germ_cultivate set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intaa=Db.update("update t_event_germ_cultivate set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...细菌...("+aa+")");
EventLog.info("判决死亡...细菌...("+aa+")");
//修改驱虫状态
//修改驱虫状态
intbb=Db.update("update t_event_expel_insect set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intbb=Db.update("update t_event_expel_insect set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...驱虫...("+bb+")");
EventLog.info("判决死亡...驱虫...("+bb+")");
//修改投喂状态
//修改投喂状态
intcc=Db.update("update t_event_feed_magnet set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intcc=Db.update("update t_event_feed_magnet set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...投喂...("+cc+")");
EventLog.info("判决死亡...投喂...("+cc+")");
//修改亚临床酮病状态
//修改亚临床酮病状态
intdd=Db.update("update t_event_ketosis set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intdd=Db.update("update t_event_ketosis set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...酮病...("+dd+")");
EventLog.info("判决死亡...酮病...("+dd+")");
//修改亚临床乳房炎状态
//修改亚临床乳房炎状态
intee=Db.update("update t_event_mastitis set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intee=Db.update("update t_event_mastitis set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...乳房炎...("+ee+")");
EventLog.info("判决死亡...乳房炎...("+ee+")");
//修改产后牛身检测状态
//修改产后牛身检测状态
intff=Db.update("update t_event_cowcheck set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intff=Db.update("update t_event_cowcheck set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...产后牛身体检查...("+ff+")");
EventLog.info("判决死亡...产后牛身体检查...("+ff+")");
/**
/**
*评分
*评分
*/
*/
//修改乳头评分状态
//修改乳头评分状态
intgg=Db.update("update t_event_nipple_score set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intgg=Db.update("update t_event_nipple_score set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...乳头...("+gg+")");
EventLog.info("判决死亡...乳头...("+gg+")");
//修改子宫评分状态
//修改子宫评分状态
inthh=Db.update("update t_event_uterine_score set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inthh=Db.update("update t_event_uterine_score set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...子宫...("+hh+")");
EventLog.info("判决死亡...子宫...("+hh+")");
/**
/**
*化验
*化验
*/
*/
//修改隐乳检测状态
//修改隐乳检测状态
intii=Db.update("update t_event_hide_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intii=Db.update("update t_event_hide_milk set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...隐乳...("+ii+")");
EventLog.info("判决死亡...隐乳...("+ii+")");
//修改抗生素检测状态
//修改抗生素检测状态
intjj=Db.update("update t_event_antibiotic set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intjj=Db.update("update t_event_antibiotic set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...抗生素...("+jj+")");
EventLog.info("判决死亡...抗生素...("+jj+")");
//修改血酮检测状
//修改血酮检测状
intkk=Db.update("update t_event_blood_ketone set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intkk=Db.update("update t_event_blood_ketone set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...血酮...("+kk+")");
EventLog.info("判决死亡...血酮...("+kk+")");
//修改尿液PH状态
//修改尿液PH状态
intll=Db.update("update t_event_urine_ph set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intll=Db.update("update t_event_urine_ph set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...尿液...("+ll+")");
EventLog.info("判决死亡...尿液...("+ll+")");
//修改免疫球蛋白状态
//修改免疫球蛋白状态
intmm=Db.update("update t_event_immunoglobulin set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intmm=Db.update("update t_event_immunoglobulin set is_out = '死亡' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...蛋白...("+mm+")");
EventLog.info("判决死亡...蛋白...("+mm+")");
//修改体况状态
//修改体况状态
intnn=Db.update("update t_event_body_score set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intnn=Db.update("update t_event_body_score set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...体况...("+nn+")");
EventLog.info("判决死亡...体况...("+nn+")");
//修改体测状态
//修改体测状态
intoo=Db.update("update t_event_body_measure set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intoo=Db.update("update t_event_body_measure set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
EventLog.info("...判决死亡...体测...("+oo+")");
EventLog.info("判决死亡...体测...("+oo+")");
//修改步态状态
//修改步态状态
intpp=Db.update("update t_event_gait_score set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
intpp=Db.update("update t_event_gait_score set is_out = '死亡',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select cow_no from t_event_out_group where source_cow='"+sourceCow+"' and out_type = '死亡' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d'))");
inta=Db.update("update t_event_turn_group set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_turn_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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inta=Db.update("update t_event_turn_group set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_turn_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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...转群[101]...("+a+")");
EventLog.info("判决转场...转群[101]...("+a+")");
intb=Db.update("update t_event_weaning set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_weaning 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intb=Db.update("update t_event_weaning set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_weaning 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...断奶[102]...("+b+")");
EventLog.info("判决转场...断奶[102]...("+b+")");
intc=Db.update("update t_event_out_isle set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_out_isle 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intc=Db.update("update t_event_out_isle set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_out_isle 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...出岛[102]...("+c+")");
EventLog.info("判决转场...出岛[102]...("+c+")");
intd=Db.update("update t_event_nipple_score set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_nipple_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intd=Db.update("update t_event_nipple_score set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_nipple_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...乳头[107]...("+d+")");
EventLog.info("判决转场...乳头[107]...("+d+")");
inte=Db.update("update t_event_calving set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_calving 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inte=Db.update("update t_event_calving set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_calving 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...产犊[201]...("+e+")");
EventLog.info("判决转场...产犊[201]...("+e+")");
intf=Db.update("update t_event_first_inspect set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_first_inspect 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intf=Db.update("update t_event_first_inspect set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_first_inspect 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...初检[202]...("+f+")");
EventLog.info("判决转场...初检[202]...("+f+")");
intg=Db.update("update t_event_gestation set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_gestation 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intg=Db.update("update t_event_gestation set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_gestation 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...复检[203]...("+g+")");
EventLog.info("判决转场...复检[203]...("+g+")");
inth=Db.update("update t_event_dried set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_dried 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inth=Db.update("update t_event_dried set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_dried 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...配种[205]...("+h+")");
EventLog.info("判决转场...配种[205]...("+h+")");
inti=Db.update("update t_event_peripartum set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_peripartum 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inti=Db.update("update t_event_peripartum set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_peripartum 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...围产[206]...("+i+")");
EventLog.info("判决转场...围产[206]...("+i+")");
intj=Db.update("update t_event_abortion set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_abortion 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intj=Db.update("update t_event_abortion set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_abortion 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...流产[207]...("+j+")");
EventLog.info("判决转场...流产[207]...("+j+")");
intk=Db.update("update t_event_no_mating set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_no_mating 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intk=Db.update("update t_event_no_mating set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_no_mating 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...禁配[208]...("+k+")");
EventLog.info("判决转场...禁配[208]...("+k+")");
intl=Db.update("update t_event_unban set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_unban 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intl=Db.update("update t_event_unban set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_unban 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...解禁[208]...("+l+")");
EventLog.info("判决转场...解禁[208]...("+l+")");
intm=Db.update("update t_event_dried set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_dried 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intm=Db.update("update t_event_dried set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_dried 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...干奶[209]...("+m+")");
EventLog.info("判决转场...干奶[209]...("+m+")");
intn=Db.update("update t_event_calfinfo set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_calfinfo 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intn=Db.update("update t_event_calfinfo set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_calfinfo 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...犊牛[211]...("+n+")");
EventLog.info("判决转场...犊牛[211]...("+n+")");
into=Db.update("update t_event_germ_cultivate set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_germ_cultivate 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
into=Db.update("update t_event_germ_cultivate set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_germ_cultivate 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...细菌[411]...("+o+")");
EventLog.info("判决转场...细菌[411]...("+o+")");
intp=Db.update("update t_event_register_blindmilk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_blindmilk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intp=Db.update("update t_event_register_blindmilk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_blindmilk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...盲乳[412]...("+p+")");
EventLog.info("判决转场...盲乳[412]...("+p+")");
intq=Db.update("update t_event_register_hoof set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_hoof 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intq=Db.update("update t_event_register_hoof set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_hoof 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...修蹄[414]...("+q+")");
EventLog.info("判决转场...修蹄[414]...("+q+")");
intr=Db.update("update t_event_register_immune set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_immune 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intr=Db.update("update t_event_register_immune set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_register_immune 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...免疫[417]...("+r+")");
EventLog.info("判决转场...免疫[417]...("+r+")");
ints=Db.update("update t_event_hide_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_hide_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
ints=Db.update("update t_event_hide_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_hide_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...隐乳[422]...("+s+")");
EventLog.info("判决转场...隐乳[422]...("+s+")");
intt=Db.update("update t_event_postpartum_care set is_out='转场' where source_cow='"+sourceCow+"' and event_type='护理' and cow_no in(select a.cow_no from (select cow_no from t_event_postpartum_care where source_cow='"+sourceCow+"' and event_type='护理' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intt=Db.update("update t_event_postpartum_care set is_out='转场' where source_cow='"+sourceCow+"' and event_type='护理' and cow_no in(select a.cow_no from (select cow_no from t_event_postpartum_care where source_cow='"+sourceCow+"' and event_type='护理' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...护理[423]...("+t+")");
EventLog.info("判决转场...护理[423]...("+t+")");
intu=Db.update("update t_event_antibiotic set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_antibiotic 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intu=Db.update("update t_event_antibiotic set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_antibiotic 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...抗生素[424]...("+u+")");
EventLog.info("判决转场...抗生素[424]...("+u+")");
intv=Db.update("update t_event_ketosis set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_ketosis 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intv=Db.update("update t_event_ketosis set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_ketosis 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...亚临床酮病[425]...("+v+")");
EventLog.info("判决转场...亚临床酮病[425]...("+v+")");
intw=Db.update("update t_event_mastitis set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_mastitis 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intw=Db.update("update t_event_mastitis set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_mastitis 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...亚临床乳房炎[426]...("+w+")");
EventLog.info("判决转场...亚临床乳房炎[426]...("+w+")");
intx=Db.update("update t_event_blood_ketone set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_blood_ketone 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intx=Db.update("update t_event_blood_ketone set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_blood_ketone 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...血酮检测[504]...("+x+")");
EventLog.info("判决转场...血酮检测[504]...("+x+")");
inty=Db.update("update t_event_feed_magnet set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_feed_magnet 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inty=Db.update("update t_event_feed_magnet set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_feed_magnet 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...投喂磁铁[505]...("+y+")");
EventLog.info("判决转场...投喂磁铁[505]...("+y+")");
intz=Db.update("update t_event_postpartum_care set is_out='转场' where source_cow='"+sourceCow+"' and event_type='保健' and cow_no in(select a.cow_no from (select cow_no from t_event_postpartum_care where source_cow='"+sourceCow+"' and event_type='保健' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intz=Db.update("update t_event_postpartum_care set is_out='转场' where source_cow='"+sourceCow+"' and event_type='保健' and cow_no in(select a.cow_no from (select cow_no from t_event_postpartum_care where source_cow='"+sourceCow+"' and event_type='保健' and date_format(event_date,'%Y-%m-%d') between date_format('"+startDate+"','%Y-%m-%d') and date_format('"+endDate+"','%Y-%m-%d') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...保健[507]...("+z+")");
EventLog.info("判决转场...保健[507]...("+z+")");
intaa=Db.update("update t_event_exfoliator set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_exfoliator 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intaa=Db.update("update t_event_exfoliator set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_exfoliator 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...去角[510]...("+aa+")");
EventLog.info("判决转场...去角[510]...("+aa+")");
intbb=Db.update("update t_event_immunoglobulin set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_immunoglobulin 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intbb=Db.update("update t_event_immunoglobulin set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_immunoglobulin 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...免疫球蛋白[512]...("+bb+")");
EventLog.info("判决转场...免疫球蛋白[512]...("+bb+")");
intcc=Db.update("update t_event_feed_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_feed_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intcc=Db.update("update t_event_feed_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_feed_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...初乳灌服[513]...("+cc+")");
EventLog.info("判决转场...初乳灌服[513]...("+cc+")");
intdd=Db.update("update t_event_urine_ph set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_urine_ph 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intdd=Db.update("update t_event_urine_ph set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_urine_ph 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...尿液PH[514]...("+dd+")");
EventLog.info("判决转场...尿液PH[514]...("+dd+")");
intee=Db.update("update t_event_collect_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_collect_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intee=Db.update("update t_event_collect_milk set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_collect_milk 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...初乳收集[515]...("+ee+")");
EventLog.info("判决转场...初乳收集[515]...("+ee+")");
intff=Db.update("update t_event_uterine_score set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intff=Db.update("update t_event_uterine_score set is_out='转场' where source_cow='"+sourceCow+"' and cow_no in(select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...子宫评分[517]...("+ff+")");
EventLog.info("判决转场...子宫评分[517]...("+ff+")");
intgg=Db.update("update t_event_body_score set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intgg=Db.update("update t_event_body_score set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...体况[105]...("+gg+")");
EventLog.info("判决转场...体况[105]...("+gg+")");
inthh=Db.update("update t_event_body_measure set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
inthh=Db.update("update t_event_body_measure set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
EventLog.info("...判决转场...体测[106]...("+hh+")");
EventLog.info("判决转场...体测[106]...("+hh+")");
intii=Db.update("update t_event_gait_score set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
intii=Db.update("update t_event_gait_score set is_out = '转场',del_flag = '1' where source_cow = '"+sourceCow+"' and cow_no in (select a.cow_no from (select cow_no from t_event_uterine_score 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') and cow_no not in(select cow_no from t_base_cow where source_cow='"+sourceCow+"')) as a)");
List<Record>list=Db.find("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')");
if(list.size()>0){
for(Recordrecord:list){
Recordrecord1=Db.findFirst("select calve_number as num from t_calve_cowshed where source_cow='"+sourceCow+"' and cow_no='"+record.getStr("cowNo")+"' limit 1");
Recordrecord2=Db.findFirst("select * from t_calve_cowshed_history where source_cow='"+sourceCow+"' and cow_no='"+record.getStr("cowNo")+"' limit 1");
if(record2==null){
Db.update("insert into t_calve_cowshed_history(source_cow,cow_no,calve_number,date_of,create_by,create_date,status,update_by,update_date) values ('"+sourceCow+"','"+obj.getString("cowNo")+"','"+obj.getString("calveNumber")+"','"+obj.getString("dateOf")+"',#{createBy},'"+obj.getString("createDate")+"','"+obj.getString("status")+"','"+obj.getString("updateBy")+"','"+obj.getString("updateDate")+"')");
}
Db.update("update t_calve_cowshed set cow_no='',update_by='"+record.getStr("operName")+"',update_date='"+record.getStr("createTime")+"' where source_cow='"+sourceCow+"' and cow_no='"+record.getStr("cowNo")+"'");