qa-prevention-gwj/src/main/java/com/zcloud/service/dw/impl/DwServiceImpl.java

71 lines
2.2 KiB
Java
Raw Normal View History

package com.zcloud.service.dw.impl;
2024-04-13 14:44:17 +08:00
import com.zcloud.entity.PageData;
import com.zcloud.service.bus.CorpInfoService;
import com.zcloud.service.dw.DwService;
import com.zcloud.service.dw.dto.*;
import com.zcloud.util.HttpUtil;
2024-04-13 14:44:17 +08:00
import com.zcloud.util.Jurisdiction;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
2024-04-13 14:44:17 +08:00
import javax.annotation.Resource;
@Service
public class DwServiceImpl implements DwService {
2024-04-13 11:03:47 +08:00
@Value("${dw.url}")
private String url;
2024-04-13 14:44:17 +08:00
@Resource
private CorpInfoService corpInfoService;
@Override
public Object getMapInfo(MapGet param) throws Exception {
return HttpUtil.post(url + "dw/getMapInfo", param);
}
@Override
public Object getMapList(MapGet param) throws Exception {
return HttpUtil.post(url + "dw/getMapList", param);
}
@Override
public Object saveOrUpdateMap(MapInfo param) throws Exception {
2024-04-13 14:44:17 +08:00
param.getRequired().setCreatorId(Jurisdiction.getUSER_ID());
param.getRequired().setCreatorName(Jurisdiction.getName());
param.getRequired().setOperatorId(Jurisdiction.getUSER_ID());
param.getRequired().setOperatorName(Jurisdiction.getName());
param.getRequired().setCorpId(Jurisdiction.getCORPINFO_ID());
PageData condition = new PageData();
condition.put("CORPINFO_ID", Jurisdiction.getCORPINFO_ID());
param.getRequired().setCorpName(corpInfoService.findById(condition).getString("CORP_NAME"));
return HttpUtil.post(url + "dw/saveOrUpdateMap", param);
}
@Override
public Object getTrace(TraceGet param) throws Exception {
return HttpUtil.post(url + "dw/getTrace", param);
}
@Override
public Object getAlarmList(AlarmGet param) throws Exception {
return HttpUtil.post(url + "dw/getAlarmList", param);
}
@Override
public Object manageAlarm(AlarmManageDto param) throws Exception {
return HttpUtil.post(url + "dw/manageAlarm", param);
}
2024-04-13 10:27:30 +08:00
@Override
public Object getDictionary() throws Exception {
return HttpUtil.post(url + "dw/getDictionary", "");
}
2024-04-13 16:12:38 +08:00
@Override
public Object deleteMap(DeleteDto deleteDto) {
return HttpUtil.post(url + "dw/deleteMap", deleteDto);
}
}