|
@@ -909,10 +909,10 @@ class ApiAction extends Action {
|
|
|
$data = I('post.');
|
|
|
$plate = $data['plate'];
|
|
|
$vehicleId = M('jms_vehicle')->where(array('LicensePlate'=>$plate))->field('ID')->find();
|
|
|
- $insureInfo = M('jms_insure')->where(array('VehicleId'=>$vehicleId['ID']))->field('StartDate,EndDate')->find();
|
|
|
+ $insureInfo = M('jms_insure')->where(array('VehicleId'=>$vehicleId['ID']))->field('InsuranceId,StartDate,EndDate')->find();
|
|
|
if($insureInfo){
|
|
|
+ $insuranceInfo = M('jms_insurance')->where(array('ID'=>$insureInfo['InsuranceId']))->field('InsuranceName')->find();
|
|
|
$insuranceDetailInfo = M('jms_insurance_detail')->where(array('VehicleId'=>$vehicleId['ID']))->select();
|
|
|
- $insuranceInfo = M('jms_insurance')->where(array('ID'=>$insuranceDetailInfo[0]['InsuranceId']))->field('InsuranceName')->find();
|
|
|
$result['insuranceDetailInfo'] = $insuranceDetailInfo;
|
|
|
$result['insuranceName'] = $insuranceInfo['InsuranceName'];
|
|
|
$result['insureInfo'] = $insureInfo;
|