物料参数更新
This commit is contained in:
@@ -12,6 +12,7 @@ import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.utils.SecurityUtils;
|
||||
import org.nl.wms.basedata.master.constant.MaterOptTypeEnum;
|
||||
import org.nl.wms.basedata.master.service.ClassstandardService;
|
||||
@@ -166,6 +167,8 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
|
||||
if (is_bcp) {
|
||||
//半成品
|
||||
String technology_code = MapUtil.getStr(map, "technology_code");
|
||||
if (technology_code.length() > 1) throw new BadRequestException("工艺代码长度大于1");
|
||||
String material_id = (String) map.get("material_id");
|
||||
JSONObject json = producTab.query("material_id= '" + material_id + "'").uniqueResult(0);
|
||||
if (ObjectUtil.isEmpty(json)) {
|
||||
@@ -192,6 +195,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
jsonProduc.put("product_ball_code", map.get("product_ball_code"));
|
||||
jsonProduc.put("is_need_move", map.get("is_need_move"));
|
||||
jsonProduc.put("net_rate", map.get("net_rate"));
|
||||
jsonProduc.put("technology_code", map.get("technology_code"));
|
||||
producTab.insert(jsonProduc);
|
||||
} else {
|
||||
json.put("standard_weight", map.get("standard_weight"));
|
||||
@@ -212,6 +216,7 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
json.put("weight_lost_down", map.get("weight_lost_down"));
|
||||
json.put("is_need_move", map.get("is_need_move"));
|
||||
json.put("net_rate", map.get("net_rate"));
|
||||
json.put("technology_code", map.get("technology_code"));
|
||||
producTab.update(json);
|
||||
}
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + material_id + "' and is_delete = '0'").uniqueResult(0);
|
||||
|
||||
@@ -76,6 +76,7 @@
|
||||
p.standard_weight_pft,
|
||||
p.is_need_move AS product_is_need_move,
|
||||
p.net_rate,
|
||||
p.technology_code,
|
||||
m.is_used,
|
||||
m.update_optname,
|
||||
m.update_time,
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user