|
|
@@ -72,9 +72,13 @@ class AluminumElectroplated extends Api
|
|
|
$this->error('请求错误');
|
|
|
}
|
|
|
$params = $this->request->param();
|
|
|
- if (empty($params) || !isset($params['sys_id']) || !isset($params['day'])) {
|
|
|
+ if (empty($params) || !isset($params['day'])) {
|
|
|
$this->error('参数错误');
|
|
|
}
|
|
|
+ $where['st_rq'] = ['like',$params['day'].'%'];
|
|
|
+ if (isset($params['sys_id'])) {
|
|
|
+ $where['a.sys_id'] = $params['sys_id'];
|
|
|
+ }
|
|
|
$list = \db('物料_电化铝领用记录')
|
|
|
->alias('a')
|
|
|
->join('工单_印件资料 b', 'a.st_gdbh = b.Yj_Gdbh and a.st_yjno = yj_Yjno')
|
|
|
@@ -83,8 +87,7 @@ class AluminumElectroplated extends Api
|
|
|
->field('a.st_gdbh, a.st_yjno, a.st_wlbh, a.st_rq,a.st_jylb,a.采购单号,a.供方批次,a.卷宽,a.卷长,a.领用宽度,a.st_sl as 领用数量,
|
|
|
a.机台,a.st_desc as 备注,a.Uniqid,rtrim(d.成品名称) as 成品名称,rtrim(b.yj_yjmc) as 印件名称,rtrim(c.物料名称) as 物料名称,
|
|
|
rtrim(c.领用单位) as 单位,b.yj_Yjdh as 印件代号,a.sys_rq as 创建时间,rtrim(d.成品代号) as 成品代号')
|
|
|
- ->where('a.st_rq', 'like',$params['day'].'%')
|
|
|
- ->where('a.sys_id', $params['sys_id'])
|
|
|
+ ->where($where)
|
|
|
->select();
|
|
|
if (empty($list)) {
|
|
|
$this->error('未找到数据');
|