|
@@ -159,7 +159,8 @@ class handleCxData extends command
|
|
|
]
|
|
|
);
|
|
|
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
$wait_insert_data=[
|
|
|
"order_type"=>$result['order_type'] ,
|
|
|
"data"=>json_encode($result['data'] , JSON_UNESCAPED_UNICODE) ,
|
|
@@ -197,8 +198,8 @@ class handleCxData extends command
|
|
|
]
|
|
|
);
|
|
|
}
|
|
|
-
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
//新增
|
|
|
$qrd_insert_data[]=[
|
|
|
'name'=>$data['orderCode'] ,//确认单名称,
|
|
@@ -277,8 +278,10 @@ class handleCxData extends command
|
|
|
|
|
|
];
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ if($data['cgdNo']!=''){
|
|
|
+ Db::name('cgd_info')->where(['sequenceNo'=>$data['cgdNo']])->update(['qrdSend',$data['send_status']]);
|
|
|
+ }
|
|
|
+
|
|
|
} else {
|
|
|
//已存在
|
|
|
$data['total_fee']=$data['total_fee'] - $data['th_fee'] - $data['diff_fee'];
|
|
@@ -298,6 +301,8 @@ class handleCxData extends command
|
|
|
$exists_cgd=Db::name('cgd_info')
|
|
|
->whereIn('sequenceNo' , $data['cgdNo'])
|
|
|
->field('id,status')->findOrEmpty();
|
|
|
+ $data['qrdSend'] = Db::name("qrd_info")->where(["cgdNo"=>$data['cgdNo']])->value
|
|
|
+ ("sendStatus",0);
|
|
|
if (!empty($exists_cgd)) {
|
|
|
|
|
|
//未对账,更新
|
|
@@ -413,6 +418,7 @@ class handleCxData extends command
|
|
|
'sendType'=>$data['send_type'] ,//发货方式',
|
|
|
'bkCreater'=>$data['bkcreater'] ,//备库申请人',
|
|
|
'sendStatus'=>$data['send_status'] ,//发货状态',
|
|
|
+ 'qrdSend'=>$data['qrdSend'] ,//发货状态',
|
|
|
'wsendNum'=>$data['wsend_num'] ,//未发货数量',
|
|
|
'sendNum'=>$data['send_num'] ,//已发货数量',
|
|
|
'wareHouse'=>$data['wsm_code'] ,//仓库名称',
|
|
@@ -424,7 +430,8 @@ class handleCxData extends command
|
|
|
]
|
|
|
);
|
|
|
}
|
|
|
- } else {
|
|
|
+ }
|
|
|
+ else {
|
|
|
//新增
|
|
|
$cgd_insert_data[]=[
|
|
|
'name'=>$data['cgdNo'] ,//采购单名称',
|
|
@@ -480,6 +487,7 @@ class handleCxData extends command
|
|
|
'sendType'=>$data['send_type'] ,//发货方式',
|
|
|
'bkCreater'=>$data['bkcreater'] ,//备库申请人',
|
|
|
'sendStatus'=>$data['send_status'] ,//发货状态',
|
|
|
+ 'qrdSend'=>$data['qrdSend'] ,
|
|
|
'wsendNum'=>$data['wsend_num'] ,//未发货数量',
|
|
|
'sendNum'=>$data['send_num'] ,//已发货数量',
|
|
|
'wareHouse'=>$data['wsm_code'] ,//仓库名称',
|
|
@@ -498,6 +506,7 @@ class handleCxData extends command
|
|
|
'updatetime'=>$date ,
|
|
|
];
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
|
|
|
if ($qrd_insert_data) Db::name('qrd_info')->insertAll($qrd_insert_data);
|