diff --git a/Application/Admin/Controller/StatementController.class.php b/Application/Admin/Controller/StatementController.class.php index 6a6b28989..66f698e1a 100644 --- a/Application/Admin/Controller/StatementController.class.php +++ b/Application/Admin/Controller/StatementController.class.php @@ -104,7 +104,7 @@ class StatementController extends ThinkController "statement_end_time"=>array("EGT",strtotime($_REQUEST['time_start'])), "company_id"=>$CompanyId ); - $bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); + $bres = $Statement->field("id,statement_begin_time,statement_end_time")->where($checkmap)->find(); if($bres){ $repart=true; $begin = $_REQUEST['time_start']; @@ -122,6 +122,9 @@ class StatementController extends ThinkController "statement_end_time"=>array("EGT",strtotime($_REQUEST['time_end'])), "company_id"=>$CompanyId ); + if($repart){ + $checkmap["id"]=array("NEQ",$bres["id"]); + } $bres = $Statement->field("statement_begin_time,statement_end_time")->where($checkmap)->find(); if($bres){ $repart=true;