Browse Source

opt:1.完善ACS任务、指令模块

master
丁世豪 4 weeks ago
parent
commit
09188d7b51
  1. 5
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java
  2. 16
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java
  3. 4
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java
  4. 7
      acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java
  5. 1
      acs/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties
  6. 1
      acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties
  7. 1
      acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_id_ID.properties
  8. 1
      acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties
  9. 1
      acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties
  10. 3
      acs/nladmin-system/nlsso-server/src/main/resources/language/task/common.properties
  11. 3
      acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_en_US.properties
  12. 3
      acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_id_ID.properties
  13. 3
      acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_in_ID.properties
  14. 3
      acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_zh_CN.properties
  15. 2
      acs/nladmin-ui/package.json
  16. 2
      acs/nladmin-ui/src/api/acs/task/task.js
  17. 2
      acs/nladmin-ui/src/utils/request.js
  18. 2
      acs/nladmin-ui/src/views/acs/instruction/index.vue

5
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/instruction/service/impl/InstructionServiceImpl.java

@ -945,9 +945,10 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
} else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "2")) {
// NDC agv指令不当场取消指令,需要等agv上报
if (!StrUtil.isEmpty(entity.getAgv_jobno())) {
ndcAgvService.deleteAgvInstToNDC((Instruction) entity);
if (StrUtil.isEmpty(entity.getAgv_jobno())) {
throw new BadRequestException(LangProcess.msg("task_insNDC"));
} else {
ndcAgvService.deleteAgvInstToNDC((Instruction) entity);
flag = true;
}
} else if (StrUtil.equals(paramService.findByCode(AcsConfig.AGVTYPE).getValue(), "3")

16
acs/nladmin-system/nlsso-server/src/main/java/org/nl/acs/task/service/impl/TaskServiceImpl.java

@ -734,8 +734,12 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
//向缓存添加任务信息
this.addTaskToCache(dto);
//反馈上位系统任务状态
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
this.feedWmsTaskStatus(entity);
}
}
@Override
@Transactional(rollbackFor = Exception.class)
@ -770,9 +774,11 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
//移除任务缓存信息
this.removeByCodeFromCache(entity.getTask_code());
//反馈上位系统任务状态
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
this.feedWmsTaskStatus(entity);
//关闭仙工运单序列
this.markComplete(entity);
}
}
@Override
@ -799,9 +805,11 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
//移除任务缓存信息
this.removeByCodeFromCache(entity.getTask_code());
//反馈上位系统任务状态
//判断是否为WMS下发的任务,如果是反馈任务状态给WMS
String hasWms = paramService.findByCode(AcsConfig.HASWMS).getValue();
if (!StrUtil.startWith(entity.getTask_code(), "-") && StrUtil.equals(hasWms, "1")) {
this.feedWmsTaskStatus(entity);
//关闭仙工运单序列
this.markComplete(entity);
}
}

4
acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/config/JobRunner.java

@ -36,5 +36,9 @@ public class JobRunner implements ApplicationRunner {
*/
@Override
public void run(ApplicationArguments applicationArguments) {
log.info("--------------------注入定时任务---------------------");
List<SysQuartzJob> quartzJobs = quartzJobService.findByIsPauseIsFalse();
quartzJobs.forEach(quartzManage::addJob);
log.info("--------------------定时任务注入完成---------------------");
}
}

7
acs/nladmin-system/nlsso-server/src/main/java/org/nl/system/service/quartz/utils/ExecutionJob.java

@ -38,9 +38,10 @@ public class ExecutionJob extends TLogQuartzJobBean {
/**
* 该处仅供参考
*/
@Autowired
@Qualifier("threadPoolExecutor")
private ThreadPoolExecutor EXECUTOR;
// @Autowired
// @Qualifier("threadPoolExecutor")
// private ThreadPoolExecutor EXECUTOR;
private final static ThreadPoolExecutor EXECUTOR = ThreadPoolExecutorUtil.getPoll();
@Override

1
acs/nladmin-system/nlsso-server/src/main/resources/language/error/error.properties

@ -19,3 +19,4 @@ error_SystemAuthError=权限不足,操作失败
error_SystemError=系统繁忙,稍后在试
error_Update=更新失败
error_isNull={0}查询信息不存在
error_sysAuth=被删除或无权限,操作失败!

1
acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_en_US.properties

@ -19,3 +19,4 @@ error_SystemAuthError=Insufficient permissions, operation failed
error_SystemError=The system is busy, please try again later
error_Update=Update failed
error_isNull={0}query is null
error_sysAuth=Deleted or without permission, operation failed!

1
acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_id_ID.properties

@ -19,3 +19,4 @@ error_SystemAuthError=Keizinan tidak cukup, operasi gagal
error_SystemError=Sistemnya sibuk, tolong coba lagi nanti
error_Update=Kemaskini gagal
error_isNull={0}Pertanyaan Tidak ada
error_sysAuth=Deleted or without permission, operation failed!

1
acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_in_ID.properties

@ -19,3 +19,4 @@ error_SystemAuthError=Keizinan tidak cukup, operasi gagal
error_SystemError=Sistemnya sibuk, tolong coba lagi nanti
error_Update=Kemaskini gagal
error_isNull={0}Pertanyaan Tidak ada
error_sysAuth=Deleted or without permission, operation failed!

1
acs/nladmin-system/nlsso-server/src/main/resources/language/error/error_zh_CN.properties

@ -19,3 +19,4 @@ error_SystemAuthError=权限不足,操作失败
error_SystemError=系统繁忙,稍后在试
error_Update=更新失败
error_isNull={0}查询信息不存在
error_sysAuth=被删除或无权限,操作失败!

3
acs/nladmin-system/nlsso-server/src/main/resources/language/task/common.properties

@ -1,3 +1,6 @@
common_configTip=找不到配置文件,请确认[{0}]配置是否存在!
common_maxTaskTip={0}该点位申请的任务未完成数已超过上限,无法申请任务!
common_taskCreatedTip=点位[{0}]已经创建过任务
task_insHas=有指令未完成!
task_insRun=存在指令
task_insNDC=该任务已下发NDC,等待NDC反馈任务号,暂时无法取消!

3
acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_en_US.properties

@ -1,3 +1,6 @@
common_configTip=The configuration file cannot be found, please confirm whether the [{0}] configuration exists!
common_maxTaskTip={0}The number of unfinished tasks applied for at this point has exceeded the upper limit, and the task cannot be applied!
common_taskCreatedTip=Point[{0}] has already created a task
task_insHas=There are instructions that are not completed!
task_insRun=instruction exist
task_insNDC=The task has been sent to NDC and cannot be canceled while waiting for the NDC to send back the task number!

3
acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_id_ID.properties

@ -1,3 +1,6 @@
common_configTip=File konfigurasi tidak dapat ditemukan, harap konfirmasi apakah konfigurasi [{0}] ada!
common_maxTaskTip={0}Jumlah tugas yang belum selesai yang diajukan pada saat ini telah melampaui batas atas, dan tugas tersebut tidak dapat diterapkan!
common_taskCreatedTip=Point[{0}] telah membuat tugas
task_insHas=There are instructions that are not completed!
task_insRun=instruction exist
task_insNDC=The task has been sent to NDC and cannot be canceled while waiting for the NDC to send back the task number!

3
acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_in_ID.properties

@ -1,3 +1,6 @@
common_configTip=File konfigurasi tidak dapat ditemukan, harap konfirmasi apakah konfigurasi [{0}] ada!
common_maxTaskTip={0}Jumlah tugas yang belum selesai yang diajukan pada saat ini telah melampaui batas atas, dan tugas tersebut tidak dapat diterapkan!
common_taskCreatedTip=Point[{0}] telah membuat tugas
task_insHas=There are instructions that are not completed!
task_insRun=instruction exist
task_insNDC=The task has been sent to NDC and cannot be canceled while waiting for the NDC to send back the task number!

3
acs/nladmin-system/nlsso-server/src/main/resources/language/task/common_zh_CN.properties

@ -1,3 +1,6 @@
common_configTip=找不到配置文件,请确认[{0}]配置是否存在!
common_maxTaskTip={0}该点位申请的任务未完成数已超过上限,无法申请任务!
common_taskCreatedTip=点位[{0}]已经创建过任务
task_insHas=有指令未完成!
task_insRun=存在指令
task_insNDC=该任务已下发NDC,等待NDC反馈任务号,暂时无法取消!

2
acs/nladmin-ui/package.json

@ -38,7 +38,7 @@
"@riophae/vue-treeselect": "0.4.0",
"af-table-column": "^1.0.3",
"ansi_up": "^5.1.0",
"axios": "^1.5.0",
"axios": "0.18.1",
"clipboard": "^2.0.4",
"codemirror": "^5.49.2",
"connect": "3.6.6",

2
acs/nladmin-ui/src/api/acs/task/task.js

@ -26,7 +26,7 @@ export function edit(data) {
export function finish(data) {
return request({
url: 'api/task/finish',
url: 'api/task/finish/' + data,
method: 'post',
data: data
})

2
acs/nladmin-ui/src/utils/request.js

@ -22,7 +22,7 @@ service.interceptors.request.use(
if (getToken()) {
config.headers['Authorization'] = getToken() ? 'Bearer ' + getToken() : undefined // 让每个请求携带自定义token 请根据实际情况自行修改
}
// config.headers['Content-Type'] = 'application/json'
config.headers['Content-Type'] = 'application/json'
config.headers['Accept-Language'] = lang
return config
},

2
acs/nladmin-ui/src/views/acs/instruction/index.vue

@ -382,6 +382,8 @@ export default {
this.finish(index, row)
break
case 'b'://
console.log('取消')
console.log(row.instruction_id)
this.cancel(index, row)
break
case 'c'://

Loading…
Cancel
Save