|
|
@ -4,15 +4,11 @@ import java.math.BigDecimal;
|
|
|
|
import java.text.DateFormat;
|
|
|
|
import java.text.DateFormat;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.time.format.DateTimeFormatter;
|
|
|
|
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
import com.op.common.core.utils.StringUtils;
|
|
|
|
import com.op.quality.domain.QcCheckTaskIncome;
|
|
|
|
import com.op.quality.domain.QcCheckType;
|
|
|
|
import com.op.system.api.domain.quality.ChartDTO;
|
|
|
|
import com.op.system.api.domain.quality.ChartDTO;
|
|
|
|
import com.op.system.api.domain.quality.ChartSeriesDTO;
|
|
|
|
import com.op.system.api.domain.quality.ChartSeriesDTO;
|
|
|
|
import com.op.system.api.domain.quality.FactoryDto;
|
|
|
|
import com.op.system.api.domain.quality.FactoryDto;
|
|
|
@ -319,6 +315,45 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
|
|
|
|
return seriesDTO;
|
|
|
|
return seriesDTO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public List<QcStaticTable> getQmsRateTable(QcStaticTable qcStaticTable) {
|
|
|
|
|
|
|
|
List<QcStaticTable> dtos = qcStaticTableMapper.getQmsRateTable(qcStaticTable);
|
|
|
|
|
|
|
|
for(QcStaticTable dto:dtos){
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(dto.getOrderNo())){
|
|
|
|
|
|
|
|
dto.setOrderNo("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(dto.getIncomeBatchNo())){
|
|
|
|
|
|
|
|
dto.setIncomeBatchNo("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(dto.getMaterialCode())){
|
|
|
|
|
|
|
|
dto.setMaterialCode("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(dto.getMaterialCode())){
|
|
|
|
|
|
|
|
dto.setMaterialCode("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if(StringUtils.isEmpty(dto.getMaterialName())){
|
|
|
|
|
|
|
|
dto.setMaterialName("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(StringUtils.isNotBlank(dto.getSampleQuality())&&!"0.00".equals(dto.getSampleQuality())){
|
|
|
|
|
|
|
|
BigDecimal noOkRate = new BigDecimal(dto.getNoOkNums())
|
|
|
|
|
|
|
|
.multiply(new BigDecimal(100))
|
|
|
|
|
|
|
|
.divide(new BigDecimal(dto.getSampleQuality()),2,BigDecimal.ROUND_HALF_UP);
|
|
|
|
|
|
|
|
dto.setNoOkNumRate(noOkRate.toString()+"%");
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
dto.setNoOkNumRate("-");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return dtos;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
@DS("#header.poolName")
|
|
|
|
|
|
|
|
public List<QcCheckType> getCheckTypeList(String typeCode) {
|
|
|
|
|
|
|
|
return qcStaticTableMapper.getCheckTypeList(typeCode);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private List<String> getHourProductionTitle(QcStaticTable qcStaticTable) {
|
|
|
|
private List<String> getHourProductionTitle(QcStaticTable qcStaticTable) {
|
|
|
|
|
|
|
|
|
|
|
|
// 返回的日期集合
|
|
|
|
// 返回的日期集合
|
|
|
@ -349,4 +384,6 @@ public class QcStaticTableServiceImpl implements IQcStaticTableService {
|
|
|
|
|
|
|
|
|
|
|
|
return dayHours;
|
|
|
|
return dayHours;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|