Browse Source

更新日志

master
汪菘 3 years ago
parent
commit
c46a895c46
  1. 26
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_coating/HaiLiangCoatingDeviceDriver.java
  2. 33
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java
  3. 39
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java
  4. 62
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java
  5. 27
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_lettering/HaiLiangLetteringDeviceDriver.java
  6. 27
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_risking/HaiLiangRiskingDeviceDriver.java
  7. 25
      nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java
  8. 2
      nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderdetailService.java
  9. 30
      nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java
  10. 2
      nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java
  11. 12
      qd/src/views/acs/order/AddDialog.vue
  12. 12
      qd/src/views/acs/order/index.vue
  13. 6
      qd/src/views/acs/order/sorting/index.vue

26
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_coating/HaiLiangCoatingDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_coating; package org.nl.acs.device_driver.hailiang.hailiang_coating;
import cn.hutool.core.date.DateUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -83,6 +84,7 @@ public class HaiLiangCoatingDeviceDriver extends AbstractOpcDeviceDriver impleme
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (move != last_move) { if (move != last_move) {
@ -133,14 +135,29 @@ public class HaiLiangCoatingDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 4: case 4:
//裹膜完成 //裹膜完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess){
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
}
} }
break; break;
case 5: case 5:
//强制裹膜完成 //强制裹膜完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess){
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
}
} }
break; break;
} }
@ -163,9 +180,12 @@ public class HaiLiangCoatingDeviceDriver extends AbstractOpcDeviceDriver impleme
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
dto.setWraping_finished(status); dto.setWraping_finished(status);
dto.setWraping_finish_time(date.toString()); String now = DateUtil.now();
dto.setWraping_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true;
this.setRequireSucess(true);
return true; return true;
} }
} }

33
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding/HaiLiangFeedingDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_feeding; package org.nl.acs.device_driver.hailiang.hailiang_feeding;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
@ -90,6 +91,7 @@ public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver impleme
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (error != last_error) { if (error != last_error) {
@ -148,15 +150,31 @@ public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 4: case 4:
//上料完成 //上料完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess) {
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
}
} }
break; break;
case 5: case 5:
//强制上料完成 //强制上料完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess) {
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
} }
}
break; break;
} }
} }
@ -181,12 +199,13 @@ public class HaiLiangFeedingDeviceDriver extends AbstractOpcDeviceDriver impleme
} else { } else {
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
if(!StrUtil.equals(dto.getOrder_detail_qty(),String.valueOf(detail_qualified_qty)) ){ // if(!StrUtil.equals(dto.getOrder_detail_qty(),String.valueOf(detail_qualified_qty)) ){
logServer.deviceLogToacs(this.device_code,"","","工单明细上料完成,上料合格数量与订单数量不一致"); // logServer.deviceLogToacs(this.device_code,"","","工单明细上料完成,上料合格数量与订单数量不一致");
throw new BadRequestException("工单明细上料完成,上料合格数量与订单数量不一致!"); // throw new BadRequestException("工单明细上料完成,上料合格数量与订单数量不一致!");
} // }
dto.setFeeding_finished(status); dto.setFeeding_finished(status);
dto.setFeeding_finish_time(date.toString()); String now = DateUtil.now();
dto.setFeeding_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true; requireSucess = true;

39
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_feeding_trunk/HaiLiangFeedingTrunkDeviceDriver.java

@ -391,16 +391,27 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
break; break;
case 3: case 3:
//申请工单 //申请工单
if(!requireSucess && ready == 1 && order ==0 && order_detail ==0 ){ if(!requireSucess) {
logServer.deviceLogToacs(this.device_code,"","","开始申请工单"); if( ready == 1 && order ==0 && order_detail ==0 ){
logServer.deviceLogToacs(this.device_code,"","",device_code+":开始申请工单,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:"
+order_detail);
apply_order(); apply_order();
} else {
logServer.deviceLogToacs(this.device_code,"","",device_code+":开始申请工单失败,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:"
+order_detail);
}
} }
break; break;
case 4: case 4:
//申请工单明细 //申请工单明细
if(!requireSucess && ready == 1 && order != 0 ) { if(!requireSucess) {
logServer.deviceLogToacs(this.device_code,"","","开始申请工单明细"); if( ready == 1 && order != 0 ) {
logServer.deviceLogToacs(this.device_code,"","",device_code+":开始申请工单明细,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",ready:"+ready);
apply_orderDetail(order); apply_orderDetail(order);
} else {
logServer.deviceLogToacs(this.device_code,"","",device_code+":开始申请工单明细失败,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",ready:"+ready);
}
} }
break; break;
} }
@ -505,14 +516,14 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
this.detail_time= date; this.detail_time= date;
ProduceshiftorderDto dto = produceshiftorderService.findOrderByOrderCodeFromCache(String.valueOf(order)); ProduceshiftorderDto dto = produceshiftorderService.findOrderByOrderCodeFromCache(String.valueOf(order));
if(ObjectUtil.isEmpty(dto)){ if(ObjectUtil.isEmpty(dto)){
logServer.deviceLogToacs(this.device_code,"","","修改工单状态失败,order:"+order); logServer.deviceLogToacs(this.device_code,"","","update_order_status 修改工单状态失败,order:"+order);
return false; return false;
} }
//02是已下发 //02是已下发
if(!StrUtil.equals(dto.getOrder_status(),status) && StrUtil.equals(dto.getOrder_status(),"02") ){ if(!StrUtil.equals(dto.getOrder_status(),status) && StrUtil.equals(dto.getOrder_status(),"02") ){
dto.setOrder_status("03"); dto.setOrder_status("03");
produceshiftorderService.autoupdate(dto); produceshiftorderService.autoupdate(dto);
logServer.deviceLogToacs(this.device_code,"","","修改工单状态成功,order:"+order); logServer.deviceLogToacs(this.device_code,"","","update_order_status 修改工单状态成功,order:"+order);
} }
return true; return true;
} }
@ -522,7 +533,7 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
public boolean apply_order() throws Exception { public boolean apply_order() throws Exception {
ProduceshiftorderDto dto = produceshiftorderService.apply_order(); ProduceshiftorderDto dto = produceshiftorderService.apply_order();
if(ObjectUtil.isEmpty(dto)){ if(ObjectUtil.isEmpty(dto)){
logServer.deviceLogToacs(this.device_code,"","","未找到"); logServer.deviceLogToacs(this.device_code,"","","apply_order 未找到可下发工单!");
throw new BadRequestException("未找到可下发工单!"); throw new BadRequestException("未找到可下发工单!");
} }
String order = dto.getOrder_code(); String order = dto.getOrder_code();
@ -566,12 +577,19 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
public boolean apply_orderDetail(int order) throws Exception { public boolean apply_orderDetail(int order) throws Exception {
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.apply_orderDetail(String.valueOf(order)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.apply_orderDetail(String.valueOf(order));
if(ObjectUtil.isEmpty(dto)){ if(ObjectUtil.isEmpty(dto)){
logServer.deviceLogToacs(this.device_code,"","","apply_orderDetail 未找到可下发工单明细!");
throw new BadRequestException("未找到可下发工单明细!"); throw new BadRequestException("未找到可下发工单明细!");
} }
String orderDetail = dto.getOrder_detail_code(); String orderDetail = dto.getOrder_detail_code();
//上料数量
String feeding_qty = dto.getFeeding_qty(); String feeding_qty = dto.getFeeding_qty();
//捆扎包数
String strap_pack_number = dto.getStrap_pack_number(); String strap_pack_number = dto.getStrap_pack_number();
//每捆数量
String strap_number = dto.getStrap_number(); String strap_number = dto.getStrap_number();
//尾料数量
String strap_tailint_number = dto.getStrap_tailint_number();
//贴标信息
String str = dto.getLabeling_message(); String str = dto.getLabeling_message();
//判断是否最后一个客户 //判断是否最后一个客户
boolean last_detail = produceshiftorderdetailService.isLastOrderDetail(String.valueOf(order)); boolean last_detail = produceshiftorderdetailService.isLastOrderDetail(String.valueOf(order));
@ -594,12 +612,17 @@ public class HaiLiangFeedingTrunkDeviceDriver extends AbstractOpcDeviceDriver im
writing(ItemProtocol.item_to_one_strapping_qty,strap_number); writing(ItemProtocol.item_to_one_strapping_qty,strap_number);
writing(ItemProtocol.item_to_coating_qty,strap_pack_number); writing(ItemProtocol.item_to_coating_qty,strap_pack_number);
writing(ItemProtocol.item_to_labeling_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_command,String.valueOf(mode)); writing(ItemProtocol.item_to_command,String.valueOf(mode));
dto.setOrder_detail_status("02");
dto.setOrder_detail_status("01");
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
send_letter_flag = false; send_letter_flag = false;
send_letter_flag_back = false; send_letter_flag_back = false;
requireSucess = true; requireSucess = true;
} else {
logServer.deviceLogToacs(this.device_code,"","","申请工单明细等待,order:"+order+",orderdetail:"+orderDetail);
} }
return true; return true;

62
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_labeling/HaiLiangLabelingDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_labeling; 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.ObjectUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import lombok.Data; import lombok.Data;
@ -90,6 +91,7 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (move != last_move) { if (move != last_move) {
@ -140,32 +142,71 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem
break; break;
case 3: case 3:
//申请贴标 //申请贴标
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess){
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
apply_labeling_message(String.valueOf(order),String.valueOf(order_detail),String.valueOf(detail_qty)); 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);
}
} }
break; break;
case 5: case 5:
//贴标完成 //贴标完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess){
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
} }
}
break; break;
case 6: case 6:
//强制贴标完成 //强制贴标完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess){
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
}
} }
break; break;
//工单完成 //工单完成
case 7: case 7:
if(!requireSucess && order > 0 && order_detail > 0 ) { if(!requireSucess){
if(order > 0 && order_detail > 0 ) {
logServer.deviceLogToacs(this.device_code,"","",device_code+":申请工单完成,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:"
+order_detail);
finish_order(String.valueOf(order),String.valueOf(order_detail),"01"); finish_order(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);
} }
}
break; break;
//工单强制完成 //工单强制完成
case 8: case 8:
if(!requireSucess && order > 0 && order_detail > 0 ) { if(!requireSucess) {
if(order > 0 && order_detail > 0 ) {
logServer.deviceLogToacs(this.device_code,"","",device_code+":申请工单强制完成,mode:"+mode+",requireSucess:" + requireSucess + ",order:" + order +",order_detail:"
+order_detail);
finish_order(String.valueOf(order),String.valueOf(order_detail),"02"); finish_order(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);
}
} }
break; break;
} }
@ -188,12 +229,13 @@ public class HaiLiangLabelingDeviceDriver extends AbstractOpcDeviceDriver implem
} else { } else {
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
if(!StrUtil.equals(dto.getWraping_number(),String.valueOf(detail_qualified_qty)) ){ // if(!StrUtil.equals(dto.getWraping_number(),String.valueOf(detail_qualified_qty)) ){
logServer.deviceLogToacs(this.device_code,"","","工单明细贴标完成,贴标合格数量与订单数量不一致"); // logServer.deviceLogToacs(this.device_code,"","","工单明细贴标完成,贴标合格数量与订单数量不一致");
throw new BadRequestException("工单明细贴标完成,贴标合格数量与订单数量不一致!"); // throw new BadRequestException("工单明细贴标完成,贴标合格数量与订单数量不一致!");
} // }
dto.setLabeling_finished(status); dto.setLabeling_finished(status);
dto.setLabeling_finish_time(date.toString()); String now = DateUtil.now();
dto.setLabeling_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true; requireSucess = true;

27
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_lettering/HaiLiangLetteringDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_lettering; package org.nl.acs.device_driver.hailiang.hailiang_lettering;
import cn.hutool.core.date.DateUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -82,6 +83,7 @@ public class HaiLiangLetteringDeviceDriver extends AbstractOpcDeviceDriver imple
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (move != last_move) { if (move != last_move) {
@ -134,14 +136,29 @@ public class HaiLiangLetteringDeviceDriver extends AbstractOpcDeviceDriver imple
case 4: case 4:
//刻字完成 //刻字完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess) {
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
}
} }
break; break;
case 5: case 5:
//强制刻字完成 //强制刻字完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess) {
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
}
} }
break; break;
} }
@ -164,10 +181,12 @@ public class HaiLiangLetteringDeviceDriver extends AbstractOpcDeviceDriver imple
} else { } else {
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
dto.setLabeling_finished(status); dto.setLettering_finished(status);
dto.setLabeling_finish_time(date.toString()); String now = DateUtil.now();
dto.setLabeling_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true;
return true; return true;
} }
} }

27
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_risking/HaiLiangRiskingDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_risking; package org.nl.acs.device_driver.hailiang.hailiang_risking;
import cn.hutool.core.date.DateUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -83,6 +84,7 @@ public class HaiLiangRiskingDeviceDriver extends AbstractOpcDeviceDriver impleme
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (move != last_move) { if (move != last_move) {
@ -133,14 +135,29 @@ public class HaiLiangRiskingDeviceDriver extends AbstractOpcDeviceDriver impleme
break; break;
case 4: case 4:
//套冒完成 //套冒完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess) {
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
}
} }
break; break;
case 5: case 5:
//强制上料完成 //强制套冒完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess) {
if( order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
}
} }
break; break;
} }
@ -164,9 +181,11 @@ public class HaiLiangRiskingDeviceDriver extends AbstractOpcDeviceDriver impleme
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
dto.setSleeveing_finished(status); dto.setSleeveing_finished(status);
dto.setSleeveing_finish_time(date.toString()); String now = DateUtil.now();
dto.setSleeveing_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true;
return true; return true;
} }
} }

25
nladmin-system/src/main/java/org/nl/acs/device_driver/hailiang/hailiang_strapping/HaiLiangStrappingDeviceDriver.java

@ -1,5 +1,6 @@
package org.nl.acs.device_driver.hailiang.hailiang_strapping; package org.nl.acs.device_driver.hailiang.hailiang_strapping;
import cn.hutool.core.date.DateUtil;
import lombok.Data; import lombok.Data;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@ -88,6 +89,7 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple
if (mode != last_mode) { if (mode != last_mode) {
logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode)); logServer.deviceLog(this.device_code,"mode" ,String.valueOf(mode));
logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode); logServer.deviceLogToacs(this.device_code,"","","信号mode:" + last_mode + "->" + mode);
logServer.deviceLogToacs(this.device_code,"","","工作模式切换,刷新请求标记:"+this.requireSucess);
this.setRequireSucess(false); this.setRequireSucess(false);
} }
if (move != last_move) { if (move != last_move) {
@ -146,14 +148,29 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple
break; break;
case 4: case 4:
//捆扎完成 //捆扎完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0){ if(!requireSucess) {
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"01"); 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);
}
} }
break; break;
case 5: case 5:
//强制捆扎完成 //强制捆扎完成
if(!requireSucess && order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_qty>0 ) { if(!requireSucess) {
if(order > 0 && order_detail > 0 && detail_qty>0 && detail_qualified_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);
update_detail(String.valueOf(order),String.valueOf(order_detail),"02"); 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);
}
} }
break; break;
} }
@ -178,9 +195,11 @@ public class HaiLiangStrappingDeviceDriver extends AbstractOpcDeviceDriver imple
this.detail_time = date; this.detail_time = date;
ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail)); ProduceshiftorderdetailDto dto = produceshiftorderdetailService.findOrderDetailFromCache(String.valueOf(order), String.valueOf(order_detail));
dto.setStrap_finished(status); dto.setStrap_finished(status);
dto.setStrap_finish_time(date.toString()); String now = DateUtil.now();
dto.setStrap_finish_time(now);
produceshiftorderdetailService.update(dto); produceshiftorderdetailService.update(dto);
writing(itemProtocol.item_to_command,String.valueOf(mode)); writing(itemProtocol.item_to_command,String.valueOf(mode));
requireSucess = true;
return true; return true;
} }
} }

2
nladmin-system/src/main/java/org/nl/acs/order/service/ProduceshiftorderdetailService.java

@ -86,4 +86,6 @@ public interface ProduceshiftorderdetailService {
Boolean isLastOrderDetail(String order); Boolean isLastOrderDetail(String order);
void reload();
} }

30
nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderServiceImpl.java

@ -64,6 +64,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
public synchronized void reload() { public synchronized void reload() {
this.order = this.queryAllOrder("(order_status !='07' and order_status !='08' and order_status !='09') and is_deleted =0"); this.order = this.queryAllOrder("(order_status !='07' and order_status !='08' and order_status !='09') and is_deleted =0");
produceshiftorderdetailService.reload();
} }
@Override @Override
@ -258,6 +259,8 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
String strap_number = detaildto.getStrap_number(); String strap_number = detaildto.getStrap_number();
//尾料数量 //尾料数量
String strap_tailint_number = String.valueOf(Integer.parseInt(detail_qty)%Integer.parseInt(strap_number)); String strap_tailint_number = String.valueOf(Integer.parseInt(detail_qty)%Integer.parseInt(strap_number));
//捆扎包数
Double pack =Math.ceil((double)Integer.parseInt(detail_qty)/Integer.parseInt(strap_number));
detaildto.setOrder_id(order_id); detaildto.setOrder_id(order_id);
detaildto.setOrder_code(order_code); detaildto.setOrder_code(order_code);
detaildto.setOrder_detail_status("00"); detaildto.setOrder_detail_status("00");
@ -278,6 +281,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
detaildto.setLettering_message2(lettering_message2); detaildto.setLettering_message2(lettering_message2);
detaildto.setLabeling_template(labeling_template); detaildto.setLabeling_template(labeling_template);
detaildto.setStrap_number(strap_number); detaildto.setStrap_number(strap_number);
detaildto.setStrap_pack_number(String.valueOf(pack.intValue()));
detaildto.setStrap_tailint_number(strap_tailint_number); detaildto.setStrap_tailint_number(strap_tailint_number);
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorderdetail"); WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorderdetail");
JSONObject json = (JSONObject) JSONObject.toJSON(detaildto); JSONObject json = (JSONObject) JSONObject.toJSON(detaildto);
@ -292,9 +296,6 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
public void update(ProduceshiftorderDto dto) { public void update(ProduceshiftorderDto dto) {
ProduceshiftorderDto entity = this.findById(dto.getOrder_id()); ProduceshiftorderDto entity = this.findById(dto.getOrder_id());
if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!"); if (entity == null) throw new BadRequestException("被删除或无权限,操作失败!");
if(!StrUtil.equals(entity.getOrder_status(),"00")){
throw new BadRequestException("单据状态非就绪,修改失败!");
}
String currentUsername = SecurityUtils.getCurrentUsername(); String currentUsername = SecurityUtils.getCurrentUsername();
String now = DateUtil.now(); String now = DateUtil.now();
dto.setUpdate_time(now); dto.setUpdate_time(now);
@ -311,7 +312,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
iterator.remove(); iterator.remove();
} }
} }
if (!StrUtil.equals(dto.getOrder_id(), "07") || !StrUtil.equals(dto.getOrder_id(), "08")) { if (!StrUtil.equals(dto.getOrder_id(), "07") && !StrUtil.equals(dto.getOrder_id(), "08") && !StrUtil.equals(dto.getOrder_id(), "09")) {
order.add(dto); order.add(dto);
} }
} }
@ -492,6 +493,17 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
entity.setOrder_status("01"); entity.setOrder_status("01");
JSONObject json= (JSONObject) JSONObject.toJSON(entity); JSONObject json= (JSONObject) JSONObject.toJSON(entity);
wo.update(json); wo.update(json);
Iterator<ProduceshiftorderDto> iterator = order.iterator();
while (iterator.hasNext()) {
ProduceshiftorderDto produceshiftorderDto = iterator.next();
if (produceshiftorderDto.getOrder_id().equals(entity.getOrder_id())) {
iterator.remove();
}
}
if (!StrUtil.equals(entity.getOrder_id(), "07") && !StrUtil.equals(entity.getOrder_id(), "08") && !StrUtil.equals(entity.getOrder_id(), "09")) {
order.add(entity);
}
} }
@Override @Override
@ -716,11 +728,11 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
} }
@Override @Override
public ProduceshiftorderDto findOrderByOrderCodeFromCache(String order_id) { public ProduceshiftorderDto findOrderByOrderCodeFromCache(String order_code) {
Iterator var3 = order.iterator(); Iterator var3 = order.iterator();
while (var3.hasNext()) { while (var3.hasNext()) {
ProduceshiftorderDto oneorder = (ProduceshiftorderDto) var3.next(); ProduceshiftorderDto oneorder = (ProduceshiftorderDto) var3.next();
if (StrUtil.equals(oneorder.getOrder_id(), order_id)) { if (StrUtil.equals(oneorder.getOrder_code(), order_code)) {
return oneorder; return oneorder;
} }
} }
@ -728,11 +740,11 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
} }
@Override @Override
public ProduceshiftorderDto findOrderByOrderIdFromCache(String order_code) { public ProduceshiftorderDto findOrderByOrderIdFromCache(String order_id) {
Iterator var3 = order.iterator(); Iterator var3 = order.iterator();
while (var3.hasNext()) { while (var3.hasNext()) {
ProduceshiftorderDto oneorder = (ProduceshiftorderDto) var3.next(); ProduceshiftorderDto oneorder = (ProduceshiftorderDto) var3.next();
if (StrUtil.equals(oneorder.getOrder_code(), order_code)) { if (StrUtil.equals(oneorder.getOrder_id(), order_id)) {
return oneorder; return oneorder;
} }
} }
@ -770,7 +782,7 @@ public class ProduceshiftorderServiceImpl implements ProduceshiftorderService, A
@Override @Override
public Map<String, Object> querySorting(Map whereJson, Pageable page) { public Map<String, Object> querySorting(Map whereJson, Pageable page) {
WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder"); WQLObject wo = WQLObject.getWQLObject("acs_produceshiftorder");
String where = "1=1 and (order_status !='00' and order_status !='07' and order_status !='08' ) and is_deleted= '0'"; String where = "1=1 and (order_status !='00' and order_status !='07' and order_status !='08' and order_status !='09' ) and is_deleted= '0'";
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "order_id desc"); ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), where, "order_id desc");
final JSONObject json = rb.pageResult(); final JSONObject json = rb.pageResult();
JSONArray newja = new JSONArray(); JSONArray newja = new JSONArray();

2
nladmin-system/src/main/java/org/nl/acs/order/service/impl/ProduceshiftorderdetailServiceImpl.java

@ -280,7 +280,7 @@ public class ProduceshiftorderdetailServiceImpl implements Produceshiftorderdeta
public ProduceshiftorderdetailDto apply_orderDetail(String order) { public ProduceshiftorderdetailDto apply_orderDetail(String order) {
ProduceshiftorderdetailDto order_detail = this.findOrderDetailByOrderFromCache(order,"00"); ProduceshiftorderdetailDto order_detail = this.findOrderDetailByOrderFromCache(order,"00");
if(ObjectUtil.isEmpty(order_detail)){ if(ObjectUtil.isEmpty(order_detail)){
throw new BadRequestException("未找到处于就绪状态的工单明细!"); return null;
} }
return order_detail; return order_detail;
} }

12
qd/src/views/acs/order/AddDialog.vue

@ -157,12 +157,12 @@
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="priority" label="优先级" align="center"> <!-- <el-table-column prop="priority" label="优先级" align="center">-->
<template scope="scope"> <!-- <template scope="scope">-->
<el-input v-show="!scope.row.edit" v-model="scope.row.priority" size="mini" /> <!-- <el-input v-show="!scope.row.edit" v-model="scope.row.priority" size="mini" />-->
<span v-show="scope.row.edit">{{ scope.row.priority }}</span> <!-- <span v-show="scope.row.edit">{{ scope.row.priority }}</span>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
<el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right"> <el-table-column v-if="crud.status.cu > 0" align="center" label="操作" width="170" fixed="right">
<template scope="scope"> <template scope="scope">

12
qd/src/views/acs/order/index.vue

@ -113,12 +113,12 @@
<el-table-column prop="cust_name" label="客户名称" /> <el-table-column prop="cust_name" label="客户名称" />
<el-table-column prop="create_by" label="创建者" /> <el-table-column prop="create_by" label="创建者" />
<el-table-column prop="create_time" label="创建时间" /> <el-table-column prop="create_time" label="创建时间" />
<el-table-column label="操作" width="200px" align="center" fixed="right"> <!-- <el-table-column label="操作" width="200px" align="center" fixed="right">-->
<template slot-scope="scope"> <!-- <template slot-scope="scope">-->
<el-button v-if="scope.row.is_flag ==='0'" type="text" size="small" @click="handleClick(scope.row,'1')">修改</el-button> <!-- <el-button v-if="scope.row.is_flag ==='0'" type="text" size="small" @click="handleClick(scope.row,'1')">修改</el-button>-->
<el-button v-if="scope.row.is_flag ==='0'" type="text" size="small" @click="handleClick(scope.row,'2')">删除</el-button> <!-- <el-button v-if="scope.row.is_flag ==='0'" type="text" size="small" @click="handleClick(scope.row,'2')">删除</el-button>-->
</template> <!-- </template>-->
</el-table-column> <!-- </el-table-column>-->
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination /> <pagination />

6
qd/src/views/acs/order/sorting/index.vue

@ -84,6 +84,7 @@
<span v-if="scope.row.order_status==='06' && scope.row.is_flag ==='1' ">下发强制完成</span> <span v-if="scope.row.order_status==='06' && scope.row.is_flag ==='1' ">下发强制完成</span>
<span v-if="scope.row.order_status==='07' && scope.row.is_flag ==='1' ">强制完成</span> <span v-if="scope.row.order_status==='07' && scope.row.is_flag ==='1' ">强制完成</span>
<span v-if="scope.row.order_status==='08' && scope.row.is_flag ==='1' ">自动完成</span> <span v-if="scope.row.order_status==='08' && scope.row.is_flag ==='1' ">自动完成</span>
<span v-if="scope.row.order_status==='09' && scope.row.is_flag ==='1' ">取消</span>
<span v-if="scope.row.order_status==='00' && scope.row.is_flag ==='0' ">就绪</span> <span v-if="scope.row.order_status==='00' && scope.row.is_flag ==='0' ">就绪</span>
<span v-if="scope.row.order_status==='01' && scope.row.is_flag ==='0' ">分拣中</span> <span v-if="scope.row.order_status==='01' && scope.row.is_flag ==='0' ">分拣中</span>
<span v-if="scope.row.order_status==='02' && scope.row.is_flag ==='0' ">下发暂停</span> <span v-if="scope.row.order_status==='02' && scope.row.is_flag ==='0' ">下发暂停</span>
@ -91,6 +92,7 @@
<span v-if="scope.row.order_status==='04' && scope.row.is_flag ==='0' ">下发强制完成</span> <span v-if="scope.row.order_status==='04' && scope.row.is_flag ==='0' ">下发强制完成</span>
<span v-if="scope.row.order_status==='05' && scope.row.is_flag ==='0' ">强制完成</span> <span v-if="scope.row.order_status==='05' && scope.row.is_flag ==='0' ">强制完成</span>
<span v-if="scope.row.order_status==='06' && scope.row.is_flag ==='0' ">自动完成</span> <span v-if="scope.row.order_status==='06' && scope.row.is_flag ==='0' ">自动完成</span>
<span v-if="scope.row.order_status==='07' && scope.row.is_flag ==='0' ">取消</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="material_code" label="物料编码" /> <el-table-column prop="material_code" label="物料编码" />
@ -247,8 +249,8 @@ export default {
mounted() { mounted() {
// //
const timer = setInterval(() => { const timer = setInterval(() => {
// this.crud.toQueryNoLoading() this.crud.toQueryNoLoading()
}, 1000) }, 5000)
// //
this.$once('hook:beforeDestroy', () => { this.$once('hook:beforeDestroy', () => {
clearInterval(timer) clearInterval(timer)

Loading…
Cancel
Save