|
|
@ -17,6 +17,9 @@ import org.nl.wms.pda.service.PdaService; |
|
|
|
import org.nl.wms.sch.manage.ACSSystem; |
|
|
|
import org.nl.wms.sch.manage.CreateMode; |
|
|
|
import org.nl.wms.sch.manage.Region; |
|
|
|
import org.nl.wms.sch.task.call.material.FJCallMaterialTask; |
|
|
|
import org.nl.wms.sch.task.call.material.YZCallMaterialTask; |
|
|
|
import org.nl.wms.sch.task.send.material.FJSendMaterialTask; |
|
|
|
import org.nl.wms.sch.task.send.material.HLSendMaterialTask; |
|
|
|
import org.nl.wms.sch.task.send.material.YZSendMaterialTask; |
|
|
|
import org.nl.wms.sch.task.util.TaskUtils; |
|
|
@ -36,6 +39,12 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
|
|
|
|
private final YZSendMaterialTask yzSendMaterialTask; |
|
|
|
|
|
|
|
private final FJSendMaterialTask fjSendMaterialTask; |
|
|
|
|
|
|
|
private final YZCallMaterialTask yzCallMaterialTask; |
|
|
|
|
|
|
|
private final FJCallMaterialTask fjCallMaterialTask; |
|
|
|
|
|
|
|
@Override |
|
|
|
public JSONArray region(String func) { |
|
|
|
switch (func) { |
|
|
@ -204,6 +213,7 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
method_param.put("request_param", request_param); |
|
|
|
method_param.put("create_id", SecurityUtils.getCurrentUserId()); |
|
|
|
method_param.put("create_name", SecurityUtils.getCurrentNickName()); |
|
|
|
|
|
|
|
switch (region) { |
|
|
|
case HL: |
|
|
|
hlSendMaterialTask.createTask(method_param); |
|
|
@ -211,8 +221,43 @@ public class PdaServiceImpl implements PdaService { |
|
|
|
case YZ: |
|
|
|
yzSendMaterialTask.createTask(method_param); |
|
|
|
break; |
|
|
|
case FJ: |
|
|
|
fjSendMaterialTask.createTask(method_param); |
|
|
|
default: |
|
|
|
throw new BadRequestException("[" + region.label() + "] 不能发起送料任务!"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public void callMaterial(String point_code, String request_param) { |
|
|
|
JSONObject point = WQLObject |
|
|
|
.getWQLObject("sch_base_point") |
|
|
|
.query("is_used = '1' AND point_code = '" + point_code + "'") |
|
|
|
.uniqueResult(0); |
|
|
|
if (ObjectUtil.isEmpty(point)) { |
|
|
|
throw new BadRequestException("[" + point_code + "] 已删除或未启用!"); |
|
|
|
} |
|
|
|
|
|
|
|
JSONObject workorder = TaskUtils.hasWorkOrder(point); |
|
|
|
|
|
|
|
Region region = Region.get(point.getString("region_code")); |
|
|
|
JSONObject method_param = new JSONObject(); |
|
|
|
method_param.put("point", point); |
|
|
|
method_param.put("workorder", workorder); |
|
|
|
method_param.put("create_mode", CreateMode.SCCJ.value()); |
|
|
|
method_param.put("request_param", request_param); |
|
|
|
method_param.put("create_id", SecurityUtils.getCurrentUserId()); |
|
|
|
method_param.put("create_name", SecurityUtils.getCurrentNickName()); |
|
|
|
|
|
|
|
switch (region) { |
|
|
|
case YZ: |
|
|
|
yzCallMaterialTask.createTask(method_param); |
|
|
|
break; |
|
|
|
case FJ: |
|
|
|
fjCallMaterialTask.createTask(method_param); |
|
|
|
break; |
|
|
|
default: |
|
|
|
throw new BadRequestException("[" + region.label() + "] 不能发起叫料任务!"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|