change - 质量报表

master
yinq 10 months ago
parent 64726cd810
commit 873dc4c09f

@ -37,6 +37,17 @@ public class QualityReportController extends BaseController {
return success(list);
}
/**
*
* @param hashMap
* @return
*/
@GetMapping("/qualityDefectsDetailList")
public AjaxResult qualityDefectsDetailList(@RequestParam(required = false) Map hashMap) {
List<HashMap<String, Object>> list = qualityReportService.qualityDefectsDetailList(hashMap);
return success(list);
}
/**
*
* @param hashMap

@ -92,4 +92,11 @@ public interface GeneralReportMapper {
* @return
*/
List<HashMap<String, Object>> foamFillingRecordReportList(Map hashMap);
/**
*
* @param hashMap
* @return
*/
List<HashMap<String, Object>> qualityDefectsDetailList(Map hashMap);
}

@ -55,4 +55,11 @@ public interface IQualityReportService
* @return
*/
List<HashMap<String, Object>> pourRecordReportList(Map hashMap);
/**
*
* @param hashMap
* @return
*/
List<HashMap<String, Object>> qualityDefectsDetailList(Map hashMap);
}

@ -82,4 +82,14 @@ public class QualityReportServiceImpl implements IQualityReportService {
return reportMapper.pourRecordReportList(hashMap);
}
/**
*
* @param hashMap
* @return
*/
@Override
public List<HashMap<String, Object>> qualityDefectsDetailList(Map hashMap) {
return reportMapper.qualityDefectsDetailList(hashMap);
}
}

@ -62,10 +62,10 @@
</select>
<select id="boxFoamingProductionInterface" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT BD.SORT EQUIPMENT_CODE,
VBF.FIXTUREBOXTYPE,
CASE WHEN VBF.FIXTURESTATUS = 1 THEN '正常生产' ELSE '暂停生产' END FIXTURESTATUS,
TO_NUMBER(BCD.CUSTOM_DATA) TARGET,
SELECT VBF.MAINID EQUIPMENT_CODE,
MAX(TP.FIXTUREBOXTYPE) FIXTUREBOXTYPE,
CASE WHEN MAX(VBF.FIXTURESTATUS) = 1 THEN '正常生产' ELSE '暂停生产' END FIXTURESTATUS,
TO_NUMBER(BCD.CUSTOM_DATA) TARGET,
(CASE
WHEN '20:00' > TO_CHAR(SYSDATE, 'HH24:MI') AND TO_CHAR(SYSDATE, 'HH24:MI') >= '08:00'
THEN round(TO_NUMBER(BCD.CUSTOM_DATA) / 12, 0) * (TO_CHAR(SYSDATE, 'HH24') - 7)
@ -74,27 +74,41 @@
WHEN '08:00' > TO_CHAR(SYSDATE, 'HH24:MI')
THEN round(TO_NUMBER(BCD.CUSTOM_DATA) / 12, 0) * (TO_CHAR(SYSDATE, 'HH24') + 5)
END
) PLAN_SUM,
VBF.PRODUCTION PRO_SUM,
VBF.ANHOUR,
VBF.TWOHOUR,
VBF.THREEHOUR,
VBF.FOURHOUR,
VBF.FIVEHOUR,
VBF.SIXHOUR,
VBF.SEVENHOUR,
VBF.EIGHTHOUR,
VBF.NINEHOUR,
VBF.TENHOUR,
VBF.ELEVENHOUR,
VBF.TWELVEHOUR,
VBF.ACTUALVALUE,
TO_CHAR(VBF.UPDATETIME, 'YYYY-MM-DD HH24:MI:SS') UPDATETIME
) PLAN_SUM,
SUM(VBF.ANHOUR + VBF.TWOHOUR + VBF.THREEHOUR + VBF.FOURHOUR + VBF.FIVEHOUR + VBF.SIXHOUR +
VBF.SEVENHOUR +
VBF.EIGHTHOUR +
VBF.NINEHOUR + VBF.TENHOUR + VBF.ELEVENHOUR + VBF.TWELVEHOUR) PRO_SUM,
SUM(VBF.ANHOUR) ANHOUR,
SUM(VBF.TWOHOUR) TWOHOUR,
SUM(VBF.THREEHOUR) THREEHOUR,
SUM(VBF.FOURHOUR) FOURHOUR,
SUM(VBF.FIVEHOUR) FIVEHOUR,
SUM(VBF.SIXHOUR) SIXHOUR,
SUM(VBF.SEVENHOUR) SEVENHOUR,
SUM(VBF.EIGHTHOUR) EIGHTHOUR,
SUM(VBF.NINEHOUR) NINEHOUR,
SUM(VBF.TENHOUR) TENHOUR,
SUM(VBF.ELEVENHOUR) ELEVENHOUR,
SUM(VBF.TWELVEHOUR) TWELVEHOUR,
SUM(VBF.ACTUALVALUE) ACTUALVALUE,
TO_CHAR(MAX(VBF.UPDATETIME), 'YYYY-MM-DD HH24:MI:SS') UPDATETIME
FROM VIEW_BOX_FOAMDATA VBF
LEFT JOIN VIEW_BOX_DEVICEINFO BD ON BD.OBJ_ID = VBF.MAINID
LEFT JOIN BASE_CUSTOM_DATA BCD ON BCD.CUSTOM_CODE = 'XTFP_TARGET_' || #{PRODUCT_LINE_CODE}
LEFT JOIN (SELECT BF.MAINID, BF.FIXTUREBOXTYPE FIXTUREBOXTYPE
FROM VIEW_BOX_FOAMDATA BF
JOIN
(
SELECT MAINID, MAX(UPDATETIME) UPDATETIME
FROM VIEW_BOX_FOAMDATA
WHERE PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}
GROUP BY MAINID
) SV ON SV.MAINID = BF.MAINID AND SV.UPDATETIME = BF.UPDATETIME) TP
ON TP.MAINID = VBF.MAINID
WHERE VBF.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}
ORDER BY BD.SORT
GROUP BY VBF.MAINID, TO_NUMBER(BCD.CUSTOM_DATA)
ORDER BY VBF.MAINID
</select>
<select id="getCurrentTeamTimeList" resultType="java.util.HashMap" parameterType="java.util.HashMap">

@ -36,47 +36,75 @@
ORDER BY ORDER_RATE
</select>
<select id="productionExecutionReportList" resultType="java.util.HashMap">
<select id="productionExecutionReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
</select>
<select id="WIPInquiryReportList" resultType="java.util.HashMap">
<select id="WIPInquiryReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
</select>
<select id="qualityDefectsStatisticalAnalysisList" resultType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
<select id="qualityDefectsStatisticalAnalysisList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT FY.FACTORY_NAME,
BPP.PRODUCT_LINE_NAME,
BP.PRODUCT_LINE_CODE,
BP.PRODUCT_LINE_NAME STATION_NAME,
COUNT(*) INSPECTION_NUMBER,
SUM(REWORK_NUMBER) REWORK_NUMBER,
ROUND((1 - SUM(REWORK_NUMBER) / COUNT(*)) * 100, 0) || '%' RATE
FROM REPORT_QUALITY_INSPECTION RQI
LEFT JOIN BASE_PRODUCTLINE BP ON BP.PRODUCT_LINE_CODE = RQI.STATION_CODE
LEFT JOIN BASE_PRODUCTLINE BPP ON BPP.PRODUCT_LINE_CODE = BP.PARENT_ID
LEFT JOIN BASE_FACTORY FY ON FY.FACTORY_CODE = BPP.PLANT_CODE
<where>
<if test="PRODUCT_LINE_CODE != null and PRODUCT_LINE_CODE != ''">
AND BPP.PRODUCT_LINE_CODE = #{PRODUCT_LINE_CODE}
</if>
<if test="STATION_CODE != null and STATION_CODE != ''">
AND BP.PRODUCT_LINE_CODE = #{STATION_CODE}
</if>
<if test="beginBeginTime != null and beginBeginTime != '' and endBeginTime != null and endBeginTime != ''">
AND TO_CHAR(RQI.INSPECTOR_TIME, 'YYYY-MM-DD HH24:MI:SS') BETWEEN #{beginBeginTime} AND #{endBeginTime}
</if>
</where>
GROUP BY FY.FACTORY_NAME, BPP.PRODUCT_LINE_NAME, BP.PRODUCT_LINE_CODE, BP.PRODUCT_LINE_NAME
ORDER BY PRODUCT_LINE_CODE
</select>
<select id="fewerMistakesReportList" resultType="java.util.HashMap">
<select id="fewerMistakesReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
</select>
<select id="qualityIssuesReportList" resultType="java.util.HashMap">
<select id="qualityIssuesReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
</select>
<select id="productTraceabilityReportList" resultType="java.util.HashMap">
<select id="productTraceabilityReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_MATERIAL_COMPLETION
</select>
<select id="ScanOfflineRecordReportList" resultType="java.util.HashMap">
<select id="ScanOfflineRecordReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_PRODUCT_OFFLINE
</select>
<select id="temperatureRecordReportList" resultType="java.util.HashMap">
<select id="temperatureRecordReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_RECORD_TEMPERATURE
</select>
<select id="pourRecordReportList" resultType="java.util.HashMap">
<select id="pourRecordReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_PERFUSION_RECORD
</select>
<select id="foamFillingRecordReportList" resultType="java.util.HashMap">
<select id="foamFillingRecordReportList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_BOX_LASTSHOTRECORD
ORDER BY CREATE_TIME DESC
</select>
<select id="qualityDefectsDetailList" resultType="java.util.HashMap" parameterType="java.util.HashMap">
SELECT *
FROM VIEW_BOX_FOAMDATARECORD
FROM VIEW_PERFUSION_RECORD
</select>

Loading…
Cancel
Save