|
@@ -105,16 +105,16 @@ class Facility extends Api
|
|
|
//机台信息
|
|
//机台信息
|
|
|
$machineDetail = \db('设备_基本资料')->where('设备编号',$machine)->field('rtrim(千件工价) as 千件工价,rtrim(日定额) as 日定额')->find();
|
|
$machineDetail = \db('设备_基本资料')->where('设备编号',$machine)->field('rtrim(千件工价) as 千件工价,rtrim(日定额) as 日定额')->find();
|
|
|
//组员信息
|
|
//组员信息
|
|
|
- $list = \db('设备_产量计酬')->where($where)->field($field)->select();
|
|
|
|
|
|
|
+ $list = \db('设备_产量计酬')->where($where)->field($field)->order('bzdh desc')->select();
|
|
|
$totalA = \db('设备_产量计酬')
|
|
$totalA = \db('设备_产量计酬')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->where('sczl_bzdh','like','A%')
|
|
->where('sczl_bzdh','like','A%')
|
|
|
- ->field('SUM(sczl_cl) as 产量, SUM(sczl_zcfp) as 制程废品, SUM(sczl_zccp) as 制程次品, SUM(sczl_来料少数) as 来料异常, SUM(sczl_装版工时) as 装版工时')
|
|
|
|
|
|
|
+ ->field('SUM(sczl_cl) as 产量, SUM(sczl_zcfp) as 制程废品, SUM(sczl_zccp) as 制程次品, SUM(sczl_来料少数) as 来料异常, SUM(sczl_装版工时) as 装版工时, SUM(sczl_保养工时) as 保养工时, SUM(sczl_打样工时) as 打样工时,SUM(sczl_异常停机工时) as 异常工时,SUM(sczl_异常工时1) as 异常补时工时,SUM(sczl_设备运行工时) as 通电工时,SUM(sczl_前工序废) as 前工序废')
|
|
|
->select();
|
|
->select();
|
|
|
$totalB = \db('设备_产量计酬')
|
|
$totalB = \db('设备_产量计酬')
|
|
|
->where($where)
|
|
->where($where)
|
|
|
->where('sczl_bzdh','like','B%')
|
|
->where('sczl_bzdh','like','B%')
|
|
|
- ->field('SUM(sczl_cl) as 产量, SUM(sczl_zcfp) as 制程废品, SUM(sczl_zccp) as 制程次品, SUM(sczl_来料少数) as 来料异常, SUM(sczl_装版工时) as 装版工时')
|
|
|
|
|
|
|
+ ->field('SUM(sczl_cl) as 产量, SUM(sczl_zcfp) as 制程废品, SUM(sczl_zccp) as 制程次品, SUM(sczl_来料少数) as 来料异常, SUM(sczl_装版工时) as 装版工时, SUM(sczl_保养工时) as 保养工时, SUM(sczl_打样工时) as 打样工时,SUM(sczl_异常停机工时) as 异常工时,SUM(sczl_异常工时1) as 异常补时工时,SUM(sczl_设备运行工时) as 通电工时,SUM(sczl_前工序废) as 前工序废')
|
|
|
->select();
|
|
->select();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|
|
|
$this->success('',[]);
|
|
$this->success('',[]);
|
|
@@ -186,6 +186,18 @@ class Facility extends Api
|
|
|
$list['来料异常B'] = $totalB[0]['来料异常'];
|
|
$list['来料异常B'] = $totalB[0]['来料异常'];
|
|
|
$list['装版工时A'] = $totalA[0]['装版工时'];
|
|
$list['装版工时A'] = $totalA[0]['装版工时'];
|
|
|
$list['装版工时B'] = $totalB[0]['装版工时'];
|
|
$list['装版工时B'] = $totalB[0]['装版工时'];
|
|
|
|
|
+ $list['保养工时A'] = $totalA[0]['保养工时'];
|
|
|
|
|
+ $list['保养工时B'] = $totalB[0]['保养工时'];
|
|
|
|
|
+ $list['打样工时A'] = $totalA[0]['打样工时'];
|
|
|
|
|
+ $list['打样工时B'] = $totalB[0]['打样工时'];
|
|
|
|
|
+ $list['异常工时A'] = $totalA[0]['异常工时'];
|
|
|
|
|
+ $list['异常工时B'] = $totalB[0]['异常工时'];
|
|
|
|
|
+ $list['异常补时工时A'] = $totalA[0]['异常补时工时'];
|
|
|
|
|
+ $list['异常补时工时B'] = $totalB[0]['异常补时工时'];
|
|
|
|
|
+ $list['通电工时A'] = $totalA[0]['通电工时'];
|
|
|
|
|
+ $list['通电工时B'] = $totalB[0]['通电工时'];
|
|
|
|
|
+ $list['前工序废A'] = $totalA[0]['前工序废'];
|
|
|
|
|
+ $list['前工序废B'] = $totalB[0]['前工序废'];
|
|
|
$this->success('成功',$list);
|
|
$this->success('成功',$list);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -359,7 +371,6 @@ class Facility extends Api
|
|
|
->group('a.Gy0_gdbh,a.Gy0_yjno,a.Gy0_gxh')
|
|
->group('a.Gy0_gdbh,a.Gy0_yjno,a.Gy0_gxh')
|
|
|
->order('a.Gy0_sj1')
|
|
->order('a.Gy0_sj1')
|
|
|
->select();
|
|
->select();
|
|
|
- halt($orderList);
|
|
|
|
|
if (!empty($orderList)){
|
|
if (!empty($orderList)){
|
|
|
$data = \db('设备_产量采集')->where('设备编号',$machine)->order('UniqId desc')->find();
|
|
$data = \db('设备_产量采集')->where('设备编号',$machine)->order('UniqId desc')->find();
|
|
|
foreach ($orderList as $key=>$value){
|
|
foreach ($orderList as $key=>$value){
|
|
@@ -759,9 +770,8 @@ class Facility extends Api
|
|
|
if (empty($param['start'])){
|
|
if (empty($param['start'])){
|
|
|
$startTime = date('Y-m-d 08:30:00',time());
|
|
$startTime = date('Y-m-d 08:30:00',time());
|
|
|
}else{
|
|
}else{
|
|
|
- $startTime = $param['start'];
|
|
|
|
|
|
|
+ $startTime = date('Y-m-d H:i:s',strtotime($param['start']));
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
if ($date<$startTime){
|
|
if ($date<$startTime){
|
|
|
$startTime = date('Y-m-d H:i:s',strtotime($startTime)-86400);
|
|
$startTime = date('Y-m-d H:i:s',strtotime($startTime)-86400);
|
|
|
}
|
|
}
|
|
@@ -769,7 +779,7 @@ class Facility extends Api
|
|
|
'工单编号' => $param['workOrder'],
|
|
'工单编号' => $param['workOrder'],
|
|
|
'开工时间' => $startTime,
|
|
'开工时间' => $startTime,
|
|
|
'类别' => '现场巡查记录',
|
|
'类别' => '现场巡查记录',
|
|
|
- '班组编号' => $param['team']
|
|
|
|
|
|
|
+ '班组编号' => ['like',substr($param['team'],0,1).'%']
|
|
|
];
|
|
];
|
|
|
$filed = 'rtrim(工单编号) as 工单编号,rtrim(印件号) as 印件号,rtrim(工序名称) as 工序名称,rtrim(流程单号) as 流程单号,
|
|
$filed = 'rtrim(工单编号) as 工单编号,rtrim(印件号) as 印件号,rtrim(工序名称) as 工序名称,rtrim(流程单号) as 流程单号,
|
|
|
rtrim(设备编号) as 设备编号,rtrim(班组编号) as 班组编号,rtrim(检验项目) as 现场管理人员,rtrim(检验备注) as 检验备注,
|
|
rtrim(设备编号) as 设备编号,rtrim(班组编号) as 班组编号,rtrim(检验项目) as 现场管理人员,rtrim(检验备注) as 检验备注,
|