|
|
|
@ -8,11 +8,13 @@ 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;
|
|
|
|
|
import com.aucma.report.service.IMaterialCompletionService;
|
|
|
|
|
import com.aucma.report.service.IReportQualityInspectionService;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Optional;
|
|
|
|
|
|
|
|
|
@ -33,6 +35,12 @@ public class PdaApiController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IBaseProcessStationService baseProcessStationService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IMaterialCompletionService completionService;
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IReportQualityInspectionService qualityService;
|
|
|
|
|
|
|
|
|
|
//壳胆绑定-提交
|
|
|
|
|
@PostMapping("/boxBanding")
|
|
|
|
|
public AjaxResult binding(String boxCode, String innerCode, String loginName) {
|
|
|
|
@ -65,8 +73,6 @@ public class PdaApiController {
|
|
|
|
|
return success("操作成功", boxName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IReportQualityInspectionService qualityService;
|
|
|
|
|
|
|
|
|
|
// 质检查询名称、前工位返修数据
|
|
|
|
|
@PostMapping("/check/select")
|
|
|
|
@ -74,7 +80,7 @@ public class PdaApiController {
|
|
|
|
|
String boxName = service.selectBoxNameByCode(code);
|
|
|
|
|
if (boxName == null) {
|
|
|
|
|
// boxName = "固定数据";
|
|
|
|
|
return error("箱壳条码扫描错误");
|
|
|
|
|
return error("箱壳条码扫描错误");
|
|
|
|
|
}
|
|
|
|
|
List<ReportQualityInspection> list = service.checkSelectRepairInfo(code);
|
|
|
|
|
return success(boxName, list);
|
|
|
|
@ -95,14 +101,18 @@ public class PdaApiController {
|
|
|
|
|
inspection.setMaterialName(checkInfo.getName());
|
|
|
|
|
String measure = checkInfo.getMeasure();
|
|
|
|
|
inspection.setTreatmentMeasure(measure);
|
|
|
|
|
if (measure.equals("3")){ inspection.setIsFlag(1L);}
|
|
|
|
|
if (measure.equals("3")) {
|
|
|
|
|
inspection.setIsFlag(1L);
|
|
|
|
|
}
|
|
|
|
|
//检测人
|
|
|
|
|
inspection.setInspectorCode(checkInfo.getUserName());
|
|
|
|
|
// inspection.setInspectorCode(SecurityUtils.getUsername());
|
|
|
|
|
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);
|
|
|
|
@ -120,6 +130,14 @@ public class PdaApiController {
|
|
|
|
|
inspection.setQualityDefectName(list.get(i).getQualityDefectName());
|
|
|
|
|
}
|
|
|
|
|
qualityService.insertReportQualityInspection(inspection);
|
|
|
|
|
//质检处理措施(3=合格,1=返修)
|
|
|
|
|
if (inspection.getTreatmentMeasure().equals("3")) {
|
|
|
|
|
try {
|
|
|
|
|
completionService.inspectionProcessing(inspection);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
e.printStackTrace();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return success();
|
|
|
|
@ -146,4 +164,15 @@ public class PdaApiController {
|
|
|
|
|
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* PDA查询当班质检数量
|
|
|
|
|
*
|
|
|
|
|
* @param stationCode 质检记录管理
|
|
|
|
|
* @return 质检记录管理集合
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/pdaQueryQuantityNumber")
|
|
|
|
|
public AjaxResult pdaQueryQuantityNumber(String stationCode) {
|
|
|
|
|
return success(qualityService.pdaQueryQuantityNumber(stationCode));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|