diff --git a/app/adminapi/controller/approve/ApproveController.php b/app/adminapi/controller/approve/ApproveController.php index 0e1161c35..65d0f05ac 100644 --- a/app/adminapi/controller/approve/ApproveController.php +++ b/app/adminapi/controller/approve/ApproveController.php @@ -78,6 +78,17 @@ class ApproveController extends BaseAdminController ->toArray(); TaskLogic::dealVillageTask6($taskSchedulePlan, $approve); } + + if ($approve->type == Approve::APPROVE_TYPE_6) { + $taskSchedulePlan = TaskSchedulingPlan::where('la_task_scheduling_plan.id', $task['scheduling_plan_id']) + ->where('is_pay',0) + ->with(['template_info']) + ->withJoin(['scheduling'], 'left') + ->where('scheduling.company_type', 17) + ->find() + ->toArray(); + TaskLogic::dealVillageTask8($taskSchedulePlan); + } } // 拒绝 diff --git a/app/common/logic/task/TaskLogic.php b/app/common/logic/task/TaskLogic.php index 9477b6c38..c314f30fe 100644 --- a/app/common/logic/task/TaskLogic.php +++ b/app/common/logic/task/TaskLogic.php @@ -942,7 +942,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'mer_intention_id' => $merIntentionId, - 'goods_id' => $directorGoodsId + 'goods_id' => $directorGoodsId, + 'type'=>200 ]; $result1 = ShopRequestLogic::getPurchaseAmount($param); // todo 返回字段要对接 @@ -1096,7 +1097,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'mer_intention_id' => $merIntentionId, - 'goods_id' => $directorGoodsId + 'goods_id' => $directorGoodsId, + 'type'=>300 ]; $result1 = ShopRequestLogic::getTradeAmount($param); $tradeAmount = $result1['trade_amount']; // todo 返回字段要对接 @@ -1424,7 +1426,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'responsible_area' => $townCompany['responsible_area'], // 镇农科管理区域 - 'goods_id' => $templateInfo['extend']['goods_id'] + 'goods_id' => $templateInfo['extend']['goods_id'], + 'type'=>200 ]; // todo 对接接口实际返回参数 $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); @@ -1457,7 +1460,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'responsible_area' => $townCompany['responsible_area'], // 镇农科管理区域 - 'goods_id' => $templateInfo['extend']['goods_id'] + 'goods_id' => $templateInfo['extend']['goods_id'], + 'type'=>200 ]; // todo 对接接口实际返回参数 $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); @@ -1553,7 +1557,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'responsible_area' => $townCompany['responsible_area'], // 镇农科管理区域 - 'goods_id' => $templateInfo['extend']['goods_id'] + 'goods_id' => $templateInfo['extend']['goods_id'], + 'type'=>200 ]; // todo 对接接口实际返回参数 $result = ShopRequestLogic::getGeneralMerchantPurchaseAmount($param); @@ -1586,7 +1591,8 @@ class TaskLogic extends BaseLogic 'start_time' => $startTime, 'end_time' => $endTime, 'responsible_area' => $townCompany['responsible_area'], // 镇农科管理区域 - 'goods_id' => $templateInfo['extend']['goods_id'] + 'goods_id' => $templateInfo['extend']['goods_id'], + 'type'=>300 ]; // todo 对接接口实际返回参数 $result = ShopRequestLogic::getGeneralMerchantTradeAmount($param); @@ -2204,6 +2210,11 @@ class TaskLogic extends BaseLogic break; // 日常管理及其他临时任务 case 'village_task_type_8': + // 如果当天做了临时任务的情况下,需要通过审批才结算 + $task = Task::where('id', $taskSchedulePlan['task_id'])->find(); + if(isset($task['extend']['is_commit']) && $task['extend']['is_commit'] == 1) { + return true; + } self::dealVillageTask8($taskSchedulePlan); break; default: @@ -2565,7 +2576,6 @@ class TaskLogic extends BaseLogic $taskTemplateInfo = $taskSchedulePlan['template_info']; $villageCompany = Company::where(['id' => $taskTemplateInfo['company_id']])->find(); $task = Task::where('id', $taskSchedulePlan['task_id'])->find(); - $task['money'] = $taskTemplateInfo['money_three']; (new VillageShareProfit())->dealVillageTaskSettlement8($task, $villageCompany, $taskSchedulePlan); } diff --git a/app/common/model/Approve.php b/app/common/model/Approve.php index 0ff18baa0..b7cd1d3ec 100644 --- a/app/common/model/Approve.php +++ b/app/common/model/Approve.php @@ -17,6 +17,7 @@ class Approve extends BaseModel const APPROVE_TYPE_4 = 4; // 镇农科市场部长数字农贸宣传业务、加工业务的建设和招商任务 const APPROVE_TYPE_5 = 5; // 村联络员任务-信息平台铺设工作任务 + const APPROVE_TYPE_6 = 6; // 村联络员任务-日常管理及其他临时任务 public function task() {