From 3cc4bb4b04aa645c851f9cde28bb392c5f4144c3 Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Mon, 21 Nov 2022 18:22:21 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E9=97=A8=E4=BD=93=E5=BA=93=E5=87=BD?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ruoyi/system/mapper/BaseLocationInfoMapper.java | 9 +++++++++ .../com/ruoyi/system/mapper/RecordOutstoreMapper.java | 9 +++++++++ .../com/ruoyi/system/mapper/ScadaAbsorbMapper.java | 2 +- .../service/impl/BaseLocationInfoServiceImpl.java | 10 ++++++++-- .../service/impl/KBAdsorbDeviceinfoServiceImpl.java | 2 +- .../system/service/impl/RecordOutstoreServiceImpl.java | 7 ++++++- .../resources/mapper/system/BaseLocationInfoMapper.xml | 7 +++++-- .../resources/mapper/system/RecordOutstoreMapper.xml | 5 ++++- .../main/resources/mapper/system/ScadaAbsorbMapper.xml | 5 +++-- 9 files changed, 46 insertions(+), 10 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseLocationInfoMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseLocationInfoMapper.java index ddb8a9a..0707838 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseLocationInfoMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/BaseLocationInfoMapper.java @@ -3,6 +3,7 @@ package com.ruoyi.system.mapper; import java.util.List; import com.ruoyi.system.domain.BaseLocationInfo; import com.ruoyi.system.domain.scada.OrderInfo; +import org.apache.ibatis.annotations.Param; /** * 库位信息Mapper接口 @@ -91,4 +92,12 @@ public interface BaseLocationInfoMapper * @return 结果 */ public int deleteBaseLocationInfoByObjids(String[] objids); + + /** + * 查询库位信息列表_函数 + * @param in_id + * @param storeCode + * @return + */ + List selectBaseLocationInfoListNew(@Param("in_id") int in_id, @Param("storeCode")String storeCode); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordOutstoreMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordOutstoreMapper.java index 2824535..6ca8a31 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordOutstoreMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/RecordOutstoreMapper.java @@ -1,6 +1,7 @@ package com.ruoyi.system.mapper; import com.ruoyi.system.domain.RecordOutstore; +import org.apache.ibatis.annotations.Param; import java.util.List; @@ -59,4 +60,12 @@ public interface RecordOutstoreMapper * @return 结果 */ public int deleteRecordOutstoreByObjids(String[] objids); + + /** + * 查询出库记录列表 函数 + * @param in_id + * @param storeCode + * @return + */ + List selectRecordOutstoreListNew(@Param("in_id") int in_id,@Param("storeCode") String storeCode); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java index b5cd08f..2ca18aa 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/mapper/ScadaAbsorbMapper.java @@ -23,5 +23,5 @@ public interface ScadaAbsorbMapper { public String selectScadaAdsorbDeviceOEE(int in_id); - public String selectScadaAdsorbDeviceAlarmCount(); + public String selectScadaAdsorbDeviceAlarmCount(int in_id); } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java index 42f9d4b..616b868 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/BaseLocationInfoServiceImpl.java @@ -6,6 +6,7 @@ import com.ruoyi.common.annotation.DataSource; import com.ruoyi.common.enums.DataSourceType; import com.ruoyi.system.domain.scada.OrderInfo; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.BaseLocationInfoMapper; import com.ruoyi.system.domain.BaseLocationInfo; @@ -24,6 +25,9 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService @Autowired private BaseLocationInfoMapper baseLocationInfoMapper; + @Value("${in_id}") + private int in_id; + /** * 查询库位信息 * @@ -45,7 +49,9 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService @Override public List selectBaseLocationInfoList(BaseLocationInfo baseLocationInfo) { - return baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo); +// List baseLocationInfos = baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo); + List baseLocationInfos = baseLocationInfoMapper.selectBaseLocationInfoListNew(in_id,baseLocationInfo.getStoreCode()); + return baseLocationInfos; } /** @@ -57,7 +63,7 @@ public class BaseLocationInfoServiceImpl implements IBaseLocationInfoService @Override @DataSource(value = DataSourceType.SLAVE) public List getPlanInfo(){ - return baseLocationInfoMapper.getPlanInfo(1); + return baseLocationInfoMapper.getPlanInfo(in_id); } /** diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java index 56c6ee2..a460d17 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/KBAdsorbDeviceinfoServiceImpl.java @@ -57,6 +57,6 @@ public class KBAdsorbDeviceinfoServiceImpl implements IKBAdsorbDeviceinfoService @Override public String getAdsorbDeviceAlarmCount(){ - return ScadaAbsorbMapper.selectScadaAdsorbDeviceAlarmCount(); + return ScadaAbsorbMapper.selectScadaAdsorbDeviceAlarmCount(this.in_id); } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordOutstoreServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordOutstoreServiceImpl.java index 87cf04d..925e083 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordOutstoreServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/RecordOutstoreServiceImpl.java @@ -7,6 +7,7 @@ import com.ruoyi.system.domain.RecordOutstore; import com.ruoyi.system.mapper.RecordOutstoreMapper; import com.ruoyi.system.service.IRecordOutstoreService; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.util.List; @@ -23,6 +24,8 @@ public class RecordOutstoreServiceImpl implements IRecordOutstoreService @Autowired private RecordOutstoreMapper recordOutstoreMapper; + @Value("${in_id}") + private int in_id; /** * 查询出库记录 * @@ -44,7 +47,9 @@ public class RecordOutstoreServiceImpl implements IRecordOutstoreService @Override public List selectRecordOutstoreList(RecordOutstore recordOutstore) { - return recordOutstoreMapper.selectRecordOutstoreList(recordOutstore); +// List recordOutstores = recordOutstoreMapper.selectRecordOutstoreList(recordOutstore); + List recordOutstores = recordOutstoreMapper.selectRecordOutstoreListNew(in_id,recordOutstore.getStoreCode()); + return recordOutstores; } /** diff --git a/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml b/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml index 8a11f55..a516d80 100644 --- a/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/BaseLocationInfoMapper.xml @@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" t1.delete_flag, t1.record_time from base_location_info t1 left join IMOS_TE_BOM @SCADA_DBLINK t2 on t1.MATERIAL_TYPE = t2.DETIAL_MATERIAL_CODE - + and t1.location_code like concat(concat('%', #{locationCode}), '%') and t1.location_name like concat(concat('%', #{locationName}), '%') and t1.material_type = #{materialType} @@ -93,7 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where objid = #{objid} - + + SELECT seq_base_location_info.NEXTVAL as objid FROM DUAL diff --git a/ruoyi-system/src/main/resources/mapper/system/RecordOutstoreMapper.xml b/ruoyi-system/src/main/resources/mapper/system/RecordOutstoreMapper.xml index f9eef0d..d6c4259 100644 --- a/ruoyi-system/src/main/resources/mapper/system/RecordOutstoreMapper.xml +++ b/ruoyi-system/src/main/resources/mapper/system/RecordOutstoreMapper.xml @@ -55,7 +55,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" where objid = #{objid} - + +