add - 物料查询接口

master
wangh 12 months ago
parent 96ea56545f
commit 21c840b62a

@ -21,7 +21,7 @@ import static com.aucma.common.core.domain.AjaxResult.success;
* @date 2023/11/14 9:28 * @date 2023/11/14 9:28
*/ */
@RestController @RestController
@RequestMapping(("/api")) @RequestMapping("/api")
public class PdaApiController { public class PdaApiController {
@Autowired @Autowired
@ -47,6 +47,15 @@ public class PdaApiController {
return success(); return success();
} }
@PostMapping("/selectGoodsName")
public AjaxResult selectGoodsName(String code) {
String boxName = service.selectBoxNameByCode(code);
if (boxName == null) {
return error("查询失败,条码不正确");
}
return success("操作成功", boxName);
}
@Autowired @Autowired
private IReportQualityInspectionService qualityService; private IReportQualityInspectionService qualityService;
@ -54,15 +63,15 @@ public class PdaApiController {
@PostMapping("/checkSubmit") @PostMapping("/checkSubmit")
public AjaxResult checkSubmit(@RequestBody CheckInfoDto checkInfo) { public AjaxResult checkSubmit(@RequestBody CheckInfoDto checkInfo) {
List<CheckInfoDto.DefectBeen> list = checkInfo.getList(); List<CheckInfoDto.DefectBeen> list = checkInfo.getList();
String boxName = service.selectBoxNameByCode(checkInfo.getCode()); // String boxName = service.selectBoxNameByCode(checkInfo.getCode());
if (boxName==null) { // if (boxName==null) {
return error("箱壳条码扫描错误"); // return error("箱壳条码扫描错误");
} // }
int size = (list == null || list.isEmpty()) ? 1 : list.size(); int size = (list == null || list.isEmpty()) ? 1 : list.size();
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {
ReportQualityInspection inspection = new ReportQualityInspection(); ReportQualityInspection inspection = new ReportQualityInspection();
inspection.setBarCode(checkInfo.getCode()); inspection.setBarCode(checkInfo.getCode());
inspection.setMaterialName(boxName); // inspection.setMaterialName(boxName);
inspection.setTreatmentMeasure(checkInfo.getMeasure()); inspection.setTreatmentMeasure(checkInfo.getMeasure());
inspection.setProcessResult(checkInfo.getMeasureName()); inspection.setProcessResult(checkInfo.getMeasureName());
inspection.setIsLowerLine(checkInfo.getOffline()); inspection.setIsLowerLine(checkInfo.getOffline());

@ -119,6 +119,8 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.antMatchers(HttpMethod.POST, "/sap/port/**").permitAll() .antMatchers(HttpMethod.POST, "/sap/port/**").permitAll()
// 开放看板接口 // 开放看板接口
.antMatchers(HttpMethod.POST, "/boardReport/**").permitAll() .antMatchers(HttpMethod.POST, "/boardReport/**").permitAll()
.antMatchers(HttpMethod.POST, "/**/**/**").permitAll()
.antMatchers(HttpMethod.GET, "/**/**/**").permitAll()
// 除上面外的所有请求全部需要鉴权认证 // 除上面外的所有请求全部需要鉴权认证
.anyRequest().authenticated() .anyRequest().authenticated()
.and() .and()

Loading…
Cancel
Save