代码修复
This commit is contained in:
@@ -51,11 +51,14 @@ public class KilnServiceImpl implements KilnService {
|
||||
String point_status = jsonObject.getString("point_status");
|
||||
String ivt_qty = jsonObject.getString("ivt_qty");
|
||||
String is_full = jsonObject.getString("is_full");
|
||||
String area_type = jsonObject.getString("area_type"); //01:入窑,02:出窑
|
||||
String workprocedure_id = null;
|
||||
// wql表结构
|
||||
WQLObject structIvtTab = WQLObject.getWQLObject("ST_IVT_StructIvt");
|
||||
WQLObject vehicleGroupTab = WQLObject.getWQLObject("st_buss_vehiclegroup");
|
||||
WQLObject materialTab = WQLObject.getWQLObject("MD_ME_Material");
|
||||
WQLObject pointTab = WQLObject.getWQLObject("SCH_BASE_Point");
|
||||
WQLObject workProcedureTab = WQLObject.getWQLObject("PDM_BASE_workProcedure");
|
||||
// 共用对象
|
||||
JSONObject vehicleGroupObj = null; // 组盘信息
|
||||
if (ObjectUtil.isNotEmpty(vehicle_code)) {
|
||||
@@ -82,13 +85,19 @@ public class KilnServiceImpl implements KilnService {
|
||||
// 删除仓位库存
|
||||
structIvtTab.delete("struct_id = '" + jsonObject.getString("struct_id") + "'");
|
||||
} else {
|
||||
if (area_type.equals("01")) { // 入窑缓存库那边是压制,出窑是烧制
|
||||
workprocedure_id = workProcedureTab.query("workprocedure_code = '02").uniqueResult(0).getString("workprocedure_id");
|
||||
} else {
|
||||
workprocedure_id = workProcedureTab.query("workprocedure_code = '03").uniqueResult(0).getString("workprocedure_id");
|
||||
}
|
||||
|
||||
if (ObjectUtil.isEmpty(stockrecordId)) { // 仓位库存id为空,就插入
|
||||
JSONObject structIvt = new JSONObject();
|
||||
structIvt.put("stockrecord_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
structIvt.put("struct_id", jsonObject.getString("struct_id"));
|
||||
if (ObjectUtil.isNotEmpty(vehicle_code))
|
||||
structIvt.put("vehicle_code", vehicle_code);
|
||||
structIvt.put("workprocedure_id", jsonObject.getString("workprocedure_id"));
|
||||
structIvt.put("workprocedure_id", workprocedure_id);
|
||||
if (ObjectUtil.isNotEmpty(material_id))
|
||||
structIvt.put("material_id", material_id);
|
||||
structIvt.put("producetask_id", jsonObject.getString("producetask_id"));
|
||||
@@ -99,8 +108,13 @@ public class KilnServiceImpl implements KilnService {
|
||||
structIvt.put("frozen_qty", 0);
|
||||
structIvt.put("warehousing_qty", 0);
|
||||
structIvt.put("is_full", is_full);
|
||||
if (ObjectUtil.isNotEmpty(materialObj))
|
||||
// 入窑静置时间为物料上的静置时间,出窑则不要
|
||||
if (area_type.equals("02")) {
|
||||
structIvt.put("stewing_time", "0");
|
||||
} else if (ObjectUtil.isNotEmpty(materialObj)) {
|
||||
structIvt.put("stewing_time", materialObj.getString("stewing_time"));
|
||||
}
|
||||
structIvt.put("instorage_time", DateUtil.now());
|
||||
structIvtTab.insert(structIvt);
|
||||
} else { // 不为空就修改
|
||||
JSONObject structIvt = structIvtTab.query("stockrecord_id = '" + stockrecordId + "'").uniqueResult(0);
|
||||
@@ -109,13 +123,19 @@ public class KilnServiceImpl implements KilnService {
|
||||
if (ObjectUtil.isNotEmpty(material_id))
|
||||
structIvt.put("material_id", material_id);
|
||||
structIvt.put("producetask_id", jsonObject.getString("producetask_id"));
|
||||
structIvt.put("workprocedure_id", workprocedure_id);
|
||||
if (ObjectUtil.isNotEmpty(ivt_qty)) {
|
||||
structIvt.put("canuse_qty", ivt_qty);
|
||||
structIvt.put("ivt_qty", ivt_qty);
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(materialObj))
|
||||
// 入窑静置时间为物料上的静置时间,出窑则不要
|
||||
if (area_type.equals("02")) {
|
||||
structIvt.put("stewing_time", "0");
|
||||
} else if (ObjectUtil.isNotEmpty(materialObj)) {
|
||||
structIvt.put("stewing_time", materialObj.getString("stewing_time"));
|
||||
}
|
||||
structIvt.put("is_full", is_full);
|
||||
structIvt.put("instorage_time", DateUtil.now());
|
||||
structIvtTab.update(structIvt);
|
||||
}
|
||||
// 组盘表
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满拖" prop="is_full">
|
||||
<el-form-item label="是否满拖" prop="is_full" v-if="form.point_status !== '00'">
|
||||
<el-select v-model="form.is_full" filterable placeholder="请选择" style="width: 370px">
|
||||
<el-option
|
||||
v-for="item in dict.is_active"
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否满拖" prop="is_full">
|
||||
<el-form-item label="是否满拖" prop="is_full" v-if="form.point_status !== '00'">
|
||||
<el-select v-model="form.is_full" filterable placeholder="请选择" style="width: 370px">
|
||||
<el-option
|
||||
v-for="item in dict.is_active"
|
||||
|
||||
Reference in New Issue
Block a user