Commit eeacca29 by 江和松

存货档案修改导入模板

parent f7df497c
...@@ -114,7 +114,9 @@ ...@@ -114,7 +114,9 @@
INVENT_TYPE_DETAIL as "inventTypeDetail" INVENT_TYPE_DETAIL as "inventTypeDetail"
FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0 FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<!-- 物料类型需要全部账套公用,如果不公用需要对HGPZ004表存货类型的键进行处理
<include refid="authCondition" /> <include refid="authCondition" />
-->
<dynamic prepend="ORDER BY"> <dynamic prepend="ORDER BY">
<isNotEmpty property="orderBy"> <isNotEmpty property="orderBy">
$orderBy$ $orderBy$
...@@ -124,15 +126,15 @@ ...@@ -124,15 +126,15 @@
</isEmpty> </isEmpty>
</dynamic> </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 SELECT COUNT(*) FROM ${hggpSchema}.HGPZ004 WHERE 1=1 AND DELETE_FLAG = 0
<include refid="condition" /> <include refid="condition" />
<include refid="authCondition" /> <include refid="authCondition" />
</select> </select>
<!-- <!--
<isNotEmpty prepend=" AND " property="id"> <isNotEmpty prepend=" AND " property="id">
ID = #id# ID = #id#
</isNotEmpty> </isNotEmpty>
...@@ -178,7 +180,7 @@ ...@@ -178,7 +180,7 @@
<isNotEmpty prepend=" AND " property="deleteFlag"> <isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag# DELETE_FLAG = #deleteFlag#
</isNotEmpty> </isNotEmpty>
--> -->
<insert id="insert"> <insert id="insert">
INSERT INTO ${hggpSchema}.HGPZ004 (ID, INSERT INTO ${hggpSchema}.HGPZ004 (ID,
......
...@@ -589,7 +589,8 @@ public class HGPZTools { ...@@ -589,7 +589,8 @@ public class HGPZTools {
List<HGPZ004> hgpz004s = DaoBase.getInstance().query(HGPZ004.QUERY, new HashMap<String, Object>(){{ List<HGPZ004> hgpz004s = DaoBase.getInstance().query(HGPZ004.QUERY, new HashMap<String, Object>(){{
put(HGPZ004.FIELD_STATUS, CommonConstant.YesNo.YES_1); 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) { for (Map map:list) {
String inventType = MapUtils.getString(parmap, StringUtils.trimToEmpty(map.get(HGPZ005.FIELD_INVENT_TYPE).toString())); 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))); 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