|
|
|
|
@ -1,16 +1,16 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
|
|
<!DOCTYPE mapper
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.ruoyi.system.mapper.BroadDataMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.system.domain.BoxPlanCompletion" id="selectplanCompletion">
|
|
|
|
|
<result property="plan_shift" column="config_name" />
|
|
|
|
|
<result property="planned_number" column="planned_number" />
|
|
|
|
|
<result property="quantity_number" column="config_value" />
|
|
|
|
|
<result property="plan_shift" column="config_name"/>
|
|
|
|
|
<result property="planned_number" column="planned_number"/>
|
|
|
|
|
<result property="quantity_number" column="config_value"/>
|
|
|
|
|
|
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectplanCompletion" resultType="com.ruoyi.system.domain.BoxPlanCompletion">
|
|
|
|
|
select nvl(sum(PLAN_QTY), 0) planned_number,
|
|
|
|
|
nvl(sum(actual_qty), 0) quantity_number,
|
|
|
|
|
@ -49,7 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
group by material_name, Store_Code
|
|
|
|
|
order by material_name
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectOutputByType" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select substr(MATERIAL_NAME,
|
|
|
|
|
case
|
|
|
|
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
group by MATERIAL_NAME
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="getUHullPlanInfo" resultType="com.ruoyi.system.domain.OrderInfo">
|
|
|
|
|
<select id="getUHullPlanInfo" resultType="com.ruoyi.system.domain.OrderInfo">
|
|
|
|
|
select PLAN_NO as plan_code,
|
|
|
|
|
SUM(PLAN_QTY) as plan_number,
|
|
|
|
|
SUM(ACTUAL_QTY) as actual_number,
|
|
|
|
|
@ -95,7 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="fp_selectOrderInfo" resultType="com.ruoyi.system.domain.OrderInfo">
|
|
|
|
|
<select id="fp_selectOrderInfo" resultType="com.ruoyi.system.domain.OrderInfo">
|
|
|
|
|
select substr(MATERIAL_NAME,
|
|
|
|
|
case
|
|
|
|
|
when instr(MATERIAL_NAME, '/', 1, 1) = 0 then instr(MATERIAL_NAME, ',', 1, 1) + 1
|
|
|
|
|
@ -121,8 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="pqk_selectProductInStore" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select MATERIAL_NAME as name ,
|
|
|
|
|
IN_QTY as qty
|
|
|
|
|
@ -150,14 +148,38 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
)
|
|
|
|
|
order by rate desc
|
|
|
|
|
</select>
|
|
|
|
|
<!-- 通过入库查订单 select ORDER_NO as name,
|
|
|
|
|
round(SUM(ACTUAL_QTY) / sum(PLAN_QTY) * 100, 2) as qty
|
|
|
|
|
from IMOS_PR_PLAN
|
|
|
|
|
where ORDER_NO in (
|
|
|
|
|
select IMOS_PR_PRODUCT_IN.ORDER_NO
|
|
|
|
|
from IMOS_PR_PRODUCT_IN
|
|
|
|
|
where TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
|
|
|
|
|
)
|
|
|
|
|
group by ORDER_NO
|
|
|
|
|
order by plan_number desc-->
|
|
|
|
|
<!-- 通过入库查订单 select ORDER_NO as name,
|
|
|
|
|
round(SUM(ACTUAL_QTY) / sum(PLAN_QTY) * 100, 2) as qty
|
|
|
|
|
from IMOS_PR_PLAN
|
|
|
|
|
where ORDER_NO in (
|
|
|
|
|
select IMOS_PR_PRODUCT_IN.ORDER_NO
|
|
|
|
|
from IMOS_PR_PRODUCT_IN
|
|
|
|
|
where TO_CHAR(CREATION_DATE, 'YYYY-MM-DD') = TO_CHAR(SYSDATE, 'YYYY-MM-DD')
|
|
|
|
|
)
|
|
|
|
|
group by ORDER_NO
|
|
|
|
|
order by plan_number desc-->
|
|
|
|
|
|
|
|
|
|
<select id="pqk_selectQualityItem" resultType="com.ruoyi.system.domain.BoxOutput">
|
|
|
|
|
select count(1) as qty,
|
|
|
|
|
QUALITY_DEFECTS_DESC as name
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY
|
|
|
|
|
where ITEM_CODE in (1006, 1001)
|
|
|
|
|
-- and to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
|
|
|
|
|
and to_char(CREATION_DATE, 'yyyy-MM-dd') between to_char(sysdate - 1, 'yyyy-mm-dd') and to_char(sysdate + 1, 'yyyy-mm-dd')
|
|
|
|
|
group by QUALITY_DEFECTS_DESC
|
|
|
|
|
order by qty desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="pqk_selectQualityInfo" resultType="com.ruoyi.system.domain.QualityInfo">
|
|
|
|
|
select PRODUCT_BARCODE as code,
|
|
|
|
|
QUALITY_DEFECTS_DESC as qa,
|
|
|
|
|
base.ITEM_NAME as item,
|
|
|
|
|
to_char(record.CREATION_DATE, 'yyyy-MM-dd') as day,
|
|
|
|
|
case when ALLOW_FLAG = 0 then '不放行' else '放行' end as state
|
|
|
|
|
from IMOS_QA_PRODUCT_QUALITY record
|
|
|
|
|
left join IMOS_QA_QUALITY_ITEM base on record.ITEM_CODE = base.ITEM_CODE
|
|
|
|
|
where record.ITEM_CODE in (1006, 1001)
|
|
|
|
|
and to_char(record.CREATION_DATE, 'yyyy-MM-dd') between to_char(sysdate-1,'yyyy-mm-dd') and to_char(sysdate+1,'yyyy-mm-dd')
|
|
|
|
|
order by record.CREATION_DATE desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|