代码更新
This commit is contained in:
@@ -160,6 +160,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
WQLObject stockTab = WQLObject.getWQLObject("MD_ME_StockMaterialExt");
|
||||
WQLObject producTab = WQLObject.getWQLObject("md_me_producmaterialext");
|
||||
WQLObject materTab = WQLObject.getWQLObject("MD_ME_MaterialBase");
|
||||
WQLObject wrokTab = WQLObject.getWQLObject("PDM_BI_WorkProcedureParaProduct");
|
||||
//判断物料类别类型
|
||||
String material_type_id = MapUtil.getStr(map, "material_type_id");
|
||||
boolean is_bcp = materialbaseService.isAlongMaterType(MaterOptTypeEnum.BCP.getCode(), null, material_type_id);
|
||||
@@ -185,7 +186,6 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
jsonProduc.put("is_again_put", map.get("is_again_put"));
|
||||
jsonProduc.put("product_series", map.get("product_series"));
|
||||
jsonProduc.put("c_balance", map.get("c_balance"));
|
||||
jsonProduc.put("ball_time", map.get("ball_time"));
|
||||
jsonProduc.put("ball_speed", map.get("ball_speed"));
|
||||
jsonProduc.put("old_mark", map.get("old_mark"));
|
||||
jsonProduc.put("product_mode", map.get("product_mode"));
|
||||
@@ -198,7 +198,15 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
jsonProduc.put("technology_code", map.get("technology_code"));
|
||||
jsonProduc.put("ball_rate", map.get("ball_rate"));
|
||||
jsonProduc.put("liquid_rate", map.get("liquid_rate"));
|
||||
json.put("standard_mark", map.get("standard_mark"));
|
||||
jsonProduc.put("standard_mark", map.get("standard_mark"));
|
||||
// 更新产品工序工艺参数表 中球磨时间
|
||||
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
||||
jsonWork.put("value", map.get("qm_time"));
|
||||
wrokTab.update(jsonWork);
|
||||
} else {
|
||||
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
||||
}
|
||||
producTab.insert(jsonProduc);
|
||||
} else {
|
||||
json.put("standard_weight", map.get("standard_weight"));
|
||||
@@ -210,7 +218,6 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
json.put("is_again_put", map.get("is_again_put"));
|
||||
json.put("product_series", map.get("product_series"));
|
||||
json.put("c_balance", map.get("c_balance"));
|
||||
json.put("ball_time", map.get("ball_time"));
|
||||
json.put("ball_speed", map.get("ball_speed"));
|
||||
json.put("old_mark", map.get("old_mark"));
|
||||
json.put("product_mode", map.get("product_mode"));
|
||||
@@ -223,6 +230,14 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
json.put("ball_rate", map.get("ball_rate"));
|
||||
json.put("liquid_rate", map.get("liquid_rate"));
|
||||
json.put("standard_mark", map.get("standard_mark"));
|
||||
// 更新产品工序工艺参数表 中球磨时间
|
||||
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
||||
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
||||
jsonWork.put("value", map.get("qm_time"));
|
||||
wrokTab.update(jsonWork);
|
||||
} else {
|
||||
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
||||
}
|
||||
producTab.update(json);
|
||||
}
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + material_id + "' and is_delete = '0'").uniqueResult(0);
|
||||
|
||||
@@ -70,12 +70,15 @@
|
||||
e2.*,
|
||||
c2.class_name,
|
||||
c2.class_code,
|
||||
u2.unit_name
|
||||
u2.unit_name,
|
||||
work.value AS qm_time
|
||||
FROM
|
||||
MD_ME_MaterialBase m2
|
||||
LEFT JOIN MD_ME_ProducMaterialExt e2 ON m2.material_id = e2.material_id
|
||||
LEFT JOIN MD_PB_ClassStandard c2 ON c2.class_id = m2.material_type_id
|
||||
LEFT JOIN md_pb_measureunit u2 ON u2.measure_unit_id = m2.base_unit_id
|
||||
LEFT JOIN PDM_BI_WorkProcedureParaProduct work ON work.material_id = m2.material_id AND para_code = 'QM008'
|
||||
|
||||
WHERE
|
||||
m2.is_used = '1'
|
||||
AND m2.is_delete = '0'
|
||||
|
||||
@@ -69,7 +69,6 @@
|
||||
p.standard_weight AS produc_standard_weight,
|
||||
p.product_series,
|
||||
p.c_balance,
|
||||
p.ball_time,
|
||||
p.ball_speed,
|
||||
p.weight_lost_up,
|
||||
p.weight_lost_down,
|
||||
@@ -86,13 +85,15 @@
|
||||
m.material_height_type,
|
||||
b.class_name,
|
||||
b.class_code,
|
||||
u.unit_name
|
||||
u.unit_name,
|
||||
work.value AS qm_time
|
||||
FROM
|
||||
md_me_materialbase m
|
||||
LEFT JOIN md_me_stockmaterialext s ON m.material_id = s.material_id
|
||||
LEFT JOIN md_me_producmaterialext p ON m.material_id = p.material_id
|
||||
LEFT JOIN md_pb_classstandard b ON m.material_type_id = b.class_id
|
||||
LEFT JOIN md_pb_measureunit u ON u.measure_unit_id = m.base_unit_id
|
||||
LEFT JOIN PDM_BI_WorkProcedureParaProduct work ON work.material_id = m.material_id AND para_code = 'QM008'
|
||||
WHERE
|
||||
m.is_delete = '0'
|
||||
OPTION 输入.material_code <> ""
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
<el-table-column prop="produc_standard_weight" label="产品标准桶重" width="100px" :formatter="crud.formatNum3"/>
|
||||
<el-table-column prop="product_series" label="产品系列" :formatter="formatterName"/>
|
||||
<el-table-column prop="c_balance" label="碳平衡"/>
|
||||
<el-table-column prop="ball_time" label="球磨时间"/>
|
||||
<el-table-column prop="qm_time" label="球磨时间"/>
|
||||
<el-table-column prop="ball_speed" label="球磨转速"/>
|
||||
<el-table-column prop="product_ball_time" label="排产球磨时间" width="100px"/>
|
||||
<el-table-column prop="weight_lost_down" label="重损上限"/>
|
||||
|
||||
@@ -112,15 +112,10 @@
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="碳平衡" prop="c_balance">
|
||||
<el-input-number :precision="2" :step="0.01" :max="100" v-model="formData.c_balance" :controls="false" placeholder="%" style="width: 200px;"/>
|
||||
<el-form-item label="球磨时间">
|
||||
<el-input-number :precision="2" :step="0.1" :max="1000" v-model="formData.qm_time" :controls="false" placeholder="小时" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="8">
|
||||
<el-form-item label="球磨时间" prop="ball_time">
|
||||
<el-input-number :precision="2" :step="0.1" :max="1000" v-model="formData.ball_time" :controls="false" placeholder="小时" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>-->
|
||||
<el-col :span="8">
|
||||
<el-form-item label="球磨转速" prop="ball_speed">
|
||||
<el-input-number :precision="2" :step="0.1" v-model="formData.ball_speed" :controls="false" placeholder="每分钟" style="width: 200px;"/>
|
||||
@@ -217,9 +212,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否允许自动开单" prop="is_auto_open">
|
||||
<el-radio v-model="formData.is_auto_open" label="0">否</el-radio>
|
||||
<el-radio v-model="formData.is_auto_open" label="1">是</el-radio>
|
||||
<el-form-item label="碳平衡" prop="c_balance">
|
||||
<el-input-number :precision="2" :step="0.01" :max="100" v-model="formData.c_balance" :controls="false" placeholder="%" style="width: 200px;"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
@@ -244,6 +238,12 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="是否允许自动开单" prop="is_auto_open">
|
||||
<el-radio v-model="formData.is_auto_open" label="0">否</el-radio>
|
||||
<el-radio v-model="formData.is_auto_open" label="1">是</el-radio>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span="16">
|
||||
<el-form-item label="控制记录卡打印模板">
|
||||
<el-input v-model="file_name" disabled style="width: 200px;" />
|
||||
@@ -376,10 +376,6 @@ export default {
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
ball_time: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
],
|
||||
ball_speed: [
|
||||
{ required: true, message: '不能为空', trigger: 'blur' },
|
||||
{ validator: numberOne }
|
||||
|
||||
Reference in New Issue
Block a user