Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-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
hp-smart
Commits
55d67351
Commit
55d67351
authored
Jan 25, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.采购入库实体类和XML
parent
f2d28b86
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
214 additions
and
75 deletions
+214
-75
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+52
-0
ServiceHPKC009.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
+23
-23
HPKC001.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
+71
-26
HPKC002.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
+68
-26
No files found.
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
55d67351
...
...
@@ -7,6 +7,54 @@ package com.baosight.hpjx.hp.constant;
public
class
HPSqlConstant
{
/**
* HPKC001 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC001
{
// 统计
public
static
final
String
STAT_DATE
=
"HPKC001.statDate"
;
}
/**
* HPKC002 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC002
{
// 统计
public
static
final
String
STAT_DATE
=
"HPKC002.statDate"
;
}
/**
* HPKC003 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC003
{
// 统计
public
static
final
String
STAT_DATE
=
"HPKC003.statDate"
;
}
/**
* HPKC004 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC004
{
// 统计
public
static
final
String
STAT_DATE
=
"HPKC004.statDate"
;
}
/**
* HPKC005 SQL 定义
*
* @author:songx
...
...
@@ -32,6 +80,8 @@ public class HPSqlConstant {
public
static
final
String
QUERY_SUM
=
"HPKC006.querySum"
;
// 锁
public
static
final
String
LOCK
=
"HPKC006.lock"
;
// 统计
public
static
final
String
STAT_DATE
=
"HPKC006.statDate"
;
}
/**
...
...
@@ -46,6 +96,8 @@ public class HPSqlConstant {
public
static
final
String
QUERY_SUM
=
"HPKC007.querySum"
;
// 锁
public
static
final
String
LOCK
=
"HPKC007.lock"
;
// 统计
public
static
final
String
STAT_DATE
=
"HPKC007.statDate"
;
}
/**
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC009.java
View file @
55d67351
...
...
@@ -177,25 +177,25 @@ public class ServiceHPKC009 extends ServiceBase {
private
List
<
HPKC009
>
statCg
(
Map
queryMap
)
{
Map
<
String
,
HPKC009
>
kc009Map
=
new
HashMap
();
// 1.1、期末库存
List
<
HPKC001
>
aItems
=
dao
.
query
(
"HPKC001.statDate"
,
new
HashMap
<>());
List
<
HPKC001
>
aItems
=
dao
.
query
(
HPSqlConstant
.
HPKC001
.
STAT_DATE
,
new
HashMap
<>());
// 1.2、收入
queryMap
.
put
(
"createdTimeFrom"
,
queryMap
.
get
(
"yesterFrom"
)
+
"000000"
);
queryMap
.
put
(
"createdTimeTo"
,
queryMap
.
get
(
"yesterTo"
)
+
"235959"
);
List
<
HPKC001
>
bKc001s
=
dao
.
query
(
"HPKC001.statDate"
,
queryMap
);
List
<
HPKC001
>
bKc001s
=
dao
.
query
(
HPSqlConstant
.
HPKC001
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC001
>
bKc001Map
=
bKc001s
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
get
MaterialType
()
+
"#"
+
item
.
getMaterial
Code
()
+
"#"
+
item
.
get
Spec
(),
item
->
item
));
+
item
.
get
InventType
()
+
"#"
+
item
.
getInvent
Code
()
+
"#"
+
item
.
get
InventRecordId
(),
item
->
item
));
// 1.3、发出
List
<
HPKC002
>
cKc002s
=
dao
.
query
(
"HPKC002.statDate"
,
queryMap
);
List
<
HPKC002
>
cKc002s
=
dao
.
query
(
HPSqlConstant
.
HPKC002
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC002
>
cKc001Map
=
cKc002s
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
get
MaterialType
()
+
"#"
+
item
.
getMaterial
Code
()
+
"#"
+
item
.
get
Spec
(),
item
->
item
));
+
item
.
get
InventType
()
+
"#"
+
item
.
getInvent
Code
()
+
"#"
+
item
.
get
InventRecordId
(),
item
->
item
));
// 1.4、期初库存
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"beforeDate"
));
queryMap
.
put
(
"kcType"
,
HPConstant
.
KcType
.
CG
);
List
<
HPKC009
>
dKc009s
=
dao
.
query
(
"HPKC009.query"
,
new
HashMap
<>());
List
<
HPKC009
>
dKc009s
=
dao
.
query
(
HPKC009
.
QUERY
,
new
HashMap
<>());
Map
<
String
,
HPKC009
>
dKc009Map
=
dKc009s
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
()
+
"#"
...
...
@@ -203,24 +203,24 @@ public class ServiceHPKC009 extends ServiceBase {
// 根据期末库存生成收发存对象
for
(
HPKC001
aItem
:
aItems
)
{
String
key
=
aItem
.
getCompanyCode
()
+
"#"
+
aItem
.
getDepCode
()
+
"#"
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
get
Material
Type
()
+
"#"
+
aItem
.
get
MaterialCode
()
+
"#"
+
aItem
.
getSpec
();
+
aItem
.
getWhCode
()
+
"#"
+
aItem
.
get
Invent
Type
()
+
"#"
+
aItem
.
get
InventCode
()
+
"#"
+
aItem
.
getInventRecordId
();
HPKC009
kc009
=
BeanUtils
.
copy
(
aItem
,
HPKC009
.
class
);
kc009
.
setInventType
(
aItem
.
get
Material
Type
());
kc009
.
setInventCode
(
aItem
.
get
Material
Code
());
kc009
.
setInventType
(
aItem
.
get
Invent
Type
());
kc009
.
setInventCode
(
aItem
.
get
Invent
Code
());
kc009
.
setKcType
(
HPConstant
.
KcType
.
CG
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
// 期末
kc009
.
setEndAmount
(
BigDecimal
.
valueOf
(
aItem
.
getQuantity
()
));
kc009
.
setEndAmount
(
aItem
.
getAmount
(
));
kc009
.
setEndWeight
(
aItem
.
getWeight
());
// 收入
HPKC001
bKc001
=
bKc001Map
.
get
(
key
);
kc009
.
setEnterAmount
(
bKc001
==
null
?
BigDecimal
.
ZERO
:
BigDecimal
.
valueOf
(
bKc001
.
getQuantity
()
));
kc009
.
setEnterAmount
(
bKc001
==
null
?
BigDecimal
.
ZERO
:
bKc001
.
getAmount
(
));
kc009
.
setEnterWeight
(
bKc001
==
null
?
BigDecimal
.
ZERO
:
bKc001
.
getWeight
());
// 发出
HPKC002
cKc002
=
cKc001Map
.
get
(
key
);
kc009
.
setOuterAmount
(
cKc002
==
null
?
BigDecimal
.
ZERO
:
BigDecimal
.
valueOf
(
cKc002
.
getQuantity
()
));
kc009
.
setOuterAmount
(
cKc002
==
null
?
BigDecimal
.
ZERO
:
cKc002
.
getAmount
(
));
kc009
.
setOuterWeight
(
cKc002
==
null
?
BigDecimal
.
ZERO
:
cKc002
.
getWeight
());
// 期初
HPKC009
dKc009
=
dKc009Map
.
get
(
key
);
...
...
@@ -247,23 +247,23 @@ public class ServiceHPKC009 extends ServiceBase {
private
List
<
HPKC009
>
statSc
(
Map
queryMap
)
{
Map
<
String
,
HPKC009
>
kc009Map
=
new
HashMap
();
// 1.1、期末库存
List
<
HPKC003
>
aItems
=
dao
.
query
(
"HPKC003.statDate"
,
new
HashMap
<>());
List
<
HPKC003
>
aItems
=
dao
.
query
(
HPSqlConstant
.
HPKC003
.
STAT_DATE
,
new
HashMap
<>());
// 1.2、收入
queryMap
.
put
(
"createdTimeFrom"
,
queryMap
.
get
(
"yesterday"
)
+
"000000"
);
queryMap
.
put
(
"createdTimeTo"
,
queryMap
.
get
(
"yesterday"
)
+
"235959"
);
List
<
HPKC003
>
bItems
=
dao
.
query
(
"HPKC003.statDate"
,
queryMap
);
List
<
HPKC003
>
bItems
=
dao
.
query
(
HPSqlConstant
.
HPKC003
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC003
>
bItemMap
=
bItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
// 1.3、发出
List
<
HPKC004
>
cItems
=
dao
.
query
(
"HPKC004.statDate"
,
queryMap
);
List
<
HPKC004
>
cItems
=
dao
.
query
(
HPSqlConstant
.
HPKC004
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC004
>
cItemMap
=
cItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
// 1.4、期初库存
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"beforeDate"
));
queryMap
.
put
(
"kcType"
,
HPConstant
.
KcType
.
SC
);
List
<
HPKC009
>
dItems
=
dao
.
query
(
"HPKC009.query"
,
new
HashMap
<>());
List
<
HPKC009
>
dItems
=
dao
.
query
(
HPKC009
.
QUERY
,
new
HashMap
<>());
Map
<
String
,
HPKC009
>
dItemMap
=
dItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
...
...
@@ -315,23 +315,23 @@ public class ServiceHPKC009 extends ServiceBase {
private
List
<
HPKC009
>
statQt
(
Map
queryMap
)
{
Map
<
String
,
HPKC009
>
kc009Map
=
new
HashMap
();
// 1.1、期末库存
List
<
HPKC006
>
aItems
=
dao
.
query
(
"HPKC006.statDate"
,
new
HashMap
<>());
List
<
HPKC006
>
aItems
=
dao
.
query
(
HPSqlConstant
.
HPKC006
.
STAT_DATE
,
new
HashMap
<>());
// 1.2、收入
queryMap
.
put
(
"createdTimeFrom"
,
queryMap
.
get
(
"yesterday"
)
+
"000000"
);
queryMap
.
put
(
"createdTimeTo"
,
queryMap
.
get
(
"yesterday"
)
+
"235959"
);
List
<
HPKC006
>
bItems
=
dao
.
query
(
"HPKC006.statDate"
,
queryMap
);
List
<
HPKC006
>
bItems
=
dao
.
query
(
HPSqlConstant
.
HPKC006
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC006
>
bItemMap
=
bItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
// 1.3、发出
List
<
HPKC007
>
cItems
=
dao
.
query
(
"HPKC007.statDate"
,
queryMap
);
List
<
HPKC007
>
cItems
=
dao
.
query
(
HPSqlConstant
.
HPKC007
.
STAT_DATE
,
queryMap
);
Map
<
String
,
HPKC007
>
cItemMap
=
cItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
// 1.4、期初库存
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"beforeDate"
));
queryMap
.
put
(
"kcType"
,
HPConstant
.
KcType
.
QT
);
List
<
HPKC009
>
dItems
=
dao
.
query
(
"HPKC009.query"
,
new
HashMap
<>());
List
<
HPKC009
>
dItems
=
dao
.
query
(
HPKC009
.
QUERY
,
new
HashMap
<>());
Map
<
String
,
HPKC009
>
dItemMap
=
dItems
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
item
.
getCompanyCode
()
+
"#"
+
item
.
getDepCode
()
+
"#"
+
item
.
getWhCode
()
+
"#"
+
item
.
getInventType
()
+
"#"
+
item
.
getInventCode
(),
item
->
item
));
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
View file @
55d67351
...
...
@@ -27,27 +27,72 @@
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialType"
>
MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialCode"
>
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"purchaseCode"
>
PURCHASE_CODE = #purchaseCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"weight"
>
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remarks"
>
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"oldPurchaseCode"
>
OLD_PURCHASE_CODE = #oldPurchaseCode#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
@@ -133,17 +178,17 @@
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MATERIAL_TYPE AS "material
Type",
MATERIAL_CODE AS "material
Code",
SPEC AS "spec
",
COALESCE(SUM(
QUANTITY), 0) AS "quantity
",
INVENT_TYPE AS "invent
Type",
INVENT_CODE AS "invent
Code",
INVENT_RECORD_ID AS "inventRecordId
",
COALESCE(SUM(
AMOUNT), 0) AS "amount
",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC001
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE,
MATERIAL_TYPE, MATERIAL_CODE, SPEC
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE,
INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
View file @
55d67351
...
...
@@ -27,27 +27,69 @@
</sql>
<sql
id=
"condition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentTime"
>
DOCUMENT_TIME = #documentTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"documentCode"
>
DOCUMENT_CODE LIKE CONCAT('%',CONCAT( #documentCode#,'%'))
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialType"
>
MATERIAL_TYPE = #materialType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"materialCode"
>
MATERIAL_CODE = #materialCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdBy"
>
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdName"
>
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdTime"
>
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedBy"
>
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedName"
>
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"reqCode"
>
REQ_CODE = #reqCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whCode"
>
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventType"
>
INVENT_TYPE = #inventType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventCode"
>
INVENT_CODE = #inventCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"amount"
>
AMOUNT = #amount#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"weight"
>
WEIGHT = #weight#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"remarks"
>
REMARKS = #remarks#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC002"
>
...
...
@@ -128,17 +170,17 @@
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
MATERIAL_TYPE AS "material
Type",
MATERIAL_CODE AS "material
Code",
SPEC AS "spec
",
COALESCE(SUM(
QUANTITY), 0) AS "quantity
",
INVENT_TYPE AS "invent
Type",
INVENT_CODE AS "invent
Code",
INVENT_RECORD_ID AS "inventRecordId
",
COALESCE(SUM(
AMOUNT), 0) AS "amount
",
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC002
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE,
MATERIAL_TYPE, MATERIAL_CODE, SPEC
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE,
INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
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