修改 月

master
wangh 4 years ago
parent b8bc63b825
commit 2af66356bd

@ -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;
}*/ }

@ -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();
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// 发泡线 // 发泡线

@ -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();
} }

@ -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() {

@ -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