|
@@ -45,13 +45,19 @@ public class DatumPointController {
|
|
|
private final DatumPointService service;
|
|
|
|
|
|
|
|
|
- @PostMapping("/list")
|
|
|
+ @GetMapping("/list")
|
|
|
public R<IPage<DatumPoint>> list( String contractId, Query page, String type, String name){
|
|
|
Map<String, Object> param = new HashMap<>(10);
|
|
|
- param.put("contractId",contractId);
|
|
|
- param.put("type",type);
|
|
|
- param.put("name",name);
|
|
|
- param.put("remark",name);
|
|
|
+ if(StringUtil.isNotBlank(contractId)){
|
|
|
+ param.put("contractId",contractId);
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotBlank(type)){
|
|
|
+ param.put("type",type);
|
|
|
+ }
|
|
|
+ if(StringUtil.isNotBlank(contractId)){
|
|
|
+ param.put("name",name);
|
|
|
+ param.put("remark",name);
|
|
|
+ }
|
|
|
return R.data(service.page(Condition.getPage(page),Condition.getQueryWrapper(param,DatumPoint.class)));
|
|
|
}
|
|
|
|
|
@@ -70,8 +76,11 @@ public class DatumPointController {
|
|
|
|
|
|
|
|
|
@PostMapping("/del")
|
|
|
- public R del(String id){
|
|
|
- return R.status(this.service.removeById(id));
|
|
|
+ public R del(String ids){
|
|
|
+ if(StringUtil.isNotBlank(ids)){
|
|
|
+ return R.status(this.service.removeByIds(Func.toLongList(ids)));
|
|
|
+ }
|
|
|
+ return R.status(false);
|
|
|
}
|
|
|
|
|
|
|