no commit message

This commit is contained in:
雨中磐石
2023-12-21 21:15:19 +08:00
parent ad77fdd196
commit 7eaf20c8fd
28 changed files with 187 additions and 53 deletions

View File

@@ -11,4 +11,18 @@ class workClassModel extends Model
return $to;
}
//更新对应项目进度
public function updateproject($id)
{
$id = (int)$id;
if($id==0)return;
$zshu = $this->rows('`projectid`='.$id.' and `status`<>5');
$wcshu = $this->rows('`projectid`='.$id.' and `status`=1');
$blix = '0';
if($zshu>0){
$blix = ($wcshu/$zshu) *100;
}
m('project')->update('progress='.$blix.'', $id);
}
}