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`,`heatwatch`.`cow`.`lactationDays` AS `cddays`,concat(\'胎次:\',`heatwatch`.`cow`.`intCurFetal`,\'fa\') AS `DESCRIB`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from (`heatwatch`.`cow` left join `heatwatch`.`calvingcheck` on((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`calvingcheck`.`intCowId`))) where ((`heatwatch`.`cow`.`lactationDays` <= (select `heatwatch`.`manageparam`.`varVal` from `heatwatch`.`manageparam` where ((`heatwatch`.`manageparam`.`varDiscribe` = \'产后监测天数\') and (`heatwatch`.`manageparam`.`intPastureId` = `heatwatch`.`cow`.`intPastureId`)))) and (`heatwatch`.`cow`.`intCurFetal` > 0) and isnull(`heatwatch`.`cow`.`dateLeave`) and (not(`heatwatch`.`cow`.`intCowId` in (select `heatwatch`.`calvingcheck`.`intCowId` from `heatwatch`.`calvingcheck` where ((to_days(curdate()) - to_days(`heatwatch`.`calvingcheck`.`CheckDate`)) = 1)))))
md5=49832d37607bed9d2977e9339c713a9f
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`,`cow`.`lactationDays` AS `cddays`,concat(\'胎次:\',`cow`.`intCurFetal`,\'fa\') AS `DESCRIB`,`cow`.`intPastureId` AS `intPastureId` from (`cow` left join `calvingcheck` on(`cow`.`intCowId` = `calvingcheck`.`intCowId`)) where `cow`.`lactationDays` <= (select `manageparam`.`varVal` from `manageparam` where `manageparam`.`varDiscribe` = \'产后监测天数\' and `manageparam`.`intPastureId` = `cow`.`intPastureId`) and `cow`.`intCurFetal` > 0 and `cow`.`dateLeave` is null and !(`cow`.`intCowId` in (select `calvingcheck`.`intCowId` from `calvingcheck` where to_days(curdate()) - to_days(`calvingcheck`.`CheckDate`) = 1))
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`,`heatwatch`.`cow`.`lactationDays` AS `cddays`,concat(\'胎次:\',`heatwatch`.`cow`.`intCurFetal`,\'fa\') AS `DESCRIB`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from (`heatwatch`.`cow` left join `heatwatch`.`calvingcheck` on((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`calvingcheck`.`intCowId`))) where ((`heatwatch`.`cow`.`lactationDays` <= (select `heatwatch`.`manageparam`.`varVal` from `heatwatch`.`manageparam` where ((`heatwatch`.`manageparam`.`varDiscribe` = \'产后监测天数\') and (`heatwatch`.`manageparam`.`intPastureId` = `heatwatch`.`cow`.`intPastureId`)))) and (`heatwatch`.`cow`.`intCurFetal` > 0) and isnull(`heatwatch`.`cow`.`dateLeave`) and (not(`heatwatch`.`cow`.`intCowId` in (select `heatwatch`.`calvingcheck`.`intCowId` from `heatwatch`.`calvingcheck` where ((to_days(curdate()) - to_days(`heatwatch`.`calvingcheck`.`CheckDate`)) = 1)))))
