| | |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.ReportReqVo; |
| | | import com.smartor.domain.DingTalkReqVo; |
| | | import com.smartor.service.DingTalkService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import com.ruoyi.system.mapper.EquipmentinfoMapper; |
| | |
| | | public class EquipmentinfoServiceImpl implements IEquipmentinfoService { |
| | | @Autowired |
| | | private EquipmentinfoMapper equipmentinfoMapper; |
| | | |
| | | @Autowired |
| | | private DingTalkService dingTalkService; |
| | | |
| | | |
| | | /** |
| | | * 查询【请填写功能名称】 |
| | |
| | | public int deleteEquipmentinfoById(Long id) { |
| | | return equipmentinfoMapper.deleteEquipmentinfoById(id); |
| | | } |
| | | |
| | | @Override |
| | | public Boolean reportContent(ReportReqVo reportReqVo) { |
| | | Boolean aBoolean = false; |
| | | //1. 将上报的问题存库 |
| | | |
| | | |
| | | //2.判断处理人的工号是否为空,如果不为空,获取用户的的联系方式 |
| | | if (StringUtils.isNotEmpty(reportReqVo.getDealPersionNO())) { |
| | | |
| | | //3.如何处理人不为空,根据通知方式,调用对应的接口,将上报问题发出 |
| | | if (reportReqVo.getNoticeWay() == "钉钉") { |
| | | //调用钉钉接口,进行消息发送 |
| | | } else if (reportReqVo.getNoticeWay() == "微信") { |
| | | //需要企业微信,后期再做 |
| | | } else if (reportReqVo.getNoticeWay() == "电话") { |
| | | //调用电话的接口 |
| | | } |
| | | } |
| | | |
| | | //4.获取处理部门,调用钉钉接口,将上报问题发出 |
| | | if (StringUtils.isNotEmpty(reportReqVo.getDealDept())) { |
| | | DingTalkReqVo dingTalkReqVo = new DingTalkReqVo(); |
| | | //设置发送内容 |
| | | dingTalkReqVo.setContents(null); |
| | | dingTalkReqVo.setDeptId(reportReqVo.getDealDeptID()); |
| | | dingTalkReqVo.setUserId(reportReqVo.getDealPersionDingNO()); |
| | | aBoolean = dingTalkService.sendNotification(dingTalkReqVo); |
| | | } |
| | | |
| | | |
| | | // 5将工作流推至下一节点 |
| | | |
| | | //返回结果 |
| | | return aBoolean; |
| | | } |
| | | } |