提交 75828b81 authored 作者: 李炎's avatar 李炎

添加默认规则:查询的库存不为零

上级 ab3ffc1a
......@@ -12,6 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
import javax.validation.constraints.NotBlank;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
......@@ -55,6 +56,8 @@ public class KingDeeCommonGetServiceImpl implements IKingDeeCommonGetService {
}
}
this.setWhereDefaultRule(inVo.getDocType(), where);
List<Map<String, Object>> response = kingDeeCommonGetApi.getKingDeeData(config, queueId, fieldList, where);
long costTime = System.currentTimeMillis() - start;
if (!CollectionUtils.isEmpty(response)) {
......@@ -72,5 +75,16 @@ public class KingDeeCommonGetServiceImpl implements IKingDeeCommonGetService {
return RestResponse.success(outVo);
}
/**
* 设置默认where自定义查询过滤条件
* 注:此为该项目应急用使用,建议后续扩展
*
* @param docType
* @param where
*/
private void setWhereDefaultRule(String docType, Map<String, String> where) {
if ("INVENTORY".equals(docType)) {
where.put("FQty" + "!", "0");
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论