|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.aucma.base.domain.BaseProductLine;
|
|
|
|
|
|
|
|
import com.aucma.base.service.IBaseProductLineService;
|
|
|
|
import com.aucma.common.utils.StringUtils;
|
|
|
|
import com.aucma.common.utils.StringUtils;
|
|
|
|
import com.aucma.report.domain.BoxTemperatureHistory;
|
|
|
|
import com.aucma.report.domain.BoxTemperatureHistory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
@ -23,6 +25,9 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private ReportQualityInspectionMapper reportQualityInspectionMapper;
|
|
|
|
private ReportQualityInspectionMapper reportQualityInspectionMapper;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
|
|
|
private IBaseProductLineService productLineService;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 查询质检记录管理
|
|
|
|
* 查询质检记录管理
|
|
|
|
*
|
|
|
|
*
|
|
|
@ -116,5 +121,37 @@ public class ReportQualityInspectionServiceImpl implements IReportQualityInspect
|
|
|
|
return reportQualityInspectionMapper.selectReportQualityInspectionByBarcode(barcode);
|
|
|
|
return reportQualityInspectionMapper.selectReportQualityInspectionByBarcode(barcode);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 检验前一工位是否已完成质检
|
|
|
|
|
|
|
|
* @param boxCode
|
|
|
|
|
|
|
|
* @param stationCode
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public String checkBeforeStationInspection(String boxCode, String stationCode) {
|
|
|
|
|
|
|
|
String result = null;
|
|
|
|
|
|
|
|
List<BaseProductLine> productLineList = productLineService.selectReportQualityStationCode(new BaseProductLine());
|
|
|
|
|
|
|
|
int markLocation = 0;
|
|
|
|
|
|
|
|
for (int i = 0; i < productLineList.size(); i++) {
|
|
|
|
|
|
|
|
if (productLineList.get(i).getProductLineCode().equals(stationCode)){
|
|
|
|
|
|
|
|
markLocation = i;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (markLocation <= 1){
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
BaseProductLine productLineInfo = productLineList.get(markLocation - 1);
|
|
|
|
|
|
|
|
ReportQualityInspection inspection = new ReportQualityInspection();
|
|
|
|
|
|
|
|
inspection.setBarCode(boxCode);
|
|
|
|
|
|
|
|
inspection.setStationCode(productLineInfo.getProductLineCode());
|
|
|
|
|
|
|
|
inspection.setTreatmentMeasure("3");
|
|
|
|
|
|
|
|
List<ReportQualityInspection> qualityInspections = this.selectReportQualityInspectionList(inspection);
|
|
|
|
|
|
|
|
if (qualityInspections.size() == 0){
|
|
|
|
|
|
|
|
result = productLineInfo.getProductLineName() + "工位未完成质检!";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println("检验前一工位是否已完成质检:" + boxCode + "-" + stationCode + "-" + result);
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|