diff --git a/src/main/java/com/wms/controller/TaskController.java b/src/main/java/com/wms/controller/TaskController.java index 92f317d..428a674 100644 --- a/src/main/java/com/wms/controller/TaskController.java +++ b/src/main/java/com/wms/controller/TaskController.java @@ -3239,7 +3239,27 @@ public class TaskController { return convertJsonString(response); } } - + @PostMapping("/statisticsBoxNumByStation") + @ResponseBody + @MyLog(logTitle = "打印大盒子标签", logMethod = "statisticsBoxNumByStation") + public String statisticsBoxNumByStation(@RequestBody SortBoxRequest sortBoxRequest) { + ResponseEntity response = new ResponseEntity(); + if(StringUtils.isEmpty(sortBoxRequest.getStandId())) { + response.setCode(ResponseCode.ERROR.getCode()); + response.setMessage("打印标签大盒子请求的站台号不能为空!"); + return convertJsonString(response); + } + logger.info("接收打印大盒子标签,当前站台:{}",sortBoxRequest.getStandId()); + //查询出大盒子信息列表,根据工作站配置 + //转换为Table对象 + WorkStationConfig workStationConfig = new WorkStationConfig(); + workStationConfig.setWorkStation(sortBoxRequest.getStandId()); + List list = workStationConfigService.statisticsBoxNumByStation(workStationConfig); + response.setCode(ResponseCode.OK.getCode()); + response.setReturnData(list); + response.setMessage("查询大盒子数量成功。"); + return convertJsonString(response); + } /** * 请求整理盒子 * @@ -3589,4 +3609,4 @@ public class TaskController { return convertJsonString(response); } } -} \ No newline at end of file +} diff --git a/src/main/java/com/wms/mapper/WorkStationConfigMapper.java b/src/main/java/com/wms/mapper/WorkStationConfigMapper.java index 0e56569..cd35fc2 100644 --- a/src/main/java/com/wms/mapper/WorkStationConfigMapper.java +++ b/src/main/java/com/wms/mapper/WorkStationConfigMapper.java @@ -1,13 +1,17 @@ package com.wms.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.wms.entity.app.request.SortBoxRequest; import com.wms.entity.table.WorkStationConfig; import org.apache.ibatis.annotations.Mapper; +import java.util.List; + /** * 工站配置mapper */ @Mapper public interface WorkStationConfigMapper extends BaseMapper { -} \ No newline at end of file + List statisticsBoxNumByStation(WorkStationConfig workStationConfig); +} diff --git a/src/main/java/com/wms/service/WorkStationConfigService.java b/src/main/java/com/wms/service/WorkStationConfigService.java index 78a9aa3..4d31328 100644 --- a/src/main/java/com/wms/service/WorkStationConfigService.java +++ b/src/main/java/com/wms/service/WorkStationConfigService.java @@ -1,10 +1,14 @@ package com.wms.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.wms.entity.app.request.SortBoxRequest; import com.wms.entity.table.WorkStationConfig; +import java.util.List; + /** * 工站配置服务接口 */ public interface WorkStationConfigService extends IService { + List statisticsBoxNumByStation(WorkStationConfig workStationConfig); } diff --git a/src/main/java/com/wms/service/serviceImplements/WorkStationConfigServiceImpl.java b/src/main/java/com/wms/service/serviceImplements/WorkStationConfigServiceImpl.java index 3112f0c..3f49c30 100644 --- a/src/main/java/com/wms/service/serviceImplements/WorkStationConfigServiceImpl.java +++ b/src/main/java/com/wms/service/serviceImplements/WorkStationConfigServiceImpl.java @@ -1,6 +1,7 @@ package com.wms.service.serviceImplements; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.wms.entity.app.request.SortBoxRequest; import com.wms.entity.table.WorkStationConfig; import com.wms.mapper.WorkStationConfigMapper; import com.wms.service.WorkStationConfigService; @@ -8,10 +9,18 @@ import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** * 工站配置服务实现类 */ @Service @RequiredArgsConstructor(onConstructor = @__(@Autowired)) public class WorkStationConfigServiceImpl extends ServiceImpl implements WorkStationConfigService { + @Autowired + private WorkStationConfigMapper workStationConfigMapper; + @Override + public List statisticsBoxNumByStation(WorkStationConfig workStationConfig) { + return workStationConfigMapper.statisticsBoxNumByStation(workStationConfig); + } } diff --git a/src/main/resources/mapper/WorkStationConfigMapper.xml b/src/main/resources/mapper/WorkStationConfigMapper.xml index 04731b6..191c18a 100644 --- a/src/main/resources/mapper/WorkStationConfigMapper.xml +++ b/src/main/resources/mapper/WorkStationConfigMapper.xml @@ -2,5 +2,14 @@ - - \ No newline at end of file + +