From 2f537a0a5e0da8ffc0285de6c392015f5db6301d Mon Sep 17 00:00:00 2001 From: "USER-20220102CG\\noblelift" <546428999@qq.com> Date: Thu, 7 Jul 2022 10:56:45 +0800 Subject: [PATCH] 1 --- acs/produceshiftorderdetail.js | 27 +++ nladmin-system/pom.xml | 87 +++++----- .../service/impl/DeviceServiceImpl.java | 131 ++++++++++++--- .../HaiLiangFeedingDeviceDriver.java | 2 +- .../HaiLiangFeedingTrunkDefination.java | 7 +- .../HaiLiangFeedingTrunkDeviceDriver.java | 149 +++++++++++++---- .../hailiang_feeding_trunk/ItemProtocol.java | 38 ++++- .../HaiLiangLabelingDefination.java | 10 +- .../HaiLiangLabelingDeviceDriver.java | 110 ++++++++---- .../hailiang_labeling/ItemProtocol.java | 20 ++- .../HaiLiangStrappingDefination.java | 4 +- .../HaiLiangStrappingDeviceDriver.java | 14 +- .../hailiang_strapping/ItemProtocol.java | 10 +- .../wms/service/impl/WmsToAcsServiceImpl.java | 17 +- .../rest/ProduceshiftorderController.java | 25 +++ .../service/ProduceshiftorderService.java | 11 +- .../service/dto/ProduceshiftorderDto.java | 5 + .../dto/ProduceshiftorderdetailDto.java | 158 +++++++++--------- .../impl/ProduceshiftorderServiceImpl.java | 153 ++++++++++++++--- .../ProduceshiftorderdetailServiceImpl.java | 15 +- .../org/nl/acs/order/service/impl/Test.java | 6 +- .../org/nl/acs/order/service/wql/order.xls | Bin 199680 -> 200704 bytes .../service/impl/StageActorServiceImpl.java | 28 +++- .../run/LetteringSocketConnectionAutoRun.java | 10 +- .../main/resources/config/application-dev.yml | 8 +- qd/src/api/acs/order/order.js | 24 ++- qd/src/views/acs/order/AddDialog.vue | 60 ++++--- qd/src/views/acs/order/sorting/index.vue | 57 +++++-- 28 files changed, 845 insertions(+), 341 deletions(-) create mode 100644 acs/produceshiftorderdetail.js diff --git a/acs/produceshiftorderdetail.js b/acs/produceshiftorderdetail.js new file mode 100644 index 0000000..3c60214 --- /dev/null +++ b/acs/produceshiftorderdetail.js @@ -0,0 +1,27 @@ +import request from '@/utils/request' + +export function add(data) { + return request({ + url: 'api/produceshiftorderdetail', + method: 'post', + data + }) +} + +export function del(ids) { + return request({ + url: 'api/produceshiftorderdetail/', + method: 'delete', + data: ids + }) +} + +export function edit(data) { + return request({ + url: 'api/produceshiftorderdetail', + method: 'put', + data + }) +} + +export default { add, edit, del } diff --git a/nladmin-system/pom.xml b/nladmin-system/pom.xml index 5aba8f1..ff6d79b 100644 --- a/nladmin-system/pom.xml +++ b/nladmin-system/pom.xml @@ -19,6 +19,12 @@ 7.6.1 + + + e-iceblue + spire.xls + 3.11.2 + net.logstash.logback @@ -26,30 +32,25 @@ 6.6 - - - e-iceblue - spire.xls - 3.11.2 - + org.mongodb mongo-java-driver 3.4.2 - + @@ -70,14 +71,6 @@ spring-boot-starter-data-mongodb - - - net.dreamlu - mica-ip2region - 2.5.6 - - - org.openscada.utgard org.openscada.opc.lib @@ -270,6 +263,7 @@ exec-maven-plugin 1.6.0 + @@ -310,25 +304,26 @@ --> - - - + + + + mvnrepository + mvnrepository + http://www.mvnrepository.com/ + default + + true + + + false + + + + + com.e-iceblue + http://repo.e-iceblue.cn/repository/maven-public/ + + diff --git a/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java b/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java index a05e764..617fa61 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/acs/device/service/impl/DeviceServiceImpl.java @@ -13,6 +13,7 @@ import com.alibaba.fastjson.JSONObject; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.config.server.AcsConfigService; +import org.nl.acs.device.device_driver.standard_inspect.ItemDto; import org.nl.acs.device.device_driver.standard_inspect.ReadUtil; import org.nl.acs.device.service.*; import org.nl.acs.device.service.dto.*; @@ -1170,14 +1171,14 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial //根据设备驱动定义获取OPC读写数据 DeviceDriverDefination deviceDriverDefination = deviceDriverDefinationAppService.getDeviceDriverDefination(driver_code); + OpcDeviceDriverDefination opcDeviceDriverDefination = null; if (deviceDriverDefination instanceof OpcDeviceDriverDefination) { - OpcDeviceDriverDefination opcDeviceDriverDefination = (OpcDeviceDriverDefination) deviceDriverDefination; + opcDeviceDriverDefination = (OpcDeviceDriverDefination) deviceDriverDefination; //处理DB读和写属性 result.put("rs", opcDeviceDriverDefination.getReadableItemDtos()); result.put("ws", opcDeviceDriverDefination.getWriteableItemDtos()); } - JSONArray arr = WQLObject.getWQLObject("acs_device_extra").query("filed_type ='01' and device_id = '" + device_id + "'").getResultJSONArray(0); for (int i = 0; i < arr.size(); i++) { @@ -1194,7 +1195,7 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial result.put("form", extraObj); - JSONObject json = (JSONObject) JSONObject.toJSON(dto); + JSONObject json = (JSONObject) JSONObject.toJSON(dto); String opc_id = dto.getOpc_server_id(); @@ -1224,35 +1225,111 @@ public class DeviceServiceImpl implements DeviceService, ApplicationAutoInitial //设备扩展表【acs_device_extra】 JSONArray rs = WQLObject.getWQLObject("acs_device_extra").query("filed_type='02' and device_id = '" + device_id + "'", "order_seq").getResultJSONArray(0); JSONArray r_arry = new JSONArray(); - for (int i = 0; i < rs.size(); i++) { - JSONObject robj = new JSONObject(); - robj.put("code", rs.getJSONObject(i).getString("extra_code")); - robj.put("name", rs.getJSONObject(i).getString("remark")); - robj.put("db", rs.getJSONObject(i).getString("extra_name")); - r_arry.add(robj); - } - - JSONArray ws = WQLObject.getWQLObject("acs_device_extra").query("filed_type='03' and device_id = '" + device_id + "'", "order_seq").getResultJSONArray(0); - JSONArray w_arry = new JSONArray(); - for (int i = 0; i < ws.size(); i++) { - JSONObject robj = new JSONObject(); - robj.put("code", ws.getJSONObject(i).getString("extra_code")); - robj.put("name", ws.getJSONObject(i).getString("remark")); - robj.put("db", ws.getJSONObject(i).getString("extra_name")); - w_arry.add(robj); + //先获取模板 + if(ObjectUtil.isNotEmpty(opcDeviceDriverDefination)){ + List readableItemDtos = opcDeviceDriverDefination.getReadableItemDtos(); + List readableItemJsons = new ArrayList<>(); + for (int i = 0; i < readableItemDtos.size(); i++) { + ItemDto itemDto = readableItemDtos.get(i); + JSONObject readableItemJson = new JSONObject(); + readableItemJson.put("code",itemDto.getCode()); + readableItemJson.put("name",itemDto.getName()); + // readableItemJson.put("db",itemDto.getDb()); + readableItemJsons.add(readableItemJson); + } + for (int i = 0; i < rs.size(); i++) { + JSONObject robj = new JSONObject(); + String extra_code = rs.getJSONObject(i).getString("extra_code"); + final String[] split = extra_code.split("\\."); + String code = split[split.length - 1]; + robj.put("code", code); + robj.put("name", rs.getJSONObject(i).getString("remark")); + if (readableItemJsons.contains(robj)){ + robj.put("code", rs.getJSONObject(i).getString("extra_code")); + robj.put("db", rs.getJSONObject(i).getString("extra_name")); + r_arry.add(robj); + } + } + List rarry = new ArrayList<>(); + for (int i = 0; i < r_arry.size(); i++) { + JSONObject rJson = r_arry.getJSONObject(i); + String code = rJson.getString("code"); + String[] split = code.split("\\."); + code = split[split.length - 1]; + JSONObject jsonObject = new JSONObject(); + jsonObject.put("code", code); + jsonObject.put("name",rJson.getString("name")); + rarry.add(jsonObject); + } + for (int i = 0; i < readableItemDtos.size(); i++) { + ItemDto itemDto = readableItemDtos.get(i); + JSONObject readableItemJson = new JSONObject(); + readableItemJson.put("code",itemDto.getCode()); + readableItemJson.put("name",itemDto.getName()); + if (!rarry.contains(readableItemJson)){ + readableItemJson.put("db",itemDto.getDb()); + r_arry.add(readableItemJson); + } + } + JSONArray ws = WQLObject.getWQLObject("acs_device_extra").query("filed_type='03' and device_id = '" + device_id + "'", "order_seq").getResultJSONArray(0); + JSONArray w_arry = new JSONArray(); + List writeableItemDtos = opcDeviceDriverDefination.getWriteableItemDtos(); + List writeableItemJsons = new ArrayList<>(); + for (int i = 0; i < writeableItemDtos.size(); i++) { + ItemDto itemDto = writeableItemDtos.get(i); + JSONObject writeableItemJson = new JSONObject(); + writeableItemJson.put("code",itemDto.getCode()); + writeableItemJson.put("name",itemDto.getName()); + //writeableItemJson.put("db",itemDto.getDb()); + writeableItemJsons.add(writeableItemJson); + } + for (int i = 0; i < ws.size(); i++) { + String extra_code = ws.getJSONObject(i).getString("extra_code"); + final String[] split = extra_code.split("\\."); + String code = split[split.length - 1]; + JSONObject robj = new JSONObject(); + robj.put("code", code); + robj.put("name", ws.getJSONObject(i).getString("remark")); + if (writeableItemJsons.contains(robj)){ + robj.put("code", ws.getJSONObject(i).getString("extra_code")); + robj.put("db", ws.getJSONObject(i).getString("extra_name")); + w_arry.add(robj); + } + } + List warry = new ArrayList<>(); + for (int i = 0; i < w_arry.size(); i++) { + JSONObject wJson = w_arry.getJSONObject(i); + String code = wJson.getString("code"); + String[] split = code.split("\\."); + code = split[split.length - 1]; + JSONObject jsonObject = new JSONObject(); + jsonObject.put("code",code); + jsonObject.put("name",wJson.getString("name")); + warry.add(jsonObject); + } + for (int i = 0; i < writeableItemDtos.size(); i++) { + ItemDto itemDto = writeableItemDtos.get(i); + JSONObject writeableItemJson = new JSONObject(); + writeableItemJson.put("code",itemDto.getCode()); + writeableItemJson.put("name",itemDto.getName()); + if (!warry.contains(writeableItemJson)){ + writeableItemJson.put("db",itemDto.getDb()); + w_arry.add(writeableItemJson); + } + } + if (!r_arry.isEmpty()) { + result.put("rs", r_arry); + } + if (!w_arry.isEmpty()) { + result.put("ws", w_arry); + } } - if (!r_arry.isEmpty()) { - result.put("rs", r_arry); - } - if (!w_arry.isEmpty()) { - result.put("ws", w_arry); - } } else { //处理DB读和写属性 - /* result.put("rs", ReadUtil.getReadableItemDtos()); - result.put("ws", ReadUtil.getWriteableItemDtos());*/ +// result.put("rs", ReadUtil.getReadableItemDtos()); +// result.put("ws", ReadUtil.getWriteableItemDtos()); } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java index dc638c6..6d66e89 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java @@ -205,7 +205,7 @@ public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver impleme // } dto.setFeeding_finished(status); String now = DateUtil.now(); - dto.setFeeding_finish_time(now); + dto.setFeeding_end_time(now); produceshiftorderdetailService.update(dto); writing(itemProtocol.item_to_command,String.valueOf(mode)); requireSucess = true; diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDefination.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDefination.java index 92a93a7..7bdb281 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDefination.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDefination.java @@ -64,7 +64,6 @@ public class HaiLiangFeedingTrunkDefination implements OpcDeviceDriverDefination list.add(new ItemDto(ItemProtocol.item_last_order_detail, "上次完成工单明细号", "DB600.D14")); list.add(new ItemDto(ItemProtocol.item_order_feeding_qty, "当前工单上料数量", "DB600.D18")); list.add(new ItemDto(ItemProtocol.item_detail_feeding_qty, "当前工单明细号上料数量", "DB600.D22")); - list.add(new ItemDto(ItemProtocol.item_detail_feeding_qualified_qty, "当前工单明细号上料合格数量", "DB600.D122")); list.add(new ItemDto(ItemProtocol.item_detail_lettering_qty, "当前工单明细号刻字数量", "DB600.D26")); list.add(new ItemDto(ItemProtocol.item_detail_lettering_qualified_qty, "当前工单明细号刻字合格数量", "DB600.D30")); list.add(new ItemDto(ItemProtocol.item_detail_risking_qualified_qty, "当前工单明细号套冒合格数", "DB600.D34")); @@ -72,7 +71,7 @@ public class HaiLiangFeedingTrunkDefination implements OpcDeviceDriverDefination list.add(new ItemDto(ItemProtocol.item_detail_strapping_qty, "当前工单明细号捆扎包数", "DB600.D42")); list.add(new ItemDto(ItemProtocol.item_detail_strapping_oneqty, "当前工单明细号捆扎根数", "DB600.D46")); list.add(new ItemDto(ItemProtocol.item_detail_coating_qty, "当前工单明细号裹膜数", "DB600.D50")); - list.add(new ItemDto(ItemProtocol.item_labeling_order, "当前贴标工单明细号", "DB600.D54")); + list.add(new ItemDto(ItemProtocol.item_labeling_order_detail, "当前贴标工单明细号", "DB600.D54")); list.add(new ItemDto(ItemProtocol.item_detail_labeling_qualified_qty, "当前工单明细号刻字数量", "DB600.D58")); list.add(new ItemDto(ItemProtocol.item_detail_labeling_qty, "当前贴标工单明细号贴标数", "DB600.D62")); list.add(new ItemDto(ItemProtocol.item_ready, "设备就绪", "DB600.D66")); @@ -89,6 +88,10 @@ public class HaiLiangFeedingTrunkDefination implements OpcDeviceDriverDefination list.add(new ItemDto(ItemProtocol.item_lettering_frequency, "刻字频率", "DB600.D110")); list.add(new ItemDto(ItemProtocol.item_one_speed, "捆扎裹膜贴标段输送速度", "DB600.REAL114")); list.add(new ItemDto(ItemProtocol.item_coating_frequency, "裹膜机频率", "DB600.D118")); + list.add(new ItemDto(ItemProtocol.item_detail_feeding_qualified_qty, "当前工单明细号上料合格数量", "DB600.D122")); + list.add(new ItemDto(ItemProtocol.item_detail_coating_qualified_qty, "当前工单明细号裹膜合格数量", "DB600.D126")); + list.add(new ItemDto(ItemProtocol.item_strapping_order_detail, "捆扎工单明细号", "DB600.D130")); + list.add(new ItemDto(ItemProtocol.item_order_feeding_finish, "工单上料完成", "DB600.D134")); return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java index 588a818..54fea88 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java @@ -67,7 +67,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im int detail_strapping_qty = 0; int detail_strapping_oneqty = 0; int detail_coating_qty = 0; - int labeling_order = 0; + int labeling_order_detail = 0; int detail_labeling_qualified_qty = 0; int detail_labeling_qty = 0; Float line_speed = 0.0f; @@ -81,6 +81,8 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im int lettering_frequency = 0; Float one_speed = 0.0f; int coating_frequency = 0; + int strapping_order_detail =0; + int order_feeding_finish = 0; int last_mode = 0; int last_error = 0; @@ -101,7 +103,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im int last_detail_strapping_qty = 0; int last_detail_strapping_oneqty = 0; int last_detail_coating_qty = 0; - int last_labeling_order = 0; + int last_labeling_order_detail = 0; int last_detail_labeling_qualified_qty = 0; int last_detail_labeling_qty = 0; Float last_line_speed = 0.0f; @@ -115,6 +117,8 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im int last_lettering_frequency = 0; Float last_one_speed = 0.0f; int last_coating_frequency = 0; + int last_strapping_order_detail =0; + int last_order_feeding_finish =0; Boolean send_letter_flag_back = false; Boolean send_letter_flag = false; @@ -156,7 +160,9 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im //当前工单明细号裹膜数 detail_coating_qty =this.itemProtocol.getDetail_coating_qty(); //当前贴标工单明细号 - labeling_order = this.itemProtocol.getLabeling_order(); + labeling_order_detail = this.itemProtocol.getLabeling_order_detail(); + //捆扎明细 + strapping_order_detail = this.itemProtocol.getStrapping_order_detail(); //当前贴标工单明细号贴标合格数 detail_labeling_qualified_qty = this.itemProtocol.getDetail_strapping_qty(); //当前贴标工单明细号贴标数 @@ -172,6 +178,9 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im lettering_frequency = this.itemProtocol.getLettering_frequency(); one_speed = this.itemProtocol.getOne_speed(); coating_frequency = this.itemProtocol.getCoating_frequency(); + strapping_order_detail = this.itemProtocol.getStrapping_order_detail(); + order_feeding_finish = this.itemProtocol.getOrder_feeding_finish(); + if (mode != last_mode) { this.setRequireSucess(false); @@ -281,10 +290,10 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im logServer.deviceLogToacs(this.device_code,"","","信号detail_coating_qty:" + last_detail_coating_qty + "->" + detail_coating_qty); } - if(labeling_order != last_labeling_order) + if(labeling_order_detail != last_labeling_order_detail) { - logServer.deviceLog(this.device_code,"labeling_order" ,String.valueOf(labeling_order)); - logServer.deviceLogToacs(this.device_code,"","","信号labeling_order:" + last_labeling_order + "->" + labeling_order); + logServer.deviceLog(this.device_code,"labeling_order" ,String.valueOf(labeling_order_detail)); + logServer.deviceLogToacs(this.device_code,"","","信号labeling_order:" + last_labeling_order_detail + "->" + labeling_order_detail); } if(detail_labeling_qualified_qty != last_detail_labeling_qualified_qty) @@ -358,11 +367,36 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im logServer.deviceLog(this.device_code,"coating_frequency" ,String.valueOf(coating_frequency)); logServer.deviceLogToacs(this.device_code,"","","信号coating_frequency:" + last_coating_frequency + "->" + coating_frequency); } + if(strapping_order_detail != last_strapping_order_detail) + { + logServer.deviceLog(this.device_code,"strapping_order_detail" ,String.valueOf(strapping_order_detail)); + logServer.deviceLogToacs(this.device_code,"","","信号strapping_order_detail:" + last_strapping_order_detail+ "->" + strapping_order_detail); + } + if(order_feeding_finish != last_order_feeding_finish) + { + logServer.deviceLog(this.device_code,"order_feeding_finish" ,String.valueOf(order_feeding_finish)); + logServer.deviceLogToacs(this.device_code,"","","信号order_feeding_finish:" + last_order_feeding_finish+ "->" + order_feeding_finish); + } try{ if(order >0 && order_detail>0){ update_detail(String.valueOf(order),String.valueOf(order_detail)); } + + //上料明细更新 + if(order >0 && order_detail>0){ + update_detail(String.valueOf(order),String.valueOf(order_detail)); + } + + //贴标明细更新 + if(order >0 && labeling_order_detail>0){ + update_labeling_detail(String.valueOf(order),String.valueOf(labeling_order_detail)); + } + + //捆扎明细更新 + if(order >0 && strapping_order_detail>0){ + update_strapping_detail(String.valueOf(order),String.valueOf(strapping_order_detail)); + } } catch (Exception e){ @@ -389,7 +423,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im break; case 2: break; - case 3: + case 4: //申请工单 if(!requireSucess) { if( ready == 1 && order ==0 && order_detail ==0 ){ @@ -403,7 +437,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im } break; - case 4: + case 5: //申请工单明细 if(!requireSucess) { if( ready == 1 && order != 0 ) { @@ -435,7 +469,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im last_detail_strapping_qty = detail_strapping_qty; last_detail_strapping_oneqty = detail_strapping_oneqty; last_detail_coating_qty = detail_coating_qty; - last_labeling_order = labeling_order; + last_labeling_order_detail = labeling_order_detail; last_detail_labeling_qualified_qty = detail_labeling_qualified_qty; last_detail_labeling_qty = detail_labeling_qty; last_line_speed = line_speed; @@ -451,6 +485,45 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im last_coating_frequency = coating_frequency; } + + public synchronized boolean update_strapping_detail(String order, String order_detail) throws Exception { + Date date = new Date(); + if (date.getTime() - this.detail_time_out < (long) this.detail_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.detail_time_out); + return false; + } else { + this.detail_time= date; + + ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order),String.valueOf(order_detail)); + if(ObjectUtil.isEmpty(dto)){ + return false; + } + dto.setPresent_labeling_number(String.valueOf(detail_labeling_qty)); + dto.setQualified_lettering_number(String.valueOf(detail_labeling_qualified_qty)); + produceshiftorderdetailService.update(dto); + return true; + } + } + + public synchronized boolean update_labeling_detail(String order, String order_detail) throws Exception { + Date date = new Date(); + if (date.getTime() - this.detail_time_out < (long) this.detail_time_out) { + log.trace("触发时间因为小于{}毫秒,而被无视", this.detail_time_out); + return false; + } else { + this.detail_time= date; + + ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order),String.valueOf(order_detail)); + if(ObjectUtil.isEmpty(dto)){ + return false; + } + dto.setPresent_labeling_number(String.valueOf(detail_labeling_qty)); + dto.setQualified_lettering_number(String.valueOf(detail_labeling_qualified_qty)); + produceshiftorderdetailService.update(dto); + return true; + } + } + public synchronized boolean update_detail(String order, String order_detail) throws Exception { Date date = new Date(); if (date.getTime() - this.detail_time_out < (long) this.detail_time_out) { @@ -458,6 +531,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im return false; } else { this.detail_time= date; + ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order),String.valueOf(order_detail)); if(ObjectUtil.isEmpty(dto)){ return false; @@ -474,14 +548,14 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im dto.setPresent_sleeveing_number(String.valueOf(detail_risking_qty)); //当前工单明细号套冒合格数 dto.setQualified_sleeveing_number(String.valueOf(detail_risking_qualified_qty)); - //当前捆扎包数 - dto.setPresent_strap_pack_number(String.valueOf(detail_strapping_qty)); - //当前捆扎数 - dto.setPresent_strap_number(String.valueOf(detail_strapping_oneqty)); - //当前工单明细号裹膜数 - dto.setPresent_wraping_number(String.valueOf(detail_coating_qty)); - produceshiftorderdetailService.update(dto); + +// //当前捆扎包数 +// dto.setPresent_strap_pack_number(String.valueOf(detail_strapping_qty)); +// //当前捆扎数 +// dto.setPresent_strap_number(String.valueOf(detail_strapping_oneqty)); +// //当前工单明细号裹膜数 +// dto.setPresent_wraping_number(String.valueOf(detail_coating_qty)); return true; } } @@ -537,36 +611,23 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im throw new BadRequestException("未找到可下发工单!"); } String order = dto.getOrder_code(); - //是否刻字 - String is_lettering = dto.getIs_lettering(); - //是否套冒 - String is_risking = dto.getIs_risking(); - //是否捆扎 - String is_strapping = dto.getIs_strapping(); - //是否裹膜 - String is_coating = dto.getIs_coating(); - //是否贴标 - String is_labeling = dto.getIs_labeling(); + //选择上料口 String feeding_mouth = dto.getFeeding_mouth(); String outer_diameter = dto.getOuter_diameter(); String wall_thickness = dto.getWall_thickness(); String length = dto.getLength(); String qty = dto.getQty(); + String jackup_num = dto.getJackup_num(); logServer.deviceLogToacs(this.device_code,"","","申请工单号成功,order:"+order); writing(ItemProtocol.item_to_order,order); writing(ItemProtocol.item_to_feeding_mouth,feeding_mouth); writing(ItemProtocol.item_to_order_feeding_qty,qty); writing(ItemProtocol.item_to_outer_diameter,outer_diameter); writing(ItemProtocol.item_to_wall_thickness,wall_thickness); + writing(ItemProtocol.item_to_jackup_num,jackup_num); writing(ItemProtocol.item_to_length,length); - writing(ItemProtocol.item_to_is_labeling,is_labeling); - writing(ItemProtocol.item_to_is_risking,is_risking); - writing(ItemProtocol.item_to_is_strapping,is_strapping); - writing(ItemProtocol.item_to_is_coating,is_coating); - writing(ItemProtocol.item_to_is_lettering,is_lettering); writing(ItemProtocol.item_to_command,String.valueOf(mode)); - dto.setOrder_status("02"); produceshiftorderService.autoupdate(dto); @@ -576,13 +637,14 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im public boolean apply_orderDetail(int order) throws Exception { ProduceshiftorderdetailDto dto = produceshiftorderdetailService.apply_orderDetail(String.valueOf(order)); + ProduceshiftorderDto orderdto = produceshiftorderService.findOrderByOrderCodeFromCache(String.valueOf(order)); if(ObjectUtil.isEmpty(dto)){ logServer.deviceLogToacs(this.device_code,"","","apply_orderDetail 未找到可下发工单明细!"); throw new BadRequestException("未找到可下发工单明细!"); } String orderDetail = dto.getOrder_detail_code(); //上料数量 - String feeding_qty = dto.getFeeding_qty(); + String feeding_qty = dto.getOrder_detail_qty(); //捆扎包数 String strap_pack_number = dto.getStrap_pack_number(); //每捆数量 @@ -593,6 +655,18 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im String str = dto.getLabeling_message(); //判断是否最后一个客户 boolean last_detail = produceshiftorderdetailService.isLastOrderDetail(String.valueOf(order)); + //套冒颜色 + String color = dto.getColor_type(); + //是否刻字 + String is_lettering = orderdto.getIs_lettering(); + //是否套冒 + String is_risking = orderdto.getIs_risking(); + //是否捆扎 + String is_strapping = orderdto.getIs_strapping(); + //是否裹膜 + String is_coating = orderdto.getIs_coating(); + //是否贴标 + String is_labeling = orderdto.getIs_labeling(); //下发激光刻字信息 //判断下发刻字成功 if(!send_letter_flag){ @@ -613,10 +687,15 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im writing(ItemProtocol.item_to_coating_qty,strap_pack_number); writing(ItemProtocol.item_to_labeling_qty,strap_pack_number); writing(ItemProtocol.item_to_lastone_strapping_qty,strap_tailint_number); - + writing(ItemProtocol.item_to_is_labeling,is_labeling); + writing(ItemProtocol.item_to_is_risking,is_risking); + writing(ItemProtocol.item_to_is_strapping,is_strapping); + writing(ItemProtocol.item_to_is_coating,is_coating); + writing(ItemProtocol.item_to_is_lettering,is_lettering); + writing(ItemProtocol.item_to_color,color); writing(ItemProtocol.item_to_command,String.valueOf(mode)); - dto.setOrder_detail_status("01"); + dto.setOrder_detail_status("02"); produceshiftorderdetailService.update(dto); send_letter_flag = false; send_letter_flag_back = false; diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/ItemProtocol.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/ItemProtocol.java index 1a99ffd..1dbb4e7 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/ItemProtocol.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/ItemProtocol.java @@ -36,7 +36,7 @@ public class ItemProtocol { //当前工单明细号裹膜数 public static String item_detail_coating_qty = "detail_coating_qty"; //当前贴标工单明细号 - public static String item_labeling_order = "labeling_order"; + public static String item_labeling_order_detail = "labeling_order_detail"; //当前贴标工单明细号贴标合格数 public static String item_detail_labeling_qualified_qty = "detail_labeling_qualified_qty"; //当前贴标工单明细号贴标数 @@ -56,6 +56,11 @@ public class ItemProtocol { public static String item_lettering_frequency = "lettering_frequency"; public static String item_one_speed = "one_speed"; public static String item_coating_frequency = "coating_frequency"; + public static String item_detail_coating_qualified_qty = "detail_coating_qualified_qty"; + public static String item_strapping_order_detail = "strapping_order_detail"; + public static String item_order_feeding_finish = "order_feeding_finish"; + + public static String item_to_heartbeat = "to_heartbeat"; @@ -89,6 +94,9 @@ public class ItemProtocol { public static String item_to_lettering_frequency = "to_lettering_frequency"; public static String item_to_one_speed = "to_one_speed"; public static String item_to_coating_frequency = "to_coating_frequency"; + public static String item_to_jackup_num = "to_jackup_num"; + public static String item_to_color = "to_color"; + private HaiLiangFeedingTrunkDeviceDriver driver; @@ -161,8 +169,8 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_detail_coating_qty); } - public int getLabeling_order() { - return this.getOpcIntegerValue(item_labeling_order); + public int getLabeling_order_detail() { + return this.getOpcIntegerValue(item_labeling_order_detail); } public int getDetail_labeling_qualified_qty() { @@ -181,6 +189,13 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_clear); } + public int getStrapping_order_detail() { + return this.getOpcIntegerValue(item_strapping_order_detail); + } + + public int getOrder_feeding_finish() { + return this.getOpcIntegerValue(item_order_feeding_finish); + } public Float getLine_speed() { @@ -227,6 +242,12 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_coating_frequency); } + public int getDetail_coating_qualified_qty() { + return this.getOpcIntegerValue(item_detail_coating_qualified_qty); + } + + + public int getPause() { return this.getOpcIntegerValue(item_pause); } @@ -399,7 +420,6 @@ public class ItemProtocol { list.add(new ItemDto(item_last_order_detail, "上次完成工单明细号", "DB600.D14")); list.add(new ItemDto(item_order_feeding_qty, "当前工单上料数量", "DB600.D18")); list.add(new ItemDto(item_detail_feeding_qty, "当前工单明细号上料数量", "DB600.D22")); - list.add(new ItemDto(item_detail_feeding_qualified_qty, "当前工单明细号上料合格数量", "DB600.D122")); list.add(new ItemDto(item_detail_lettering_qty, "当前工单明细号刻字数量", "DB600.D26")); list.add(new ItemDto(item_detail_lettering_qualified_qty, "当前工单明细号刻字合格数量", "DB600.D30")); list.add(new ItemDto(item_detail_risking_qualified_qty, "当前工单明细号套冒合格数", "DB600.D34")); @@ -407,7 +427,7 @@ public class ItemProtocol { list.add(new ItemDto(item_detail_strapping_qty, "当前工单明细号捆扎包数", "DB600.D42")); list.add(new ItemDto(item_detail_strapping_oneqty, "当前工单明细号捆扎根数", "DB600.D46")); list.add(new ItemDto(item_detail_coating_qty, "当前工单明细号裹膜数", "DB600.D50")); - list.add(new ItemDto(item_labeling_order, "当前贴标工单明细号", "DB600.D54")); + list.add(new ItemDto(item_labeling_order_detail, "当前贴标工单明细号", "DB600.D54")); list.add(new ItemDto(item_detail_labeling_qualified_qty, "当前工单明细号刻字数量", "DB600.D58")); list.add(new ItemDto(item_detail_labeling_qty, "当前贴标工单明细号贴标数", "DB600.D62")); list.add(new ItemDto(item_ready, "设备就绪", "DB600.D66")); @@ -424,6 +444,12 @@ public class ItemProtocol { list.add(new ItemDto(item_lettering_frequency, "刻字频率", "DB600.D110")); list.add(new ItemDto(item_one_speed, "捆扎裹膜贴标段输送速度", "DB600.REAL114")); list.add(new ItemDto(item_coating_frequency, "裹膜机频率", "DB600.D118")); + list.add(new ItemDto(item_detail_feeding_qualified_qty, "当前工单明细号上料合格数量", "DB600.D122")); + list.add(new ItemDto(item_detail_coating_qualified_qty, "当前工单明细号裹膜合格数量", "DB600.D126")); + list.add(new ItemDto(item_strapping_order_detail, "捆扎工单明细号", "DB600.D130")); + list.add(new ItemDto(item_order_feeding_finish, "工单上料完成", "DB600.D134")); + + return list; } @@ -461,6 +487,8 @@ public class ItemProtocol { list.add(new ItemDto(item_to_lettering_frequency, "刻字频率", "DB610.D110")); list.add(new ItemDto(item_to_one_speed, "捆扎裹膜贴标段输送速度", "DB610.REAL114")); list.add(new ItemDto(item_to_coating_frequency, "裹膜机频率", "DB610.D118")); + list.add(new ItemDto(item_to_jackup_num, "套冒合格后顶升数", "DB610.W122")); + list.add(new ItemDto(item_to_color, "套冒颜色", "DB610.W124")); return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDefination.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDefination.java index b9ea3fa..29c9a9f 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDefination.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDefination.java @@ -60,10 +60,12 @@ public class HaiLiangLabelingDefination implements OpcDeviceDriverDefination { list.add(new ItemDto(ItemProtocol.item_mode, "工作模式", "DB606.W2", Boolean.valueOf(true))); list.add(new ItemDto(ItemProtocol.item_move, "光电信号", "DB606.W4")); list.add(new ItemDto(ItemProtocol.item_error, "故障信号", "DB606.W6")); - list.add(new ItemDto(ItemProtocol.item_order, "当前执行工单号", "DB606.D8")); - list.add(new ItemDto(ItemProtocol.item_order_detail, "当前工单明细号", "DB606.D12")); - list.add(new ItemDto(ItemProtocol.item_detail_qty, "当前工单实时上料数量", "DB606.D16")); - list.add(new ItemDto(ItemProtocol.item_detail_qualified_qty, "当前工单明细号合格数量", "DB606.D20")); + list.add(new ItemDto(ItemProtocol.item_order, "工单号", "DB606.D8")); + list.add(new ItemDto(ItemProtocol.item_order_detail, "工单明细号", "DB606.D12")); + list.add(new ItemDto(ItemProtocol.item_detail_qty, "明细总捆数", "DB606.D16")); + list.add(new ItemDto(ItemProtocol.item_detail_qualified_qty, "合格捆数量", "DB606.D20")); + list.add(new ItemDto(ItemProtocol.item_one_qty, "当前捆根数", "DB606.D24")); + return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java index b414481..0fa0738 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java @@ -3,6 +3,7 @@ package org.nl.acs.device_driver.hailiang.hailiang_labeling; import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSONObject; import lombok.Data; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; @@ -12,13 +13,13 @@ import org.nl.acs.device_driver.driver.AbstractOpcDeviceDriver; import org.nl.acs.device_driver.driver.ExecutableDeviceDriver; import org.nl.acs.log.service.LogServer; import org.nl.acs.opc.Device; -import org.nl.acs.order.service.LabelingTemplateService; import org.nl.acs.order.service.ProduceshiftorderService; import org.nl.acs.order.service.ProduceshiftorderdetailService; import org.nl.acs.order.service.dto.ProduceshiftorderDto; import org.nl.acs.order.service.dto.ProduceshiftorderdetailDto; import org.nl.exception.BadRequestException; import org.nl.utils.SpringContextHolder; +import org.nl.wql.WQL; import org.openscada.opc.lib.da.Server; import org.springframework.beans.factory.annotation.Autowired; @@ -49,8 +50,8 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem @Autowired LogServer logServer = SpringContextHolder.getBean(LogServer.class); - @Autowired - LabelingTemplateService labelingTemplateService = SpringContextHolder.getBean(LabelingTemplateService.class); +// @Autowired +// LabelingTemplateService labelingTemplateService = SpringContextHolder.getBean(LabelingTemplateService.class); String device_code; int mode = 0; @@ -65,8 +66,13 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem int last_order_detail = 0; int detail_qty = 0; int last_detail_qty = 0; - int detail_qualified_qty = 0; - int last_detail_qualified_qty = 0; + int detail_qualified_qty; + int last_detail_qualified_qty; + int labeling_index; + int last_labeling_index; + int one_qty = 0; + int last_one_qty = 0; + boolean requireSucess = false; @@ -84,10 +90,10 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem error = this.itemProtocol.getError(); order = this.itemProtocol.getOrder(); order_detail = this.itemProtocol.getOrder_detail(); - //当前工单明细号上料数量 detail_qty = this.itemProtocol.getDetail_qty(); - //当前工单明细号上料合格数量 detail_qualified_qty = this.itemProtocol.getDetail_qualified_qty(); + one_qty = this.itemProtocol.getOne_qty(); + if (mode != last_mode) { logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); @@ -116,8 +122,13 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem } if (detail_qualified_qty != last_detail_qualified_qty) { logServer.deviceLog(this.device_code,"detail_qualified_qty" ,String.valueOf(detail_qualified_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号detail_qualified_qty:" + last_detail_qualified_qty + "->" + detail_qualified_qty); + logServer.deviceLogToacs(this.device_code,"","","detail_qualified_qty:" + last_detail_qualified_qty + "->" + detail_qualified_qty); } + if (one_qty != last_one_qty) { + logServer.deviceLog(this.device_code,"finish_status" ,String.valueOf(one_qty)); + logServer.deviceLogToacs(this.device_code,"","","信号one_qty:" + last_one_qty + "->" + one_qty); + } + } catch (Exception var17) { return; } @@ -140,16 +151,17 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem break; case 2: break; - case 3: + case 4: //申请贴标 if(!requireSucess){ - if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ + if(order > 0 && order_detail > 0 && detail_qty>0 ){ logServer.deviceLogToacs(this.device_code,"","",device_code+":申请贴标,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); + logServer.deviceLogToacs(this.device_code,"","","申请贴标"); apply_labeling_message(String.valueOf(order),String.valueOf(order_detail),String.valueOf(detail_qty)); } else { logServer.deviceLogToacs(this.device_code,"","",device_code+":申请贴标失败,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); } } @@ -157,13 +169,13 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem case 5: //贴标完成 if(!requireSucess){ - if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ + if(order > 0 && order_detail > 0 && detail_qty>0 ){ logServer.deviceLogToacs(this.device_code,"","",device_code+":申请贴标完成,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); } else { logServer.deviceLogToacs(this.device_code,"","",device_code+":申请贴标完成失败,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); } } @@ -171,13 +183,13 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem case 6: //强制贴标完成 if(!requireSucess){ - if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { + if( order > 0 && order_detail > 0 && detail_qty>0) { logServer.deviceLogToacs(this.device_code,"","",device_code+":申请强制贴标完成,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); } else { logServer.deviceLogToacs(this.device_code,"","",device_code+":申请强制贴标完成失败,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:" - +order_detail+",detail_qty:"+detail_qty+",detail_qualified_qty:"+detail_qualified_qty); + +order_detail+",detail_qty:"+detail_qty); } } @@ -217,7 +229,6 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem last_order = order; last_order_detail = order_detail; last_detail_qty = detail_qty; - last_detail_qualified_qty = detail_qualified_qty; } @@ -236,6 +247,7 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem dto.setLabeling_finished(status); String now = DateUtil.now(); dto.setLabeling_finish_time(now); + dto.setOrder_detail_status("08"); produceshiftorderdetailService.update(dto); writing(itemProtocol.item_to_command,String.valueOf(mode)); requireSucess = true; @@ -273,24 +285,50 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem log.trace("触发时间因为小于{}毫秒,而被无视", this.detail_time_out); return false; } else { - if (date.getTime() - this.detail_time_out < (long) this.detail_time_out) { - log.trace("触发时间因为小于{}毫秒,而被无视", this.detail_time_out); - return false; + this.detail_time = date; + ProduceshiftorderDto dto = produceshiftorderService.findOrderByOrderCodeFromCache(String.valueOf(order)); + ProduceshiftorderdetailDto detaildto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); + if(ObjectUtil.isEmpty(dto)){ + throw new BadRequestException("未找到可下发工单明细!"); + } + Boolean flag = false; + // 2.根据明细template_id 找到对应的模板 + JSONObject jsonStor = WQL.getWO("QPRODUCESHIFTORDER").addParam("flag", "3").addParam("storage_id", detaildto.getTemplate_id()).process().uniqueResult(0); + + //labelingTemplateService.printMessage(dto,qty); + String path = jsonStor.getString("path"); + String pathName = "E:\\work\\"+jsonStor.getString("name")+ jsonStor.getString("storage_id") + ".xlsx"; + + + JSONObject jo = new JSONObject(); + jo.put("order_id",dto.getOrder_id()); + jo.put("template_id",detaildto.getTemplate_id()); + jo.put("path",path); + jo.put("url",pathName); + jo.put("alloy",dto.getAlloy()); + jo.put("temper",dto.getTemper()); + jo.put("material_spec",dto.getMaterial_spec()); + jo.put("number",String.valueOf(one_qty)); + jo.put("outer_diameter",dto.getOuter_diameter()); + jo.put("standard",detaildto.getStandard()); + jo.put("batch",detaildto.getBatch()); + jo.put("prod_date",detaildto.getProd_date()); + jo.put("present_strap_pack_number",String.valueOf(labeling_index)); + jo.put("inspector",detaildto.getInspector()); + jo.put("mg_weight",detaildto.getMg_weight()); + //打印纸张大小 + jo.put("page_length","600"); + jo.put("page_height","400"); + logServer.deviceLogToacs(this.device_code,"","","申请贴标接口信息:"+jo.toString()); + + flag = produceshiftorderService.print(jo); + if(flag){ + logServer.deviceLogToacs(this.device_code,"","","下发贴标信息成功"); + writing(itemProtocol.item_to_command,String.valueOf(mode)); + requireSucess = true; + return true; } else { - this.detail_time = date; - ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); - if(ObjectUtil.isEmpty(dto)){ - throw new BadRequestException("未找到可下发工单明细!"); - } - Boolean flag = labelingTemplateService.printMessage(dto,qty); - if(flag){ - logServer.deviceLogToacs(this.device_code,"","","下发贴标信息成功"); - writing(itemProtocol.item_to_command,String.valueOf(mode)); - requireSucess = true; - return true; - } else { - return false; - } + return false; } } } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/ItemProtocol.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/ItemProtocol.java index 5e11985..6f32c38 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/ItemProtocol.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/ItemProtocol.java @@ -14,8 +14,11 @@ public class ItemProtocol { public static String item_error = "error"; public static String item_order = "order"; public static String item_order_detail = "order_detail"; + public static String item_labeling_index = "labeling_index"; + public static String item_labeling_index_number = "labeling_index_number"; public static String item_detail_qty = "detail_qty"; public static String item_detail_qualified_qty = "detail_qualified_qty"; + public static String item_one_qty = "one_qty"; public static String item_to_command = "to_command"; @@ -53,6 +56,14 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_detail_qualified_qty); } + public int getLabeling_index() { + return this.getOpcIntegerValue(item_labeling_index); + } + + public int getOne_qty() { + return this.getOpcIntegerValue(item_one_qty); + } + public int getToCommand() { return this.getOpcIntegerValue(item_to_command); } @@ -75,10 +86,11 @@ public class ItemProtocol { list.add(new ItemDto(item_mode, "工作模式", "DB606.W2", Boolean.valueOf(true))); list.add(new ItemDto(item_move, "光电信号", "DB606.W4")); list.add(new ItemDto(item_error, "故障信号", "DB606.W6")); - list.add(new ItemDto(item_order, "当前执行工单号", "DB606.D8")); - list.add(new ItemDto(item_order_detail, "当前工单明细号", "DB606.D12")); - list.add(new ItemDto(item_detail_qty, "当前工单实时上料数量", "DB606.D16")); - list.add(new ItemDto(item_detail_qualified_qty, "当前工单明细号合格数量", "DB606.D20")); + list.add(new ItemDto(ItemProtocol.item_order, "工单号", "DB606.D8")); + list.add(new ItemDto(ItemProtocol.item_order_detail, "工单明细号", "DB606.D12")); + list.add(new ItemDto(ItemProtocol.item_detail_qty, "实时捆数量", "DB606.D16")); + list.add(new ItemDto(ItemProtocol.item_detail_qualified_qty, "合格捆数量", "DB606.D20")); + list.add(new ItemDto(ItemProtocol.item_one_qty, "当前捆根数", "DB606.D24")); return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDefination.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDefination.java index c44269c..1e5e74c 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDefination.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDefination.java @@ -64,8 +64,8 @@ public class HaiLiangStrappingDefination implements OpcDeviceDriverDefination { list.add(new ItemDto(ItemProtocol.item_order_detail, "当前工单明细号", "DB604.D12")); list.add(new ItemDto(ItemProtocol.item_detail_qty, "当前工单实时上料数量", "DB604.D16")); list.add(new ItemDto(ItemProtocol.item_detail_qualified_qty, "当前工单明细号合格数量", "DB604.D20")); - list.add(new ItemDto(ItemProtocol.item_cache_qty, "当前缓存数量", "DB604.D24")); - list.add(new ItemDto(ItemProtocol.item_qty, "当前捆扎数量", "DB604.D28")); + list.add(new ItemDto(ItemProtocol.item_qty, "当前捆扎数量", "DB604.D24")); + list.add(new ItemDto(ItemProtocol.item_status, "当前捆扎数量", "DB604.D28")); return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java index 9639d7c..0d5509f 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java @@ -63,6 +63,10 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple int last_cache_qty = 0; int qty = 0; int last_qty = 0; + int status = 0; + int last_status = 0; + + boolean requireSucess = false; @@ -83,7 +87,7 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple detail_qty = this.itemProtocol.getDetail_qty(); //当前工单明细号上料合格数量 detail_qualified_qty = this.itemProtocol.getDetail_qualified_qty(); - cache_qty = this.itemProtocol.getCache_qty(); + status = this.itemProtocol.getStatus(); qty = this.itemProtocol.getQty(); if (mode != last_mode) { @@ -116,9 +120,9 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple logServer.deviceLog(this.device_code,"detail_qualified_qty" ,String.valueOf(detail_qualified_qty)); logServer.deviceLogToacs(this.device_code,"","","信号detail_qualified_qty:" + last_detail_qualified_qty + "->" + detail_qualified_qty); } - if (cache_qty != last_cache_qty) { - logServer.deviceLog(this.device_code,"cache_qty" ,String.valueOf(cache_qty)); - logServer.deviceLogToacs(this.device_code,"","","信号cache_qty:" + last_cache_qty + "->" + cache_qty); + if (status != last_status) { + logServer.deviceLog(this.device_code,"status" ,String.valueOf(cache_qty)); + logServer.deviceLogToacs(this.device_code,"","","信号status:" + last_status + "->" + status); } if (qty != last_qty) { logServer.deviceLog(this.device_code,"qty" ,String.valueOf(qty)); @@ -182,7 +186,7 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple last_order_detail = order_detail; last_detail_qty = detail_qty; last_detail_qualified_qty = detail_qualified_qty; - last_cache_qty = cache_qty; + last_status = status; last_qty = qty; } diff --git a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/ItemProtocol.java b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/ItemProtocol.java index e10ba57..4c84865 100644 --- a/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/ItemProtocol.java +++ b/nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/ItemProtocol.java @@ -16,7 +16,7 @@ public class ItemProtocol { public static String item_order_detail = "order_detail"; public static String item_detail_qty = "detail_qty"; public static String item_detail_qualified_qty = "detail_qualified_qty"; - public static String item_cache_qty = "cache_qty"; + public static String item_status = "status"; public static String item_qty = "qty"; public static String item_to_command = "to_command"; @@ -59,8 +59,8 @@ public class ItemProtocol { return this.getOpcIntegerValue(item_detail_qualified_qty); } - public int getCache_qty() { - return this.getOpcIntegerValue(item_cache_qty); + public int getStatus() { + return this.getOpcIntegerValue(item_status); } public int getQty() { @@ -94,8 +94,8 @@ public class ItemProtocol { list.add(new ItemDto(item_order_detail, "当前工单明细号", "DB604.D12")); list.add(new ItemDto(item_detail_qty, "当前工单实时上料数量", "DB604.D16")); list.add(new ItemDto(item_detail_qualified_qty, "当前工单明细号合格数量", "DB604.D20")); - list.add(new ItemDto(item_cache_qty, "当前缓存数量", "DB604.D24")); - list.add(new ItemDto(item_qty, "当前捆扎数量", "DB604.D28")); + list.add(new ItemDto(item_qty, "当前捆扎数量", "DB604.D24")); + list.add(new ItemDto(item_status, "状态", "DB604.D28")); return list; } diff --git a/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java b/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java index 71c9eeb..a18d94a 100644 --- a/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/acs/ext/wms/service/impl/WmsToAcsServiceImpl.java @@ -150,22 +150,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService { jo.put("remark", remark); jo.put("params", params); jo.put("task_type", StrUtil.isEmpty(task_type) ? 1 : Integer.parseInt(task_type)); - // 如果是无光电的设备 指令完成变更起点、终点状态 - JSONObject startjo = new JSONObject(); - startjo.put("device_code", start_device_code); - startjo.put("hasGoodStatus", "2"); - startjo.put("material_type", ""); - startjo.put("batch", ""); - startjo.put("islock", "false"); - DeviceService.changeDeviceStatus(startjo); - - JSONObject nextjo = new JSONObject(); - nextjo.put("device_code", next_device_code); - nextjo.put("hasGoodStatus", "0"); - nextjo.put("material_type", ""); - nextjo.put("batch", ""); - nextjo.put("islock", "false"); - DeviceService.changeDeviceStatus(nextjo); + TaskDto task_dto = jo.toJavaObject(TaskDto.class); try { TaskService.create(task_dto); diff --git a/nladmin-system/src/main/java/org/nl/acs/order/rest/ProduceshiftorderController.java b/nladmin-system/src/main/java/org/nl/acs/order/rest/ProduceshiftorderController.java index 7b15465..06122be 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/rest/ProduceshiftorderController.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/rest/ProduceshiftorderController.java @@ -132,6 +132,23 @@ public class ProduceshiftorderController { return new ResponseEntity<>(HttpStatus.OK); } + @Log("下发刻字信息") + @ApiOperation("下发刻字信息") + @PostMapping(value = "/send_letteringMess") + public ResponseEntity send_letteringMess(@Validated @RequestBody Map whereJson) throws IOException { + produceshiftorderService.send_letteringMess(whereJson); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("下发贴标信息") + @ApiOperation("下发贴标信息") + @PostMapping(value = "/send_labelingMess") + public ResponseEntity send_labelingMess(@Validated @RequestBody Map whereJson) { + produceshiftorderService.send_labelingMess(whereJson); + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("清料") @ApiOperation("清料") @PostMapping(value = "/clear") @@ -195,6 +212,14 @@ public class ProduceshiftorderController { return new ResponseEntity<>(produceshiftorderService.selectTemplateList(),HttpStatus.OK); } + @Log("查询套冒颜色") + @ApiOperation("查询套冒颜色") + @GetMapping("/selectColortypeList") + public ResponseEntity selectColortypeList() { + return new ResponseEntity<>(produceshiftorderService.selectColortypeList(),HttpStatus.OK); + } + + @Log("上传Excel模板") @ApiOperation("上传Excel模板") @PostMapping({"/pictures"}) diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderService.java b/nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderService.java index 9cc7657..915081f 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderService.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderService.java @@ -148,6 +148,11 @@ public interface ProduceshiftorderService { */ void stop(); + //下发刻字信息 + void send_letteringMess(Map where) throws IOException; + + //下发贴标信息 + void send_labelingMess(Map where); /** @@ -228,9 +233,13 @@ public interface ProduceshiftorderService { */ JSONArray selectTemplateList(); + JSONArray selectColortypeList(); + + + /** * 打印 * @param whereJson */ - void print(JSONObject whereJson); + Boolean print(JSONObject whereJson); } diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderDto.java b/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderDto.java index 7d2eeb7..75883f9 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderDto.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderDto.java @@ -97,5 +97,10 @@ public class ProduceshiftorderDto implements Serializable { private String temper; + /** + * 顶升数 + */ + private String jackup_num; + } diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderdetailDto.java b/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderdetailDto.java index fbdf0df..82135aa 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderdetailDto.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/dto/ProduceshiftorderdetailDto.java @@ -12,15 +12,6 @@ import java.io.Serializable; @Data public class ProduceshiftorderdetailDto implements Serializable { - /** 工单明细标识 */ - private String order_detail_id; - - /** 工单明细编码 */ - private String order_detail_code; - - /** 工单明细类型 */ - private String order_detail_type; - /** 优先级 */ private String priority; @@ -36,43 +27,21 @@ public class ProduceshiftorderdetailDto implements Serializable { /** 工单数量 */ private String order_qty; - /** 工单明细数量 */ - private String order_detail_qty; - /** 捆扎包数 */ private String strap_pack_number; /** 当前捆扎包数 */ private String present_strap_pack_number; - /** 当前捆扎数 */ - private String present_strap_number; - /** 每捆数量 */ private String strap_number; /** 捆扎尾料数量 */ private String strap_tailint_number; - /** 图标前刻字信息 */ + /** 刻字信息 */ private String lettering_message; - /** 刻字图标类型 */ - private String lettering_icon; - - /** 图标后刻字信息 */ - private String lettering_message2; - - - /** 当前刻字数量 */ - private String present_lettering_number; - - - - /** 贴标模板 */ - private String labeling_template; - - /** 贴标信息 */ private String labeling_message; @@ -115,39 +84,20 @@ public class ProduceshiftorderdetailDto implements Serializable { /** 外径 */ private String outer_diameter; - /** 壁厚 */ - private String wall_thickness; - /** 物料长度 */ private String length; /** 工单明细状态 */ - //00-就绪、01-分拣中 - //02-下发工单明细暂停 03-工单明细暂停 - //04-下发强制完成 05-强制完成 - //06-自动完成 private String order_detail_status; /** 上料数量 */ private String feeding_qty; - /** 当前上料数量 */ - private String present_feeding_number; - - /** 上料合格数量 */ - private String feeding_qualified_number; - /** 上料开始时间 */ private String feeding_start_time; /** 上料完成时间 */ - private String feeding_finish_time; - - /** 上料完成 */ - private String feeding_finished; - - /** 刻字合格数量 */ - private String qualified_lettering_number; + private String feeding_end_time; /** 刻字开始时间 */ private String lettering_start_time; @@ -155,33 +105,15 @@ public class ProduceshiftorderdetailDto implements Serializable { /** 刻字完成时间 */ private String lettering_finish_time; - /** 刻字完成 */ - private String lettering_finished; - - /** 当前套冒数量 */ - private String present_sleeveing_number; - /** 套冒合格数量 */ private String qualified_sleeveing_number; - /** 套冒完成 */ - private String sleeveing_finished; - /** 套冒开始时间 */ private String sleeveing_start_time; /** 套冒完成时间 */ private String sleeveing_finish_time; - /** 捆扎开始时间 */ - private String strap_start_time; - - /** 捆扎完成时间 */ - private String strap_finish_time; - - /** 捆扎完成 */ - private String strap_finished; - /** 裹膜数量 */ private String wraping_number; @@ -197,26 +129,29 @@ public class ProduceshiftorderdetailDto implements Serializable { /** 裹膜完成时间 */ private String wraping_finish_time; - /** 裹膜完成 */ - private String wraping_finished; - /** 贴标开始时间 */ private String labeling_start_time; /** 贴标完成时间 */ private String labeling_finish_time; - /** 贴标完成 */ - private String labeling_finished; - /** 开始时间 */ private String start_time; /** 结束时间 */ private String end_time; - /** 模板id */ - private String template_id; + /** 工单明细标识 */ + private String order_detail_id; + + /** 工单明细编码 */ + private String order_detail_code; + + /** 工单明细类型 */ + private String order_detail_type; + + /** 壁厚 */ + private String wall_thickness; /** 执行标准 */ private String standard; @@ -232,4 +167,71 @@ public class ProduceshiftorderdetailDto implements Serializable { /** 米克重 */ private String mg_weight; + + /** 工单明细数量 */ + private String order_detail_qty; + + /** 图标类型 */ + private String lettering_icon; + + /** 图标后刻字信息 */ + private String lettering_message2; + + /** 当前上料数量 */ + private String present_feeding_number; + + /** 上料合格数量 */ + private String feeding_qualified_number; + + /** 当前刻字数量 */ + private String present_lettering_number; + + /** 刻字合格数量 */ + private String qualified_lettering_number; + + /** 当前套冒数量 */ + private String present_sleeveing_number; + + /** 捆扎合格包数 */ + private String qualified_strap_pack_number; + + /** 当前捆扎数量 */ + private String present_strap_number; + + /** 捆扎开始时间 */ + private String strap_start_time; + + /** 捆扎完成时间 */ + private String strap_finish_time; + + /** 贴标模板 */ + private String labeling_template; + + /** 贴标合格数量 */ + private String qualified_labeling_number; + + /** 上料完成 */ + private String feeding_finished; + + /** 刻字完成 */ + private String lettering_finished; + + /** 套冒完成 */ + private String sleeveing_finished; + + /** 裹膜完成 */ + private String wraping_finished; + + /** 捆扎完成 */ + private String strap_finished; + + /** 贴标完成 */ + private String labeling_finished; + + /** 模板id */ + private String template_id; + + /** 颜色 */ + private String color_type; + } diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java index 6be5fa4..de626da 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java @@ -15,6 +15,7 @@ import com.spire.xls.Workbook; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.nl.acs.device_driver.hailiang.hailiang_feeding_trunk.HaiLiangFeedingTrunkDeviceDriver; +import org.nl.acs.device_driver.hailiang.hailiang_labeling.HaiLiangLabelingDeviceDriver; import org.nl.acs.opc.DeviceAppService; import org.nl.acs.order.service.ProduceshiftorderService; import org.nl.acs.order.service.ProduceshiftorderdetailService; @@ -226,12 +227,20 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if (ObjectUtil.isEmpty(tableData)){ throw new BadRequestException("客户信息不可为空!"); } + String jackup_num = ""; + if(Double.valueOf(outer_diameter) < 34.93){ + jackup_num = "5"; + } else { + jackup_num = "2"; + } + String order_code = CodeUtil.getNewCode("ORDER_NO"); String order_id = IdUtil.simpleUUID(); orderDto.setMaterial_code(material_code); orderDto.setMaterial_name(material_name); orderDto.setMaterial_spec(material_spec); orderDto.setMaterial_uuid(material_id); + orderDto.setJackup_num(jackup_num); orderDto.setLength(length); orderDto.setOuter_diameter(outer_diameter); orderDto.setWall_thickness(wall_thickness); @@ -532,7 +541,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getPause() == 1 ){ throw new BadRequestException("设备已处于暂停状态,无法下发暂停!"); } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","1"); + haiLiangFeedingTrunkDeviceDriver.writing("to_pause","1"); } } @@ -548,7 +557,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getPause() == 0 ){ throw new BadRequestException("设备已处于恢复状态,无法下发恢复!"); } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); + haiLiangFeedingTrunkDeviceDriver.writing("to_pause","0"); } } @@ -562,13 +571,76 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getMode() !=2){ throw new BadRequestException("设备未联机,无法下发恢复!"); } - if(haiLiangFeedingTrunkDeviceDriver.getPause() == 0 ){ - throw new BadRequestException("设备已处于恢复状态,无法下发恢复!"); - } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); + + haiLiangFeedingTrunkDeviceDriver.writing("to_pause","1"); } } + //下发刻字信息 + @Override + public void send_letteringMess(Map where) throws IOException { + String order_code = where.get("parent_order_code").toString(); + String deatail_code = where.get("order_code").toString(); + ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(order_code,deatail_code); + if(ObjectUtil.isEmpty(dto)){ + throw new BadRequestException("未找到对应工单明细!"); + + } + produceshiftorderdetailService.sendLetteringMess(dto); + + } + + //下发贴标信息 + @Override + public void send_labelingMess(Map where) { + String order_code = where.get("parent_order_code").toString(); + String deatail_code = where.get("order_code").toString(); + ProduceshiftorderDto dto = findOrderByOrderCodeFromCache(order_code); + ProduceshiftorderdetailDto detaildto = produceshiftorderdetailService.findOrderDetailFromCache(order_code,deatail_code); + if(ObjectUtil.isEmpty(detaildto)){ + throw new BadRequestException("未找到对应工单明细!"); + + } + // 2.根据明细template_id 找到对应的模板 + JSONObject jsonStor = WQL.getWO("QPRODUCESHIFTORDER").addParam("flag", "3").addParam("storage_id", detaildto.getTemplate_id()).process().uniqueResult(0); + + //labelingTemplateService.printMessage(dto,qty); + String path = jsonStor.getString("path"); + String pathName = "E:\\work\\"+jsonStor.getString("name")+ jsonStor.getString("storage_id") + ".xlsx"; + + HaiLiangLabelingDeviceDriver haiLiangLabelingDeviceDriver; + int one_qty = 0; + int labeling_index = 0; + + List deviceAll = deviceAppService.findDeviceDriver(HaiLiangLabelingDeviceDriver.class); + if (deviceAll.get(0) instanceof HaiLiangLabelingDeviceDriver) { + haiLiangLabelingDeviceDriver = (HaiLiangLabelingDeviceDriver) deviceAll.get(0); + one_qty = haiLiangLabelingDeviceDriver.getOne_qty(); + labeling_index = haiLiangLabelingDeviceDriver.getLabeling_index(); + } + + JSONObject jo = new JSONObject(); + jo.put("order_id",dto.getOrder_id()); + jo.put("template_id",detaildto.getTemplate_id()); + jo.put("path",path); + jo.put("url",pathName); + jo.put("alloy",dto.getAlloy()); + jo.put("temper",dto.getTemper()); + jo.put("material_spec",dto.getMaterial_spec()); + jo.put("number",String.valueOf(one_qty)); + jo.put("outer_diameter",dto.getOuter_diameter()); + jo.put("standard",detaildto.getStandard()); + jo.put("batch",detaildto.getBatch()); + jo.put("prod_date",detaildto.getProd_date()); + jo.put("present_strap_pack_number",String.valueOf(labeling_index)); + jo.put("inspector",detaildto.getInspector()); + jo.put("mg_weight",detaildto.getMg_weight()); + //打印纸张大小 + jo.put("page_length","50"); + jo.put("page_height","40"); + print(jo); + } + @Override public void clear() { HaiLiangFeedingTrunkDeviceDriver haiLiangFeedingTrunkDeviceDriver; @@ -581,7 +653,10 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getClear() == 1 ){ throw new BadRequestException("设备已处于清料状态,无法下发清料!"); } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_clear","1"); + if(haiLiangFeedingTrunkDeviceDriver.getOrder_feeding_finish() == 0 ){ + throw new BadRequestException("设备未上料完成,无法下发清料!"); + } + haiLiangFeedingTrunkDeviceDriver.writing("to_clear","1"); } } @@ -597,27 +672,32 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getPause() != 0 ){ throw new BadRequestException("设备已处于暂停状态,无法下发暂停!"); } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); + haiLiangFeedingTrunkDeviceDriver.writing("to_pause","0"); } } + //强制完成 @Override public void order_force_complete(Map whereJson) { + String order = whereJson.get("order_code").toString(); + ProduceshiftorderDto orderdto = findOrderByOrderCodeFromCache(order); + if(ObjectUtil.isEmpty(orderdto)){ + throw new BadRequestException("未找到对应工单!"); + } + orderdto.setOrder_status("06"); HaiLiangFeedingTrunkDeviceDriver haiLiangFeedingTrunkDeviceDriver; List deviceAll = deviceAppService.findDeviceDriver(HaiLiangFeedingTrunkDeviceDriver.class); if (deviceAll.get(0) instanceof HaiLiangFeedingTrunkDeviceDriver) { haiLiangFeedingTrunkDeviceDriver = (HaiLiangFeedingTrunkDeviceDriver) deviceAll.get(0); - if(haiLiangFeedingTrunkDeviceDriver.getMode() !=2){ - throw new BadRequestException("设备未联机,无法下发暂停!"); - } - if(haiLiangFeedingTrunkDeviceDriver.getOrder() == 0 ){ - throw new BadRequestException("设备已处于恢复状态,无法下发恢复!"); - } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); +// if(haiLiangFeedingTrunkDeviceDriver.getMode() !=2){ +// throw new BadRequestException("设备未联机,无法下发暂停!"); +// } + haiLiangFeedingTrunkDeviceDriver.writing("to_order_complete","1"); } + update(orderdto); } - + //工单明细暂停 @Override public void detail_pause(Map whereJson) { String is_flag = MapUtil.getStr(whereJson, "is_flag"); @@ -649,25 +729,27 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A if(haiLiangFeedingTrunkDeviceDriver.getPause() == 1 ){ throw new BadRequestException("设备已处于暂停状态,无法下发!"); } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); + haiLiangFeedingTrunkDeviceDriver.writing("to_pause","0"); } } @Override public void detail_force_complete(Map whereJson) { + String order = whereJson.get("parent_order_code").toString(); + String detail = whereJson.get("order_code").toString(); + ProduceshiftorderdetailDto detaildto = produceshiftorderdetailService.findOrderDetailFromCache(order,detail); + if(ObjectUtil.isEmpty(detaildto)){ + throw new BadRequestException("未找到对应工单明细!"); + } + detaildto.setOrder_detail_status("04"); HaiLiangFeedingTrunkDeviceDriver haiLiangFeedingTrunkDeviceDriver; List deviceAll = deviceAppService.findDeviceDriver(HaiLiangFeedingTrunkDeviceDriver.class); if (deviceAll.get(0) instanceof HaiLiangFeedingTrunkDeviceDriver) { haiLiangFeedingTrunkDeviceDriver = (HaiLiangFeedingTrunkDeviceDriver) deviceAll.get(0); - if(haiLiangFeedingTrunkDeviceDriver.getMode() !=2){ - throw new BadRequestException("设备联机,无法下发暂停!"); - } - if(haiLiangFeedingTrunkDeviceDriver.getPause() == 0 ){ - throw new BadRequestException("设备已处于恢复状态,无法下发恢复!"); - } - haiLiangFeedingTrunkDeviceDriver.writing("item_to_pause","0"); + haiLiangFeedingTrunkDeviceDriver.writing("to_order_detail_complete","1"); } + produceshiftorderdetailService.update(detaildto); } @@ -868,14 +950,31 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A JSONObject json = new JSONObject(); json.put("template_id", obj.getString("template_id")); json.put("template_code", obj.getString("template_code")); - json.put("template_name", obj.getString("template_name")); + json.put("template_name", obj.getString("template_name")); + result.add(json); + } + return result; + } + + + @Override + public JSONArray selectColortypeList() { + //贴标模板表【acs_labeling_template】 + JSONArray arr = WQLObject.getWQLObject("sys_dict_detail").query("is_delete= '0' AND is_used= '1' and name='color_type'","dict_sort asc").getResultJSONArray(0); + JSONArray result = new JSONArray(); + for (int i = 0; i < arr.size(); i++) { + JSONObject obj = arr.getJSONObject(i); + JSONObject json = new JSONObject(); + json.put("id", obj.getString("id")); + json.put("label", obj.getString("label")); + json.put("value", obj.getString("value")); result.add(json); } return result; } @Override - public void print(JSONObject whereJson) { + public Boolean print(JSONObject whereJson) { String order_id = whereJson.getString("order_id"); String template_id = whereJson.getString("template_id"); @@ -929,7 +1028,9 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A printerJob.print(); } catch (PrinterException e) { e.printStackTrace(); + return false; } + return true; } } \ No newline at end of file diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java index 6cebace..77dab8c 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java @@ -176,7 +176,7 @@ public class ProduceshiftorderdetailServiceImpl implements Produceshiftorderdeta map.put("上料数量", produceshiftorderdetail.getFeeding_qty()); map.put("上料合格数量", produceshiftorderdetail.getFeeding_qualified_number()); map.put("上料开始时间", produceshiftorderdetail.getFeeding_start_time()); - map.put("上料完成时间", produceshiftorderdetail.getFeeding_finish_time()); + map.put("上料完成时间", produceshiftorderdetail.getFeeding_end_time()); map.put("刻字合格数量", produceshiftorderdetail.getQualified_lettering_number()); map.put("刻字开始时间", produceshiftorderdetail.getLettering_start_time()); map.put("刻字完成时间", produceshiftorderdetail.getLettering_finish_time()); @@ -206,7 +206,7 @@ public class ProduceshiftorderdetailServiceImpl implements Produceshiftorderdeta } public synchronized void reload() { - this.detail = this.queryAllOrderDteail(" (order_detail_status != '05' and order_detail_status != '06' and order_detail_status != '07') and is_deleted =0"); + this.detail = this.queryAllOrderDteail(" (order_detail_status != '05' and order_detail_status != '06' and order_detail_status != '07') and is_deleted =0 order by order_detail_code"); } @Override @@ -249,10 +249,17 @@ public class ProduceshiftorderdetailServiceImpl implements Produceshiftorderdeta String msg1 = dto.getLettering_message(); String msg2 = dto.getLettering_message2(); String icon = dto.getLettering_icon(); - message = msg1 + msg2; + if(StrUtil.equals(icon,"1")){ + icon = "<"; + } else if (StrUtil.equals(icon,"2")) { + icon = ">"; + } else { + icon = ""; + } + message = msg1 + icon + msg2; //清缓存 try { - LetteringSocketConnectionAutoRun.write("BUFFERCLEAR" + "\r\n"); +// LetteringSocketConnectionAutoRun.write("BUFFERCLEAR" + "\r\n"); String yh = "\""; String strInst = "SETTEXT " + "S1" + " " + yh + message + yh + "\r\n"; //2个变量 LetteringSocketConnectionAutoRun.write(strInst + "\r\n"); diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/Test.java b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/Test.java index b7718ba..cc4d945 100644 --- a/nladmin-system/src/main/java/org/nl/acs/order/service/impl/Test.java +++ b/nladmin-system/src/main/java/org/nl/acs/order/service/impl/Test.java @@ -5,8 +5,7 @@ public class Test { public static void main(String[] args) { Process printProcess; - String printName ="HP LaserJet Pro MFP M225-M226 PCL 6"; - + String printName ="Zebra ZE500-4 RH (300 dpi)"; try { printProcess = Runtime @@ -14,7 +13,7 @@ public class Test { .exec(new String[] { "C:\\Users\\noblelift\\Desktop\\条码标签设计软件和打印程序\\BarcodePrint\\BarcodePrint.exe", "PrinterName=" + printName, - "LabelName=Label.ct", "Text5="+ "111","Text6="+"222","Text7="+"333","Text8="+"444"}); + "LabelName=Label1.ct", "Text1="+ "12211","Text2="+"23422","Text3="+"3533","Text4="+"6444"}); } catch (Exception e) { @@ -22,6 +21,7 @@ public class Test { } + //System.out.println(17%15); } diff --git a/nladmin-system/src/main/java/org/nl/acs/order/service/wql/order.xls b/nladmin-system/src/main/java/org/nl/acs/order/service/wql/order.xls index 04930eab0c0bb5536ead014d1b9ab05746924878..6f8f1ead7eb1751f800293564eab1e4ffae3d169 100644 GIT binary patch delta 12982 zcma)D34BdQ)IW2xh#*2qkfgE^vPdF364^Hrk=SC%P9n5or^-ud(b_#^rIuPkOVw6OTk-v8?!22k)$jMc`@3)MoO|Z{|L4q^nfvA@m2Wk!e5dik zKDKv=sFJA_TUeVd6?55Q#hM+fvQcI*n~{v@xN)AG;yqI=djeBH85`WayF*43oK)sdRv@n&jRBAsLZfxnh}_XF4PM`HYYJn7i`3W1k(_?ub!#?j zXmQ!SIS#|PEaJE(s~GxX@syY6^yjkqziF~dnQW3rIhQ$*w0>)~Hs-vI%V(jBLOaOR8R<;ALfKOYByy6_F=3xOE?;V!d?7+8r6YzpAJV zaSdMPaKh;c9fq7^YoB>v#YVTewGXnVHJ96)b%++>vK`KVU5*qOWKC~DpK2$ujeXO~ za(cJ;@`=xi!vk`*7#!9lEDqmjz2rT+nC{UOHqGZZNH$oW6x2MlOLR$c=f@Pzv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wDL%z4WvdE2~Grq$u|j@u9HdhP6_$g=Uq7v>axw#QJOVe`MLyzk^RYu-gS z)%}*@t=_z;cq-=?*_z%`Ix0%LnQD(a$~FV#k^1Kyr6AwXBGaQxQM`r5syCbrR~v~4OK5W z8#` diff --git a/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java b/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java index 1731013..73be087 100644 --- a/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java +++ b/nladmin-system/src/main/java/org/nl/acs/stage/service/impl/StageActorServiceImpl.java @@ -940,18 +940,25 @@ public class StageActorServiceImpl implements StageActorService { haiLiangFeedingTrunkDeviceDriver = (HaiLiangFeedingTrunkDeviceDriver) device.getDeviceDriver(); if (haiLiangFeedingTrunkDeviceDriver.getMode() == 0) { mode = "未联机"; + jo.put("isOnline", false); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 1) { mode = "单机"; + jo.put("isOnline", false); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 2) { mode = "联机"; + jo.put("isOnline", true); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 3) { mode = "工作中"; + jo.put("isOnline", true); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 4) { mode = "申请工单"; + jo.put("isOnline", true); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 5) { mode = "申请工单明细号"; + jo.put("isOnline", true); } else if (haiLiangFeedingTrunkDeviceDriver.getMode() == 6) { mode = "急停"; + jo.put("isOnline", true); } obj.put("device_name", haiLiangFeedingTrunkDeviceDriver.getDevice().getDevice_name()); jo.put("mode", mode); @@ -969,7 +976,7 @@ public class StageActorServiceImpl implements StageActorService { jo.put("detail_strapping_qty", haiLiangFeedingTrunkDeviceDriver.getDetail_strapping_qty()); jo.put("detail_strapping_oneqty", haiLiangFeedingTrunkDeviceDriver.getDetail_strapping_oneqty()); jo.put("detail_coating_qty", haiLiangFeedingTrunkDeviceDriver.getDetail_coating_qty()); - jo.put("labeling_order", haiLiangFeedingTrunkDeviceDriver.getLabeling_order()); + jo.put("labeling_order_detail", haiLiangFeedingTrunkDeviceDriver.getLabeling_order_detail()); jo.put("detail_labeling_qualified_qty", haiLiangFeedingTrunkDeviceDriver.getDetail_labeling_qualified_qty()); jo.put("detail_labeling_qty", haiLiangFeedingTrunkDeviceDriver.getDetail_labeling_qty()); jo.put("ready", haiLiangFeedingTrunkDeviceDriver.getReady()); @@ -992,16 +999,22 @@ public class StageActorServiceImpl implements StageActorService { haiLiangFeedingDeviceDriver = (HaiLiangFeedingDeviceDriver) device.getDeviceDriver(); if (haiLiangFeedingDeviceDriver.getMode() == 0) { mode = "未联机"; + jo.put("isOnline", false); } else if (haiLiangFeedingDeviceDriver.getMode() == 1) { mode = "单机"; + jo.put("isOnline", false); } else if (haiLiangFeedingDeviceDriver.getMode() == 2) { mode = "联机"; + jo.put("isOnline", true); } else if (haiLiangFeedingDeviceDriver.getMode() == 3) { mode = "工作中"; + jo.put("isOnline", true); } else if (haiLiangFeedingDeviceDriver.getMode() == 4) { mode = "上料完成"; + jo.put("isOnline", true); } else if (haiLiangFeedingDeviceDriver.getMode() == 5) { mode = "强制上料完成"; + jo.put("isOnline", true); } if (haiLiangFeedingDeviceDriver.getMove() == 0) { move = "无货"; @@ -1024,16 +1037,22 @@ public class StageActorServiceImpl implements StageActorService { haiLiangLetteringDeviceDriver = (HaiLiangLetteringDeviceDriver) device.getDeviceDriver(); if (haiLiangLetteringDeviceDriver.getMode() == 0) { mode = "未联机"; + jo.put("isOnline", false); } else if (haiLiangLetteringDeviceDriver.getMode() == 1) { mode = "单机"; + jo.put("isOnline", false); } else if (haiLiangLetteringDeviceDriver.getMode() == 2) { mode = "联机"; + jo.put("isOnline", true); } else if (haiLiangLetteringDeviceDriver.getMode() == 3) { mode = "工作中"; + jo.put("isOnline", true); } else if (haiLiangLetteringDeviceDriver.getMode() == 4) { mode = "刻字完成"; + jo.put("isOnline", true); } else if (haiLiangLetteringDeviceDriver.getMode() == 5) { mode = "强制刻字完成"; + jo.put("isOnline", true); } if (haiLiangLetteringDeviceDriver.getMove() == 0) { move = "无货"; @@ -1054,16 +1073,22 @@ public class StageActorServiceImpl implements StageActorService { haiLiangRiskingDeviceDriver = (HaiLiangRiskingDeviceDriver) device.getDeviceDriver(); if (haiLiangRiskingDeviceDriver.getMode() == 0) { mode = "未联机"; + jo.put("isOnline", false); } else if (haiLiangRiskingDeviceDriver.getMode() == 1) { mode = "单机"; + jo.put("isOnline", false); } else if (haiLiangRiskingDeviceDriver.getMode() == 2) { mode = "联机"; + jo.put("isOnline", true); } else if (haiLiangRiskingDeviceDriver.getMode() == 3) { mode = "工作中"; + jo.put("isOnline", true); } else if (haiLiangRiskingDeviceDriver.getMode() == 4) { mode = "套冒完成"; + jo.put("isOnline", true); } else if (haiLiangRiskingDeviceDriver.getMode() == 5) { mode = "强制套冒完成"; + jo.put("isOnline", true); } if (haiLiangRiskingDeviceDriver.getMove() == 0) { move = "无货"; @@ -1169,7 +1194,6 @@ public class StageActorServiceImpl implements StageActorService { jo.put("order", haiLiangLabelingDeviceDriver.getOrder()); jo.put("order_detail", haiLiangLabelingDeviceDriver.getOrder_detail()); jo.put("detail_qty", haiLiangLabelingDeviceDriver.getDetail_qty()); - jo.put("detail_qualified_qty", haiLiangLabelingDeviceDriver.getDetail_qualified_qty()); } obj.put("data", jo); } diff --git a/nladmin-system/src/main/java/org/nl/start/auto/run/LetteringSocketConnectionAutoRun.java b/nladmin-system/src/main/java/org/nl/start/auto/run/LetteringSocketConnectionAutoRun.java index 2ad8649..ea0c5c0 100644 --- a/nladmin-system/src/main/java/org/nl/start/auto/run/LetteringSocketConnectionAutoRun.java +++ b/nladmin-system/src/main/java/org/nl/start/auto/run/LetteringSocketConnectionAutoRun.java @@ -2,6 +2,7 @@ package org.nl.start.auto.run; import cn.hutool.core.util.StrUtil; import lombok.extern.slf4j.Slf4j; +import net.sf.json.JSONObject; import org.nl.acs.config.AcsConfig; import org.nl.acs.config.server.AcsConfigService; import org.nl.acs.config.server.impl.AcsConfigServiceImpl; @@ -76,7 +77,8 @@ public class LetteringSocketConnectionAutoRun extends AbstractAutoRunnable { // if (StrUtil.equals(bs.toString(), "MSG 3")) { // // } - if (StrUtil.equals(bs.toString(), "OK")) { +// if (StrUtil.equals(bs.toString(), "OK")) { + if(bs.toString().contains("OK")){ HaiLiangFeedingTrunkDeviceDriver haiLiangFeedingTrunkDeviceDriver; List deviceAll = deviceAppService.findDeviceDriver(HaiLiangFeedingTrunkDeviceDriver.class); if (deviceAll.get(0) instanceof HaiLiangFeedingTrunkDeviceDriver) { @@ -148,6 +150,10 @@ public class LetteringSocketConnectionAutoRun extends AbstractAutoRunnable { public static void main(String[] args) throws UnsupportedEncodingException { - byte[] bytes = "你".getBytes("utf-8"); + JSONObject jo = new JSONObject(); + jo.put("x",10.0); + jo.put("y",3.0); + jo.put("angle",0); + System.out.println(bytesToHexString(stringToByte(jo.toString()))); } } diff --git a/nladmin-system/src/main/resources/config/application-dev.yml b/nladmin-system/src/main/resources/config/application-dev.yml index ad6a5e3..b3b5105 100644 --- a/nladmin-system/src/main/resources/config/application-dev.yml +++ b/nladmin-system/src/main/resources/config/application-dev.yml @@ -8,12 +8,12 @@ spring: druid: db-type: com.alibaba.druid.pool.DruidDataSource driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy - url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_zgbz_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true - #url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:hl_zgbz_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + #url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.81.252}:${DB_PORT:3306}/${DB_NAME:hl_zgbz_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true + url: jdbc:log4jdbc:mysql://${DB_HOST:192.168.1.90}:${DB_PORT:3306}/${DB_NAME:hl_zgbz_acs}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&useOldAliasMetadataBehavior=true&allowPublicKeyRetrieval=true username: ${DB_USER:root} #password: ${DB_PWD:P@ssw0rd} - password: ${DB_PWD:Root.123456} - #password: ${DB_PWD:123456} + #password: ${DB_PWD:Root.123456} + password: ${DB_PWD:123456} # 初始连接数 initial-size: 5 # 最小连接数 diff --git a/qd/src/api/acs/order/order.js b/qd/src/api/acs/order/order.js index 67bf528..a672ec9 100644 --- a/qd/src/api/acs/order/order.js +++ b/qd/src/api/acs/order/order.js @@ -83,6 +83,21 @@ export function order_pause(data) { }) } +export function send_letteringMess(data) { + return request({ + url: 'api/produceshiftorder/send_letteringMess', + method: 'post', + data + }) +} + +export function send_labelingMess(data) { + return request({ + url: 'api/produceshiftorder/send_labelingMess', + method: 'post', + data + }) +} export function order_force_complete(data) { return request({ url: 'api/produceshiftorder/order_force_complete', @@ -114,6 +129,13 @@ export function selectTemplateList() { }) } +export function selectColortypeList() { + return request({ + url: 'api/produceshiftorder/selectColortypeList', + method: 'get' + }) +} + export function reload() { return request({ url: 'api/produceshiftorder/reload', @@ -122,4 +144,4 @@ export function reload() { } export default { add, edit, del, importExcel, getDtl, send, device_pause, device_restore, clear, stop, order_pause, order_force_complete, detail_pause, detail_force_complete, - selectTemplateList, reload } + selectTemplateList, selectColortypeList, reload, send_letteringMess, send_labelingMess } diff --git a/qd/src/views/acs/order/AddDialog.vue b/qd/src/views/acs/order/AddDialog.vue index b0673ca..403e7ad 100644 --- a/qd/src/views/acs/order/AddDialog.vue +++ b/qd/src/views/acs/order/AddDialog.vue @@ -94,16 +94,16 @@ :header-cell-style="{background:'#f5f7fa',color:'#606266'}" > - -