|
@@ -24,7 +24,7 @@ function error_show($code=0,$message=""){
|
|
|
|
|
|
function GetUserInfo($token){
|
|
function GetUserInfo($token){
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = \app\admin\common\User::getIns();
|
|
return $userCommon->handle('verifyToken',['token'=>$token]);
|
|
return $userCommon->handle('verifyToken',['token'=>$token]);
|
|
|
|
|
|
// $host = Config::get("app");
|
|
// $host = Config::get("app");
|
|
@@ -115,7 +115,7 @@ function VerifyTokens($token){
|
|
// ];
|
|
// ];
|
|
// $response=curl_request($url,$data);
|
|
// $response=curl_request($url,$data);
|
|
|
|
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
$rs = $userCommon->VerifyTokens(['token'=>$token]);
|
|
$rs = $userCommon->VerifyTokens(['token'=>$token]);
|
|
|
|
|
|
return json_decode($rs,true);
|
|
return json_decode($rs,true);
|
|
@@ -128,7 +128,7 @@ function VerifyTokens($token){
|
|
* @return mixed
|
|
* @return mixed
|
|
*/
|
|
*/
|
|
function GetUserlist($token,$condition){
|
|
function GetUserlist($token,$condition){
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
return json_decode($userCommon->GetUserlist($condition), true);
|
|
return json_decode($userCommon->GetUserlist($condition), true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -138,12 +138,12 @@ function GetUserlist($token,$condition){
|
|
* @return mixed
|
|
* @return mixed
|
|
*/
|
|
*/
|
|
function GetAccountall($token, $condition){
|
|
function GetAccountall($token, $condition){
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
return json_decode($userCommon->GetAccountall($condition), true);
|
|
return json_decode($userCommon->GetAccountall($condition), true);
|
|
}
|
|
}
|
|
|
|
|
|
function GetList($condition){
|
|
function GetList($condition){
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
return json_decode($userCommon->GetUserlist($condition), true);
|
|
return json_decode($userCommon->GetUserlist($condition), true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -153,12 +153,12 @@ function GetList($condition){
|
|
* @return mixed
|
|
* @return mixed
|
|
*/
|
|
*/
|
|
function GetInfoById($token,$condition){
|
|
function GetInfoById($token,$condition){
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
return json_decode($userCommon->GetUserInfo($condition), true);
|
|
return json_decode($userCommon->GetUserInfo($condition), true);
|
|
}
|
|
}
|
|
|
|
|
|
function GetInfoNoToken($condition){
|
|
function GetInfoNoToken($condition){
|
|
- $userCommon = new CommonUser();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
return json_decode($userCommon->GetUserInfo($condition), true);
|
|
return json_decode($userCommon->GetUserInfo($condition), true);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -382,7 +382,7 @@ function crea($data,$vio=0)
|
|
//根据部门id获取部门名称(层级名称)
|
|
//根据部门id获取部门名称(层级名称)
|
|
function GetPart($id,$data=[]){
|
|
function GetPart($id,$data=[]){
|
|
|
|
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
$rs = $userCommon->handle('get_part',['itemid'=>$id]);
|
|
$rs = $userCommon->handle('get_part',['itemid'=>$id]);
|
|
|
|
|
|
return $rs['data'];
|
|
return $rs['data'];
|
|
@@ -1148,7 +1148,7 @@ if (!function_exists('get_logistics_information')) {
|
|
if (!function_exists('get_top_customer_org')) {
|
|
if (!function_exists('get_top_customer_org')) {
|
|
function get_top_customer_org($var)
|
|
function get_top_customer_org($var)
|
|
{
|
|
{
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
$rs = $userCommon->handle('get_top_customer_org', ['itemid' => is_array($var) ? $var : [$var]]);
|
|
$rs = $userCommon->handle('get_top_customer_org', ['itemid' => is_array($var) ? $var : [$var]]);
|
|
|
|
|
|
if (is_array($var)) return $rs['data'];
|
|
if (is_array($var)) return $rs['data'];
|
|
@@ -1180,7 +1180,7 @@ if (!function_exists('get_top_customer_org')) {
|
|
if (!function_exists('get_company_item_user_by_name')) {
|
|
if (!function_exists('get_company_item_user_by_name')) {
|
|
function get_company_item_user_by_name(string $company_name = '')
|
|
function get_company_item_user_by_name(string $company_name = '')
|
|
{
|
|
{
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon =CommonUser::getIns();
|
|
$rs = $userCommon->handle('get_company_item_user_by_name', ['company_name' => $company_name]);
|
|
$rs = $userCommon->handle('get_company_item_user_by_name', ['company_name' => $company_name]);
|
|
return $rs['data'] ?? [];
|
|
return $rs['data'] ?? [];
|
|
|
|
|
|
@@ -1229,7 +1229,7 @@ if (!function_exists('get_company_item_user_by_name')) {
|
|
if (!function_exists('get_company_name_by_uid')) {
|
|
if (!function_exists('get_company_name_by_uid')) {
|
|
function get_company_name_by_uid($uid = '', $get_tops = 2)
|
|
function get_company_name_by_uid($uid = '', $get_tops = 2)
|
|
{
|
|
{
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
|
|
|
|
$rs = $userCommon->handle('get_company_name_by_uid',['uid'=>$uid,'get_tops'=>$get_tops]);
|
|
$rs = $userCommon->handle('get_company_name_by_uid',['uid'=>$uid,'get_tops'=>$get_tops]);
|
|
|
|
|
|
@@ -1287,9 +1287,9 @@ if (!function_exists('get_encryption_password')) {
|
|
if (!function_exists('checkHasAccountBySupplierNos')) {
|
|
if (!function_exists('checkHasAccountBySupplierNos')) {
|
|
function checkHasAccountBySupplierNos(array $supplierNo = []): array
|
|
function checkHasAccountBySupplierNos(array $supplierNo = []): array
|
|
{
|
|
{
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
$rs = $userCommon->handle('check_has_account_by_supplierNos', ['supplierNo' => $supplierNo]);
|
|
$rs = $userCommon->handle('check_has_account_by_supplierNos', ['supplierNo' => $supplierNo]);
|
|
- unset($userCommon);
|
|
|
|
|
|
+
|
|
return $rs['data'];
|
|
return $rs['data'];
|
|
// return \app\abutment\model\SupplierRelationUser::where('is_del', \app\abutment\model\SupplierUser::$is_del_normal)
|
|
// return \app\abutment\model\SupplierRelationUser::where('is_del', \app\abutment\model\SupplierUser::$is_del_normal)
|
|
// ->whereIn('supplierNo', $supplierNo)
|
|
// ->whereIn('supplierNo', $supplierNo)
|
|
@@ -1617,7 +1617,7 @@ if(!function_exists('menuAction')){
|
|
if (!function_exists('get_headquarters_code_and_name')) {
|
|
if (!function_exists('get_headquarters_code_and_name')) {
|
|
function get_headquarters_code_and_name(array $code = []): array
|
|
function get_headquarters_code_and_name(array $code = []): array
|
|
{
|
|
{
|
|
- $userCommon = new \app\admin\common\User();
|
|
|
|
|
|
+ $userCommon = CommonUser::getIns();
|
|
$res = $userCommon->handle('getCodeAndName', ['code' => $code]);
|
|
$res = $userCommon->handle('getCodeAndName', ['code' => $code]);
|
|
return $res['data'];
|
|
return $res['data'];
|
|
}
|
|
}
|