Commit 8fc2711d authored by zhangsen's avatar zhangsen

fix-维保推送消息

parent f36eab9e
......@@ -338,7 +338,7 @@ public class MaintenanceCompanyController extends BaseController {
@TycloudOperation(needAuth = true, ApiLevel = UserType.AGENCY)
@GetMapping(value = "/get/amosOrgIdsByIds")
@ApiOperation(httpMethod = "GET", value = "根据主键查orgIds", notes = "根据主键查orgIds")
public ResponseModel<List<String>> getAmosOrgIdsByIds(@RequestParam(value = "list", required = true) List<String> list) {
public ResponseModel<List<String>> getAmosOrgIdsByIdsgetAmosOrgIdsByIds(@RequestParam(value = "list", required = true) List<String> list) {
return ResponseHelper.buildResponse(maintenanceCompanyServiceImpl.getAmosOrgIdsByIds(list));
}
......
......@@ -17,7 +17,7 @@ import java.util.Map;
@RuleFact(value = "维保任务",project = "消息规则")
public class PlanRo implements Serializable {
private static final long serialVersionUID = 1070080521549842475L;
private static final long serialVersionUID = 1779427739908876854L;
@Label("任务名称")
private String name;
......
......@@ -503,6 +503,7 @@ public class PlanTaskServiceImpl implements IPlanTaskService {
log.error(e.getMessage(), e);
}
if (CollectionUtils.isNotEmpty(extraUserIds)) {
log.info("接收人ID:{}", extraUserIds);
rulePlanService.addPlanRule(plan, null, RuleTypeEnum.任务型计划生成, extraUserIds);
}
}
......
......@@ -7,6 +7,8 @@ import com.yeejoin.amos.maintenance.business.dto.PlanRo;
import com.yeejoin.amos.maintenance.business.feign.JCSFeignClient;
import com.yeejoin.amos.maintenance.business.util.DateUtil;
import com.yeejoin.amos.maintenance.dao.entity.Plan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -18,10 +20,11 @@ import java.util.List;
import java.util.Map;
@Service
public class RulePlanService {
private final String packageId = "消息/addMaintenance";
private final String msgType = "maintenance";
private final Logger log = LoggerFactory.getLogger(RulePlanService.class);
@Autowired
private RuleTrigger ruleTrigger;
@Autowired
......@@ -30,6 +33,7 @@ public class RulePlanService {
public Boolean addPlanRule(Plan plan, List<String> userIds, RuleTypeEnum ruleType, List<String> extraUserIds) throws Exception {
PlanRo planRo = buildPlanRo(plan, userIds, ruleType, extraUserIds);
//触发规则
log.info("消防维保推规则触发消息入参:{}, packageId:{} ", planRo, packageId);
ruleTrigger.publish(planRo, packageId, new String[0]);
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment