| 123456789101112131415 |
- TYPE=VIEW
- query=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,concat(\'高活动量\',if((`heatwatch`.`v_v_hact`.`actlevel` = 3),\'+++\',if((`heatwatch`.`v_v_hact`.`actlevel` = 2),\'++\',\'+\'))) AS `sort`,concat(\'报警后:\',round(timestampdiff(HOUR,`heatwatch`.`v_v_hact`.`datetime`,now()),0),\'h,DIM:\',`heatwatch`.`cow`.`lactationDays`,\',配后天数:\',if((`heatwatch`.`cow`.`dateCurPz` is not null),`heatwatch`.`cow`.`hybriDays`,\'\')) AS `DISCRIBE`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId`,1 AS `rtype`,round(timestampdiff(HOUR,`heatwatch`.`v_v_hact`.`datetime`,now()),0) AS `afterwarn` from (`heatwatch`.`cow` join `heatwatch`.`v_v_hact` on(((`heatwatch`.`cow`.`varCowCode` = `heatwatch`.`v_v_hact`.`varcowcode`) and (`heatwatch`.`cow`.`sireClass` = \'已孕\')))) where (((to_days(ifnull(`heatwatch`.`cow`.`dateCurPz`,\'2016-12-01\')) - to_days(`heatwatch`.`v_v_hact`.`datetime`)) < 0) and ((to_days(`heatwatch`.`v_v_hact`.`datetime`) - to_days(`heatwatch`.`cow`.`EID1createdate`)) > 2) and (`heatwatch`.`v_v_hact`.`actlevel` = 3)) order by `heatwatch`.`cow`.`intCurBarName`
- md5=591c8cac1c6072478842323dc9fcca21
- 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`,if(`cow`.`intCurBar` > 0,`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,concat(\'高活动量\',if(`v_v_hact`.`actlevel` = 3,\'+++\',if(`v_v_hact`.`actlevel` = 2,\'++\',\'+\'))) AS `sort`,concat(\'报警后:\',round(timestampdiff(HOUR,`v_v_hact`.`datetime`,current_timestamp()),0),\'h,DIM:\',`cow`.`lactationDays`,\',配后天数:\',if(`cow`.`dateCurPz` is not null,`cow`.`hybriDays`,\'\')) AS `DISCRIBE`,`cow`.`intPastureId` AS `intPastureId`,1 AS `rtype`,round(timestampdiff(HOUR,`v_v_hact`.`datetime`,current_timestamp()),0) AS `afterwarn` from (`cow` join `v_v_hact` on(`cow`.`varCowCode` = `v_v_hact`.`varcowcode` and `cow`.`sireClass` = \'已孕\')) where to_days(ifnull(`cow`.`dateCurPz`,\'2016-12-01\')) - to_days(`v_v_hact`.`datetime`) < 0 and to_days(`v_v_hact`.`datetime`) - to_days(`cow`.`EID1createdate`) > 2 and `v_v_hact`.`actlevel` = 3 order by `cow`.`intCurBarName`
- client_cs_name=utf8
- connection_cl_name=utf8_general_ci
- view_body_utf8=select `heatwatch`.`cow`.`varCowCode` AS `varCowCode`,if((`heatwatch`.`cow`.`intCurBar` > 0),`heatwatch`.`cow`.`intCurBarName`,\'待分配\') AS `intCurBarName`,concat(\'高活动量\',if((`heatwatch`.`v_v_hact`.`actlevel` = 3),\'+++\',if((`heatwatch`.`v_v_hact`.`actlevel` = 2),\'++\',\'+\'))) AS `sort`,concat(\'报警后:\',round(timestampdiff(HOUR,`heatwatch`.`v_v_hact`.`datetime`,now()),0),\'h,DIM:\',`heatwatch`.`cow`.`lactationDays`,\',配后天数:\',if((`heatwatch`.`cow`.`dateCurPz` is not null),`heatwatch`.`cow`.`hybriDays`,\'\')) AS `DISCRIBE`,`heatwatch`.`cow`.`intPastureId` AS `intPastureId`,1 AS `rtype`,round(timestampdiff(HOUR,`heatwatch`.`v_v_hact`.`datetime`,now()),0) AS `afterwarn` from (`heatwatch`.`cow` join `heatwatch`.`v_v_hact` on(((`heatwatch`.`cow`.`varCowCode` = `heatwatch`.`v_v_hact`.`varcowcode`) and (`heatwatch`.`cow`.`sireClass` = \'已孕\')))) where (((to_days(ifnull(`heatwatch`.`cow`.`dateCurPz`,\'2016-12-01\')) - to_days(`heatwatch`.`v_v_hact`.`datetime`)) < 0) and ((to_days(`heatwatch`.`v_v_hact`.`datetime`) - to_days(`heatwatch`.`cow`.`EID1createdate`)) > 2) and (`heatwatch`.`v_v_hact`.`actlevel` = 3)) order by `heatwatch`.`cow`.`intCurBarName`
|