|
@@ -75,8 +75,8 @@ public class MaterialServiceImpl implements MaterialService {
|
|
material.setMaterialName(req.getMaterialName());
|
|
material.setMaterialName(req.getMaterialName());
|
|
material.setMaterialType(req.getMaterialType());
|
|
material.setMaterialType(req.getMaterialType());
|
|
material.setDescription(req.getDescription());
|
|
material.setDescription(req.getDescription());
|
|
- //603版 已作废
|
|
|
|
- //material.setSkuId(req.getSkuId());
|
|
|
|
|
|
+ material.setActiveId(req.getActiveId());
|
|
|
|
+ material.setHasQr(req.getHasQr());
|
|
baseMaterialMapper.insert(material);
|
|
baseMaterialMapper.insert(material);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -109,8 +109,8 @@ public class MaterialServiceImpl implements MaterialService {
|
|
material.setMaterialType(req.getMaterialType());
|
|
material.setMaterialType(req.getMaterialType());
|
|
material.setDescription(req.getDescription());
|
|
material.setDescription(req.getDescription());
|
|
material.setValid(req.getValid());
|
|
material.setValid(req.getValid());
|
|
- //603版 已作废
|
|
|
|
- //material.setSkuId(req.getSkuId());
|
|
|
|
|
|
+ material.setActiveId(req.getActiveId());
|
|
|
|
+ material.setHasQr(req.getHasQr());
|
|
baseMaterialMapper.updateById(material);
|
|
baseMaterialMapper.updateById(material);
|
|
|
|
|
|
}
|
|
}
|
|
@@ -151,14 +151,8 @@ public class MaterialServiceImpl implements MaterialService {
|
|
GetMaterialRes res = PojoConverterUtils.copy(material, GetMaterialRes.class);
|
|
GetMaterialRes res = PojoConverterUtils.copy(material, GetMaterialRes.class);
|
|
|
|
|
|
return res;
|
|
return res;
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
/**
|
|
/**
|
|
* 物料启用
|
|
* 物料启用
|
|
*/
|
|
*/
|
|
@@ -212,6 +206,7 @@ public class MaterialServiceImpl implements MaterialService {
|
|
public ListMaterialForSelectRes listMaterialForSelect(ListMaterialForSelectReq req) {
|
|
public ListMaterialForSelectRes listMaterialForSelect(ListMaterialForSelectReq req) {
|
|
//1-查询所有有效的物料
|
|
//1-查询所有有效的物料
|
|
QueryWrapper<BaseMaterial> materialQw = new QueryWrapper<>();
|
|
QueryWrapper<BaseMaterial> materialQw = new QueryWrapper<>();
|
|
|
|
+ materialQw.eq("has_qr",1);
|
|
materialQw.eq("valid",1);
|
|
materialQw.eq("valid",1);
|
|
materialQw.eq("is_delete",0);
|
|
materialQw.eq("is_delete",0);
|
|
List<BaseMaterial> baseMaterialList = baseMaterialMapper.selectList(materialQw);
|
|
List<BaseMaterial> baseMaterialList = baseMaterialMapper.selectList(materialQw);
|
|
@@ -290,22 +285,7 @@ public class MaterialServiceImpl implements MaterialService {
|
|
if (StringUtils.isBlank(materialProperty.getDescription())) {
|
|
if (StringUtils.isBlank(materialProperty.getDescription())) {
|
|
errorMessage.append("描述").append("为空,");
|
|
errorMessage.append("描述").append("为空,");
|
|
}
|
|
}
|
|
- //603版 已作废
|
|
|
|
- /*if (StringUtils.isBlank(materialProperty.getSkuName())){
|
|
|
|
- errorMessage.append("SKU名称").append("为空,");
|
|
|
|
- }else {
|
|
|
|
- //查询SKU是否存在
|
|
|
|
- QueryWrapper<BaseSku> skuQw = new QueryWrapper<>();
|
|
|
|
- skuQw.eq("sku_name",materialProperty.getSkuName());
|
|
|
|
- skuQw.eq("valid",1);
|
|
|
|
- skuQw.eq("is_delete",0);
|
|
|
|
- BaseSku baseSku = baseSkuMapper.selectOne(skuQw);
|
|
|
|
- //SKU不存在
|
|
|
|
- if (null == baseSku){
|
|
|
|
- errorMessage.append("该SKU").append("不存在");
|
|
|
|
- }
|
|
|
|
- returnMap.put("baseSku",baseSku);
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
returnMap.put("errorMessage",errorMessage.toString());
|
|
returnMap.put("errorMessage",errorMessage.toString());
|
|
return returnMap;
|
|
return returnMap;
|
|
}
|
|
}
|