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 ee67843057eee8eeef490b00e9cee7efbb422aa8..f01a344685141c7fc2c8c527517bf3b1391fc7ab 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 6ae9c42bbc9ab4b6ab3e1b3c42c9a3090e38cf50..7c5a44f8acb1c31c2f378ba7497949e8f1cf1a44 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 383ae1350fe0f701d086371f7782d5fee8ee8fb1..200352b2b177e735615659f6af33b1f2b1beea7d 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 5bc2fce0cd5e1ec3e165b000d9ba43a2410a70c8..ac9c2a6ce790c584031127db6a7d745cc51fe11f 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 4588235e95e6a9884ffef0cda3001dc60446e313..515647695d7f2933c38871c4c9cba21df7e27164 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 +