箱壳自动成型线统计(按小时产量统计)

master
yinq 2 years ago
parent 4293840522
commit 3531fc5abe

@ -14,6 +14,7 @@ import com.ruoyi.system.service.IImosPrPlanService;
import com.ruoyi.system.service.IScadaUhullDeviceinfoService;
import com.ruoyi.system.service.ProductionPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
@ -42,6 +43,9 @@ public class UShellMesController {
private SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
@Value("${in_id}")
private int in_id;
@Autowired
private IMosPrPlanRepository iMosPrPlanRepository;
@ -222,7 +226,8 @@ public class UShellMesController {
calendar.set(Calendar.SECOND, 0);
Date endTime = calendar.getTime();
List<ScadaUkHourData> info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime);
// List<ScadaUkHourData> info = iScadaUkHourDataRepository.findByRecordTimeBetween(beginTime,endTime);
List<ScadaUkHourData> info = imosPrPlanService.findByRecordTimeBetweenNew();
List<ScadaUkHourData> infoList = info.stream().sorted(Comparator.comparing(ScadaUkHourData:: getRecordTime)).collect(Collectors.toList());
infoList.forEach(x->{

@ -6,6 +6,7 @@ import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.ImosPrPlan_MyBatis;
import com.ruoyi.system.domain.scada.OrderInfo;
import com.ruoyi.system.domain.scada.ScadaUkHourData;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.core.annotation.Order;
@ -229,4 +230,7 @@ public interface ImosPrPlanMapper
* @return java.util.List<com.ruoyi.system.domain.scada.OrderInfo>
*/
List<OrderInfo> getAluminumClassPlanInfo(int in_id);
List<ScadaUkHourData> findByRecordTimeBetweenNew(int in_id);
}

@ -3,6 +3,7 @@ package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.ImosPrPlan_MyBatis;
import com.ruoyi.system.domain.scada.OrderInfo;
import com.ruoyi.system.domain.scada.ScadaUkHourData;
/**
* Service
@ -289,4 +290,10 @@ public interface IImosPrPlanService
* @return java.util.List<com.ruoyi.system.domain.scada.OrderInfo>
*/
List<OrderInfo> getLinerInventoryInfo();
/**
* 线
* @return
*/
List<ScadaUkHourData> findByRecordTimeBetweenNew();
}

@ -8,6 +8,7 @@ import com.alibaba.fastjson.JSONArray;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.scada.OrderInfo;
import com.ruoyi.system.domain.scada.ScadaUkHourData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
@ -766,6 +767,11 @@ public class ImosPrPlanServiceImpl implements IImosPrPlanService
return imosPrPlanMapper.getLinerInventoryInfo(in_id);
}
@Override
public List<ScadaUkHourData> findByRecordTimeBetweenNew() {
return imosPrPlanMapper.findByRecordTimeBetweenNew(in_id);
}
@Override
@DataSource(value = DataSourceType.MASTER)
public List<OrderInfo> getAbsorbHourOutPutByDevice() {

@ -485,4 +485,7 @@ SELECT * FROM TABLE( SCADA_ABSORB_PLAN_QUERY_NEW(#{in_id}) )
<select id="getPlanInfoToday" resultMap="OrderInfoResult">
SELECT * FROM TABLE(scada_absorb_plan_daily())
</select>
<select id="findByRecordTimeBetweenNew" resultType="com.ruoyi.system.domain.scada.ScadaUkHourData">
SELECT * FROM TABLE(SCADA_UK_HOUR_DATA_new(#{in_id}))
</select>
</mapper>
Loading…
Cancel
Save