Commit 6920c400 authored by 廖旭伟's avatar 廖旭伟

设备管理系统查询条件改为按名称查

parent 354631d5
......@@ -36,9 +36,9 @@ import java.util.stream.Collectors;
@Slf4j
public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, DeviceEntity, Long> implements DeviceService {
/** 自助终端设备产品id */
@Value("${system.productId:1}")
private Long productId;
/** 自助终端设备产品名称 */
@Value("${system.productName:自助服务终端}")
private String productName;
@Autowired
private IDeviceFeign deviceFeign;
......@@ -48,11 +48,7 @@ public class DeviceServiceImpl extends AbstractCRUDServiceImpl<DeviceDao, Device
Result<DeviceEntity> result = new Result();
DevicePdu devicePdu = new DevicePdu();
BeanUtils.copyProperties(entity, devicePdu, BeanUtil.getNullPropertyNames(entity));
// String productName = GlobalSysInfo.getParamValue(Constant.PARAMS_PRODUCT_NAME, "数字填单机");
// devicePdu.setProductName(productName);
devicePdu.setProductId(productId);
devicePdu.setProductName(productName);
Rest<RespData<List<DevicePdu>>> rest = deviceFeign.list(devicePdu);
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
List<DeviceEntity> collect = rest.getData().getData().stream().map(item -> {
......
......@@ -32,9 +32,9 @@ import java.util.List;
@Service("sstSkinService")
public class SstSkinServiceImpl extends AbstractCRUDServiceImpl<SstSkinDao, SstSkinEntity, Long> implements SstSkinService {
/** 自助终端设备产品id */
@Value("${system.productId:1}")
private Long productId;
/** 自助终端设备产品名称 */
@Value("${system.productName:自助服务终端}")
private String productName;
@Autowired
private ISinkBaseFeign iSinkBaseFeign;
......@@ -52,7 +52,7 @@ public class SstSkinServiceImpl extends AbstractCRUDServiceImpl<SstSkinDao, SstS
throw new AppException("站点id不能为空");
}
DevicePdu devicePdu = new DevicePdu();
devicePdu.setProductId(productId);
devicePdu.setProductName(productName);
Rest<RespData<List<DevicePdu>>> restDevice = deviceFeign.list(devicePdu);
Long sinkIdUse = 0l;
if(restDevice.getCode().equals(YesNoEnum.YES.getValue())){
......@@ -62,7 +62,7 @@ public class SstSkinServiceImpl extends AbstractCRUDServiceImpl<SstSkinDao, SstS
}
Result<SstSkinEntity> result = new Result();
SinkBasePdu skinBasePdu = new SinkBasePdu();
skinBasePdu.setProductId(productId);
skinBasePdu.setProductName(productName);
Rest<RespData<List<SinkBasePdu>>> rest = iSinkBaseFeign.list(skinBasePdu);
if(rest.getCode().equals(YesNoEnum.YES.getValue())){
List<SstSkinEntity> list = new ArrayList<>();
......@@ -103,7 +103,7 @@ public class SstSkinServiceImpl extends AbstractCRUDServiceImpl<SstSkinDao, SstS
throw new AppException("站点id不能为空");
}
DevicePdu devicePdu = new DevicePdu();
devicePdu.setProductId(productId);
devicePdu.setProductName(productName);
Rest<RespData<List<DevicePdu>>> restDevice = deviceFeign.list(devicePdu);
if(restDevice.getCode().equals(YesNoEnum.YES.getValue())){
if(CollectionUtils.isNotEmpty(restDevice.getData().getData())){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment