|
...
|
...
|
@@ -9,6 +9,7 @@ import com.lframework.starter.bpm.service.FlowTaskWrapperService; |
|
9
|
9
|
import com.lframework.starter.web.core.components.security.SecurityUtil;
|
|
10
|
10
|
import com.lframework.starter.web.core.utils.*;
|
|
11
|
11
|
import com.lframework.starter.web.inner.service.system.SysUserRoleService;
|
|
|
12
|
+import com.lframework.xingyun.basedata.entity.Customer;
|
|
12
|
13
|
import com.lframework.xingyun.basedata.entity.Workshop;
|
|
13
|
14
|
import com.lframework.xingyun.basedata.service.customer.CustomerService;
|
|
14
|
15
|
import com.lframework.xingyun.basedata.service.workshop.WorkshopService;
|
|
...
|
...
|
@@ -59,6 +60,8 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe |
|
59
|
60
|
private MessageHandler messageHandler;
|
|
60
|
61
|
@Resource
|
|
61
|
62
|
private SysUserRoleService sysUserRoleService;
|
|
|
63
|
+ @Resource
|
|
|
64
|
+ private CustomerService customerService;
|
|
62
|
65
|
|
|
63
|
66
|
|
|
64
|
67
|
@Override
|
|
...
|
...
|
@@ -349,7 +352,7 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe |
|
349
|
352
|
}
|
|
350
|
353
|
|
|
351
|
354
|
@Override
|
|
352
|
|
- public void sendMsg(String id) {
|
|
|
355
|
+ public void sendMsg(String id, String bizKey) {
|
|
353
|
356
|
CustomerDevelopPlan plan = findById(id);
|
|
354
|
357
|
if (plan == null) {
|
|
355
|
358
|
log.error("=================== customerDevelopApprovedNotice plan is null!");
|
|
...
|
...
|
@@ -370,12 +373,59 @@ public class CustomerDevelopPlanServiceImpl extends BaseMpServiceImpl<CustomerDe |
|
370
|
373
|
}
|
|
371
|
374
|
roleCodeList.clear();
|
|
372
|
375
|
// 营销部分管
|
|
373
|
|
- roleCodeList.add("ssyxbfg");
|
|
|
376
|
+ roleCodeList.add("yxbfg");
|
|
374
|
377
|
// 市场科统计员
|
|
375
|
378
|
roleCodeList.add("scktjy");
|
|
376
|
379
|
// 运作科主管
|
|
377
|
380
|
roleCodeList.add("yzkzg");
|
|
|
381
|
+ // 获取厂房信息
|
|
|
382
|
+ Workshop workshop = workshopService.findById(plan.getWorkshopId());
|
|
|
383
|
+ String workshopName = workshop.getName();
|
|
|
384
|
+ if ("一分厂".equals(workshopName)) {
|
|
|
385
|
+ // 市场科主管
|
|
|
386
|
+ roleCodeList.add("yfcsckzg");
|
|
|
387
|
+ // 经营办主管
|
|
|
388
|
+ roleCodeList.add("yfcjybzg");
|
|
|
389
|
+ // 生产经理
|
|
|
390
|
+ roleCodeList.add("yfcscjl");
|
|
|
391
|
+ // 品质经理
|
|
|
392
|
+ roleCodeList.add("yfcpzjl");
|
|
|
393
|
+ } else if ("二分厂".equals(workshopName)) {
|
|
|
394
|
+ // 市场科主管
|
|
|
395
|
+ roleCodeList.add("efcsckzg");
|
|
|
396
|
+ // 经营办主管
|
|
|
397
|
+ roleCodeList.add("efcjybzg");
|
|
|
398
|
+ // 生产经理
|
|
|
399
|
+ roleCodeList.add("efcscjl");
|
|
|
400
|
+ // 品质经理
|
|
|
401
|
+ roleCodeList.add("efcpzjl");
|
|
|
402
|
+ } else if ("三分厂".equals(workshopName)) {
|
|
|
403
|
+ // 市场科主管
|
|
|
404
|
+ roleCodeList.add("sfcsckzg");
|
|
|
405
|
+ // 经营办主管
|
|
|
406
|
+ roleCodeList.add("sfcjybzg");
|
|
|
407
|
+ // 生产经理
|
|
|
408
|
+ roleCodeList.add("sfcscjl");
|
|
|
409
|
+ // 品质经理
|
|
|
410
|
+ roleCodeList.add("sfcpzjl");
|
|
|
411
|
+ } else if ("四分厂".equals(workshopName) || "紫铜厂".equals(workshopName)) {
|
|
|
412
|
+ // 市场科主管
|
|
|
413
|
+ roleCodeList.add("ztcsckzg");
|
|
|
414
|
+ // 经营办主管
|
|
|
415
|
+ roleCodeList.add("ztcjybzg");
|
|
|
416
|
+ // 生产经理
|
|
|
417
|
+ roleCodeList.add("ztcscjl");
|
|
|
418
|
+ // 品质经理
|
|
|
419
|
+ roleCodeList.add("ztcpzjl");
|
|
|
420
|
+ }
|
|
|
421
|
+ userIds = sysUserRoleService.listUserIdByRoleCodes(roleCodeList);
|
|
|
422
|
+ if (CollectionUtils.isNotEmpty(userIds)) {
|
|
|
423
|
+ receiveUserIds.addAll(userIds);
|
|
|
424
|
+ }
|
|
|
425
|
+ // 获取客户信息
|
|
|
426
|
+ Customer customer = customerService.findById(plan.getCustomerId());
|
|
378
|
427
|
|
|
379
|
|
- messageHandler.sendMsg(receiveUserIds, "", "", "", null);
|
|
|
428
|
+ messageHandler.sendMsg(receiveUserIds, customer.getName() + "开发审核通过消息通知测试"
|
|
|
429
|
+ , customer.getName() +"开发审核通过消息通知测试", bizKey, null);
|
|
380
|
430
|
}
|
|
381
|
431
|
} |
...
|
...
|
|