Merge branch 'b_lms' of http://121.40.234.130:8899/root/lanzhouhailiang_one into b_lms
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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,13 @@ 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("remark"))
|
||||
.layer(json.getString("layer"))
|
||||
.barcode(params.getString("box_no"))
|
||||
.height(params.getString("height"))
|
||||
.width(params.getString("width"))
|
||||
.length(params.getString("length"))
|
||||
// .layer(params.getString("layer"))
|
||||
// .barcode(params.getString("box_no"))
|
||||
// .height(params.getString("height"))
|
||||
// .width(params.getString("width"))
|
||||
// .length(params.getString("length"))
|
||||
.build();
|
||||
resultList.add(dto);
|
||||
}
|
||||
@@ -149,7 +150,7 @@ public class TwoInBoxTrussTask extends AbstractAcsTask {
|
||||
json.put("create_time", DateUtil.now());
|
||||
json.put("priority", "1");
|
||||
json.put("acs_task_type", "7");
|
||||
|
||||
json.put("request_param", form.getString("request_param"));
|
||||
WQLObject.getWQLObject("SCH_BASE_Task").insert(json);
|
||||
return json.getString("task_id");
|
||||
}
|
||||
|
||||
@@ -160,9 +160,9 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
JSONObject jsonVehicle = vehicleTab.query("storagevehicle_code = '" + whereJson.getString("vehicle_code") + "'")
|
||||
.uniqueResult(0);
|
||||
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在!");
|
||||
}
|
||||
if (ObjectUtil.isEmpty(jsonVehicle)) {
|
||||
throw new BadRequestException("载具不存在!");
|
||||
}
|
||||
|
||||
JSONObject jsonVeExt = new JSONObject();
|
||||
jsonVeExt.put("storagevehicleext_id", IdUtil.getLongId());
|
||||
@@ -188,7 +188,6 @@ public class InBoxManageServiceImpl implements InBoxManageService {
|
||||
param.put("vehicle_type", boxDao.getVehicle_type());
|
||||
param.put("box_no", whereJson.getString("box_no"));
|
||||
taskParam.put("request_param", param.toString());
|
||||
|
||||
TwoInBoxTrussTask taskBean = new TwoInBoxTrussTask();
|
||||
taskBean.createTask(taskParam);
|
||||
taskBean.immediateNotifyAcs(null);
|
||||
|
||||
@@ -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;
|
||||
@@ -1323,11 +1324,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
WQLObject.getWQLObject("st_ivt_shaftivt").update(rgv_device);
|
||||
|
||||
//如果套管工位有货且套轴区域无轴,搬运一根轴到穿拔轴机上
|
||||
if (rgv_device.getIntValue("have_qzz") == 0){
|
||||
if (rgv_device.getIntValue("have_qzz") == 0) {
|
||||
//判断当前穿拔轴机构上是否存在可用的气涨轴
|
||||
String cbj_qzz = cbz_jo.getString("have_qzz");
|
||||
//判断是否存在未完成的成品下卷任务
|
||||
JSONObject container_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010605' AND product_area = '"+product_area+"' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
JSONObject container_jo = WQLObject.getWQLObject("sch_base_task").query("task_type = '010605' AND product_area = '" + product_area + "' AND task_status < '07' AND is_delete = '0'").uniqueResult(0);
|
||||
if ("0".equals(cbj_qzz) && ObjectUtil.isEmpty(container_jo)) {
|
||||
PaperTrussTask paperTrussTask = SpringContextHolder.getBean(PaperTrussTask.class);
|
||||
//查询套管工位的库存信息
|
||||
@@ -1814,18 +1815,15 @@ 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)) {
|
||||
@@ -1835,30 +1833,22 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
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("载具类型不能为空!");
|
||||
@@ -1866,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());
|
||||
@@ -1898,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());
|
||||
|
||||
@@ -59,6 +59,10 @@ public class AcsTaskDto {
|
||||
* 扩展参数
|
||||
*/
|
||||
private String params;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 温度
|
||||
*/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user