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
0364fded
Commit
0364fded
authored
Jun 11, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收发存汇总表代码提交70%,缺少盘点、以及合并生产库存统计
parent
7f40fb81
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
435 additions
and
78 deletions
+435
-78
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+65
-75
HGKC009.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC009.java
+0
-0
ServiceHGKC009.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
+0
-0
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+19
-0
HGKC006A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
+19
-0
HGKC007A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
+20
-0
HGKC008A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
+19
-0
HGKC009.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC009.xml
+203
-0
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+1
-1
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+88
-1
HGSC004.jsp
src/main/webapp/HG/SC/HGSC004.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
0364fded
...
...
@@ -75,12 +75,15 @@ public class HGSqlConstant {
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
gKc
001
{
public
class
H
GKC
001
{
// 模块名称
private
static
final
String
MODULE_NAME
=
"HGKC001."
;
// 统计
public
static
final
String
STAT_DATE
=
"HGKC001.statDate"
;
// 锁
public
static
final
String
LOCK
=
MODULE_NAME
+
"lock"
;
public
static
final
String
LOCK
=
"HGKC001.lock"
;
}
/**
...
...
@@ -163,50 +166,37 @@ public class HGSqlConstant {
public
static
final
String
PROCESS
=
MODULE_NAME
+
"process"
;
}
/**
* HPKC001 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HPKC001
{
// 统计
public
static
final
String
STAT_DATE
=
"HPKC001.statDate"
;
// 锁
public
static
final
String
LOCK
=
"HPKC001.lock"
;
}
/**
* H
P
KC002 SQL 定义
* H
G
KC002 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
PKC002
{
public
class
H
GKC008A
{
// 统计
public
static
final
String
STAT_DATE
=
"H
PKC002
.statDate"
;
public
static
final
String
STAT_DATE
=
"H
GKC008A
.statDate"
;
// 锁
public
static
final
String
LOCK
=
"H
PKC002
.lock"
;
public
static
final
String
LOCK
=
"H
GKC008A
.lock"
;
}
/**
* H
P
KC003 SQL 定义
* H
G
KC003 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC003
{
public
class
H
G
KC003
{
// 统计
public
static
final
String
STAT_DATE
=
"H
P
KC003.statDate"
;
public
static
final
String
STAT_DATE
=
"H
G
KC003.statDate"
;
// 锁
public
static
final
String
LOCK
=
"H
P
KC003.lock"
;
public
static
final
String
LOCK
=
"H
G
KC003.lock"
;
}
/**
* H
P
KC004 SQL 定义
* H
G
KC004 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
...
...
@@ -222,183 +212,183 @@ public class HGSqlConstant {
}
/**
* H
P
KC005 SQL 定义
* H
G
KC005 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC005
{
public
class
H
G
KC005
{
// 查询
public
static
final
String
QUERY_SUM
=
"H
P
KC005.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
G
KC005.querySum"
;
// 锁
public
static
final
String
LOCK
=
"H
P
KC005.lock"
;
public
static
final
String
LOCK
=
"H
G
KC005.lock"
;
// 统计
public
static
final
String
STAT_DATE
=
"H
P
KC005.statDate"
;
public
static
final
String
STAT_DATE
=
"H
G
KC005.statDate"
;
}
/**
* H
P
KC005A SQL 定义
* H
G
KC005A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC005A
{
public
class
H
G
KC005A
{
// 锁
public
static
final
String
LOCK
=
"H
P
KC005A.lock"
;
public
static
final
String
LOCK
=
"H
G
KC005A.lock"
;
}
/**
* H
P
KC006 SQL 定义
* H
G
KC006 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
PKC006
{
public
class
H
GKC006A
{
// 查询
public
static
final
String
QUERY_SUM
=
"H
PKC006
.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
GKC006A
.querySum"
;
// 锁
public
static
final
String
LOCK
=
"H
PKC006
.lock"
;
public
static
final
String
LOCK
=
"H
GKC006A
.lock"
;
// 统计
public
static
final
String
STAT_DATE
=
"H
PKC006
.statDate"
;
public
static
final
String
STAT_DATE
=
"H
GKC006A
.statDate"
;
}
/**
* H
P
KC007 SQL 定义
* H
G
KC007 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
PKC007
{
public
class
H
GKC007A
{
// 查询
public
static
final
String
QUERY_SUM
=
"H
PKC007
.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
GKC007A
.querySum"
;
// 锁
public
static
final
String
LOCK
=
"H
PKC007
.lock"
;
public
static
final
String
LOCK
=
"H
GKC007A
.lock"
;
// 统计
public
static
final
String
STAT_DATE
=
"H
PKC007
.statDate"
;
public
static
final
String
STAT_DATE
=
"H
GKC007A
.statDate"
;
}
/**
* H
P
KC008 SQL 定义
* H
G
KC008 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC008
{
public
class
H
G
KC008
{
// 查询
public
static
final
String
QUERY_SUM
=
"H
P
KC008.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
G
KC008.querySum"
;
}
/**
* H
P
KC009 SQL 定义
* H
G
KC009 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC009
{
public
class
H
G
KC009
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"H
P
KC009.deleteByTime"
;
public
static
final
String
DELETE_BY_TIME
=
"H
G
KC009.deleteByTime"
;
// 查询
public
static
final
String
QUERY
=
"H
P
KC009.query"
;
public
static
final
String
QUERY
=
"H
G
KC009.query"
;
// 查询统计
public
static
final
String
QUERY_SUM
=
"H
P
KC009.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
G
KC009.querySum"
;
}
/**
* H
P
KC009A SQL 定义
* H
G
KC009A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC009A
{
public
class
H
G
KC009A
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"H
P
KC009A.deleteByTime"
;
public
static
final
String
DELETE_BY_TIME
=
"H
G
KC009A.deleteByTime"
;
// 查询
public
static
final
String
QUERY
=
"H
P
KC009A.query"
;
public
static
final
String
QUERY
=
"H
G
KC009A.query"
;
// 查询统计
public
static
final
String
QUERY_SUM
=
"H
P
KC009A.querySum"
;
public
static
final
String
QUERY_SUM
=
"H
G
KC009A.querySum"
;
}
/**
* H
P
KC010 SQL 定义
* H
G
KC010 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC010
{
public
class
H
G
KC010
{
// 锁
public
static
final
String
LOCK
=
"H
P
KC010.lock"
;
public
static
final
String
LOCK
=
"H
G
KC010.lock"
;
}
/**
* H
P
KC010A SQL 定义
* H
G
KC010A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC010A
{
public
class
H
G
KC010A
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"H
P
KC010A.deleteByTime"
;
public
static
final
String
DELETE_BY_TIME
=
"H
G
KC010A.deleteByTime"
;
// 备份数量
public
static
final
String
BACKUP
=
"H
P
KC010A.backup"
;
public
static
final
String
BACKUP
=
"H
G
KC010A.backup"
;
}
/**
* H
P
KC011 SQL 定义
* H
G
KC011 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC011
{
public
class
H
G
KC011
{
// 锁
public
static
final
String
LOCK
=
"H
P
KC011.lock"
;
public
static
final
String
LOCK
=
"H
G
KC011.lock"
;
}
/**
* H
P
KC011A SQL 定义
* H
G
KC011A SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC011A
{
public
class
H
G
KC011A
{
// 按日期删除
public
static
final
String
DELETE_BY_TIME
=
"H
P
KC011A.deleteByTime"
;
public
static
final
String
DELETE_BY_TIME
=
"H
G
KC011A.deleteByTime"
;
// 备份数量
public
static
final
String
BACKUP
=
"H
P
KC011A.backup"
;
public
static
final
String
BACKUP
=
"H
G
KC011A.backup"
;
}
/**
* H
P
KC012 SQL 定义
* H
G
KC012 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC012
{
public
class
H
G
KC012
{
// 锁
public
static
final
String
QUERY
=
"H
P
KC012.query"
;
public
static
final
String
QUERY
=
"H
G
KC012.query"
;
}
/**
* H
P
KC013 SQL 定义
* H
G
KC013 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
H
P
KC013
{
public
class
H
G
KC013
{
// 锁
public
static
final
String
UPDATE_STATUS
=
"H
P
KC013.updateStatus"
;
public
static
final
String
UPDATE_STATUS
=
"H
G
KC013.updateStatus"
;
}
/**
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC009.java
0 → 100644
View file @
0364fded
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
0 → 100644
View file @
0364fded
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
0364fded
...
...
@@ -199,4 +199,23 @@
<include
refid=
"idCondition"
/>
</update>
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC001"
>
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
SPEC_ID AS "specId",
COALESCE(SUM(DEPOSIT_QTY), 0) AS "depositQty",
COALESCE(SUM(DEPOSIT_WEIGHT), 0) AS "depositWeight"
FROM ${hggpSchema}.HGKC001
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
View file @
0364fded
...
...
@@ -342,4 +342,23 @@
ID = #id#
</update>
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC006A"
>
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC006A
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
View file @
0364fded
...
...
@@ -335,4 +335,24 @@
ID = #id#
</update>
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC007A"
>
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(INV_QTY), 0) AS "invQty",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC007A
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
View file @
0364fded
...
...
@@ -233,4 +233,23 @@
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</delete>
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC008A"
>
SELECT
COMPANY_CODE AS "companyCode",
DEP_CODE AS "depCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId",
COALESCE(SUM(INV_QTY), 0) AS "invQty",
COALESCE(SUM(INV_WEIGHT), 0) AS "invWeight"
FROM ${hggpSchema}.HGKC008A
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE, INVENT_RECORD_ID
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC009.xml
0 → 100644
View file @
0364fded
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
0364fded
...
...
@@ -48,7 +48,7 @@ public class HGKCTools {
}
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"depositNos"
,
depositNos
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
H
gKc
001
.
LOCK
,
paramMap
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
H
GKC
001
.
LOCK
,
paramMap
);
}
/**
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
0364fded
package
com
.
baosight
.
hggp
.
hg
.
pz
.
tools
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
...
...
@@ -81,6 +82,63 @@ public class HGPZTools {
}
/**
* HGPZ004 公共DAO定义
*
* @author:songx
* @date:2024/2/6,13:37
*/
public
static
class
hgpz004
{
/**
* 查询存货
*
* @param inventCode
* @return
*/
public
static
HGPZ004
getByCode
(
String
inventCode
)
{
AssertUtils
.
isEmpty
(
inventCode
,
"存货编码不能为空"
);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCode"
,
inventCode
);
List
<
HGPZ004
>
pz004s
=
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
queryMap
);
if
(
pz004s
!=
null
&&
pz004s
.
size
()==
0
){
pz004s
=
null
;
}
AssertUtils
.
isEmpty
(
pz004s
,
String
.
format
(
"存货编码[%s]不存在"
,
inventCode
));
return
pz004s
.
get
(
0
);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public
static
List
<
HGPZ004
>
list
(
List
<
String
>
inventCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
inventCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventCodes"
,
inventCodes
);
return
DaoBase
.
getInstance
().
query
(
HGPZ004
.
QUERY
,
queryMap
);
}
/**
* 查询存货信息
*
* @param inventCodes
* @return
*/
public
static
Map
<
String
,
HGPZ004
>
map
(
List
<
String
>
inventCodes
)
{
List
<
HGPZ004
>
pz004s
=
list
(
inventCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz004s
))
{
return
null
;
}
return
pz004s
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ004:
:
getInventType
,
item
->
item
));
}
}
/**
* 仓库管理
* HPPZ007 公共DAO定义
*
...
...
@@ -102,6 +160,35 @@ public class HGPZTools {
List
<
HGPZ007
>
results
=
DaoBase
.
getInstance
().
query
(
HGPZ007
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
List
<
HGPZ007
>
list
(
List
<
String
>
whCodes
)
{
if
(
CollectionUtils
.
isEmpty
(
whCodes
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"whCodes"
,
whCodes
);
return
DaoBase
.
getInstance
().
query
(
"HGPZ007.query"
,
queryMap
);
}
/**
* 查询仓库信息
*
* @param whCodes
* @return
*/
public
static
Map
<
String
,
HGPZ007
>
map
(
List
<
String
>
whCodes
)
{
List
<
HGPZ007
>
pz007s
=
list
(
whCodes
);
if
(
CollectionUtils
.
isEmpty
(
pz007s
))
{
return
null
;
}
return
pz007s
.
stream
().
collect
(
Collectors
.
toMap
(
HGPZ007:
:
getWhCode
,
item
->
item
));
}
}
/**
...
...
@@ -344,7 +431,7 @@ public class HGPZTools {
public
static
HGPZ005
checkAndSave
(
Integer
inventType
,
String
inventName
,
BigDecimal
length
,
BigDecimal
width
,
BigDecimal
thick
,
BigDecimal
coefficient
,
String
material
,
String
unit
)
{
// 检查存货名称是否存在
//String inventCode = HGPZTools.H
pPz
004.checkAndSave(inventType, inventName);
//String inventCode = HGPZTools.H
GPZ
004.checkAndSave(inventType, inventName);
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventType"
,
inventType
);
//queryMap.put("inventCode", inventCode);
...
...
src/main/webapp/HG/SC/HGSC004.jsp
View file @
0364fded
...
...
@@ -34,7 +34,7 @@
<EF:EFOptions
blockId=
"companyBox_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"blueprintCode"
cname=
"蓝图编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"blueprintName"
cname=
"蓝图名称"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
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