物料的uuid的类型修改
This commit is contained in:
@@ -168,12 +168,12 @@ public class PointServiceImpl implements PointService {
|
||||
//如果是仓位点位,更新状态前,先去查询仓位点位所对应的库区是否启用,如果禁用抛出异常
|
||||
String struct_id = json.getString("point_id");
|
||||
String point_type = json.getString("point_type");
|
||||
if (point_type.equals("02")){
|
||||
if (point_type.equals("02")) {
|
||||
JSONObject st_ivt_bsRealStorAttr = WQLObject.getWQLObject("ST_IVT_StructAttr").query(" struct_id = '" + struct_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(st_ivt_bsRealStorAttr)){
|
||||
if (ObjectUtil.isNotEmpty(st_ivt_bsRealStorAttr)) {
|
||||
String sect_id = st_ivt_bsRealStorAttr.getString("sect_id");
|
||||
JSONObject st_ivt_sectAttr = WQLObject.getWQLObject("ST_IVT_SectAttr").query(" sect_id = '" + sect_id + "' and is_used = '1'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(st_ivt_sectAttr)){
|
||||
if (ObjectUtil.isEmpty(st_ivt_sectAttr)) {
|
||||
throw new BadRequestException("启用失败,请检查仓位点位所属库区是否启用!");
|
||||
}
|
||||
}
|
||||
@@ -240,15 +240,15 @@ public class PointServiceImpl implements PointService {
|
||||
String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
|
||||
WQLObject wo_vehicle = WQLObject.getWQLObject("md_pb_vehicle");
|
||||
String vehicle_type = "";
|
||||
if (StrUtil.isNotEmpty(vehicle_code)){
|
||||
if (StrUtil.isNotEmpty(vehicle_code)) {
|
||||
JSONObject jsonObject = wo_vehicle.query("is_delete = '0' and vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
|
||||
vehicle_type = jsonObject.getString("vehicle_type");
|
||||
}
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("flag","3");
|
||||
map.put("area_type",area_type);
|
||||
map.put("vehicle_type",vehicle_type);
|
||||
map.put("material_id",material_id);
|
||||
map.put("flag", "3");
|
||||
map.put("area_type", area_type);
|
||||
map.put("vehicle_type", vehicle_type);
|
||||
map.put("material_id", material_id);
|
||||
if (ObjectUtil.isNotEmpty(search)) {
|
||||
map.put("search", "%" + search + "%");
|
||||
}
|
||||
@@ -259,23 +259,27 @@ public class PointServiceImpl implements PointService {
|
||||
@Override
|
||||
public void getPointStatuAndChage(JSONArray ja) {
|
||||
//发起请求获取数据
|
||||
try {
|
||||
JSONObject jsona = AcsUtil.notifyAcs("/api/wms/getPointStatus", ja);
|
||||
JSONArray arr = jsona.getJSONArray("key");
|
||||
WQLObject wql = WQLObject.getWQLObject("sch_base_point");
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jsonObject = ja.getJSONObject(i);
|
||||
Long point_id = (Long) jsonObject.get("point_id");
|
||||
String point_status = (String) jsonObject.get("point_status");
|
||||
//获得单条数据
|
||||
JSONObject jo = wql.query("point_id='" + point_id + "'").uniqueResult(0);
|
||||
jo.put("point_status",point_status);
|
||||
//获取数据表,更新状态
|
||||
wql.update(jo);
|
||||
JSONObject jsona = AcsUtil.notifyAcs("/api/wms/getPointStatus", ja);
|
||||
JSONArray arr = jsona.getJSONArray("key");
|
||||
WQLObject wql = WQLObject.getWQLObject("sch_base_point");
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jsonObject = ja.getJSONObject(i);
|
||||
Long point_code = (Long) jsonObject.get("device_code");
|
||||
//0 无货 1 有货 2 有箱有料子
|
||||
String point_status = (String) jsonObject.get("move");
|
||||
String vehicle_code = (String) jsonObject.get("barcode");
|
||||
//获得单条数据
|
||||
JSONObject jo = wql.query("point_code='" + point_code + "'").uniqueResult(0);
|
||||
jo.put("point_status", point_status);
|
||||
String point_type = jo.getString("point_type");
|
||||
//假如是输送线,将托盘号更新
|
||||
if (StrUtil.equals(point_type, "07")) {
|
||||
jo.put("vehicle_code", vehicle_code);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
//获取数据表,更新状态
|
||||
wql.update(jo);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user