Commit 6a3046ff authored by 季圣华's avatar 季圣华
Browse files

优化商品

parent b2c07fa4
......@@ -172,7 +172,7 @@ public class MaterialService {
if(jsonObj.get("depotId")!=null && jsonObj.get("number")!=null) {
String number = jsonObj.getString("number");
Long depotId = jsonObj.getLong("depotId");
if(number!=null && Double.valueOf(number)>0) {
if(StringUtil.isNotEmpty(number) && Double.valueOf(number)>0) {
insertStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number));
}
}
......@@ -210,7 +210,7 @@ public class MaterialService {
MaterialInitialStockExample example = new MaterialInitialStockExample();
example.createCriteria().andMaterialIdEqualTo(id).andDepotIdEqualTo(depotId);
materialInitialStockMapper.deleteByExample(example);
if (number != null && Double.valueOf(number) > 0) {
if (StringUtil.isNotEmpty(number) && Double.valueOf(number) > 0) {
insertStockByMaterialAndDepot(depotId, id, parseBigDecimalEx(number));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment