From 0a779f2b00c79153b88159d0d89fb42bd302edce Mon Sep 17 00:00:00 2001 From: liyongde <1419499670@qq.com> Date: Tue, 24 Oct 2023 12:21:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20oracle=E5=88=86=E9=A1=B5=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2sql?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../acs/service/impl/AcsToWmsServiceImpl.java | 8 -------- .../nl/wms/ext/mes/service/WmsToMesService.java | 15 ++++++++------- .../service/dao/mapper/MesRequestMapper.java | 4 ++-- .../mes/service/dao/mapper/MesRequestMapper.xml | 17 ++++++++++------- .../mes/service/impl/WmsToMesServiceImpl.java | 10 +++++----- .../service/impl/PdmBdWorkorderServiceImpl.java | 12 ++++++++---- 6 files changed, 33 insertions(+), 33 deletions(-) diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 8ada6e1..f204a07 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -308,14 +308,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService { // 分拣需要在这设置特殊值 // 校验是否够码满一托 boolean enoughCallEmpty = workorderService.isEnoughCallEmpty(param.getString("device_code")); -// PdmBdWorkorder workorder = workorderService.getDeviceDockingProductionTask(param.getString("device_code")); -// BigDecimal realQty = workorder.getReal_qty(); -// BigDecimal planQty = workorder.getPlan_qty(); -// if (realQty.compareTo(planQty) < 0) { // 还可以叫空盘 -// torus = 0; -// } else { -// torus = 1; -// } return enoughCallEmpty ? 0 : 1; } return torus; diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java index 4085846..a5db807 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/WmsToMesService.java @@ -92,13 +92,6 @@ public interface WmsToMesService { */ void saveShelfInfoBatchToMes(MesShelfInfo shelfInfo); - /** - * 根据成品物料编码获取订单号 - * @param materialId - * @return - */ - IPage selectPageMesOrder(IPage pages, String materialId); - /** * 获取所有客户信息 * @return @@ -111,4 +104,12 @@ public interface WmsToMesService { * @return */ CusterVo getCusterByNo(String custerNo); + + /** + * 分页获取数据 + * @param currentPage + * @param currentSize + * @return + */ + List selectPageMesOrder(int currentPage, int currentSize); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.java index c19dbd8..24e2712 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.java @@ -61,9 +61,9 @@ public interface MesRequestMapper { @DS("oracle") void saveShelfInfoBatchToMes(MesShelfInfo shelfInfo); @DS("oracle") - IPage findOrderInfoByMaterialId(IPage pages, String materialId); - @DS("oracle") List getCusterInfo(); @DS("oracle") CusterVo getCusterByNo(String custerNo); + @DS("oracle") + List selectPageMesOrder(int currentPage, int currentSize); } diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml index f3b5922..ced3002 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/dao/mapper/MesRequestMapper.xml @@ -281,13 +281,6 @@ LEFT JOIN sch_base_point p2 ON p2.point_code = vg.source_vehicle_code WHERE p1.region_code = 'GTPHC' - @@ -295,4 +288,14 @@ SELECT * FROM "RTMG"."VIEW_CUSTER_LMS" WHERE CUSTER_NO = #{custerNo} + diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java index b6de164..bf9b261 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/ext/mes/service/impl/WmsToMesServiceImpl.java @@ -408,11 +408,6 @@ public class WmsToMesServiceImpl implements WmsToMesService { mesRequestMapper.saveShelfInfoBatchToMes(shelfInfo); } - @Override - public IPage selectPageMesOrder(IPage pages, String materialId) { - return mesRequestMapper.findOrderInfoByMaterialId(pages, materialId); - } - @Override public List getCusterInfo() { return mesRequestMapper.getCusterInfo(); @@ -423,6 +418,11 @@ public class WmsToMesServiceImpl implements WmsToMesService { return mesRequestMapper.getCusterByNo(custerNo); } + @Override + public List selectPageMesOrder(int currentPage, int currentSize) { + return mesRequestMapper.selectPageMesOrder(currentPage, currentSize); + } + /** * 转换 * diff --git a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java index d42ee7f..f447068 100644 --- a/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java +++ b/lms/nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/workorder/service/impl/PdmBdWorkorderServiceImpl.java @@ -51,7 +51,6 @@ public class PdmBdWorkorderServiceImpl extends ServiceImpl queryMesOrder(PdmBdWorkorderQuery query, PageQuery page) { - IPage pages = new Page<>(page.getPage() + 1, page.getSize()); - pages = wmsToMesService.selectPageMesOrder(pages, query.getMaterialId()); + public IPage queryMesOrder(PdmBdWorkorderQuery query, PageQuery pageQuery) { + Integer page = pageQuery.getPage() + 1; + Integer size = pageQuery.getSize(); + IPage pages = new Page<>(page, size); + int currentPage = page * size; + int currentSize = pageQuery.getPage() == 0 ? 1 : pageQuery.getPage() * size; + List mesOrderInfoList = wmsToMesService.selectPageMesOrder(currentPage, currentSize); + pages.setRecords(mesOrderInfoList); return pages; }