v_bcs_tmp.frm 3.1 KB

123456789101112131415
  1. TYPE=VIEW
  2. 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)
  3. md5=bc85a2575f39de70abb82a4713e8426c
  4. updatable=1
  5. algorithm=0
  6. definer_user=roo
  7. definer_host=%
  8. suid=1
  9. with_check_option=0
  10. timestamp=2022-12-14 10:07:39
  11. create-version=1
  12. 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
  13. client_cs_name=utf8
  14. connection_cl_name=utf8_general_ci
  15. 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)