|
@@ -71,9 +71,11 @@ class CronAction extends Action {
|
|
|
$plateLocalPath = Redis('jyzl_wait_upload2oss_eplate');
|
|
|
while( (time() - $start) < 60 ){
|
|
|
$data = $plateLocalPath->pop();
|
|
|
- var_dump($data);
|
|
|
- json_decode($data,true);
|
|
|
- var_dump($data);
|
|
|
+ if(!$data){
|
|
|
+ echo 'no more data, waiting for next mesaage.'.PHP_EOL;
|
|
|
+ continue;
|
|
|
+ }
|
|
|
+
|
|
|
if($data){
|
|
|
//TEST
|
|
|
$fileName = 'gravatar.jpg';
|
|
@@ -105,6 +107,20 @@ class CronAction extends Action {
|
|
|
|
|
|
|
|
|
public function test_function( ){
|
|
|
+ $vehicleInfo = array(
|
|
|
+ 'LicensePlate' => 'LY100021',
|
|
|
+ 'VehicleColor' => '白色',
|
|
|
+ 'FullName' => '张三',
|
|
|
+ 'Address' => '浙江杭州滨江195号',
|
|
|
+ 'FrameNumber' => '123456789',
|
|
|
+ 'MotorNumber' => '233456789',
|
|
|
+ 'VehicleBrand'=> '雅迪z123',
|
|
|
+ 'RegistrationTime' => '2019-05-15 12:12:00'
|
|
|
+ );
|
|
|
+ $localPath = $this->createLocalElectronicPlate($vehicleInfo);
|
|
|
+ echo $localPath .PHP_EOL;
|
|
|
+ exit;
|
|
|
+
|
|
|
$plate = 'BJ000100';
|
|
|
$pendingElectricPlate = Redis("jyzl_wait_create_eplate","queue");
|
|
|
$licensePlate = $plate;
|
|
@@ -297,11 +313,12 @@ class CronAction extends Action {
|
|
|
echo "VehicleBrand empty!".PHP_EOL;
|
|
|
return false;
|
|
|
}
|
|
|
- if(strtotime($params['RegistrationTime']) < 1546272000){
|
|
|
+ $regist_time = strtotime($params['RegistrationTime']);
|
|
|
+ if($regist_time < 1546272000){
|
|
|
echo "RegistrationTime invalid! RegistrationTime: ".$params['RegistrationTime'].PHP_EOL;
|
|
|
return false;
|
|
|
}
|
|
|
- $date = date('Y-m-d',$params['RegistrationTime']);
|
|
|
+ $date = date('Y-m-d',$regist_time);
|
|
|
if(!$date){
|
|
|
echo "date empty! RegistrationTime: ".$params['RegistrationTime'].PHP_EOL;
|
|
|
return false;
|