给商品查询接口增加扩展信息的查询

This commit is contained in:
季圣华
2022-12-15 23:53:15 +08:00
parent b00aa14c40
commit baf116d46a
4 changed files with 20 additions and 6 deletions

View File

@@ -19,6 +19,7 @@ public interface MaterialMapperEx {
List<MaterialVo4Unit> selectByConditionMaterial(
@Param("materialParam") String materialParam,
@Param("color") String color,
@Param("materialOther") String materialOther,
@Param("weight") String weight,
@Param("expiryNum") String expiryNum,
@Param("enableSerialNumber") String enableSerialNumber,
@@ -33,6 +34,7 @@ public interface MaterialMapperEx {
Long countsByMaterial(
@Param("materialParam") String materialParam,
@Param("color") String color,
@Param("materialOther") String materialOther,
@Param("weight") String weight,
@Param("expiryNum") String expiryNum,
@Param("enableSerialNumber") String enableSerialNumber,

View File

@@ -36,6 +36,7 @@ public class MaterialComponent implements ICommonQuery {
String categoryId = StringUtil.getInfo(search, "categoryId");
String materialParam = StringUtil.getInfo(search, "materialParam");
String color = StringUtil.getInfo(search, "color");
String materialOther = StringUtil.getInfo(search, "materialOther");
String weight = StringUtil.getInfo(search, "weight");
String expiryNum = StringUtil.getInfo(search, "expiryNum");
String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber");
@@ -43,7 +44,7 @@ public class MaterialComponent implements ICommonQuery {
String enabled = StringUtil.getInfo(search, "enabled");
String remark = StringUtil.getInfo(search, "remark");
String mpList = StringUtil.getInfo(search, "mpList");
return materialService.select(materialParam, color, weight, expiryNum,
return materialService.select(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, categoryId, mpList, QueryUtils.offset(map), QueryUtils.rows(map));
}
@@ -53,6 +54,7 @@ public class MaterialComponent implements ICommonQuery {
String categoryId = StringUtil.getInfo(search, "categoryId");
String materialParam = StringUtil.getInfo(search, "materialParam");
String color = StringUtil.getInfo(search, "color");
String materialOther = StringUtil.getInfo(search, "materialOther");
String weight = StringUtil.getInfo(search, "weight");
String expiryNum = StringUtil.getInfo(search, "expiryNum");
String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber");
@@ -60,7 +62,7 @@ public class MaterialComponent implements ICommonQuery {
String enabled = StringUtil.getInfo(search, "enabled");
String remark = StringUtil.getInfo(search, "remark");
String mpList = StringUtil.getInfo(search, "mpList");
return materialService.countMaterial(materialParam, color, weight, expiryNum,
return materialService.countMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, categoryId, mpList);
}

View File

@@ -111,7 +111,7 @@ public class MaterialService {
return list;
}
public List<MaterialVo4Unit> select(String materialParam, String color, String weight, String expiryNum,
public List<MaterialVo4Unit> select(String materialParam, String color, String materialOther, String weight, String expiryNum,
String enableSerialNumber, String enableBatchNumber, String enabled,
String remark, String categoryId, String mpList, int offset, int rows)
throws Exception{
@@ -126,7 +126,7 @@ public class MaterialService {
if(StringUtil.isNotEmpty(categoryId)){
idList = getListByParentId(Long.parseLong(categoryId));
}
list= materialMapperEx.selectByConditionMaterial(materialParam, color, weight, expiryNum,
list= materialMapperEx.selectByConditionMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, idList, mpList, offset, rows);
if (null != list && list.size()>0) {
Map<Long,BigDecimal> currentStockMap = getCurrentStockMapByMaterialList(list);
@@ -143,7 +143,7 @@ public class MaterialService {
return resList;
}
public Long countMaterial(String materialParam, String color, String weight, String expiryNum,
public Long countMaterial(String materialParam, String color, String materialOther, String weight, String expiryNum,
String enableSerialNumber, String enableBatchNumber, String enabled,
String remark, String categoryId,String mpList)throws Exception {
Long result =null;
@@ -152,7 +152,7 @@ public class MaterialService {
if(StringUtil.isNotEmpty(categoryId)){
idList = getListByParentId(Long.parseLong(categoryId));
}
result= materialMapperEx.countsByMaterial(materialParam, color, weight, expiryNum,
result= materialMapperEx.countsByMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, idList, mpList);
}catch(Exception e){
JshException.readFail(logger, e);