|
@@ -1,5 +1,6 @@
|
|
|
package com.jsh.erp.service.impl;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -1457,6 +1458,13 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
+ public List<MaterialVo4Unit> getMaterialByBarCode(List<String> barCodeList) {
|
|
|
+ // 将 List<String> 转换为 String[]
|
|
|
+ String[] barCodeArray = barCodeList.toArray(new String[0]);
|
|
|
+ return materialMapperEx.getMaterialByBarCode(barCodeArray);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
public List<MaterialVo4Unit> getMaterialByBarCodeAndWithOutMId(String barCode, Long mId) {
|
|
|
String [] barCodeArray=barCode.split(",");
|
|
|
return materialMapperEx.getMaterialByBarCodeAndWithOutMId(barCodeArray, mId);
|
|
@@ -1701,9 +1709,9 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
Long beginTime = System.currentTimeMillis();
|
|
|
//文件扩展名只能为xls
|
|
|
String fileName = file.getOriginalFilename();
|
|
|
- if(StringUtil.isNotEmpty(fileName)) {
|
|
|
- String fileExt = fileName.substring(fileName.indexOf(".")+1);
|
|
|
- if(!"xls".equals(fileExt)) {
|
|
|
+ if (StringUtil.isNotEmpty(fileName)) {
|
|
|
+ String fileExt = fileName.substring(fileName.indexOf(".") + 1);
|
|
|
+ if (!"xls".equals(fileExt)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_EXTENSION_ERROR_CODE,
|
|
|
ExceptionConstants.MATERIAL_EXTENSION_ERROR_MSG);
|
|
|
}
|
|
@@ -1712,13 +1720,13 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
Sheet src = workbook.getSheet(0);
|
|
|
//获取真实的行数,剔除掉空白行
|
|
|
int rightRows = ExcelUtils.getRightRows(src);
|
|
|
- List<Depot> depotList= depotService.getDepot();
|
|
|
+ List<Depot> depotList = depotService.getDepot();
|
|
|
int depotCount = depotList.size();
|
|
|
Map<String, Long> depotMap = parseDepotToMap(depotList);
|
|
|
User user = userService.getCurrentUser();
|
|
|
List<MaterialWithInitStock> mList = new ArrayList<>();
|
|
|
//单次导入超出1000条
|
|
|
- if(rightRows > 1002) {
|
|
|
+ if (rightRows > 1002) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_IMPORT_OVER_LIMIT_CODE,
|
|
|
String.format(ExceptionConstants.MATERIAL_IMPORT_OVER_LIMIT_MSG));
|
|
|
}
|
|
@@ -1732,34 +1740,34 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
String weight = ExcelUtils.getContent(src, i, 6); //基础重量(kg)
|
|
|
String unit = ExcelUtils.getContent(src, i, 7); //基本单位
|
|
|
//名称为空
|
|
|
- if(StringUtil.isEmpty(name)) {
|
|
|
+ if (StringUtil.isEmpty(name)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_NAME_EMPTY_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_NAME_EMPTY_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_NAME_EMPTY_MSG, i + 1));
|
|
|
}
|
|
|
//名称长度超出
|
|
|
- if(name.length()>100) {
|
|
|
+ if (name.length() > 100) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_NAME_OVER_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_NAME_OVER_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_NAME_OVER_MSG, i + 1));
|
|
|
}
|
|
|
//规格长度超出
|
|
|
- if(StringUtil.isNotEmpty(standard) && standard.length()>100) {
|
|
|
+ if (StringUtil.isNotEmpty(standard) && standard.length() > 100) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_STANDARD_OVER_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_STANDARD_OVER_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_STANDARD_OVER_MSG, i + 1));
|
|
|
}
|
|
|
//型号长度超出
|
|
|
- if(StringUtil.isNotEmpty(model) && model.length()>100) {
|
|
|
+ if (StringUtil.isNotEmpty(model) && model.length() > 100) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_MODEL_OVER_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_MODEL_OVER_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_MODEL_OVER_MSG, i + 1));
|
|
|
}
|
|
|
//基本单位为空
|
|
|
- if(StringUtil.isEmpty(unit)) {
|
|
|
+ if (StringUtil.isEmpty(unit)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_UNIT_EMPTY_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_UNIT_EMPTY_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_UNIT_EMPTY_MSG, i + 1));
|
|
|
}
|
|
|
//类别为空
|
|
|
- if(StringUtil.isEmpty(categoryName)) {
|
|
|
+ if (StringUtil.isEmpty(categoryName)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_Category_Name_EMPTY_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_Category_Name_EMPTY_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_Category_Name_EMPTY_MSG, i + 1));
|
|
|
}
|
|
|
MaterialWithInitStock m = new MaterialWithInitStock();
|
|
|
//设置商品名字、规格、型号、颜色、品牌
|
|
@@ -1776,14 +1784,14 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
Long serial_no = categoryId == null ? null : materialCategoryService.getMaterialCategory(m.getCategoryId()).getSerialNo();
|
|
|
//设置系统sku
|
|
|
m.setSystemSku(serial_no + DateUtils.dateTimeNow());
|
|
|
- if(null!=categoryId){
|
|
|
+ if (null != categoryId) {
|
|
|
m.setCategoryId(categoryId);
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(weight)) {
|
|
|
+ if (StringUtil.isNotEmpty(weight)) {
|
|
|
//校验基础重量是否是数字(含小数)
|
|
|
- if(!StringUtil.isPositiveBigDecimal(weight)) {
|
|
|
+ if (!StringUtil.isPositiveBigDecimal(weight)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_WEIGHT_NOT_DECIMAL_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_WEIGHT_NOT_DECIMAL_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_WEIGHT_NOT_DECIMAL_MSG, i + 1));
|
|
|
}
|
|
|
m.setWeight(new BigDecimal(weight));
|
|
|
}
|
|
@@ -1800,11 +1808,11 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
String systemSku = ExcelUtils.getContent(src, i, 18); //系统sku
|
|
|
String productionDate = ExcelUtils.getContent(src, i, 19); //生产日期
|
|
|
String expiryNum = ExcelUtils.getContent(src, i, 20); //保质期天数
|
|
|
- if(StringUtil.isNotEmpty(expiryNum)) {
|
|
|
+ if (StringUtil.isNotEmpty(expiryNum)) {
|
|
|
//校验保质期是否是正整数
|
|
|
- if(!StringUtil.isPositiveLong(expiryNum)) {
|
|
|
+ if (!StringUtil.isPositiveLong(expiryNum)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_EXPIRY_NUM_NOT_INTEGER_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_EXPIRY_NUM_NOT_INTEGER_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_EXPIRY_NUM_NOT_INTEGER_MSG, i + 1));
|
|
|
}
|
|
|
//m.setExpiryNum(Integer.parseInt(expiryNum));
|
|
|
}
|
|
@@ -1819,22 +1827,22 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
String remark = ExcelUtils.getContent(src, i, 29); //备注
|
|
|
// m.setPosition(StringUtil.isNotEmpty(position)?position:null);
|
|
|
//m.setMfrs(StringUtil.isNotEmpty(mfrs)?mfrs:null);
|
|
|
- m.setOtherField1(StringUtil.isNotEmpty(otherField1)?otherField1:null);
|
|
|
- m.setOtherField2(StringUtil.isNotEmpty(otherField2)?otherField2:null);
|
|
|
- m.setOtherField3(StringUtil.isNotEmpty(otherField3)?otherField3:null);
|
|
|
+ m.setOtherField1(StringUtil.isNotEmpty(otherField1) ? otherField1 : null);
|
|
|
+ m.setOtherField2(StringUtil.isNotEmpty(otherField2) ? otherField2 : null);
|
|
|
+ m.setOtherField3(StringUtil.isNotEmpty(otherField3) ? otherField3 : null);
|
|
|
m.setRemark(remark);
|
|
|
//状态格式错误
|
|
|
- if(!"1".equals(enabled) && !"0".equals(enabled)) {
|
|
|
+ if (!"1".equals(enabled) && !"0".equals(enabled)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_ENABLED_ERROR_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_ENABLED_ERROR_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_ENABLED_ERROR_MSG, i + 1));
|
|
|
}
|
|
|
//基本条码为空
|
|
|
- if(StringUtil.isEmpty(barCode)) {
|
|
|
+ if (StringUtil.isEmpty(barCode)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_BARCODE_EMPTY_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_BARCODE_EMPTY_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_BARCODE_EMPTY_MSG, i + 1));
|
|
|
}
|
|
|
//校验基本条码长度为4到40位
|
|
|
- if(!StringUtil.checkBarCodeLength(barCode)) {
|
|
|
+ if (!StringUtil.checkBarCodeLength(barCode)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_BARCODE_LENGTH_ERROR_CODE,
|
|
|
String.format(ExceptionConstants.MATERIAL_BARCODE_LENGTH_ERROR_MSG, barCode));
|
|
|
}
|
|
@@ -1853,14 +1861,14 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
basicObj.put("wholesaleDecimal", wholesaleDecimal);
|
|
|
basicObj.put("lowDecimal", lowDecimal);
|
|
|
materialExObj.put("basic", basicObj);
|
|
|
- if(StringUtil.isNotEmpty(manyUnit) && StringUtil.isNotEmpty(ratio)){ //多单位
|
|
|
+ if (StringUtil.isNotEmpty(manyUnit) && StringUtil.isNotEmpty(ratio)) { //多单位
|
|
|
//校验比例是否是数字(含小数)
|
|
|
- if(!StringUtil.isPositiveBigDecimal(ratio.trim())) {
|
|
|
+ if (!StringUtil.isPositiveBigDecimal(ratio.trim())) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_CODE,
|
|
|
- String.format(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_MSG, i+1));
|
|
|
+ String.format(ExceptionConstants.MATERIAL_RATIO_NOT_INTEGER_MSG, i + 1));
|
|
|
}
|
|
|
Long unitId = unitService.getUnitIdByParam(unit, manyUnit, new BigDecimal(ratio.trim()));
|
|
|
- if(unitId != null) {
|
|
|
+ if (unitId != null) {
|
|
|
m.setUnitId(unitId);
|
|
|
m.setUnit("");
|
|
|
}
|
|
@@ -1871,10 +1879,10 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
JSONObject otherObj = new JSONObject();
|
|
|
//otherObj.put("barCode", manyBarCode);
|
|
|
otherObj.put("commodityUnit", manyUnit);
|
|
|
- otherObj.put("purchaseDecimal", parsePrice(purchaseDecimal,ratio));
|
|
|
- otherObj.put("commodityDecimal", parsePrice(commodityDecimal,ratio));
|
|
|
- otherObj.put("wholesaleDecimal", parsePrice(wholesaleDecimal,ratio));
|
|
|
- otherObj.put("lowDecimal", parsePrice(lowDecimal,ratio));
|
|
|
+ otherObj.put("purchaseDecimal", parsePrice(purchaseDecimal, ratio));
|
|
|
+ otherObj.put("commodityDecimal", parsePrice(commodityDecimal, ratio));
|
|
|
+ otherObj.put("wholesaleDecimal", parsePrice(wholesaleDecimal, ratio));
|
|
|
+ otherObj.put("lowDecimal", parsePrice(lowDecimal, ratio));
|
|
|
materialExObj.put("other", otherObj);
|
|
|
} else {
|
|
|
m.setUnit(unit);
|
|
@@ -1882,17 +1890,17 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
}
|
|
|
m.setMaterialExObj(materialExObj);
|
|
|
m.setEnabled("1".equals(enabled));
|
|
|
- if(StringUtil.isNotEmpty(enableSerialNumber) && "1".equals(enableSerialNumber)) {
|
|
|
+ if (StringUtil.isNotEmpty(enableSerialNumber) && "1".equals(enableSerialNumber)) {
|
|
|
m.setEnableSerialNumber("1");
|
|
|
} else {
|
|
|
m.setEnableSerialNumber("0");
|
|
|
}
|
|
|
- if(StringUtil.isNotEmpty(enableBatchNumber) && "1".equals(enableBatchNumber)) {
|
|
|
+ if (StringUtil.isNotEmpty(enableBatchNumber) && "1".equals(enableBatchNumber)) {
|
|
|
m.setEnableBatchNumber("1");
|
|
|
} else {
|
|
|
m.setEnableBatchNumber("0");
|
|
|
}
|
|
|
- if("1".equals(enableSerialNumber) && "1".equals(enableBatchNumber)) {
|
|
|
+ if ("1".equals(enableSerialNumber) && "1".equals(enableBatchNumber)) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_ENABLE_MUST_ONE_CODE,
|
|
|
String.format(ExceptionConstants.MATERIAL_ENABLE_MUST_ONE_MSG, barCode));
|
|
|
}
|
|
@@ -1906,13 +1914,13 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
//防止初始库存和当前库存出现重复
|
|
|
Map<String, String> materialDepotInitialMap = new HashMap<>();
|
|
|
Map<String, String> materialDepotCurrentMap = new HashMap<>();
|
|
|
- for(MaterialWithInitStock m: mList) {
|
|
|
+ for (MaterialWithInitStock m : mList) {
|
|
|
Long mId = 0L;
|
|
|
//判断该商品是否存在,如果不存在就新增,如果存在就更新
|
|
|
String basicBarCode = getBasicBarCode(m);
|
|
|
//根据条件返回产品列表
|
|
|
- List<Material> materials = getMaterialListByParam(m.getName(),m.getStandard(),m.getModel(),m.getColor(),m.getUnit(),m.getUnitId(), basicBarCode);
|
|
|
- if(materials.size() == 0) { //产品列表为0,新增商品
|
|
|
+ List<Material> materials = getMaterialListByParam(m.getName(), m.getStandard(), m.getModel(), m.getColor(), m.getUnit(), m.getUnitId(), basicBarCode);
|
|
|
+ if (materials.size() == 0) { //产品列表为0,新增商品
|
|
|
materialMapperEx.insertSelectiveEx(m);
|
|
|
mId = m.getId();
|
|
|
} else { //产品列表不为0,商品存在,修改商品属性
|
|
@@ -1922,7 +1930,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
material.setId(mId);
|
|
|
materialMapper.updateByPrimaryKeySelective(material);
|
|
|
//更新多单位
|
|
|
- if(material.getUnitId() == null) {
|
|
|
+ if (material.getUnitId() == null) {
|
|
|
materialMapperEx.setUnitIdToNull(material.getId());
|
|
|
}
|
|
|
//如果之前有保质期,则更新保质期
|
|
@@ -1936,7 +1944,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
insertOrUpdateMaterialExtend(materialExObj, "other", "0", mId, user);
|
|
|
//给商品更新库存
|
|
|
Map<Long, BigDecimal> stockMap = m.getStockMap();
|
|
|
- for(Depot depot: depotList){
|
|
|
+ for (Depot depot : depotList) {
|
|
|
Long depotId = depot.getId();
|
|
|
String materialDepotKey = mId + "_" + depotId;
|
|
|
//获取初始库存
|
|
@@ -1944,33 +1952,33 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
//excel里面的当前库存
|
|
|
BigDecimal stock = stockMap.get(depot.getId());
|
|
|
//新增或更新初始库存
|
|
|
- if(stock!=null && stock.compareTo(BigDecimal.ZERO)!=0) {
|
|
|
+ if (stock != null && stock.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
String basicStr = materialExObj.getString("basic");
|
|
|
MaterialExtend materialExtend = JSONObject.parseObject(basicStr, MaterialExtend.class);
|
|
|
- if(StringUtil.isNotEmpty(materialExtend.getSku())) {
|
|
|
+ if (StringUtil.isNotEmpty(materialExtend.getSku())) {
|
|
|
throw new BusinessRunTimeException(ExceptionConstants.MATERIAL_SKU_BEGIN_STOCK_FAILED_CODE,
|
|
|
String.format(ExceptionConstants.MATERIAL_SKU_BEGIN_STOCK_FAILED_MSG, materialExtend.getBarCode()));
|
|
|
}
|
|
|
buildChangeInitialStock(deleteInitialStockMaterialIdList, insertInitialStockMaterialList, materialDepotInitialMap, mId, depotId, materialDepotKey, stock);
|
|
|
} else {
|
|
|
- if(initStock.compareTo(BigDecimal.ZERO)!=0) {
|
|
|
+ if (initStock.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
buildChangeInitialStock(deleteInitialStockMaterialIdList, insertInitialStockMaterialList, materialDepotInitialMap, mId, depotId, materialDepotKey, stock);
|
|
|
}
|
|
|
}
|
|
|
//新增或更新当前库存
|
|
|
Long billCount = depotItemService.getCountByMaterialAndDepot(mId, depotId);
|
|
|
- if(billCount == 0) {
|
|
|
- if(stock!=null && stock.compareTo(BigDecimal.ZERO)!=0) {
|
|
|
+ if (billCount == 0) {
|
|
|
+ if (stock != null && stock.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
buildChangeCurrentStock(deleteCurrentStockMaterialIdList, insertCurrentStockMaterialList, materialDepotCurrentMap, mId, depotId, materialDepotKey, stock);
|
|
|
} else {
|
|
|
- if(initStock.compareTo(BigDecimal.ZERO)!=0) {
|
|
|
+ if (initStock.compareTo(BigDecimal.ZERO) != 0) {
|
|
|
buildChangeCurrentStock(deleteCurrentStockMaterialIdList, insertCurrentStockMaterialList, materialDepotCurrentMap, mId, depotId, materialDepotKey, stock);
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
BigDecimal currentNumber = getCurrentStockByMaterialIdAndDepotId(mId, depotId);
|
|
|
//当前库存的更新:减去初始库存,再加上导入的新初始库存
|
|
|
- if(currentNumber!=null && initStock!=null && stock!=null) {
|
|
|
+ if (currentNumber != null && initStock != null && stock != null) {
|
|
|
currentNumber = currentNumber.subtract(initStock).add(stock);
|
|
|
}
|
|
|
buildChangeCurrentStock(deleteCurrentStockMaterialIdList, insertCurrentStockMaterialList, materialDepotCurrentMap, mId, depotId, materialDepotKey, currentNumber);
|
|
@@ -1978,11 +1986,11 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
}
|
|
|
}
|
|
|
//批量更新库存,先删除后新增
|
|
|
- if(insertInitialStockMaterialList.size()>0) {
|
|
|
+ if (insertInitialStockMaterialList.size() > 0) {
|
|
|
batchDeleteInitialStockByMaterialList(deleteInitialStockMaterialIdList);
|
|
|
materialInitialStockMapperEx.batchInsert(insertInitialStockMaterialList);
|
|
|
}
|
|
|
- if(insertCurrentStockMaterialList.size()>0) {
|
|
|
+ if (insertCurrentStockMaterialList.size() > 0) {
|
|
|
batchDeleteCurrentStockByMaterialList(deleteCurrentStockMaterialIdList);
|
|
|
materialCurrentStockMapperEx.batchInsert(insertCurrentStockMaterialList);
|
|
|
}
|
|
@@ -1991,7 +1999,7 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
new StringBuffer(BusinessConstants.LOG_OPERATION_TYPE_IMPORT).append(mList.size()).append(BusinessConstants.LOG_DATA_UNIT).toString(),
|
|
|
((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest());
|
|
|
Long endTime = System.currentTimeMillis();
|
|
|
- logger.info("导入耗时:{}", endTime-beginTime);
|
|
|
+ logger.info("导入耗时:{}", endTime - beginTime);
|
|
|
info.code = 200;
|
|
|
info.data = "导入成功";
|
|
|
} catch (BusinessRunTimeException e) {
|
|
@@ -2005,4 +2013,14 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|
|
return info;
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<MaterialVo4Unit> getMaterialBySystemSku(List<String> systemSkuList) {
|
|
|
+ if (CollectionUtil.isEmpty(systemSkuList)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ String[] systemSkuArray = systemSkuList.toArray(new String[0]);
|
|
|
+ List<MaterialVo4Unit> list = materialMapperEx.getMaterialBySystemSku(systemSkuArray);
|
|
|
+ return list;
|
|
|
+ }
|
|
|
+
|
|
|
}
|