现场联调优化
This commit is contained in:
@@ -43,7 +43,7 @@ public class VehicleDetailServiceImpl implements VehicleDetailService {
|
||||
, "vehicle_code", whereJson.get("vehicle_code")
|
||||
,"region_code",whereJson.get("region_code")
|
||||
,"is_delete",whereJson.get("is_delete")))
|
||||
.pageQuery(WqlUtil.getHttpContext(page), "vehicle_code asc");
|
||||
.pageQuery(WqlUtil.getHttpContext(page), "create_time desc");
|
||||
return pageQuery;
|
||||
}
|
||||
|
||||
|
||||
@@ -352,6 +352,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
param.put("point_code1", point_code); // 叫料点
|
||||
param.put("create_mode", create_mode);
|
||||
param.put("material_code",whereJson.getString("material_code"));
|
||||
param.put("product_code",whereJson.getString("product_code"));
|
||||
param.put("is_auto_issue", is_auto_issue);
|
||||
PalletizingTask taskBean = SpringContextHolder.getBean(PalletizingTask.class);
|
||||
taskBean.createTask(param);
|
||||
@@ -528,10 +529,13 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
@Override
|
||||
public JSONObject updateKiln(JSONObject whereJson) {
|
||||
JSONObject resp = new JSONObject();
|
||||
resp.put("status", "200");
|
||||
resp.put("message", "更新托盘状态成功!");
|
||||
try {
|
||||
int state = whereJson.getIntValue("state");
|
||||
String vehicle_code = whereJson.getString("barcode");
|
||||
String kiln_code = whereJson.getString("kiln_id");
|
||||
Integer number =whereJson.getInteger("number");
|
||||
WQLObject wo = WQLObject.getWQLObject("SCH_BASE_vehicle_group");
|
||||
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);
|
||||
// 如果该托盘号不存在缓冲区则返回异常
|
||||
if (MapUtil.isEmpty(json)) {
|
||||
throw new Exception("当前缓冲区内不存在托盘号为" + vehicle_code + "的托盘!");
|
||||
resp.put("status", "400");
|
||||
resp.put("message", "对应托盘号不存在!");
|
||||
}
|
||||
int count = 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);
|
||||
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");
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
@@ -605,8 +615,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.error("更新托盘状态失败{}", e.getMessage(), e);
|
||||
}
|
||||
|
||||
resp.put("status", "200");
|
||||
resp.put("message", "更新托盘状态成功!");
|
||||
return resp;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
FROM
|
||||
sch_base_region
|
||||
WHERE
|
||||
region_code IN ('YWLQQ01', 'YWLQQ02')
|
||||
region_code IN ('HCQ')
|
||||
ENDSELECT
|
||||
ENDQUERY
|
||||
ENDIF
|
||||
|
||||
@@ -266,6 +266,7 @@ public class PalletizingTask extends AbstractAcsTask {
|
||||
String create_mode = form.getString("create_mode");
|
||||
String is_auto_issue = form.getString("is_auto_issue");
|
||||
String material_code =form.getString("material_code");
|
||||
String product_code =form.getString("product_code");
|
||||
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);
|
||||
@@ -276,7 +277,7 @@ public class PalletizingTask extends AbstractAcsTask {
|
||||
}
|
||||
//查找起点当前缓存区最右边有货的点位及其对应的终点点位1-20-》21 22-41-》42
|
||||
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)){
|
||||
log.error("当前窑外缓存区无点位有货!");
|
||||
throw new BadRequestException("当前窑外缓存区无点位有货!");
|
||||
|
||||
Binary file not shown.
@@ -57,16 +57,7 @@ redis:
|
||||
database: ${REDIS_DB:15}
|
||||
host: ${REDIS_HOST:127.0.0.1}
|
||||
port: ${REDIS_PORT:6379}
|
||||
redisson:
|
||||
config: |
|
||||
threads: 4
|
||||
nettyThreads: 4
|
||||
singleServerConfig:
|
||||
connectionMinimumIdleSize: 8
|
||||
connectionPoolSize: 8
|
||||
address: redis://127.0.0.1:6379
|
||||
idleConnectionTimeout: 10000
|
||||
timeout: 3000
|
||||
password: ${REDIS_PWD:}
|
||||
|
||||
# 登录相关配置
|
||||
login:
|
||||
@@ -159,4 +150,7 @@ sa-token:
|
||||
jwt-secret-key: opsjajisdnnca0sdkksdfaaasdfwwq
|
||||
# token 前缀
|
||||
token-prefix: Bearer
|
||||
is-print: false
|
||||
|
||||
loki:
|
||||
url: http://localhost:3100/loki/api/v1
|
||||
systemName: lms
|
||||
|
||||
Reference in New Issue
Block a user