Browse Source

Merge branch 'master' of https://git.7in6.com/liuhairui/mes-dc-server-api

zck 1 month ago
parent
commit
91d85cc2ce

+ 5 - 3
application/api/controller/ReportingWork.php

@@ -108,6 +108,7 @@ class ReportingWork extends Api
                 ->where('work_order', $params['workorder'])
                 ->where('big_process', $params['majorprocess'])
                 ->where('del_rq', null)
+                ->where('status', 0)
                 ->field('process_code as 工艺编号,process_name as 工艺名称,standard_hour as 标准工时,
                 standard_score as 标准工分,coefficient as 系数,remark as 备注')
                 ->order('process_code')
@@ -147,6 +148,7 @@ class ReportingWork extends Api
             ->where('part_code', $params['part_code'])
             ->where('big_process', '车缝')
             ->where('del_rq', null)
+            ->where('status', 0)
             ->field('process_code as 工艺编号,process_name as 工艺名称,standard_hour as 标准工时,
             standard_score as 标准工分,coefficient as 系数,remark as 备注')
             ->order('process_code')
@@ -221,9 +223,9 @@ class ReportingWork extends Api
             if (empty($item['process_name'])) {
                 $this->error('第' . $rowNo . '条工艺名称不能为空');
             }
-            if (!isset($item['standard_hour']) || $item['standard_hour'] === '') {
-                $this->error('第' . $rowNo . '条标准工时不能为空');
-            }
+            // if (!isset($item['standard_hour']) || $item['standard_hour'] === '') {
+            //     $this->error('第' . $rowNo . '条标准工时不能为空');
+            // }
             if (!isset($item['standard_score']) || $item['standard_score'] === '') {
                 $this->error('第' . $rowNo . '条标准工分不能为空');
             }

+ 2 - 36
application/api/controller/WorkOrderProcess.php

@@ -970,40 +970,6 @@ class WorkOrderProcess extends Api
     }
 
 
-
-    /**
-     * 获取工单信息和工单制造工分
-     *  @param workorder 工单编号
-     *  @return array
-     *  @throws \think\db\exception\DataNotFoundException
-     *  @throws \think\db\exception\ModelNotFoundException
-     *  @throws \think\exception\DbException
-     */
-    public function getWorkOrderInfo()
-    {
-        if (!$this->request->isGet()) {
-            $this->error('请求方法错误');
-        }
-        $params = $this->request->param();
-        if (empty($params['workorder'])) {
-            $this->error('工单编号不能为空');
-        }
-        $where = [
-            '订单编号' => $params['workorder'],
-            'Mod_rq' => null,
-        ];
-        $workOrderInfo = Db::table('工单_基本资料')
-            ->where($where)
-            ->field('订单编号,客户编号,生产款号,款式,落货日期,审核日期,接单日期,审核,订单数量,计划制造工分,Uniqid')
-            ->find();
-        if (empty($workOrderInfo)) {
-            $this->error('工单不存在');
-        }
-        $this->success('成功', $workOrderInfo);
-        
-    }
-
-
     /**
      * 获取工单工艺信息
      *  @param workorder 工单编号
@@ -1167,8 +1133,8 @@ class WorkOrderProcess extends Api
         if (empty($params['id'])) {
             $this->error('工艺ID不能为空');
         }
-        if (empty($params['number']) || intval($params['number']) < 2) {
-            $this->error('拆分工序数量不能小于2');
+        if (empty($params['number']) ) {
+            $this->error('拆分工序数量不能为空');
         }
         if (empty($params['sys_id'])) {
             $this->error('操作人不能为空');