TYPE=VIEW
query=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,`heatwatch`.`cow`.`intCowId` AS `intCowId`,`heatwatch`.`cow`.`intCurBar` AS `intCurBar`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,if((`heatwatch`.`cow`.`gravidityDays` >= 220),if((`heatwatch`.`cow`.`gravidityDays` >= 259),\'转换前期\',\'干奶期\'),if((`heatwatch`.`cow`.`lactationDays` > 100),if((`heatwatch`.`cow`.`lactationDays` > 200),\'泌乳后期\',\'泌乳中期\'),if((`heatwatch`.`cow`.`lactationDays` > 21),\'泌乳早期\',\'转换后期\'))) AS `sort`,if((`heatwatch`.`cow`.`gravidityDays` >= 220),concat(\'产前:\',(280 - `heatwatch`.`cow`.`gravidityDays`),\'天\'),concat(\'DIM：\',`heatwatch`.`cow`.`lactationDays`,\'天\')) AS `DESCRIB`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from (`heatwatch`.`cow` join `heatwatch`.`tmp_wait_bcs` on((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`tmp_wait_bcs`.`intCowId`))) where ((to_days(curdate()) - to_days(ifnull(`heatwatch`.`cow`.`ecentGradeDate`,\'2015-1-1\'))) > 10)
md5=bc85a2575f39de70abb82a4713e8426c
updatable=1
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`,`cow`.`intCowId` AS `intCowId`,`cow`.`intCurBar` AS `intCurBar`,if(`cow`.`intCurBar` > 0,`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,if(`cow`.`gravidityDays` >= 220,if(`cow`.`gravidityDays` >= 259,\'转换前期\',\'干奶期\'),if(`cow`.`lactationDays` > 100,if(`cow`.`lactationDays` > 200,\'泌乳后期\',\'泌乳中期\'),if(`cow`.`lactationDays` > 21,\'泌乳早期\',\'转换后期\'))) AS `sort`,if(`cow`.`gravidityDays` >= 220,concat(\'产前:\',280 - `cow`.`gravidityDays`,\'天\'),concat(\'DIM：\',`cow`.`lactationDays`,\'天\')) AS `DESCRIB`,`cow`.`intPastureId` AS `intPastureId` from (`cow` join `tmp_wait_bcs` on(`cow`.`intCowId` = `tmp_wait_bcs`.`intCowId`)) where to_days(curdate()) - to_days(ifnull(`cow`.`ecentGradeDate`,\'2015-1-1\')) > 10
client_cs_name=utf8
connection_cl_name=utf8_general_ci
view_body_utf8=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,`heatwatch`.`cow`.`intCowId` AS `intCowId`,`heatwatch`.`cow`.`intCurBar` AS `intCurBar`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,if((`heatwatch`.`cow`.`gravidityDays` >= 220),if((`heatwatch`.`cow`.`gravidityDays` >= 259),\'转换前期\',\'干奶期\'),if((`heatwatch`.`cow`.`lactationDays` > 100),if((`heatwatch`.`cow`.`lactationDays` > 200),\'泌乳后期\',\'泌乳中期\'),if((`heatwatch`.`cow`.`lactationDays` > 21),\'泌乳早期\',\'转换后期\'))) AS `sort`,if((`heatwatch`.`cow`.`gravidityDays` >= 220),concat(\'产前:\',(280 - `heatwatch`.`cow`.`gravidityDays`),\'天\'),concat(\'DIM：\',`heatwatch`.`cow`.`lactationDays`,\'天\')) AS `DESCRIB`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId` from (`heatwatch`.`cow` join `heatwatch`.`tmp_wait_bcs` on((`heatwatch`.`cow`.`intCowId` = `heatwatch`.`tmp_wait_bcs`.`intCowId`))) where ((to_days(curdate()) - to_days(ifnull(`heatwatch`.`cow`.`ecentGradeDate`,\'2015-1-1\'))) > 10)
