From d07154d92334ba2ec312bf738a2a02a60350d5d9 Mon Sep 17 00:00:00 2001
From: skyouc
Date: 星期一, 29 九月 2025 13:34:21 +0800
Subject: [PATCH] 2. pda 组托加减号 应该是整数加减(完成) 3. 站点状态,显示清楚	(完成) 4. 站点保存报错,	修改人,创建人员显示 错误(完成) 5. agv入库不显示 历史库位记录	(完成) 6. 任务类型,应该为入库	(完成)

---
 src/main/java/com/zy/asrs/controller/BasStationController.java |   44 +++++++++++++++++++++++++-------------------
 1 files changed, 25 insertions(+), 19 deletions(-)

diff --git a/src/main/java/com/zy/asrs/controller/BasStationController.java b/src/main/java/com/zy/asrs/controller/BasStationController.java
index da29fd5..6badd52 100644
--- a/src/main/java/com/zy/asrs/controller/BasStationController.java
+++ b/src/main/java/com/zy/asrs/controller/BasStationController.java
@@ -32,24 +32,26 @@
 
     @RequestMapping(value = "/basStation/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){
+    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) {
         EntityWrapper<BasStation> wrapper = new EntityWrapper<>();
         excludeTrash(param);
         convert(param, wrapper);
         allLike(BasStation.class, param.keySet(), wrapper, condition);
-        if (!Cools.isEmpty(orderByField)){wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));}
+        if (!Cools.isEmpty(orderByField)) {
+            wrapper.orderBy(humpToLine(orderByField), "asc".equals(orderByType));
+        }
         return R.ok(basStationService.selectPage(new Page<>(curr, limit), wrapper));
     }
 
-    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper){
-        for (Map.Entry<String, Object> entry : map.entrySet()){
+    private <T> void convert(Map<String, Object> map, EntityWrapper<T> wrapper) {
+        for (Map.Entry<String, Object> entry : map.entrySet()) {
             String val = String.valueOf(entry.getValue());
-            if (val.contains(RANGE_TIME_LINK)){
+            if (val.contains(RANGE_TIME_LINK)) {
                 String[] dates = val.split(RANGE_TIME_LINK);
                 wrapper.ge(entry.getKey(), DateUtils.convert(dates[0]));
                 wrapper.le(entry.getKey(), DateUtils.convert(dates[1]));
@@ -62,14 +64,18 @@
     @RequestMapping(value = "/basStation/add/auth")
     @ManagerAuth
     public R add(BasStation basStation) {
+        basStation.setAppeUser(getUserId());
+        basStation.setModiUser(getUserId());
+        basStation.setIoTime(new Date());
+        basStation.setId(null);
         basStationService.insert(basStation);
         return R.ok();
     }
 
-	@RequestMapping(value = "/basStation/update/auth")
-	@ManagerAuth
-    public R update(BasStation basStation){
-        if (Cools.isEmpty(basStation) || null==basStation.getId()){
+    @RequestMapping(value = "/basStation/update/auth")
+    @ManagerAuth
+    public R update(BasStation basStation) {
+        if (Cools.isEmpty(basStation) || null == basStation.getId()) {
             return R.error();
         }
         basStationService.updateById(basStation);
@@ -78,8 +84,8 @@
 
     @RequestMapping(value = "/basStation/delete/auth")
     @ManagerAuth
-    public R delete(@RequestParam(value="ids[]") Long[] ids){
-         for (Long id : ids){
+    public R delete(@RequestParam(value = "ids[]") Long[] ids) {
+        for (Long id : ids) {
             basStationService.deleteById(id);
         }
         return R.ok();
@@ -87,7 +93,7 @@
 
     @RequestMapping(value = "/basStation/export/auth")
     @ManagerAuth
-    public R export(@RequestBody JSONObject param){
+    public R export(@RequestBody JSONObject param) {
         EntityWrapper<BasStation> wrapper = new EntityWrapper<>();
         List<String> fields = JSONObject.parseArray(param.getJSONArray("fields").toJSONString(), String.class);
         Map<String, Object> map = excludeTrash(param.getJSONObject("basStation"));
@@ -103,7 +109,7 @@
         wrapper.like("dev_no", condition);
         Page<BasStation> page = basStationService.selectPage(new Page<>(0, 10), wrapper);
         List<Map<String, Object>> result = new ArrayList<>();
-        for (BasStation basStation : page.getRecords()){
+        for (BasStation basStation : page.getRecords()) {
             Map<String, Object> map = new HashMap<>();
             map.put("id", basStation.getId());
             map.put("value", basStation.getId());
@@ -116,7 +122,7 @@
     @ManagerAuth
     public R query(@RequestBody JSONObject param) {
         Wrapper<BasStation> wrapper = new EntityWrapper<BasStation>().eq(humpToLine(String.valueOf(param.get("key"))), param.get("val"));
-        if (null != basStationService.selectOne(wrapper)){
+        if (null != basStationService.selectOne(wrapper)) {
             return R.parse(BaseRes.REPEAT).add(getComment(BasStation.class, String.valueOf(param.get("key"))));
         }
         return R.ok();

--
Gitblit v1.9.1