请求入库时重新分配货位时增加巷道

20秒下挂40秒出库的逻辑
main
Comair 1 year ago
parent f7360a57e6
commit e531fbb59d
  1. 9
      shkj-common/src/main/java/com/shkj/common/constant/RedisConstant.java
  2. 1
      shkj-wms/src/main/java/com/shkj/wms/bo/AssingEmptyLocBo.java
  3. 3
      shkj-wms/src/main/java/com/shkj/wms/bo/BusinTaskQueryBo.java
  4. 2
      shkj-wms/src/main/java/com/shkj/wms/mapper/BaseLocationMapper.java
  5. 8
      shkj-wms/src/main/java/com/shkj/wms/plc/PlcEventTask.java
  6. 66
      shkj-wms/src/main/java/com/shkj/wms/scheduled/ScheduledTasks.java
  7. 2
      shkj-wms/src/main/java/com/shkj/wms/service/IBaseLocationService.java
  8. 80
      shkj-wms/src/main/java/com/shkj/wms/service/impl/BaseLocationServiceImpl.java
  9. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinContainerUpkeepServiceImpl.java
  10. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/IBusinEnptyContainerServiceImpl.java
  11. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/PutInOutStorageServiceImpl.java
  12. 2
      shkj-wms/src/main/java/com/shkj/wms/service/impl/StackServiceImpl.java
  13. 24
      shkj-wms/src/main/resources/mapper/wms/BaseLocationMapper.xml
  14. 9
      shkj-wms/src/main/resources/mapper/wms/BusinDataTaskMapper.xml

@ -91,7 +91,7 @@ public class RedisConstant {
public final static String redisStkStatus="redisStkStatus";
/**
* AGV实时数据
* AGV实时数据p
*/
public static String redisAgvRealInfo="redisAgvRealInfo:";
@ -101,5 +101,12 @@ public class RedisConstant {
public static String redisInVehicheModel="InVehicheModel:";
/**
* 剩余待下发空治具数
*/
public static String redisSurplusWaitIssueEmpFixTaskNum="surplusWaitIssueEmpFixTaskNum:";
}

@ -24,6 +24,7 @@ public class AssingEmptyLocBo implements Serializable {
private String batch;
private String tunnel;
private String taskId;
private List<BusinDataTaskGoodsVo> businDataTaskGoodsVos;

@ -46,4 +46,7 @@ public class BusinTaskQueryBo implements Serializable {
/** 查询关键字*/
private String keywords;
/** 限制条数,传入按照传入的查询*/
private Integer limit;
}

@ -80,6 +80,8 @@ public interface BaseLocationMapper extends BaseMapper<BaseLocation> {
List<BaseLocationVo> getLocationByAreaId( Long areaId);
List<BaseLocationVo> getLocationByAreaIdTunel( BaseLocationQueryBo bo);
/**
* 获取 异常冲孔出库货位数据
* @author Comair

@ -143,7 +143,7 @@ public class PlcEventTask {
private ScheduledExecutorService executorService = Executors.newScheduledThreadPool(8);
// @Scheduled(fixedRate = 200)
@Scheduled(fixedRate = 200)
public void init() {
//查询需要连接的PLC,初始化连接对象
List<WcsPlcConnectVo> plcList = iWcsPlcConnectService.selectWcsPlcConnectList(new WcsPlcConnect().setIsActive("1"));
@ -226,7 +226,7 @@ public class PlcEventTask {
}
}
// @Scheduled(fixedRate = 200)
@Scheduled(fixedRate = 200)
public void init1() {
//查询需要连接的PLC,初始化连接对象
List<WcsPlcConnectVo> plcList = iWcsPlcConnectService.selectWcsPlcConnectList(new WcsPlcConnect().setIsActive("1"));
@ -244,7 +244,7 @@ public class PlcEventTask {
}
}
// @Scheduled(fixedRate = 200)
@Scheduled(fixedRate = 200)
public void init2() {
//查询需要连接的PLC,初始化连接对象
List<WcsPlcConnectVo> plcList = iWcsPlcConnectService.selectWcsPlcConnectList(new WcsPlcConnect().setIsActive("1"));
@ -262,7 +262,7 @@ public class PlcEventTask {
}
}
// @Scheduled(fixedDelay = 6000)
@Scheduled(fixedDelay = 6000)
public void writePlcheartbeat() {
//根据连接的plcId获取属性
PlcOperate plcOperate = plcInit.getPlcOperate_41();

@ -180,9 +180,18 @@ public class ScheduledTasks {
}
// @Scheduled(fixedRate = 200)
@Scheduled(fixedRate = 200)
public void task() {
// log.info("开始获取需要执行的任务");
//获取下发车型
String inVehicheModel = "";
Object objVehicheModel = redisTemplate.opsForValue().get(RedisConstant.redisInVehicheModel);
if (objVehicheModel == null) {
inVehicheModel = "";
}
//获取待下发任务数据
BusinTaskQueryBo taskQueryBo = new BusinTaskQueryBo();
List<BusinDataTaskVo> businDataTaskVos = new ArrayList<>();
@ -217,9 +226,12 @@ public class ScheduledTasks {
taskQueryBo.setTaskType("12");
List<BusinDataTaskVo> businDataTaskVo12 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo12);
taskQueryBo.setTaskType("15");
List<BusinDataTaskVo> businDataTaskVo15 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo15);
if (!inVehicheModel.equals("3LN") && !inVehicheModel.equals("3UE")) {//如果车型非3LN车型,空托任务正常执行,否则根据出库任务交替执行
taskQueryBo.setTaskType("15");
List<BusinDataTaskVo> businDataTaskVo15 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo15);
}
taskQueryBo.setTaskType("17");
List<BusinDataTaskVo> businDataTaskVo17 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo17);
@ -246,20 +258,45 @@ public class ScheduledTasks {
List<BusinDataTaskVo> businDataTaskVo23 = iBusinDataTaskService.selectBusinDataTask1(taskQueryBo);
businDataTaskVos.addAll(businDataTaskVo23);
Integer[] waitIssueEmpTaskNum = {0};
//按照优先级降序排序,优先级高的优先执行
businDataTaskVos = businDataTaskVos.stream().sorted(Comparator.comparing(BusinDataTaskVo::getIsTop, Comparator.reverseOrder()).thenComparing(BusinDataTaskVo::getCreateTime)).collect(Collectors.toList());
for (BusinDataTaskVo businDataTaskVo : businDataTaskVos) {
doTask(businDataTaskVos,businDataTaskVo);
// doTask(businDataTaskVos,businDataTaskVo);
doTask(inVehicheModel, waitIssueEmpTaskNum, businDataTaskVo,businDataTaskVos);
}
//查询下挂任务目前的车型:入库:3LN(20秒) 出库:3UG(40秒) 空托和保险杠交替进行 4和15
//从redis中写入
//从redis中写入
if (inVehicheModel.equals("3LN") || inVehicheModel.equals("3UE")) {//下发车型为3LN的时候,根据出库任务数量执行空托任务
//获取出库任务下发成功数
if (redisTemplate.hasKey(RedisConstant.redisSurplusWaitIssueEmpFixTaskNum)) {
Integer lastSurpTaskNum = (Integer) redisTemplate.opsForValue().get(RedisConstant.redisSurplusWaitIssueEmpFixTaskNum);
log.error("上次剩余待下发空治具任务数:" + lastSurpTaskNum);
waitIssueEmpTaskNum[0] = waitIssueEmpTaskNum[0] + lastSurpTaskNum;
}
log.error("总待下发空治具任务数:" + waitIssueEmpTaskNum[0]);
if (waitIssueEmpTaskNum[0] > 0) {//上次空治具未下发成功的是否计入本次任务,如果计入,本次任务+上次未下发成功任务是否会超出查询限制条数
taskQueryBo.setTaskType("15");
taskQueryBo.setLimit(waitIssueEmpTaskNum[0]);
List<BusinDataTaskVo> businDataTaskVo15 = iBusinDataTaskService.selectOutBusinDataTask(taskQueryBo);
for (BusinDataTaskVo businDataTaskVo : businDataTaskVo15) {
doTask(inVehicheModel, waitIssueEmpTaskNum, businDataTaskVo,businDataTaskVos);
}
if (waitIssueEmpTaskNum[0] > 0) {
log.error("本次剩余待下发空治具任务数:" + waitIssueEmpTaskNum[0]);
redisTemplate.opsForValue().set(RedisConstant.redisSurplusWaitIssueEmpFixTaskNum, waitIssueEmpTaskNum[0]);
}
}
}
}
@Transactional(rollbackFor = Exception.class)
void doTask(List<BusinDataTaskVo> businDataTaskVos,BusinDataTaskVo businDataTaskVo) {
void doTask(String inVehicheModel, Integer[] waitIssueEmpTaskNum,BusinDataTaskVo businDataTaskVo,List<BusinDataTaskVo> businDataTaskVos) {
//如果当前任务是非紧急任务,则查询是否有紧急任务待执行,如果有,优先处理紧急的
if (businDataTaskVo.getIsTop().equals("0")){
BusinDataTaskVo businDataTaskVoIstop= businDataTaskVos.stream().filter(item -> item.getIsTop().equals("1")).sorted(Comparator.comparing(BusinDataTaskVo::getCreateTime)).findFirst().orElse(null);
@ -390,7 +427,7 @@ public class ScheduledTasks {
emptyLocBo.setVehicheModel(vehicheModel);
emptyLocBo.setGoodsNo(goodsNo);
emptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos);
locationVoResult = iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
locationVoResult = iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
}
if (ObjectUtils.isNotEmpty(locationVoResult) && locationVoResult.getCode() == HttpStatus.SUCCESS.getCode()) {
@ -1128,6 +1165,14 @@ public class ScheduledTasks {
iSysStockDetailService.updateBatchById(sysStockDetailList);
Result<Boolean> taskResult = outTask(businDataTask);
if (taskResult.getCode() == HttpStatus.SUCCESS.getCode()) {
//成功后计算出库成功数量并写入redis
if (inVehicheModel.equals("3LN") || inVehicheModel.equals("3UE")) {
waitIssueEmpTaskNum[0]++;
log.info("3LN出库成功任务数:" + waitIssueEmpTaskNum[0]);
}
businDataTask.setTaskStatus(TaskStatusEnum.wait_callback.getValue());
businDataTask.setExceptionMsg("");
businDataTask.setUpdateTime(DateUtils.getNowDate());
@ -1217,6 +1262,11 @@ public class ScheduledTasks {
if (ObjectUtils.isNotEmpty(businDataTask)) {
Result<Boolean> taskResult = outTask(businDataTask);
if (Result.isOk(taskResult)) {
if (inVehicheModel.equals("3LN") || inVehicheModel.equals("3UE")) {
waitIssueEmpTaskNum[0]--;
log.info("3LN待出库空治具任务数:" + waitIssueEmpTaskNum);
}
//完成后更新库位状态为空闲
BaseLocation location = iBaseLocationService.getById(businDataTask.getLocationId());
location.setLocationStatus("0");
@ -2100,7 +2150,7 @@ public class ScheduledTasks {
emptyLocBo.setVehicheModel(vehicheModel);
emptyLocBo.setGoodsNo(goodsNo);
emptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos);
locationVoResult = iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
locationVoResult = iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
}

@ -157,7 +157,7 @@ public interface IBaseLocationService extends IService<BaseLocation> {
Result<BaseLocationVo> assignEmptyLocationByStock( String goodsNo,String vehicheModel, String batch,List<BusinDataTaskGoodsVo> businDataTaskGoodsVos);
Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo);
Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo,String tunnel);
/**
* 冲孔杠分配货位

@ -815,13 +815,16 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
@Override
public synchronized Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo) {
public synchronized Result<BaseLocationVo> assignEmptyLocationAll(AssingEmptyLocBo assingEmptyLocBo,String lcoatinTunnel) {
BaseLocationVo locationVo = null;
//bo等于空时,是空治具分配货位,否则是保险杠分配货位
if (assingEmptyLocBo == null) {
//获取立库区的空治具存放区域编号
Long emptyconArea = Long.valueOf(sysParameterService.selectConfigByKey(SecurityUtils.getCurrentBranchId(), ParameterConstants.ParameterSystem.emptycon_area));
List<BaseLocationVo> baseLocationVos = baseLocationMapper.getLocationByAreaId(emptyconArea);
BaseLocationQueryBo locationQueryBo = new BaseLocationQueryBo();
locationQueryBo.setAreaId(emptyconArea);
locationQueryBo.setTunnel(lcoatinTunnel);
List<BaseLocationVo> baseLocationVos = baseLocationMapper.getLocationByAreaIdTunel(locationQueryBo);
if (baseLocationVos.size() > 0) {
locationVo = baseLocationVos.get(0);
} else {
@ -909,19 +912,21 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
bo.setTunnel(assingEmptyLocBo.getTunnel());
log.info("保险杠分配货位查询条件:" + JsonUtil.toJSONString(bo));
List<BaseLocationVo> baseLocationVos = this.baseMapper.queryBaseLocationListByGoods(bo);
if (baseLocationVos.size() == 0) {
//查看缓冲区是否还有货位
Long bufferArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.buffer_area));
List<BaseLocationVo> baseLocationVoList = baseLocationMapper.getLocationByAreaId(bufferArea);
log.info("保险杠缓冲区分配到的货位信息:" + baseLocationVoList.size());
if (baseLocationVoList.size() < 0) {
log.info("车型及缓冲区都未查询到空货位");
return Result.err().msg("保险杠分配货位暂无空货位可用");
if (StringUtils.isEmpty(assingEmptyLocBo.getTunnel())){
if (baseLocationVos.size() == 0) {
//查看缓冲区是否还有货位
Long bufferArea = Long.valueOf(sysParameterService.selectConfigByKey(ParameterConstants.ParameterSystem.buffer_area));
List<BaseLocationVo> baseLocationVoList = baseLocationMapper.getLocationByAreaId(bufferArea);
log.info("保险杠缓冲区分配到的货位信息:" + baseLocationVoList.size());
if (baseLocationVoList.size() < 0) {
log.info("车型及缓冲区都未查询到空货位");
return Result.err().msg("保险杠分配货位暂无空货位可用");
}
baseLocationVos = baseLocationVoList;
}
//baseLocationVos.addAll(baseLocationVoList);
baseLocationVos = baseLocationVoList;
}
//拿到所有可用货位,根据巷道号对双深位的巷道进行处理
//空货位所在巷道列表,同时过滤掉已有入库任务的巷道
List<String> tunnelList = baseLocationVos.stream().map(e -> e.getTunnel()).distinct().collect(Collectors.toList());
@ -1300,7 +1305,11 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
if (baseLocation == null) {
baseLocation = this.queryBaseLocationByrcl(businDataTask.getToRow(), businDataTask.getToColumn(), businDataTask.getToLayer(), businDataTask.getTunnel());
}
//查询目前任务的信息的保险杠信息:
List<BusinDataTaskGoodsVo> businDataTaskGoodsVos = businDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTask.getId());
String tunnel = baseLocation.getTunnel();
String locationStatus = baseLocation.getLocationStatus();
if ("01".equals(tunnel) || "06".equals(tunnel)) {
//如果是单深位,验证下双深位的是否有库存,如果有在判断车型颜色是否一致
String locationRow = baseLocation.getLocationRow();
@ -1320,10 +1329,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
.eq(BaseLocation::getLayer, layer));
List<SysStockDetailVo> sysStockDetailVoList = iSysStockDetailService.queryByLocation(doubleLocation.getId());
//查询目前任务的信息的保险杠信息:
List<BusinDataTaskGoodsVo> businDataTaskGoodsVos = businDataTaskGoodsService.selectBusinTaskGoodsByTaskCode(businDataTask.getId());
//空托盘入库时,此对象无数据
//双深位无库存
if (sysStockDetailVoList != null && sysStockDetailVoList.size() == 0) {
baseLocation = doubleLocation;
@ -1342,7 +1348,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
assingEmptyLocBo.setGoodsNo(goodsNo);
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo);
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,null);
if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
@ -1353,7 +1359,7 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
String goodsNo = sysStockDetailVoList.get(0).getGoodsNo();
if (goodsNo != null) {
AssingEmptyLocBo assingEmptyLocBo = null;
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo);
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,businDataTask.getTunnel());
if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
@ -1361,19 +1367,39 @@ public class BaseLocationServiceImpl extends ServiceImpl<BaseLocationMapper, Bas
}
}
}
if (!businDataTask.getLocationId().equals(baseLocation.getId())) {
baseLocation.setLocationStatus("4");
this.updateById(baseLocation);
businDataTask.setToLayer(baseLocation.getLayer());
businDataTask.setToColumn(baseLocation.getLocationColumn());
businDataTask.setToRow(baseLocation.getLocationRow());
businDataTask.setLocationId(baseLocation.getId());
log.info("双深位重新分配货位:" + JsonUtil.toJSONString(baseLocation));
iBusinDataTaskService.updateById(businDataTask);
}
else if (tunnel.equals("06") && locationRow.equals("13")){
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) {
AssingEmptyLocBo assingEmptyLocBo = null;
if (businDataTaskGoodsVos != null && businDataTaskGoodsVos.size()>0) {
String goodsNo = businDataTaskGoodsVos.get(0).getGoodsNo();
BaseGoodsData baseGoodsData = iBaseGoodsDataService.getBaseGoodsByBarcodes(goodsNo);
assingEmptyLocBo = new AssingEmptyLocBo();
assingEmptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos);
assingEmptyLocBo.setBatch(DateUtils.getDate());
assingEmptyLocBo.setGoodsNo(goodsNo);
assingEmptyLocBo.setVehicheModel(baseGoodsData.getVehicheModel());
assingEmptyLocBo.setTunnel(baseLocation.getTunnel());
}
Result<BaseLocationVo> locationVoResult = this.assignEmptyLocationAll(assingEmptyLocBo,businDataTask.getTunnel());
if (Result.isOk(locationVoResult)) {
BaseLocationVo baseLocationVo = locationVoResult.getData();
baseLocation = BeanUtil.toBean(baseLocationVo, BaseLocation.class);
}
}
}
if (!businDataTask.getLocationId().equals(baseLocation.getId())) {
baseLocation.setLocationStatus("4");
this.updateById(baseLocation);
businDataTask.setToLayer(baseLocation.getLayer());
businDataTask.setToColumn(baseLocation.getLocationColumn());
businDataTask.setToRow(baseLocation.getLocationRow());
businDataTask.setLocationId(baseLocation.getId());
log.info("双深位重新分配货位:" + JsonUtil.toJSONString(baseLocation));
iBusinDataTaskService.updateById(businDataTask);
}
} else {
String locationStatus = baseLocation.getLocationStatus();
if ("1".equals(locationStatus) || "2".equals(locationStatus) || "5".equals(locationStatus)) {
log.info("给堆垛机下发任务:" + businDataTask.getId() + " 原货位:" + JsonUtil.toJSONString(baseLocation));
BaseLocationVo baseLocationVo = this.queryLocationByTunnel(tunnel);

@ -144,7 +144,7 @@ public class IBusinContainerUpkeepServiceImpl extends ServiceImpl<BusinContainer
// Map map = iBusinEnptyContainerServiceImpl.checkWareForEmptycon();
AssingEmptyLocBo emptyLocBo =null;
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
if (!Result.isOk(locationVoResult)){
return Result.err().msg("暂无空治具存放区域");

@ -158,7 +158,7 @@ public class IBusinEnptyContainerServiceImpl extends ServiceImpl<BaseContainerMa
else if (stuats){
// Map map = checkWareForEmptycon();
AssingEmptyLocBo emptyLocBo = null;
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
if (!Result.isOk(locationVoResult)){
return Result.err().msg("暂无空治具存放区域");

@ -472,7 +472,7 @@ public class PutInOutStorageServiceImpl extends ServiceImpl<BasePointDeviceMappe
}else if (stuats){
// Map map = iBusinEnptyContainerServiceImpl.checkWareForEmptycon();
AssingEmptyLocBo emptyLocBo =null;
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
if (!Result.isOk(locationVoResult)){
return Result.err().msg("暂无空治具存放区域");

@ -308,7 +308,7 @@ public class StackServiceImpl implements IStackService {
emptyLocBo.setVehicheModel(vehicheModel);
emptyLocBo.setGoodsNo(goodsNo);
emptyLocBo.setBusinDataTaskGoodsVos(businDataTaskGoodsVos);
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo);
Result<BaseLocationVo> locationVoResult=iBaseLocationService.assignEmptyLocationAll(emptyLocBo,null);
BaseLocationVo locationVo = locationVoResult.getData();
String tunnel = locationVo.getTunnel();

@ -422,6 +422,30 @@
bl.route ASC,bl.is_deep desc
</select>
<select id="getLocationByAreaIdTunel" parameterType="com.shkj.wms.bo.BaseLocationQueryBo" resultType="com.shkj.wms.vo.BaseLocationVo">
select
bl.*,
ba.storage_id as storage_id,
bs.storage_name as bs_storage_name,
bs.storage_code as storage_code
from base_location bl
left join base_area ba on bl.area_id = ba.id
left join base_storage bs on ba.storage_id = bs.id
where bl.is_del = '0' and ba.is_del = '0' and bs.is_del = '0' and bl.location_status ='0'
<if test="areaId != null">
and ba.id = #{areaId}
</if>
<if test="tunnel != null">
and bl.tunnel = #{tunnel}
</if>
ORDER BY
bl.route ASC,bl.is_deep desc
</select>
<select id="getOutLocationByAreaId" parameterType="Long" resultType="com.shkj.wms.vo.BaseLocationVo">
select
bl.*,

@ -101,7 +101,14 @@
and task_type = #{taskType}
</if>
order by is_top,is_urgent, create_time asc
limit 10
<choose>
<when test="limit !=null">
limit #{limit}
</when>
<otherwise>
limit 10
</otherwise>
</choose>
</select>
<select id="selectBusinDataTaskByKeys" resultType="com.shkj.wms.vo.BusinDataTaskVo" parameterType="com.shkj.wms.bo.BusinTaskQueryBo">

Loading…
Cancel
Save