|
|
|
@ -48,7 +48,7 @@ public class PdaApiController {
|
|
|
|
|
return error("返修中" + countQa + "条未处理,不允许绑定");
|
|
|
|
|
}
|
|
|
|
|
// 查询插入
|
|
|
|
|
return toAjax(service.updateCodeBinding(boxCode,innerCode));
|
|
|
|
|
return toAjax(service.updateCodeBinding(boxCode, innerCode));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/selectGoodsName")
|
|
|
|
@ -63,14 +63,23 @@ public class PdaApiController {
|
|
|
|
|
@Autowired
|
|
|
|
|
private IReportQualityInspectionService qualityService;
|
|
|
|
|
|
|
|
|
|
// 质检查询名称、前工位返修数据
|
|
|
|
|
@PostMapping("/check/select")
|
|
|
|
|
public AjaxResult checkSelect(String code) {
|
|
|
|
|
String boxName = service.selectBoxNameByCode(code);
|
|
|
|
|
if (boxName == null) {
|
|
|
|
|
boxName = "固定数据";
|
|
|
|
|
// return error("箱壳条码扫描错误");
|
|
|
|
|
}
|
|
|
|
|
List<ReportQualityInspection> list = service.checkSelectRepairInfo(code);
|
|
|
|
|
return success(boxName, list);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 质检提交
|
|
|
|
|
@PostMapping("/checkSubmit")
|
|
|
|
|
public AjaxResult checkSubmit(@RequestBody CheckInfoDto checkInfo) {
|
|
|
|
|
List<CheckInfoDto.DefectBeen> list = checkInfo.getList();
|
|
|
|
|
String boxName = service.selectBoxNameByCode(checkInfo.getCode());
|
|
|
|
|
if (boxName==null) {
|
|
|
|
|
return error("箱壳条码扫描错误");
|
|
|
|
|
}
|
|
|
|
|
int size = (list == null || list.isEmpty()) ? 1 : list.size();
|
|
|
|
|
for (int i = 0; i < size; i++) {
|
|
|
|
|
ReportQualityInspection inspection = new ReportQualityInspection();
|
|
|
|
@ -78,7 +87,7 @@ public class PdaApiController {
|
|
|
|
|
// inspection.setMaterialName(boxName);
|
|
|
|
|
inspection.setTreatmentMeasure(checkInfo.getMeasure());
|
|
|
|
|
inspection.setProcessResult(checkInfo.getMeasureName());
|
|
|
|
|
inspection.setIsLowerLine(checkInfo.getOffline());
|
|
|
|
|
|
|
|
|
|
inspection.setInspectorCode(checkInfo.getUserName());
|
|
|
|
|
inspection.setInspectorTime(new Date());
|
|
|
|
|
assert list != null;
|
|
|
|
@ -96,21 +105,20 @@ public class PdaApiController {
|
|
|
|
|
//返修查询质检信息
|
|
|
|
|
@PostMapping("/findCheckInfoByCode")
|
|
|
|
|
public AjaxResult findCheckInfoByCode(String code) {
|
|
|
|
|
List<ReportQualityInspection> list = qualityService.findCheckInfoByCode(code);
|
|
|
|
|
List<ReportQualityInspection> list = service.findCheckInfoByCode(code);
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
return error("扫描条码不正确");
|
|
|
|
|
}
|
|
|
|
|
return success(list);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//返修提交质检信息
|
|
|
|
|
//返修提交质检信息
|
|
|
|
|
@PostMapping("/submitRepair")
|
|
|
|
|
public AjaxResult submitRepair(@RequestBody RepairSubmitInfoDto info) {
|
|
|
|
|
return toAjax(service.submitRepair(info));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private AjaxResult toAjax(int rows) {
|
|
|
|
|
return rows > 0 ? AjaxResult.success() : AjaxResult.error();
|
|
|
|
|
}
|
|
|
|
|