代码更新
This commit is contained in:
@@ -165,6 +165,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
|||||||
String material_type_id = MapUtil.getStr(map, "material_type_id");
|
String material_type_id = MapUtil.getStr(map, "material_type_id");
|
||||||
boolean is_bcp = materialbaseService.isAlongMaterType(MaterOptTypeEnum.BCP.getCode(), null, material_type_id);
|
boolean is_bcp = materialbaseService.isAlongMaterType(MaterOptTypeEnum.BCP.getCode(), null, material_type_id);
|
||||||
boolean is_yfl = materialbaseService.isAlongMaterType(MaterOptTypeEnum.YL_AND_FL.getCode(), null, material_type_id);
|
boolean is_yfl = materialbaseService.isAlongMaterType(MaterOptTypeEnum.YL_AND_FL.getCode(), null, material_type_id);
|
||||||
|
boolean is_rf = materialbaseService.isAlongMaterType(MaterOptTypeEnum.RF.getCode(), null, material_type_id);
|
||||||
|
|
||||||
if (is_bcp) {
|
if (is_bcp) {
|
||||||
//半成品
|
//半成品
|
||||||
@@ -200,6 +201,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
|||||||
jsonProduc.put("liquid_rate", map.get("liquid_rate"));
|
jsonProduc.put("liquid_rate", map.get("liquid_rate"));
|
||||||
jsonProduc.put("standard_mark", map.get("standard_mark"));
|
jsonProduc.put("standard_mark", map.get("standard_mark"));
|
||||||
// 更新产品工序工艺参数表 中球磨时间
|
// 更新产品工序工艺参数表 中球磨时间
|
||||||
|
if (!is_rf) {
|
||||||
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
||||||
jsonWork.put("value", map.get("qm_time"));
|
jsonWork.put("value", map.get("qm_time"));
|
||||||
@@ -207,6 +209,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
|||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
producTab.insert(jsonProduc);
|
producTab.insert(jsonProduc);
|
||||||
} else {
|
} else {
|
||||||
json.put("standard_weight", map.get("standard_weight"));
|
json.put("standard_weight", map.get("standard_weight"));
|
||||||
@@ -231,6 +234,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
|||||||
json.put("liquid_rate", map.get("liquid_rate"));
|
json.put("liquid_rate", map.get("liquid_rate"));
|
||||||
json.put("standard_mark", map.get("standard_mark"));
|
json.put("standard_mark", map.get("standard_mark"));
|
||||||
// 更新产品工序工艺参数表 中球磨时间
|
// 更新产品工序工艺参数表 中球磨时间
|
||||||
|
if (!is_rf) {
|
||||||
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
JSONObject jsonWork = wrokTab.query("material_id = '" + material_id + "' and para_code = 'QM008'").uniqueResult(0);
|
||||||
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
if (ObjectUtil.isNotEmpty(jsonWork)) {
|
||||||
jsonWork.put("value", map.get("qm_time"));
|
jsonWork.put("value", map.get("qm_time"));
|
||||||
@@ -238,6 +242,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
|||||||
} else {
|
} else {
|
||||||
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
throw new BadRequestException("请先前往产品工艺参数设置页面设置球磨时间");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
producTab.update(json);
|
producTab.update(json);
|
||||||
}
|
}
|
||||||
JSONObject jsonMater = materTab.query("material_id = '" + material_id + "' and is_delete = '0'").uniqueResult(0);
|
JSONObject jsonMater = materTab.query("material_id = '" + material_id + "' and is_delete = '0'").uniqueResult(0);
|
||||||
|
|||||||
Reference in New Issue
Block a user