|
|
@@ -1048,17 +1048,21 @@ class WorkOrder extends Api
|
|
|
'yj_ls' =>$param['ls'],
|
|
|
'yj_desc' =>$param['desc'],
|
|
|
];
|
|
|
- if ((int)$data['yj_平张投料'] > 0 ){
|
|
|
+
|
|
|
+ $UniqId = $param['Uniqid'];
|
|
|
+ $sql = \db('工单_印件资料')->where('Uniqid',$UniqId)->fetchSql(true)->update($data);
|
|
|
+ $res = Db::query($sql);
|
|
|
+ $process = \db('工单_工艺资料')
|
|
|
+ ->where('Gy0_gdbh',$data['Yj_Gdbh'])
|
|
|
+ ->where('Gy0_yjno',$data['yj_Yjno'])
|
|
|
+ ->select();
|
|
|
+ if ((int)$data['yj_平张投料'] > 0 && !empty($process)){
|
|
|
//重新分配工序计划产量
|
|
|
$result = $this->PlannedProcessYield($data['Yj_Gdbh'],$data['yj_Yjno'],0,$data['yj_平张投料']);
|
|
|
if ($result === false){
|
|
|
$this->success('修改工序产量失败');
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- $UniqId = $param['Uniqid'];
|
|
|
- $sql = \db('工单_印件资料')->where('Uniqid',$UniqId)->fetchSql(true)->update($data);
|
|
|
- $res = Db::query($sql);
|
|
|
if ($res !== false){
|
|
|
$this->success('成功');
|
|
|
}else{
|