PSI-original/web/Application/SLN0002/DAO/VoucherDAO.class.php
2024-11-07 11:26:10 +08:00

79 lines
1.3 KiB
PHP

<?php
namespace SLN0002\DAO;
use Home\DAO\PSIBaseExDAO;
/**
* 记账凭证 DAO
*
* @author PSI
* @copyright 2015 - present
* @license GPL v3
*/
class VoucherDAO extends PSIBaseExDAO
{
/**
* 凭证主表列表
*/
public function voucherList($params)
{
$db = $this->db;
$loginUserId = $params["loginUserId"];
if ($this->loginUserIdNotExists($loginUserId)) {
return $this->emptyResult();
}
$start = $params["start"];
$limit = $params["limit"];
return [
"dataList" => [],
"totalCount" => 0,
];
}
/**
* 查询凭证字列表
*/
function queryVoucherWord($params)
{
$db = $this->db;
$orgId = $params["orgId"];
$sql = "select id, name
from t_sln0002_ct_voucher_word
where company_id = '%s' and record_status = 1000
order by code";
$data = $db->query($sql, $orgId);
$result = [];
foreach ($data as $v) {
$result[] = [
"id" => $v["id"],
"name" => $v["name"],
];
}
if (count($result) === 0) {
$result[] = [
"id" => "-1",
"name" => "[不使用凭证字]",
];
}
return $result;
}
/**
* 查询账样的扩展项
*/
function queryFmtEx($params)
{
// TODO
return [];
}
}