|
@@ -187,17 +187,15 @@ public class ApiAppDeviceLogController {
|
|
|
@ApiOperation(value = "设备调拨 搜索 & 重置")
|
|
|
@RequestMapping(value = "transfer/pageQuery", method = RequestMethod.POST)
|
|
|
public ApiPageDTO transferPageQuery(@RequestBody LogTransferQueryParam param) {
|
|
|
- StringBuffer sql = new StringBuffer("select t.batch_num,t.operate_id, t.add_time,count(0) as total,t.tf_event,t.tf_device_type,t.tf_used,t.tf_describe,t.out_custom_id,t.operator,t.remarks from app_device_log t where t.type = 2");
|
|
|
+ StringBuffer sql = new StringBuffer("select t.batch_num,t.operate_id, t.add_time,count(0) as total,t.tf_event,t.tf_device_type,t.tf_used,t.tf_describe,t.out_custom_id,t.operator,t.remarks from app_device_log t where t.type = 2 ");
|
|
|
|
|
|
// sn搜索
|
|
|
if (!StringUtils.isEmpty(param.getSn())) {
|
|
|
- sql.append(" where t.sn like '%").append(param.getSn()).append("%'");
|
|
|
+ sql.append(" and t.sn like '%").append(param.getSn()).append("%'");
|
|
|
}
|
|
|
-
|
|
|
// 类型搜索
|
|
|
if (!StringUtils.isEmpty(param.getType())) {
|
|
|
- sql.append(StringUtils.isEmpty(param.getSn()) ? "where" : "and");
|
|
|
- sql.append(" t.tf_device_type = '").append(param.getType()).append("'");
|
|
|
+ sql.append(" and t.tf_device_type = ").append(param.getType());
|
|
|
}
|
|
|
sql.append(" group by t.operate_id");
|
|
|
if (!StringUtils.isEmpty(param.getOrderBy())) {
|
|
@@ -337,13 +335,12 @@ public class ApiAppDeviceLogController {
|
|
|
|
|
|
// sn搜索
|
|
|
if (!StringUtils.isEmpty(param.getSn())) {
|
|
|
- sql.append(" where t.sn like '%").append(param.getSn()).append("%'");
|
|
|
+ sql.append(" and t.sn like '%").append(param.getSn()).append("%'");
|
|
|
}
|
|
|
|
|
|
// 类型搜索
|
|
|
if (!StringUtils.isEmpty(param.getOutType())) {
|
|
|
- sql.append(StringUtils.isEmpty(param.getSn()) ? "where" : "and");
|
|
|
- sql.append(" t.out_type = '").append(param.getOutType()).append("'");
|
|
|
+ sql.append(" and t.out_type = ").append(param.getOutType());
|
|
|
}
|
|
|
sql.append(" group by t.operate_id");
|
|
|
if (!StringUtils.isEmpty(param.getOrderBy())) {
|