|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Admin\Controller;
|
|
|
|
/**
|
|
|
|
* 上下游结算单
|
|
|
|
* @author cz
|
|
|
|
*/
|
|
|
|
class CompanyStatementController extends ThinkController
|
|
|
|
{
|
|
|
|
public $CompanyType = [
|
|
|
|
"1"=>"上游cp公司",
|
|
|
|
"2"=>"联运下游渠道公司"
|
|
|
|
];
|
|
|
|
public $CompanyBelong = [
|
|
|
|
"0"=>"下游内团",
|
|
|
|
"1"=>"下游外团",
|
|
|
|
"2"=>"下游分发",
|
|
|
|
"3"=>"下游无",
|
|
|
|
"9"=>"上游"
|
|
|
|
];
|
|
|
|
public $VerifyStatus=[
|
|
|
|
"-2"=>"汇总撤销",
|
|
|
|
"-1"=>"审批拒绝",
|
|
|
|
"0"=>"未审批",
|
|
|
|
"1"=>"审核通过",
|
|
|
|
"2"=>"对外发起",
|
|
|
|
"3"=>"合作确认",
|
|
|
|
"4"=>"已汇总"
|
|
|
|
];
|
|
|
|
public $admininfo;
|
|
|
|
public $DBModel;
|
|
|
|
public function _initialize()
|
|
|
|
{
|
|
|
|
$this->admininfo = $_SESSION['onethink_admin']['user_auth'];
|
|
|
|
$this->DBModel = M("CompanyStatement","tab_");
|
|
|
|
parent::_initialize();
|
|
|
|
}
|
|
|
|
public function lists() {
|
|
|
|
$params = I('get.');
|
|
|
|
$page = $params['p'] ? intval($params['p']) : 1;
|
|
|
|
$row = $params['row'] ? intval($params['row']) : 10;
|
|
|
|
//权限分配
|
|
|
|
if(!IS_ROOT){
|
|
|
|
$this->OpAuthList= getModuleControllerAuth();
|
|
|
|
}
|
|
|
|
$this->assign('menubtn',$this->menuAuth());
|
|
|
|
|
|
|
|
$map = [
|
|
|
|
"_string"=>"1=1"
|
|
|
|
];
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
$time_start = strtotime($_REQUEST['time_start']);
|
|
|
|
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
|
|
|
|
$map["_string"] = "(statement_begin_time BETWEEN {$time_start} AND {$time_end}) OR (statement_end_time BETWEEN {$time_start} AND {$time_end})";
|
|
|
|
} elseif (isset($_REQUEST['time_start'])) {
|
|
|
|
$time_start = strtotime($_REQUEST['time_start']);
|
|
|
|
$map["_string"] = "(statement_begin_time >= {$time_start} ) OR (statement_end_time >= {$time_start})";
|
|
|
|
} elseif (isset($_REQUEST['time_end'])) {
|
|
|
|
$time_end = strtotime($_REQUEST['time_end'])+ 86399;
|
|
|
|
$map["_string"] = "(statement_begin_time <= {$time_end} ) OR (statement_end_time <= {$time_end})";
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($_REQUEST['time_start2']) && isset($_REQUEST['time_end2'])) {
|
|
|
|
$map['op_time'] = ['between', [strtotime($_REQUEST['time_start2']), strtotime($_REQUEST['time_end2']) + 86399]];
|
|
|
|
} elseif (isset($_REQUEST['time_start2'])) {
|
|
|
|
$map['op_time'] = ['EGT', strtotime($_REQUEST['time_start2'])];
|
|
|
|
} elseif (isset($_REQUEST['time_end2'])) {
|
|
|
|
$map['op_time'] = ['ELT', strtotime($_REQUEST['time_end2']) + 86399];
|
|
|
|
}
|
|
|
|
|
|
|
|
$typeflag = false;
|
|
|
|
if (isset($_REQUEST['withdraw_type'])) {
|
|
|
|
if($_REQUEST['withdraw_type'] == 1){
|
|
|
|
$typeflag = 1;//月结
|
|
|
|
$map["withdraw_type"] = 1;
|
|
|
|
}else{
|
|
|
|
$typeflag = 2;//周结
|
|
|
|
$map["withdraw_type"] = ["in",[0,2]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (isset($_REQUEST['withdraw_type2'])) {
|
|
|
|
if($_REQUEST['withdraw_type2'] == 2){
|
|
|
|
if($typeflag == 1){ //月结的补点找不到
|
|
|
|
$map['withdraw_type'] = 999;
|
|
|
|
}else{ //周结的补点就是补点
|
|
|
|
$map['withdraw_type'] = 2;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if($typeflag == 1){//月结的正常=月结
|
|
|
|
$map['withdraw_type'] = 1;
|
|
|
|
}elseif($typeflag == 2){//周结的正常=周结
|
|
|
|
$map['withdraw_type'] = 0;
|
|
|
|
}else{//没选的正常是 非补点
|
|
|
|
$map['withdraw_type'] = ["in",[0,1]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//其他
|
|
|
|
if(isset($_REQUEST['company_type'])){
|
|
|
|
if($_REQUEST['company_type'] == 1){
|
|
|
|
$map['_string'] .= " AND company_belong='9'";
|
|
|
|
}else{
|
|
|
|
$map['_string'] .= " AND company_belong <> '9'";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if(isset($_REQUEST['company_belong'])){
|
|
|
|
$map['company_belong'] = $_REQUEST['company_belong'];
|
|
|
|
}
|
|
|
|
if(isset($_REQUEST['verify_status'])){
|
|
|
|
$map['verify_status'] = $_REQUEST['verify_status'];
|
|
|
|
}
|
|
|
|
$this->checkListOrCountAuthRestMap($map);//导出权限
|
|
|
|
//条件end
|
|
|
|
$data = M("company_statement","tab_")
|
|
|
|
->field("id,withdraw_type,company_name,company_belong,statement_begin_time,statement_end_time,statement_money,platform_amount,verify_status,verify_log,op_time,remark")
|
|
|
|
->where($map)
|
|
|
|
->order("op_time Desc")->page($page,$row)->select();
|
|
|
|
foreach($data as $k => &$v) {
|
|
|
|
|
|
|
|
$v['statement_begin_time'] = date('Y-m-d',$v['statement_begin_time']);
|
|
|
|
$v['statement_end_time'] = date('Y-m-d',$v['statement_end_time']);
|
|
|
|
|
|
|
|
$v['company_belong'] = $this->CompanyBelong[$v['company_belong']];
|
|
|
|
$v['op_time'] = date('Y-m-d H:i:s',$v['op_time']);
|
|
|
|
$v["valid"] = "{$v['statement_begin_time']} ~ {$v['statement_end_time']}";
|
|
|
|
|
|
|
|
|
|
|
|
$v['withdraw_type_1'] = ($v['withdraw_type'] == 1 ? "月结" :"周结");
|
|
|
|
$v['withdraw_type_2'] = ($v['withdraw_type'] == 2 ? "补点" :"正常结算");
|
|
|
|
|
|
|
|
$v['verify_log'] = json_decode($v['verify_log'], true);
|
|
|
|
if (isset($params['export'])) {
|
|
|
|
$symbol = "\n";
|
|
|
|
} else {
|
|
|
|
$symbol = "<br>";
|
|
|
|
}
|
|
|
|
$v["create"]= "{$v['verify_log']['create_user']} {$symbol} {$v['verify_log']['create_time']}";
|
|
|
|
if(isset($v['verify_log']['verify_user'])){
|
|
|
|
if($v['verify_status'] == -1){
|
|
|
|
$ts = "审核拒绝";
|
|
|
|
}else{
|
|
|
|
$ts = "审核通过";
|
|
|
|
}
|
|
|
|
$v["verify"]= "{$ts}({$v['verify_log']['verify_user']}) {$symbol} {$v['verify_log']['verify_time']}";
|
|
|
|
}else{
|
|
|
|
$v["verify"] = '--';
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($v['verify_log']['launch_user'])){
|
|
|
|
$ts = "已发起";
|
|
|
|
$v["launch"]= "{$ts}({$v['verify_log']['launch_user']}) {$symbol} {$v['verify_log']['launch_time']}";
|
|
|
|
}else{
|
|
|
|
$v["launch"] = '--';
|
|
|
|
}
|
|
|
|
|
|
|
|
if(isset($v['verify_log']['confirm_user'])){
|
|
|
|
$ts = "已确认";
|
|
|
|
$v["confirm"]= "{$ts}({$v['verify_log']['confirm_user']}) {$symbol} {$v['verify_log']['confirm_time']}";
|
|
|
|
}else{
|
|
|
|
$v["confirm"] = '--';
|
|
|
|
}
|
|
|
|
if(isset($v['verify_log']['pool_user'])){
|
|
|
|
if($v['status'] == -2){
|
|
|
|
$ts = "撤销汇总";
|
|
|
|
}else{
|
|
|
|
$ts = "已汇总";
|
|
|
|
}
|
|
|
|
$v["pool"]= "{$ts}({$v['verify_log']['pool_user']}) {$symbol} {$v['verify_log']['pool_time']}";
|
|
|
|
}else{
|
|
|
|
$v["pool"] = '--';
|
|
|
|
}
|
|
|
|
$v['oplist'] = $this->OpAuth($v);
|
|
|
|
}
|
|
|
|
$count = M("company_statement","tab_")->field("count(id) count,IFNULL(SUM(CASE WHEN withdraw_type < 2 THEN platform_amount ELSE 0 END),0) as platform_amount,SUM(statement_money) as statement_money")->where($map)->find();
|
|
|
|
// dd($count);
|
|
|
|
$parameter['p'] = $page;
|
|
|
|
$parameter['row'] = $row;
|
|
|
|
$page = set_pagination($count['count'], $row, $parameter);
|
|
|
|
if ($page) {
|
|
|
|
$this->assign('_page', $page);
|
|
|
|
}
|
|
|
|
|
|
|
|
$this->assign('data',$data);
|
|
|
|
$this->assign('count',$count);
|
|
|
|
$this->assign('CompanyType',$this->CompanyType);
|
|
|
|
$this->assign('CompanyBelong',$this->CompanyBelong);
|
|
|
|
$this->assign('VerifyStatus',$this->VerifyStatus);
|
|
|
|
$this->display();
|
|
|
|
|
|
|
|
}
|
|
|
|
//查看
|
|
|
|
public function viewStatement()
|
|
|
|
{
|
|
|
|
if(!isset($_REQUEST['id'])){
|
|
|
|
$this->error('参数错误');
|
|
|
|
}
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
//获取基本信息
|
|
|
|
$dbres = M("CompanyStatement","tab_")->where("id='{$id}'")->find();
|
|
|
|
$first_party_info = json_decode($dbres['first_party_info'],true);
|
|
|
|
$second_party_info = json_decode($dbres['second_party_info'],true);
|
|
|
|
$statement_info = json_decode($dbres['statement_info'],true);
|
|
|
|
|
|
|
|
if($dbres['pay_type'] == 2){
|
|
|
|
$company = $second_party_info['partner'];
|
|
|
|
$pyinfo = $second_party_info;
|
|
|
|
$fkf_pyinfo = $first_party_info;
|
|
|
|
}else{
|
|
|
|
$company = $first_party_info['partner'];
|
|
|
|
$pyinfo = $first_party_info;
|
|
|
|
$fkf_pyinfo = $second_party_info;
|
|
|
|
}
|
|
|
|
$senddata = array(
|
|
|
|
"company"=>$company,
|
|
|
|
"payinfo"=>$pyinfo,
|
|
|
|
"fkf_payinfo"=>$fkf_pyinfo,
|
|
|
|
"first_part_company"=>$first_party_info['partner'],
|
|
|
|
"second_part_company"=>$second_party_info['partner'],
|
|
|
|
"pay_type"=>$dbres['pay_type'],
|
|
|
|
"withdraw_type"=>$dbres['withdraw_type'],//2补丁
|
|
|
|
"first_party_info"=>$first_party_info,
|
|
|
|
"second_party_info"=>$second_party_info,
|
|
|
|
"statement_info"=>$statement_info,
|
|
|
|
"statement_count"=>array("pay_amount"=>$dbres['pay_amount'],"statement_money"=>$dbres['statement_money'],"big_ratio_money"=>convertAmountToCn($dbres['statement_money']))
|
|
|
|
);
|
|
|
|
$this->assign("data",$senddata);
|
|
|
|
|
|
|
|
if($dbres["company_belong"] == 9){
|
|
|
|
//上游
|
|
|
|
$this->display("viewCpStatement");
|
|
|
|
}else{
|
|
|
|
$this->display("viewPcStatement");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//编辑
|
|
|
|
public function editStatement()
|
|
|
|
{
|
|
|
|
if ($_POST) {
|
|
|
|
$params = I('post.');
|
|
|
|
if(!isset($params['id'])){
|
|
|
|
$this->error('参数错误');
|
|
|
|
}
|
|
|
|
$params['first_party_info'] = json_encode($params['first_party_info'],JSON_UNESCAPED_UNICODE);
|
|
|
|
$params['second_party_info'] = json_encode($params['second_party_info'],JSON_UNESCAPED_UNICODE);
|
|
|
|
$params['statement_info'] = json_encode($params['statement_info'],JSON_UNESCAPED_UNICODE);
|
|
|
|
$params['verify_status'] = 0;
|
|
|
|
$params['verify_log'] = json_encode(["create_user"=>$this->admininfo["username"],"create_time"=>date("Y-m-d H:i:s")]);
|
|
|
|
$params['op_time'] = time();
|
|
|
|
M("CompanyStatement","tab_")->save($params);
|
|
|
|
$this->ajaxReturn(["code"=>0,"msg"=>"ok"]);
|
|
|
|
}else{
|
|
|
|
if (!isset($_REQUEST['id'])) {
|
|
|
|
$this->error('参数错误');
|
|
|
|
}
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
//获取基本信息
|
|
|
|
$dbres = M("CompanyStatement", "tab_")->where("id='{$id}'")->find();
|
|
|
|
$dbres['first_party_info'] = json_decode($dbres['first_party_info'], true);
|
|
|
|
$dbres['second_party_info']= json_decode($dbres['second_party_info'], true);
|
|
|
|
$dbres['statement_info'] = json_decode($dbres['statement_info'], true);
|
|
|
|
$this->assign("data", $dbres);
|
|
|
|
if ($dbres["company_belong"] == 9) {
|
|
|
|
//上游
|
|
|
|
$this->display("editCpStatement");
|
|
|
|
} else {
|
|
|
|
$this->display("editPcStatement");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//审批通过
|
|
|
|
public function verifyAgree(){
|
|
|
|
$this->setVerifyStatus(0,1,"verify");
|
|
|
|
}
|
|
|
|
public function verifyRefuse(){
|
|
|
|
$this->setVerifyStatus(0,-1,"verify");
|
|
|
|
}
|
|
|
|
public function launch(){
|
|
|
|
$this->setVerifyStatus(1,2,"launch");
|
|
|
|
}
|
|
|
|
protected function setVerifyStatus($old_status,$change_status,$op_pre)
|
|
|
|
{
|
|
|
|
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
|
|
|
|
foreach($dbres as $k=>&$v){
|
|
|
|
if($v['verify_status'] != $old_status) continue;
|
|
|
|
$v['verify_log'] = json_decode($v['verify_log'],true);
|
|
|
|
$v['verify_log'][$op_pre.'_user']=$this->admininfo["username"];
|
|
|
|
$v['verify_log'][$op_pre.'_time']=date("Y-m-d H:i:s");
|
|
|
|
$v['verify_log'] = json_encode($v['verify_log']);
|
|
|
|
$v['verify_status']=$change_status;
|
|
|
|
$this->DBModel->save($v);
|
|
|
|
$opname = $this->VerifyStatus[$change_status];
|
|
|
|
addOperationLog(['op_type'=>1,'key'=>$v['id'],"op_name"=>$opname,'url'=>U('lists')]);
|
|
|
|
}
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
'status' => 1,
|
|
|
|
"info"=>$opname."成功"
|
|
|
|
));
|
|
|
|
}
|
|
|
|
//保存备注
|
|
|
|
public function saveRemark(){
|
|
|
|
if(!isset($_REQUEST['id'])) $this->error("参数错误");
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
$remark = $_REQUEST['remark'];
|
|
|
|
$this->DBModel->where("id = '{$id}'")->save(['remark'=>$remark]);
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
'status' => 1,
|
|
|
|
'info' => "操作成功"
|
|
|
|
));
|
|
|
|
}
|
|
|
|
//重算
|
|
|
|
public function updateStatement()
|
|
|
|
{
|
|
|
|
if(!isset($_REQUEST['ids'])) $this->error("参数错误");
|
|
|
|
$ids = $_REQUEST['ids'];
|
|
|
|
$dbres = $this->DBModel->field("id,verify_status,verify_log")->where("id in ({$ids})")->select();
|
|
|
|
foreach($dbres as $k=>&$v){
|
|
|
|
if(in_array($v['verify_status'],[3,4])) continue; //合作方确认后不进行重算
|
|
|
|
//重算
|
|
|
|
$res = A("CompanyStatementSet")->updateCompanyStatementData($v['id'],$this->admininfo["username"]);
|
|
|
|
if($res === false){
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
'status' => 0,
|
|
|
|
"info"=>"重算金额错误"
|
|
|
|
));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$this->ajaxReturn(array(
|
|
|
|
'status' => 1,
|
|
|
|
"info"=>"重算金额成功"
|
|
|
|
));
|
|
|
|
}
|
|
|
|
//导出
|
|
|
|
public function export()
|
|
|
|
{
|
|
|
|
if(!isset($_REQUEST['id'])) $this->error("参数错误");
|
|
|
|
$id = $_REQUEST['id'];
|
|
|
|
|
|
|
|
$data = M("CompanyStatement","tab_")->where(['id' => $id])->find();
|
|
|
|
$data['first_party_info'] = json_decode($data['first_party_info'], 1);//甲方
|
|
|
|
$data['second_party_info'] = json_decode($data['second_party_info'], 1);//乙方
|
|
|
|
$data['statement_info'] = json_decode($data['statement_info'], 1);//结算记录
|
|
|
|
//收款方
|
|
|
|
$all_sum_money = $data['pay_amount'];//合计平台总额
|
|
|
|
$all_pay_amount = $data['statement_money'];//合计结算金额
|
|
|
|
|
|
|
|
$big_all_sum_money = convertAmountToCn($data['statement_money']);//大写
|
|
|
|
|
|
|
|
if($data['pay_type'] == 2){
|
|
|
|
$data['receive_company'] = $data['second_party_info'];//收款方
|
|
|
|
$data['pay_company'] = $data['first_party_info'];
|
|
|
|
}else{
|
|
|
|
$data['receive_company'] = $data['first_party_info'];
|
|
|
|
$data['pay_company'] = $data['second_party_info'];
|
|
|
|
}
|
|
|
|
if($data['receive_company']['invoice_type'] == 1){
|
|
|
|
$data['receive_company']['invoice_type']="专票";
|
|
|
|
}else{
|
|
|
|
$data['receive_company']['invoice_type']="普票";
|
|
|
|
}
|
|
|
|
if ($data['company_belong'] == 9) {//上游
|
|
|
|
excelUpStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money);
|
|
|
|
} else {//下游
|
|
|
|
excelDownStreamTemplate($data, $all_sum_money, $all_pay_amount, $big_all_sum_money);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
public function OpAuth($info)
|
|
|
|
{
|
|
|
|
$id = $info['id'];
|
|
|
|
$img = $info['ext_field'];
|
|
|
|
$remark = $info['remark'];
|
|
|
|
//原始列表
|
|
|
|
$opBtn = [
|
|
|
|
"viewStatement"=>"<a class='confirm viewStatement' data-id='{$id}'>查看</a>",
|
|
|
|
"editStatement"=>"<a class='confirm editStatement' data-id='{$id}'>编辑</a>",
|
|
|
|
"addRemark"=>"<a class='confirm addRemark' data-id='{$id}'>新增备注</a>",
|
|
|
|
"editRemark"=>"<a class='confirm editRemark' data-remark='{$remark}' data-id='{$id}'>修改备注</a>",
|
|
|
|
"viewRemark"=>"<a class='confirm viewRemark' data-remark='{$remark}' data-id='{$id}'>查看备注</a>",
|
|
|
|
];
|
|
|
|
//操作对应菜单
|
|
|
|
$optist = [];
|
|
|
|
switch ($info['verify_status']) {
|
|
|
|
case '-2':
|
|
|
|
case '-1':
|
|
|
|
case '0':
|
|
|
|
case '1':
|
|
|
|
case '2':
|
|
|
|
$optist = ["viewStatement","editStatement","addRemark","viewRemark","editRemark"];
|
|
|
|
break;
|
|
|
|
case '3':
|
|
|
|
$optist = ["viewStatement","addRemark","viewRemark","editRemark"];
|
|
|
|
break;
|
|
|
|
case '4':
|
|
|
|
$optist = ["viewStatement","addRemark","viewRemark","editRemark"];
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if(empty($info['remark'])){
|
|
|
|
//未上传备注
|
|
|
|
$optist = array_diff($optist, ["editRemark", "viewRemark"]);
|
|
|
|
}else{
|
|
|
|
$optist = array_diff($optist, ["addRemark"]);
|
|
|
|
}
|
|
|
|
//
|
|
|
|
$resarr = [];
|
|
|
|
foreach ($optist as $k => $v) {
|
|
|
|
if(IS_ROOT){
|
|
|
|
$resarr[] = $opBtn[$v];
|
|
|
|
}else{
|
|
|
|
if(in_array($v,$this->OpAuthList)){
|
|
|
|
$resarr[] = $opBtn[$v];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $resarr;
|
|
|
|
}
|
|
|
|
public function menuAuth()
|
|
|
|
{
|
|
|
|
$mentBtn = [
|
|
|
|
"verifyAgree"=>"<a class='butn' id='verifyAgree'>审批通过</a>",
|
|
|
|
"verifyRefuse"=>"<a class='butn' id='verifyRefuse' style='background-color: red;'>审核拒绝</a>",
|
|
|
|
"launch"=>"<a class='butn' id='launch'>对外发起</a>",
|
|
|
|
"pool"=>"<a class='butn' id='pool'>发起汇总</a>",
|
|
|
|
"monthPool"=>"<a class='butn' id='monthPool'>月结汇总</a>",
|
|
|
|
"updateStatement"=>"<a class='butn' id='updateStatement' style='background-color: green;'>重算金额</a>",
|
|
|
|
"export"=>"<a class='butn' id='export'>批量导出</a>"
|
|
|
|
];
|
|
|
|
$resarr = [];
|
|
|
|
foreach ($mentBtn as $k => $v) {
|
|
|
|
if(IS_ROOT){
|
|
|
|
$resarr[] = $v;
|
|
|
|
}else{
|
|
|
|
if(in_array($k,$this->OpAuthList)){
|
|
|
|
$resarr[] = $v;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return $resarr;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|