|
@@ -154,7 +154,6 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
//类型不为空,获取类型id集合
|
|
|
if(StringUtil.isNotEmpty(categoryId)){
|
|
|
idList = getListByParentId(Long.parseLong(categoryId));
|
|
|
-
|
|
|
}
|
|
|
PageUtils.startPage();
|
|
|
list= materialMapperEx.selectByConditionMaterial(materialParam, standard, model, color, brand, mfrs, materialOther, weight, expiryNum,
|
|
@@ -206,26 +205,14 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
List<MaterialInitialStock> stockArr = material.getStock();
|
|
|
for (int i = 0; i < stockArr.size(); i++) {
|
|
|
MaterialInitialStock jsonObj = stockArr.get(i);
|
|
|
- //此时id为仓库id,仓库di、最低安全库存数量不为空
|
|
|
- if(jsonObj.getId() != null && jsonObj.getLowSafeStock() != null || jsonObj.getPosition() != null) {
|
|
|
- BigDecimal lowSafeStock = jsonObj.getLowSafeStock();
|
|
|
- BigDecimal highSafeStock = null;
|
|
|
- if(jsonObj.getHighSafeStock() != null) {
|
|
|
- highSafeStock = jsonObj.getHighSafeStock();
|
|
|
- }
|
|
|
+ //此时id为仓库id,仓库id、最低安全库存数量、库位不为空
|
|
|
+ if(jsonObj.getId() != null && jsonObj.getLowSafeStock() != null || jsonObj.getPosition() != null || jsonObj.getHighSafeStock() != null) {
|
|
|
Long depotId = jsonObj.getId();
|
|
|
jsonObj.setDepotId(depotId);
|
|
|
jsonObj.setMaterialId(mId);
|
|
|
jsonObj.setId(null);
|
|
|
- if(lowSafeStock != null || highSafeStock != null || jsonObj.getPosition() != null) {
|
|
|
- //设置初始库
|
|
|
- materialInitialStockMapper.insertSelective(jsonObj);
|
|
|
- //insertInitialStockByMaterialAndDepot(jsonObj);
|
|
|
- //设置当前库
|
|
|
- //insertCurrentStockByMaterialAndDepot(depotId, mId, parseBigDecimalEx(number));
|
|
|
- //更新当前库存
|
|
|
- //depotItemService.updateCurrentStockFun(mId, depotId);
|
|
|
- }
|
|
|
+ //设置初始库
|
|
|
+ materialInitialStockMapper.insertSelective(jsonObj);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -574,7 +561,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
otherMaterialMap.putIfAbsent(me.getMaterialId(), me);
|
|
|
}
|
|
|
String nameStr = "名称*,规格,型号,颜色,品牌,类别,基础重量(kg),基本单位*,副单位,比例,多属性," +
|
|
|
- "状态*,序列号,系统sku,商品条码,自定义1,自定义2,自定义3,备注";
|
|
|
+ "状态*,序列号,系统sku,商品条码,默认采购价,默认销售价,自定义1,自定义2,自定义3,备注";
|
|
|
List<String> nameList = StringUtil.strToStringList(nameStr);
|
|
|
//仓库列表
|
|
|
List<Depot> depotList = depotService.getAllList();
|
|
@@ -612,12 +599,14 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
objs[12] = m.getEnableSerialNumber();
|
|
|
objs[13] = m.getSystemSku();
|
|
|
objs[14] = m.getBarCode();
|
|
|
- objs[15] = m.getOtherField1();
|
|
|
- objs[16] = m.getOtherField2();
|
|
|
- objs[17] = m.getOtherField3();
|
|
|
- objs[18] = m.getRemark();
|
|
|
+ objs[15] = m.getDefaultPurchaseDecimal().toString();
|
|
|
+ objs[16] = m.getDefaultWholesaleDecimal().toString();
|
|
|
+ objs[17] = m.getOtherField1();
|
|
|
+ objs[18] = m.getOtherField2();
|
|
|
+ objs[19] = m.getOtherField3();
|
|
|
+ objs[20] = m.getRemark();
|
|
|
//仓库期初库存
|
|
|
- int i = 19;
|
|
|
+ int i = 21;
|
|
|
// for(Depot depot: depotList) {
|
|
|
// BigDecimal number = misMap.get(m.getId() + "_" + depot.getId());
|
|
|
// objs[i] = number == null ? "0" : number.setScale(2, BigDecimal.ROUND_HALF_UP).toString();
|