Merge remote-tracking branch 'origin/master'

master
夜笙歌 3 years ago
commit 0e3d40c2e8

@ -63,14 +63,14 @@ public class BoxBroadController {
return jsonInfo; return jsonInfo;
} }
/* @PostMapping("/selectOutputByTime") @PostMapping("/selectOutputByTime")
@ApiOperation("箱壳按小时查询产量") @ApiOperation("箱壳按小时查询产量")
public String selectOutputByTime() { public String selectOutputByTime() {
Integer state=BroadDruidServiceImpl.selectTeamGroups(); Integer state=BroadDruidServiceImpl.selectTeamGroups();
if (state==0){ if (state==0){
List<BoxOutput> info = service.selectOutputByTime(); return JSONArray.toJSONString(service.selectOutputByTime());
} }
return JSONArray.toJSONString(); return JSONArray.toJSONString(service.selectOutputByTime1());
// BoxOutput boxOutput= info.get(0); // BoxOutput boxOutput= info.get(0);
// info.remove(0); // info.remove(0);
// int qty = BroadDruidServiceImpl.selectNowXkOutPut();//实时的数量 // int qty = BroadDruidServiceImpl.selectNowXkOutPut();//实时的数量
@ -90,7 +90,7 @@ public class BoxBroadController {
// String jsonInfo = JSONArray.toJSONString(info); // String jsonInfo = JSONArray.toJSONString(info);
// System.out.println("根据型号统计产量:" + jsonInfo); // System.out.println("根据型号统计产量:" + jsonInfo);
// return jsonInfo; // return jsonInfo;
}*/ }

@ -2,6 +2,7 @@ package com.ruoyi.system.mapper;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.BaseQi; import com.ruoyi.system.domain.BaseQi;
import com.ruoyi.system.domain.MTKBeen;
/** /**
* -Mapper * -Mapper
@ -59,5 +60,5 @@ public interface BaseQiMapper
*/ */
public int deleteBaseQiByIds(String[] ids); public int deleteBaseQiByIds(String[] ids);
List<BaseQi> selectBaseQiList1(); List<MTKBeen> selectBaseQiList1();
} }

@ -21,6 +21,7 @@ public interface BroadDataMapper {
List<OrderInfo> getUHullPlanInfo(String id); List<OrderInfo> getUHullPlanInfo(String id);
List<BoxOutput> selectOutputByTime(); List<BoxOutput> selectOutputByTime();
List<BoxOutput> selectOutputByTime1();
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 发泡线 // 发泡线

@ -2,6 +2,7 @@ package com.ruoyi.system.service;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.BaseQi; import com.ruoyi.system.domain.BaseQi;
import com.ruoyi.system.domain.MTKBeen;
/** /**
* -Service * -Service
@ -59,5 +60,5 @@ public interface IBaseQiService
*/ */
public int deleteBaseQiById(Long id); public int deleteBaseQiById(Long id);
List<BaseQi> selectBaseQiList1(); List<MTKBeen> selectBaseQiList1();
} }

@ -20,6 +20,7 @@ public interface IBroadDataService {
List<OrderInfo> getUHullPlanInfo(String id); List<OrderInfo> getUHullPlanInfo(String id);
List<BoxOutput> selectOutputByTime(); List<BoxOutput> selectOutputByTime();
List<BoxOutput> selectOutputByTime1();
@ -94,4 +95,6 @@ public interface IBroadDataService {
int zz_countNightProductIn(); int zz_countNightProductIn();
List<BoxOutput> yue_selectMonthQANumber(); List<BoxOutput> yue_selectMonthQANumber();
} }

@ -1,6 +1,8 @@
package com.ruoyi.system.service.impl; package com.ruoyi.system.service.impl;
import java.util.List; import java.util.List;
import com.ruoyi.system.domain.MTKBeen;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BaseQiMapper; import com.ruoyi.system.mapper.BaseQiMapper;
@ -93,7 +95,7 @@ public class BaseQiServiceImpl implements IBaseQiService
} }
@Override @Override
public List<BaseQi> selectBaseQiList1() { public List<MTKBeen> selectBaseQiList1() {
return baseQiMapper.selectBaseQiList1(); return baseQiMapper.selectBaseQiList1();
} }
} }

@ -49,6 +49,10 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<BoxOutput> selectOutputByTime() { public List<BoxOutput> selectOutputByTime() {
return mapper.selectOutputByTime(); return mapper.selectOutputByTime();
} }
@Override
public List<BoxOutput> selectOutputByTime1() {
return mapper.selectOutputByTime1();
}
@Override @Override
public List<OrderInfo> xk_selectStockOccupancy() { public List<OrderInfo> xk_selectStockOccupancy() {

@ -16,8 +16,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select id, year_name, rate, type from base_qi select id, year_name, rate, type from base_qi
</sql> </sql>
<select id="selectBaseQiList1" resultMap="BaseQiResult"> <resultMap id="MTKBeen" type="com.ruoyi.system.domain.MTKBeen">
select id, year_name, rate, sdd.DICT_LABEL <result column="code" property="code"/>
<collection property="list" javaType="java.util.List" resultMap="BoxOutputBeen"/>
</resultMap>
<resultMap id="BoxOutputBeen" type="com.ruoyi.system.domain.BoxOutput">
<result column="name" property="name"/>
<result column="qty" property="qty"/>
<result column="rate" property="rate"/>
</resultMap>
<select id="selectBaseQiList1" resultMap="MTKBeen">
select year_name as name , rate , sdd.DICT_LABEL as code
from base_qi bq from base_qi bq
left join SYS_DICT_DATA sdd on TYPE = sdd.DICT_VALUE left join SYS_DICT_DATA sdd on TYPE = sdd.DICT_VALUE
and sdd.DICT_TYPE = 'quality_improvement_name' and sdd.DICT_TYPE = 'quality_improvement_name'

@ -67,7 +67,7 @@
when instr(name, '/', 1, 1) = 0 then instr(name, ',', 1, 1) + 1 when instr(name, '/', 1, 1) = 0 then instr(name, ',', 1, 1) + 1
else instr(name, '/', 1, 1) + 1 else instr(name, '/', 1, 1) + 1
end) as name, end) as name,
sum(QTY3) sum(QTY3) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD xhq from IMOS.BASE_BOX_OUTPUT_RECORD xhq
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb
on 1 = 1 on 1 = 1
@ -111,11 +111,121 @@
</select> </select>
<select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput"> <select id="selectOutputByTime" resultType="com.ruoyi.system.domain.BoxOutput">
select H_NAME as name ,QTY_C as qty,ZS_C as record_qty from HAIWEI.XK_H_QTY xhq select '07:30' as name, nvl(sum(QTY3),0) as qty
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb on 1 = 1 from IMOS.BASE_BOX_OUTPUT_RECORD
where xhq.CREATE_TIME between case when sysdate &lt;= wb.W_END then W_START else W_END end where CREATE_TIME &gt;= to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
and case when sysdate &lt;= wb.W_END then W_END else B_END end and CREATE_TIME &lt; to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '08:30:00', 'yyyy-MM-dd hh24:mi:ss')
order by xhq.CREATE_TIME and qty3>0
union
select '08:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '08:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '09:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '09:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '09:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '10:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '10:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '10:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '11:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '11:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '11:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '12:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '12:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '12:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '13:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '13:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '13:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '14:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '14:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '14:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '15:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '15:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '15:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '16:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '16:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '16:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '17:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '17:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '17:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '18:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
union
select '18:30' as name, nvl(sum(QTY3),0) as qty
from IMOS.BASE_BOX_OUTPUT_RECORD
where CREATE_TIME &gt;= to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '18:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and CREATE_TIME &lt; to_date(to_char(SYSDATE
, 'yyyy-MM-dd') || '19:30:00'
, 'yyyy-MM-dd hh24:mi:ss')
and qty3>0
</select> </select>

Loading…
Cancel
Save