高测手持补录子母托盘编号
This commit is contained in:
@@ -373,6 +373,18 @@ public class SsxSiteDeviceDriver extends AbstractOpcDeviceDriver implements Devi
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void writing(String param, String value) {
|
||||||
|
|
||||||
|
String to_param = this.getDevice().getOpc_server_code() + "." + this.getDevice().getOpc_plc_code() + "." + this.getDevice().getDevice_code()
|
||||||
|
+ "." + param;
|
||||||
|
//String opcservcerid = this.getDevice().getOpc_server_id();
|
||||||
|
//Server server = ReadUtil.getServer(opcservcerid);
|
||||||
|
Map<String, Object> itemMap = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
itemMap.put(to_param, value);
|
||||||
|
// itemMap.put(to_param, Integer.parseInt(value));
|
||||||
|
this.control(itemMap);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -36,4 +36,18 @@ public class HeadTaskDto implements Serializable {
|
|||||||
* 2 强制完成
|
* 2 强制完成
|
||||||
*/
|
*/
|
||||||
private String type;
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
* 1 重新生成
|
||||||
|
* 2 强制完成
|
||||||
|
*/
|
||||||
|
private String sub_tray;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 操作类型
|
||||||
|
* 1 重新生成
|
||||||
|
* 2 强制完成
|
||||||
|
*/
|
||||||
|
private String mother_tray;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -96,4 +96,13 @@ public class HandController {
|
|||||||
public ResponseEntity<Object> taskOperation(@RequestBody HeadTaskDto dto) throws Exception {
|
public ResponseEntity<Object> taskOperation(@RequestBody HeadTaskDto dto) throws Exception {
|
||||||
return new ResponseEntity<>(handService.taskOperation(dto), HttpStatus.OK);
|
return new ResponseEntity<>(handService.taskOperation(dto), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/record")
|
||||||
|
@Log("托盘码补录")
|
||||||
|
@ApiOperation("托盘码补录")
|
||||||
|
@SaIgnore
|
||||||
|
//@PreAuthorize("@el.check('sect:list')")
|
||||||
|
public ResponseEntity<Object> record(@RequestBody HeadTaskDto dto) throws Exception {
|
||||||
|
return new ResponseEntity<>(handService.record(dto), HttpStatus.OK);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,4 +33,6 @@ public interface HandService {
|
|||||||
Map<String, Object> querytasks(HeadTaskDto dto);
|
Map<String, Object> querytasks(HeadTaskDto dto);
|
||||||
|
|
||||||
Map<String, Object> taskOperation(HeadTaskDto dto);
|
Map<String, Object> taskOperation(HeadTaskDto dto);
|
||||||
|
|
||||||
|
Map<String, Object> record(HeadTaskDto dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,9 @@ import org.nl.acs.agv.server.AgvService;
|
|||||||
import org.nl.acs.agv.server.NDCAgvService;
|
import org.nl.acs.agv.server.NDCAgvService;
|
||||||
import org.nl.acs.device.domain.Device;
|
import org.nl.acs.device.domain.Device;
|
||||||
import org.nl.acs.device.service.DeviceService;
|
import org.nl.acs.device.service.DeviceService;
|
||||||
|
import org.nl.acs.device_driver.basedriver.hongxiang_device.HongXiangConveyorDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.ssx_site.SsxSiteDeviceDriver;
|
||||||
|
import org.nl.acs.device_driver.basedriver.standard_conveyor_control_with_scanner.StandardCoveyorControlWithScannerDeviceDriver;
|
||||||
import org.nl.acs.ext.wms.data.JsonUtl;
|
import org.nl.acs.ext.wms.data.JsonUtl;
|
||||||
import org.nl.acs.instruction.domain.Instruction;
|
import org.nl.acs.instruction.domain.Instruction;
|
||||||
import org.nl.acs.instruction.domain.InstructionMybatis;
|
import org.nl.acs.instruction.domain.InstructionMybatis;
|
||||||
@@ -458,4 +461,27 @@ public class HandServiceImpl implements HandService {
|
|||||||
resultJson.put("data", data);
|
resultJson.put("data", data);
|
||||||
return resultJson;
|
return resultJson;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> record(HeadTaskDto dto) {
|
||||||
|
JSONObject resultJson = new JSONObject();
|
||||||
|
JSONArray data = new JSONArray();
|
||||||
|
String sub_tray=dto.getSub_tray();
|
||||||
|
String mother_tray=dto.getMother_tray();
|
||||||
|
Device device = deviceAppService.findDeviceByCode("SSX04");
|
||||||
|
if (device.getDeviceDriver() instanceof SsxSiteDeviceDriver) {
|
||||||
|
SsxSiteDeviceDriver ssxSiteDeviceDriver = (SsxSiteDeviceDriver) device.getDeviceDriver();
|
||||||
|
if(ObjectUtil.isNotEmpty(sub_tray)) {
|
||||||
|
log.info("手持补录SSX04子托盘编号sub_tray为{}",sub_tray);
|
||||||
|
ssxSiteDeviceDriver.writing("sub_tray",sub_tray);
|
||||||
|
}
|
||||||
|
if(ObjectUtil.isNotEmpty(mother_tray)) {
|
||||||
|
log.info("手持补录SSX04母托盘编号mother_tray为{}",mother_tray);
|
||||||
|
ssxSiteDeviceDriver.writing("mother_tray",mother_tray);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
resultJson.put("message", "操作成功");
|
||||||
|
resultJson.put("data", data);
|
||||||
|
return resultJson;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user