代码更新

This commit is contained in:
2022-08-26 16:19:55 +08:00
parent b97e5f0cda
commit 37ebaf10da
5 changed files with 36 additions and 21 deletions

View File

@@ -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);

View File

@@ -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'

View File

@@ -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 <> ""