|
|
|
@ -77,6 +77,36 @@ public class UdiRelController extends BaseController {
|
|
|
|
|
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//获取同步库UDI信息
|
|
|
|
|
@AuthRuleAnnotation("")
|
|
|
|
|
@ApiIgnore
|
|
|
|
|
@ApiOperation(value = "获取企业产品信息", response = BasicUdiRelResponse.class)
|
|
|
|
|
@GetMapping("udi/basic/rel/company/filter")
|
|
|
|
|
public BaseResponse filterRelByCompany(FilterUdiRelRequest filterUdiRelRequest) {
|
|
|
|
|
System.out.println(filterUdiRelRequest.toString());
|
|
|
|
|
String nameCode;
|
|
|
|
|
if (StrUtil.isNotEmpty(filterUdiRelRequest.getUdiCode())) {
|
|
|
|
|
UdiEntity udiEntity = FilterUdiUtils.getUdi(filterUdiRelRequest.getUdiCode());
|
|
|
|
|
if (udiEntity != null) {
|
|
|
|
|
nameCode = udiEntity.getUdi();
|
|
|
|
|
} else {
|
|
|
|
|
return ResultVOUtils.error(500, "无效UDI码!");
|
|
|
|
|
}
|
|
|
|
|
} else
|
|
|
|
|
nameCode = filterUdiRelRequest.getNameCode();
|
|
|
|
|
if (StrUtil.isNotEmpty(nameCode)) {
|
|
|
|
|
filterUdiRelRequest.setNameCode(nameCode);
|
|
|
|
|
} else {
|
|
|
|
|
filterUdiRelRequest.setDiType(1);
|
|
|
|
|
}
|
|
|
|
|
List<BasicUdiRelResponse> udiDlDeviceResponse = basicUdiRelService.filtersList(filterUdiRelRequest);
|
|
|
|
|
PageInfo<BasicUdiRelResponse> basicUdiRelResponsePageInfo = new PageInfo<>(udiDlDeviceResponse);
|
|
|
|
|
PageSimpleResponse<BasicUdiRelResponse> basicUdiRelResponsePageSimpleResponse = new PageSimpleResponse<>();
|
|
|
|
|
basicUdiRelResponsePageSimpleResponse.setTotal(basicUdiRelResponsePageInfo.getTotal());
|
|
|
|
|
basicUdiRelResponsePageSimpleResponse.setList(udiDlDeviceResponse);
|
|
|
|
|
return ResultVOUtils.success(basicUdiRelResponsePageSimpleResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//产品信息关联新增
|
|
|
|
|
@ApiIgnore
|
|
|
|
|