This commit is contained in:
张江玮
2023-04-06 13:32:18 +08:00
parent f8b18fdfae
commit 2fb546bc48
5 changed files with 31 additions and 22 deletions

View File

@@ -31,6 +31,7 @@ import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.util.SpringContextHolder;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
@@ -42,19 +43,19 @@ import java.util.*;
@RequiredArgsConstructor
public class HfGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@Autowired
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
@Autowired
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
@Autowired
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
@Autowired
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
@Autowired
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
//工作模式

View File

@@ -29,6 +29,7 @@ import org.nl.acs.task.service.TaskService;
import org.nl.modules.wql.util.SpringContextHolder;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Date;
import java.util.HashMap;
@@ -43,21 +44,21 @@ import java.util.Map;
@RequiredArgsConstructor
public class HfStationDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@Autowired
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
@Autowired
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
@Autowired
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
@Autowired
DeviceExecuteLogService logServer = SpringContextHolder.getBean("deviceExecuteLogServiceImpl");
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
@Autowired
ProduceshiftorderService produceshiftorderService = SpringContextHolder.getBean("produceshiftorderServiceImpl");
@Autowired
DeviceAppService deviceAppService = SpringContextHolder.getBean(DeviceAppService.class);

View File

@@ -31,6 +31,7 @@ import org.nl.modules.common.exception.BadRequestException;
import org.nl.modules.wql.util.SpringContextHolder;
import org.openscada.opc.lib.da.Server;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.*;
@@ -42,17 +43,17 @@ import java.util.*;
@RequiredArgsConstructor
public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements DeviceDriver, ExecutableDeviceDriver, RouteableDeviceDriver, DeviceStageMonitor {
protected ItemProtocol itemProtocol = new ItemProtocol(this);
@Autowired
InstructionService instructionService = SpringContextHolder.getBean("instructionServiceImpl");
@Autowired
DeviceService deviceservice = SpringContextHolder.getBean("deviceServiceImpl");
@Autowired
RouteLineService routelineserver = SpringContextHolder.getBean("routeLineServiceImpl");
@Autowired
TaskService taskserver = SpringContextHolder.getBean("taskServiceImpl");
@Autowired
AcsToWmsService acsToWmsService = SpringContextHolder.getBean("acsToWmsServiceImpl");
@Autowired
DeviceAppService deviceAppservice = SpringContextHolder.getBean(DeviceAppServiceImpl.class);
//当前指令1
@@ -227,6 +228,7 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
this.writing("to_onset1", "0");
this.writing("to_target1", "0");
this.writing("to_task1", "0");
this.setRequireHeadSucess(false);
}
}
}
@@ -270,6 +272,7 @@ public class HfTwoRGVDeviceDriver extends AbstractOpcDeviceDriver implements Dev
this.writing("to_onset2", "0");
this.writing("to_target2", "0");
this.writing("to_task2", "0");
this.setRequireBackSucess(false);
}
}
}

View File

@@ -28,6 +28,7 @@ import org.nl.wms.util.IdUtil;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
@@ -427,6 +428,9 @@ public class HnjSendMaterialTask extends AbstractAcsTask {
taskTab.insert(emptyJson);
JSONObject fullJson = JSONObject.parseObject(JSON.toJSONString(fullDto));
taskTab.insert(fullJson);
int real_qty = workOrderObj.getIntValue("real_qty");
workOrderObj.put("real_qty", ++real_qty);
workOrderTab.update(workOrderObj);
//创建好立即下发
this.immediateNotifyAcs();

View File

@@ -296,6 +296,7 @@
<el-table-column prop="material_code" label="物料编码" width="100" show-overflow-tooltip />
<el-table-column prop="material_name" label="物料名称" width="100" show-overflow-tooltip />
<el-table-column prop="plan_qty" label="计划数量" />
<el-table-column prop="real_qty" label="实际数量" />
<el-table-column prop="device_name" label="生产设备" width="100" show-overflow-tooltip />
<el-table-column prop="order_status" label="工单状态">
<template slot-scope="scope">
@@ -303,7 +304,6 @@
</template>
</el-table-column>
<el-table-column v-if="false" prop="produce_date" label="生产日期" width="100px" />
<el-table-column v-if="false" prop="real_qty" label="实际数量" />
<el-table-column v-if="false" prop="material_id" label="物料标识" />
<!-- <el-table-column prop="material_spec" label="物料规格" width="100" show-overflow-tooltip />-->
<el-table-column v-if="false" prop="planproducestart_date" label="计划开始时间" min-width="150" show-overflow-tooltip />