| | |
| | | String url = "https://lcdp.ahyc.com.cn:30443/api/v1/automation/tenant/61b6fb6080e9de2aa1df94d7/hooks/6954aca3cdf86954d2657433fb470ca1aabd108246925eca"; |
| | | JSONObject object = new JSONObject(); |
| | | object.put("status",0); |
| | | object.put("id","testis" ); |
| | | object.put("username","15345690849" ); |
| | | object.put("info", "这是备注111"); |
| | | String result = HttpsUtil.postJson(url,JSONObject.toJSONString(object)); |
| | |
| | | } |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | try { |
| | | JkCabinetGridServiceImpl temp = new JkCabinetGridServiceImpl(); |
| | | FormDataApiClient apiClient = new FormDataApiClient("B4eyPmjtnvnameAKq5lbDLdRZi18VQ3p" ,"https://lcdp.ahyc.com.cn:30443/api/"); |
| | | FormDataCreateParam param =new FormDataCreateParam(); |
| | | WarningEvent warningEvent = new WarningEvent(); |
| | | warningEvent.setTitle("跨越生产线(测试)"); |
| | | warningEvent.setContent("跨越生产线-芜湖北围墙过道东-枪(跨越)"); |
| | | param.setData( temp.getJdyChildData(warningEvent,"gaoyf_b")); |
| | | param.setApp_id("6954aca3cdf8fb470ca1aabd"); |
| | | param.setEntry_id("6954aca6ff1c406a1d7b9afa"); |
| | | param.setIs_start_trigger(false); |
| | | param.setIs_start_trigger(true); |
| | | Map<String, Object> response = apiClient.singleDataCreate(param,apiClient.getDefaultVersion()); |
| | | log.error(JSONObject.toJSONString(response)); |
| | | }catch (Exception e){ |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 简道云消息推送 定制 |
| | |
| | | public void sendMemberInfoResult(String username, String info, int status){ |
| | | try { |
| | | String url = systemDictDataBiz.queryByCode(Constants.JDY_CONFIG,Constants.JDY_MEMBER_PUSH_STATUS_URL).getCode(); |
| | | log.error("==========推送人员{}:同步结果开始=====status={},username={},info={},url={}",username,status,info,url); |
| | | log.error("==========推送人员{}:同步结果开始=====status={},id={},info={},url={}",username,status,info,url); |
| | | JSONObject object = new JSONObject(); |
| | | object.put("status",status); |
| | | // object.put("id",id); |
| | | object.put("username",username); |
| | | object.put("info",info); |
| | | String result = HttpsUtil.postJson(url,JSONObject.toJSONString(object)); |
| | |
| | | } |
| | | |
| | | if(StringUtils.isBlank(data.get_id()) |
| | | ||StringUtils.isBlank(data.getUsername()) |
| | | || data.getUser() == null |
| | | ||StringUtils.isBlank(data.getUser().getUsername()) |
| | | ||StringUtils.isBlank(data.getPhone()) |
| | | ||StringUtils.isBlank(data.getName())){ |
| | | throw new BusinessException(ResponseStatus.JDY_BAD_REQUEST.getCode(),"人员信息不完整!"); |
| | | } |
| | | data.setUsername(data.getUser().getUsername()); |
| | | //内部人员信息 |
| | | Member member = memberMapper.selectOne(new QueryWrapper<Member>().lambda() |
| | | .eq( Member::getErpId,data.get_id() ) |
| | |
| | | if(com.github.xiaoymin.knife4j.core.util.CollectionUtils.isNotEmpty(memberList)&&memberList.size()>Constants.ZERO){ |
| | | List<String> ddUserIdList = memberList.stream().map(j->j.getErpId()).collect(Collectors.toList()); |
| | | //发送推送钉钉消息 |
| | | |
| | | Boolean isSuccess = dingTalk.workInfoOANotice(Long.valueOf(systemDictDataBiz.queryByCode(Constants.DD_TALK,Constants.AGENT_ID).getCode()), |
| | | String.join(",",ddUserIdList), |
| | | ddNoticeConfigMapper.selectCount(new QueryWrapper<DdNoticeConfig>().lambda() |