修改 月

master
wangh 4 years ago
parent d02940844c
commit df43d1d1d5

@ -59,6 +59,10 @@ public class MouthController {
return JSONArray.toJSONString(basePictureLocationService.selectBasePictureLocationList(null));
}
@PostMapping("/selectMonthQANumber")
@ApiOperation("查询本月异常分布")
private String yue_selectMonthQANumber(){
return JSONArray.toJSONString(service.yue_selectMonthQANumber());
}
}

@ -111,4 +111,5 @@ public interface BroadDataMapper {
List<BoxOutput> yue_selectProductInStore();
List<BoxOutput> yue_selectMonthQANumber();
}

@ -92,4 +92,6 @@ public interface IBroadDataService {
List<BoxOutput> yue_selectProductInStore();
int zz_countNightProductIn();
List<BoxOutput> yue_selectMonthQANumber();
}

@ -225,4 +225,9 @@ public class BroadDataServiceImpl implements IBroadDataService
public List<BoxOutput> yue_selectProductInStore() {
return mapper.yue_selectProductInStore();
}
@Override
public List<BoxOutput> yue_selectMonthQANumber() {
return mapper.yue_selectMonthQANumber();
}
}

@ -1405,4 +1405,26 @@ where 600 &lt; ROUND(TO_NUMBER(t1.day - t2.day) * 24 * 60 * 60) - t3.RHYTHM
group by to_char(PRODUCTION_DATE, 'MM')
order by name
</select>
<select id="yue_selectMonthQANumber" resultType="com.ruoyi.system.domain.BoxOutput">
select round(qty / (select count(1)
from IMOS_PR_PRODUCT_BARCODE
where PRODUCTION_DATE &gt; LAST_DAY(ADD_MONTHS(
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
, -1)) + 1) * 100, 2) as qty,
name
from (
select count(1) as qty,
QUALITY_DEFECTS_DESC as name
from IMOS_QA_PRODUCT_QUALITY
where CREATION_DATE &gt; LAST_DAY(ADD_MONTHS(
to_date(to_char(SYSDATE, 'yyyy-MM-dd') || '00:00:00', 'yyyy-MM-dd hh24:mi:ss')
, -1)) + 1
group by QUALITY_DEFECTS_DESC, ITEM_CODE
order by count(1) desc
)
where ROWNUM &lt; 11
</select>
</mapper>
Loading…
Cancel
Save