fixed
This commit is contained in:
parent
3d249a63ae
commit
cdde963325
@ -1230,7 +1230,7 @@ class TaskLogic extends BaseLogic
|
||||
}
|
||||
}
|
||||
}
|
||||
// 下属小组服务公司有任务安排,也完成了任务
|
||||
// 镇农科公司负责人有任务安排,也完成了任务
|
||||
if ($isDone === 1 && $isTaskSchedule === 1) {
|
||||
// 做任务结算,分润
|
||||
(new TownShareProfit())->dealTaskSettlementMarketingDirector1($taskInfo, $townCompany, $taskSchedulePlan);
|
||||
@ -2612,12 +2612,13 @@ class TaskLogic extends BaseLogic
|
||||
if ($tempTask) {
|
||||
$plan = TaskSchedulingPlan::where(['id'=>$tempTask['scheduling_plan_id']])->find();
|
||||
if ($plan['is_pay'] == 1) {
|
||||
$extend = json_decode($tempTask['extend'], true);
|
||||
$extend = $tempTask['extend'];
|
||||
$targetAmount += $extend['transaction']['arr']['day_money'];
|
||||
$townTotalTradeAmount += $extend['transaction']['arr']['total_price'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 完成条件: 查镇所属小组服务公司当日实际完成金额总和+镇农科公司的资金池 > 查镇所属小组服务公司当日任务目标金额总和
|
||||
if($targetAmount != 0 && bcadd($townTransactionPool, $townTotalTradeAmount, 2) >= $targetAmount) {
|
||||
// 将余下金额放入镇交易池
|
||||
@ -2640,12 +2641,10 @@ class TaskLogic extends BaseLogic
|
||||
$taskTemplateInfo = $taskSchedulePlan['template_info'];
|
||||
$taskDayCount = $taskTemplateInfo['day_count']; // 任务累计进行天数
|
||||
$task = Task::where('id', $taskSchedulePlan['task_id'])->find();
|
||||
$stageDayOneAccumulative = $taskTemplateInfo['stage_day_one']; // 第一阶段累计天数
|
||||
$stageDayTwoAccumulative = intval(bcadd($taskTemplateInfo['stage_day_one'], $taskTemplateInfo['stage_day_two'])); // 第二阶段累计天数 第一+第二
|
||||
$townCompany = Company::where('id', $taskTemplateInfo['company_id'])->find(); // 镇农科公司
|
||||
$villageCompanyList = Company::where(['street' => $townCompany['street'], 'company_type'=> 17])->select()->toArray(); // 村管理公司
|
||||
|
||||
|
||||
dd($taskDayCount, $stageDayTwoAccumulative);
|
||||
// 当前任务进行天数 <= 第一+第二阶段天数 判定任务是否完成 结算 分润
|
||||
if($taskDayCount <= $stageDayTwoAccumulative) {
|
||||
// 小组服务公司总数
|
||||
|
Loading…
x
Reference in New Issue
Block a user