fix 入窑流程和大屏数据
This commit is contained in:
@@ -273,16 +273,14 @@ public class LnshOutKilnTrussDeviceDriver extends AbstractOpcDeviceDriver implem
|
||||
if (result.getStatus() == HttpStatus.OK.value()) {
|
||||
JSONObject jsonObject = JSONObject.parseObject(result.body());
|
||||
if (ObjectUtil.isNotEmpty(jsonObject) && "200".equals(jsonObject.getString("status"))) {
|
||||
Boolean isPackage = jsonObject.getBoolean("data");
|
||||
if (isPackage == null) {
|
||||
this.writing(24);
|
||||
} else {
|
||||
// this.writing(isPackage ? 22 : 23);
|
||||
//全部都是优先出窑
|
||||
this.writing(22);
|
||||
}
|
||||
this.writing(22);
|
||||
this.setRequireSucess(true);
|
||||
}
|
||||
}else{
|
||||
this.writing(24);
|
||||
this.setRequireSucess(true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
||||
@@ -214,6 +214,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_putStation, "当前工位", "DB1.D4"));
|
||||
list.add(new ItemDto(item_material, "物料", "DB1.STRING8.50"));
|
||||
list.add(new ItemDto(item_qty, "拆/码垛数量", "DB1.D60"));
|
||||
//砖块重量
|
||||
list.add(new ItemDto(item_order_qty, "工单总数量", "DB1.D64"));
|
||||
list.add(new ItemDto(item_open_time, "开机时间", "DB1.STRING68.50"));
|
||||
list.add(new ItemDto(item_standby_time, "待机时间", "DB1.D120"));
|
||||
@@ -235,6 +236,7 @@ public class ItemProtocol {
|
||||
list.add(new ItemDto(item_to_error, "故障代码", "DB2.W2"));
|
||||
list.add(new ItemDto(item_to_material, "物料", "DB2.STRING4.50"));
|
||||
list.add(new ItemDto(item_to_order_No, "工单号", "DB2.STRING56.50"));
|
||||
//下发重量
|
||||
list.add(new ItemDto(item_to_order_qty, "工单数量", "DB2.D108"));
|
||||
list.add(new ItemDto(item_to_product_code, "产品编号", "DB2.W112"));
|
||||
list.add(new ItemDto(item_to_AlongSide, "A长边", "DB2.W114"));
|
||||
|
||||
@@ -262,6 +262,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
|
||||
JSONObject json = orders.getJSONObject(i);
|
||||
String producetask_code = json.getString("workorder_code");
|
||||
//分拣单重
|
||||
String to_order_qty2 = json.getString("dz");
|
||||
float floatValue = Float.parseFloat(to_order_qty2);
|
||||
Float to_order_qty1=floatValue*1000;
|
||||
String to_order_qty=to_order_qty1.toString();
|
||||
String device_code = json.getString("device_code");
|
||||
String material_code = json.getString("material_number");
|
||||
String qty = json.getString("plan_qty");
|
||||
@@ -339,7 +344,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("to_order_No", producetask_code);
|
||||
map.put("to_order_qty", qty);
|
||||
map.put("to_order_qty", to_order_qty);
|
||||
map.put("to_material", material_code);
|
||||
map.put("to_product_code", product_code);
|
||||
map.put("to_AlongSide", AlongSide);
|
||||
@@ -498,7 +503,7 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
status.put("weight", driver.getWeight());
|
||||
status.put("material", driver.getMaterial());
|
||||
status.put("barcode", driver.getBarcode());
|
||||
status.put("qty", driver.getEncoder_qty()-1);
|
||||
status.put("qty", driver.getEncoder_qty());
|
||||
if(driver.getAlongSide()!=0) {
|
||||
Integer dz=driver.getAlongSide();
|
||||
double weight=dz/1000.00;
|
||||
@@ -549,7 +554,11 @@ public class WmsToAcsServiceImpl implements WmsToAcsService {
|
||||
status.put("putStation", driver.getPut_station());
|
||||
status.put("material", driver.getMaterial());
|
||||
status.put("qty", driver.getQty());
|
||||
status.put("order_qty", driver.getOrder_qty());
|
||||
//单重
|
||||
Float dz= new Float(driver.getOrder_qty()/1000);
|
||||
//总重
|
||||
Float weight=dz*driver.getQty();
|
||||
status.put("weight", weight);
|
||||
status.put("open_time", driver.getOpen_time());
|
||||
status.put("standby_time", driver.getStandby_time());
|
||||
status.put("production_time", driver.getProduction_time());
|
||||
|
||||
Reference in New Issue
Block a user