CaixiaoData.php 1011 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace app\cxinv\model;
  3. class CaixiaoData extends Base
  4. {
  5. //设置字段信息
  6. protected $schema = [
  7. 'id' =>'bigint',//
  8. 'order_type' =>'tinyint',//1销售单 2 采购单
  9. 'data' =>'text',//订单数据
  10. 'uniqkey' =>'varchar',//唯一键
  11. 'status' =>'tinyint',//使用状态 1 未入表0 已入表
  12. 'addtime' =>'datetime',//
  13. ];
  14. protected $createTime = 'addtime';
  15. public static function order_is_check($orderCode,$isCgdBack=0,$is_cgd_refund = 0):array{
  16. $data=[];
  17. if($isCgdBack==0) {
  18. QrdInfo::CheckQrd($orderCode,$data);
  19. CgdInfo::CheckCgd(['cxCode'=>$orderCode],$data);
  20. if($is_cgd_refund==1)CgdInfo::CheckCgd(['qrdCode'=>$orderCode],$data);
  21. }else{
  22. CgdInfo::CheckCgd(['sequenceNo'=>$orderCode],$data);
  23. CgdInfo::CheckCgd(['is_comon'=>2,'mainCode'=>$orderCode],$data);
  24. }
  25. return $data;
  26. }
  27. }