From 47be748a884e45b582cf06287d6ba617f1c32eff Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期四, 26 八月 2021 08:50:47 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/ints/controller/WaitMatinController.java | 30 +++++++++++++++++++++++++-----
1 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/src/main/java/com/zy/ints/controller/WaitMatinController.java b/src/main/java/com/zy/ints/controller/WaitMatinController.java
index ac5b143..d88267f 100644
--- a/src/main/java/com/zy/ints/controller/WaitMatinController.java
+++ b/src/main/java/com/zy/ints/controller/WaitMatinController.java
@@ -9,7 +9,9 @@
import com.core.common.Cools;
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 +28,8 @@
@Autowired
private WaitMatinService waitMatinService;
+ @Autowired
+ private MatCodeService matCodeService;
@RequestMapping(value = "/waitMatin/head/page/auth")
@ManagerAuth
@@ -46,11 +50,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("mat_no", condition).or().like("mat_name", condition)
+ .orderBy("appe_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 +88,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));
}
--
Gitblit v1.9.1