opt:一期部署测试修改
This commit is contained in:
@@ -54,7 +54,8 @@ public class AcsUtil {
|
||||
String url = acsUrlParam.getValue() + api;
|
||||
try {
|
||||
String resultMsg = HttpRequest.post(url)
|
||||
.body(String.valueOf(param))
|
||||
// .body(String.valueOf(param))
|
||||
.body(JSONObject.toJSONString(param))
|
||||
.execute().body();
|
||||
// 格式转换
|
||||
JSONObject result = JSONObject.parseObject(resultMsg);
|
||||
|
||||
@@ -85,9 +85,20 @@ public class VoiceCallbackService {
|
||||
|
||||
@Transactional
|
||||
public JSONObject handleInboundTask(InboundTaskRequest inboundTaskRequest){
|
||||
// SchBasePoint one = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
// SchBasePoint point_code2 = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
// .eq(SchBasePoint::getPoint_code, inboundTaskRequest.getLocationFrom()));
|
||||
SchBasePoint one = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
Structattr point_code2 = iStructattrService.getOne(new LambdaQueryWrapper<Structattr>()
|
||||
.eq(Structattr::getStruct_code, inboundTaskRequest.getLocationFrom()));
|
||||
if (point_code2 == null){
|
||||
throw new BadRequestException(inboundTaskRequest.getLocationFrom() + "货位不存在");
|
||||
}
|
||||
if (!point_code2.getLock_type().equals(IOSEnum.LOCK_TYPE.code("未锁定"))){
|
||||
throw new BadRequestException("当前货位已锁定");
|
||||
}
|
||||
if (!StringUtils.isEmpty(point_code2.getStoragevehicle_code())){
|
||||
throw new BadRequestException("当前仓位已占用");
|
||||
}
|
||||
SchBasePoint point_code1 = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
.eq(SchBasePoint::getPoint_code, "RKD01"));
|
||||
//分配仓位
|
||||
MdMeMaterialbase meMaterialbase = iMdMeMaterialbaseService.getByCode(inboundTaskRequest.getMaterial());
|
||||
@@ -95,7 +106,7 @@ public class VoiceCallbackService {
|
||||
GroupPlate groupDao = GroupPlate.builder()
|
||||
.group_id(IdUtil.getStringId())
|
||||
.material_id(meMaterialbase.getMaterial_id())
|
||||
.storagevehicle_code(one.getVehicle_code())
|
||||
.storagevehicle_code(point_code1.getVehicle_code())
|
||||
.pcsn("111")
|
||||
.qty_unit_id(meMaterialbase.getQty_unit_id())
|
||||
.qty_unit_name(meMaterialbase.getQty_unit_name())
|
||||
@@ -106,25 +117,26 @@ public class VoiceCallbackService {
|
||||
.create_time(DateUtil.now())
|
||||
.build();
|
||||
iMdPbGroupplateService.save(groupDao);
|
||||
StrategyMater mater = new StrategyMater();
|
||||
mater.setMaterial_code(inboundTaskRequest.getMaterial());
|
||||
mater.setMaterial_id(meMaterialbase.getMaterial_id());
|
||||
mater.setQty(new BigDecimal(inboundTaskRequest.getQty()));
|
||||
mater.setPcsn("111");
|
||||
List<StrategyMater> materss = new ArrayList<>();
|
||||
materss.add(mater);
|
||||
List<Structattr> structattrs = iStructattrService.inBoundSectDiv(
|
||||
StrategyStructParam.builder()
|
||||
.ioType(StatusEnum.STRATEGY_TYPE.code("入库"))
|
||||
.sect_code("YL01")
|
||||
.stor_code("YL")
|
||||
.storagevehicle_code(one.getVehicle_code())
|
||||
.strategyMaters(materss)
|
||||
.build());
|
||||
if (CollectionUtils.isEmpty(structattrs)) {
|
||||
throw new BadRequestException("无可用货位");
|
||||
}
|
||||
Structattr attrDao = structattrs.get(0);
|
||||
// StrategyMater mater = new StrategyMater();
|
||||
// mater.setMaterial_code(inboundTaskRequest.getMaterial());
|
||||
// mater.setMaterial_id(meMaterialbase.getMaterial_id());
|
||||
// mater.setQty(new BigDecimal(inboundTaskRequest.getQty()));
|
||||
// mater.setPcsn("1");
|
||||
// List<StrategyMater> materss = new ArrayList<>();
|
||||
// materss.add(mater);
|
||||
// List<Structattr> structattrs = iStructattrService.inBoundSectDiv(
|
||||
// StrategyStructParam.builder()
|
||||
// .ioType(StatusEnum.STRATEGY_TYPE.code("入库"))
|
||||
// .sect_code("YL01")
|
||||
// .stor_code("YL")
|
||||
// .storagevehicle_code(point_code1.getVehicle_code())
|
||||
// .strategyMaters(materss)
|
||||
// .build());
|
||||
// if (CollectionUtils.isEmpty(structattrs)) {
|
||||
// throw new BadRequestException("无可用货位");
|
||||
// }
|
||||
// Structattr attrDao = structattrs.get(0);
|
||||
|
||||
//确定起点
|
||||
// SchBasePoint schBasePoint = iSchBasePointService.getOne(new LambdaQueryWrapper<SchBasePoint>()
|
||||
// .eq(SchBasePoint::getPoint_code, inboundTaskRequest.getLocationFrom()));
|
||||
@@ -133,16 +145,16 @@ public class VoiceCallbackService {
|
||||
// }
|
||||
JSONObject whereJson = new JSONObject();
|
||||
// whereJson.put("point_code1", "RKD01");
|
||||
// whereJson.put("point_code1", schBasePoint.getPoint_code());
|
||||
whereJson.put("point_code1", point_code1.getPoint_code());
|
||||
//确定终点
|
||||
// whereJson.put("point_code2", attrDao.getStruct_code());
|
||||
whereJson.put("vehicle_code", one.getVehicle_code());
|
||||
whereJson.put("task_type", "STInTask");
|
||||
whereJson.put("point_code2", point_code2.getStruct_code());
|
||||
whereJson.put("vehicle_code", point_code1.getVehicle_code());
|
||||
whereJson.put("config_code", "BackInTask");
|
||||
whereJson.put("TaskCode", CodeUtil.getNewCode("TASK_CODE"));
|
||||
whereJson.put("PickingLocation", "RKD01");
|
||||
whereJson.put("PlacedLocation", attrDao.getStruct_code());
|
||||
// whereJson.put("PickingLocation", "RKD01");
|
||||
// whereJson.put("PlacedLocation", point_code2.getStruct_code());
|
||||
//创建任务
|
||||
String taskId = applyTaskMap.get("STInTask").create(whereJson);
|
||||
String taskId = applyTaskMap.get("BackInTask").create(whereJson);
|
||||
// 更新起点绑定id
|
||||
iSchBasePointService.update(
|
||||
new UpdateWrapper<SchBasePoint>().lambda()
|
||||
@@ -151,7 +163,7 @@ public class VoiceCallbackService {
|
||||
);
|
||||
// 更新终点锁定状态
|
||||
JSONObject lock_map = new JSONObject();
|
||||
lock_map.put("struct_code", attrDao.getStruct_code());
|
||||
lock_map.put("struct_code", point_code2.getStruct_code());
|
||||
lock_map.put("inv_id", null);
|
||||
lock_map.put("inv_code", null);
|
||||
lock_map.put("inv_type", null);
|
||||
|
||||
@@ -16,7 +16,7 @@ import java.util.concurrent.CompletionStage;
|
||||
@Component
|
||||
public class AsrTtsClient {
|
||||
|
||||
@Value("${vc.base-url:http://127.0.0.1:5000}")
|
||||
@Value("${vc.base-url:http://127.0.0.1:8080}")
|
||||
private String vcBaseUrl;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user