门体库函数

master
yinq 2 years ago
parent eb3fa70986
commit 3cc4bb4b04

@ -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<BaseLocationInfo> selectBaseLocationInfoListNew(@Param("in_id") int in_id, @Param("storeCode")String storeCode);
}

@ -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<RecordOutstore> selectRecordOutstoreListNew(@Param("in_id") int in_id,@Param("storeCode") String storeCode);
}

@ -23,5 +23,5 @@ public interface ScadaAbsorbMapper {
public String selectScadaAdsorbDeviceOEE(int in_id);
public String selectScadaAdsorbDeviceAlarmCount();
public String selectScadaAdsorbDeviceAlarmCount(int in_id);
}

@ -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<BaseLocationInfo> selectBaseLocationInfoList(BaseLocationInfo baseLocationInfo)
{
return baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo);
// List<BaseLocationInfo> baseLocationInfos = baseLocationInfoMapper.selectBaseLocationInfoList(baseLocationInfo);
List<BaseLocationInfo> 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<OrderInfo> getPlanInfo(){
return baseLocationInfoMapper.getPlanInfo(1);
return baseLocationInfoMapper.getPlanInfo(in_id);
}
/**

@ -57,6 +57,6 @@ public class KBAdsorbDeviceinfoServiceImpl implements IKBAdsorbDeviceinfoService
@Override
public String getAdsorbDeviceAlarmCount(){
return ScadaAbsorbMapper.selectScadaAdsorbDeviceAlarmCount();
return ScadaAbsorbMapper.selectScadaAdsorbDeviceAlarmCount(this.in_id);
}
}

@ -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<RecordOutstore> selectRecordOutstoreList(RecordOutstore recordOutstore)
{
return recordOutstoreMapper.selectRecordOutstoreList(recordOutstore);
// List<RecordOutstore> recordOutstores = recordOutstoreMapper.selectRecordOutstoreList(recordOutstore);
List<RecordOutstore> recordOutstores = recordOutstoreMapper.selectRecordOutstoreListNew(in_id,recordOutstore.getStoreCode());
return recordOutstores;
}
/**

@ -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
<where>
<where>
<if test="locationCode != null and locationCode != ''"> and t1.location_code like concat(concat('%', #{locationCode}), '%')</if>
<if test="locationName != null and locationName != ''"> and t1.location_name like concat(concat('%', #{locationName}), '%')</if>
<if test="materialType != null and materialType != ''"> and t1.material_type = #{materialType}</if>
@ -93,7 +93,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<include refid="selectBaseLocationInfoVo"/>
where objid = #{objid}
</select>
<select id="selectBaseLocationInfoListNew" resultMap="BaseLocationInfoResult">
SELECT * FROM TABLE (Base_Location_Info_List_OBJ_N(#{in_id},#{storeCode}))
</select>
<insert id="insertBaseLocationInfo" parameterType="BaseLocationInfo">
<selectKey keyProperty="objid" resultType="long" order="BEFORE">
SELECT seq_base_location_info.NEXTVAL as objid FROM DUAL

@ -55,7 +55,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where objid = #{objid}
<include refid="orderByRecordDate"/>
</select>
<select id="selectRecordOutstoreListNew" resultMap="RecordOutstoreResult">
SELECT * FROM TABLE (Record_Outstore_List_OBJ_N(#{in_id}, #{storeCode}))
</select>
<insert id="insertRecordOutstore" parameterType="RecordOutstore">
<!--<selectKey keyProperty="objid" resultType="long" order="BEFORE">
SELECT seq_record_outstore.NEXTVAL as objid FROM DUAL

@ -36,8 +36,9 @@
</select>
<select id="selectScadaAdsorbDeviceAlarmCount" resultType="String">
select count(*) as count from SCADA_DEVICE_ALARMINFO where DEVICEID = '1#'and BEGINTIME BETWEEN to_date( to_char( SYSDATE, 'yyyy-MM-dd' ) || '00:00:00', 'yyyy-MM-dd hh24:mi:ss' )
AND to_date( to_char( SYSDATE, 'yyyy-MM-dd' ) || '23:59:59', 'yyyy-MM-dd hh24:mi:ss' )
SELECT * FROM TABLE ( Adsorb_Device_Alarm_Count_NEW(#{in_id}) )
-- select count(*) as count from SCADA_DEVICE_ALARMINFO where DEVICEID = '1#'and BEGINTIME BETWEEN to_date( to_char( SYSDATE, 'yyyy-MM-dd' ) || '00:00:00', 'yyyy-MM-dd hh24:mi:ss' )
-- AND to_date( to_char( SYSDATE, 'yyyy-MM-dd' ) || '23:59:59', 'yyyy-MM-dd hh24:mi:ss' )
</select>

Loading…
Cancel
Save