|
|
|
@ -3,6 +3,8 @@ package com.aucma.api.controller;
|
|
|
|
|
import com.aucma.api.domain.dto.CheckInfoDto;
|
|
|
|
|
import com.aucma.api.domain.dto.RepairSubmitInfoDto;
|
|
|
|
|
import com.aucma.api.service.IPdaBindingService;
|
|
|
|
|
import com.aucma.base.domain.BaseProcessStation;
|
|
|
|
|
import com.aucma.base.service.IBaseProcessStationService;
|
|
|
|
|
import com.aucma.common.core.domain.AjaxResult;
|
|
|
|
|
import com.aucma.common.utils.StringUtils;
|
|
|
|
|
import com.aucma.report.domain.ReportQualityInspection;
|
|
|
|
@ -28,6 +30,9 @@ public class PdaApiController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IPdaBindingService service;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBaseProcessStationService baseProcessStationService;
|
|
|
|
|
|
|
|
|
|
//壳胆绑定-提交
|
|
|
|
|
@PostMapping("/boxBanding")
|
|
|
|
|
public AjaxResult binding(String boxCode, String innerCode, String loginName) {
|
|
|
|
@ -84,6 +89,9 @@ public class PdaApiController {
|
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
|
|
|
ReportQualityInspection inspection = new ReportQualityInspection();
|
|
|
|
|
inspection.setBarCode(checkInfo.getCode());
|
|
|
|
|
//检验前一工位是否已完成质检
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inspection.setMaterialName(checkInfo.getName());
|
|
|
|
|
String measure = checkInfo.getMeasure();
|
|
|
|
|
inspection.setTreatmentMeasure(measure);
|
|
|
|
@ -93,12 +101,21 @@ public class PdaApiController {
|
|
|
|
|
inspection.setInspectorTime(new Date());
|
|
|
|
|
inspection.setStationCode(checkInfo.getStationCode());
|
|
|
|
|
inspection.setGroupCode(checkInfo.getTeamCode());
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
BaseProcessStation processStation = new BaseProcessStation();
|
|
|
|
|
processStation.setParentId(checkInfo.getStationCode());
|
|
|
|
|
List<BaseProcessStation> processStations = baseProcessStationService.selectBaseProcessStationList(processStation);
|
|
|
|
|
inspection.setProcessCode(processStations.get(0).getProcessCode());
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
assert list != null;
|
|
|
|
|
if (!list.isEmpty()) {
|
|
|
|
|
CheckInfoDto.DefectBeen defectBeen = list.get(i);
|
|
|
|
|
inspection.setSubmitQualtyId(defectBeen.getObjId());
|
|
|
|
|
inspection.setTestItemCode(list.get(i).getStationCode());
|
|
|
|
|
|
|
|
|
|
inspection.setQualityDefectCode(list.get(i).getQualityDefectCode());
|
|
|
|
|
inspection.setQualityDefectName(list.get(i).getQualityDefectName());
|
|
|
|
|
}
|
|
|
|
|