package com.zcloud.service.dw.impl; 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; import com.zcloud.util.Jurisdiction; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import javax.annotation.Resource; @Service public class DwServiceImpl implements DwService { @Value("${dw.url}") private String url; @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 { 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); } @Override public Object getDictionary() throws Exception { return HttpUtil.post(url + "dw/getDictionary", ""); } @Override public Object deleteMap(DeleteDto deleteDto) { return HttpUtil.post(url + "dw/deleteMap", deleteDto); } }