修复问题
This commit is contained in:
parent
e44a0c0951
commit
72c9605cab
@ -159,6 +159,10 @@ class TaskController extends BaseApiController
|
||||
if( $parmas['terminus']['lnglat'][0]==null || $parmas['terminus']['lnglat'][0]<=0){
|
||||
return $this->fail('定位不存在');
|
||||
}
|
||||
$res = App(RemoteController::class)->calculateDistance($task['extend']['terminus']['lnglat'][][0],$task['extend']['terminus']['lnglat'][][1], $parmas['terminus']['lnglat'][0], $parmas['terminus']['lnglat'][1]);
|
||||
if($res>100){
|
||||
return $this->fail('定位坐标大于100米,请重新打卡。'.$res.'米');
|
||||
}
|
||||
$res = App(RemoteController::class)->coordinate($datas, $parmas['terminus']['lnglat'][0], $parmas['terminus']['lnglat'][1]);
|
||||
if($res===false){
|
||||
return $this->fail('定位不存在|或GPS无轨迹');
|
||||
@ -169,6 +173,10 @@ class TaskController extends BaseApiController
|
||||
if( $parmas['transfer']['lnglat'][0]==null || $parmas['transfer']['lnglat'][0]<=0){
|
||||
return $this->fail('定位不存在');
|
||||
}
|
||||
$res = App(RemoteController::class)->calculateDistance($task['extend']['transfer']['lnglat'][][0],$task['extend']['transfer']['lnglat'][][1], $parmas['terminus']['lnglat'][0], $parmas['terminus']['lnglat'][1]);
|
||||
if($res>100){
|
||||
return $this->fail('定位坐标大于100米,请重新打卡。'.$res.'米');
|
||||
}
|
||||
$res = App(RemoteController::class)->coordinate($datas, $parmas['transfer']['lnglat'][0], $parmas['transfer']['lnglat'][1]);
|
||||
if($res===false){
|
||||
return $this->fail('定位不存在|或GPS无轨迹');
|
||||
|
@ -244,7 +244,9 @@ class ContractLogic extends BaseLogic
|
||||
|
||||
}
|
||||
|
||||
// /**发送合同 */
|
||||
/**发送合同
|
||||
* @type 1公司 2个人
|
||||
*/
|
||||
public static function Draftingcontracts($params,$type=1)
|
||||
{
|
||||
if($type==1){
|
||||
@ -252,6 +254,7 @@ class ContractLogic extends BaseLogic
|
||||
}else{
|
||||
$result = UserLogic::detail($params['id']);
|
||||
}
|
||||
$result['contract']= Contract::where('id',$params['contract_id'])->with(['party_a_info', 'contractType'])->find();
|
||||
if ($result && isset($result['contract']) && isset($result['contract']['file']) && $result['contract']['file'] != '') {
|
||||
if ($result['contract']['check_status'] == 3) {
|
||||
return self::setError('你已经生成过合同,请勿重复生成');
|
||||
|
@ -6,5 +6,12 @@ use app\common\model\BaseModel;
|
||||
|
||||
class UserInformationgDemand extends BaseModel
|
||||
{
|
||||
public function getDataAttr($value)
|
||||
{
|
||||
if($value){
|
||||
return json_decode($value,true);
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -19,11 +19,8 @@ namespace IFlytek\Xfyun\Speech;
|
||||
|
||||
use IFlytek\Xfyun\Core\Traits\SignTrait;
|
||||
use IFlytek\Xfyun\Core\HttpClient;
|
||||
use GuzzleHttp\Psr7\Request;
|
||||
use IFlytek\Xfyun\Speech\Constants\ChatConstants;
|
||||
|
||||
/**
|
||||
* 文本纠错客户端
|
||||
* 讯飞Ai户端
|
||||
*
|
||||
* @author guizheng@iflytek.com
|
||||
*/
|
||||
@ -87,4 +84,37 @@ class ChatClient
|
||||
));
|
||||
return $authAddr;
|
||||
}
|
||||
|
||||
function getBody($appid, $question)
|
||||
{
|
||||
$header = array(
|
||||
"app_id" => $appid,
|
||||
"uid" => "1"
|
||||
);
|
||||
|
||||
$parameter = array(
|
||||
"chat" => array(
|
||||
"domain" => "generalv2",
|
||||
"temperature" => 0.5,
|
||||
"max_tokens" => 1024
|
||||
)
|
||||
);
|
||||
|
||||
$payload = array(
|
||||
"message" => array(
|
||||
"text" => array(
|
||||
array("role" => "user", "content" => $question)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$json_string = json_encode(array(
|
||||
"header" => $header,
|
||||
"parameter" => $parameter,
|
||||
"payload" => $payload
|
||||
));
|
||||
|
||||
return $json_string;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user