物料的uuid的类型修改

This commit is contained in:
18188916393
2022-07-07 17:24:10 +08:00
parent 41e366f488
commit 57b72824e8
3 changed files with 27 additions and 63 deletions

View File

@@ -168,12 +168,12 @@ public class PointServiceImpl implements PointService {
//如果是仓位点位,更新状态前,先去查询仓位点位所对应的库区是否启用,如果禁用抛出异常 //如果是仓位点位,更新状态前,先去查询仓位点位所对应的库区是否启用,如果禁用抛出异常
String struct_id = json.getString("point_id"); String struct_id = json.getString("point_id");
String point_type = json.getString("point_type"); 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); 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"); 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); 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("启用失败,请检查仓位点位所属库区是否启用!"); throw new BadRequestException("启用失败,请检查仓位点位所属库区是否启用!");
} }
} }
@@ -240,15 +240,15 @@ public class PointServiceImpl implements PointService {
String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code"); String vehicle_code = MapUtil.getStr(whereJson, "vehicle_code");
WQLObject wo_vehicle = WQLObject.getWQLObject("md_pb_vehicle"); WQLObject wo_vehicle = WQLObject.getWQLObject("md_pb_vehicle");
String vehicle_type = ""; 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); JSONObject jsonObject = wo_vehicle.query("is_delete = '0' and vehicle_code = '" + vehicle_code + "'").uniqueResult(0);
vehicle_type = jsonObject.getString("vehicle_type"); vehicle_type = jsonObject.getString("vehicle_type");
} }
JSONObject map = new JSONObject(); JSONObject map = new JSONObject();
map.put("flag","3"); map.put("flag", "3");
map.put("area_type",area_type); map.put("area_type", area_type);
map.put("vehicle_type",vehicle_type); map.put("vehicle_type", vehicle_type);
map.put("material_id",material_id); map.put("material_id", material_id);
if (ObjectUtil.isNotEmpty(search)) { if (ObjectUtil.isNotEmpty(search)) {
map.put("search", "%" + search + "%"); map.put("search", "%" + search + "%");
} }
@@ -259,23 +259,27 @@ public class PointServiceImpl implements PointService {
@Override @Override
public void getPointStatuAndChage(JSONArray ja) { public void getPointStatuAndChage(JSONArray ja) {
//发起请求获取数据 //发起请求获取数据
try {
JSONObject jsona = AcsUtil.notifyAcs("/api/wms/getPointStatus", ja); JSONObject jsona = AcsUtil.notifyAcs("/api/wms/getPointStatus", ja);
JSONArray arr = jsona.getJSONArray("key"); JSONArray arr = jsona.getJSONArray("key");
WQLObject wql = WQLObject.getWQLObject("sch_base_point"); WQLObject wql = WQLObject.getWQLObject("sch_base_point");
for (int i = 0; i < arr.size(); i++) { for (int i = 0; i < arr.size(); i++) {
JSONObject jsonObject = ja.getJSONObject(i); JSONObject jsonObject = ja.getJSONObject(i);
Long point_id = (Long) jsonObject.get("point_id"); Long point_code = (Long) jsonObject.get("device_code");
String point_status = (String) jsonObject.get("point_status"); //0 无货 1 有货 2 有箱有料子
String point_status = (String) jsonObject.get("move");
String vehicle_code = (String) jsonObject.get("barcode");
//获得单条数据 //获得单条数据
JSONObject jo = wql.query("point_id='" + point_id + "'").uniqueResult(0); JSONObject jo = wql.query("point_code='" + point_code + "'").uniqueResult(0);
jo.put("point_status",point_status); 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);
}
//获取数据表,更新状态 //获取数据表,更新状态
wql.update(jo); wql.update(jo);
} }
} catch (Exception e) {
e.printStackTrace();
}
} }
} }

View File

@@ -168,26 +168,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户名称">
<el-select v-model="form.cust_id" filterable clearable class="filter-item" style="width: 200px" placeholder="请选择客户">
<el-option
v-for="item in custList"
:key="item.cust_id"
:label="item.cust_name"
:value="item.cust_id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="黏次">
<label slot="label">黏&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次</label>
<el-input v-model="form.mix_seq" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否满托" prop="is_full"> <el-form-item label="是否满托" prop="is_full">
@@ -358,26 +338,6 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="客户名称">
<el-select v-model="form1.cust_id" filterable clearable class="filter-item" style="width: 200px" placeholder="请选择客户">
<el-option
v-for="item in custList"
:key="item.cust_id"
:label="item.cust_name"
:value="item.cust_id"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="黏次">
<label slot="label">黏&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;次</label>
<el-input v-model="form1.mix_seq" style="width: 200px;" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="是否满托"> <el-form-item label="是否满托">