代码更新
This commit is contained in:
@@ -196,6 +196,8 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
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"));
|
||||
jsonProduc.put("ball_rate", map.get("ball_rate"));
|
||||
jsonProduc.put("liquid_rate", map.get("liquid_rate"));
|
||||
producTab.insert(jsonProduc);
|
||||
} else {
|
||||
json.put("standard_weight", map.get("standard_weight"));
|
||||
@@ -217,6 +219,8 @@ public class MaterialParametersServiceImpl implements MaterialParametersService
|
||||
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"));
|
||||
json.put("ball_rate", map.get("ball_rate"));
|
||||
json.put("liquid_rate", map.get("liquid_rate"));
|
||||
producTab.update(json);
|
||||
}
|
||||
JSONObject jsonMater = materTab.query("material_id = '" + material_id + "' and is_delete = '0'").uniqueResult(0);
|
||||
|
||||
@@ -77,6 +77,8 @@
|
||||
p.is_need_move AS product_is_need_move,
|
||||
p.net_rate,
|
||||
p.technology_code,
|
||||
p.ball_rate,
|
||||
p.liquid_rate,
|
||||
m.is_used,
|
||||
m.update_optname,
|
||||
m.update_time,
|
||||
|
||||
Binary file not shown.
@@ -4,10 +4,12 @@ import cn.hutool.core.date.DateUtil;
|
||||
import cn.hutool.core.map.MapUtil;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
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;
|
||||
@@ -182,9 +184,19 @@ public class ProductProcessParamServiceImpl implements ProductProcessParamServic
|
||||
Long currentUserId = SecurityUtils.getCurrentUserId();
|
||||
String nickName = SecurityUtils.getNickName();
|
||||
String now = DateUtil.now();
|
||||
String jx1 = "";
|
||||
String jx2 = "";
|
||||
|
||||
for (int i = 0; i < dtlArr.size(); i++) {
|
||||
JSONObject jsonObject = dtlArr.getJSONObject(i);
|
||||
String para_code = jsonObject.getString("para_code");
|
||||
if (StrUtil.equals(para_code, "QM001")) {
|
||||
jx1 = jsonObject.getString("value");
|
||||
}
|
||||
if (StrUtil.equals(para_code, "QM002")) {
|
||||
jx2 = jsonObject.getString("value");
|
||||
}
|
||||
|
||||
jsonObject.put("paradtl_id", IdUtil.getSnowflake(1, 1).nextId());
|
||||
jsonObject.put("material_id", materialDto.getMaterial_id());
|
||||
jsonObject.put("create_id", currentUserId);
|
||||
@@ -194,8 +206,16 @@ public class ProductProcessParamServiceImpl implements ProductProcessParamServic
|
||||
jsonObject.put("update_optname", nickName);
|
||||
jsonObject.put("update_time", now);
|
||||
wppTab.insert(jsonObject);
|
||||
|
||||
}
|
||||
if (ObjectUtil.isNotEmpty(jx1) && ObjectUtil.isNotEmpty(jx2)) {
|
||||
if (StrUtil.equals(jx1, "0") && StrUtil.equals(jx2, "0")) {
|
||||
throw new BadRequestException("98酒精和92酒精不能同时为0");
|
||||
}
|
||||
if (StrUtil.equals(jx1, "1") && StrUtil.equals(jx2, "1")) {
|
||||
throw new BadRequestException("98酒精和92酒精不能同时为1");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user