Commit eeacca29 by 江和松

存货档案修改导入模板

parent f7df497c
......@@ -114,7 +114,9 @@
INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
<!-- 物料类型需要全部账套公用,如果不公用需要对HGPZ004表存货类型的键进行处理
<include refid="authCondition" />
-->
<dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy">
$orderBy$
......@@ -124,15 +126,15 @@
</isEmpty>
</dynamic>
</select>
</select>
<select id="count" resultClass="int">
<select id="count" resultClass="int">
SELECT COUNT(*) FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" />
<include refid="authCondition" />
</select>
<include refid="condition" />
<include refid="authCondition" />
</select>
<!--
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
......@@ -178,7 +180,7 @@
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
-->
-->
<insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ004 (ID,
......
......@@ -589,7 +589,8 @@ public class HGPZTools {
List<HGPZ004> hgpz004s = DaoBase.getInstance().query(HGPZ004.QUERY, new HashMap<String, Object>(){{
put(HGPZ004.FIELD_STATUS, CommonConstant.YesNo.YES_1);
}});
Map parmap = hgpz004s.stream().filter(item-> !Objects.equals(item.getParInventType(), "root")).collect(Collectors.toMap(HGPZ004::getInventTypeName, HGPZ004::getInventType,(v1, v2) -> v1));
// Map parmap = hgpz004s.stream().filter(item-> !Objects.equals(item.getParInventType(), "root")).collect(Collectors.toMap(HGPZ004::getInventTypeName, HGPZ004::getInventType,(v1, v2) -> v1));
Map parmap = hgpz004s.stream().collect(Collectors.toMap(HGPZ004::getInventTypeName, HGPZ004::getInventType,(v1, v2) -> v1));
for (Map map:list) {
String inventType = MapUtils.getString(parmap, StringUtils.trimToEmpty(map.get(HGPZ005.FIELD_INVENT_TYPE).toString()));
AssertUtils.isEmpty(inventType, String.format("存货类型[%s]代码不存在,添加失败!", map.get(HGPZ005.FIELD_INVENT_TYPE)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment