Merge remote-tracking branch 'origin/master'

# Conflicts:
#	ruoyi-admin/src/main/resources/templates/broad/box.html
master
夜笙歌 4 years ago
commit ee9ccc3e61

@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.ruoyi.system.domain.*;
import com.ruoyi.system.service.IBroadDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
@ -44,6 +45,11 @@ public class BoxBroadController {
return JSONObject.toJSONString(new EchartsDTO(xAxisInfo, seriesInfo));
}
@PostMapping("/selectStockOccupancy")
@ApiOperation("库存占有率")
public String selectStockOccupancy(){
return JSONArray.toJSONString(service.xk_selectStockOccupancy());
}
@PostMapping("/selectOutputByType")

@ -18,7 +18,15 @@
<style>
.mid {
background: url(../img/mid.png) no-repeat;
background-size: 100% 100%;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
#top-right {
position: absolute;
width: 23.8%;
@ -394,7 +402,6 @@
const rowName1 = '内胆集存库'
const rowName2 = '箱壳集存库'
$(() => {
occupancy()
let url = '/broad/box'
//生产计划工单
autoUpdate(url+"/getProductPlanInfo ", INTERVAL, data => {

@ -42,6 +42,8 @@ public interface BroadDataMapper {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<OrderInfo> xk_selectStockOccupancy();
///////////////////////////////////////////////////////////////////////////
// 6

@ -41,4 +41,6 @@ public interface IBroadDataService {
List<DeviceStation> fp_selectDeviceStation();
List<FPStationHourInfo> fp_selectStationHourInfo();
List<OrderInfo> xk_selectStockOccupancy();
}

@ -48,9 +48,10 @@ public class BroadDataServiceImpl implements IBroadDataService
return mapper.selectOutputByTime();
}
@Override
public List<OrderInfo> xk_selectStockOccupancy() {
return mapper.xk_selectStockOccupancy();
}
///////////////////////////////////////////////////////////////////////////
// 发泡线

@ -24,10 +24,29 @@
and process_code = 1002
and delete_flag = '0'
-- and to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
and CREATION_DATE between
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
and
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
and
CREATION_DATE &gt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
end
and CREATION_DATE &lt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
end
-- CREATION_DATE between
-- to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
-- and
-- to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
group by to_char(plan_date, 'yyyy-MM-dd')
</select>
@ -74,16 +93,36 @@
SUM(ACTUAL_QTY) as qty
from IMOS_PR_PLAN
where
-- to_char(plan_date, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
CREATION_DATE between
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
and
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
CREATION_DATE &gt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
end
and CREATION_DATE &lt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
end
and PROCESS_CODE = 1002
and ACTUAL_QTY!=0
group by MATERIAL_NAME
</select>
<select id="xk_selectStockOccupancy" resultType="com.ruoyi.system.domain.OrderInfo">
select round(count(STORE_BIN) / 3.3, 2) as rate, Store_Code as name
from IMOS_LO_BIN_DETIAL losd
where Store_Code in ('S001', 'S002')
and MATERIAL_STATE = '1'
group by Store_Code
</select>
<select id="getUHullPlanInfo" resultType="com.ruoyi.system.domain.OrderInfo">
select PLAN_NO as plan_code,
substr(MATERIAL_NAME,6,Length(MATERIAL_NAME)) as name,
@ -113,11 +152,28 @@
from IMOS_LO_TASK_HISTORY
where detial_type_code = '1002'
and TASK_TYPE != 'O'
and CREATION_DATE between
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
and
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
and CREATION_DATE &gt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
end
and CREATION_DATE &lt;
case
when to_char(sysdate, 'hh24') &gt; 7 and to_char(sysdate, 'hh24') &lt; 20 then to_date(
to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00',
'yyyy-MM-dd hh24:mi:ss')
when to_char(sysdate, 'hh24') &lt; 7 then to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00',
'yyyy-MM-dd hh24:mi:ss')
else to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '24:00:00', 'yyyy-MM-dd hh24:mi:ss')
end
-- and CREATION_DATE between
-- to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '07:30:00', 'yyyy-MM-dd hh24:mi:ss')
-- and
-- to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '19:30:00', 'yyyy-MM-dd hh24:mi:ss')
)
group by TO_CHAR(CREATION_DATE, 'hh24')
order by name

Loading…
Cancel
Save