现场联调优化
This commit is contained in:
@@ -185,11 +185,15 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
//上报LMS,将对应托盘置为指定窑号中
|
//上报LMS,将对应托盘置为指定窑号中
|
||||||
|
if(!inTrussSucess) {
|
||||||
uploadKilnInJson();
|
uploadKilnInJson();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
//上报LMS,将对应窑号中的所有托盘都设置为已出窑
|
//上报LMS,将对应窑号中的所有托盘都设置为已出窑
|
||||||
|
if(!outTrussSucess) {
|
||||||
uploadKilnOutJson();
|
uploadKilnOutJson();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -240,7 +244,8 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
logServer.deviceInfo("acs组盘入窑", this.getDevice_code(), "组盘入窑成功!");
|
logServer.deviceInfo("acs组盘入窑", this.getDevice_code(), "组盘入窑成功!");
|
||||||
}else{
|
}else{
|
||||||
this.writing(99);
|
this.writing(99);
|
||||||
message = "窑道外冷却区存在存留托盘,无法出窑";
|
message = "入窑失败,托盘号不存在";
|
||||||
|
log.info("入窑失败,托盘号"+barcode+"不存在");
|
||||||
}
|
}
|
||||||
this.setInTrussSucess(true);
|
this.setInTrussSucess(true);
|
||||||
return true;
|
return true;
|
||||||
@@ -270,9 +275,12 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
if (StrUtil.equals(resp.getString("status"), "200")) {
|
if (StrUtil.equals(resp.getString("status"), "200")) {
|
||||||
this.writing(4);
|
this.writing(4);
|
||||||
logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功!");
|
logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功!");
|
||||||
|
}else if (StrUtil.equals(resp.getString("status"), "401")) {
|
||||||
|
this.writing(98);
|
||||||
|
logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功,出窑数量与组盘表不一致!");
|
||||||
}else{
|
}else{
|
||||||
this.writing(99);
|
this.writing(99);
|
||||||
logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功!");
|
logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑失败,出窑缓存区有货!");
|
||||||
}
|
}
|
||||||
this.setOutTrussSucess(true);
|
this.setOutTrussSucess(true);
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -388,6 +388,7 @@ public class HfStationTwoDeviceDriver extends AbstractOpcDeviceDriver implements
|
|||||||
json.put("barcode", barcode);
|
json.put("barcode", barcode);
|
||||||
json.put("weight", weight);
|
json.put("weight", weight);
|
||||||
json.put("material_code",material_code);
|
json.put("material_code",material_code);
|
||||||
|
json.put("product_code",product_code);
|
||||||
json.put("create_mode", "2");
|
json.put("create_mode", "2");
|
||||||
json.put("is_auto_issue", "0");
|
json.put("is_auto_issue", "0");
|
||||||
json.put("type", "5");
|
json.put("type", "5");
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class VehicleDetailServiceImpl implements VehicleDetailService {
|
|||||||
, "vehicle_code", whereJson.get("vehicle_code")
|
, "vehicle_code", whereJson.get("vehicle_code")
|
||||||
,"region_code",whereJson.get("region_code")
|
,"region_code",whereJson.get("region_code")
|
||||||
,"is_delete",whereJson.get("is_delete")))
|
,"is_delete",whereJson.get("is_delete")))
|
||||||
.pageQuery(WqlUtil.getHttpContext(page), "vehicle_code asc");
|
.pageQuery(WqlUtil.getHttpContext(page), "create_time desc");
|
||||||
return pageQuery;
|
return pageQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -352,6 +352,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
param.put("point_code1", point_code); // 叫料点
|
param.put("point_code1", point_code); // 叫料点
|
||||||
param.put("create_mode", create_mode);
|
param.put("create_mode", create_mode);
|
||||||
param.put("material_code",whereJson.getString("material_code"));
|
param.put("material_code",whereJson.getString("material_code"));
|
||||||
|
param.put("product_code",whereJson.getString("product_code"));
|
||||||
param.put("is_auto_issue", is_auto_issue);
|
param.put("is_auto_issue", is_auto_issue);
|
||||||
PalletizingTask taskBean = SpringContextHolder.getBean(PalletizingTask.class);
|
PalletizingTask taskBean = SpringContextHolder.getBean(PalletizingTask.class);
|
||||||
taskBean.createTask(param);
|
taskBean.createTask(param);
|
||||||
@@ -528,10 +529,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
@Override
|
@Override
|
||||||
public JSONObject updateKiln(JSONObject whereJson) {
|
public JSONObject updateKiln(JSONObject whereJson) {
|
||||||
JSONObject resp = new JSONObject();
|
JSONObject resp = new JSONObject();
|
||||||
|
resp.put("status", "200");
|
||||||
|
resp.put("message", "更新托盘状态成功!");
|
||||||
try {
|
try {
|
||||||
int state = whereJson.getIntValue("state");
|
int state = whereJson.getIntValue("state");
|
||||||
String vehicle_code = whereJson.getString("barcode");
|
String vehicle_code = whereJson.getString("barcode");
|
||||||
String kiln_code = whereJson.getString("kiln_id");
|
String kiln_code = whereJson.getString("kiln_id");
|
||||||
|
Integer number =whereJson.getInteger("number");
|
||||||
WQLObject wo = WQLObject.getWQLObject("SCH_BASE_vehicle_group");
|
WQLObject wo = WQLObject.getWQLObject("SCH_BASE_vehicle_group");
|
||||||
switch (state) {
|
switch (state) {
|
||||||
//入窑
|
//入窑
|
||||||
@@ -540,7 +544,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
JSONObject json = wo.query("vehicle_code ='" + vehicle_code + "' AND region_code= 0 AND is_delete = 0").uniqueResult(0);
|
JSONObject json = wo.query("vehicle_code ='" + vehicle_code + "' AND region_code= 0 AND is_delete = 0").uniqueResult(0);
|
||||||
// 如果该托盘号不存在缓冲区则返回异常
|
// 如果该托盘号不存在缓冲区则返回异常
|
||||||
if (MapUtil.isEmpty(json)) {
|
if (MapUtil.isEmpty(json)) {
|
||||||
throw new Exception("当前缓冲区内不存在托盘号为" + vehicle_code + "的托盘!");
|
resp.put("status", "400");
|
||||||
|
resp.put("message", "对应托盘号不存在!");
|
||||||
}
|
}
|
||||||
int count = 0;
|
int count = 0;
|
||||||
JSONObject jsonObject = wo.query("kiln_code=" + kiln_code + " AND region_code= 1 AND is_delete = 0","order_seq desc").uniqueResult(0);
|
JSONObject jsonObject = wo.query("kiln_code=" + kiln_code + " AND region_code= 1 AND is_delete = 0","order_seq desc").uniqueResult(0);
|
||||||
@@ -568,6 +573,11 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
}
|
}
|
||||||
// 查询指定窑道所有托盘,将其状态改为已出窑
|
// 查询指定窑道所有托盘,将其状态改为已出窑
|
||||||
JSONArray jsonArray = wo.query("kiln_code ='" + kiln_code + "' AND region_code= 1 AND is_delete = 0").getResultJSONArray(0);
|
JSONArray jsonArray = wo.query("kiln_code ='" + kiln_code + "' AND region_code= 1 AND is_delete = 0").getResultJSONArray(0);
|
||||||
|
if(jsonArray.size()!=number){
|
||||||
|
log.error("当前窑道" + kiln_code + "记录数量"+jsonArray.size()+"与上送数量"+number+"不一致!");
|
||||||
|
resp.put("status", "401");
|
||||||
|
resp.put("message", "窑道外冷却区数量不一致!");
|
||||||
|
}
|
||||||
//将所有点位更改为有货
|
//将所有点位更改为有货
|
||||||
WQLObject point = WQLObject.getWQLObject("sch_base_point");
|
WQLObject point = WQLObject.getWQLObject("sch_base_point");
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
@@ -605,8 +615,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
log.error("更新托盘状态失败{}", e.getMessage(), e);
|
log.error("更新托盘状态失败{}", e.getMessage(), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
resp.put("status", "200");
|
|
||||||
resp.put("message", "更新托盘状态成功!");
|
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@
|
|||||||
FROM
|
FROM
|
||||||
sch_base_region
|
sch_base_region
|
||||||
WHERE
|
WHERE
|
||||||
region_code IN ('YWLQQ01', 'YWLQQ02')
|
region_code IN ('HCQ')
|
||||||
ENDSELECT
|
ENDSELECT
|
||||||
ENDQUERY
|
ENDQUERY
|
||||||
ENDIF
|
ENDIF
|
||||||
|
|||||||
@@ -266,6 +266,7 @@ public class PalletizingTask extends AbstractAcsTask {
|
|||||||
String create_mode = form.getString("create_mode");
|
String create_mode = form.getString("create_mode");
|
||||||
String is_auto_issue = form.getString("is_auto_issue");
|
String is_auto_issue = form.getString("is_auto_issue");
|
||||||
String material_code =form.getString("material_code");
|
String material_code =form.getString("material_code");
|
||||||
|
String product_code =form.getString("product_code");
|
||||||
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
WQLObject taskTab = WQLObject.getWQLObject("SCH_BASE_Task"); // 任务表
|
||||||
//查找当前是否有未完成任务
|
//查找当前是否有未完成任务
|
||||||
JSONObject taskObj = taskTab.query("is_delete='0' and task_name = '包装拆垛位请求叫料' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'").uniqueResult(0);
|
JSONObject taskObj = taskTab.query("is_delete='0' and task_name = '包装拆垛位请求叫料' and task_status <> '" + TaskStatusEnum.FINISHED.getCode() + "'").uniqueResult(0);
|
||||||
@@ -276,7 +277,7 @@ public class PalletizingTask extends AbstractAcsTask {
|
|||||||
}
|
}
|
||||||
//查找起点当前缓存区最右边有货的点位及其对应的终点点位1-20-》21 22-41-》42
|
//查找起点当前缓存区最右边有货的点位及其对应的终点点位1-20-》21 22-41-》42
|
||||||
WQLObject tab = WQLObject.getWQLObject("sch_base_vehicle_group");
|
WQLObject tab = WQLObject.getWQLObject("sch_base_vehicle_group");
|
||||||
JSONObject pointObj =tab.query("is_delete='0' and region_code='2' and material_code='"+material_code+"'","order_seq desc").uniqueResult(0);
|
JSONObject pointObj =tab.query("is_delete='0' and region_code='2' and material_code='"+material_code+"' and product_code='" +product_code+"'","order_seq desc").uniqueResult(0);
|
||||||
if(ObjectUtil.isEmpty(pointObj)){
|
if(ObjectUtil.isEmpty(pointObj)){
|
||||||
log.error("当前窑外缓存区无点位有货!");
|
log.error("当前窑外缓存区无点位有货!");
|
||||||
throw new BadRequestException("当前窑外缓存区无点位有货!");
|
throw new BadRequestException("当前窑外缓存区无点位有货!");
|
||||||
|
|||||||
Binary file not shown.
@@ -57,16 +57,7 @@ redis:
|
|||||||
database: ${REDIS_DB:15}
|
database: ${REDIS_DB:15}
|
||||||
host: ${REDIS_HOST:127.0.0.1}
|
host: ${REDIS_HOST:127.0.0.1}
|
||||||
port: ${REDIS_PORT:6379}
|
port: ${REDIS_PORT:6379}
|
||||||
redisson:
|
password: ${REDIS_PWD:}
|
||||||
config: |
|
|
||||||
threads: 4
|
|
||||||
nettyThreads: 4
|
|
||||||
singleServerConfig:
|
|
||||||
connectionMinimumIdleSize: 8
|
|
||||||
connectionPoolSize: 8
|
|
||||||
address: redis://127.0.0.1:6379
|
|
||||||
idleConnectionTimeout: 10000
|
|
||||||
timeout: 3000
|
|
||||||
|
|
||||||
# 登录相关配置
|
# 登录相关配置
|
||||||
login:
|
login:
|
||||||
@@ -159,4 +150,7 @@ sa-token:
|
|||||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||||
# token 前缀
|
# token 前缀
|
||||||
token-prefix: Bearer
|
token-prefix: Bearer
|
||||||
is-print: false
|
|
||||||
|
loki:
|
||||||
|
url: http://localhost:3100/loki/api/v1
|
||||||
|
systemName: lms
|
||||||
|
|||||||
Reference in New Issue
Block a user