更新
This commit is contained in:
@@ -35,6 +35,7 @@ import org.nl.acs.opc.DeviceAppServiceImpl;
|
||||
import org.nl.acs.route.service.RouteLineService;
|
||||
import org.nl.acs.route.service.dto.RouteLineDto;
|
||||
import org.nl.acs.route.service.impl.RouteLineServiceImpl;
|
||||
import org.nl.acs.task.TaskInstructionLock;
|
||||
import org.nl.acs.task.service.TaskService;
|
||||
import org.nl.acs.task.service.dto.TaskDto;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
@@ -271,6 +272,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
|
||||
@Override
|
||||
public void create(Instruction dto) {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
dto = foramte(dto);
|
||||
String task_code = dto.getTask_code();
|
||||
TaskDto task = taskService.findByCodeFromCache(task_code);
|
||||
@@ -381,10 +384,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
wo.insert(json);
|
||||
instructions.add(dto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void create2(Instruction dto) throws Exception {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
dto = foramte(dto);
|
||||
String task_code = dto.getTask_code();
|
||||
TaskDto task = taskService.findByCodeFromCache(task_code);
|
||||
@@ -488,12 +494,14 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
wo.insert(json);
|
||||
instructions.add(dto);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void createAgain(Instruction dto) throws Exception {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
String task_code = dto.getTask_code();
|
||||
TaskDto task = taskService.findByCodeFromCache(task_code);
|
||||
WQLObject instwo = WQLObject.getWQLObject("acs_instruction");
|
||||
@@ -562,10 +570,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
// }
|
||||
instructions.add(dto);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void update(Instruction dto) {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
String currentUsername = SecurityUtils.getCurrentUsername();
|
||||
String now = DateUtil.now();
|
||||
dto.setUpdate_time(now);
|
||||
@@ -586,7 +597,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
// instructions.add(dto);
|
||||
// }
|
||||
this.reload();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -724,6 +735,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void finish(Instruction dto) {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
String now = DateUtil.now();
|
||||
dto.setInstruction_status("2");
|
||||
WQLObject wo = WQLObject.getWQLObject("acs_instruction");
|
||||
@@ -776,6 +789,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
removeByCodeFromCache(dto.getInstruction_code());
|
||||
this.reload();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void finishAndCreateNextInst(Instruction dto){
|
||||
@@ -844,6 +858,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
|
||||
@Override
|
||||
public void cancel(String id) throws Exception {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
//flag= true时取消指令
|
||||
boolean flag = false;
|
||||
Instruction entity = this.findById(id);
|
||||
@@ -947,10 +963,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
}
|
||||
this.reload();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void forceCancel(String id) throws Exception {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
//flag= true时取消指令
|
||||
boolean flag = false;
|
||||
Instruction entity = this.findById(id);
|
||||
@@ -1003,9 +1022,13 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void cancelNOSendAgv(String id) throws Exception {
|
||||
Class var2 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
//flag= true时取消指令
|
||||
Instruction entity = this.findById(id);
|
||||
if (entity == null) {
|
||||
@@ -1058,7 +1081,7 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
}
|
||||
|
||||
removeByCodeFromCache(entity.getInstruction_code());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1279,6 +1302,8 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
|
||||
@Override
|
||||
public boolean createLkInst(String type, Instruction dto) {
|
||||
Class var3 = TaskInstructionLock.class;
|
||||
synchronized(TaskInstructionLock.class) {
|
||||
//入库
|
||||
AcsToLiKuService acsToLiKuService = SpringContextHolder.getBean(AcsToLiKuService.class);
|
||||
Resp resp = null;
|
||||
@@ -1353,10 +1378,9 @@ public class InstructionServiceImpl implements InstructionService, ApplicationAu
|
||||
dto.setRemark("ERROR");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Instruction findByContainer(String container_code) {
|
||||
|
||||
Reference in New Issue
Block a user