| | |
| | | import me.zhengjie.modules.approval.service.mapstruct.TemplateControlMapper; |
| | | import me.zhengjie.modules.approval.service.mapstruct.TemplateMapper; |
| | | import me.zhengjie.modules.constant.Constant; |
| | | import me.zhengjie.modules.quartz.service.impl.WeComServiceImpl; |
| | | import me.zhengjie.modules.system.domain.Dict; |
| | | import me.zhengjie.modules.system.domain.DictDetail; |
| | | import me.zhengjie.modules.system.repository.DictRepository; |
| | |
| | | private final DictService dictService; |
| | | private final DictRepository dictRepository; |
| | | private final DictDetailService dictDetailService; |
| | | private final WeComServiceImpl weComService; |
| | | |
| | | @Override |
| | | public Map<String,Object> queryAll(TemplateControlFieldQueryCriteria criteria, Pageable pageable){ |
| | |
| | | } |
| | | } catch (WxErrorException wxErrorException) { |
| | | wxErrorException.printStackTrace(); |
| | | weComService.sendNotice(Arrays.asList("YueYuHuanXiangQinYuFenDou"), "企微通信异常", String.format("<div class=\"normal\">异常方法:%s</div>" + |
| | | "<div class=\"highlight\">请前往API服务查看LOG。</div>", |
| | | "updateWecomVacationType"), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | throw new BadRequestException("数据更新异常"); |
| | | } |
| | | } |
| | |
| | | }).collect(Collectors.toList()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | weComService.sendNotice(Arrays.asList("YueYuHuanXiangQinYuFenDou"), "企微通信异常", String.format("<div class=\"normal\">异常方法:%s</div>" + |
| | | "<div class=\"highlight\">请前往API服务查看LOG。</div>", |
| | | "uploadWecomMediaFile"), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | throw new BadRequestException("文件上传准备异常"); |
| | | } |
| | | } |
| | |
| | | } |
| | | } else if (control.getControlParam().equals("date_range.new_end")) { |
| | | if (field.getType().equals(String.class) || field.getType().equals(Integer.class) || field.getType().equals(Long.class)) { |
| | | dateRange.setBegin(Long.parseLong(String.valueOf(object))); |
| | | dateRange.setEnd(Long.parseLong(String.valueOf(object))); |
| | | } else if (field.getType().equals(Timestamp.class)) { |
| | | Timestamp time = (Timestamp) object; |
| | | dateRange.setBegin(Long.valueOf(time.getTime() / 1000)); |
| | | dateRange.setEnd(Long.valueOf(time.getTime() / 1000)); |
| | | } |
| | | } else if (control.getControlParam().equals("date_range.new_duration")) { |
| | | if (field.getType().equals(String.class) || field.getType().equals(Integer.class) || field.getType().equals(Long.class)) { |
| | |
| | | } catch (WxErrorException wxErrorException) { |
| | | // 通信失败 |
| | | wxErrorException.printStackTrace(); |
| | | weComService.sendNotice(Arrays.asList("YueYuHuanXiangQinYuFenDou"), "企微通信异常", String.format("<div class=\"normal\">异常方法:%s</div>" + |
| | | "<div class=\"highlight\">请前往API服务查看LOG。</div>", |
| | | "sendApplyEvent"), Constant.WECOM_MESSAGE_TYPE_TEXTCARD); |
| | | resultMap.put("error", "通信失败"); |
| | | } catch (IllegalAccessException illegalAccessException) { |
| | | // 解析后数据获取失败 |