Merge pull request '4.22号功能提交' (#277) from feature/add_item into release

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/277
master
郑永星 4 years ago
commit d082a7dc98

@ -376,13 +376,14 @@ class CompanyStatementSetController extends Controller {
if($type < 2){ if($type < 2){
//非补点奖罚 //非补点奖罚
$rrmap = array( $rrmap = array(
"confirm_time" => ['between', [$begintime,$endtime]], "d.confirm_time" => ['between', [$begintime,$endtime]],
"company_type"=>1, "company_type"=>1,
"company_id"=>$add_data['company_id'], "company_id"=>$add_data['company_id'],
"settlement_type"=>2, "settlement_type"=>2,
"is_verify"=>1, "is_verify"=>1,
); );
$rfres = M("RewardDetail","tab_") $rfres = M("RewardDetail","tab_")
->alias("d")
->field(" ->field("
IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward_count, IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward_count,
IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine_count IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine_count
@ -891,13 +892,14 @@ class CompanyStatementSetController extends Controller {
if($type < 2){ if($type < 2){
//非补点计算奖罚 //非补点计算奖罚
$rrmap = array( $rrmap = array(
"confirm_time" => ['between', [$begintime,$endtime]], "d.confirm_time" => ['between', [$begintime,$endtime]],
"company_type"=>2, "company_type"=>2,
"company_id"=>$add_data['company_id'], "company_id"=>$add_data['company_id'],
"settlement_type"=>2, "settlement_type"=>2,
"is_verify"=>1, "is_verify"=>1,
); );
$rfres = M("RewardDetail","tab_") $rfres = M("RewardDetail","tab_")
->alias("d")
->field(" ->field("
IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward_count, IFNULL(SUM(CASE WHEN type = 1 THEN amount ELSE 0 END),0) as reward_count,
IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine_count IFNULL(SUM(CASE WHEN type = 2 THEN amount ELSE 0 END),0) as fine_count

Loading…
Cancel
Save