diff --git a/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java b/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java index 94b570d..90d567c 100644 --- a/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java +++ b/aucma-base/src/main/java/com/aucma/base/controller/BaseSpaceInfoController.java @@ -1,5 +1,6 @@ package com.aucma.base.controller; +import java.util.LinkedHashMap; import java.util.List; import javax.servlet.http.HttpServletResponse; @@ -46,6 +47,17 @@ public class BaseSpaceInfoController extends BaseController { return getDataTable(list); } + /** + * 不分页查询货道信息列表 + * @param baseSpaceInfo + * @return + */ + @GetMapping("/spaceList" ) + public AjaxResult spaceList(BaseSpaceInfo baseSpaceInfo) { + List list = baseSpaceInfoService.selectBaseSpaceInfoList(baseSpaceInfo); + return success(list); + } + /** * 导出货道信息列表 */ @@ -100,4 +112,16 @@ public class BaseSpaceInfoController extends BaseController { public AjaxResult remove(@PathVariable Long[] objIds) { return toAjax(baseSpaceInfoService.deleteBaseSpaceInfoByObjIds(objIds)); } + + /** + * 库存统计 + * @param baseSpaceInfo + * @return + */ + @GetMapping("/getInventoryStatistics" ) + public AjaxResult getInventoryStatistics(BaseSpaceInfo baseSpaceInfo) { + List> list = baseSpaceInfoService.getInventoryStatistics(baseSpaceInfo); + return success(list); + } + } diff --git a/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java b/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java index 34d355f..5617f9b 100644 --- a/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java +++ b/aucma-base/src/main/java/com/aucma/base/mapper/BaseSpaceInfoMapper.java @@ -1,5 +1,6 @@ package com.aucma.base.mapper; +import java.util.LinkedHashMap; import java.util.List; import com.aucma.base.domain.BaseSpaceInfo; @@ -58,4 +59,11 @@ public interface BaseSpaceInfoMapper * @return 结果 */ public int deleteBaseSpaceInfoByObjIds(Long[] objIds); + + /** + * 库存统计 + * @param baseSpaceInfo + * @return + */ + List> getInventoryStatistics(BaseSpaceInfo baseSpaceInfo); } diff --git a/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java b/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java index 3a94cfe..7a79bfe 100644 --- a/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java +++ b/aucma-base/src/main/java/com/aucma/base/service/IBaseSpaceInfoService.java @@ -1,5 +1,6 @@ package com.aucma.base.service; +import java.util.LinkedHashMap; import java.util.List; import com.aucma.base.domain.BaseSpaceInfo; @@ -58,4 +59,11 @@ public interface IBaseSpaceInfoService * @return 结果 */ public int deleteBaseSpaceInfoByObjId(Long objId); + + /** + * 库存统计 + * @param baseSpaceInfo + * @return + */ + List> getInventoryStatistics(BaseSpaceInfo baseSpaceInfo); } diff --git a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java index 0985446..3f8a8c3 100644 --- a/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java +++ b/aucma-base/src/main/java/com/aucma/base/service/impl/BaseSpaceInfoServiceImpl.java @@ -1,5 +1,7 @@ package com.aucma.base.service.impl; +import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -90,4 +92,17 @@ public class BaseSpaceInfoServiceImpl implements IBaseSpaceInfoService { return baseSpaceInfoMapper.deleteBaseSpaceInfoByObjId(objId); } + + + /** + * 库存统计 + * @param baseSpaceInfo + * @return + */ + @Override + public List> getInventoryStatistics(BaseSpaceInfo baseSpaceInfo) { + return baseSpaceInfoMapper.getInventoryStatistics(baseSpaceInfo); + } + + } diff --git a/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml index 7ac16f1..7eef94e 100644 --- a/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml +++ b/aucma-base/src/main/resources/mapper/base/BaseSpaceInfoMapper.xml @@ -62,6 +62,7 @@ and sp.updated_by = #{updatedBy} and sp.updated_time = #{updatedTime} + order by sp.store_code,sp.space_code + + SELECT seq_base_spaceinfo.NEXTVAL as objId FROM DUAL