|
|
|
@ -11,27 +11,32 @@
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="homePageInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
|
|
|
|
select bi.OBJ_ID,
|
|
|
|
|
ROWNUM ROWSEQ,
|
|
|
|
|
boi.FACTORY_CODE,
|
|
|
|
|
bi.PRODUCT_LINE_NAME,
|
|
|
|
|
boi.ORDER_CODE,
|
|
|
|
|
boi.SALEORDER_CODE,
|
|
|
|
|
boi.MATERIAL_CODE,
|
|
|
|
|
boi.MATERIAL_NAME,
|
|
|
|
|
TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') PLAN_DATE,
|
|
|
|
|
CASE
|
|
|
|
|
WHEN TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD') THEN 0
|
|
|
|
|
ELSE 1 END STATUS,
|
|
|
|
|
boi.ORDER_AMOUNT,
|
|
|
|
|
boi.COMPLETE_AMOUNT,
|
|
|
|
|
ROUND(boi.COMPLETE_AMOUNT / boi.ORDER_AMOUNT * 100, 0) || '%' RATE
|
|
|
|
|
from BASE_ORDERINFO boi
|
|
|
|
|
JOIN BASE_MATERIALINFO bm ON bm.MATERIAL_CODE = boi.material_code AND bm.DISPO IN ('100')
|
|
|
|
|
left join BASE_PRODUCTLINE bi ON bi.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
|
|
|
|
|
WHERE TO_CHAR(SYSDATE, 'YYYY-MM-DD') >= TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD')
|
|
|
|
|
AND TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') >= TO_CHAR(SYSDATE - 7, 'YYYY-MM-DD')
|
|
|
|
|
ORDER BY boi.BEGIN_DATE DESC
|
|
|
|
|
SELECT ROWNUM ROWSEQ, SD.*
|
|
|
|
|
FROM (
|
|
|
|
|
select bi.OBJ_ID,
|
|
|
|
|
|
|
|
|
|
boi.FACTORY_CODE,
|
|
|
|
|
bf.FACTORY_NAME,
|
|
|
|
|
bi.PRODUCT_LINE_NAME,
|
|
|
|
|
boi.ORDER_CODE,
|
|
|
|
|
boi.SALEORDER_CODE,
|
|
|
|
|
boi.MATERIAL_CODE,
|
|
|
|
|
boi.MATERIAL_NAME,
|
|
|
|
|
TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') PLAN_DATE,
|
|
|
|
|
CASE
|
|
|
|
|
WHEN TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD') THEN 0
|
|
|
|
|
ELSE 1 END STATUS,
|
|
|
|
|
boi.ORDER_AMOUNT,
|
|
|
|
|
boi.COMPLETE_AMOUNT,
|
|
|
|
|
ROUND(boi.COMPLETE_AMOUNT / boi.ORDER_AMOUNT * 100, 0) || '%' RATE
|
|
|
|
|
from BASE_ORDERINFO boi
|
|
|
|
|
JOIN BASE_MATERIALINFO bm ON bm.MATERIAL_CODE = boi.material_code AND bm.DISPO IN ('100')
|
|
|
|
|
left join BASE_PRODUCTLINE bi ON bi.WORK_CENTER_CODE = boi.WORK_CENTER_CODE
|
|
|
|
|
left join BASE_FACTORY bf ON bf.FACTORY_CODE = bi.PLANT_CODE
|
|
|
|
|
WHERE TO_CHAR(SYSDATE, 'YYYY-MM-DD') >= TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD')
|
|
|
|
|
AND TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') >= TO_CHAR(SYSDATE - 7, 'YYYY-MM-DD')
|
|
|
|
|
ORDER BY boi.BEGIN_DATE DESC, RATE
|
|
|
|
|
) SD
|
|
|
|
|
</select>
|
|
|
|
|
<select id="homeColumnarInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
|
|
|
|
SELECT TO_CHAR(boi.BEGIN_DATE, 'YYYY-MM-DD') BEGIN_DATE,
|
|
|
|
@ -54,11 +59,15 @@
|
|
|
|
|
ORDER BY BEGIN_DATE
|
|
|
|
|
</select>
|
|
|
|
|
<select id="homePieChartInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
|
|
|
|
SELECT QUALITY_DEFECT_NAME, SUM
|
|
|
|
|
FROM (
|
|
|
|
|
SELECT QUALITY_DEFECT_NAME, COUNT(*) SUM
|
|
|
|
|
FROM
|
|
|
|
|
REPORT_QUALITY_INSPECTION
|
|
|
|
|
FROM REPORT_QUALITY_INSPECTION
|
|
|
|
|
WHERE QUALITY_DEFECT_NAME IS NOT NULL
|
|
|
|
|
GROUP BY QUALITY_DEFECT_NAME
|
|
|
|
|
ORDER BY SUM
|
|
|
|
|
)
|
|
|
|
|
WHERE ROWNUM <= 5
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="boxFoamingProductionInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
|
|
|
|
|