diff --git a/app/chengji/controller/Index.php b/app/chengji/controller/Index.php index 4aac676c..bcaa743d 100644 --- a/app/chengji/controller/Index.php +++ b/app/chengji/controller/Index.php @@ -58,8 +58,8 @@ class Index extends BaseController // 如果存在则更新记录 if($cjone->defen != $list['defen'] || $cjone->delete_time > 1) { + $cjone->restore(); $cjone->defen = $list['defen']; - $cjone->delete_time = null; $data = $cjone->save(); } }else{ @@ -269,8 +269,8 @@ class Index extends BaseController // 如果存在则更新记录 if($cjone->defen != $defen || $cjone->delete_time > 1) { + $cjone->restore(); $cjone->defen = $defen; - $cjone->delete_time = null; $cjone->save(); } }else{ diff --git a/app/renshi/controller/Student.php b/app/renshi/controller/Student.php index 370f97be..3cd8c2b6 100644 --- a/app/renshi/controller/Student.php +++ b/app/renshi/controller/Student.php @@ -395,6 +395,7 @@ class Student extends BaseController // 使用上传的表格进行校对,表格中不存在的数据删除 public function createAll() { + // 设置页面标题 $list['set'] = array( 'webtitle'=>'校对学生名单', @@ -506,8 +507,8 @@ class Student extends BaseController ->field('id,xingming,banji,school,delete_time') ->find(); + $oneStu->restore(); $oneStu->xingming = $myStuList[$key-1][1]; - $oneStu->delete_time = null; $oneStu->school = $list['school']; $oneStu->banji = $bjid; $oneStu->save();