rev:木箱木库测试
This commit is contained in:
@@ -21,12 +21,12 @@ import java.util.List;
|
|||||||
* 二期空托盘出库任务类
|
* 二期空托盘出库任务类
|
||||||
* Created by Lxy on 2024/1/19.
|
* Created by Lxy on 2024/1/19.
|
||||||
*/
|
*/
|
||||||
public class TwoEmpExcepTask extends AbstractAcsTask {
|
public class TwoBoxExcepTask extends AbstractAcsTask {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 处理类
|
* 处理类
|
||||||
*/
|
*/
|
||||||
private final String THIS_CLASS = TwoEmpExcepTask.class.getName();
|
private final String THIS_CLASS = TwoBoxExcepTask.class.getName();
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<AcsTaskDto> addTask() {
|
public List<AcsTaskDto> addTask() {
|
||||||
@@ -125,11 +125,7 @@ public class TwoEmpExcepTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (StrUtil.isBlank(form.getString("vehicle_code"))) {
|
if (StrUtil.isBlank(form.getString("vehicle_code"))) {
|
||||||
throw new BadRequestException("托盘号不能为空!");
|
throw new BadRequestException("木箱不能为空!");
|
||||||
}
|
|
||||||
|
|
||||||
if (StrUtil.isBlank(form.getString("vehicle_type"))) {
|
|
||||||
throw new BadRequestException("托盘类型不能为空!");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject json = new JSONObject();
|
JSONObject json = new JSONObject();
|
||||||
@@ -53,7 +53,7 @@ public class TwoInEmpTask extends AbstractAcsTask {
|
|||||||
.vehicle_code(json.getString("vehicle_code"))
|
.vehicle_code(json.getString("vehicle_code"))
|
||||||
.priority(json.getString("priority"))
|
.priority(json.getString("priority"))
|
||||||
.class_type(json.getString("task_type"))
|
.class_type(json.getString("task_type"))
|
||||||
.dtl_type(String.valueOf(dtl_type))
|
.dtl_type("7")
|
||||||
.remark(json.getString("remark"))
|
.remark(json.getString("remark"))
|
||||||
.build();
|
.build();
|
||||||
resultList.add(dto);
|
resultList.add(dto);
|
||||||
|
|||||||
@@ -6,8 +6,11 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.impl.StIvtIostorinvOutServiceImpl;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.impl.StIvtIostorinvOutServiceImpl;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.impl.LashManageServiceImpl;
|
||||||
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.LashManageService;
|
||||||
import org.nl.common.utils.SecurityUtils;
|
import org.nl.common.utils.SecurityUtils;
|
||||||
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;
|
||||||
@@ -15,8 +18,12 @@ import org.nl.modules.wql.util.SpringContextHolder;
|
|||||||
import org.nl.wms.sch.AcsTaskDto;
|
import org.nl.wms.sch.AcsTaskDto;
|
||||||
import org.nl.wms.sch.manage.AbstractAcsTask;
|
import org.nl.wms.sch.manage.AbstractAcsTask;
|
||||||
import org.nl.wms.sch.manage.TaskStatusEnum;
|
import org.nl.wms.sch.manage.TaskStatusEnum;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@@ -127,6 +134,14 @@ public class TwoOutTask extends AbstractAcsTask {
|
|||||||
JSONArray resultJSONArray = taskTab.query("task_group_id = '" + jsonTask.getString("task_group_id") + "' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'")
|
JSONArray resultJSONArray = taskTab.query("task_group_id = '" + jsonTask.getString("task_group_id") + "' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'")
|
||||||
.getResultJSONArray(0);
|
.getResultJSONArray(0);
|
||||||
|
|
||||||
|
// 下发桁架任务:捆扎
|
||||||
|
JSONObject jsonParam = new JSONObject();
|
||||||
|
jsonParam.put("device_code",jsonTask.getString("point_code2"));
|
||||||
|
jsonParam.put("vehicle_code",jsonTask.getString("vehicle_code"));
|
||||||
|
|
||||||
|
LashManageServiceImpl bean1 = SpringContextHolder.getBean(LashManageServiceImpl.class);
|
||||||
|
bean1.createLashTask(jsonParam);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(resultJSONArray)) {
|
if (ObjectUtil.isEmpty(resultJSONArray)) {
|
||||||
this.immediateNotifyAcs(null);
|
this.immediateNotifyAcs(null);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public enum IOSEnum {
|
|||||||
EXT_SYSTEM(MapOf.of("mes", "mes","sap","sap","crm","crm")),
|
EXT_SYSTEM(MapOf.of("mes", "mes","sap","sap","crm","crm")),
|
||||||
|
|
||||||
//acs申请任务
|
//acs申请任务
|
||||||
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","贴标","1","捆扎","2")),
|
ACSTOLMS_TYPE(MapOf.of("成品入库任务", "1","空盘入库","2","空盘出库","3","异常处理位","4","木箱入库","5","贴标","1","捆扎","2")),
|
||||||
;
|
;
|
||||||
|
|
||||||
private Map<String, String> code;
|
private Map<String, String> code;
|
||||||
|
|||||||
@@ -1108,7 +1108,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010504");
|
jsonTaskParam.put("task_type", "010709");
|
||||||
jsonTaskParam.put("start_device_code", jsonLow.getString("struct_code"));
|
jsonTaskParam.put("start_device_code", jsonLow.getString("struct_code"));
|
||||||
jsonTaskParam.put("next_device_code", jsonMove.getString("struct_code"));
|
jsonTaskParam.put("next_device_code", jsonMove.getString("struct_code"));
|
||||||
jsonTaskParam.put("vehicle_code", jsonLow.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code", jsonLow.getString("storagevehicle_code"));
|
||||||
@@ -1205,7 +1205,7 @@ public class StIvtIostorinvOutServiceImpl extends ServiceImpl<StIvtIostorinvOutM
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010504");
|
jsonTaskParam.put("task_type", "010711");
|
||||||
jsonTaskParam.put("point_code1", start_device_code);
|
jsonTaskParam.put("point_code1", start_device_code);
|
||||||
jsonTaskParam.put("point_code2", point_code);
|
jsonTaskParam.put("point_code2", point_code);
|
||||||
jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||||
|
|||||||
@@ -473,7 +473,7 @@ public class StIvtIostorinvServiceImpl extends ServiceImpl<StIvtIostorinvMapper,
|
|||||||
|
|
||||||
// 创建任务
|
// 创建任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010501");
|
jsonTaskParam.put("task_type", "010702");
|
||||||
jsonTaskParam.put("start_device_code", pointDto.getPoint_code());
|
jsonTaskParam.put("start_device_code", pointDto.getPoint_code());
|
||||||
jsonTaskParam.put("next_device_code", jsonDis.getString("struct_code"));
|
jsonTaskParam.put("next_device_code", jsonDis.getString("struct_code"));
|
||||||
jsonTaskParam.put("vehicle_code", jsonDis.getString("box_no"));
|
jsonTaskParam.put("vehicle_code", jsonDis.getString("box_no"));
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.hutool.core.date.DateUtil;
|
|||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import org.nl.b_lms.sch.tasks.TwoInBoxTask;
|
import org.nl.b_lms.sch.tasks.TwoInBoxTask;
|
||||||
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
import org.nl.b_lms.storage_manage.database.service.IBstIvtBoxinfoService;
|
||||||
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
import org.nl.b_lms.storage_manage.database.service.dao.BstIvtBoxinfo;
|
||||||
@@ -54,32 +55,22 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
@Transactional
|
@Transactional
|
||||||
public void inBox(JSONObject whereJson) {
|
public void inBox(JSONObject whereJson) {
|
||||||
/*
|
/*
|
||||||
* 1.查询mes木箱信息,插入木箱信息表
|
* 1.找木箱区的一个仓位
|
||||||
* 2.找木箱区的一个仓位
|
* 2.插入木箱对象载具表
|
||||||
* 3.插入木箱对象载具表
|
|
||||||
*/
|
*/
|
||||||
// 点位表
|
// 点位表
|
||||||
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
WQLObject pointTab = WQLObject.getWQLObject("sch_base_point");
|
||||||
// 仓位表
|
// 仓位表
|
||||||
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
WQLObject attrTab = WQLObject.getWQLObject("st_ivt_structattr");
|
||||||
// 载具表
|
|
||||||
WQLObject vehicleTab = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
// 查询木箱信息
|
||||||
// 载具扩展属性表
|
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||||
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 查询mes木箱信息,插入木箱信息表
|
* 找一个木箱区的一个仓位,生成任务并下发
|
||||||
*/
|
|
||||||
|
|
||||||
// 调用mes接口
|
|
||||||
JSONObject mesBoxInfo = new JSONObject();
|
|
||||||
|
|
||||||
// 插入木箱信息表
|
|
||||||
// BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.mesInsert(mesBoxInfo);
|
|
||||||
BstIvtBoxinfo boxDao = BstIvtBoxinfo.builder().build();
|
|
||||||
|
|
||||||
/*
|
|
||||||
* 找一个木箱区的一个仓位,生辰任务并下发
|
|
||||||
*/
|
*/
|
||||||
// 判断起点点位是否存在
|
// 判断起点点位是否存在
|
||||||
JSONObject jsonPoint = pointTab.query("point_code = '" + whereJson.getString("device_code") + "' AND is_delete = '" +
|
JSONObject jsonPoint = pointTab.query("point_code = '" + whereJson.getString("device_code") + "' AND is_delete = '" +
|
||||||
@@ -109,7 +100,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010502");
|
jsonTaskParam.put("task_type", "010702");
|
||||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||||
jsonTaskParam.put("next_device_code", jsonAttr.getString("struct_code"));
|
jsonTaskParam.put("next_device_code", jsonAttr.getString("struct_code"));
|
||||||
jsonTaskParam.put("vehicle_code", whereJson.getString("box_no"));
|
jsonTaskParam.put("vehicle_code", whereJson.getString("box_no"));
|
||||||
@@ -126,6 +117,23 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
// 清空缓存
|
// 清空缓存
|
||||||
notInRowList.clear();
|
notInRowList.clear();
|
||||||
notInBlockList.clear();
|
notInBlockList.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Transactional
|
||||||
|
public void boxBinVehicle(JSONObject whereJson) {
|
||||||
|
// 载具表
|
||||||
|
WQLObject vehicleTab = WQLObject.getWQLObject("md_pb_storagevehicleinfo");
|
||||||
|
// 载具扩展属性表
|
||||||
|
WQLObject veExtTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||||
|
/*
|
||||||
|
* 查询mes木箱信息,插入木箱信息表
|
||||||
|
*/
|
||||||
|
// TODO 调用mes接口
|
||||||
|
JSONObject mesBoxInfo = new JSONObject();
|
||||||
|
|
||||||
|
// 插入木箱信息表
|
||||||
|
iBstIvtBoxinfoService.mesInsert(mesBoxInfo);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 插入木箱对应载具表
|
* 插入木箱对应载具表
|
||||||
@@ -145,6 +153,8 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
|||||||
jsonVeExt.put("pcsn", whereJson.getString("box_no"));
|
jsonVeExt.put("pcsn", whereJson.getString("box_no"));
|
||||||
jsonVeExt.put("device_uuid", IdUtil.getLongId());
|
jsonVeExt.put("device_uuid", IdUtil.getLongId());
|
||||||
veExtTab.insert(jsonVeExt);
|
veExtTab.insert(jsonVeExt);
|
||||||
|
|
||||||
|
// TODO 手持下发桁架任务
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ public class InVehicleManageServiceImpl implements InVehicleManageService {
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010502");
|
jsonTaskParam.put("task_type", "010705");
|
||||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||||
jsonTaskParam.put("next_device_code", jsonAttr.getString("struct_code"));
|
jsonTaskParam.put("next_device_code", jsonAttr.getString("struct_code"));
|
||||||
jsonTaskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
|
jsonTaskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ 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 org.hibernate.annotations.Source;
|
||||||
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;
|
||||||
@@ -20,9 +21,11 @@ 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;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -41,26 +44,22 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
/**
|
/**
|
||||||
* 木箱信息服务
|
* 木箱信息服务
|
||||||
*/
|
*/
|
||||||
@Autowired
|
private final IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
||||||
private IBstIvtBoxinfoService iBstIvtBoxinfoService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位服务
|
* 点位服务
|
||||||
*/
|
*/
|
||||||
@Autowired
|
private final IschBasePointService ischBasePointService;
|
||||||
private IschBasePointService ischBasePointService;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 点位mapper服务
|
* 点位mapper服务
|
||||||
*/
|
*/
|
||||||
@Autowired
|
private final SchBasePointMapper schBasePointMapper;
|
||||||
private SchBasePointMapper schBasePointMapper;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 木箱捆扎绑定服务
|
* 木箱捆扎绑定服务
|
||||||
*/
|
*/
|
||||||
@Autowired
|
private final IBstIvtBoxlashboundService iBstIvtBoxlashboundService;
|
||||||
private IBstIvtBoxlashboundService iBstIvtBoxlashboundService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
@@ -73,11 +72,11 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
// 查询木箱信息
|
// 查询木箱信息
|
||||||
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||||
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
|
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("vehicle_code"))
|
||||||
);
|
);
|
||||||
|
|
||||||
if (ObjectUtil.isEmpty(boxDao)) {
|
if (ObjectUtil.isEmpty(boxDao)) {
|
||||||
throw new BadRequestException("没有此木箱信息:"+whereJson.getString("box_no"));
|
throw new BadRequestException("没有此木箱信息:"+whereJson.getString("vehicle_code"));
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation")
|
JSONObject jsonSub = WQLObject.getWQLObject("pdm_bi_subpackagerelation")
|
||||||
@@ -181,14 +180,52 @@ public class LashManageServiceImpl implements LashManageService {
|
|||||||
* 生成任务并下发
|
* 生成任务并下发
|
||||||
*/
|
*/
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010504");
|
jsonTaskParam.put("task_type", "010707");
|
||||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||||
jsonTaskParam.put("next_device_code", end_point);
|
jsonTaskParam.put("next_device_code", end_point);
|
||||||
jsonTaskParam.put("vehicle_code", whereJson.getString("box_no"));
|
jsonTaskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||||
jsonTaskParam.put("is_auto_issue", is_move);
|
jsonTaskParam.put("is_auto_issue", is_move);
|
||||||
|
|
||||||
TwoLashTask taskBean = new TwoLashTask();
|
TwoLashTask taskBean = new TwoLashTask();
|
||||||
taskBean.createTask(jsonTaskParam);
|
taskBean.createTask(jsonTaskParam);
|
||||||
taskBean.immediateNotifyAcs(null);
|
taskBean.immediateNotifyAcs(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject applyTab(JSONObject whereJson) {
|
||||||
|
// 载具扩展属性表
|
||||||
|
WQLObject extTab = WQLObject.getWQLObject("md_pb_storagevehicleext");
|
||||||
|
|
||||||
|
// TODO 贴标流程
|
||||||
|
JSONObject result = new JSONObject();
|
||||||
|
|
||||||
|
// 查询木箱对应托盘信息
|
||||||
|
JSONObject jsonExt = extTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'").uniqueResult(0);
|
||||||
|
if (ObjectUtil.isEmpty(jsonExt)) {
|
||||||
|
throw new BadRequestException("此托盘上没有木箱!"+whereJson.getString("vehicle_code"));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询木箱信息
|
||||||
|
BstIvtBoxinfo boxDao = iBstIvtBoxinfoService.getOne(
|
||||||
|
new QueryWrapper<BstIvtBoxinfo>().lambda()
|
||||||
|
.eq(BstIvtBoxinfo::getBox_no, jsonExt.getString("pcsn"))
|
||||||
|
);
|
||||||
|
|
||||||
|
// 返回参数
|
||||||
|
result.put("length", boxDao.getBox_length());
|
||||||
|
result.put("weight", boxDao.getBox_width());
|
||||||
|
result.put("height", boxDao.getBox_high());
|
||||||
|
result.put("isBinding", IOSEnum.IS_SEND.code("是"));
|
||||||
|
result.put("isLabeling", IOSEnum.IS_SEND.code("是"));
|
||||||
|
|
||||||
|
result.put("labelingTemplate", boxDao.getLash_num());
|
||||||
|
result.put("bindingTemplate", "1");
|
||||||
|
|
||||||
|
result.put("printDevice", "1");
|
||||||
|
|
||||||
|
result.put("printQty", "1");
|
||||||
|
result.put("bundleTimes", "1");
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ public class OutBoxManageServiceImpl implements OutBoxManageService {
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010504");
|
jsonTaskParam.put("task_type", "010704");
|
||||||
jsonTaskParam.put("start_device_code", jsonAttr.getString("struct_code"));
|
jsonTaskParam.put("start_device_code", jsonAttr.getString("struct_code"));
|
||||||
jsonTaskParam.put("next_device_code", whereJson.getString("device_code"));
|
jsonTaskParam.put("next_device_code", whereJson.getString("device_code"));
|
||||||
jsonTaskParam.put("vehicle_code", jsonAttr.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code", jsonAttr.getString("storagevehicle_code"));
|
||||||
|
|||||||
@@ -413,7 +413,7 @@ public class OutBussManageServiceImpl implements OutBussManageService {
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject param2 = new JSONObject();
|
JSONObject param2 = new JSONObject();
|
||||||
param2.put("task_type", "010505");
|
param2.put("task_type", "010709");
|
||||||
param2.put("vehicle_code", json.getString("storagevehicle_code"));
|
param2.put("vehicle_code", json.getString("storagevehicle_code"));
|
||||||
param2.put("point_code1", json.getString("struct_code"));
|
param2.put("point_code1", json.getString("struct_code"));
|
||||||
param2.put("point_code2", jsonMove.getString("struct_code"));
|
param2.put("point_code2", jsonMove.getString("struct_code"));
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class OutVehicleManageServiceImpl implements OutVehicleManageService {
|
|||||||
|
|
||||||
// 生成任务
|
// 生成任务
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
jsonTaskParam.put("task_type", "010504");
|
jsonTaskParam.put("task_type", "010706");
|
||||||
jsonTaskParam.put("start_device_code", jsonAttr.getString("struct_code"));
|
jsonTaskParam.put("start_device_code", jsonAttr.getString("struct_code"));
|
||||||
jsonTaskParam.put("next_device_code", whereJson.getString("device_code"));
|
jsonTaskParam.put("next_device_code", whereJson.getString("device_code"));
|
||||||
jsonTaskParam.put("vehicle_code", jsonAttr.getString("storagevehicle_code"));
|
jsonTaskParam.put("vehicle_code", jsonAttr.getString("storagevehicle_code"));
|
||||||
|
|||||||
@@ -203,7 +203,7 @@ public class SendOutManageServiceImpl implements SendOutManageService {
|
|||||||
task_jo.put("point_code1", whereJson.getString("device_code"));
|
task_jo.put("point_code1", whereJson.getString("device_code"));
|
||||||
task_jo.put("point_code2", point_code);
|
task_jo.put("point_code2", point_code);
|
||||||
task_jo.put("vehicle_code", whereJson.getString("vehicle_code"));
|
task_jo.put("vehicle_code", whereJson.getString("vehicle_code"));
|
||||||
task_jo.put("task_type", "010506");
|
task_jo.put("task_type", "010708");
|
||||||
TwoSendOutTask taskBean = new TwoSendOutTask();
|
TwoSendOutTask taskBean = new TwoSendOutTask();
|
||||||
taskBean.createTask(task_jo);
|
taskBean.createTask(task_jo);
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,19 @@ public interface InBoxManageService {
|
|||||||
/**
|
/**
|
||||||
* 木箱入库
|
* 木箱入库
|
||||||
* @param whereJson:{
|
* @param whereJson:{
|
||||||
* box_no: 木箱号
|
* box_no:木箱号
|
||||||
* vehicle_code:托盘号
|
|
||||||
* device_code:起点点位
|
* device_code:起点点位
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
void inBox(JSONObject whereJson);
|
void inBox(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询mes木箱信息并托绑定托盘 , 下发桁架任务
|
||||||
|
* @param whereJson:{
|
||||||
|
* box_no: 木箱号
|
||||||
|
* vehicle_code:托盘号
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
void boxBinVehicle(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,10 +16,32 @@ public interface LashManageService {
|
|||||||
* 创建桁架任务
|
* 创建桁架任务
|
||||||
* @param whereJson {
|
* @param whereJson {
|
||||||
* device_code:起点
|
* device_code:起点
|
||||||
* box_no: 箱号
|
* vehicle_code: 箱号
|
||||||
*
|
*
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
void createLashTask(JSONObject whereJson);
|
void createLashTask(JSONObject whereJson);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请是否贴标
|
||||||
|
* @param whereJson {
|
||||||
|
* device_code:起点
|
||||||
|
* vehicle_code: 载具号
|
||||||
|
*
|
||||||
|
* }
|
||||||
|
* @return JSONObject {
|
||||||
|
* length: 木箱长
|
||||||
|
* weight: 木箱宽
|
||||||
|
* height: 木箱高
|
||||||
|
* isBinding: 是否捆绑
|
||||||
|
* isLabeling: 是否贴标
|
||||||
|
* bindingTemplate: 捆扎模板
|
||||||
|
* labelingTemplate: 贴标模板
|
||||||
|
* bundleTimes: 捆扎次数
|
||||||
|
* printQty: 贴标数量
|
||||||
|
* printDevice: 使用打印机
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
JSONObject applyTab(JSONObject whereJson);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
import com.google.common.collect.Interner;
|
import com.google.common.collect.Interner;
|
||||||
import com.google.common.collect.Interners;
|
import com.google.common.collect.Interners;
|
||||||
@@ -17,23 +16,14 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
import org.nl.b_lms.sch.point.dao.BstIvtPackageinfoivt;
|
||||||
import org.nl.b_lms.sch.point.dao.mapper.BstIvtPackageinfoivtMapper;
|
|
||||||
import org.nl.b_lms.sch.point.dao.mapper.SchBasePointMapper;
|
|
||||||
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
import org.nl.b_lms.sch.point.service.IbstIvtPackageinfoivtService;
|
||||||
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
import org.nl.b_lms.sch.point.service.IschBasePointService;
|
||||||
import org.nl.b_lms.sch.point.service.impl.BstIvtPackageinfoivtServiceImpl;
|
|
||||||
import org.nl.b_lms.sch.point.service.impl.SchBasePointServiceImpl;
|
|
||||||
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
import org.nl.b_lms.sch.task.dao.SchBaseTask;
|
||||||
import org.nl.b_lms.sch.task.dao.mapper.SchBaseTaskMapper;
|
|
||||||
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
import org.nl.b_lms.sch.task.service.IschBaseTaskService;
|
||||||
import org.nl.b_lms.sch.task.service.impl.SchBaseTaskServiceImpl;
|
import org.nl.b_lms.sch.tasks.TwoBoxExcepTask;
|
||||||
import org.nl.b_lms.sch.tasks.TwoEmpExcepTask;
|
|
||||||
import org.nl.b_lms.sch.tasks.packingArea.MzhcwTask;
|
import org.nl.b_lms.sch.tasks.packingArea.MzhcwTask;
|
||||||
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InBussManageService;
|
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.*;
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.InVehicleManageService;
|
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.OutVehicleManageService;
|
|
||||||
import org.nl.b_lms.storage_manage.ios.service.iostorInv.util.service.SendOutManageService;
|
|
||||||
import org.nl.common.enums.PackageInfoIvtEnum;
|
import org.nl.common.enums.PackageInfoIvtEnum;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
import org.nl.modules.system.util.CodeUtil;
|
import org.nl.modules.system.util.CodeUtil;
|
||||||
@@ -112,6 +102,16 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
*/
|
*/
|
||||||
private final SendOutManageService sendOutManageService;
|
private final SendOutManageService sendOutManageService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 捆扎处理服务
|
||||||
|
*/
|
||||||
|
private final LashManageService lashManageService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 木箱入库处理服务
|
||||||
|
*/
|
||||||
|
private final InBoxManageService inBoxManageService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IschBaseTaskService taskService;
|
private IschBaseTaskService taskService;
|
||||||
@Resource
|
@Resource
|
||||||
@@ -1799,7 +1799,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
throw new BadRequestException("设备不能为空!");
|
throw new BadRequestException("设备不能为空!");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库")) || type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) {
|
||||||
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
|
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
|
||||||
throw new BadRequestException("载具类型不能为空!");
|
throw new BadRequestException("载具类型不能为空!");
|
||||||
}
|
}
|
||||||
@@ -1837,17 +1837,27 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
|
|
||||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
|
||||||
|
|
||||||
// 4-异常处理
|
// 4-空木箱异常处理
|
||||||
JSONObject jsonTaskParam = new JSONObject();
|
if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) {
|
||||||
jsonTaskParam.put("task_type", "010504");
|
throw new BadRequestException("木箱号不能为空!");
|
||||||
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
}
|
||||||
jsonTaskParam.put("next_device_code", "");
|
|
||||||
jsonTaskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
|
|
||||||
jsonTaskParam.put("vehicle_type", whereJson.getString("container_type"));
|
|
||||||
|
|
||||||
TwoEmpExcepTask taskBean = new TwoEmpExcepTask();
|
JSONObject jsonTaskParam = new JSONObject();
|
||||||
|
jsonTaskParam.put("task_type", "010710");
|
||||||
|
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
|
||||||
|
jsonTaskParam.put("next_device_code", "B1_ERRO");
|
||||||
|
jsonTaskParam.put("vehicle_code", whereJson.getString("material_barcode"));
|
||||||
|
|
||||||
|
TwoBoxExcepTask taskBean = new TwoBoxExcepTask();
|
||||||
taskBean.createTask(jsonTaskParam);
|
taskBean.createTask(jsonTaskParam);
|
||||||
|
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("木箱入库"))) {
|
||||||
|
|
||||||
|
// 5-木箱入库
|
||||||
|
whereJson.put("box_no", whereJson.getString("material_barcode"));
|
||||||
|
inBoxManageService.inBox(whereJson);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
result.put("message", "下发成功!");
|
result.put("message", "下发成功!");
|
||||||
log.info("applyTwo返回参数:---------------------------------------------" + result.toString());
|
log.info("applyTwo返回参数:---------------------------------------------" + result.toString());
|
||||||
@@ -1921,8 +1931,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
// 1-贴标
|
// 1-贴标
|
||||||
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("贴标"))) {
|
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("贴标"))) {
|
||||||
|
|
||||||
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("贴标"))) {
|
JSONObject paramResult = lashManageService.applyTab(whereJson);
|
||||||
// 2-捆扎
|
result.put("data", paramResult);
|
||||||
|
|
||||||
|
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("捆扎"))) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
|
|||||||
@@ -40,6 +40,9 @@ public class AcsUtil {
|
|||||||
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0105")) {
|
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0105")) {
|
||||||
product_area = "LK";
|
product_area = "LK";
|
||||||
}
|
}
|
||||||
|
if (jo.containsKey("class_type") && jo.getString("class_type").contains("0107")) {
|
||||||
|
product_area = "LK";
|
||||||
|
}
|
||||||
if (StrUtil.isEmpty(product_area)) {
|
if (StrUtil.isEmpty(product_area)) {
|
||||||
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());
|
throw new BadRequestException("区域不能为空!下发信息:" + jo.toString());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
task.*,
|
task.*,
|
||||||
md.class_name task_type_name,
|
md.class_name task_type_name,
|
||||||
dict.label task_status_name,
|
dict.label task_status_name,
|
||||||
case when task.task_type like '0105%' then 'LK' ELSE task.product_area end AS final_product_area
|
case when task.task_type like '0105%' then 'LK' when task.task_type like '0107%' then 'LK' ELSE task.product_area end AS final_product_area
|
||||||
FROM
|
FROM
|
||||||
sch_base_task task
|
sch_base_task task
|
||||||
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
|
LEFT JOIN md_pb_classstandard md ON task.task_type = md.class_code
|
||||||
|
|||||||
@@ -276,8 +276,11 @@ export default {
|
|||||||
this.sects = res.content
|
this.sects = res.content
|
||||||
})
|
})
|
||||||
|
|
||||||
const area_type = '1585164789083148288'
|
var area_type = '1585164789083148288'
|
||||||
|
|
||||||
|
if (this.storId.toString() === '1582991156504039455') {
|
||||||
|
area_type = '1760910421470089216'
|
||||||
|
}
|
||||||
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
|
crudPoint.getPoint({ 'area_type': area_type }).then(res => {
|
||||||
this.pointlist = res
|
this.pointlist = res
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user