manailin
2021-06-22 4574365828110f37ed68d486fc84ccac87e20349
springcloud_k8s_panzhihuazhihuishequ/service_api/src/main/java/com/panzhihua/serviceapi/biz/impl/LcApiServiceImpl.java
@@ -59,7 +59,7 @@
     */
    private String getAuthToken() {
        ValueOperations<String, String> valueOperations = redisTemplate.opsForValue();
        if(valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN) ==null){
        if (valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN) == null) {
            saveTokenFromRemoteRequest("18080799023", "123456");
        }
        return valueOperations.get(LangchaoApiConstants.LANG_CHAO_TOKEN);
@@ -99,7 +99,7 @@
            Map m = mapper.readValue(mapper.writeValueAsString(eventInfo), Map.class);
            request.form(m);
        } catch (JsonProcessingException e) {
            log.info("方法submitEventRegister发生错误:{}",e.getMessage());
            log.info("方法submitEventRegister发生错误:{}", e.getMessage());
        }
        HttpResponse result = request.execute();
        log.info(result.body());
@@ -123,7 +123,7 @@
            file.delete();
            return R.ok(result.body());
        } catch (Exception e) {
            log.info("方法submitEventRelationFile发生错误:{}",e.getMessage());
            log.info("方法submitEventRelationFile发生错误:{}", e.getMessage());
        }
        return R.fail();
    }
@@ -148,7 +148,7 @@
    @Override
    public String getGridMemberListByAreaIdOrName(String areaId) {
        HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_getAll_Search_Page_URL);
        HttpRequest request = HttpUtil.createPost(LangchaoApiConstants.GRID_GET_GETALL_SEARCH_PAGE_URL);
        request.auth(getAuthToken());
        request.form("areaId", areaId);
        HttpResponse result = request.execute();
@@ -169,7 +169,11 @@
            eventInfo.setGridName(gridData.getGridName());
            eventInfo.setCaseTypeCode(LocalEventToLangChaoEventTypeEnum.getCodeByName(eventInfoVo.getEventType()));
            eventInfo.setCaseTypeName(LocalEventToLangChaoEventTypeEnum.getEventNameByCode(eventInfoVo.getEventType()));
            eventInfo.setHappenTime(String.valueOf(eventInfoVo.getHappenTime().getTime()));
            if (eventInfoVo.getEventCategory() != 1L) {
                eventInfo.setHappenTime(String.valueOf(eventInfoVo.getPropagandaTime().getTime()));
            } else {
                eventInfo.setHappenTime(String.valueOf(eventInfoVo.getHappenTime().getTime()));
            }
            eventInfo.setHappenAddress(eventInfoVo.getHappenAddress());
            String[] data = eventInfoVo.getHappentLatLng().split(",");
            eventInfo.setLongitude(data[0]);
@@ -181,7 +185,9 @@
            eventInfo.setDataId(eventInfoVo.getId().toString());
            //获取系统网格员映射的浪潮网格员对于的用户ID
            eventInfo.setUserId(lcGridUserId);
            eventInfo.setHandleTime(String.valueOf(eventInfoVo.getHappenTime().getTime()));
            if (eventInfoVo.getProcessDate() != null) {
                eventInfo.setHandleTime(String.valueOf(eventInfoVo.getProcessDate().getTime()));
            }
            eventInfo.setCaseName(eventInfoVo.getEventTitle());
            submitEventRegister(eventInfo);
            log.info("定时向浪潮服务器提交网格事件登记结束");