处理服务循环依赖问题

This commit is contained in:
2023-03-27 14:24:07 +08:00
parent 5683e91301
commit 3e3287907c
3 changed files with 18 additions and 12 deletions

View File

@@ -16,6 +16,7 @@ import org.nl.common.enums.AcsTaskEnum;
import org.nl.common.utils.MapOf;
import org.nl.common.utils.SecurityUtils;
import org.nl.modules.wql.core.bean.WQLObject;
import org.nl.wms.ext.acs.service.AcsToWmsService;
import org.nl.wms.pda.service.CacheLineHandService;
import org.nl.wms.sch.manage.TaskStatusEnum;
import org.nl.wms.sch.service.TaskService;
@@ -35,10 +36,14 @@ import java.util.Map;
@Service
@RequiredArgsConstructor
@Slf4j
public class AcsToWmsServiceImpl implements AcsToWmsService {
private final TaskService taskService;
private final AgvInstService agvInstService;
private final CacheLineHandService cacheLineHandService;
public class AcsToWmsServiceImpl implements AcsToWmsService{
@Autowired
private TaskService taskService;
@Autowired
private CacheLineHandService cacheLineHandService;
private final AgvInstService agvInstService;
@Override
public Map<String, Object> apply(JSONObject jsonObject) {

View File

@@ -3,19 +3,20 @@ package org.nl.wms.ext.acs.service.impl;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import lombok.RequiredArgsConstructor;
import org.nl.common.anno.Log;
import lombok.extern.slf4j.Slf4j;
import org.nl.common.utils.AcsUtil;
import org.nl.common.utils.MapOf;
import org.nl.wms.ext.acs.service.WmsToAcsService;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;
import java.util.Map;
@Service
@RequiredArgsConstructor
@Slf4j
public class WmsToAcsServiceImpl implements WmsToAcsService {
public class WmsToAcsServiceImpl implements WmsToAcsService{
@Override
public Map<String, Object> issueTaskToAcs(JSONArray arr) {
JSONArray form = new JSONArray();

View File

@@ -61,15 +61,15 @@ public class CacheLineHandController{
@ApiOperation("规格下拉框查询")
public CommonResult<JSONArray> semiMaterialSpecQuery(@RequestBody JSONObject form) {
log.info("海亮缓存线手持服务 [规格下拉框查询] 接口被请求, 请求参数-{}", form);
return RestBusinessTemplate.execute(() -> cacheLineHandService.semiMaterialSpecQuery(form.getString("form")));
return RestBusinessTemplate.execute(() -> cacheLineHandService.semiMaterialSpecQuery(form.getString("search_bar")));
}
@PostMapping("/workProcedureQuery")
@PostMapping("/workprocedureQuery")
@Log("工序下拉框查询")
@ApiOperation("工序下拉框查询")
public CommonResult<JSONArray> workProcedureQuery(@RequestBody JSONObject form) {
log.info("海亮缓存线手持服务 [工序下拉框查询] 接口被请求, 请求参数-{}", form);
return RestBusinessTemplate.execute(() -> cacheLineHandService.workProcedureQuery(form.getString("form")));
return RestBusinessTemplate.execute(() -> cacheLineHandService.workProcedureQuery(form.getString("search_bar")));
}
@PostMapping("/deviceQuery")
@@ -77,7 +77,7 @@ public class CacheLineHandController{
@ApiOperation("缓存线设备下拉框查询")
public CommonResult<JSONArray> deviceQuery(@RequestBody JSONObject form) {
log.info("海亮缓存线手持服务 [缓存线设备下拉框查询] 接口被请求, 请求参数-{}", form);
return RestBusinessTemplate.execute(() -> cacheLineHandService.deviceQuery(form.getString("form")));
return RestBusinessTemplate.execute(() -> cacheLineHandService.deviceQuery(form.getString("search_bar")));
}
@PostMapping("/instStatusQuery")
@@ -85,13 +85,13 @@ public class CacheLineHandController{
@ApiOperation("指令状态下拉框查询")
public CommonResult<JSONArray> instStatusQuery(@RequestBody JSONObject form) {
log.info("海亮缓存线手持服务 [指令状态下拉框查询] 接口被请求, 请求参数-{}", form);
return RestBusinessTemplate.execute(() -> cacheLineHandService.instStatusQuery(form.getString("form")));
return RestBusinessTemplate.execute(() -> cacheLineHandService.instStatusQuery(form.getString("search_bar")));
}
@PostMapping("/instPageQuery")
@Log("任务分页查询")
@ApiOperation("任务分页数据")
public CommonResult<Object> instPageQuery(@RequestBody Map<String,String> param, Pageable page) {
public CommonResult<Map<String,Object>> instPageQuery(@RequestBody Map<String,String> param, Pageable page) {
log.info("海亮缓存线手持服务 [任务分页查询] 接口被请求, 请求参数-{}", param);
return RestBusinessTemplate.execute(() -> {
if(null == param) {