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
*/
@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());

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

Loading…
Cancel
Save