add:发货任务
This commit is contained in:
@@ -6,7 +6,6 @@ import com.alibaba.fastjson.JSON;
|
|||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import lombok.RequiredArgsConstructor;
|
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.SchBasePoint;
|
||||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
||||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
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.common.exception.BadRequestException;
|
||||||
import org.nl.modules.wql.core.bean.WQLObject;
|
import org.nl.modules.wql.core.bean.WQLObject;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
|||||||
@@ -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.判断是否有空位
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -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);
|
||||||
|
|
||||||
|
}
|
||||||
@@ -23,7 +23,8 @@ public enum RegionTypeEnum {
|
|||||||
TWO_ZZ01("20", "二期暂存区", ""),
|
TWO_ZZ01("20", "二期暂存区", ""),
|
||||||
TWO_TTP01("21", "二期空托盘区", "1750471797729529856"),
|
TWO_TTP01("21", "二期空托盘区", "1750471797729529856"),
|
||||||
TWO_MX01("22", "二期木箱区", "1752254266938101760"),
|
TWO_MX01("22", "二期木箱区", "1752254266938101760"),
|
||||||
TWO_KZ01("23", "二期捆扎区", "1754774130626007040");
|
TWO_KZ01("23", "二期捆扎区", "1754774130626007040"),
|
||||||
|
TWO_FH01("24", "二期发货区", "1754774130626007040");
|
||||||
|
|
||||||
private String name;
|
private String name;
|
||||||
private String code;
|
private String code;
|
||||||
|
|||||||
Reference in New Issue
Block a user