|
|
@@ -221,7 +221,10 @@ class Facility extends Api
|
|
|
$machine = $params['machine'];
|
|
|
$machineCode = \db('dic_lzde')->where('适用机型',$machine)->value('sys_bh');
|
|
|
$data = \db('设备_产量采集')->where('设备编号',$machine)->order('UniqId desc')->find();
|
|
|
- if (isset($data['工单编号'])){
|
|
|
+ if (empty($data)){
|
|
|
+ $this->success('未找到生产订单');
|
|
|
+ }
|
|
|
+ if (rtrim($data['工单编号']) === '' || rtrim($data['工单编号']) === null ){
|
|
|
$this->success('未找到生产订单');
|
|
|
}
|
|
|
$endTime = \db('工单_工艺资料')
|
|
|
@@ -1505,9 +1508,12 @@ class Facility extends Api
|
|
|
$this->error('非法请求');
|
|
|
}
|
|
|
$params = Request::instance()->post();
|
|
|
- if (!isset($params['machine']) || empty($params['machine'])) {
|
|
|
+ if (!isset($params['machine']) || empty($params['machine'] )) {
|
|
|
$this->error('参数不能为空');
|
|
|
}
|
|
|
+ if (empty($params['team_id']) || empty($params['sczl_bzdh'])){
|
|
|
+ $this->error('请先选择班组成员');
|
|
|
+ }
|
|
|
$machine = $params['machine'] . '#';
|
|
|
$data = [];
|
|
|
$lastData = \db('设备_产量采集')
|