|
@@ -93,11 +93,11 @@ public class ApiAppDeviceLogController {
|
|
|
@RequestMapping(value = "instorage/batch/inStorageQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO inStorageBatchInStorageQuery(@RequestBody DeviceBatchQueryParam param) {
|
|
|
|
|
|
- QueryParam query = new QueryParam();
|
|
|
+
|
|
|
if (!StringUtils.isEmpty(param)) {
|
|
|
- query.addParam(QueryParamExp.like("batchNum", "%".concat(param.getBatchNum()).concat("%")));
|
|
|
+ param.addParam(QueryParamExp.eq("batchNum", param.getBatchNum()));
|
|
|
}
|
|
|
- Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
+ Page<AppDevice> devicePage = appDeviceService.findByParam(param);
|
|
|
devicePage.getContent().forEach(p -> {
|
|
|
appDeviceService.addImeiTitle(p);
|
|
|
});
|
|
@@ -165,17 +165,14 @@ public class ApiAppDeviceLogController {
|
|
|
@ApiOperation(value = "设备调拨 查看详情")
|
|
|
@RequestMapping(value = "transfer/detialQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO transferDetialQuery(@RequestBody detialQueryParam param) {
|
|
|
- QueryParam query = new QueryParam();
|
|
|
- query.addParam(QueryParamExp.eq("operateID", param.getOperateID()));
|
|
|
- query.addParam(QueryParamExp.eq("type", 2));
|
|
|
- Page<AppDeviceLog> deviceLogPage = deviceLogService.findByParam(query);
|
|
|
+ param.addParam(QueryParamExp.eq("operateID", param.getOperateID()));
|
|
|
+ param.addParam(QueryParamExp.eq("type", 2));
|
|
|
+ Page<AppDeviceLog> deviceLogPage = deviceLogService.findByParam(param);
|
|
|
|
|
|
deviceLogPage.getContent().forEach(p -> {
|
|
|
AppDevice device = new AppDevice();
|
|
|
device.setImei(p.getImei());
|
|
|
appDeviceService.addImeiTitle(device);
|
|
|
- device.setImei(p.getImei());
|
|
|
- appDeviceService.addImeiTitle(device);
|
|
|
p.appendFormDevice(device);
|
|
|
p.appendInTime(device);
|
|
|
});
|
|
@@ -221,12 +218,9 @@ public class ApiAppDeviceLogController {
|
|
|
@RequestMapping(value = "transfer/bySn/pageQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO transferBySnPageQuery(@RequestBody TransferBySnQueryParam param) {
|
|
|
|
|
|
- QueryParam query = new QueryParam();
|
|
|
- if (!StringUtils.isEmpty(param)) {
|
|
|
- query.addParam(QueryParamExp.like("sn", "%".concat(param.getSn()).concat("%")));
|
|
|
- }
|
|
|
- query.addParam(QueryParamExp.eq("status", 1));
|
|
|
- Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
+
|
|
|
+ param.addParam(QueryParamExp.eq("status", 1));
|
|
|
+ Page<AppDevice> devicePage = appDeviceService.findByParam(param);
|
|
|
|
|
|
devicePage.getContent().forEach(p -> {
|
|
|
QueryParam finalQuery = new QueryParam();
|
|
@@ -286,12 +280,12 @@ public class ApiAppDeviceLogController {
|
|
|
@RequestMapping(value = "transfer/batch/detailQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO transferByBatchDetailQuery(@RequestBody DeviceBatchQueryParam param) {
|
|
|
|
|
|
- QueryParam query = new QueryParam();
|
|
|
if (!StringUtils.isEmpty(param)) {
|
|
|
- query.addParam(QueryParamExp.like("batchNum", "%".concat(param.getBatchNum()).concat("%")));
|
|
|
+ param.addParam(QueryParamExp.like("batchNum", "%".concat(param.getBatchNum()).concat("%")));
|
|
|
}
|
|
|
- Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
+ Page<AppDevice> devicePage = appDeviceService.findByParam(param);
|
|
|
devicePage.getContent().forEach(p -> {
|
|
|
+
|
|
|
appDeviceService.addImeiTitle(p);
|
|
|
});
|
|
|
return new ApiPageDTO(null, devicePage);
|
|
@@ -301,12 +295,8 @@ public class ApiAppDeviceLogController {
|
|
|
@RequestMapping(value = "transferBack/pageQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO transferBackPageQuery(@RequestBody TransferBySnQueryParam param) {
|
|
|
|
|
|
- QueryParam query = new QueryParam();
|
|
|
- if (!StringUtils.isEmpty(param)) {
|
|
|
- query.addParam(QueryParamExp.like("sn", "%".concat(param.getSn()).concat("%")));
|
|
|
- }
|
|
|
- query.addParam(QueryParamExp.eq("status", 3));
|
|
|
- Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
+ param.addParam(QueryParamExp.eq("status", 3));
|
|
|
+ Page<AppDevice> devicePage = appDeviceService.findByParam(param);
|
|
|
return new ApiPageDTO(null, devicePage);
|
|
|
}
|
|
|
|
|
@@ -321,10 +311,9 @@ public class ApiAppDeviceLogController {
|
|
|
@ApiOperation(value = "设备出库 查看详情")
|
|
|
@RequestMapping(value = "outstorage/detialQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO outDetialQuery(@RequestBody detialQueryParam param) {
|
|
|
- QueryParam query = new QueryParam();
|
|
|
- query.addParam(QueryParamExp.eq("operateID", param.getOperateID()));
|
|
|
- query.addParam(QueryParamExp.eq("type", 3));
|
|
|
- Page<AppDeviceLog> deviceLogPage = deviceLogService.findByParam(query);
|
|
|
+ param.addParam(QueryParamExp.eq("operateID", param.getOperateID()));
|
|
|
+ param.addParam(QueryParamExp.eq("type", 3));
|
|
|
+ Page<AppDeviceLog> deviceLogPage = deviceLogService.findByParam(param);
|
|
|
|
|
|
deviceLogPage.getContent().forEach(p -> {
|
|
|
AppDevice device = new AppDevice();
|
|
@@ -379,11 +368,10 @@ public class ApiAppDeviceLogController {
|
|
|
@RequestMapping(value = "outstorage/batch/detailQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO outByBatchDetailQuery(@RequestBody DeviceBatchQueryParam param) {
|
|
|
|
|
|
- QueryParam query = new QueryParam();
|
|
|
if (!StringUtils.isEmpty(param)) {
|
|
|
- query.addParam(QueryParamExp.like("batchNum", "%".concat(param.getBatchNum()).concat("%")));
|
|
|
+ param.addParam(QueryParamExp.like("batchNum", "%".concat(param.getBatchNum()).concat("%")));
|
|
|
}
|
|
|
- Page<AppDevice> devicePage = appDeviceService.findByParam(query);
|
|
|
+ Page<AppDevice> devicePage = appDeviceService.findByParam(param);
|
|
|
devicePage.getContent().forEach(p -> {
|
|
|
appDeviceService.addImeiTitle(p);
|
|
|
});
|