add:发货任务

This commit is contained in:
2024-02-18 14:01:55 +08:00
parent b2a578ffd5
commit 9aed674e23
4 changed files with 78 additions and 3 deletions

View File

@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.nl.b_lms.sch.point.dao.SchBasePoint;
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
import org.nl.b_lms.sch.point.service.IschBasePointService;
@@ -21,7 +20,6 @@ import org.nl.common.utils.IdUtil;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

View File

@@ -0,0 +1,52 @@
package org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import org.nl.b_lms.sch.point.service.IschBasePointService;
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.SendOutManageService;
import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.core.bean.WQLObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* <p>
* 发货业务处理 服务实现类
* </p>
*
* @author generator
* @since 2023-11-10
*/
@Service
@RequiredArgsConstructor
public class SendOutManageServiceImpl implements SendOutManageService {
@Autowired
private IschBasePointService ischBasePointService;
@Override
@Transactional
public void createSendOutTask(JSONObject whereJson) {
/*
* 1.找相同订单号的木箱
* 1有相同订单号有空位的相同订单号的放在一排
* 2没有相同订单号的新开一排
* 3有相同订单号的但是没有空位新开一排
*/
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
// 1.查询此木箱号的子卷包装关系
JSONObject jsonSub = subTab.query("package_box_sn = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(jsonSub)) {
throw new BadRequestException("未查询到该木箱对应的包装关系!");
}
// 2.判断是否有空位
}
}

View File

@@ -0,0 +1,24 @@
package org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service;
import com.alibaba.fastjson.JSONObject;
/**
* <p>
* 发货业务处理 服务类
* </p>
*
* @author generator
* @since 2023-11-16
*/
public interface SendOutManageService {
/**
* 创建发货任务
* @param whereJson {
* device_code起点
* vehicle_code: 载具号
* }
*/
void createSendOutTask(JSONObject whereJson);
}

View File

@@ -23,7 +23,8 @@ public enum RegionTypeEnum {
TWO_ZZ01("20", "二期暂存区", ""),
TWO_TTP01("21", "二期空托盘区", "1750471797729529856"),
TWO_MX01("22", "二期木箱区", "1752254266938101760"),
TWO_KZ01("23", "二期捆扎区", "1754774130626007040");
TWO_KZ01("23", "二期捆扎区", "1754774130626007040"),
TWO_FH01("24", "二期发货区", "1754774130626007040");
private String name;
private String code;