给商品查询接口增加仓位货架的参数

This commit is contained in:
季圣华
2023-05-22 21:04:04 +08:00
parent 7407734832
commit 9621ef6ecc
4 changed files with 18 additions and 6 deletions

View File

@@ -25,6 +25,7 @@ public interface MaterialMapperEx {
@Param("expiryNum") String expiryNum,
@Param("enableSerialNumber") String enableSerialNumber,
@Param("enableBatchNumber") String enableBatchNumber,
@Param("position") String position,
@Param("enabled") String enabled,
@Param("remark") String remark,
@Param("idList") List<Long> idList,
@@ -40,6 +41,7 @@ public interface MaterialMapperEx {
@Param("expiryNum") String expiryNum,
@Param("enableSerialNumber") String enableSerialNumber,
@Param("enableBatchNumber") String enableBatchNumber,
@Param("position") String position,
@Param("enabled") String enabled,
@Param("remark") String remark,
@Param("idList") List<Long> idList,

View File

@@ -41,11 +41,12 @@ public class MaterialComponent implements ICommonQuery {
String expiryNum = StringUtil.getInfo(search, "expiryNum");
String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber");
String enableBatchNumber = StringUtil.getInfo(search, "enableBatchNumber");
String position = StringUtil.getInfo(search, "position");
String enabled = StringUtil.getInfo(search, "enabled");
String remark = StringUtil.getInfo(search, "remark");
String mpList = StringUtil.getInfo(search, "mpList");
return materialService.select(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, categoryId, mpList, QueryUtils.offset(map), QueryUtils.rows(map));
enableSerialNumber, enableBatchNumber, position, enabled, remark, categoryId, mpList, QueryUtils.offset(map), QueryUtils.rows(map));
}
@Override
@@ -59,11 +60,12 @@ public class MaterialComponent implements ICommonQuery {
String expiryNum = StringUtil.getInfo(search, "expiryNum");
String enableSerialNumber = StringUtil.getInfo(search, "enableSerialNumber");
String enableBatchNumber = StringUtil.getInfo(search, "enableBatchNumber");
String position = StringUtil.getInfo(search, "position");
String enabled = StringUtil.getInfo(search, "enabled");
String remark = StringUtil.getInfo(search, "remark");
String mpList = StringUtil.getInfo(search, "mpList");
return materialService.countMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, categoryId, mpList);
enableSerialNumber, enableBatchNumber, position, enabled, remark, categoryId, mpList);
}
@Override

View File

@@ -114,7 +114,7 @@ public class MaterialService {
}
public List<MaterialVo4Unit> select(String materialParam, String color, String materialOther, String weight, String expiryNum,
String enableSerialNumber, String enableBatchNumber, String enabled,
String enableSerialNumber, String enableBatchNumber, String position, String enabled,
String remark, String categoryId, String mpList, int offset, int rows)
throws Exception{
String[] mpArr = new String[]{};
@@ -129,7 +129,7 @@ public class MaterialService {
idList = getListByParentId(Long.parseLong(categoryId));
}
list= materialMapperEx.selectByConditionMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, idList, mpList, offset, rows);
enableSerialNumber, enableBatchNumber, position, enabled, remark, idList, mpList, offset, rows);
if (null != list && list.size()>0) {
Map<Long,BigDecimal> currentStockMap = getCurrentStockMapByMaterialList(list);
for (MaterialVo4Unit m : list) {
@@ -146,7 +146,7 @@ public class MaterialService {
}
public Long countMaterial(String materialParam, String color, String materialOther, String weight, String expiryNum,
String enableSerialNumber, String enableBatchNumber, String enabled,
String enableSerialNumber, String enableBatchNumber, String position, String enabled,
String remark, String categoryId,String mpList)throws Exception {
Long result =null;
try{
@@ -155,7 +155,7 @@ public class MaterialService {
idList = getListByParentId(Long.parseLong(categoryId));
}
result= materialMapperEx.countsByMaterial(materialParam, color, materialOther, weight, expiryNum,
enableSerialNumber, enableBatchNumber, enabled, remark, idList, mpList);
enableSerialNumber, enableBatchNumber, position, enabled, remark, idList, mpList);
}catch(Exception e){
JshException.readFail(logger, e);
}

View File

@@ -70,6 +70,10 @@
<if test="enableBatchNumber != null and enableBatchNumber !=''">
and m.enable_batch_number = #{enableBatchNumber}
</if>
<if test="position != null and position !=''">
<bind name="bindPosition" value="'%'+position+'%'"/>
and m.position like #{bindPosition}
</if>
<if test="enabled != null and enabled !=''">
and m.enabled = #{enabled}
</if>
@@ -125,6 +129,10 @@
<if test="enableBatchNumber != null and enableBatchNumber !=''">
and m.enable_batch_number = #{enableBatchNumber}
</if>
<if test="position != null and position !=''">
<bind name="bindPosition" value="'%'+position+'%'"/>
and m.position like #{bindPosition}
</if>
<if test="enabled != null and enabled !=''">
and m.enabled = #{enabled}
</if>