TYPE=VIEW
query=select `heatwatch`.`cow`.`intCowId` AS `intcowid`,`heatwatch`.`cow`.`varCowCode` AS `varCowCode`,`heatwatch`.`cow`.`intCurBar` AS `intcurbar`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,`heatwatch`.`classlist`.`intClassListId` AS `SORT`,concat(\'产前:\',(280 - `heatwatch`.`cow`.`gravidityDays`),\'天\',if((`heatwatch`.`cow`.`ecentGrade` > 0),concat(\',BCS:\',`heatwatch`.`cow`.`ecentGrade`),\'\'),\'，移入:产房\') AS `DISCRIBE`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from ((`heatwatch`.`cow` left join `heatwatch`.`bar` on(((`heatwatch`.`cow`.`intCurBar` = `heatwatch`.`bar`.`varBarCode`) and (`heatwatch`.`cow`.`intPastureId` = `heatwatch`.`bar`.`intPastureId`)))) left join `heatwatch`.`classlist` on(((`heatwatch`.`cow`.`intPastureId` = `heatwatch`.`classlist`.`intPastureId`) and (`heatwatch`.`classlist`.`varName` = \'产前\')))) where (isnull(`heatwatch`.`cow`.`dateLeave`) and (`heatwatch`.`cow`.`sireClass` = \'已孕\') and (`heatwatch`.`cow`.`gravidityDays` >= (280 - (select `heatwatch`.`manageparam`.`varVal` from `heatwatch`.`manageparam` where ((`heatwatch`.`manageparam`.`varDiscribe` = \'临产前几天进产房\') and (`heatwatch`.`manageparam`.`intPastureId` = `heatwatch`.`cow`.`intPastureId`))))) and ((8 & ifnull(`heatwatch`.`bar`.`cowType`,1)) <> 8))
md5=8db971a02ecba42554750ab83d367fc6
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`.`intCowId` AS `intcowid`,`cow`.`varCowCode` AS `varCowCode`,`cow`.`intCurBar` AS `intcurbar`,if(`cow`.`intCurBar` > 0,`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,`classlist`.`intClassListId` AS `SORT`,concat(\'产前:\',280 - `cow`.`gravidityDays`,\'天\',if(`cow`.`ecentGrade` > 0,concat(\',BCS:\',`cow`.`ecentGrade`),\'\'),\'，移入:产房\') AS `DISCRIBE`,`cow`.`intPastureId` AS `intPastureId` from ((`cow` left join `bar` on(`cow`.`intCurBar` = `bar`.`varBarCode` and `cow`.`intPastureId` = `bar`.`intPastureId`)) left join `classlist` on(`cow`.`intPastureId` = `classlist`.`intPastureId` and `classlist`.`varName` = \'产前\')) where `cow`.`dateLeave` is null and `cow`.`sireClass` = \'已孕\' and `cow`.`gravidityDays` >= 280 - (select `manageparam`.`varVal` from `manageparam` where `manageparam`.`varDiscribe` = \'临产前几天进产房\' and `manageparam`.`intPastureId` = `cow`.`intPastureId`) and 8 & ifnull(`bar`.`cowType`,1) <> 8
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `heatwatch`.`cow`.`intCowId` AS `intcowid`,`heatwatch`.`cow`.`varCowCode` AS `varCowCode`,`heatwatch`.`cow`.`intCurBar` AS `intcurbar`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,`heatwatch`.`classlist`.`intClassListId` AS `SORT`,concat(\'产前:\',(280 - `heatwatch`.`cow`.`gravidityDays`),\'天\',if((`heatwatch`.`cow`.`ecentGrade` > 0),concat(\',BCS:\',`heatwatch`.`cow`.`ecentGrade`),\'\'),\'，移入:产房\') AS `DISCRIBE`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from ((`heatwatch`.`cow` left join `heatwatch`.`bar` on(((`heatwatch`.`cow`.`intCurBar` = `heatwatch`.`bar`.`varBarCode`) and (`heatwatch`.`cow`.`intPastureId` = `heatwatch`.`bar`.`intPastureId`)))) left join `heatwatch`.`classlist` on(((`heatwatch`.`cow`.`intPastureId` = `heatwatch`.`classlist`.`intPastureId`) and (`heatwatch`.`classlist`.`varName` = \'产前\')))) where (isnull(`heatwatch`.`cow`.`dateLeave`) and (`heatwatch`.`cow`.`sireClass` = \'已孕\') and (`heatwatch`.`cow`.`gravidityDays` >= (280 - (select `heatwatch`.`manageparam`.`varVal` from `heatwatch`.`manageparam` where ((`heatwatch`.`manageparam`.`varDiscribe` = \'临产前几天进产房\') and (`heatwatch`.`manageparam`.`intPastureId` = `heatwatch`.`cow`.`intPastureId`))))) and ((8 & ifnull(`heatwatch`.`bar`.`cowType`,1)) <> 8))
