|
@@ -21,6 +21,8 @@ import com.github.zuihou.business.edgeLibrary.entity.Storge;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StockInfoService;
|
|
|
import com.github.zuihou.business.edgeLibrary.service.StorgeService;
|
|
|
import com.github.zuihou.business.externalApi.dto.ManualInfo;
|
|
|
+import com.github.zuihou.business.externalApi.entity.AgvHikOrderDetailInfo;
|
|
|
+import com.github.zuihou.business.externalApi.service.AgvHikOrderDetailInfoService;
|
|
|
import com.github.zuihou.business.externalApi.service.AgvHikOrderInfoService;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dto.TTaskPageDTO;
|
|
|
import com.github.zuihou.business.operationManagementCenter.dto.TTaskSaveDTO;
|
|
@@ -41,6 +43,7 @@ import com.github.zuihou.common.constant.BizConstant;
|
|
|
import com.github.zuihou.common.constant.CacheKey;
|
|
|
import com.github.zuihou.common.constant.DictionaryKey;
|
|
|
import com.github.zuihou.common.constant.ParameterKey;
|
|
|
+import com.github.zuihou.context.BaseContextHandler;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.LbqWrapper;
|
|
|
import com.github.zuihou.database.mybatis.conditions.query.QueryWrap;
|
|
|
import com.github.zuihou.log.annotation.SysLog;
|
|
@@ -112,6 +115,8 @@ public class ToolbarController {
|
|
|
private BomProcedureProductionresourceService bomProcedureProductionresourceService;
|
|
|
@Autowired
|
|
|
private OrderService orderService;
|
|
|
+ @Autowired
|
|
|
+ private AgvHikOrderDetailInfoService agvHikOrderDetailInfoService;
|
|
|
|
|
|
@ApiOperation(value = "更新库位位置", notes = "更新库位位置")
|
|
|
@PostMapping("/updateStorge")
|
|
@@ -795,5 +800,27 @@ public class ToolbarController {
|
|
|
return R.success();
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation(value = "AGV任务执行通知", notes = "AGV任务执行通知")
|
|
|
+ @PostMapping("/agvTaskNotice")
|
|
|
+ public R agvTaskNotice(@RequestBody Map data) {
|
|
|
+ BaseContextHandler.setTenant("0000");
|
|
|
+ String taskCode = data.containsKey("taskCode")? data.get("taskCode").toString() : null;
|
|
|
+ if(StringUtils.isEmpty(taskCode)) return R.fail("数据传参为空");
|
|
|
+ //判断是否允许继续执行任务 默认位true
|
|
|
+ boolean bool = true;
|
|
|
+ if(bool){
|
|
|
+ AgvHikOrderDetailInfo agvHikOrderDetailInfo = agvHikOrderDetailInfoService.getOne(new LbqWrapper<AgvHikOrderDetailInfo>().eq(AgvHikOrderDetailInfo::getTaskCode, taskCode).last("limit 1"));
|
|
|
+ if(null == agvHikOrderDetailInfo) return R.fail("任务编码传参有误");
|
|
|
+ String reqCode = agvHikOrderDetailInfo.getReqCode();
|
|
|
+ String agvContinueTaskUrl = (null == msgUtil.redis_get(ParameterKey.PARAMETERS)? "": ((Map<String,String>)msgUtil.redis_get(ParameterKey.PARAMETERS)).get(ParameterKey.CONTINUETASK).toString());
|
|
|
+ if(StringUtils.isEmpty(agvContinueTaskUrl)) return R.fail("继续执行任务接口地址为空");
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
+ params.put("reqCode", reqCode);
|
|
|
+ params.put("taskCode", taskCode);
|
|
|
+ msgUtil.httpForPost(agvContinueTaskUrl, params.toString());
|
|
|
+ }
|
|
|
+ return R.success();
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|