|
|
|
@ -1569,7 +1569,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增FAI明细记录信息 |
|
|
|
qcMapper.saveFAIDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -1642,7 +1646,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增FAI明细记录信息 |
|
|
|
qcMapper.saveFAIDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -1706,7 +1714,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增IPQC明细记录信息 |
|
|
|
qcMapper.saveFAIDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -1959,7 +1971,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增FQC明细记录信息 |
|
|
|
qcMapper.saveFQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2031,7 +2047,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增FQC明细记录信息 |
|
|
|
qcMapper.saveFQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2095,7 +2115,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增FQC明细记录信息 |
|
|
|
qcMapper.saveFQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2369,7 +2393,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增IPQC明细记录信息 |
|
|
|
qcMapper.saveIPQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2393,10 +2421,6 @@ public class QcServiceImpl implements QcService { |
|
|
|
data.setInspectionCycle(partAttribute.get(0).getInspectionCycle()); |
|
|
|
} |
|
|
|
// 获取抽样数量 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果该检验模板有维护抽样方案 |
|
|
|
if (StringUtils.isNotBlank(partAttribute.get(0).getSamplingProgrammeNo())) { |
|
|
|
QcSamplingInspectionProgrammeData samplingInspectionProgrammeData = new QcSamplingInspectionProgrammeData(); |
|
|
|
@ -2410,8 +2434,6 @@ public class QcServiceImpl implements QcService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
else if (partAttribute.get(0).getDefaultSamplingQuantity() != null) { |
|
|
|
// 没有维护抽样方案,再根据默认抽样数来确定 |
|
|
|
data.setSamplingQty(partAttribute.get(0).getDefaultSamplingQuantity()); |
|
|
|
@ -2448,7 +2470,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增IPQC明细记录信息 |
|
|
|
qcMapper.saveIPQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2512,7 +2538,11 @@ public class QcServiceImpl implements QcService { |
|
|
|
faiRecordData.setMaxValue(itemList.get(j).getMaxValue()); // 最大值 |
|
|
|
faiRecordData.setValueType(itemList.get(j).getValueType()); // 检测值类型 |
|
|
|
faiRecordData.setValueTypeDb(itemList.get(j).getValueTypeDb()); |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
if (itemList.get(j).getItemSamplingQuantity() == null) { |
|
|
|
faiRecordData.setSamplingQty(data.getSamplingQty()); // 抽样数量 |
|
|
|
} else { |
|
|
|
faiRecordData.setSamplingQty(itemList.get(j).getItemSamplingQuantity()); // 抽样数量 |
|
|
|
} |
|
|
|
// 新增IPQC明细记录信息 |
|
|
|
qcMapper.saveIPQCDetailedRecord(faiRecordData); |
|
|
|
} |
|
|
|
@ -2778,7 +2808,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
List<QcSamplingInspectionProgrammeData> dataList = qcMapper.searchSamplingProgrammeDetails(samplingInspectionProgrammeData); |
|
|
|
// 根据抽样方案确定抽样数 |
|
|
|
for (QcSamplingInspectionProgrammeData programmeData : dataList) { |
|
|
|
if (programmeData.getSamplingLevelNo().equals(partAttribute.get(0).getSamplingLevelNo()) && (recordData.getRollQty().compareTo(programmeData.getMinQty()) == 1 || recordData.getRollQty().compareTo(programmeData.getMinQty()) == 0) && (recordData.getRollQty().compareTo(programmeData.getMaxQty()) == -1 || recordData.getRollQty().compareTo(programmeData.getMaxQty()) == 0) ){ |
|
|
|
if (programmeData.getSamplingLevelNo().equals(partAttribute.get(0).getSamplingLevelNo()) && (recordData.getRollCount().compareTo(programmeData.getMinQty()) == 1 || recordData.getRollCount().compareTo(programmeData.getMinQty()) == 0) && (recordData.getRollCount().compareTo(programmeData.getMaxQty()) == -1 || recordData.getRollCount().compareTo(programmeData.getMaxQty()) == 0) ){ |
|
|
|
qcFAIRecordData.setSamplingQty(programmeData.getSamplingQty()); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2787,7 +2817,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcFAIRecordData.setSamplingQty(partAttribute.get(0).getDefaultSamplingQuantity()); |
|
|
|
} else if (partAttribute.get(0).getDefaultSamplingProportion() != null) { |
|
|
|
// 也没有维护默认抽样数,最后根据默认抽样比例来确定 |
|
|
|
BigDecimal d = partAttribute.get(0).getDefaultSamplingProportion().multiply(qcFAIRecordData.getRollQty()).divide(new BigDecimal(100), 3, BigDecimal.ROUND_HALF_UP); |
|
|
|
BigDecimal d = partAttribute.get(0).getDefaultSamplingProportion().multiply(qcFAIRecordData.getRollCount()).divide(new BigDecimal(100), 3, BigDecimal.ROUND_HALF_UP); |
|
|
|
qcFAIRecordData.setSamplingQty(d); |
|
|
|
} |
|
|
|
|
|
|
|
@ -2841,7 +2871,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
List<QcSamplingInspectionProgrammeData> dataList = qcMapper.searchSamplingProgrammeDetails(samplingInspectionProgrammeData); |
|
|
|
// 根据抽样方案确定抽样数 |
|
|
|
for (QcSamplingInspectionProgrammeData programmeData : dataList) { |
|
|
|
if (programmeData.getSamplingLevelNo().equals(familyAttribute.get(0).getSamplingLevelNo()) && (recordData.getRollQty().compareTo(programmeData.getMinQty()) == 1 || recordData.getRollQty().compareTo(programmeData.getMinQty()) == 0) && (recordData.getRollQty().compareTo(programmeData.getMaxQty()) == -1 || recordData.getRollQty().compareTo(programmeData.getMaxQty()) == 0) ){ |
|
|
|
if (programmeData.getSamplingLevelNo().equals(familyAttribute.get(0).getSamplingLevelNo()) && (recordData.getRollCount().compareTo(programmeData.getMinQty()) == 1 || recordData.getRollCount().compareTo(programmeData.getMinQty()) == 0) && (recordData.getRollCount().compareTo(programmeData.getMaxQty()) == -1 || recordData.getRollCount().compareTo(programmeData.getMaxQty()) == 0) ){ |
|
|
|
qcFAIRecordData.setSamplingQty(programmeData.getSamplingQty()); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -2850,7 +2880,7 @@ public class QcServiceImpl implements QcService { |
|
|
|
qcFAIRecordData.setSamplingQty(familyAttribute.get(0).getDefaultSamplingQuantity()); |
|
|
|
} else if (familyAttribute.get(0).getDefaultSamplingProportion() != null) { |
|
|
|
// 也没有维护默认抽样数,最后根据默认抽样比例来确定 |
|
|
|
qcFAIRecordData.setSamplingQty(familyAttribute.get(0).getDefaultSamplingProportion().multiply(qcFAIRecordData.getRollQty()).divide(new BigDecimal(100),3,BigDecimal.ROUND_HALF_UP)); |
|
|
|
qcFAIRecordData.setSamplingQty(familyAttribute.get(0).getDefaultSamplingProportion().multiply(qcFAIRecordData.getRollCount()).divide(new BigDecimal(100),3,BigDecimal.ROUND_HALF_UP)); |
|
|
|
} |
|
|
|
|
|
|
|
// 获取根据该检验模板下维护的检验项目 |
|
|
|
|