src/main/java/com/zy/asrs/controller/OpenController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/asrs/domain/param/ShuttleGatherParam.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/main/webapp/static/js/basShuttle/basShuttle.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/main/java/com/zy/asrs/controller/OpenController.java
@@ -357,8 +357,8 @@ @PostMapping("/shuttleGather") @OpenApiLog(memo = "小车集合") public R shuttleGather() { List<ShuttleGatherResult> shuttleGather = shuttleDispatchUtils.shuttleGather(); public R shuttleGather(@RequestBody ShuttleGatherParam param) { List<ShuttleGatherResult> shuttleGather = shuttleDispatchUtils.shuttleGather(param); apiLogService.insert(new ApiLog( null src/main/java/com/zy/asrs/domain/param/ShuttleGatherParam.java
New file @@ -0,0 +1,12 @@ package com.zy.asrs.domain.param; import lombok.Data; import java.util.List; @Data public class ShuttleGatherParam { private List<Integer> shuttleNos; } src/main/java/com/zy/core/dispatcher/ShuttleDispatchUtils.java
@@ -1,9 +1,11 @@ package com.zy.core.dispatcher; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.baomidou.mybatisplus.mapper.Wrapper; import com.core.common.Cools; import com.core.exception.CoolException; import com.zy.asrs.domain.ShuttleGatherResult; import com.zy.asrs.domain.param.ShuttleGatherParam; import com.zy.asrs.entity.BasShuttle; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.service.BasShuttleService; @@ -299,8 +301,15 @@ /** * 小车集合 */ public List<ShuttleGatherResult> shuttleGather() { List<BasShuttle> basShuttles = basShuttleService.selectList(new EntityWrapper<BasShuttle>().eq("status", 1)); public List<ShuttleGatherResult> shuttleGather(ShuttleGatherParam param) { Wrapper<BasShuttle> wrapper = new EntityWrapper<BasShuttle>().eq("status", 1); if (param != null) { if (!param.getShuttleNos().isEmpty()) { wrapper.in("shuttle_no", param.getShuttleNos()); } } List<BasShuttle> basShuttles = basShuttleService.selectList(wrapper); List<ShuttleGatherResult> list = new ArrayList<>(); for (BasShuttle basShuttle : basShuttles) { String idleLoc = basShuttle.getIdleLoc(); src/main/webapp/static/js/basShuttle/basShuttle.js
@@ -101,11 +101,19 @@ showUpdateCharge(); break; case 'shuttleGather': shuttleNos = [] checkStatus.map(function (d) { shuttleNos.push(d.shuttleNo) }) admin.confirm('确定集合全部小车吗?', {shadeClose: true}, function(){ $.ajax({ url: baseUrl+"/openapi/shuttleGather", headers: {'token': localStorage.getItem('token')}, dataType:'json', data: JSON.stringify({ shuttleNos: shuttleNos }), contentType:'application/json;charset=UTF-8', method: 'POST', success: function (res) {