更新
This commit is contained in:
@@ -139,7 +139,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("produceorder_id", ext_order_id);
|
map.put("produceorder_id", ext_order_id);
|
||||||
map.put("order_status", "04");
|
map.put("order_status", "04");
|
||||||
map.put("update_optid", 1111111111);
|
map.put("update_optid", 1001001);
|
||||||
map.put("device_id", "");
|
map.put("device_id", "");
|
||||||
map.put("update_optname", "acs");
|
map.put("update_optname", "acs");
|
||||||
map.put("update_time", now);
|
map.put("update_time", now);
|
||||||
@@ -164,7 +164,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String device_id = device_json.getString("device_id");
|
String device_id = device_json.getString("device_id");
|
||||||
WQLObject wo_status = WQLObject.getWQLObject("PDM_BI_DeviceRunStatusRecord");
|
WQLObject wo_status = WQLObject.getWQLObject("PDM_BI_DeviceRunStatusRecord");
|
||||||
JSONObject status_json = wo_status.query("device_id = '" + device_id + "' and (end_time is null or end_time = '' )").uniqueResult(0);
|
JSONObject status_json = wo_status.query("device_id = '" + device_id + "' and (end_time is null or end_time = '' )").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(status_json)){
|
if (ObjectUtil.isNotEmpty(status_json)) {
|
||||||
status_json.put("end_time", start_time);
|
status_json.put("end_time", start_time);
|
||||||
wo_status.update(status_json);
|
wo_status.update(status_json);
|
||||||
}
|
}
|
||||||
@@ -173,10 +173,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
map.put("device_id", device_id);
|
map.put("device_id", device_id);
|
||||||
map.put("status_type", status_type);
|
map.put("status_type", status_type);
|
||||||
map.put("start_time", start_time);
|
map.put("start_time", start_time);
|
||||||
if (error_code > 0 && error_code < 50){
|
if (error_code > 0) {
|
||||||
map.put("err_status_id",error_code);
|
map.put("err_status_id", error_code);
|
||||||
} else if (error_code > 50){
|
|
||||||
map.put("err_status_id", error_code - 50);
|
|
||||||
} else {
|
} else {
|
||||||
map.put("err_status_id", null);
|
map.put("err_status_id", null);
|
||||||
}
|
}
|
||||||
@@ -195,8 +193,8 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String real_qty = param.getString("real_qty");
|
String real_qty = param.getString("real_qty");
|
||||||
WQLObject wo = WQLObject.getWQLObject("mps_bd_produceshiftorder");
|
WQLObject wo = WQLObject.getWQLObject("mps_bd_produceshiftorder");
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("real_qty",real_qty);
|
map.put("real_qty", real_qty);
|
||||||
wo.update(map,"produceorder_code = '"+order_code+"'");
|
wo.update(map, "produceorder_code = '" + order_code + "' and order_status != '04'");
|
||||||
JSONObject result = new JSONObject();
|
JSONObject result = new JSONObject();
|
||||||
result.put("status", HttpStatus.OK.value());
|
result.put("status", HttpStatus.OK.value());
|
||||||
result.put("message", "设备状态反馈成功");
|
result.put("message", "设备状态反馈成功");
|
||||||
|
|||||||
@@ -200,17 +200,17 @@
|
|||||||
IF 输入.flag = "9"
|
IF 输入.flag = "9"
|
||||||
QUERY
|
QUERY
|
||||||
SELECT DISTINCT
|
SELECT DISTINCT
|
||||||
device.device_id
|
device.device_id
|
||||||
FROM
|
FROM
|
||||||
pdm_bi_device device
|
pdm_bi_device device
|
||||||
LEFT JOIN mps_bd_produceshiftorder shift ON shift.device_id = device.device_id
|
INNER JOIN mps_bd_produceshiftorder shift ON shift.device_id = device.device_id
|
||||||
LEFT JOIN pdm_bi_devicerunstatusrecord run ON run.device_id = device.device_id
|
INNER JOIN pdm_bi_devicerunstatusrecord run ON run.device_id = device.device_id AND IFNULL(run.end_time,'') =''
|
||||||
WHERE
|
WHERE
|
||||||
shift.is_delete = '0'
|
shift.is_delete = '0'
|
||||||
AND
|
AND
|
||||||
shift.order_status <> '04'
|
shift.order_status <> '04'
|
||||||
AND
|
AND
|
||||||
(run.status_type <> '05' OR (run.status_type = '05' AND IFNULL(run.end_time,'') <> '') OR run.status_type IS NULL)
|
run.status_type <> '05'
|
||||||
OPTION 输入.workprocedure_id <> ""
|
OPTION 输入.workprocedure_id <> ""
|
||||||
device.workprocedure_id = 输入.workprocedure_id
|
device.workprocedure_id = 输入.workprocedure_id
|
||||||
ENDOPTION
|
ENDOPTION
|
||||||
|
|||||||
@@ -280,14 +280,16 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
if (order_now != last_order_now) {
|
if (order_now != last_order_now) {
|
||||||
logServer.deviceLog(this.device_code,"order_now" ,String.valueOf(order_now));
|
logServer.deviceLog(this.device_code,"order_now" ,String.valueOf(order_now));
|
||||||
logServer.deviceLogToacs(this.device_code,"","","信号order_now:" + last_order_now + "->" + order_now);
|
logServer.deviceLogToacs(this.device_code,"","","信号order_now:" + last_order_now + "->" + order_now);
|
||||||
|
if (mode == 1 && order > 0){
|
||||||
|
JSONObject map = new JSONObject();
|
||||||
|
map.put("order",order);
|
||||||
|
map.put("real_qty",order_now);
|
||||||
|
acsToWmsService.feedOrderRealQty(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (one_now != last_one_now) {
|
if (one_now != last_one_now) {
|
||||||
logServer.deviceLog(this.device_code,"one_now" ,String.valueOf(one_now));
|
logServer.deviceLog(this.device_code,"one_now" ,String.valueOf(one_now));
|
||||||
logServer.deviceLogToacs(this.device_code,"","","信号one_now:" + last_one_now + "->" + one_now);
|
logServer.deviceLogToacs(this.device_code,"","","信号one_now:" + last_one_now + "->" + one_now);
|
||||||
JSONObject map = new JSONObject();
|
|
||||||
map.put("order",order);
|
|
||||||
map.put("real_qty",order_now);
|
|
||||||
acsToWmsService.feedOrderRealQty(map);
|
|
||||||
}
|
}
|
||||||
if (task != last_task) {
|
if (task != last_task) {
|
||||||
logServer.deviceLog(this.device_code,"task" ,String.valueOf(task));
|
logServer.deviceLog(this.device_code,"task" ,String.valueOf(task));
|
||||||
@@ -317,7 +319,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
|
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 10000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
@@ -390,6 +392,7 @@ public class HailiangEngravingMachineDeviceDriver extends AbstractOpcDeviceDrive
|
|||||||
produceshiftorderService.updateByOrderCode(dto);
|
produceshiftorderService.updateByOrderCode(dto);
|
||||||
this.writing("to_confirm_finished","1");
|
this.writing("to_confirm_finished","1");
|
||||||
this.writing("to_clear","1");
|
this.writing("to_clear","1");
|
||||||
|
this.writing("to_order", "0");
|
||||||
this.writing("to_pause","1");
|
this.writing("to_pause","1");
|
||||||
logServer.deviceLogToacs(this.device_code,"","",device_code+":,任务确认完成,电器信号写入成功");
|
logServer.deviceLogToacs(this.device_code,"","",device_code+":,任务确认完成,电器信号写入成功");
|
||||||
}else {
|
}else {
|
||||||
|
|||||||
@@ -236,11 +236,12 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
if (order_now != last_order_now) {
|
if (order_now != last_order_now) {
|
||||||
logServer.deviceLog(this.device_code, "order_now", String.valueOf(order_now));
|
logServer.deviceLog(this.device_code, "order_now", String.valueOf(order_now));
|
||||||
logServer.deviceLogToacs(this.device_code, "", "", "信号order_now:" + last_order_now + "->" + order_now);
|
logServer.deviceLogToacs(this.device_code, "", "", "信号order_now:" + last_order_now + "->" + order_now);
|
||||||
JSONObject map = new JSONObject();
|
if (mode == 1 && order > 0){
|
||||||
map.put("order",order);
|
JSONObject map = new JSONObject();
|
||||||
map.put("real_qty",order_now);
|
map.put("order",order);
|
||||||
acsToWmsService.feedOrderRealQty(map);
|
map.put("real_qty",order_now);
|
||||||
System.out.println(device_code + "当前数量:" + order_now);
|
acsToWmsService.feedOrderRealQty(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if (open_ready_time != last_open_ready_time) {
|
/* if (open_ready_time != last_open_ready_time) {
|
||||||
@@ -262,7 +263,7 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
|
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 10000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
||||||
heartbeat = this.itemProtocol.getItem_heartbeat();
|
heartbeat = this.itemProtocol.getItem_heartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
@@ -338,6 +339,7 @@ public class HailiangPackerStationDeviceDriver extends AbstractOpcDeviceDriver i
|
|||||||
this.writing("to_confirm_finished", "1");
|
this.writing("to_confirm_finished", "1");
|
||||||
this.writing("to_clear", "1");
|
this.writing("to_clear", "1");
|
||||||
this.writing("to_pause", "1");
|
this.writing("to_pause", "1");
|
||||||
|
this.writing("to_order", "0");
|
||||||
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,任务确认完成,电器信号写入成功");
|
logServer.deviceLogToacs(this.device_code, "", "", device_code + ":,任务确认完成,电器信号写入成功");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -313,10 +313,11 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
logServer.deviceLog(this.device_code,"now_order_prod_num" ,String.valueOf(now_order_prod_num));
|
logServer.deviceLog(this.device_code,"now_order_prod_num" ,String.valueOf(now_order_prod_num));
|
||||||
logServer.deviceLogToacs(this.device_code,"","","信号now_order_prod_num:" + last_now_order_prod_num + "->" + now_order_prod_num);
|
logServer.deviceLogToacs(this.device_code,"","","信号now_order_prod_num:" + last_now_order_prod_num + "->" + now_order_prod_num);
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("order",order);
|
if (mode == 1 && order > 0){
|
||||||
map.put("real_qty",now_order_prod_num);
|
map.put("order",order);
|
||||||
acsToWmsService.feedOrderRealQty(map);
|
map.put("real_qty",now_order_prod_num);
|
||||||
System.out.println(device_code + "当前数量:" + now_order_prod_num);
|
acsToWmsService.feedOrderRealQty(map);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (full_number != last_full_number) {
|
if (full_number != last_full_number) {
|
||||||
logServer.deviceLog(this.device_code,"full_number" ,String.valueOf(full_number));
|
logServer.deviceLog(this.device_code,"full_number" ,String.valueOf(full_number));
|
||||||
@@ -352,7 +353,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
}
|
}
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
long now_feedTime = System.currentTimeMillis();
|
long now_feedTime = System.currentTimeMillis();
|
||||||
if (now_feedTime - last_feedDeviceStatusTime >= 10000){
|
if (now_feedTime - last_feedDeviceStatusTime >= 5000){
|
||||||
heartbeat = this.itemProtocol.getHeartbeat();
|
heartbeat = this.itemProtocol.getHeartbeat();
|
||||||
if (heartbeat == last_heartbeat){
|
if (heartbeat == last_heartbeat){
|
||||||
status_type = 01;
|
status_type = 01;
|
||||||
@@ -427,6 +428,7 @@ public class HailiangSpecialDeviceDriver extends AbstractOpcDeviceDriver impleme
|
|||||||
produceshiftorderService.updateByOrderCode(dto);
|
produceshiftorderService.updateByOrderCode(dto);
|
||||||
this.writing("to_confirm_finished","1");
|
this.writing("to_confirm_finished","1");
|
||||||
this.writing("to_clear","1");
|
this.writing("to_clear","1");
|
||||||
|
this.writing("to_order", "0");
|
||||||
this.writing("to_pause","1");
|
this.writing("to_pause","1");
|
||||||
} else {
|
} else {
|
||||||
logServer.deviceLogToacs(this.device_code,"","",device_code+":,order_finish>"+ finish +",last_finish>"+last_finish);
|
logServer.deviceLogToacs(this.device_code,"","",device_code+":,order_finish>"+ finish +",last_finish>"+last_finish);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.acs.ext.wms.service.impl;
|
package org.nl.acs.ext.wms.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import cn.hutool.http.HttpRequest;
|
import cn.hutool.http.HttpRequest;
|
||||||
import cn.hutool.http.HttpResponse;
|
import cn.hutool.http.HttpResponse;
|
||||||
@@ -15,6 +16,8 @@ import org.nl.acs.device.address.service.dto.AddressDto;
|
|||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
import org.nl.acs.ext.wms.service.AcsToWmsService;
|
||||||
import org.nl.acs.log.service.LogServer;
|
import org.nl.acs.log.service.LogServer;
|
||||||
|
import org.nl.acs.order.service.ProduceshiftorderService;
|
||||||
|
import org.nl.acs.order.service.dto.ProduceshiftorderDto;
|
||||||
import org.nl.acs.task.service.TaskService;
|
import org.nl.acs.task.service.TaskService;
|
||||||
import org.nl.acs.task.service.dto.TaskDto;
|
import org.nl.acs.task.service.dto.TaskDto;
|
||||||
import org.nl.exception.BadRequestException;
|
import org.nl.exception.BadRequestException;
|
||||||
@@ -31,6 +34,8 @@ import java.util.Map;
|
|||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
@Slf4j
|
@Slf4j
|
||||||
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||||
|
@Autowired
|
||||||
|
ProduceshiftorderService produceshiftorderService;
|
||||||
@Autowired
|
@Autowired
|
||||||
AcsConfigService acsConfigService;
|
AcsConfigService acsConfigService;
|
||||||
|
|
||||||
@@ -579,31 +584,38 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
@Override
|
@Override
|
||||||
public HttpResponse feedOrderRealQty(JSONObject param) {
|
public HttpResponse feedOrderRealQty(JSONObject param) {
|
||||||
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS).toString(), "1")) {
|
if (StrUtil.equals(acsConfigService.findConfigFromCache().get(AcsConfig.HASWMS).toString(), "1")) {
|
||||||
String wmsUrl = acsConfigService.findConfigFromCache().get(AcsConfig.WMSURL);
|
String order_code = param.getString("order");
|
||||||
// TODO 还没向地址表中添加 feedDeviceStatusType
|
ProduceshiftorderDto produceshiftorderDto = produceshiftorderService.findByCode(order_code);
|
||||||
AddressDto addressDto = addressService.findByCode("feedOrderRealQty");
|
if (ObjectUtil.isEmpty(produceshiftorderDto)){
|
||||||
String methods_url = addressDto.getMethods_url();
|
return null;
|
||||||
String url = wmsUrl + methods_url;
|
}
|
||||||
HttpResponse result = null;
|
if (!produceshiftorderDto.getOrder_status().equals("2") || !produceshiftorderDto.getOrder_status().equals("3")){
|
||||||
log.info("feedOrderRealQty----请求参数{}", param);
|
String wmsUrl = acsConfigService.findConfigFromCache().get(AcsConfig.WMSURL);
|
||||||
try {
|
// TODO 还没向地址表中添加 feedDeviceStatusType
|
||||||
result = HttpRequest.post(url)
|
AddressDto addressDto = addressService.findByCode("feedOrderRealQty");
|
||||||
.body(String.valueOf(param))
|
String methods_url = addressDto.getMethods_url();
|
||||||
.execute();
|
String url = wmsUrl + methods_url;
|
||||||
String type = "";
|
HttpResponse result = null;
|
||||||
if (result.getStatus() == 200) {
|
log.info("feedOrderRealQty----请求参数{}", param);
|
||||||
type = "info";
|
try {
|
||||||
} else {
|
result = HttpRequest.post(url)
|
||||||
type = "error";
|
.body(String.valueOf(param))
|
||||||
}
|
.execute();
|
||||||
logServer.log("", "feedOrderRealQty", type, param.toString(), result.body(), String.valueOf(result.getStatus()), url, "");
|
String type = "";
|
||||||
log.info("feedOrderRealQty----返回参数{}", result);
|
if (result.getStatus() == 200) {
|
||||||
} catch (Exception e) {
|
type = "info";
|
||||||
String msg = e.getMessage();
|
} else {
|
||||||
//网络不通
|
type = "error";
|
||||||
System.out.println(msg);
|
}
|
||||||
|
logServer.log("", "feedOrderRealQty", type, param.toString(), result.body(), String.valueOf(result.getStatus()), url, "");
|
||||||
|
log.info("feedOrderRealQty----返回参数{}", result);
|
||||||
|
} catch (Exception e) {
|
||||||
|
String msg = e.getMessage();
|
||||||
|
//网络不通
|
||||||
|
System.out.println(msg);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import cn.hutool.core.util.ObjectUtil;
|
|||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.nl.acs.device.service.DeviceExtraService;
|
import org.nl.acs.device.service.DeviceExtraService;
|
||||||
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_cleaning_machine_storage_station.HailiangCleaningMachineStorageStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_machine.HailiangEngravingMachineDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_engraving_machine.HailiangEngravingMachineDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_packer_station.HailiangPackerStationDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_packer_station.HailiangPackerStationDeviceDriver;
|
||||||
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
|
import org.nl.acs.device_driver.basedriver.hailiang_one.hailiang_smart_plc_test.HailiangSmartplcTestDeviceDriver;
|
||||||
@@ -49,7 +50,7 @@ import lombok.extern.slf4j.Slf4j;
|
|||||||
@Slf4j
|
@Slf4j
|
||||||
public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, ApplicationAutoInitial {
|
public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, ApplicationAutoInitial {
|
||||||
|
|
||||||
private final org.nl.acs.opc.DeviceAppService DeviceAppService;
|
private final org.nl.acs.opc.DeviceAppService deviceAppService;
|
||||||
private final DeviceExtraService deviceExtraService;
|
private final DeviceExtraService deviceExtraService;
|
||||||
|
|
||||||
List<ProduceshiftorderDto> order = new ArrayList();
|
List<ProduceshiftorderDto> order = new ArrayList();
|
||||||
@@ -110,7 +111,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public void create(ProduceshiftorderDto dto) {
|
public void create(ProduceshiftorderDto dto) {
|
||||||
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
|
||||||
Device device = DeviceAppService.findDeviceByCode(dto.getDevice_code());
|
Device device = deviceAppService.findDeviceByCode(dto.getDevice_code());
|
||||||
if (ObjectUtil.isEmpty(device)) {
|
if (ObjectUtil.isEmpty(device)) {
|
||||||
throw new BadRequestException("未找到对应设备:" + dto.getDevice_code());
|
throw new BadRequestException("未找到对应设备:" + dto.getDevice_code());
|
||||||
}
|
}
|
||||||
@@ -228,6 +229,23 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
if (StrUtil.equals(dto.getOrder_status(), "0") || StrUtil.equals(dto.getOrder_status(), "1")) {
|
if (StrUtil.equals(dto.getOrder_status(), "0") || StrUtil.equals(dto.getOrder_status(), "1")) {
|
||||||
order.add(dto);
|
order.add(dto);
|
||||||
}
|
}
|
||||||
|
if (StrUtil.equals(dto.getOrder_status(), "3")){
|
||||||
|
String device_code = dto.getDevice_code();
|
||||||
|
Device device = deviceAppService.findDeviceByCode(device_code);
|
||||||
|
HailiangEngravingMachineDeviceDriver hailiangEngravingMachineDeviceDriver;
|
||||||
|
HailiangPackerStationDeviceDriver hailiangPackerStationDeviceDriver;
|
||||||
|
HailiangSpecialDeviceDriver hailiangSpecialDeviceDriver;
|
||||||
|
if (device.getDeviceDriver() instanceof HailiangSpecialDeviceDriver){
|
||||||
|
hailiangSpecialDeviceDriver = (HailiangSpecialDeviceDriver) device.getDeviceDriver();
|
||||||
|
hailiangSpecialDeviceDriver.writing("to_order","0");
|
||||||
|
} else if (device.getDeviceDriver() instanceof HailiangPackerStationDeviceDriver){
|
||||||
|
hailiangPackerStationDeviceDriver = (HailiangPackerStationDeviceDriver) device.getDeviceDriver();
|
||||||
|
hailiangPackerStationDeviceDriver.writing("to_order","0");
|
||||||
|
} else if (device.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver){
|
||||||
|
hailiangEngravingMachineDeviceDriver = (HailiangEngravingMachineDeviceDriver) device.getDeviceDriver();
|
||||||
|
hailiangEngravingMachineDeviceDriver.writing("to_order","0");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -308,21 +326,24 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
|
|||||||
param.put("type", "2");
|
param.put("type", "2");
|
||||||
acsToWmsService.feedbackOrderStatus(param);
|
acsToWmsService.feedbackOrderStatus(param);
|
||||||
}
|
}
|
||||||
Device device = DeviceAppService.findDeviceByCode(param.getString("device_code"));
|
Device device = deviceAppService.findDeviceByCode(param.getString("device_code"));
|
||||||
HailiangSpecialDeviceDriver hailiangSpecialDeviceDriver;
|
HailiangSpecialDeviceDriver hailiangSpecialDeviceDriver;
|
||||||
HailiangPackerStationDeviceDriver hailiangPackerStationDeviceDriver;
|
HailiangPackerStationDeviceDriver hailiangPackerStationDeviceDriver;
|
||||||
HailiangEngravingMachineDeviceDriver hailiangEngravingMachineDeviceDriver;
|
HailiangEngravingMachineDeviceDriver hailiangEngravingMachineDeviceDriver;
|
||||||
if (device.getDeviceDriver() instanceof HailiangSpecialDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HailiangSpecialDeviceDriver) {
|
||||||
hailiangSpecialDeviceDriver = (HailiangSpecialDeviceDriver) device.getDeviceDriver();
|
hailiangSpecialDeviceDriver = (HailiangSpecialDeviceDriver) device.getDeviceDriver();
|
||||||
hailiangSpecialDeviceDriver.writing("to_order_compel_finished", "1");
|
hailiangSpecialDeviceDriver.writing("to_order_compel_finished", "1");
|
||||||
|
hailiangSpecialDeviceDriver.writing("to_order", "0");
|
||||||
}
|
}
|
||||||
if (device.getDeviceDriver() instanceof HailiangPackerStationDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HailiangPackerStationDeviceDriver) {
|
||||||
hailiangPackerStationDeviceDriver = (HailiangPackerStationDeviceDriver) device.getDeviceDriver();
|
hailiangPackerStationDeviceDriver = (HailiangPackerStationDeviceDriver) device.getDeviceDriver();
|
||||||
hailiangPackerStationDeviceDriver.writing("to_order_compel_finished", "1");
|
hailiangPackerStationDeviceDriver.writing("to_order_compel_finished", "1");
|
||||||
|
hailiangPackerStationDeviceDriver.writing("to_order", "0");
|
||||||
}
|
}
|
||||||
if (device.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver) {
|
if (device.getDeviceDriver() instanceof HailiangEngravingMachineDeviceDriver) {
|
||||||
hailiangEngravingMachineDeviceDriver = (HailiangEngravingMachineDeviceDriver) device.getDeviceDriver();
|
hailiangEngravingMachineDeviceDriver = (HailiangEngravingMachineDeviceDriver) device.getDeviceDriver();
|
||||||
hailiangEngravingMachineDeviceDriver.writing("to_order_compel_finished", "1");
|
hailiangEngravingMachineDeviceDriver.writing("to_order_compel_finished", "1");
|
||||||
|
hailiangEngravingMachineDeviceDriver.writing("to_order", "0");
|
||||||
}
|
}
|
||||||
JSONObject map = new JSONObject();
|
JSONObject map = new JSONObject();
|
||||||
map.put("order_id", order_id);
|
map.put("order_id", order_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user