小车
This commit is contained in:
@@ -125,7 +125,17 @@ public class SsjThread implements Runnable {
|
||||
|
||||
void inDispatch1(DeviceSsj deviceSsj) {
|
||||
if (deviceSsj.getDw() == 1 && StrUtil.isNotBlank(deviceSsj.getTrayCode())) {
|
||||
//todo 查是否有正执行的出库作业,有退回
|
||||
// 查是否有正执行的出库作业,有退回
|
||||
MydoJob mydoJob1 = new MydoJob();
|
||||
mydoJob1.setStatus("3");
|
||||
mydoJob1.setInOut("2");
|
||||
List<MydoJob> mydoJobs = mydoJobService.selectMydoJobList(mydoJob1);
|
||||
if (mydoJobs.size() > 0) {
|
||||
int i = writeToSsj(deviceSsj.getPlcDbWriteAddress(), "0", 2,1);
|
||||
if (i == 1) {
|
||||
log.info(deviceSsj.getDeviceCode()+"已有正执行的出库作业,下发退回,去向2");
|
||||
}
|
||||
}
|
||||
HashMap<String, Object> map = new HashMap<>();
|
||||
map.put("trayCode", deviceSsj.getTrayCode());
|
||||
//拉取
|
||||
@@ -136,12 +146,6 @@ public class SsjThread implements Runnable {
|
||||
mydoJob.setStatus("1");
|
||||
mydoJob.setExecutionPhase("1");
|
||||
mydoJob.setCreateTime(new Date());
|
||||
if("GS1002".equals(deviceSsj.getDeviceCode())) {
|
||||
mydoJob.setEntranceId("L1004");
|
||||
}else{
|
||||
mydoJob.setEntranceId("L1005");
|
||||
}
|
||||
|
||||
mydoJobService.insertMydoJob(mydoJob);
|
||||
int i = writeToSsj(deviceSsj.getPlcDbWriteAddress(), mydoJob.getTaskNo(), 1, 1);
|
||||
if (i == 1) {
|
||||
|
||||
Reference in New Issue
Block a user