Compare commits

..

No commits in common. "d83701edd33ff649f1d9a12d3a5f37d165952db2" and "cb2e1e805a442dcbdca49025072ba0a03e7c8510" have entirely different histories.

2 changed files with 1 additions and 4 deletions

View File

@ -81,8 +81,7 @@
$qrCodeFile = $qrCode->png($qrCodeUrl,false, 6)->entry();
Plant::where('id',$params['plant_id'])->update([
'status'=>2,
'qr_code' => empty($qrCodeFile) ? '' : $qrCodeFile,
'harvest_date' => time(),
'qr_code' => empty($qrCodeFile) ? '' : $qrCodeFile
]);
Land::where('id',$plant['land_id'])->update([
'residual_area'=>$land['residual_area']+$plant['area'],

View File

@ -144,9 +144,7 @@ class IndexController extends BaseApiController
return $this->fail('土地信息错误');
}
$plantInfo['pic'] = json_decode($plantInfo['pic'],true);
$plantInfo['group_day'] = floor(($plantInfo['harvest_date'] - $plantInfo['plant_date']) / 86400);
$plantInfo['plant_date'] = date('Y-m-d',$plantInfo['plant_date']);
$plantInfo['harvest_date'] = date('Y-m-d',$plantInfo['harvest_date']);
$plantInfo['land_name'] = $landInfo['title'];
$plantInfo['land_area'] = $landInfo['total_area'];
$plantInfo['land_address'] = $landInfo['province_name'].$landInfo['city_name'].$landInfo['county_name'].$landInfo['town_name'].$landInfo['village_name'].$landInfo['group_name'];