From 7874cb073e2c0f9fa71b0f461ed302f5724c23e8 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期二, 23 六月 2020 08:40:21 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/asrs/controller/LocDetlController.java | 30 ++++++++++++++++++++++--------
1 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/main/java/com/zy/asrs/controller/LocDetlController.java b/src/main/java/com/zy/asrs/controller/LocDetlController.java
index d2e1069..e2d368f 100644
--- a/src/main/java/com/zy/asrs/controller/LocDetlController.java
+++ b/src/main/java/com/zy/asrs/controller/LocDetlController.java
@@ -5,14 +5,14 @@
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
-import com.zy.asrs.entity.LocDetl;
-import com.zy.asrs.service.LocDetlService;
-import com.zy.common.web.BaseController;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
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.service.LocDetlService;
+import com.zy.common.web.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -30,16 +30,26 @@
return R.ok(locDetlService.selectById(String.valueOf(id)));
}
+ @RequestMapping(value = "/stock/out/list/auth")
+ @ManagerAuth
+ public R stockOutList(@RequestParam(defaultValue = "1")Integer curr,
+ @RequestParam(defaultValue = "10")Integer limit,
+ @RequestParam Map<String, Object> param){
+ return R.ok(locDetlService.getStockOut(toPage(curr, limit, param, LocDetl.class)));
+ }
+
@RequestMapping(value = "/locDetl/list/auth")
@ManagerAuth
public R list(@RequestParam(defaultValue = "1")Integer curr,
@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){
excludeTrash(param);
EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
convert(param, wrapper);
+ allLike(LocDetl.class, param.keySet(), wrapper, condition);
if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
return R.ok(locDetlService.selectPage(new Page<>(curr, limit), wrapper));
}
@@ -51,13 +61,17 @@
} else if (entry.getKey().endsWith("<")) {
wrapper.le(Cools.deleteChar(entry.getKey()), DateUtils.convert(String.valueOf(entry.getValue())));
} else {
- wrapper.eq(entry.getKey(), String.valueOf(entry.getValue()));
+ if (entry.getKey().equals("locNo")) {
+ wrapper.eq("loc_no", String.valueOf(entry.getValue()));
+ } else {
+ wrapper.like(entry.getKey(), String.valueOf(entry.getValue()));
+ }
}
}
}
@RequestMapping(value = "/locDetl/add/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "搴撲綅鏄庣粏娣诲姞")
public R add(LocDetl locDetl) {
locDetl.setModiUser(getUserId());
locDetl.setModiTime(new Date());
@@ -68,7 +82,7 @@
}
@RequestMapping(value = "/locDetl/update/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "搴撲綅鏄庣粏淇敼")
public R update(LocDetl locDetl){
if (Cools.isEmpty(locDetl) || null==locDetl.getMatnr()){
return R.error();
@@ -80,7 +94,7 @@
}
@RequestMapping(value = "/locDetl/delete/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "搴撲綅鏄庣粏鍒犻櫎")
public R delete(@RequestParam String param){
List<LocDetl> list = JSONArray.parseArray(param, LocDetl.class);
if (Cools.isEmpty(list)){
@@ -93,7 +107,7 @@
}
@RequestMapping(value = "/locDetl/export/auth")
- @ManagerAuth
+ @ManagerAuth(memo = "搴撲綅鏄庣粏瀵煎嚭")
public R export(@RequestBody JSONObject param){
List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
EntityWrapper<LocDetl> wrapper = new EntityWrapper<>();
--
Gitblit v1.9.1