yangys
2024-04-04 ed4a5236bab800094be4a8378f5098eebe3de6ac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package com.qianwen.smartman.modules.notify.business;
 
import com.qianwen.smartman.common.constant.NotifyConstant;
import com.qianwen.core.log.exception.ServiceException;
import com.qianwen.core.tool.utils.Func;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
@Component
/* loaded from: blade-api.jar:BOOT-INF/classes/org/springblade/modules/notify/business/BusinessSendFactory.class */
public class BusinessSendFactory {
    @Autowired
    private MaintenanceSend maintainPlanBusinessSend;
    @Autowired
    private MaintenanceWarningSend maintenanceWarningSend;
    @Autowired
    private MaintainOverdueBusinessSend maintainOverdueBusinessSend;
    @Autowired
    private RepairApplySend repairApplySend;
    @Autowired
    private AndonTakeOverSend andonTakeOverSend;
 
    public BusinessSend getBusinessSend(String businessKey) {
        if (Func.equals(businessKey, NotifyConstant.MAINTENANCE)) {
            return this.maintainPlanBusinessSend;
        }
        if (Func.equals(businessKey, NotifyConstant.MAINTENANCE_WARNING)) {
            return this.maintenanceWarningSend;
        }
        if (Func.equals(businessKey, NotifyConstant.MAINTAIN_OVERDUE)) {
            return this.maintainOverdueBusinessSend;
        }
        if (Func.equals(businessKey, NotifyConstant.MAINTENANCE_APPLY)) {
            return this.repairApplySend;
        }
        if (Func.equals(businessKey, NotifyConstant.ANDON_TAKE_OVER)) {
            return this.andonTakeOverSend;
        }
        throw new ServiceException("业务通知,该业务不存在");
    }
}