修改 总装

master
wangh 4 years ago
parent f884b41107
commit e3a5edc0b5

@ -68,16 +68,30 @@ public class BoxBroadController {
@ApiOperation("箱壳按小时查询产量") @ApiOperation("箱壳按小时查询产量")
public String selectOutputByTime() { public String selectOutputByTime() {
List<BoxOutput> info = service.selectOutputByTime(); List<BoxOutput> info = service.selectOutputByTime();
int qty = BroadDruidServiceImpl.selectNowXkOutPut(); BoxOutput boxOutput= info.get(0);
info.remove(0);
int qty = BroadDruidServiceImpl.selectNowXkOutPut();//实时的数量
if (info.isEmpty()){//只有7.30
boxOutput.setName("7:30");
boxOutput.setQty(qty);
}else {
BoxOutput boxOutputSize = info.get(info.size() - 1);
String hName=boxOutputSize.getName();
String newName=hName.substring(0,hName.indexOf(":"));
BoxOutput boxOutputNow=new BoxOutput();
BoxOutput boxOutput=info.get(info.size()-1); boxOutputNow.setName((Integer.parseInt(newName)+1)+":30");
boxOutput.setQty(qty+boxOutput.getQty()); boxOutputNow.setQty(qty-boxOutputSize.getRecord_qty());
info.add(boxOutputNow);
}
String jsonInfo = JSONArray.toJSONString(info); String jsonInfo = JSONArray.toJSONString(info);
System.out.println("根据型号统计产量:" + jsonInfo); System.out.println("根据型号统计产量:" + jsonInfo);
return jsonInfo; return jsonInfo;
} }
@PostMapping("/getProductPlanInfo") @PostMapping("/getProductPlanInfo")
@ApiOperation("箱壳工单详情") @ApiOperation("箱壳工单详情")
public String getProductPlanInfo() { public String getProductPlanInfo() {

@ -7,6 +7,7 @@ package com.ruoyi.system.domain;
public class BoxOutput { public class BoxOutput {
private String name; private String name;
private int qty; private int qty;
private int record_qty;
private double rate; private double rate;
public String getName() { public String getName() {
@ -32,4 +33,12 @@ public class BoxOutput {
public void setRate(double rate) { public void setRate(double rate) {
this.rate = rate; this.rate = rate;
} }
public int getRecord_qty() {
return record_qty;
}
public void setRecord_qty(int record_qty) {
this.record_qty = record_qty;
}
} }

@ -76,4 +76,6 @@ public interface BroadDataMapper {
List<BoxOutput> selectOneBadRateByDay(); List<BoxOutput> selectOneBadRateByDay();
BoxOutput selectOutputByTimeDY(); BoxOutput selectOutputByTimeDY();
} }

@ -60,4 +60,6 @@ public interface IBroadDataService {
List<BoxOutput> selectOneBadRateByDay(); List<BoxOutput> selectOneBadRateByDay();
BoxOutput selectOutputByTimeDY(); BoxOutput selectOutputByTimeDY();
} }

@ -38,6 +38,8 @@ public class BroadDataServiceImpl implements IBroadDataService
return mapper.selectOutputByType(); return mapper.selectOutputByType();
} }
@Override @Override
public List<OrderInfo> getUHullPlanInfo(String id) { public List<OrderInfo> getUHullPlanInfo(String id) {
return mapper.getUHullPlanInfo(id); return mapper.getUHullPlanInfo(id);

@ -25,7 +25,7 @@ public class BroadDruidServiceImpl implements IBroadDruidService {
int qty=mapper.selectXK_H_QTY(); //上一条 int qty=mapper.selectXK_H_QTY(); //上一条
int zsQty=mapper.selectNowXkOutPut1(); int zsQty=mapper.selectNowXkOutPut1();
int cha=nowOut-qty; int cha=nowOut-qty;
mapper.insertXK_H_QTY(boxOutput.getName(),zsQty,cha<0?0:cha,zsQty); mapper.insertXK_H_QTY(boxOutput.getName(),zsQty,cha<0?0:cha,nowOut);
} }
@Override @Override

@ -148,8 +148,9 @@
where ROWNUM = 1) where ROWNUM = 1)
group by TO_CHAR(CREATION_DATE, 'hh24') group by TO_CHAR(CREATION_DATE, 'hh24')
</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 from HAIWEI.XK_H_QTY xhq select H_NAME as name ,QTY_C as qty,ZS_C as record_qty from HAIWEI.XK_H_QTY xhq
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1 left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1
where xhq.CREATE_TIME between case when sysdate &lt;= wb.W_END then W_START else W_END end where xhq.CREATE_TIME between case when sysdate &lt;= wb.W_END then W_START else W_END end
and case when sysdate &lt;= wb.W_END then W_END else B_END end and case when sysdate &lt;= wb.W_END then W_END else B_END end
@ -436,7 +437,7 @@
<select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput"> <select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput">
select (TO_CHAR(SYSDATE, 'hh24') || ':30') as name, select (TO_CHAR(SYSDATE, 'hh24')-1 || ':30') as name,
nvl(sum(actual_qty), 0) as qty nvl(sum(actual_qty), 0) as qty
from IMOS.IMOS_PR_PLAN xhq from IMOS.IMOS_PR_PLAN xhq
left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1 left join (select * from haiwei.BASE_DAY_WBTIME where ROWNUM = 1 order by CREATE_TIME desc) wb on 1 = 1

Loading…
Cancel
Save