新增大盒子打印

This commit is contained in:
wu@baokai.com 2025-04-10 19:15:34 +08:00
parent 20cded01fd
commit dc71fc95aa
5 changed files with 51 additions and 5 deletions

View File

@ -3239,7 +3239,27 @@ public class TaskController {
return convertJsonString(response); 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<WorkStationConfig> 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); return convertJsonString(response);
} }
} }
} }

View File

@ -1,13 +1,17 @@
package com.wms.mapper; package com.wms.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wms.entity.app.request.SortBoxRequest;
import com.wms.entity.table.WorkStationConfig; import com.wms.entity.table.WorkStationConfig;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/** /**
* 工站配置mapper * 工站配置mapper
*/ */
@Mapper @Mapper
public interface WorkStationConfigMapper extends BaseMapper<WorkStationConfig> { public interface WorkStationConfigMapper extends BaseMapper<WorkStationConfig> {
} List<WorkStationConfig> statisticsBoxNumByStation(WorkStationConfig workStationConfig);
}

View File

@ -1,10 +1,14 @@
package com.wms.service; package com.wms.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.wms.entity.app.request.SortBoxRequest;
import com.wms.entity.table.WorkStationConfig; import com.wms.entity.table.WorkStationConfig;
import java.util.List;
/** /**
* 工站配置服务接口 * 工站配置服务接口
*/ */
public interface WorkStationConfigService extends IService<WorkStationConfig> { public interface WorkStationConfigService extends IService<WorkStationConfig> {
List<WorkStationConfig> statisticsBoxNumByStation(WorkStationConfig workStationConfig);
} }

View File

@ -1,6 +1,7 @@
package com.wms.service.serviceImplements; package com.wms.service.serviceImplements;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wms.entity.app.request.SortBoxRequest;
import com.wms.entity.table.WorkStationConfig; import com.wms.entity.table.WorkStationConfig;
import com.wms.mapper.WorkStationConfigMapper; import com.wms.mapper.WorkStationConfigMapper;
import com.wms.service.WorkStationConfigService; import com.wms.service.WorkStationConfigService;
@ -8,10 +9,18 @@ import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.util.List;
/** /**
* 工站配置服务实现类 * 工站配置服务实现类
*/ */
@Service @Service
@RequiredArgsConstructor(onConstructor = @__(@Autowired)) @RequiredArgsConstructor(onConstructor = @__(@Autowired))
public class WorkStationConfigServiceImpl extends ServiceImpl<WorkStationConfigMapper, WorkStationConfig> implements WorkStationConfigService { public class WorkStationConfigServiceImpl extends ServiceImpl<WorkStationConfigMapper, WorkStationConfig> implements WorkStationConfigService {
@Autowired
private WorkStationConfigMapper workStationConfigMapper;
@Override
public List<WorkStationConfig> statisticsBoxNumByStation(WorkStationConfig workStationConfig) {
return workStationConfigMapper.statisticsBoxNumByStation(workStationConfig);
}
} }

View File

@ -2,5 +2,14 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.wms.mapper.WorkStationConfigMapper"> <mapper namespace="com.wms.mapper.WorkStationConfigMapper">
<select id="statisticsBoxNumByStation" parameterType="WorkStationConfig" resultType="WorkStationConfig">
</mapper> SELECT DISTINCT
a.big_box as bigBox,
a.order_quantity as orderQuantity
FROM
tbl_app_work_station_config a
LEFT JOIN tbl_app_work_flow_last b ON a.small_box = b.work_center
WHERE
b.work_station = #{ workStation }
</select>
</mapper>