TYPE=VIEW query=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,date_format(`heatwatch`.`cow`.`dateCurCd`,\'%m-%d\') AS `dateCurCd`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,\'1\' AS `cddays`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from ((`heatwatch`.`cow` join `heatwatch`.`events` on(((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`events`.`intCowId`) and (`heatwatch`.`events`.`intClass` = \'产犊\') and ((to_days(curdate()) - to_days(`heatwatch`.`events`.`dateEvtDate`)) < 5) and (`heatwatch`.`cow`.`lactationDays` < 5)))) left join `heatwatch`.`calf` on((`heatwatch`.`events`.`intEvtId` = `heatwatch`.`calf`.`intEvtId`))) where isnull(`heatwatch`.`calf`.`intEvtId`) md5=252cdd2e153ea79c6dae8bd825aa956a updatable=0 algorithm=0 definer_user=roo definer_host=% suid=1 with_check_option=0 timestamp=2022-12-14 10:07:39 create-version=1 source=select `cow`.`varCowCode` AS `varCowCode`,date_format(`cow`.`dateCurCd`,\'%m-%d\') AS `dateCurCd`,if(`cow`.`intCurBar` > 0,`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,\'1\' AS `cddays`,`cow`.`intPastureId` AS `intPastureId` from ((`cow` join `events` on(`cow`.`intCowId` = `events`.`intCowId` and `events`.`intClass` = \'产犊\' and to_days(curdate()) - to_days(`events`.`dateEvtDate`) < 5 and `cow`.`lactationDays` < 5)) left join `calf` on(`events`.`intEvtId` = `calf`.`intEvtId`)) where `calf`.`intEvtId` is null client_cs_name=utf8 connection_cl_name=utf8_general_ci view_body_utf8=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,date_format(`heatwatch`.`cow`.`dateCurCd`,\'%m-%d\') AS `dateCurCd`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,\'1\' AS `cddays`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from ((`heatwatch`.`cow` join `heatwatch`.`events` on(((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`events`.`intCowId`) and (`heatwatch`.`events`.`intClass` = \'产犊\') and ((to_days(curdate()) - to_days(`heatwatch`.`events`.`dateEvtDate`)) < 5) and (`heatwatch`.`cow`.`lactationDays` < 5)))) left join `heatwatch`.`calf` on((`heatwatch`.`events`.`intEvtId` = `heatwatch`.`calf`.`intEvtId`))) where isnull(`heatwatch`.`calf`.`intEvtId`)