billion-admin/src/main/resources/application-druid.yml
@@ -12,6 +12,7 @@ url: jdbc:sqlserver://127.0.0.1:1433;DatabaseName=billion-db username: sa password: 123456 # password: 123456 # password: admin@123 # 初始连接数 initialSize: 10 billion-main/src/main/java/com/billion/main/api/service/impl/WorkOrdersInfoServiceImpl.java
@@ -43,6 +43,9 @@ omProductionOrderInfo.setBodyQty(Long.valueOf("0")); omProductionOrderInfo.setHeadQty(Long.valueOf("0")); omProductionOrderInfo.setPreQty(Long.valueOf("0")); omProductionOrderInfo.setBodyStatus("0"); omProductionOrderInfo.setHeadStatus("0"); omProductionOrderInfo.setPreStatus("0"); omProductionOrderInfo.setWorkOrderNo(workOrdersInfo.getOrderNumber()); omProductionOrderInfo.setSalesOrderCode(workOrdersInfo.getBatchNumber()); omProductionOrderInfo.setProductCode(workOrdersInfo.getMaterialNumber()); @@ -52,7 +55,6 @@ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date startTime = sdf.parse(workOrdersInfo.getStartTime()); omProductionOrderInfo.setPlanStartTime(startTime); // omProductionOrderInfo.setRemarks(Long.valueOf(workOrdersInfo.getDescription())); omProductionOrderInfo.setOrderStatus(workOrdersInfo.getState()); omProductionOrderInfo.setFlag(workOrdersInfo.getFlag()); omProductionOrderInfoService.insertOmProductionOrderInfo(omProductionOrderInfo); billion-main/src/main/java/com/billion/main/constant/Constants.java
@@ -90,6 +90,7 @@ public static final String OP050= "OP050"; public static final String OP110= "OP110"; public static final String OP140= "OP140"; public static final String OP070_1= "OP070-1"; } billion-main/src/main/java/com/billion/main/plcServer/CustomRunner.java
@@ -55,6 +55,7 @@ Constants.PLC2.add(Constants.OP045); Constants.PLC2.add(Constants.OP060); Constants.PLC2.add(Constants.OP070); Constants.PLC2.add(Constants.OP070_1); Constants.PLC2.add(Constants.OP075); Constants.PLC2.add(Constants.OP080); Constants.PLC2.add(Constants.OP090); @@ -113,6 +114,10 @@ Constants.OFFLINE.add(Constants.C060); Constants.OFFLINE.add(Constants.OP310); OPCUaSubscription OPCUaSubscription = new OPCUaSubscription(miloService, daParamCollectionService, daStationCollectionService, @@ -131,76 +136,77 @@ public List<String> getList(){ List<String> lists = new ArrayList<>(); // //PLC1 // lists.add("PLC1.C005.RecordData"); // lists.add("PLC1.C005.WorkOrderRequest");//请求工单 // lists.add("PLC1.C010.RecordData"); // lists.add("PLC1.C020.RecordData"); // lists.add("PLC1.C030.RecordData"); // lists.add("PLC1.C050.RecordData"); // lists.add("PLC1.C060.RecordData"); // //PLC2 // lists.add("PLC2.OP005.RecordData"); // lists.add("PLC2.OP010.WorkOrderRequest");//请求工单 // lists.add("PLC2.OP020.RecordData"); // lists.add("PLC2.OP040.RecordData"); // lists.add("PLC2.OP045.RecordData"); // lists.add("PLC2.OP060.RecordData"); // lists.add("PLC2.OP070.RecordData"); // lists.add("PLC2.OP075.RecordData"); // lists.add("PLC2.OP080.RecordData"); // lists.add("PLC2.OP090.RecordData"); // lists.add("PLC2.OP095-1.RecordData"); // lists.add("PLC2.OP095-2.RecordData"); // lists.add("PLC2.OP100-1.RecordData"); // lists.add("PLC2.OP100-2.RecordData"); // lists.add("PLC2.OP120.RecordData"); // lists.add("PLC2.P010.RecordData"); // lists.add("PLC2.P010.WorkOrderRequest");//请求工单 // //PLC3 // lists.add("PLC3.OP130.RecordData"); // lists.add("PLC3.OP145-1.RecordData"); // lists.add("PLC3.OP145-2.RecordData"); // lists.add("PLC3.OP150-1.RecordData"); // lists.add("PLC3.OP150-2.RecordData"); // lists.add("PLC3.OP160.RecordData"); // lists.add("PLC3.OP165-1.RecordData"); // lists.add("PLC3.OP165-2.RecordData"); // lists.add("PLC3.OP170-1.RecordData"); // lists.add("PLC3.OP170-2.RecordData"); // lists.add("PLC3.OP180.RecordData"); // lists.add("PLC3.OP190-1.RecordData"); // lists.add("PLC3.OP190-2.RecordData"); // lists.add("PLC3.OP200-1.RecordData"); // lists.add("PLC3.OP200-2.RecordData"); // lists.add("PLC3.OP210-1.RecordData"); // lists.add("PLC3.OP210-2.RecordData"); // lists.add("PLC3.OP220-1.RecordData"); // lists.add("PLC3.OP220-2.RecordData"); // lists.add("PLC3.OP230-1.RecordData"); // lists.add("PLC3.OP230-2.RecordData"); // lists.add("PLC3.OP240-1.RecordData"); // lists.add("PLC3.OP240-2.RecordData"); // lists.add("PLC3.OP250-1.RecordData"); // lists.add("PLC3.OP250-2.RecordData"); // lists.add("PLC3.OP260-1.RecordData"); // lists.add("PLC3.OP260-2.RecordData"); // lists.add("PLC3.OP270-1.RecordData"); // lists.add("PLC3.OP270-2.RecordData"); // lists.add("PLC3.OP275.RecordData"); // lists.add("PLC3.OP280.RecordData"); // lists.add("PLC3.OP290-1.RecordData"); // lists.add("PLC3.OP290-2.RecordData"); // lists.add("PLC3.OP295.RecordData"); // lists.add("PLC3.OP300.RecordData"); // lists.add("PLC3.OP310.RecordData"); // //PLC4 // lists.add("PLC4.C040.RecordData"); // lists.add("PLC4.OP030.RecordData"); // lists.add("PLC4.OP050.RecordData"); // lists.add("PLC4.OP070.RecordData"); // lists.add("PLC3.OP110.RecordData"); // lists.add("PLC3.OP140.RecordData"); //PLC1 lists.add("PLC1.C005.RecordData"); lists.add("PLC1.C005.WorkOrderRequest");//请求工单 lists.add("PLC1.C010.RecordData"); lists.add("PLC1.C020.RecordData"); lists.add("PLC1.C030.RecordData"); lists.add("PLC1.C050.RecordData"); lists.add("PLC1.C060.RecordData"); //PLC2 lists.add("PLC2.OP005.RecordData"); lists.add("PLC2.OP005.WorkOrderRequest");//请求工单 lists.add("PLC2.OP010.RecordData"); lists.add("PLC2.OP020.RecordData"); lists.add("PLC2.OP040.RecordData"); lists.add("PLC2.OP045.RecordData"); lists.add("PLC2.OP060.RecordData"); lists.add("PLC2.OP070.RecordData"); lists.add("PLC2.OP075.RecordData"); lists.add("PLC2.OP080.RecordData"); lists.add("PLC2.OP090.RecordData"); lists.add("PLC2.OP095-1.RecordData"); lists.add("PLC2.OP095-2.RecordData"); lists.add("PLC2.OP100-1.RecordData"); lists.add("PLC2.OP100-2.RecordData"); lists.add("PLC2.OP120.RecordData"); lists.add("PLC2.P010.RecordData"); lists.add("PLC2.P010.WorkOrderRequest");//请求工单 //PLC3 lists.add("PLC3.OP130.RecordData"); lists.add("PLC3.OP145-1.RecordData"); lists.add("PLC3.OP145-2.RecordData"); lists.add("PLC3.OP150-1.RecordData"); lists.add("PLC3.OP150-2.RecordData"); lists.add("PLC3.OP160.RecordData"); lists.add("PLC3.OP165-1.RecordData"); lists.add("PLC3.OP165-2.RecordData"); lists.add("PLC3.OP170-1.RecordData"); lists.add("PLC3.OP170-2.RecordData"); lists.add("PLC3.OP180.RecordData"); lists.add("PLC3.OP190-1.RecordData"); lists.add("PLC3.OP190-2.RecordData"); lists.add("PLC3.OP200-1.RecordData"); lists.add("PLC3.OP200-2.RecordData"); lists.add("PLC3.OP210-1.RecordData"); lists.add("PLC3.OP210-2.RecordData"); lists.add("PLC3.OP220-1.RecordData"); lists.add("PLC3.OP220-2.RecordData"); lists.add("PLC3.OP230-1.RecordData"); lists.add("PLC3.OP230-2.RecordData"); lists.add("PLC3.OP240-1.RecordData"); lists.add("PLC3.OP240-2.RecordData"); lists.add("PLC3.OP250-1.RecordData"); lists.add("PLC3.OP250-2.RecordData"); lists.add("PLC3.OP260-1.RecordData"); lists.add("PLC3.OP260-2.RecordData"); lists.add("PLC3.OP270-1.RecordData"); lists.add("PLC3.OP270-2.RecordData"); lists.add("PLC3.OP275.RecordData"); lists.add("PLC3.OP280.RecordData"); lists.add("PLC3.OP290-1.RecordData"); lists.add("PLC3.OP290-2.RecordData"); lists.add("PLC3.OP295.RecordData"); lists.add("PLC3.OP300.RecordData"); lists.add("PLC3.OP310.RecordData"); //PLC4 lists.add("PLC4.C040.RecordData"); lists.add("PLC4.OP030.RecordData"); lists.add("PLC4.OP050.RecordData"); lists.add("PLC4.OP070_1.RecordData"); lists.add("PLC3.OP110.RecordData"); lists.add("PLC3.OP140.RecordData"); //TEST lists.add("TEST.C005.RecordData"); billion-main/src/main/java/com/billion/main/plcServer/conf/OPCElement.java
@@ -7,13 +7,6 @@ public class OPCElement { /** * C005 */ public static final String PLC1_C005_RecordData = "PLC1.C005.RecordData";//请求记录数据 public static final String PLC1_C005_WorkOrderRequest = "PLC1.C005.WorkOrderRequest";//请求拧紧数据 } billion-main/src/main/java/com/billion/main/plcServer/sub/OPCUaSubscription.java
@@ -100,7 +100,8 @@ miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build()); } //除首工站所有工站 else if(Constants.PLC1.contains(device) || else if( Constants.PLC1.contains(device) || Constants.PLC2.contains(device) || Constants.PLC3.contains(device) || Constants.PLC4.contains(device) || @@ -109,17 +110,22 @@ //校验SFCCode是否存在 Object SFCCode = miloService.readFromOpcUa(thoroughfare + "." + device + ".SFCCode").getValue(); if (SFCCode == null ) { miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(23).build()); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(13).build()); } else { OmOrderScheduling omOrderScheduling = new OmOrderScheduling(); omOrderScheduling.setSfcCode(SFCCode.toString()); List<OmOrderScheduling> resultList = omOrderSchedulingService.selectOmOrderSchedulingList(omOrderScheduling); log.info("查询结果数量: {}", resultList); BsBomChildInfo bsbomChildInfo= new BsBomChildInfo(); bsbomChildInfo.setLocationCode(device); bsbomChildInfo.setBomCode(resultList.get(0).getWorkOrderNo()); //下发配方 formula(thoroughfare, device, bsbomChildInfo); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build()); if(resultList != null){ String getWorkOrderNo = resultList.get(0).getWorkOrderNo(); BsBomChildInfo bsbomChildInfo= new BsBomChildInfo(); bsbomChildInfo.setLocationCode(device); bsbomChildInfo.setBomCode(getWorkOrderNo); //下发配方 formula(thoroughfare, device, bsbomChildInfo); miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(11).build()); }else { miloService.writeToOpcShort(ReadWriteEntity.builder().identifier(thoroughfare + "." + device + ".RecordDataDone").value(13).build()); } } } //出站保存数据 billion-main/src/main/resources/mapper/om/OmOrderSchedulingMapper.xml
@@ -31,8 +31,10 @@ <if test="workOrderNo != null and workOrderNo != ''"> and work_order_no = #{workOrderNo}</if> <if test="sfcCode != null and sfcCode != ''"> and sfc_code = #{sfcCode}</if> <if test="productCode != null and productCode != ''"> and product_code = #{productCode}</if> <if test="params.beginOnlineTime != null and params.beginOnlineTime != '' and params.endOnlineTime != null and params.endOnlineTime != ''"> and online_time between #{params.beginOnlineTime} and #{params.endOnlineTime}</if> <if test="params.beginOfflineTime != null and params.beginOfflineTime != '' and params.endOfflineTime != null and params.endOfflineTime != ''"> and offline_time between #{params.beginOfflineTime} and #{params.endOfflineTime}</if> <!-- <if test="params.beginOnlineTime != null and params.beginOnlineTime != '' and params.endOnlineTime != null and params.endOnlineTime != ''"> and online_time between #{params.beginOnlineTime} and #{params.endOnlineTime}</if>--> <!-- <if test="params.beginOfflineTime != null and params.beginOfflineTime != '' and params.endOfflineTime != null and params.endOfflineTime != ''"> and offline_time between #{params.beginOfflineTime} and #{params.endOfflineTime}</if>--> <!---- <if test="params.beginOnlineTime != null and params.beginOnlineTime != '' and params.endOnlineTime != null and params.endOnlineTime != ''"> </if>--> <!-- <if test="params.beginOfflineTime != null and params.beginOfflineTime != '' and params.endOfflineTime != null and params.endOfflineTime != ''"></if>--> <if test="status != null and status != ''"> and status = #{status}</if> <if test="nowQty != null and nowQty != ''"> and now_qty = #{nowQty}</if> </where> billion-ui/src/views/main/bs/lineInfo/index.vue
@@ -73,13 +73,6 @@ <el-table-column :show-overflow-tooltip="true" label="产线编号" align="center" prop="lineCode" /> <el-table-column :show-overflow-tooltip="true" label="产线名称" align="center" prop="lineName" /> <el-table-column :show-overflow-tooltip="true" label="备注" align="center" prop="remarks" /> <el-table-column :show-overflow-tooltip="true" label="创建用户" align="center" prop="createBy" /> <el-table-column label="创建时间" align="center" prop="createTime" width="180"> </el-table-column> <el-table-column :show-overflow-tooltip="true" label="更改用户" align="center" prop="updateBy" /> <el-table-column label="更改时间" align="center" prop="updateTime" width="180"> </el-table-column> <el-table-column :show-overflow-tooltip="true" label="状态" align="center" prop="status" /> </el-table> <pagination