Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hg-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hg-smart
Commits
eeacca29
Commit
eeacca29
authored
Jul 01, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
存货档案修改导入模板
parent
f7df497c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
78 deletions
+81
-78
HGPZ004.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ004.xml
+79
-77
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+2
-1
HGPZ005_存货档案.xls
src/main/webapp/common/template/PZ/HGPZ005_存货档案.xls
+0
-0
No files found.
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ004.xml
View file @
eeacca29
...
@@ -4,20 +4,20 @@
...
@@ -4,20 +4,20 @@
Version : 1.0
Version : 1.0
schema : hggp
schema : hggp
tableName : HGPZ004
tableName : HGPZ004
ID INTEGER NOT NULL primarykey,
ID INTEGER NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
DEP_CODE VARCHAR,
INVENT_TYPE VARCHAR NOT NULL,
INVENT_TYPE VARCHAR NOT NULL,
INVENT_TYPE_NAME VARCHAR NOT NULL,
INVENT_TYPE_NAME VARCHAR NOT NULL,
PAR_INVENT_TYPE VARCHAR NOT NULL,
PAR_INVENT_TYPE VARCHAR NOT NULL,
PAR_INVENT_TYPE_NAME VARCHAR NOT NULL,
PAR_INVENT_TYPE_NAME VARCHAR NOT NULL,
STATUS TINYINT NOT NULL,
STATUS TINYINT NOT NULL,
CREATED_BY VARCHAR,
CREATED_BY VARCHAR,
CREATED_NAME VARCHAR,
CREATED_NAME VARCHAR,
CREATED_TIME VARCHAR,
CREATED_TIME VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_BY VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_NAME VARCHAR,
UPDATED_TIME VARCHAR,
UPDATED_TIME VARCHAR,
DELETE_FLAG TINYINT
DELETE_FLAG TINYINT
-->
-->
<sqlMap
namespace=
"HGPZ004"
>
<sqlMap
namespace=
"HGPZ004"
>
...
@@ -96,7 +96,7 @@
...
@@ -96,7 +96,7 @@
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ004"
>
resultClass=
"com.baosight.hggp.hg.pz.domain.HGPZ004"
>
SELECT
SELECT
ID as "id",
ID as "id",
ACCOUNT_CODE as "accountCode",
<!-- 帐套编码 -->
ACCOUNT_CODE as "accountCode",
<!-- 帐套编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
INVENT_TYPE as "inventType",
<!-- 类型编码 -->
INVENT_TYPE as "inventType",
<!-- 类型编码 -->
...
@@ -114,71 +114,73 @@
...
@@ -114,71 +114,73 @@
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"
/>
<include
refid=
"authCondition"
/>
<!-- 物料类型需要全部账套公用,如果不公用需要对HGPZ004表存货类型的键进行处理
<dynamic
prepend=
"ORDER BY"
>
<include refid="authCondition" />
<isNotEmpty
property=
"orderBy"
>
-->
$orderBy$
<dynamic
prepend=
"ORDER BY"
>
</isNotEmpty>
<isNotEmpty
property=
"orderBy"
>
<isEmpty
property=
"orderBy"
>
$orderBy$
CREATED_TIME desc
</isNotEmpty>
</isEmpty>
<isEmpty
property=
"orderBy"
>
</dynamic>
CREATED_TIME desc
</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
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>
<isNotEmpty prepend=" AND " property="accountCode">
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
DEP_CODE = #depCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventType">
<isNotEmpty prepend=" AND " property="inventType">
INVENT_TYPE = #inventType#
INVENT_TYPE = #inventType#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="inventTypeName">
<isNotEmpty prepend=" AND " property="inventTypeName">
INVENT_TYPE_NAME = #inventTypeName#
INVENT_TYPE_NAME = #inventTypeName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parInventType">
<isNotEmpty prepend=" AND " property="parInventType">
PAR_INVENT_TYPE = #parInventType#
PAR_INVENT_TYPE = #parInventType#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parInventTypeName">
<isNotEmpty prepend=" AND " property="parInventTypeName">
PAR_INVENT_TYPE_NAME = #parInventTypeName#
PAR_INVENT_TYPE_NAME = #parInventTypeName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
CREATED_BY = #createdBy#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
CREATED_NAME = #createdName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
CREATED_TIME = #createdTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
UPDATED_BY = #updatedBy#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
UPDATED_NAME = #updatedName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
UPDATED_TIME = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<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,
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
eeacca29
...
@@ -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
)));
...
...
src/main/webapp/common/template/PZ/HGPZ005_存货档案.xls
View file @
eeacca29
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment