Authored by caoyan

质检优化

... ... @@ -134,5 +134,15 @@ public class StorageDepositController {
}
return new ApiResponse.ApiResponseBuilder().code(200).message("操作成功").build();
}
@RequestMapping(value = "/queryIsShelfCodeExist")
public ApiResponse queryIsShelfCodeExist(StorageDepositReq req) {
LOGGER.info("queryIsShelfCodeExist in. param is {}", req);
if(StringUtils.isEmpty(req.getShelfCode())) {
return new ApiResponse.ApiResponseBuilder().code(400).message("请扫描货位号").build();
}
boolean result = storageDepositService.queryIsShelfCodeExist(req.getShelfCode());
return new ApiResponse.ApiResponseBuilder().code(200).data(result).message("查询成功").build();
}
}
... ...
... ... @@ -52,4 +52,6 @@ public interface IStorageDepositService {
StorageDepositResp getDepositDetailInfo(String depositCode);
void saveShelfCode(MultipartFile file) throws Exception;
boolean queryIsShelfCodeExist(String shelfCode);
}
... ...
... ... @@ -343,6 +343,17 @@ public class StorageDepositServiceImpl implements IStorageDepositService, IBusin
return num;
}
@Override
public boolean queryIsShelfCodeExist(String shelfCode) {
//校验货位号是否存在
DepositShelfCode shelfCodeDb = depositShelfCodeMapper.selectByShelfCode(shelfCode);
if(null == shelfCodeDb) {
return false;
}
return true;
}
private PageResponseBO<StorageDepositPickRsp> queryDepositPickListByQueryStr(String queryStr, Integer status, Integer depotNo){
//先按订单号来查
StorageDepositReq req = new StorageDepositReq();
... ...