Merge remote-tracking branch 'origin/master'

master
夜笙歌 3 years ago
commit aad3e4d66c

@ -54,4 +54,13 @@ public class MTKController {
private String mtk_selectInstoreNumByday(){
return JSONObject.toJSONString(service.zz_selectInstoreNumByday());
}
}
@PostMapping("/selectQATop3")
@ApiOperation("质量分析Top3")
private String mtk_sselectQATop3(){
return JSONArray.toJSONString(service.mtk_sselectQATop3());
}
}

@ -0,0 +1,28 @@
package com.ruoyi.system.domain;
import java.util.List;
/**
* @author wanghao
* @date 2022/7/23 16:31
*/
public class MTKBeen {
private String code;
private List<BoxOutput> list;
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public List<BoxOutput> getList() {
return list;
}
public void setList(List<BoxOutput> list) {
this.list = list;
}
}

@ -91,4 +91,6 @@ public interface BroadDataMapper {
List<BoxOutput> mtk_selectOrderInfoBy3dTatle();
List<BoxOutput> mtk_selectInstoreNumByday();
List<MTKBeen> mtk_sselectQATop3();
}

@ -73,4 +73,6 @@ public interface IBroadDataService {
List<BoxOutput> mtk_selectOrderInfoBy3dTatle();
List<BoxOutput> zz_selectInstoreNumByday();
List<MTKBeen> mtk_sselectQATop3();
}

@ -133,6 +133,11 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<BoxOutput> zz_selectInstoreNumByday() {
return mapper.mtk_selectInstoreNumByday();
}
@Override
public List<MTKBeen> mtk_sselectQATop3() {
return mapper.mtk_sselectQATop3();
}
///////////////////////////////////////////////////////////////////////////
// 总装
///////////////////////////////////////////////////////////////////////////

@ -398,10 +398,10 @@ FROM (select PLAN_NUMBER
<select id="zz_selectLossInfo" resultType="com.ruoyi.system.domain.BoxOutput">
select case
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '10:30:00', 'yyyy-MM-dd hh24:mi:ss')
then
case
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '15:30:00', 'yyyy-MM-dd hh24:mi:ss')
then qty - 60
else qty - 30 end
end as qty ,name
@ -423,16 +423,16 @@ FROM (select PLAN_NUMBER
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t1.rhy &gt; 180
and ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t1.rhy &lt;= 600
union
select case
select nvl(case
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '09:30:00', 'yyyy-MM-dd hh24:mi:ss')
then
case
when sysdate > to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '14:30:00', 'yyyy-MM-dd hh24:mi:ss')
then qty - 2
else qty - 1 end
end as qty,name
end,0) as qty,name
from (
select nvl(count(1)-2,0) as qty, 4 as name
select nvl(count(1),0) as qty, 4 as name
from temp1 t1
left join TEMP1 t2 on t1.row_numbre = t2.row_numbre + 2
where ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t1.rhy &gt; 600)
@ -461,7 +461,11 @@ from (
<select id="selectNowXkOutPut" resultType="com.ruoyi.system.domain.BoxOutput">
select (TO_CHAR(SYSDATE, 'hh24')-1 || ':30') as name,
select (
case when
TO_CHAR(SYSDATE, 'hh24')-1 &lt; 0
then '23' else TO_CHAR(SYSDATE, 'hh24')-1 end
|| ':30') as name,
nvl(sum(actual_qty), 0) as qty
from IMOS.IMOS_PR_PLAN xhq
left join (select * from (select * from haiwei.BASE_DAY_WBTIME order by CREATE_TIME desc) where ROWNUM = 1) wb on 1 = 1
@ -619,16 +623,18 @@ from (
</select>
<select id="mtk_selectOrderInfoBy3dTatle" resultType="com.ruoyi.system.domain.BoxOutput">
select sum(ORDER_QTY) as qty, '订单数量' as name
select count(1) as qty, '订单数量' as name
from IMOS_PR_ORDER
where FINISH_DATE between to_date(to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
union
select sum(ACTUAL_QTY) as qty,
'完成数量' as name
select count(1) as qty, '完成数量' as name
from IMOS_PR_ORDER
where FINISH_DATE between to_date(to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
where FINISH_DATE between to_date(
to_char(SYSDATE - 3, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
and to_date(to_char(SYSDATE - 1, 'yyyy-MM-dd') || '00:00:00',
'yyyy-MM-dd hh24:mi:ss')
and ORDER_QTY - ACTUAL_QTY &lt; 6
union
select round(
(
@ -686,5 +692,91 @@ from (
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(sysdate, 'yyyy-MM-dd')
</select>
<resultMap id="MTKBeen" type="com.ruoyi.system.domain.MTKBeen">
<result column="code" property="code"/>
<collection property="list" javaType="java.util.List" resultMap="BoxOutputBeen" />
</resultMap>
<resultMap id="BoxOutputBeen" type="com.ruoyi.system.domain.BoxOutput">
<result column="name" property="name"/>
<result column="qty" property="qty"/>
</resultMap>
<select id="mtk_sselectQATop3" resultMap="MTKBeen">
-- 1002,内胆预装检漏
-- 1003,安全检测
-- 1001,成品检漏
-- 1005,测温附加检测
-- 1006,成品外观检测
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'成品检漏' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
and ITEM_CODE = '1001'
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 4
union
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'内胆检漏' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
and ITEM_CODE = '1002'
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 4
union
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'安全检测' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
and ITEM_CODE = '1003'
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 4
union
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'测温性能' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
and ITEM_CODE = '1005'
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 4
union
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'成品外观' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
and ITEM_CODE = '1006'
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 4
union
select *
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name,
'柱状图' as code
from IMOS_QA_PRODUCT_QUALITY
where to_char(CREATION_DATE, 'yyyy-MM-dd') = to_char(SYSDATE, 'yyyy-MM-dd')
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc)
where ROWNUM &lt; 11
</select>
</mapper>
Loading…
Cancel
Save