|
@@ -100,8 +100,8 @@ 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)->select();
|
|
|
- $totalA = \db('设备_产量计酬')->where($where)->where('sczl_bzdh','A班')->field('SUM(sczl_cl) as 产量')->select();
|
|
|
|
|
- $totalB = \db('设备_产量计酬')->where($where)->where('sczl_bzdh','B班')->field('SUM(sczl_cl) as 产量')->select();
|
|
|
|
|
|
|
+ $totalA = \db('设备_产量计酬')->where($where)->where('sczl_bzdh','like','A%')->field('SUM(sczl_cl) as 产量')->select();
|
|
|
|
|
+ $totalB = \db('设备_产量计酬')->where($where)->where('sczl_bzdh','like','B%')->field('SUM(sczl_cl) as 产量')->select();
|
|
|
if (empty($list)){
|
|
if (empty($list)){
|
|
|
$this->success('',[]);
|
|
$this->success('',[]);
|
|
|
}
|
|
}
|
|
@@ -500,18 +500,11 @@ class Facility extends Api
|
|
|
$machine = input('machine');
|
|
$machine = input('machine');
|
|
|
$workOrder = input('Gd_gdbh');
|
|
$workOrder = input('Gd_gdbh');
|
|
|
$team = substr(input('team'),0,1);
|
|
$team = substr(input('team'),0,1);
|
|
|
- if (empty($machine) || empty($workOrder) || empty($team)){
|
|
|
|
|
|
|
+ if (empty($machine) || empty($team)){
|
|
|
$this->success('');
|
|
$this->success('');
|
|
|
}
|
|
}
|
|
|
- $newTime = date('Y-m-d H:i:s',time());
|
|
|
|
|
- if ($newTime < date('Y-m-d 08:30:00')) {
|
|
|
|
|
- $sczlTime = date('Y-m-d 00:00:00', time() - 86400);
|
|
|
|
|
- }else{
|
|
|
|
|
- $sczlTime = date('Y-m-d 00:00:00');
|
|
|
|
|
- }
|
|
|
|
|
- $name = \db('工单_基本资料')->where('Gd_gdbh',$workOrder)->field('rtrim(Gd_cpmc) as productName')->find();
|
|
|
|
|
|
|
+ $sczlTime = date('Y-m-d 00:00:00',time());
|
|
|
$where = [
|
|
$where = [
|
|
|
- 'sczl_gdbh' => $workOrder,
|
|
|
|
|
'sczl_jtbh' => $machine,
|
|
'sczl_jtbh' => $machine,
|
|
|
'sczl_bzdh' => ['like',$team.'%'],
|
|
'sczl_bzdh' => ['like',$team.'%'],
|
|
|
'sczl_rq' => $sczlTime,
|
|
'sczl_rq' => $sczlTime,
|
|
@@ -526,6 +519,7 @@ class Facility extends Api
|
|
|
$this->success('');
|
|
$this->success('');
|
|
|
}
|
|
}
|
|
|
foreach ($list as $k=>$v){
|
|
foreach ($list as $k=>$v){
|
|
|
|
|
+ $name = \db('工单_基本资料')->where('Gd_gdbh',$v['工单编号'])->where('行号',$v['yjno'])->field('rtrim(Gd_cpmc) as productName')->find();
|
|
|
if ($v['yjno']<10){
|
|
if ($v['yjno']<10){
|
|
|
$list[$k]['yjno'] = '0'.$v['yjno'];
|
|
$list[$k]['yjno'] = '0'.$v['yjno'];
|
|
|
}
|
|
}
|