From 37b64154fa1823cd71c4335592a2736b637ce2cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Tue, 31 Aug 2021 18:47:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B9=E6=8D=AE=E7=89=A9=E6=96=99=E5=B8=A6?= =?UTF-8?q?=E5=87=BA=E5=9B=BE=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/meapi/controller/ItemController.java | 8 ++++++++ .../mesnac/meapi/controller/ShopOrderController.java | 2 ++ .../com/foreverwin/mesnac/meapi/mapper/ItemMapper.java | 5 +++-- .../foreverwin/mesnac/meapi/service/ItemService.java | 4 +++- .../mesnac/meapi/service/impl/ItemServiceImpl.java | 10 ++++++++-- meapi/src/main/resources/mapper/ItemMapper.xml | 6 ++++++ meapi/src/main/resources/mapper/ShopOrderMapper.xml | 3 +-- 7 files changed, 31 insertions(+), 7 deletions(-) diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ItemController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ItemController.java index f75cf356..19403551 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ItemController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ItemController.java @@ -99,4 +99,12 @@ public class ItemController { return R.ok(itemService.selectById(itemBo)); } + /** + * 根据物料找出图号 + */ + @GetMapping("/findMapByItemBo") + public R findMapByItemBo(String itemBo){ + return R.ok(itemService.findMapByItemBo(itemBo)); + } + } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java index 7ee201fa..51d49705 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/controller/ShopOrderController.java @@ -87,6 +87,8 @@ public class ShopOrderController { public R findByShopOrderBo(String shopOrder){ return R.ok(shopOrderService.findByShopOrderBo(shopOrder)); } + + } diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ItemMapper.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ItemMapper.java index 88bb841b..6dc6829c 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ItemMapper.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/mapper/ItemMapper.java @@ -3,13 +3,12 @@ package com.foreverwin.mesnac.meapi.mapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.foreverwin.mesnac.meapi.model.Item; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; -import java.time.LocalDate; import java.util.List; +import java.util.Map; /** *

@@ -31,4 +30,6 @@ public interface ItemMapper extends BaseMapper { Item selectById(@Param("locale") String locale, @Param("handle") String handle); List selectListByCriteria(@Param("locale") String locale, @Param("ew") Wrapper wrapper); + + Map findMapByItem(@Param("itemBo")String itemBo); } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ItemService.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ItemService.java index d05e2415..1d0cf80c 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ItemService.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/ItemService.java @@ -7,8 +7,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; import com.foreverwin.mesnac.meapi.model.Item; -import java.time.LocalDate; import java.util.List; +import java.util.Map; /** *

@@ -37,5 +37,7 @@ public interface ItemService extends IService { Item selectCurrent(String site, String item); + Map findMapByItemBo(String itemBo); + } \ No newline at end of file diff --git a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ItemServiceImpl.java b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ItemServiceImpl.java index 85b34e91..74a5214d 100644 --- a/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ItemServiceImpl.java +++ b/meapi/src/main/java/com/foreverwin/mesnac/meapi/service/impl/ItemServiceImpl.java @@ -2,7 +2,6 @@ package com.foreverwin.mesnac.meapi.service.impl; import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.Wrapper; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; @@ -11,7 +10,6 @@ import com.foreverwin.mesnac.meapi.mapper.ItemMapper; import com.foreverwin.mesnac.meapi.model.Item; import com.foreverwin.mesnac.meapi.service.ItemService; import com.foreverwin.mesnac.meapi.util.StringUtils; -import com.foreverwin.modular.core.util.CommonMethods; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.i18n.LocaleContextHolder; import org.springframework.stereotype.Service; @@ -19,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Locale; +import java.util.Map; /** *

@@ -86,4 +85,11 @@ public class ItemServiceImpl extends ServiceImpl implements It public Item selectCurrent(String site, String item) { return itemMapper.selectCurrentRevision(site, item); } + + @Override + public Map findMapByItemBo(String itemBo) { + return itemMapper.findMapByItem(itemBo); + } + + } \ No newline at end of file diff --git a/meapi/src/main/resources/mapper/ItemMapper.xml b/meapi/src/main/resources/mapper/ItemMapper.xml index e8a074aa..a44d2492 100644 --- a/meapi/src/main/resources/mapper/ItemMapper.xml +++ b/meapi/src/main/resources/mapper/ItemMapper.xml @@ -1013,4 +1013,10 @@ + diff --git a/meapi/src/main/resources/mapper/ShopOrderMapper.xml b/meapi/src/main/resources/mapper/ShopOrderMapper.xml index 6939953b..0f9ab9d5 100644 --- a/meapi/src/main/resources/mapper/ShopOrderMapper.xml +++ b/meapi/src/main/resources/mapper/ShopOrderMapper.xml @@ -1009,12 +1009,11 @@