给单据增加sku字段
This commit is contained in:
@@ -185,6 +185,7 @@ public class DepotItemController {
|
||||
}
|
||||
item.put("stock", stock);
|
||||
item.put("unit", diEx.getMaterialUnit());
|
||||
item.put("sku", diEx.getSku());
|
||||
item.put("operNumber", diEx.getOperNumber());
|
||||
item.put("basicNumber", diEx.getBasicNumber());
|
||||
item.put("unitPrice", diEx.getUnitPrice());
|
||||
|
||||
@@ -195,18 +195,17 @@ public class MaterialController {
|
||||
item.put("standard", material.getStandard());
|
||||
item.put("model", material.getModel());
|
||||
item.put("unit", material.getCommodityUnit() + ratio);
|
||||
if(depotId!=null) {
|
||||
BigDecimal stock = depotItemService.getStockByParam(depotId,material.getId(),null,null,tenantId);
|
||||
if (material.getUnitId()!=null){
|
||||
Unit unit = unitService.getUnit(material.getUnitId());
|
||||
if(material.getCommodityUnit().equals(unit.getOtherUnit())) {
|
||||
if(unit.getRatio()!=0) {
|
||||
stock = stock.divide(BigDecimal.valueOf(unit.getRatio()),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
item.put("sku", material.getSku());
|
||||
BigDecimal stock = depotItemService.getStockByParam(depotId,material.getId(),null,null,tenantId);
|
||||
if (material.getUnitId()!=null){
|
||||
Unit unit = unitService.getUnit(material.getUnitId());
|
||||
if(material.getCommodityUnit().equals(unit.getOtherUnit())) {
|
||||
if(unit.getRatio()!=0) {
|
||||
stock = stock.divide(BigDecimal.valueOf(unit.getRatio()),2,BigDecimal.ROUND_HALF_UP);
|
||||
}
|
||||
}
|
||||
item.put("stock", stock);
|
||||
}
|
||||
item.put("stock", stock);
|
||||
String expand = ""; //扩展信息
|
||||
for (int i = 0; i < mpArr.length; i++) {
|
||||
if (mpArr[i].equals("制造商")) {
|
||||
|
||||
Reference in New Issue
Block a user