1234567891011121314151617181920212223242526272829 |
- <?php
- namespace app\cxinv\model;
- class CaixiaoData extends Base
- {
- //设置字段信息
- protected $schema = [
- 'id' =>'bigint',//
- 'order_type' =>'tinyint',//1销售单 2 采购单
- 'data' =>'text',//订单数据
- 'uniqkey' =>'varchar',//唯一键
- 'status' =>'tinyint',//使用状态 1 未入表0 已入表
- 'addtime' =>'datetime',//
- ];
- protected $createTime = 'addtime';
- public static function order_is_check($orderCode,$isCgdBack=0,$is_cgd_refund = 0):array{
- $data=[];
- if($isCgdBack==0) {
- QrdInfo::CheckQrd($orderCode,$data);
- CgdInfo::CheckCgd(['cxCode'=>$orderCode],$data);
- if($is_cgd_refund==1)CgdInfo::CheckCgd(['qrdCode'=>$orderCode],$data);
- }else{
- CgdInfo::CheckCgd(['sequenceNo'=>$orderCode],$data);
- CgdInfo::CheckCgd(['is_comon'=>2,'mainCode'=>$orderCode],$data);
- }
- return $data;
- }
- }
|