|
@@ -219,7 +219,7 @@ class MountHours extends Api
|
|
|
->fetchSql(true)
|
|
->fetchSql(true)
|
|
|
->update(['coefficient' => $coefficient, 'leaderConfirm' => $leaderConfirm, 'leader' => $leader]);
|
|
->update(['coefficient' => $coefficient, 'leaderConfirm' => $leaderConfirm, 'leader' => $leader]);
|
|
|
$res = \db()->query($sql);
|
|
$res = \db()->query($sql);
|
|
|
- if ($res) {
|
|
|
|
|
|
|
+ if ($res !== false) {
|
|
|
$this->success('确认成功');
|
|
$this->success('确认成功');
|
|
|
}else{
|
|
}else{
|
|
|
$this->error('确认失败');
|
|
$this->error('确认失败');
|
|
@@ -243,17 +243,18 @@ class MountHours extends Api
|
|
|
if (empty($param)) {
|
|
if (empty($param)) {
|
|
|
$this->error('参数错误');
|
|
$this->error('参数错误');
|
|
|
}
|
|
}
|
|
|
|
|
+ $statisticsConfirm = date('Y-m-d H:i:s',time());
|
|
|
$sql = \db('设备_装版工时')
|
|
$sql = \db('设备_装版工时')
|
|
|
->where('Uniqid', $param['Uniqid'])
|
|
->where('Uniqid', $param['Uniqid'])
|
|
|
->fetchSql(true)
|
|
->fetchSql(true)
|
|
|
- ->update(['装版补产工时' => $param['装版补产工时'], 'statisticsConfirm' => $param['statisticsConfirm'], 'statistics' => $param['statistics']]);
|
|
|
|
|
|
|
+ ->update(['装版补产工时' => $param['装版补产工时'], 'statisticsConfirm' => $statisticsConfirm, 'statistics' => $param['statistics']]);
|
|
|
$res = \db()->query($sql);
|
|
$res = \db()->query($sql);
|
|
|
$clSql = \db('设备_产量计酬')
|
|
$clSql = \db('设备_产量计酬')
|
|
|
->where('UniqId', $param['yieldUid'])
|
|
->where('UniqId', $param['yieldUid'])
|
|
|
->fetchSql(true)
|
|
->fetchSql(true)
|
|
|
->update(['sczl_装版工时' => $param['装版补产工时']]);
|
|
->update(['sczl_装版工时' => $param['装版补产工时']]);
|
|
|
$clRes = \db()->query($clSql);
|
|
$clRes = \db()->query($clSql);
|
|
|
- if ($res || $clRes) {
|
|
|
|
|
|
|
+ if ($res !== false && $clRes !== false) {
|
|
|
$this->success('确认成功');
|
|
$this->success('确认成功');
|
|
|
}else{
|
|
}else{
|
|
|
$this->error('确认失败');
|
|
$this->error('确认失败');
|