|
@ -39,6 +39,11 @@ public class YZSendMaterialTask extends AbstractAcsTask { |
|
|
public String createTask(JSONObject form) { |
|
|
public String createTask(JSONObject form) { |
|
|
JSONObject point = form.getJSONObject("point"); |
|
|
JSONObject point = form.getJSONObject("point"); |
|
|
JSONObject work_order = form.getJSONObject("workorder"); |
|
|
JSONObject work_order = form.getJSONObject("workorder"); |
|
|
|
|
|
int priority = TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? 50 : 1; |
|
|
|
|
|
JSONObject device = form.getJSONObject("device"); |
|
|
|
|
|
if (ObjectUtil.isNotEmpty(device) && "4".equals(device.getString("device_model"))) { |
|
|
|
|
|
++priority; |
|
|
|
|
|
} |
|
|
JSONObject vd = form.getJSONObject("vd"); |
|
|
JSONObject vd = form.getJSONObject("vd"); |
|
|
|
|
|
|
|
|
JSONObject task = TaskUtils.buildTask( |
|
|
JSONObject task = TaskUtils.buildTask( |
|
@ -47,10 +52,11 @@ public class YZSendMaterialTask extends AbstractAcsTask { |
|
|
TaskStatus.SURE_START.value(), |
|
|
TaskStatus.SURE_START.value(), |
|
|
point.getString("point_code"), |
|
|
point.getString("point_code"), |
|
|
null, |
|
|
null, |
|
|
|
|
|
vd.getString("vd_id"), |
|
|
vd.getString("material_id"), |
|
|
vd.getString("material_id"), |
|
|
vd.getString("vehicle_type"), |
|
|
vd.getString("vehicle_type"), |
|
|
vd.getString("vehicle_code"), |
|
|
vd.getString("vehicle_code"), |
|
|
TrueOrFalse.trueOrFalse(work_order.getString("is_urgent")) ? "99" : "1", |
|
|
priority, |
|
|
YZSendMaterialTask.class.getName(), |
|
|
YZSendMaterialTask.class.getName(), |
|
|
form.getString("create_mode"), |
|
|
form.getString("create_mode"), |
|
|
form.getString("request_param"), |
|
|
form.getString("request_param"), |
|
|