代码更新
This commit is contained in:
@@ -29,8 +29,8 @@ public class CallMaterialServiceImpl implements CallMaterialService {
|
||||
JSONArray pointArr = WQL.getWO("PDA_CALLMATERIAL_01").addParam("flag", "2").addParam("region_id", jsonRegion.getString("region_id")).process().getResultJSONArray(0);
|
||||
jsonRegion.put("pointArr", pointArr);
|
||||
}
|
||||
resultJson.put("result", regionArr);
|
||||
result.put("srb", resultJson);
|
||||
resultJson.put("regionja", regionArr);
|
||||
result.put("result", resultJson);
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
@@ -47,11 +47,11 @@ public class CallMaterialServiceImpl implements CallMaterialService {
|
||||
// 2、调用接口
|
||||
JSONObject json = acsToWmsService.apply(param);
|
||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "1");
|
||||
result.put("desc", "操作成功");
|
||||
} else {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "0");
|
||||
result.put("desc", "操作失败:"+json.getString("message"));
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "手持呼叫空托盘")
|
||||
@RequestMapping("api/pda/callVehicle")
|
||||
@RequestMapping("api/pda/callEmpty")
|
||||
@Slf4j
|
||||
public class CallVehicleController {
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.pda.callvehicle.service.CallVehicleService;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -30,8 +31,8 @@ public class CallVehicleServiceImpl implements CallVehicleService {
|
||||
JSONArray pointArr = WQL.getWO("PDA_CALLVEHICLE_01").addParam("flag", "2").addParam("region_id", jsonRegion.getString("region_id")).process().getResultJSONArray(0);
|
||||
jsonRegion.put("pointArr", pointArr);
|
||||
}
|
||||
resultJson.put("result", regionArr);
|
||||
result.put("srb", resultJson);
|
||||
resultJson.put("regionja", regionArr);
|
||||
result.put("result", resultJson);
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
@@ -43,17 +44,23 @@ public class CallVehicleServiceImpl implements CallVehicleService {
|
||||
JSONObject result = new JSONObject();
|
||||
// 1、准备参数:point_code、type:1为共挤区域,3为油漆区域
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("type",whereJson.getString("type"));
|
||||
|
||||
String region_id = whereJson.getString("region_id");
|
||||
JSONObject jsonObject = WQLObject.getWQLObject("sch_base_region").query("region_id ='" + region_id + "'").uniqueResult(0);
|
||||
String region_code = jsonObject.getString("region_code");
|
||||
if (StrUtil.equals(region_code, "GJQY01")) param.put("type","1");
|
||||
if (StrUtil.equals(region_code, "YQQY01")) param.put("type","3");
|
||||
|
||||
param.put("point_code",whereJson.getString("point_code"));
|
||||
param.put("qty",whereJson.getString("qty"));
|
||||
param.put("vehicle_num",whereJson.getString("qty"));
|
||||
// 2、调用接口
|
||||
JSONObject json = acsToWmsService.apply(param);
|
||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "1");
|
||||
result.put("desc", "操作成功");
|
||||
} else {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "0");
|
||||
result.put("desc", "操作失败:"+json.getString("message"));
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.ext.acs.service.AcsToWmsService;
|
||||
import org.nl.wms.pda.sendmaterial.service.SendMaterialService;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -30,8 +31,8 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
JSONArray pointArr = WQL.getWO("PDA_SENDMATERIAL_01").addParam("flag", "2").addParam("region_id", jsonRegion.getString("region_id")).process().getResultJSONArray(0);
|
||||
jsonRegion.put("pointArr", pointArr);
|
||||
}
|
||||
resultJson.put("result", regionArr);
|
||||
result.put("srb", resultJson);
|
||||
resultJson.put("regionja", regionArr);
|
||||
result.put("result", resultJson);
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
@@ -43,17 +44,23 @@ public class SendMaterialServiceImpl implements SendMaterialService {
|
||||
JSONObject result = new JSONObject();
|
||||
// 1、准备参数:point_code、type:2为共挤区域,8为豪凯区域
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("type",whereJson.getString("type"));
|
||||
|
||||
String region_id = whereJson.getString("region_id");
|
||||
JSONObject jsonObject = WQLObject.getWQLObject("sch_base_region").query("region_id ='" + region_id + "'").uniqueResult(0);
|
||||
String region_code = jsonObject.getString("region_code");
|
||||
if (StrUtil.equals(region_code, "GJQY01")) param.put("type","2");
|
||||
if (StrUtil.equals(region_code, "HKQY01")) param.put("type","8");
|
||||
|
||||
param.put("point_code",whereJson.getString("point_code"));
|
||||
param.put("qty",whereJson.getString("qty"));
|
||||
// 2、调用接口
|
||||
JSONObject json = acsToWmsService.apply(param);
|
||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "1");
|
||||
result.put("desc", "操作成功");
|
||||
} else {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "0");
|
||||
result.put("desc", "操作失败:"+json.getString("message"));
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "手持送空托盘")
|
||||
@RequestMapping("api/pda/sendVehicle")
|
||||
@RequestMapping("api/pda/sendEmpty")
|
||||
@Slf4j
|
||||
public class SendVehicleController {
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ import org.nl.wms.pda.callvehicle.service.CallVehicleService;
|
||||
import org.nl.wms.pda.sendvehicle.service.SendVehicleService;
|
||||
import org.nl.wms.sch.tasks.RegionTypeEnum;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.WQLObject;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@@ -37,8 +38,8 @@ public class SendVehicleServiceImpl implements SendVehicleService {
|
||||
jsonRegion.put("pointArr", pointArr);
|
||||
}
|
||||
}
|
||||
resultJson.put("result", regionArr);
|
||||
result.put("srb", resultJson);
|
||||
resultJson.put("regionja", regionArr);
|
||||
result.put("result", resultJson);
|
||||
result.put("code", "1");
|
||||
result.put("desc", "查询成功");
|
||||
return result;
|
||||
@@ -50,18 +51,24 @@ public class SendVehicleServiceImpl implements SendVehicleService {
|
||||
JSONObject result = new JSONObject();
|
||||
// 1、准备参数:point_code、type:6为输送线区域,5为油漆区域
|
||||
JSONObject param = new JSONObject();
|
||||
param.put("type",whereJson.getString("type"));
|
||||
|
||||
String region_id = whereJson.getString("region_id");
|
||||
JSONObject jsonObject = WQLObject.getWQLObject("sch_base_region").query("region_id ='" + region_id + "'").uniqueResult(0);
|
||||
String region_code = jsonObject.getString("region_code");
|
||||
if (StrUtil.equals(region_code, "SSX01")) param.put("type","6");
|
||||
if (StrUtil.equals(region_code, "YQQY01")) param.put("type","5");
|
||||
|
||||
param.put("point_code",whereJson.getString("point_code"));
|
||||
param.put("vehicle_code",whereJson.getString("vehicle_code"));
|
||||
param.put("qty",whereJson.getString("qty"));
|
||||
param.put("vehicle_num",whereJson.getString("qty"));
|
||||
// 2、调用接口
|
||||
JSONObject json = acsToWmsService.apply(param);
|
||||
if (StrUtil.equals(json.getString("status"), "200")) {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "1");
|
||||
result.put("desc", "操作成功");
|
||||
} else {
|
||||
result.put("srb", "");
|
||||
result.put("result", "");
|
||||
result.put("code", "0");
|
||||
result.put("desc", "操作失败:"+json.getString("message"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user