|
@@ -43,7 +43,7 @@ class Facility extends Api
|
|
|
->where('使用部门','<>','研发中心')
|
|
->where('使用部门','<>','研发中心')
|
|
|
->where('设备编组','<>','')
|
|
->where('设备编组','<>','')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
- ->order('设备编组,设备编号')
|
|
|
|
|
|
|
+ ->order('设备编组')
|
|
|
->column('rtrim(使用部门) as 使用部门');
|
|
->column('rtrim(使用部门) as 使用部门');
|
|
|
if (empty($department)){
|
|
if (empty($department)){
|
|
|
$this->success('为获取到机台数据');
|
|
$this->success('为获取到机台数据');
|
|
@@ -60,7 +60,7 @@ class Facility extends Api
|
|
|
$this->success('未找到机台生产记录');
|
|
$this->success('未找到机台生产记录');
|
|
|
}
|
|
}
|
|
|
foreach ($department as $value){
|
|
foreach ($department as $value){
|
|
|
- $machine = \db('设备_基本资料')->where('使用部门',$value)->where('sys_sbID','<>','')->where('使用部门',$value)->field('rtrim(设备编号) as 设备编号,rtrim(设备名称) as 设备名称')->select();
|
|
|
|
|
|
|
+ $machine = \db('设备_基本资料')->where('使用部门',$value)->where('sys_sbID','<>','')->where('使用部门',$value)->field('rtrim(设备编号) as 设备编号,rtrim(设备名称) as 设备名称')->order('设备编号')->select();
|
|
|
foreach ($machine as $k=>$v){
|
|
foreach ($machine as $k=>$v){
|
|
|
$data[rtrim($value)][$v['设备编号'].'-->'.$v['设备名称']] = [];
|
|
$data[rtrim($value)][$v['设备编号'].'-->'.$v['设备名称']] = [];
|
|
|
foreach ($list as $kk=>$vv){
|
|
foreach ($list as $kk=>$vv){
|