|
@@ -1,10 +1,8 @@
|
|
|
package com.zfjg.manage.utils;
|
|
|
|
|
|
-import cn.hutool.core.collection.CollectionUtil;
|
|
|
import cn.hutool.http.HttpRequest;
|
|
|
import cn.hutool.http.HttpResponse;
|
|
|
import cn.hutool.http.HttpUtil;
|
|
|
-import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.reflect.TypeToken;
|
|
|
import com.zfjg.common.core.domain.R;
|
|
|
import com.zfjg.common.core.exception.ServiceException;
|
|
@@ -21,8 +19,6 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
import java.lang.reflect.Type;
|
|
|
-import java.time.OffsetDateTime;
|
|
|
-import java.time.format.DateTimeFormatter;
|
|
|
import java.util.HashMap;
|
|
|
import java.util.List;
|
|
|
import java.util.Map;
|
|
@@ -75,6 +71,7 @@ public class ZzglClient {
|
|
|
// get.header(Header.AUTHORIZATION, "Bearer " + "");
|
|
|
get.timeout(3000);
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("消控室信息查询:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<R<List<EnforceRoomVO>>>() {
|
|
|
}.getType();
|
|
|
R<List<EnforceRoomVO>> data = toData(execute, type);
|
|
@@ -100,6 +97,7 @@ public class ZzglClient {
|
|
|
get.timeout(3000);
|
|
|
get.body(GsonUtils.toJson(req));
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("值班记录:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<TableInfo<EnforceDutyRecordVO>>() {
|
|
|
}.getType();
|
|
|
return toDataPage(execute, type);
|
|
@@ -127,6 +125,7 @@ public class ZzglClient {
|
|
|
// get.header(Header.AUTHORIZATION, "Bearer " + "");
|
|
|
get.timeout(3000);
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("查询值班人员:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<R<List<HandoverInfoApiVO>>>() {
|
|
|
}.getType();
|
|
|
R<List<HandoverInfoApiVO>> data = toData(execute, type);
|
|
@@ -153,21 +152,12 @@ public class ZzglClient {
|
|
|
// get.header(Header.AUTHORIZATION, "Bearer " + "");
|
|
|
get.timeout(3000);
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("查看档案:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<R<DutyRecordDetailVO>>() {
|
|
|
}.getType();
|
|
|
R<DutyRecordDetailVO> data = toData(execute, type);
|
|
|
DutyRecordDetailVO data1 = data.getData();
|
|
|
-/* if (CollectionUtil.isNotEmpty(data1.getJsonObjects())) {
|
|
|
- for (JSONObject jsonObject : data1.getJsonObjects()) {
|
|
|
- if (jsonObject.containsKey("jjbsj")) {
|
|
|
- String jjbsj = jsonObject.getString("jjbsj");
|
|
|
- OffsetDateTime offsetDateTime = OffsetDateTime.parse(jjbsj);
|
|
|
- DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
|
|
|
- String formattedDateTime = offsetDateTime.format(formatter);
|
|
|
- jsonObject.put("jjbsj", formattedDateTime);
|
|
|
- }
|
|
|
- }
|
|
|
- }*/
|
|
|
+
|
|
|
return data1;
|
|
|
} catch (Exception e) {
|
|
|
log.error("调用自主管理,查看档案接口失败。参数{}。异常{}", id, e);
|
|
@@ -191,6 +181,7 @@ public class ZzglClient {
|
|
|
// get.header(Header.AUTHORIZATION, "Bearer " + "");
|
|
|
get.timeout(3000);
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("检查项:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<R<SingleDutyApplyDetailsAppVO>>() {
|
|
|
}.getType();
|
|
|
R<SingleDutyApplyDetailsAppVO> data = toData(execute, type);
|
|
@@ -216,6 +207,7 @@ public class ZzglClient {
|
|
|
get.timeout(3000);
|
|
|
get.body(GsonUtils.toJson(req));
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("取消单人值班:返回参数:{}", execute);
|
|
|
} catch (Exception e) {
|
|
|
log.error("调用自主管理,取消单人值班接口失败。参数{}。异常{}", req, e);
|
|
|
}
|
|
@@ -236,6 +228,7 @@ public class ZzglClient {
|
|
|
get.timeout(3000);
|
|
|
get.body(GsonUtils.toJson(req));
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("批量根据精确的单位名获取消防室:返回参数:{}", execute);
|
|
|
Type type = new TypeToken<R<RoomByPreciseCompanyNameVO>>() {
|
|
|
}.getType();
|
|
|
R<RoomByPreciseCompanyNameVO> data = toData(execute, type);
|
|
@@ -261,6 +254,7 @@ public class ZzglClient {
|
|
|
get.timeout(3000);
|
|
|
get.body(GsonUtils.toJson(req));
|
|
|
HttpResponseDataVO execute = execute(get);
|
|
|
+ log.info("双随机校验-全面检查:返回参数:{}", execute);
|
|
|
} catch (Exception e) {
|
|
|
log.error("调用自主管理,双随机校验-全面检查接口失败。参数{}。异常{}", req, e);
|
|
|
}
|