|
|
|
@ -21,7 +21,7 @@ import static com.aucma.common.core.domain.AjaxResult.success;
|
|
|
|
|
* @date 2023/11/14 9:28
|
|
|
|
|
*/
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping(("/api"))
|
|
|
|
|
@RequestMapping("/api")
|
|
|
|
|
public class PdaApiController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@ -47,6 +47,15 @@ public class PdaApiController {
|
|
|
|
|
return success();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/selectGoodsName")
|
|
|
|
|
public AjaxResult selectGoodsName(String code) {
|
|
|
|
|
String boxName = service.selectBoxNameByCode(code);
|
|
|
|
|
if (boxName == null) {
|
|
|
|
|
return error("查询失败,条码不正确");
|
|
|
|
|
}
|
|
|
|
|
return success("操作成功", boxName);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private IReportQualityInspectionService qualityService;
|
|
|
|
|
|
|
|
|
@ -54,15 +63,15 @@ public class PdaApiController {
|
|
|
|
|
@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("箱壳条码扫描错误");
|
|
|
|
|
}
|
|
|
|
|
// 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();
|
|
|
|
|
inspection.setBarCode(checkInfo.getCode());
|
|
|
|
|
inspection.setMaterialName(boxName);
|
|
|
|
|
// inspection.setMaterialName(boxName);
|
|
|
|
|
inspection.setTreatmentMeasure(checkInfo.getMeasure());
|
|
|
|
|
inspection.setProcessResult(checkInfo.getMeasureName());
|
|
|
|
|
inspection.setIsLowerLine(checkInfo.getOffline());
|
|
|
|
@ -83,8 +92,8 @@ public class PdaApiController {
|
|
|
|
|
//返修查询质检信息
|
|
|
|
|
@PostMapping("/findCheckInfoByCode")
|
|
|
|
|
public AjaxResult findCheckInfoByCode(String code) {
|
|
|
|
|
List<ReportQualityInspection> list= qualityService.findCheckInfoByCode(code);
|
|
|
|
|
if (list==null || list.isEmpty()){
|
|
|
|
|
List<ReportQualityInspection> list = qualityService.findCheckInfoByCode(code);
|
|
|
|
|
if (list == null || list.isEmpty()) {
|
|
|
|
|
return error("扫描条码不正确");
|
|
|
|
|
}
|
|
|
|
|
return success(list);
|
|
|
|
|