rev:二期发货任务
This commit is contained in:
@@ -19,4 +19,35 @@ public interface SchBasePointMapper extends BaseMapper<SchBasePoint> {
|
||||
* @return 点位木箱信息集合
|
||||
*/
|
||||
List<JSONObject> queryKZPoint();
|
||||
|
||||
/**
|
||||
* 申请发货任务:获取相同订单的所有排
|
||||
* @param whereJson : {
|
||||
* region_id: 区域id
|
||||
* sale_order_name:订单号
|
||||
* }
|
||||
* @return JSONObject
|
||||
*/
|
||||
List<JSONObject> queryLikeOrderRow(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 申请发货任务: 查询新的一排
|
||||
* @param whereJson:{
|
||||
* region_id: 区域id
|
||||
* }
|
||||
* @return JSONObject
|
||||
*/
|
||||
List<JSONObject> queryNewRow(JSONObject whereJson);
|
||||
|
||||
/**
|
||||
* 申请发货任务: 判断是否阻挡
|
||||
* @param whereJson:{
|
||||
* point_code: 点位编码
|
||||
* region_id: 区域id
|
||||
* }
|
||||
* @return JSONObject
|
||||
*/
|
||||
List<JSONObject> isBlock(JSONObject whereJson);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper">
|
||||
<select id="queryKZPoint" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
SELECT
|
||||
point.*,
|
||||
box.*,
|
||||
sub.sale_order_name
|
||||
@@ -24,4 +24,126 @@
|
||||
AND point.is_delete = '0'
|
||||
AND point.region_code = 'BKZ01'
|
||||
</select>
|
||||
|
||||
<select id="queryLikeOrderRow" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
max(point.row_num) AS row_num
|
||||
FROM
|
||||
sch_base_point point
|
||||
LEFT JOIN pdm_bi_subpackagerelation sub ON sub.package_box_sn = point.vehicle_code
|
||||
WHERE
|
||||
point.is_used = '1'
|
||||
AND point.is_delete = '0'
|
||||
|
||||
<if test="region_id != null and region_id != ''">
|
||||
AND point.region_id= #{region_id}
|
||||
</if>
|
||||
|
||||
<if test="sale_order_name != null and sale_order_name != ''">
|
||||
AND sub.sale_order_name= #{sale_order_name}
|
||||
</if>
|
||||
|
||||
GROUP BY point.row_num
|
||||
|
||||
ORDER BY point.row_num ASC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="queryNewRow" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
po.row_num
|
||||
FROM
|
||||
sch_base_point po
|
||||
WHERE
|
||||
po.is_delete = '0'
|
||||
AND is_used = '1'
|
||||
|
||||
<if test="region_id != null and region_id != ''">
|
||||
AND po.region_id= #{region_id}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
po.row_num
|
||||
) a
|
||||
WHERE
|
||||
NOT EXISTS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
row_num
|
||||
FROM
|
||||
sch_base_point po2
|
||||
WHERE
|
||||
IFNULL( po2.vehicle_code, '' ) != ''
|
||||
|
||||
<if test="region_id != null and region_id != ''">
|
||||
AND po2.region_id= #{region_id}
|
||||
</if>
|
||||
|
||||
GROUP BY
|
||||
po2.row_num
|
||||
) b
|
||||
WHERE
|
||||
b.row_num = a.row_num
|
||||
)
|
||||
|
||||
ORDER BY row_num ASC
|
||||
|
||||
</select>
|
||||
|
||||
<select id="isBlock" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT
|
||||
point2.*
|
||||
FROM
|
||||
sch_base_point point1
|
||||
LEFT JOIN sch_base_point point2 ON point1.row_num = point2.row_num
|
||||
WHERE
|
||||
IFNULL( point2.vehicle_code, '' ) != ''
|
||||
AND point2.out_order_seq > point1.out_order_seq
|
||||
|
||||
<if test="point_code != null and point_code != ''">
|
||||
AND point1.point_code= #{point_code}
|
||||
</if>
|
||||
|
||||
<if test="region_id != null and region_id != ''">
|
||||
AND point2.region_id= #{region_id}
|
||||
</if>
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
point2.*
|
||||
FROM
|
||||
sch_base_point point1
|
||||
LEFT JOIN sch_base_point point2 ON point1.row_num = point2.row_num
|
||||
WHERE
|
||||
IFNULL( point2.vehicle_code, '' ) = ''
|
||||
AND point2.out_order_seq > point1.out_order_seq
|
||||
|
||||
<if test="point_code != null and point_code != ''">
|
||||
AND point1.point_code= #{point_code}
|
||||
</if>
|
||||
|
||||
<if test="region_id != null and region_id != ''">
|
||||
AND point2.region_id= #{region_id}
|
||||
</if>
|
||||
|
||||
AND EXISTS (
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
sch_base_task
|
||||
WHERE
|
||||
( point_code1 = point2.point_code OR point_code2 = point2.point_code )
|
||||
AND '07' > task_status
|
||||
AND is_delete = '0'
|
||||
)
|
||||
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
package org.nl.b_lms.sch.tasks;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.WQL;
|
||||
import org.nl.modules.wql.core.bean.WQLObject;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.system.service.param.impl.SysParamServiceImpl;
|
||||
import org.nl.wms.sch.AcsTaskDto;
|
||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@RequiredArgsConstructor
|
||||
@Slf4j
|
||||
public class TwoSendOutTask extends AbstractAcsTask {
|
||||
private final String THIS_CLASS = TwoSendOutTask.class.getName();
|
||||
|
||||
@Override
|
||||
public List<AcsTaskDto> addTask() {
|
||||
/*
|
||||
* 下发给ACS时需要特殊处理
|
||||
*/
|
||||
JSONArray arr = WQLObject.getWQLObject("SCH_BASE_Task").query("handle_class = '" + THIS_CLASS + "' and task_status = '" + TaskStatusEnum.START_AND_POINT.getCode() + "' and is_delete ='0'").getResultJSONArray(0);
|
||||
|
||||
ArrayList<AcsTaskDto> resultList = new ArrayList<>();
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject json = arr.getJSONObject(i);
|
||||
|
||||
char dtl_type = json.getString("task_type").charAt(json.getString("task_type").length() - 1);
|
||||
AcsTaskDto dto = AcsTaskDto.builder()
|
||||
.ext_task_id(json.getString("task_id"))
|
||||
.task_code(json.getString("task_code"))
|
||||
.task_type(json.getString("acs_task_type"))
|
||||
.start_device_code(json.getString("point_code1"))
|
||||
.next_device_code(json.getString("point_code2"))
|
||||
.vehicle_code(json.getString("vehicle_code"))
|
||||
.priority(json.getString("priority"))
|
||||
.class_type(json.getString("task_type"))
|
||||
.dtl_type(String.valueOf(dtl_type))
|
||||
.remark(json.getString("remark"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
}
|
||||
return resultList;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void updateTaskStatus(JSONObject taskObj, String status) {
|
||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point"); // 点位表
|
||||
|
||||
String task_id = taskObj.getString("task_id");
|
||||
JSONObject jsonTask = taskTab.query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
|
||||
if (status.equals(IOSEnum.IS_NOTANDYES.code("否"))) {
|
||||
// 更新删除字段
|
||||
jsonTask.put("is_delete", IOSEnum.IS_NOTANDYES.code("是"));
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
JSONObject jsonPoint2 = pointTab.query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||
jsonPoint2.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
||||
jsonPoint2.put("vehicle_code", "");
|
||||
pointTab.update(jsonPoint2);
|
||||
}
|
||||
|
||||
if (TaskStatusEnum.EXECUTING.getCode().equals(status)) {
|
||||
// 更新任务状态为执行中
|
||||
jsonTask.put("task_status", TaskStatusEnum.EXECUTING.getCode());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
}
|
||||
|
||||
if (StrUtil.equals(status, TaskStatusEnum.FINISHED.getCode())) {
|
||||
|
||||
// 更改任务状态为完成
|
||||
jsonTask.put("task_status", TaskStatusEnum.FINISHED.getCode());
|
||||
jsonTask.put("update_optid", SecurityUtils.getCurrentUserId());
|
||||
jsonTask.put("update_optname", SecurityUtils.getCurrentUsername());
|
||||
jsonTask.put("update_time", DateUtil.now());
|
||||
taskTab.update(jsonTask);
|
||||
|
||||
// 更新暂存区点位状态
|
||||
JSONObject jsonPoint2 = WQLObject.getWQLObject("sch_base_point").query("point_code = '" + jsonTask.getString("point_code2") + "'").uniqueResult(0);
|
||||
jsonPoint2.put("lock_type", IOSEnum.LOCK_TYPE.code("未锁定"));
|
||||
jsonPoint2.put("vehicle_code", jsonTask.getString("vehicle_code"));
|
||||
pointTab.update(jsonPoint2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findStartPoint() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void findNextPoint() {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public String createTask(JSONObject form) {
|
||||
WQLObject tab = WQLObject.getWQLObject("SCH_BASE_Task");
|
||||
CutConveyorTask cutConveyorTask = new CutConveyorTask();
|
||||
|
||||
String point_code2 = form.getString("point_code2");
|
||||
if (cutConveyorTask.isSingleTask(point_code2)) {
|
||||
throw new BadRequestException("点位:" + point_code2 + "存在未完成的任务!");
|
||||
}
|
||||
|
||||
JSONObject json = new JSONObject();
|
||||
json.put("task_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
|
||||
json.put("task_type", form.getString("task_type"));
|
||||
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
|
||||
json.put("point_code1", form.getString("point_code1"));
|
||||
json.put("point_code2", form.getString("point_code2"));
|
||||
json.put("vehicle_code", form.getString("vehicle_code"));
|
||||
json.put("handle_class", THIS_CLASS);
|
||||
json.put("create_id", SecurityUtils.getCurrentUserId());
|
||||
json.put("create_name", SecurityUtils.getCurrentUsername());
|
||||
json.put("create_time", DateUtil.now());
|
||||
tab.insert(json);
|
||||
|
||||
// 下发
|
||||
immediateNotifyAcs(json.getString("task_id"));
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void forceFinish(String task_id) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
this.updateTaskStatus(taskObj, TaskStatusEnum.FINISHED.getCode());
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void cancel(String task_id) {
|
||||
JSONObject taskObj = WQLObject.getWQLObject("SCH_BASE_Task").query("task_id = '" + task_id + "'").uniqueResult(0);
|
||||
this.updateTaskStatus(taskObj, IOSEnum.ACS_RESULT.code("取消"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +1,30 @@
|
||||
package org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
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;
|
||||
import org.nl.b_lms.sch.tasks.TwoSendOutTask;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
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.nl.wms.pda.mps.eum.RegionTypeEnum;
|
||||
import org.nl.wms.sch.tasks.CutConveyorTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 发货业务处理 服务实现类
|
||||
@@ -23,8 +37,15 @@ import org.springframework.transaction.annotation.Transactional;
|
||||
@RequiredArgsConstructor
|
||||
public class SendOutManageServiceImpl implements SendOutManageService {
|
||||
|
||||
@Autowired
|
||||
private IschBasePointService ischBasePointService;
|
||||
/**
|
||||
* 点位服务
|
||||
*/
|
||||
private final IschBasePointService ischBasePointService;
|
||||
|
||||
/**
|
||||
* 点位mapper服务
|
||||
*/
|
||||
private final SchBasePointMapper schBasePointMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@@ -36,6 +57,15 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
||||
* 3)有相同订单号的但是没有空位:新开一排
|
||||
*/
|
||||
WQLObject subTab = WQLObject.getWQLObject("pdm_bi_subpackagerelation");
|
||||
CutConveyorTask cutConveyorTask = new CutConveyorTask();
|
||||
|
||||
// 所有发货区点位
|
||||
List<SchBasePoint> pointDaoList = ischBasePointService.list(
|
||||
new QueryWrapper<SchBasePoint>().lambda()
|
||||
.eq(SchBasePoint::getRegion_id, RegionTypeEnum.TWO_FH01.getId())
|
||||
.eq(SchBasePoint::getIs_used, IOSEnum.IS_NOTANDYES.code("是"))
|
||||
.eq(SchBasePoint::getIs_delete, IOSEnum.IS_NOTANDYES.code("否"))
|
||||
);
|
||||
|
||||
// 1.查询此木箱号的子卷包装关系
|
||||
JSONObject jsonSub = subTab.query("package_box_sn = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
|
||||
@@ -43,10 +73,136 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
||||
throw new BadRequestException("未查询到该木箱对应的包装关系!");
|
||||
}
|
||||
|
||||
// 2.判断是否有空位
|
||||
// 2.找相同订单号的所有排
|
||||
jsonSub.put("region_id", RegionTypeEnum.TWO_FH01.getId());
|
||||
List<JSONObject> pointLikeOrder = schBasePointMapper.queryLikeOrderRow(jsonSub);
|
||||
|
||||
// 3.找相同订单号的所在排的所有空位
|
||||
String point_code = "";
|
||||
List<SchBasePoint> joArr = new ArrayList<>();
|
||||
|
||||
for (int i = 0; i < pointLikeOrder.size(); i++) {
|
||||
JSONObject json = pointLikeOrder.get(i);
|
||||
|
||||
// 过滤此排的空位
|
||||
List<SchBasePoint> rowPointList = pointDaoList.stream()
|
||||
.filter(row -> row.getRow_num().toString().equals(json.getString("row_num")) &&
|
||||
ObjectUtil.isEmpty(row.getVehicle_code()) &&
|
||||
row.getLock_type().equals(IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||
)
|
||||
.sorted(Comparator.comparing(SchBasePoint::getOut_order_seq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
joArr.addAll(rowPointList);
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(joArr)) {
|
||||
//查询新的一排
|
||||
List<JSONObject> newRowPointList = schBasePointMapper.queryNewRow(jsonSub);
|
||||
|
||||
if (ObjectUtil.isEmpty(newRowPointList)) {
|
||||
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
|
||||
}
|
||||
|
||||
for (int i = 0; i < newRowPointList.size(); i++) {
|
||||
JSONObject json = newRowPointList.get(i);
|
||||
|
||||
// 找出这一排的所有空位
|
||||
List<SchBasePoint> rowPointList = pointDaoList.stream()
|
||||
.filter(row -> row.getRow_num().toString().equals(json.getString("row_num")) &&
|
||||
ObjectUtil.isEmpty(row.getVehicle_code()) &&
|
||||
row.getLock_type().equals(IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||
)
|
||||
.sorted(Comparator.comparing(SchBasePoint::getOut_order_seq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (rowPointList.size() == 4) {
|
||||
JSONObject jsonNewRow = JSONObject.parseObject(JSON.toJSONString(rowPointList.get(0)));
|
||||
|
||||
if (cutConveyorTask.isSingleTask(jsonNewRow.getString("point_code"))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 校验此货位是否被堵住:1.如果被堵住则判断下一个是否被堵住 2.如果全部被堵住则新开一排
|
||||
for (int i = 0; i < joArr.size(); i++) {
|
||||
JSONObject json = JSONObject.parseObject(JSON.toJSONString(joArr.get(i)));
|
||||
|
||||
// 判断是否被挡住
|
||||
JSONObject paramJson = new JSONObject();
|
||||
paramJson.put("point_code", json.getString("point_code"));
|
||||
paramJson.put("region_id", RegionTypeEnum.TWO_FH01.getId());
|
||||
List<JSONObject> isBlock = schBasePointMapper.isBlock(paramJson);
|
||||
|
||||
if (ObjectUtil.isNotEmpty(isBlock)) {
|
||||
// 堵住则判断下一个
|
||||
continue;
|
||||
} else {
|
||||
if (cutConveyorTask.isSingleTask(json.getString("point_code"))) {
|
||||
continue;
|
||||
}
|
||||
// 未堵住: 跳出循环
|
||||
point_code = json.getString("point_code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
//查询新的一排
|
||||
List<JSONObject> newRowPointList = schBasePointMapper.queryNewRow(jsonSub);
|
||||
|
||||
if (ObjectUtil.isEmpty(newRowPointList)) {
|
||||
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
|
||||
}
|
||||
|
||||
for (int i = 0; i < newRowPointList.size(); i++) {
|
||||
JSONObject json = newRowPointList.get(i);
|
||||
|
||||
// 找出这一排的所有空位
|
||||
List<SchBasePoint> rowPointList = pointDaoList.stream()
|
||||
.filter(row -> row.getRow_num().toString().equals(json.getString("row_num")) &&
|
||||
ObjectUtil.isEmpty(row.getVehicle_code()) &&
|
||||
row.getLock_type().equals(IOSEnum.LOCK_TYPE.code("未锁定"))
|
||||
)
|
||||
.sorted(Comparator.comparing(SchBasePoint::getOut_order_seq))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
if (rowPointList.size() == 4) {
|
||||
JSONObject jsonNewRow = JSONObject.parseObject(JSON.toJSONString(rowPointList.get(0)));
|
||||
|
||||
if (cutConveyorTask.isSingleTask(jsonNewRow.getString("point_code"))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
point_code = jsonNewRow.getString("point_code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(point_code)) {
|
||||
throw new BadRequestException("未查询到相同销售订单的放货区点位或空的一排!");
|
||||
}
|
||||
//创建任务
|
||||
JSONObject task_jo = new JSONObject();
|
||||
task_jo.put("point_code1", whereJson.getString("device_code"));
|
||||
task_jo.put("point_code2", point_code);
|
||||
task_jo.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||
task_jo.put("task_type", "010506");
|
||||
TwoSendOutTask taskBean = new TwoSendOutTask();
|
||||
taskBean.createTask(task_jo);
|
||||
|
||||
// 锁住点位
|
||||
ischBasePointService.update(
|
||||
new UpdateWrapper<SchBasePoint>().lambda()
|
||||
.eq(SchBasePoint::getPoint_code, point_code)
|
||||
.set(SchBasePoint::getLock_type, IOSEnum.LOCK_TYPE.code("其它"))
|
||||
.set(SchBasePoint::getVehicle_code, whereJson.getString("vehicle_code"))
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public enum RegionTypeEnum {
|
||||
TWO_TTP01("21", "二期空托盘区", "1750471797729529856"),
|
||||
TWO_MX01("22", "二期木箱区", "1752254266938101760"),
|
||||
TWO_KZ01("23", "二期捆扎区", "1754774130626007040"),
|
||||
TWO_FH01("24", "二期发货区", "1754774130626007040");
|
||||
TWO_FH01("24", "二期发货区", "1759453285649092608");
|
||||
|
||||
private String name;
|
||||
private String code;
|
||||
|
||||
@@ -3,8 +3,6 @@ package org.nl.wms.st.outbill.rest;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.IStIvtIostorinvOutService;
|
||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl.*;
|
||||
@@ -40,6 +38,8 @@ public class CheckOutBillController {
|
||||
|
||||
private final LashManageService lashManageService;
|
||||
|
||||
private final SendOutManageServiceImpl sendOutManageService;
|
||||
|
||||
@GetMapping
|
||||
@Log("查询出库单")
|
||||
|
||||
@@ -402,4 +402,11 @@ public class CheckOutBillController {
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/testSendOut")
|
||||
@Log("发货区测试")
|
||||
public ResponseEntity<Object> testSendOut(@RequestBody JSONObject whereJson) {
|
||||
sendOutManageService.createSendOutTask(whereJson);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user