diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_kiln_truss/HfKilnTrussDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_kiln_truss/HfKilnTrussDeviceDriver.java index 3577f62..a4ebc31 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_kiln_truss/HfKilnTrussDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_kiln_truss/HfKilnTrussDeviceDriver.java @@ -185,11 +185,15 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements break; case 3: //上报LMS,将对应托盘置为指定窑号中 - uploadKilnInJson(); + if(!inTrussSucess) { + uploadKilnInJson(); + } break; case 4: //上报LMS,将对应窑号中的所有托盘都设置为已出窑 - uploadKilnOutJson(); + if(!outTrussSucess) { + uploadKilnOutJson(); + } break; } } @@ -240,7 +244,8 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements logServer.deviceInfo("acs组盘入窑", this.getDevice_code(), "组盘入窑成功!"); }else{ this.writing(99); - message = "窑道外冷却区存在存留托盘,无法出窑"; + message = "入窑失败,托盘号不存在"; + log.info("入窑失败,托盘号"+barcode+"不存在"); } this.setInTrussSucess(true); return true; @@ -270,9 +275,12 @@ public class HfKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implements if (StrUtil.equals(resp.getString("status"), "200")) { this.writing(4); logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功!"); + }else if (StrUtil.equals(resp.getString("status"), "401")) { + this.writing(98); + logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功,出窑数量与组盘表不一致!"); }else{ this.writing(99); - logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑成功!"); + logServer.deviceInfo("acs组盘出窑", this.getDevice_code(), "组盘出窑失败,出窑缓存区有货!"); } this.setOutTrussSucess(true); return true; diff --git a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_station_two/HfStationTwoDeviceDriver.java b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_station_two/HfStationTwoDeviceDriver.java index 2c3565f..71d185c 100644 --- a/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_station_two/HfStationTwoDeviceDriver.java +++ b/acs/nladmin-system/src/main/java/org/nl/acs/device_driver/hongfeng/hf_station_two/HfStationTwoDeviceDriver.java @@ -388,6 +388,7 @@ public class HfStationTwoDeviceDriver extends AbstractOpcDeviceDriver implements json.put("barcode", barcode); json.put("weight", weight); json.put("material_code",material_code); + json.put("product_code",product_code); json.put("create_mode", "2"); json.put("is_auto_issue", "0"); json.put("type", "5"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/impl/VehicleDetailServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/impl/VehicleDetailServiceImpl.java index 8af6e4b..900015f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/impl/VehicleDetailServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/basedata/service/impl/VehicleDetailServiceImpl.java @@ -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; } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java index 14c31ec..661851f 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java @@ -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; } } diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/pda/point/wql/PDA_Point_01.wql b/lms/nladmin-system/src/main/java/org/nl/wms/pda/point/wql/PDA_Point_01.wql index 73f9b58..e6edc22 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/pda/point/wql/PDA_Point_01.wql +++ b/lms/nladmin-system/src/main/java/org/nl/wms/pda/point/wql/PDA_Point_01.wql @@ -49,7 +49,7 @@ FROM sch_base_region WHERE - region_code IN ('YWLQQ01', 'YWLQQ02') + region_code IN ('HCQ') ENDSELECT ENDQUERY ENDIF diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/phaseTwo/PalletizingTask.java b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/phaseTwo/PalletizingTask.java index eedb8ba..20e200a 100644 --- a/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/phaseTwo/PalletizingTask.java +++ b/lms/nladmin-system/src/main/java/org/nl/wms/sch/tasks/phaseTwo/PalletizingTask.java @@ -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("当前窑外缓存区无点位有货!"); diff --git a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls index 8088ccb..c7bd27a 100644 Binary files a/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls and b/lms/nladmin-system/src/main/java/org/nl/wms/wms.xls differ diff --git a/lms/nladmin-system/src/main/resources/config/application-prod.yml b/lms/nladmin-system/src/main/resources/config/application-prod.yml index 32d5f79..7ff67a3 100644 --- a/lms/nladmin-system/src/main/resources/config/application-prod.yml +++ b/lms/nladmin-system/src/main/resources/config/application-prod.yml @@ -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