修改

parent ea749826
...@@ -88,7 +88,7 @@ public class DqPersonelController { ...@@ -88,7 +88,7 @@ public class DqPersonelController {
dqPersonelService.save(dto); dqPersonelService.save(dto);
return new Result(); return new Result<>();
} }
@PutMapping @PutMapping
......
...@@ -41,11 +41,16 @@ public class DqPersonelServiceImpl extends CrudServiceImpl<DqPersonelDao, DqPers ...@@ -41,11 +41,16 @@ public class DqPersonelServiceImpl extends CrudServiceImpl<DqPersonelDao, DqPers
@Override @Override
public QueryWrapper<DqPersonelEntity> getWrapper(Map<String, Object> params){ public QueryWrapper<DqPersonelEntity> getWrapper(Map<String, Object> params){
String id = (String)params.get("id"); String id = (String)params.get("id");
String idcard = (String)params.get("idcard");
Integer dqRegionId = (Integer) params.get("dqRegionId");
QueryWrapper<DqPersonelEntity> wrapper = new QueryWrapper<>(); QueryWrapper<DqPersonelEntity> wrapper = new QueryWrapper<>();
wrapper.eq(StringUtils.isNotBlank(id), "id", id).like("idcard",idcard).eq("dq_region_id",dqRegionId).orderByDesc("dq_region_id"); if(params.get("dqRegionId") !=null){
Integer dqRegionId = Integer.parseInt((String)params.get("dqRegionId"));
wrapper.eq("dq_region_id",dqRegionId);
}
if(params.get("idcard") !=null){
String idcard = (String)params.get("idcard");
wrapper.like("idcard",idcard);
}
wrapper.eq(StringUtils.isNotBlank(id), "id", id).orderByDesc("dq_region_id");
if(params.get(Constant.SQL_FILTER)!=null){ if(params.get(Constant.SQL_FILTER)!=null){
wrapper.apply(params.get(Constant.SQL_FILTER) != null, params.get(Constant.SQL_FILTER).toString()); wrapper.apply(params.get(Constant.SQL_FILTER) != null, params.get(Constant.SQL_FILTER).toString());
} }
......
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