longle_log_cld.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. class longle_log_cld extends DooModel {
  4. public $logid;
  5. public $status;
  6. public $statusT;
  7. public $lid;
  8. public $sell_client;
  9. public $client;
  10. public $clientid;
  11. public $responsible;
  12. public $operator;
  13. public $product_id;
  14. public $product;
  15. public $category;
  16. public $new_key_num;
  17. public $mark;
  18. public $dateline;
  19. public $_table = 'CLD_longlelog';
  20. public $_primarykey = 'logid';
  21. public $_fields = array ('logid','lid', 'status','statusT', 'sell_client', 'client','clientid','responsible','operator','product_id','product','category','new_key_num','mark','dateline' );
  22. // TODO 2021-01-22年软件锁日志表加入记录时间
  23. // 以后的统计时间开始是2021-01-23开始-方法待完成
  24. public function GetSoftwareCountByUsername($data){
  25. $startYear=$data['year']."-01-01";
  26. $endYear=$data['year']."-12-31";
  27. "dateline>='".startYear."' and dateline<='".endYear."'";
  28. $sql = " operator = ? and status=? and untreadStatus=? and isDelete=0 ";
  29. $list = $this->find ( array (
  30. 'where' => $sql,
  31. 'param' => array (
  32. $trainId ,
  33. $status,
  34. $untreadStatus
  35. ),
  36. 'asArray' => TRUE
  37. ) );
  38. return $list;
  39. }
  40. public function getLongleByLid($lid){
  41. return $this->find ( array ('where' => "lid= '".$lid."'", 'desc' => 'logid', 'asArray' => TRUE ) );
  42. }
  43. public function getLongleByName($name){
  44. return $this->find ( array ('where' => "new_key_num= '".$name."'", 'desc' => 'logid', 'asArray' => TRUE ) );
  45. }
  46. public function getUser() {
  47. return $this->find ( array ('asc' => 'uid', 'asArray' => TRUE ) );
  48. }
  49. public function getUserByIdList($puid){
  50. return $this->find ( array ('where' => "uid= '".$puid."'", 'asArray' => TRUE ) );
  51. }
  52. }
  53. ?>