From c36739802364dbb7ff99d6a0d9d032156bf4b289 Mon Sep 17 00:00:00 2001 From: zhangming Date: Fri, 27 Aug 2021 16:05:04 +0800 Subject: [PATCH] bug --- .../controller/base/CommonController.java | 8 +++++ .../emergency/EmergencyMaterialMapper.java | 1 + .../emergency/EmergencyMaterialService.java | 1 + .../impl/EmergencyMaterialServiceImpl.java | 5 ++++ .../emergency/EmergencyMaterialMapper.xml | 29 +++++++++++++++++++ 5 files changed, 44 insertions(+) diff --git a/flood-application/src/main/java/com/prevention/flood/application/controller/base/CommonController.java b/flood-application/src/main/java/com/prevention/flood/application/controller/base/CommonController.java index ee6784305..f01a34468 100644 --- a/flood-application/src/main/java/com/prevention/flood/application/controller/base/CommonController.java +++ b/flood-application/src/main/java/com/prevention/flood/application/controller/base/CommonController.java @@ -5,6 +5,7 @@ import com.prevention.flood.application.controller.base.api.CommonApi; import com.prevention.flood.application.model.base.BaseStreet; import com.prevention.flood.application.model.common.R; import com.prevention.flood.application.service.base.BaseStreetService; +import com.prevention.flood.application.service.emergency.impl.EmergencyMaterialServiceImpl; import com.prevention.flood.application.service.system.SysBelongAreaService; import com.prevention.flood.application.service.system.SysDictService; import io.swagger.annotations.Api; @@ -35,6 +36,8 @@ public class CommonController implements CommonApi { @Autowired private BaseStreetService baseStreetService; + @Autowired + private EmergencyMaterialServiceImpl materialService; @Override @ApiOperation("获取下拉框内容") @@ -61,4 +64,9 @@ public class CommonController implements CommonApi { return R.ok(baseStreetService.selectList(baseStreetEntityWrapper)); } + @GetMapping("/combox/warehouse") + public R getWareHouse(){ + return R.ok(materialService.getWareHouse()); + } + } \ No newline at end of file diff --git a/flood-application/src/main/java/com/prevention/flood/application/dao/emergency/EmergencyMaterialMapper.java b/flood-application/src/main/java/com/prevention/flood/application/dao/emergency/EmergencyMaterialMapper.java index 6ae9c42bb..7c5a44f8a 100644 --- a/flood-application/src/main/java/com/prevention/flood/application/dao/emergency/EmergencyMaterialMapper.java +++ b/flood-application/src/main/java/com/prevention/flood/application/dao/emergency/EmergencyMaterialMapper.java @@ -35,4 +35,5 @@ public interface EmergencyMaterialMapper extends BaseMapper { List getMaterialAll(); + List getWareHouse(); } \ No newline at end of file diff --git a/flood-application/src/main/java/com/prevention/flood/application/service/emergency/EmergencyMaterialService.java b/flood-application/src/main/java/com/prevention/flood/application/service/emergency/EmergencyMaterialService.java index 383ae1350..200352b2b 100644 --- a/flood-application/src/main/java/com/prevention/flood/application/service/emergency/EmergencyMaterialService.java +++ b/flood-application/src/main/java/com/prevention/flood/application/service/emergency/EmergencyMaterialService.java @@ -45,4 +45,5 @@ public interface EmergencyMaterialService extends IService { */ List getStoreHouseMaterial(); + List getWareHouse(); } \ No newline at end of file diff --git a/flood-application/src/main/java/com/prevention/flood/application/service/emergency/impl/EmergencyMaterialServiceImpl.java b/flood-application/src/main/java/com/prevention/flood/application/service/emergency/impl/EmergencyMaterialServiceImpl.java index 5bc2fce0c..ac9c2a6ce 100644 --- a/flood-application/src/main/java/com/prevention/flood/application/service/emergency/impl/EmergencyMaterialServiceImpl.java +++ b/flood-application/src/main/java/com/prevention/flood/application/service/emergency/impl/EmergencyMaterialServiceImpl.java @@ -107,4 +107,9 @@ EmergencyMaterialServiceImpl extends ServiceImpl getWareHouse(){ + return emergencyMaterialMapper.getWareHouse(); + } + } \ No newline at end of file diff --git a/flood-application/src/main/resources/mapper/emergency/EmergencyMaterialMapper.xml b/flood-application/src/main/resources/mapper/emergency/EmergencyMaterialMapper.xml index 4588235e9..515647695 100644 --- a/flood-application/src/main/resources/mapper/emergency/EmergencyMaterialMapper.xml +++ b/flood-application/src/main/resources/mapper/emergency/EmergencyMaterialMapper.xml @@ -143,5 +143,34 @@ select id as code,name from emergency_material a group by NAME + -- Gitee