看板修复

master
zhaoxiaolin 3 months ago
parent b0db7c9e44
commit fd5e4d25e5

@ -143,6 +143,7 @@ public interface QcStaticTableMapper {
Map<String, QcStaticTable> getBPDefectMothMap(QcStaticTable qcStaticTable);
QcStaticTable getBPHzInfo(QcStaticTable qcStaticTable);
QcStaticTable getBPHzInfoPC(QcStaticTable qcStaticTable);
@MapKey("ymdms")
Map<String, QcStaticTable> getBPDefectMothPCMap(QcStaticTable qcStaticTable);
}

@ -1961,18 +1961,18 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
dto.setColumn090100(qcStaticTable.getYearMonth().split("-")[1]);
dto.setMaterialName("白坯");
dto.setWorkCenter("白坯车间");
QcStaticTable hzdto = qcStaticTableMapper.getBPHzInfo(qcStaticTable);
QcStaticTable hzdto = qcStaticTableMapper.getBPHzInfoPC(qcStaticTable);
dto.setSampleQty(hzdto.getSampleQty());
dto.setNoOkNums(hzdto.getNoOkNums());
dto.setNoOkQty(hzdto.getNoOkQty());
dto.setNoOkNumRate(
new BigDecimal(hzdto.getNoOkNums())
new BigDecimal(hzdto.getNoOkQty())
.multiply(new BigDecimal("100"))
.divide(new BigDecimal(hzdto.getSampleQty()),2,BigDecimal.ROUND_HALF_UP)+"%"
);
dto.setOkNumRate(
new BigDecimal("100")
.subtract(
new BigDecimal(hzdto.getNoOkNums())
new BigDecimal(hzdto.getNoOkQty())
.multiply(new BigDecimal("100"))
.divide(new BigDecimal(hzdto.getSampleQty()),2,BigDecimal.ROUND_HALF_UP)
)+"%"

@ -1303,5 +1303,28 @@
and bp.product_group_name ='白坯' and bp.del_flag = '0' and bp.product_desc_zh like '%白坯%'
) t
</select>
<select id="getBPHzInfoPC" resultType="com.op.quality.domain.QcStaticTable">
select
SUM(CASE WHEN t.check_result = 'N' THEN 1 ELSE 0 END) noOkQty,
count(0) sampleQty
from(
select qct.noOk_quality,
qct.sample_quality,
qct.material_code,
qct.check_result,
CONVERT(varchar(10),qct.create_time, 120) ymd
from qc_check_task qct
left join base_product bp on qct.material_code = bp.product_code
where qct.del_flag = '0' and qct.check_type = 'checkTypeLL'
and CONVERT(varchar(7),qct.create_time, 120) = #{yearMonth}
and check_man_code is not null
<if test="materialName != null ">
and (
bp.product_code like concat('%',#{materialName},'%') or
bp.product_desc_zh like concat('%',#{materialName},'%')
)
</if>
and bp.product_group_name ='白坯' and bp.del_flag = '0' and bp.product_desc_zh like '%白坯%'
) t
</select>
</mapper>

Loading…
Cancel
Save