diff --git a/src/main/java/com/zcloud/controller/dw/DwController.java b/src/main/java/com/zcloud/controller/dw/DwController.java index 4327780d..44fcde9f 100644 --- a/src/main/java/com/zcloud/controller/dw/DwController.java +++ b/src/main/java/com/zcloud/controller/dw/DwController.java @@ -6,6 +6,7 @@ import com.zcloud.entity.PageData; import com.zcloud.entity.Page; import com.zcloud.service.dw.DwService; import com.zcloud.service.dw.dto.*; +import com.zcloud.util.Jurisdiction; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @@ -44,6 +45,16 @@ public class DwController extends BaseController { return dwService.saveOrUpdateMap(mapGet); } + @RequestMapping(value = "deleteMap") + public Object deleteMap() throws Exception { + PageData pd = this.getPageData(); + DeleteDto deleteDto = new DeleteDto(); + deleteDto.setId(pd.getString("id")); + deleteDto.setOperatorId(Jurisdiction.getUSER_ID()); + deleteDto.setOperatorName(Jurisdiction.getName()); + return dwService.deleteMap(deleteDto); + } + @RequestMapping(value = "getAlarmList") public Object getAlarmList(Page page) throws Exception { PageData pd = this.getPageData(); diff --git a/src/main/java/com/zcloud/service/dw/DwService.java b/src/main/java/com/zcloud/service/dw/DwService.java index 51a85d42..fde31036 100644 --- a/src/main/java/com/zcloud/service/dw/DwService.java +++ b/src/main/java/com/zcloud/service/dw/DwService.java @@ -10,4 +10,6 @@ public interface DwService { Object getAlarmList(AlarmGet param) throws Exception; Object manageAlarm(AlarmManageDto param) throws Exception; Object getDictionary() throws Exception; + + Object deleteMap(DeleteDto deleteDto); } diff --git a/src/main/java/com/zcloud/service/dw/dto/DeleteDto.java b/src/main/java/com/zcloud/service/dw/dto/DeleteDto.java new file mode 100644 index 00000000..97badd5f --- /dev/null +++ b/src/main/java/com/zcloud/service/dw/dto/DeleteDto.java @@ -0,0 +1,14 @@ +package com.zcloud.service.dw.dto; + +import lombok.Data; + +import java.util.List; + +@Data +public class DeleteDto { + + private String id; + private List ids; + private String operatorId; + private String operatorName; +} diff --git a/src/main/java/com/zcloud/service/dw/impl/DwServiceImpl.java b/src/main/java/com/zcloud/service/dw/impl/DwServiceImpl.java index 287f843d..3b1ba7a3 100644 --- a/src/main/java/com/zcloud/service/dw/impl/DwServiceImpl.java +++ b/src/main/java/com/zcloud/service/dw/impl/DwServiceImpl.java @@ -56,7 +56,11 @@ public class DwServiceImpl implements DwService { @Override public Object getDictionary() throws Exception { - System.out.println(url + "dw/getDictionary"); return HttpUtil.post(url + "dw/getDictionary", ""); } + + @Override + public Object deleteMap(DeleteDto deleteDto) { + return HttpUtil.post(url + "dw/deleteMap", deleteDto); + } }