|
|
@@ -180,7 +180,7 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- //供货商采购入库通知相关人员 ssh 20240511
|
|
|
+ //供货商采购确认通知相关人员 ssh 20240511
|
|
|
public static function ghsCgInform($shop, $cg)
|
|
|
{
|
|
|
$orderSn = $cg->orderSn ?? '';
|
|
|
@@ -226,6 +226,52 @@ class WxMessageClass extends BaseClass
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ //供货商采购入库成功通知相关人员 ssh 20240511
|
|
|
+ public static function ghsCgEntryInform($shop, $cg)
|
|
|
+ {
|
|
|
+ //入库商品 入库数量 入库时间 客户名称 合同编号
|
|
|
+ $orderSn = $cg->orderSn ?? '';
|
|
|
+ $ptStyle = $shop->ptStyle;
|
|
|
+ $ghsName = $cg->ghsName ?? '';
|
|
|
+ $actPrice = $cg->actPrice ?? 0;
|
|
|
+ $entryTime = $cg->entryTime ?? '';
|
|
|
+ $wxBase = WxOpenClass::getWxBase();
|
|
|
+ $wx = $wxBase[$ptStyle] ?? [];
|
|
|
+ $message = self::getAllByCondition(['ptStyle' => $ptStyle], null, '*', 'shortTemplateId');
|
|
|
+ $shortTempId = 'ZHH202405111701';
|
|
|
+ $tempId = isset($message[$shortTempId]['templateId']) ? $message[$shortTempId]['templateId'] : '';
|
|
|
+ if (empty($tempId)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ $adminList = ShopAdminClass::getRemainAdmin($shop);
|
|
|
+ if (empty($adminList)) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ foreach ($adminList as $admin) {
|
|
|
+ $openId = isset($admin['openId']) ? $admin['openId'] : '';
|
|
|
+ if ($ptStyle == dict::getDict('ptStyle', 'ghs')) {
|
|
|
+ $openId = isset($admin['ghsOpenId']) ? $admin['ghsOpenId'] : '';
|
|
|
+ }
|
|
|
+ if (!empty($openId)) {
|
|
|
+ $data = [
|
|
|
+ "touser" => $openId,
|
|
|
+ "template_id" => $tempId,
|
|
|
+ "url" => Yii::$app->params['ghsDomain'],
|
|
|
+ "data" => [
|
|
|
+ "thing5" => ["value" => $ghsName],
|
|
|
+ "character_string4" => ["value" => $orderSn],
|
|
|
+ "time3" => ["value" => $entryTime],
|
|
|
+ "character_string2" => ["value" => '20 ' . $actPrice],
|
|
|
+ "thing1" => ["value" => '花材'],
|
|
|
+ ]
|
|
|
+ ];
|
|
|
+ $data['miniprogram']['appid'] = $wx['miniAppId'];
|
|
|
+ $data['miniprogram']['pagepath'] = 'pagesPurchase/info?orderSn=' . $orderSn;
|
|
|
+ wxUtil::sendTaskInform($data, $wx, $ptStyle);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
//客户结清账单提醒 ssh 20240512
|
|
|
public static function customHasClearToGhsInform($shop, $clearInfo, $custom)
|
|
|
{
|