发布v2.7.0版本

This commit is contained in:
雨中磐石
2025-07-18 14:38:01 +08:00
parent d0c604e040
commit 5cec56526e
31 changed files with 235 additions and 204 deletions

View File

@@ -32,8 +32,13 @@ class uploadClassAction extends apiAction
$this->returnjson($arr);
}
/**
* 从编辑文件中心获取最新编辑的文件20250610
*/
public function editfilebAction()
{
//用那个异步去获取(待开发)
$fileid = (int)$this->get('fileid','0');
$frs = m('file')->getone($fileid);
if(!$frs)return 'error';
@@ -58,6 +63,22 @@ class uploadClassAction extends apiAction
}
}
//判断是否编辑完成
public function editfilecAction()
{
$fileid = (int)$this->get('fileid','0');
$erand = $this->get('erand');
$frs = m('file')->getone($fileid);
if(!$erand || !$frs)return 'error';
$barr = c('rockedit')->getdata('file','editfilec', array(
'filekey' => getconfig('xinhukey'),
'filenum' => $frs['onlynum'],
'erand' => $erand
));
if($barr['success'])return $barr['data'];
return 'wait';
}
/**
* 这个是用来在线编辑文档上传的
@@ -378,9 +399,20 @@ class uploadClassAction extends apiAction
//编辑
if($type==2){
if(getconfig('officebj')=='1'){
$erand = rand(1000000,9999999);
$data['fileext']= 'rockedit';
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo();
$data['url'] = 'index.php?m=public&a=fileedit&id='.$fileid.'&erand='.$erand.'';
$data['editwsinfo'] = c('rockedit')->getwsinfo(array(
'erand' => $erand,
'fileid'=> $fileid
));
/*
c('rockqueue')->push('rockoffice,gedit', array(
'erand' => $erand,
'cishu' =>1,
'fileid' =>$fileid,
'optid' => $this->adminid
), time() + 10);*/
}else{
if($ismobile==1)return returnerror('移动端不支持在线编辑');
$data['fileext']='rockoffice';
@@ -668,6 +700,7 @@ class uploadClassAction extends apiAction
'optid' => $this->adminid,
'otype' => $otype,
'fileext' => $frs['fileext'],
'erand' => $this->get('erand'),
'filename' => $this->rock->jm->base64encode($frs['filename']),
'optname' => $this->rock->jm->base64encode($this->adminname),
'face' => $this->rock->jm->base64encode(m('admin')->getface($urs['face'])),

View File

@@ -7,11 +7,15 @@ class uploawClassAction extends apiAction
}
/**
* 上传文件(外部信息收集使用的)
* 上传文件(外部信息收集使用的),弃用
*/
public function upfileAction()
{
if(!$_FILES)exit('sorry!');
return 'error0';
/*
$mid = (int)$this->get('mid','0');
$to = m('planm')->rows('`id`='.$mid.' and `type`=2 and `fenlei`=1 and `status`=1');
if($to==0 || !$_FILES)exit('sorry!');
$upimg = c('upfile');
$maxsize= (int)$this->get('maxsize', $upimg->getmaxzhao());//上传最大M
$uptypes= 'jpg|png|docx|doc|pdf|xlsx|xls|zip|rar';
@@ -21,5 +25,6 @@ class uploawClassAction extends apiAction
$arr = c('down')->uploadback($upses);
$arr['autoup'] = (getconfig('qcloudCos_autoup') || getconfig('alioss_autoup')) ? 1 : 0; //是否上传其他平台
return $arr;
*/
}
}

View File

@@ -10,63 +10,7 @@ class openmodhetongClassAction extends openapiAction
public function dataAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$nickName = $this->jm->base64decode($this->get('nickName'));
$htdata = array();
$db = m('wxxcyus');
$uarr['mobile'] = $mobile;
$uarr['xcytype'] = $xcytype;
$uarr['openid'] = $openid;
$uarr['nickName'] = $nickName;
$uarr['province'] = $this->get('province');
$uarr['city'] = $this->get('city');
$uarr['gender'] = $this->get('gender');
$uarr['dingyue'] = $this->get('dingyue');
$uarr['avatarUrl'] = $this->jm->base64decode($this->get('avatarUrl'));
$where = "`openid`='$openid'";
if($db->rows($where)==0){
$uarr['adddt'] = $this->now;
$where='';
}else{
$uarr['optdt'] = $this->now;
}
$db->record($uarr, $where);
$custid = '0'; //客户id
$rows = m('customer')->getall("`mobile`='$mobile' and `status`=1",'id');
foreach($rows as $k=>$rs)$custid.=','.$rs['id'].'';
if($custid!='0'){
$htrows = m('custract')->getall('custid in('.$custid.')','custid,custname,id,startdt,enddt,signdt,type,money,num','id desc');
$dt = $this->rock->date;
foreach($htrows as $k=>$rs){
if($rs['startdt']>$dt){
$statustext='待生效';
$statuscolor='blue';
}else if($rs['startdt']<=$dt && $rs['enddt']>=$dt){
$statustext='生效中';
$statuscolor='green';
}else if($rs['enddt']<$dt){
$statustext='已过期';
$statuscolor='gray';
}
$htdata[] = array(
'id' => $rs['id'],
'name' => $rs['custname'],
'modenum' => 'custract',
'explain' => '金额:'.$rs['money'].',编号:'.$rs['num'].',有效期:'.$rs['startdt'].'→'.$rs['enddt'].'',
'statustext'=>$statustext,
'statuscolor'=>$statuscolor,
);
}
}
return returnsuccess(array(
'htdata' => $htdata,
));
}
/**
@@ -75,23 +19,6 @@ class openmodhetongClassAction extends openapiAction
public function customerAction()
{
return retuenerror('20240429最新已弃用');
$mobile = $this->get('mobile');
$xcytype = $this->get('xcytype');
$openid = $this->get('openid');
$sql = "select a.id,a.name,a.unitname,b.name as yewuname from [Q]customer a left join [Q]admin b on a.uid=b.id where a.`mobile`='$mobile' and a.`status`=1";
$rows = $this->db->getall($sql);
$custdata = array();
foreach($rows as $k=>$rs){
$custdata[] = array(
'id' => $rs['id'],
'name' => $rs['name'],
'modenum' => 'customer',
'explain' => '业务员:'.$rs['yewuname'].'',
);
}
return returnsuccess(array(
'custdata' => $custdata,
));
}
}

View File

@@ -10,70 +10,5 @@ class openxiangClassAction extends openapiAction
$this->showreturn('', '此页面弃用', 201);//2025-04-09
}
/**
* 详情
*/
public function dataAction()
{
$list['hetong'] = 'custract,customer'; //配置可读取模块
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$kears = arrvalue($list, $xcytype);
if(!$kears)return returnerror('无效模块1');
if(!in_array($num,explode(',', $kears)))return returnerror('无效模块2');
$flow = m('flow')->initflow($num,$mid, false);
$barr['modename'] = $flow->modename;
$barr['btndata'] = array();
$barr['xiangdata']= array();
if(method_exists($flow,'openxiang')){
$lbarr = $flow->openxiang();
if(is_array($lbarr))foreach($lbarr as $k=>$v)$barr[$k]=$v;
}
return returnsuccess($barr);
}
/**
* 操作菜单
*/
public function optmenuAction()
{
$num = $this->get('num');
$xcytype = $this->get('xcytype');
$mid = (int)$this->get('mid','0');
$menuid = (int)$this->get('menuid','0');
$sm = c('check')->onlysql($this->jm->base64decode($this->get('sm')));
if(isempt($num) || !$xcytype || $mid==0)return returnerror('num isempt');
$flow = m('flow')->initflow($num,$mid, false);
$msg = $flow->optmenu($menuid,1,$sm);
if($msg!='ok')return returnerror($msg);
return returnsuccess($msg);
}
/**
* 下载文件
*/
public function downurlAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return;
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return;
m('file')->show($id, true);
}
/**
* 返回文件详情
*/
public function fileinfoAction()
{
$id = (int)$this->get('id','0');
$openid = $this->get('openid');
if(isempt($openid))return returnerror('无效openid1');
if(m('wxxcyus')->rows("`openid`='$openid'")==0)return returnerror('无效openid');
$frs = m('file')->getone($id,'id,filename,filesize,fileext,filepath,filepathout');
return returnsuccess($frs);
}
}