信呼v2.5.0版本
This commit is contained in:
@@ -329,11 +329,12 @@ class fileClassModel extends Model
|
||||
header('location:'.$filepath.'');
|
||||
return;
|
||||
}
|
||||
ob_clean();flush();readfile($filepath);return;
|
||||
if($filesize > 5*1024*1024){
|
||||
|
||||
if($filesize > 10*1024*1024 && 1==1){
|
||||
header('location:'.$filepath.'');
|
||||
}else{
|
||||
echo file_get_contents($filepath);
|
||||
//echo file_get_contents($filepath);
|
||||
ob_clean();flush();readfile($filepath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ class flow_assetmClassModel extends flowModel
|
||||
$this->statearr = c('array')->strtoarray('blue|闲置,#ff6600|在用,red|维修,gray|报废,gray|丢失');
|
||||
}
|
||||
|
||||
public function flowrsreplace($rs)
|
||||
public function flowrsreplace($rs,$lx=0)
|
||||
{
|
||||
if(isset($rs['typeid']))$rs['typeid'] = $this->db->getmou('[Q]option','name',"`id`='".$rs['typeid']."'");
|
||||
if(isset($rs['ckid']) && $rs['ckid']>0){
|
||||
@@ -21,6 +21,16 @@ class flow_assetmClassModel extends flowModel
|
||||
$rs['state'] = '<font color="'.$b[0].'">'.$b[1].'</font>';
|
||||
}
|
||||
if(isset($rs['fengmian']) && !isempt($rs['fengmian']))$rs['fengmian'] = '<img src="'.$rs['fengmian'].'" height="100">';
|
||||
|
||||
if($lx==1){
|
||||
$rows = $this->db->getall('select a.runren,a.id,a.optdt from `[Q]planm` a left join `[Q]plans` b on a.id=b.mid where b.itemid='.$rs['id'].' and a.`type`=1');
|
||||
$str = '';
|
||||
foreach($rows as $k1=>$rs1){
|
||||
$url = $this->getxiangurl('assetmly', $rs1['id'],'auto');
|
||||
$str.=''.$rs1['runren'].'('.$rs1['optdt'].') <a href="'.$url.'">查看</a><br>';
|
||||
}
|
||||
$rs['lycount'] = $str;
|
||||
}
|
||||
return $rs;
|
||||
}
|
||||
|
||||
|
||||
97
webmain/model/flow/assetmlyModel.php
Normal file
97
webmain/model/flow/assetmlyModel.php
Normal file
@@ -0,0 +1,97 @@
|
||||
<?php
|
||||
class flow_assetmlyClassModel extends flowModel
|
||||
{
|
||||
|
||||
|
||||
public function flowrsreplace($rs, $lx=0)
|
||||
{
|
||||
if($lx==2){
|
||||
$rows = $this->db->getall('select `pitem` from `[Q]plans` where `mid`='.$rs['id'].'');
|
||||
$s = '';
|
||||
foreach($rows as $k1=>$rs1)$s.=''.$rs1['pitem'].';';
|
||||
$rs['contentlist'] = $s;
|
||||
}
|
||||
|
||||
$state = $rs['state'];
|
||||
if($state!='2'){
|
||||
if($rs['status']==1)$state = 1;
|
||||
}
|
||||
if($state != $rs['state'])$this->update('`state`='.$state.'', $rs['id']);
|
||||
|
||||
if($state=='0')$rs['state']='待领取';
|
||||
if($state=='1')$rs['state']='已领取';
|
||||
if($state=='2')$rs['state']='已归还';
|
||||
|
||||
|
||||
return $rs;
|
||||
}
|
||||
|
||||
|
||||
//自定义审核人读取
|
||||
protected function flowcheckname($num){
|
||||
$sid = '';
|
||||
$sna = '';
|
||||
if($num=='queren'){
|
||||
$ssid = '';
|
||||
$runrenid = $this->rs['runrenid'];
|
||||
if(!isempt($runrenid)){
|
||||
$dbs = m('dept');
|
||||
$runa = explode(',', $runrenid);
|
||||
foreach($runa as $id1){
|
||||
$id1d = str_replace(array('d','u'),'', $id1);
|
||||
if(contain($id1,'d')){
|
||||
$drs = $dbs->getone($id1d);
|
||||
if($drs && !isempt($drs['headid']))$ssid.=','.$drs['headid'].'';
|
||||
}else{
|
||||
$ssid.=','.$id1d.'';
|
||||
}
|
||||
}
|
||||
}
|
||||
if($ssid){
|
||||
$ssid = substr($ssid, 1);
|
||||
$rows = $this->adminmodel->getall('id in('.$ssid.') and `status`=1');
|
||||
if($rows){
|
||||
foreach($rows as $k=>$rs){
|
||||
$sid.=','.$rs['id'].'';
|
||||
$sna.=','.$rs['name'].'';
|
||||
}
|
||||
$sid = substr($sid, 1);
|
||||
$sna = substr($sna, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return array($sid, $sna);
|
||||
}
|
||||
|
||||
//审批完成更新领用
|
||||
protected function flowcheckfinsh($zt)
|
||||
{
|
||||
if($zt==1){
|
||||
$rows = m('plans')->getall('`mid`='.$this->id.'');
|
||||
foreach($rows as $k=>$rs){
|
||||
m('assetm')->update(array(
|
||||
'useid' => $this->rs['runrenid'],
|
||||
'usename' => $this->rs['runren'],
|
||||
'state' => 1
|
||||
),$rs['itemid']);
|
||||
}
|
||||
$this->update('`state`=1', $this->id);
|
||||
}
|
||||
}
|
||||
|
||||
//归还
|
||||
protected function flowoptmenu($ors, $crs)
|
||||
{
|
||||
if($ors['num']=='guihainoup'){
|
||||
$rows = m('plans')->getall('`mid`='.$this->id.'');
|
||||
foreach($rows as $k=>$rs){
|
||||
m('assetm')->update(array(
|
||||
'useid' => '',
|
||||
'usename' => '',
|
||||
'state' => 0
|
||||
),$rs['itemid']);
|
||||
}
|
||||
$this->update('`state`=2', $this->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
@@ -167,7 +167,7 @@ class flow_planmClassModel extends flowModel
|
||||
public function getwwctotals($uid)
|
||||
{
|
||||
$where = m('admin')->getjoinstr('runrenid', $uid,0,1);
|
||||
$where = "`status`=1 and `state`<>1 and `startdt`<'{$this->rock->now}' $where";
|
||||
$where = "`status`=1 and `state`<>1 and `startdt`<'{$this->rock->now}' and `type`=0 $where";
|
||||
return m('planm')->rows($where);
|
||||
}
|
||||
}
|
||||
@@ -36,7 +36,7 @@ class flow_scheduleClassModel extends flowModel
|
||||
$rate = $rs['rate'];
|
||||
if(isset($this->ratearr[$rate])){
|
||||
if($rate=='w')$rate='每周'.$rs['rateval'].'';
|
||||
if($rate=='d')$rate='每天';
|
||||
if($rate=='d')$rate='每'.$rs['rateval'].'天';
|
||||
if($rate=='m')$rate='每月'.$rs['rateval'].'号';
|
||||
$rs['rate'] = $rate;
|
||||
}
|
||||
|
||||
@@ -88,15 +88,18 @@ class flowbillClassModel extends Model
|
||||
//抄送
|
||||
if($lx=='flow_chaos'){
|
||||
$where ='1=2';
|
||||
$crows = $this->db->getall("select * from `[Q]flow_chao` where ".$this->rock->dbinstr('csnameid', $uid)."");
|
||||
$where1= $this->rock->dbinstr('csnameid', $uid);
|
||||
if($modeid>0)$where1.=' and `modeid`='.$modeid.'';
|
||||
$crows = $this->db->getall("select * from `[Q]flow_chao` where $where1");
|
||||
if($crows){
|
||||
$modeids = '';
|
||||
$mids = '';
|
||||
$modeidsa= array();
|
||||
foreach($crows as $k1=>$rs1){
|
||||
$modeids.=','.$rs1['modeid'].'';
|
||||
$mids.=','.$rs1['mid'].'';
|
||||
$modeidsa[$rs1['modeid']][] = $rs1['mid'];
|
||||
}
|
||||
$where = "`isturn`=1 and `modeid` in(".substr($modeids,1).") and `mid` in(".substr($mids,1).")";
|
||||
foreach($modeidsa as $mkid=>$mids)$wherea[]='(`modeid` = '.$mkid.' and `mid` in('.join(',', $mids).'))';
|
||||
$where = '`isturn`=1 and ( '.join(' or ', $wherea).' )';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -81,8 +81,8 @@ class modeClassModel extends Model
|
||||
$farr[] = array('name'=>arrvalue($chufarr, 'base_sericnum', '单号'),'fields'=>'sericnum');
|
||||
$farrs = m('flow_element')->getall("`mid`='$modeid'",'`fields`,`name`,`fieldstype`,`ispx`,`isalign`,`iszb`,`islb`,`issou`,`data`','`iszb`,`sort`');
|
||||
$inpub = c('input');
|
||||
$zbarr = array();
|
||||
$zbnamea = explode(',', $mors['names']);
|
||||
$zbarr = $zbnamea = array();
|
||||
if(!isempt($mors['names']))$zbnamea = explode(',', $mors['names']);
|
||||
foreach($farrs as $k=>$rs){
|
||||
if($glx==1 && $rs['issou']=='1' && ($rs['fieldstype']=='select' || $rs['fieldstype']=='rockcombo')){
|
||||
$rs['store'] =$inpub->getdatastore($rs['fieldstype'],$inrs,$rs['data']);
|
||||
|
||||
@@ -1075,6 +1075,7 @@ class reimClassModel extends Model
|
||||
}else if(in_array($rs['cfrom'], array('nppandroid','nppios'))){//2019-11-25最新新app
|
||||
$nestr = ''.$rs['token'].'|'.$rs['web'].'|'.$_uid.'|';
|
||||
if(contain($rs['web'],'huawei') && !contain($rs['ip'],'.'))$nestr.=''.$rs['ip'].'';
|
||||
if(contain($rs['web'],'xiaomi'))$nestr.=''.$rs['pushtoken'].'';
|
||||
$alias2019[] = $nestr;
|
||||
$uid2019[] = $_uid;
|
||||
}else if(substr($_web,0,4)=='app_'){
|
||||
|
||||
@@ -55,7 +55,12 @@ class scheduleClassModel extends Model
|
||||
$dts = $rs['time'];
|
||||
$time = '';
|
||||
if($rate=='d'){
|
||||
$pinv = $rs['rateval'];
|
||||
if(isempt($pinv))$pinv = 1;
|
||||
$pinv = (int)($pinv);
|
||||
$jgsj = $this->dtobj->datediff('d',$rs['startdt'], $dt);
|
||||
$time = ''.$dt.' '.$dts[3].':'.$dts[4].':00';
|
||||
if($pinv>1 && $jgsj % $pinv!=0)$time='';
|
||||
}else if($rate=='m'){
|
||||
if(contain($ratev,','.$_d.',')){
|
||||
$time = ''.$dt.' '.$dts[3].':'.$dts[4].':00';
|
||||
@@ -73,6 +78,7 @@ class scheduleClassModel extends Model
|
||||
'title' => $rs['title'],
|
||||
'optname'=>$rs['optname'],
|
||||
'receid' =>$rs['receid'],
|
||||
'explain' =>$rs['explain'],
|
||||
'txsj' =>$rs['txsj'],
|
||||
'isdai' =>arrvalue($rs, 'isdai'),
|
||||
'week' =>$this->dtobj->cnweek($dt),
|
||||
@@ -116,7 +122,11 @@ class scheduleClassModel extends Model
|
||||
if(!isempt($rs['receid'])){
|
||||
$receid = 'u'.$receid.','.$rs['receid'].'';
|
||||
}
|
||||
if($rs['txsj']=='1')$flow->push($receid, '', $rs['title'], '日程提醒');
|
||||
if($rs['txsj']=='1'){
|
||||
$cont = '类型:日程提醒\n记事人:'.$rs['optname'].'\n时间:'.$rs['time'].'';
|
||||
if(!isempt($rs['explain']))$cont.='\n说明:'.$rs['explain'].'';
|
||||
$flow->push($receid, '', $cont, ''.$rs['title'].'');
|
||||
}
|
||||
|
||||
//写入到日程待办里
|
||||
$this->insertdaiban($rs);
|
||||
|
||||
@@ -262,7 +262,11 @@ class taskClassModel extends Model
|
||||
$barr = c('rockqueue')->push($url, array('rtype'=>'queue','dwnum'=>'dev','nolog'=>'1','runtime'=>$runtime), $runtime, $len);
|
||||
if(!COMPANYNUM && getconfig('platdwnum')){
|
||||
$creaar = m('company')->getall('`iscreate`=1');
|
||||
foreach($creaar as $k=>$rs)$barr = c('rockqueue')->push($url, array('dwnum'=>$rs['num'],'nolog'=>'1','runtime'=>$runtime), $runtime, $len+1+$k);
|
||||
foreach($creaar as $k=>$rs){
|
||||
$url1 = $url;
|
||||
if(substr($url,0,4)=='http' && !isempt($rs['yuming']))$url1 = $this->tihuanurl($url1, $rs['yuming']);
|
||||
$barr = c('rockqueue')->push($url1, array('dwnum'=>$rs['num'],'nolog'=>'1','runtime'=>$runtime), $runtime, $len+1+$k);
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$url = ''.$turl.'task.php?m=runt&a=getlist';
|
||||
@@ -272,6 +276,14 @@ class taskClassModel extends Model
|
||||
}
|
||||
return $barr;
|
||||
}
|
||||
private function tihuanurl($url1, $yj)
|
||||
{
|
||||
$str = str_replace('/','@',str_replace('//', '@', $url1));
|
||||
$urla = explode('@', $str);
|
||||
$nhur = $urla[1];
|
||||
$url1 = str_replace('/'.$nhur.'/', '/'.$yj.'/', $url1);
|
||||
return $url1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 开启计划任务(自己服务端)
|
||||
|
||||
Reference in New Issue
Block a user