优化生成上游订单重复提醒

master
chenzhi 5 years ago
parent 6caf99e984
commit ce92602ca0

@ -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;

Loading…
Cancel
Save