自动化立体仓库 - WMS系统
#
luxiaotao1123
2021-08-24 8a3b440e4768944e9f7ee6375cfffeaaaa0e0baf
src/main/java/com/zy/ints/controller/WaitMatinController.java
@@ -10,6 +10,9 @@
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.entity.LocDetl;
import com.zy.asrs.entity.MatCode;
import com.zy.asrs.service.MatCodeService;
import com.zy.common.entity.KeyValueVo;
import com.zy.common.web.BaseController;
import com.zy.ints.entity.WaitMatin;
import com.zy.ints.service.WaitMatinService;
@@ -26,6 +29,8 @@
    @Autowired
    private WaitMatinService waitMatinService;
    @Autowired
    private MatCodeService matCodeService;
    @RequestMapping(value = "/waitMatin/head/page/auth")
    @ManagerAuth
@@ -46,11 +51,25 @@
    /*************************************** xm-select ***********************************************/
    // xm-select 搜索商品列表
    @RequestMapping("/mat/all/get/kv")
    @ManagerAuth
    public R getMatDataKV(@RequestParam(required = false) String condition) {
        Wrapper<MatCode> wrapper = new EntityWrapper<MatCode>()
                .andNew().like("matnr", condition).or().like("maktx", condition)
                .orderBy("create_time", false);
        List<MatCode> mats = matCodeService.selectPage(new Page<>(1, 30), wrapper).getRecords();
        List<KeyValueVo> valueVos = new ArrayList<>();
        for (MatCode mat : mats) {
            KeyValueVo vo = new KeyValueVo();
            vo.setName(mat.getMatNo() + " - " + mat.getMatName());
            vo.setValue(mat.getMatNo());
            valueVos.add(vo);
        }
        return R.ok().add(valueVos);
    }
@@ -70,10 +89,12 @@
                  @RequestParam(defaultValue = "10")Integer limit,
                  @RequestParam(required = false)String orderByField,
                  @RequestParam(required = false)String orderByType,
                  @RequestParam(required = false)String condition,
                  @RequestParam Map<String, Object> param){
        EntityWrapper<WaitMatin> wrapper = new EntityWrapper<>();
        excludeTrash(param);
        convert(param, wrapper);
        allLike(WaitMatin.class, param.keySet(), wrapper, condition);
        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
        return R.ok(waitMatinService.selectPage(new Page<>(curr, limit), wrapper));
    }