From 0d2905b38341eb779899068bbbf9aebefc1e5135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E5=98=89=E4=BC=9F?= <1724121454@qq.com> Date: Mon, 23 Aug 2021 19:40:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=99=E6=96=99=E9=80=80=E5=9B=9E=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mesnac/anomaly/controller/Report.java | 15 +++++++++++---- .../mesnac/anomaly/mapper/ReportMapper.java | 5 +++++ .../mesnac/anomaly/service/ReportService.java | 3 +++ .../service/impl/ReportServiceImpl.java | 8 ++++++++ .../src/main/resources/mapper/ReportMapper.xml | 18 ++++++++++++++++++ .../controller/SurplusReturnController.java | 9 --------- .../dispatch/mapper/SurplusReturnMapper.java | 5 +---- .../dispatch/service/SurplusReturnService.java | 3 --- .../service/impl/SurplusReturnServiceImpl.java | 7 +------ .../resources/mapper/SurplusReturnMapper.xml | 17 ----------------- 10 files changed, 47 insertions(+), 43 deletions(-) diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java index a66a6bbd..e4437d96 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/Report.java @@ -6,14 +6,12 @@ package com.foreverwin.mesnac.anomaly.controller; * @Since 2021-08-23 */ +import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing; import com.foreverwin.mesnac.anomaly.service.ReportService; import com.foreverwin.mesnac.integration.model.IntegrationLog; import com.foreverwin.modular.core.util.R; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/REPORT") @@ -39,4 +37,13 @@ public class Report { return R.failed(e.getMessage()); } } + + @GetMapping("/surplusReturnTable") + public R surplusReturnTable(String item,String itemDescription){ + try{ + return R.ok(reportService.surplusReturnTable(item,itemDescription)); + }catch(Exception e){ + return R.failed(e.getMessage()); + } + } } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java index 3943eb4b..059c60ee 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/mapper/ReportMapper.java @@ -1,5 +1,6 @@ package com.foreverwin.mesnac.anomaly.mapper; +import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing; import com.foreverwin.mesnac.integration.model.IntegrationLog; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; @@ -18,4 +19,8 @@ public interface ReportMapper { List> findIntegrationLog(@Param("integration") IntegrationLog integration); List> partsManufacturing(@Param("site")String site,@Param("locale")String locale, @Param("partsManufacturing") PartsManufacturing partsManufacturing); + + List> surplusReturnTable(@Param("site")String site, @Param("locale")String locale, + @Param("item")String item, @Param("itemDescription")String itemDescription); + } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java index 85dcf0fe..d59d2103 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/ReportService.java @@ -1,5 +1,6 @@ package com.foreverwin.mesnac.anomaly.service; +import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing; import com.foreverwin.mesnac.integration.model.IntegrationLog; import java.util.List; @@ -14,4 +15,6 @@ public interface ReportService { List> findIntegrationLog(IntegrationLog integration); List> partsManufacturing(PartsManufacturing partsManufacturing); + + List> surplusReturnTable(String item, String itemDescription); } diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java index 0ae8fb5b..d463cc23 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/service/impl/ReportServiceImpl.java @@ -1,5 +1,6 @@ package com.foreverwin.mesnac.anomaly.service.impl; +import com.foreverwin.mesnac.anomaly.dto.PartsManufacturing; import com.foreverwin.mesnac.anomaly.mapper.ReportMapper; import com.foreverwin.mesnac.anomaly.service.ReportService; import com.foreverwin.mesnac.integration.model.IntegrationLog; @@ -47,4 +48,11 @@ public class ReportServiceImpl implements ReportService { String locale = LocaleContextHolder.getLocale().getLanguage(); return reportMapper.partsManufacturing(site,locale,partsManufacturing); } + + @Override + public List> surplusReturnTable(String item, String itemDescription) { + String locale = LocaleContextHolder.getLocale().getLanguage(); + String site = CommonMethods.getSite(); + return reportMapper.surplusReturnTable(site,locale,item,itemDescription); + } } diff --git a/anomaly/src/main/resources/mapper/ReportMapper.xml b/anomaly/src/main/resources/mapper/ReportMapper.xml index a07651c0..d020e5ec 100644 --- a/anomaly/src/main/resources/mapper/ReportMapper.xml +++ b/anomaly/src/main/resources/mapper/ReportMapper.xml @@ -70,4 +70,22 @@ + + \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SurplusReturnController.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SurplusReturnController.java index 9648ce3c..b90e4a15 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SurplusReturnController.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/controller/SurplusReturnController.java @@ -65,13 +65,4 @@ public class SurplusReturnController { return R.ok(0,"物料条码【" +inventory+ "】余料退回操作成功!"); } - - @GetMapping("/surplusReturnTable") - public R surplusReturnTable(String item,String itemDescription){ - try{ - return R.ok(surplusReturnService.surplusReturnTable(item,itemDescription)); - }catch(Exception e){ - return R.failed(e.getMessage()); - } - } } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SurplusReturnMapper.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SurplusReturnMapper.java index 2758e934..d67763ba 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SurplusReturnMapper.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/mapper/SurplusReturnMapper.java @@ -5,7 +5,6 @@ import com.foreverwin.mesnac.dispatch.model.SurplusReturn; import org.apache.ibatis.annotations.Param; import org.springframework.stereotype.Repository; -import java.util.List; import java.util.Map; /** @@ -28,6 +27,4 @@ public interface SurplusReturnMapper extends BaseMapper { */ Map selectInventoryData(@Param("inventoryBo") String inventoryBo); - List surplusReturnTable(@Param("site")String site, @Param("locale")String locale, - @Param("item")String item, @Param("itemDescription")String itemDescription); -} \ No newline at end of file + } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SurplusReturnService.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SurplusReturnService.java index d599518d..14f3e36c 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SurplusReturnService.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/SurplusReturnService.java @@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.foreverwin.mesnac.dispatch.model.SurplusReturn; import java.math.BigDecimal; -import java.util.List; import java.util.Map; /** @@ -42,6 +41,4 @@ public interface SurplusReturnService extends IService { */ void surplusReturn(String site, String user, String inventory, String length, String width, BigDecimal numbers, BigDecimal qty); - - List surplusReturnTable(String item,String itemDescription); } \ No newline at end of file diff --git a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java index 58ae57c8..02c8862b 100644 --- a/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java +++ b/dispatch/src/main/java/com/foreverwin/mesnac/dispatch/service/impl/SurplusReturnServiceImpl.java @@ -225,10 +225,5 @@ public class SurplusReturnServiceImpl extends ServiceImpl surplusReturnTable(String item, String itemDescription) { - String locale = LocaleContextHolder.getLocale().getLanguage(); - String site = CommonMethods.getSite(); - return surplusReturnMapper.surplusReturnTable(site,locale,item,itemDescription); - } + } \ No newline at end of file diff --git a/dispatch/src/main/resources/mapper/SurplusReturnMapper.xml b/dispatch/src/main/resources/mapper/SurplusReturnMapper.xml index cb7d064c..8380da3e 100644 --- a/dispatch/src/main/resources/mapper/SurplusReturnMapper.xml +++ b/dispatch/src/main/resources/mapper/SurplusReturnMapper.xml @@ -458,21 +458,4 @@ WHERE IV.HANDLE = #{inventoryBo} -