skyouc
2 天以前 c312a110ee4823a4a1f912a05e9648edc56f96e7
rsf-server/src/main/java/com/vincent/rsf/server/manager/controller/DeliveryItemController.java
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.vincent.rsf.framework.common.Cools;
import com.vincent.rsf.framework.common.R;
@@ -39,15 +40,24 @@
    private DeliveryItemService deliveryItemService;
    @Autowired
    private CompanysService companysService;
    @Autowired
    private DeliveryServiceImpl deliveryService;
    @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
    @PostMapping("/deliveryItem/page")
    public R page(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<DeliveryItem, BaseParam> pageParam = new PageParam<>(baseParam, DeliveryItem.class);
        return R.ok().add(deliveryItemService.page(pageParam, pageParam.buildWrapper(true)));
        QueryWrapper<DeliveryItem> wrapper = pageParam.buildWrapper(true);
        return R.ok().add(deliveryItemService.page(pageParam, wrapper));
    }
    @PreAuthorize("hasAuthority('manager:deliveryItem:list')")
    @PostMapping("/deliveryItem/filters/page")
    public R filter(@RequestBody Map<String, Object> map) {
        BaseParam baseParam = buildParam(map, BaseParam.class);
        PageParam<DeliveryItem, BaseParam> pageParam = new PageParam<>(baseParam, DeliveryItem.class);
        QueryWrapper<DeliveryItem> wrapper = pageParam.buildWrapper(true);
        wrapper.apply("anfme > work_qty + qty ");
        return R.ok().add(deliveryItemService.page(pageParam, wrapper));
    }
    @PreAuthorize("hasAuthority('manager:deliveryItem:list')")