This commit is contained in:
2024-05-13 11:11:37 +08:00
21 changed files with 125 additions and 123 deletions

View File

@@ -146,10 +146,8 @@ public class VehicleTwoServiceImpl implements VehicleTwoService {
public JSONObject boxIn(JSONObject whereJson) {
// 调用接口
inBoxManageService.boxBinVehicle(whereJson);
JSONObject result = new JSONObject();
result.put("message", "入库成功!");
return result;
}

View File

@@ -46,7 +46,7 @@ public class TwoInBoxTask extends AbstractAcsTask {
.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"))
.vehicle_code(json.getString("vehicle_code2"))
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
@@ -156,6 +156,7 @@ public class TwoInBoxTask extends AbstractAcsTask {
json.put("task_code", IdUtil.getSnowflake(1, 1).nextId());
json.put("task_type", form.getString("task_type"));
json.put("vehicle_code", form.getString("vehicle_code"));
json.put("vehicle_code2", form.getString("vehicle_code2"));
json.put("task_status", TaskStatusEnum.START_AND_POINT.getCode());
json.put("point_code1", form.getString("start_device_code"));
json.put("point_code2", form.getString("next_device_code"));

View File

@@ -5,6 +5,7 @@ import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import org.apache.commons.lang3.StringUtils;
import org.nl.b_lms.storage_manage.ios.enums.IOSEnum;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.common.exception.BadRequestException;
@@ -16,6 +17,7 @@ import org.springframework.transaction.annotation.Transactional;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* 二期入木箱行架任务类
@@ -34,12 +36,10 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
* 下发给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);
JSONObject params = json.getJSONObject("params");
//JSONObject params = json.getJSONObject("params");
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"))
@@ -51,12 +51,8 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
.priority(json.getString("priority"))
.class_type(json.getString("task_type"))
.dtl_type(String.valueOf(dtl_type))
.interaction_json(json.getJSONObject("request_param"))
.remark(json.getString("rem ark"))
.layer(json.getString("layer"))
.barcode(params.getString("box_no"))
.height(params.getString("height"))
.width(params.getString("width"))
.length(params.getString("length"))
.build();
resultList.add(dto);
}
@@ -148,8 +144,8 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
json.put("create_name", SecurityUtils.getCurrentUsername());
json.put("create_time", DateUtil.now());
json.put("priority", "1");
json.put("acs_task_type", "7");
json.put("acs_task_type", "6");
json.put("request_param", form.getString("request_param"));
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
return json.getString("task_id");
}

View File

@@ -89,7 +89,6 @@ public class TwoOutEmpTask extends AbstractAcsTask {
JSONObject jsonAttr = attrTab.query("struct_code = '" + jsonTask.getString("point_code1") + "'").uniqueResult(0);
jsonAttr.put("lock_type",IOSEnum.LOCK_TYPE.code("未锁定"));
jsonAttr.put("storagevehicle_code","");
jsonAttr.put("storagevehicle_type","");
attrTab.update(jsonAttr);
}

View File

@@ -99,6 +99,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
jsonParam.put("box_length", boxDao.getBox_length());
jsonParam.put("box_width", boxDao.getBox_width());
jsonParam.put("box_high", boxDao.getBox_high());
jsonParam.put("vehicle_type", boxDao.getVehicle_type());
JSONObject jsonAttr = getStruct(jsonParam);
@@ -114,6 +115,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
jsonTaskParam.put("start_device_code", whereJson.getString("device_code"));
jsonTaskParam.put("next_device_code", jsonAttr.getString("struct_code"));
jsonTaskParam.put("vehicle_code", whereJson.getString("box_no"));
jsonTaskParam.put("vehicle_code2", whereJson.getString("vehicle_code"));
TwoInBoxTask taskBean = new TwoInBoxTask();
taskBean.createTask(jsonTaskParam);
@@ -155,40 +157,37 @@ public class InBoxManageServiceImpl implements InBoxManageService {
new QueryWrapper<BstIvtBoxinfo>().lambda()
.eq(BstIvtBoxinfo::getBox_no, whereJson.getString("box_no"))
);
if (boxDao == null) {
throw new BadRequestException("木箱不存在!");
}
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'")
.uniqueResult(0);
if (ObjectUtil.isEmpty(jsonVehicle)) {
throw new BadRequestException("载具不存在!");
}
JSONObject jsonVeExt = new JSONObject();
jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId());
jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id"));
jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code"));
jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type"));
jsonVeExt.put("pcsn", whereJson.getString("box_no"));
jsonVeExt.put("device_uuid", IdUtil.getLongId());
veExtTab.insert(jsonVeExt);
// if (ObjectUtil.isEmpty(jsonVehicle)) {
// throw new BadRequestException("载具不存在!");
// }
// JSONObject jsonVeExt = new JSONObject();
// jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId());
// jsonVeExt.put("storagevehicle_id", jsonVehicle.getLongValue("storagevehicle_id"));
// jsonVeExt.put("storagevehicle_code", jsonVehicle.getString("storagevehicle_code"));
// jsonVeExt.put("storagevehicle_type", jsonVehicle.getString("storagevehicle_type"));
// jsonVeExt.put("pcsn", whereJson.getString("box_no"));
// jsonVeExt.put("device_uuid", IdUtil.getLongId());
// veExtTab.insert(jsonVeExt);
// 下发桁架任务
JSONObject taskParam = new JSONObject();
taskParam.put("task_type", "010713");
taskParam.put("start_device_code", whereJson.getString("point_code"));
taskParam.put("next_device_code", "1001");
taskParam.put("next_device_code", "RK1005");
taskParam.put("vehicle_code", whereJson.getString("vehicle_code"));
taskParam.put("vehicle_code2", whereJson.getString("vehicle_code"));
JSONObject param = new JSONObject();
param.put("layer", whereJson.getString("layer"));
param.put("box_length",boxDao.getBox_length());
param.put("box_width",boxDao.getBox_width());
param.put("box_high",boxDao.getBox_high());
param.put("vehicle_type", boxDao.getVehicle_type());
param.put("box_no", whereJson.getString("box_no"));
param.put("length", boxDao.getBox_length());
param.put("width", boxDao.getBox_width());
param.put("height", boxDao.getBox_high());
param.put("containerType", boxDao.getVehicle_type());
param.put("barcode", whereJson.getString("box_no"));
taskParam.put("request_param", param.toString());
TwoInBoxTrussTask taskBean = new TwoInBoxTrussTask();
taskBean.createTask(taskParam);
taskBean.immediateNotifyAcs(null);
@@ -243,6 +242,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
/**
* 找一个空仓位(木箱区)
*
* @param jsonParam {
* stor_id仓库标识
* sect_id库区标识
@@ -262,6 +262,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
*/
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("") + "' " +
"AND storagevehicle_type = '" + jsonParam.getString("vehicle_type") + "'" +
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '" + jsonParam.getString("stor_id") + "' " +
"AND sect_id = '" + jsonParam.getString("sect_id") + "'").getResultJSONArray(0);
@@ -321,6 +322,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
/**
* 确定巷道
*
* @param jsonParam {
* stor_id: 仓库标识
* sect_id: 库区标识
@@ -379,6 +381,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
/**
* 确定排
*
* @param jsonParam {
* stor_id: 仓库标识
* sect_id: 库区标识
@@ -446,6 +449,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
/**
* 确定仓位
*
* @param jsonParam {
* stor_id: 仓库标识
* sect_id: 库区标识
@@ -482,6 +486,7 @@ public class InBoxManageServiceImpl implements InBoxManageService {
/**
* 获取一个货位公共方法
*
* @param jsonParam {
* stor_id: 仓库标识
* sect_id: 库区标识

View File

@@ -164,6 +164,7 @@ public class InVehicleManageServiceImpl implements InVehicleManageService {
JSONArray structArray = attrTab.query("IFNULL(storagevehicle_code,'') = '' " +
"AND is_used = '" + IOSEnum.IS_NOTANDYES.code("") + "' AND is_delete = '" + IOSEnum.IS_NOTANDYES.code("") + "' " +
"AND lock_type = '" + IOSEnum.LOCK_TYPE.code("未锁定") + "' AND stor_id = '"+jsonParam.getString("stor_id")+"' " +
"AND storagevehicle_type = '" +jsonParam.getString("vehicle_type")+"'"+
"AND sect_id = '"+jsonParam.getString("sect_id")+"'").getResultJSONArray(0);
if (ObjectUtil.isEmpty(structArray)) {

View File

@@ -140,7 +140,7 @@
AND attr.block_num = 输入.block_num
AND attr.row_num = 输入.row_num
order by attr.col_num,attr.layer_num ASC,attr.zdepth DESC
order by attr.col_num DESC,attr.layer_num ASC,attr.zdepth DESC
ENDSELECT
ENDQUERY

View File

@@ -212,7 +212,7 @@
attr.row_num = 输入.row_num
ENDOPTION
order by attr.col_num DESC ,attr.layer_num ASC,attr.zdepth DESC
order by attr.col_num,attr.layer_num ASC,attr.zdepth DESC
ENDSELECT
ENDQUERY

View File

@@ -22,7 +22,7 @@
输入.row_in TYPEAS f_string
输入.not_row_in TYPEAS f_string
输入.not_block TYPEAS f_string
输入.storagevehicle_type TYPEAS s_string
输入.vehicle_type TYPEAS s_string
[临时表]
--这边列出来的临时表就会在运行期动态创建
@@ -64,8 +64,8 @@
attr.block_num NOT IN 输入.not_block
ENDOPTION
OPTION 输入.storagevehicle_type <> ""
attr.storagevehicle_type = 输入.storagevehicle_type
OPTION 输入.vehicle_type <> ""
attr.storagevehicle_type = 输入.vehicle_type
ENDOPTION
group by attr.block_num
@@ -147,7 +147,7 @@
AND attr.block_num = 输入.block_num
AND attr.row_num = 输入.row_num
order by attr.col_num,attr.layer_num ASC,attr.zdepth DESC
order by attr.col_num DESC,attr.layer_num ASC,attr.zdepth DESC
ENDSELECT
ENDQUERY

View File

@@ -228,7 +228,7 @@
box.num = 输入.num
ENDOPTION
order by attr.col_num, attr.zdepth, attr.layer_num
order by attr.col_num DESC, attr.zdepth, attr.layer_num
ENDSELECT
ENDQUERY

View File

@@ -168,7 +168,7 @@
attr.row_num = 输入.row_num
ENDOPTION
order by attr.col_num, attr.zdepth
order by attr.col_num DESC, attr.zdepth
ENDSELECT
ENDQUERY

View File

@@ -128,6 +128,9 @@ public class StoragevehicleinfoServiceImpl implements StoragevehicleinfoService
case "0002":
code = "VEHICLE_CODE_GXTP";
break;
case "0003":
code = "VEHICLE_CODE_LK";
break;
default:
break;
}

View File

@@ -1,4 +1,5 @@
package org.nl.wms.ext.acs.service.impl;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.NumberUtil;
@@ -1814,46 +1815,40 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
public JSONObject applyTwo(JSONObject whereJson) {
log.info("applyTwo请求参数---------------------------------------------" + whereJson.toString());
JSONObject result = new JSONObject();
String type = whereJson.getString("type");
RLock lock = redissonClient.getLock("acs_to_wms_two_a:" + type);
boolean tryLock = lock.tryLock(5, TimeUnit.SECONDS);
try {
if (tryLock) {
// 基础校验
if (ObjectUtil.isEmpty(whereJson.getString("device_code"))) {
throw new BadRequestException("设备不能为空!");
}
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) {
String vehicleCode = whereJson.getString("vehicle_code");
if (StrUtil.isEmpty(vehicleCode)) {
vehicleCode = CodeUtil.getNewCode("VEHICCLE_CODE_KTP");
whereJson.put("vehicle_code", vehicleCode);
}
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
throw new BadRequestException("载具类型不能为空!");
}
if (ObjectUtil.isEmpty(whereJson.getString("vehicle_code"))) {
throw new BadRequestException("载具不能为空!");
}
}
// 1-成品入库任务
if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("成品入库任务"))) {
// 调用服务处理
if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) {
throw new BadRequestException("子卷号不能为空!");
}
inBussManageService.inTask(whereJson);
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘入库"))) {
// 2-空盘入库
whereJson.put("vehicle_type", whereJson.getString("container_type"));
inVehicleManageService.inVehicle(whereJson);
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("空盘出库"))) {
// 3-空盘出库
if (ObjectUtil.isEmpty(whereJson.getString("container_type"))) {
throw new BadRequestException("载具类型不能为空!");
@@ -1861,28 +1856,22 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
whereJson.put("vehicle_type", whereJson.getString("container_type"));
outVehicleManageService.outVehicle(whereJson);
} else if (type.equals(IOSEnum.ACSTOLMS_TYPE.code("异常处理位"))) {
// 4-空木箱异常处理
if (ObjectUtil.isEmpty(whereJson.getString("material_barcode"))) {
throw new BadRequestException("木箱号不能为空!");
}
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);
} 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("message", "下发成功!");
log.info("applyTwo返回参数---------------------------------------------" + result.toString());
@@ -1893,7 +1882,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
lock.unlock();
}
}
result.put("status", HttpStatus.BAD_REQUEST.value());
result.put("message", "申请任务超时!" + type);
log.info("applyTwo返回参数---------------------------------------------" + result.toString());

View File

@@ -59,6 +59,10 @@ public class AcsTaskDto {
* 扩展参数
*/
private String params;
/**
* 温度
*/

View File

@@ -375,6 +375,7 @@ public class CheckOutBillController {
@PostMapping("/testInEmp")
@Log("空载具入库测试")
@SaIgnore
public ResponseEntity<Object> testInEmp(@RequestBody JSONObject whereJson) {
new InVehicleManageServiceImpl().inVehicle(whereJson);
return new ResponseEntity<>(HttpStatus.OK);

View File

@@ -1,8 +1,9 @@
ENV = 'development'
# 接口地址
VUE_APP_BASE_API = 'http://localhost:8010'
VUE_APP_WS_API = 'ws://localhost:8010'
VUE_APP_BASE_API = 'http://localhost:8011'
VUE_APP_WS_API = 'ws://localhost:8011'
# 是否启用 babel-plugin-dynamic-import-node插件
VUE_CLI_BABEL_TRANSPILE_MODULES = true

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 622 B

View File

@@ -1,14 +1,17 @@
.head-container {
padding-bottom: 10px;
padding-top: 8px;
padding-bottom: 6px;
background-color: #ffffff;
border-radius: 4px;
.filter-item {
display: inline-block;
vertical-align: middle;
margin: 0 3px 3px 0;
margin: 0 3px 10px 0;
input {
height: 28px;
line-height: 28px;
height: 30.5px;
line-height: 30.5px;
}
}
@@ -19,7 +22,7 @@
vertical-align: middle;
font-size: 14px;
color: #606266;
line-height: 28px;
line-height: 30.5px;
padding: 0 7px 0 7px;
}
@@ -28,7 +31,7 @@
}
.el-select__caret.el-input__icon.el-icon-arrow-up {
line-height: 28px;
line-height: 30.5px;
}
.date-item {
@@ -149,7 +152,7 @@
}
.el-form-item--mini.el-form-item {
margin-bottom: 8px !important;
margin-bottom: 10px !important;
}
//去除编辑文本框为数字时的上下箭头start
@@ -188,7 +191,7 @@ input[type="number"]::-webkit-outer-spin-button {
.el-table__fixed-header-wrapper {
th {
word-break: break-word;
background-color: #f8f8f9;
background-color: #f5f5f5;
color: #515a6e;
height: 35px;
font-size: 13px;

View File

@@ -21,6 +21,7 @@ label {
html {
height: 100%;
box-sizing: border-box;
background-color: #eeeeee;
}
#app {
@@ -98,7 +99,7 @@ div:focus {
}
aside {
background: #eef1f6;
background: #d40c70;
padding: 8px 24px;
margin-bottom: 20px;
border-radius: 2px;
@@ -122,7 +123,7 @@ aside {
//main-container全局样式
.app-container {
padding: 20px 20px 45px 20px;
padding: 10px 10px 45px 10px;
}
.components-container {

View File

@@ -13,17 +13,17 @@ $base-logo-light-title-color: #001529;
$base-menu-light-background:#ffffff;
// sidebar
$menuText:#bfcbd9;
$menuText: #ffffff;
$menuActiveText:#409EFF;
$subMenuActiveText:#f4f4f5; // https://github.com/ElemeFE/element/issues/12951
$subMenuActiveText: #ffffff; // https://github.com/ElemeFE/element/issues/12951
$menuBg:#304156; //https://cloud.tencent.com/developer/article/1753773
$menuHover:#263445;
$menuBg: #001529; //https://cloud.tencent.com/developer/article/1753773
$menuHover:#4e5465;
$base-menu-light-color:rgba(0,0,0,.70);
$subMenuBg:#1f2d3d;
$subMenuHover:#001528;
$subMenuBg:#000c17;
$subMenuHover:#4e5465;
$sideBarWidth: 205px;
@@ -45,4 +45,4 @@ $sideBarWidth: 205px;
logoLightTitleColor: $base-logo-light-title-color
}
$base-sidebar-width: 200px;
$base-sidebar-width: 2010px;

View File

@@ -258,6 +258,7 @@ export default {
display: -webkit-flex;
display: flex;
align-items: center;
margin: 0px 10px 0px 10px;
}
.crud-opts .crud-opts-right {
margin-left: auto;