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
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1881 additions
and
78 deletions
+1881
-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
+1112
-0
ServiceHGKC009.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
+334
-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 {
...
@@ -75,12 +75,15 @@ public class HGSqlConstant {
* @author:songx
* @author:songx
* @date:2024/1/20,16:45
* @date:2024/1/20,16:45
*/
*/
public
class
H
gKc
001
{
public
class
H
GKC
001
{
// 模块名称
// 模块名称
private
static
final
String
MODULE_NAME
=
"HGKC001."
;
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 {
...
@@ -163,50 +166,37 @@ public class HGSqlConstant {
public
static
final
String
PROCESS
=
MODULE_NAME
+
"process"
;
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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @date:2024/1/20,16:45
...
@@ -222,183 +212,183 @@ public class HGSqlConstant {
...
@@ -222,183 +212,183 @@ public class HGSqlConstant {
}
}
/**
/**
* H
P
KC005 SQL 定义
* H
G
KC005 SQL 定义
*
*
* @author:songx
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
* @author:songx
* @date:2024/1/20,16:45
* @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
package
com
.
baosight
.
hggp
.
hg
.
kc
.
domain
;
import
com.baosight.iplat4j.core.util.NumberUtils
;
import
java.math.BigDecimal
;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
/**
* Project: <br>
* Title:THgkc009.java <br>
* Description: <br>
*
* Copyrigth:Baosight Software LTD.co Copyright (c) 2019. <br>
*
* @version 1.0
* @history 2024-06-11 17:48:25 create
*/
public
class
HGKC009
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
public
static
final
String
FIELD_COMPANY_CODE
=
"companyCode"
;
/* 企业编码 预留*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_DATE_TYPE
=
"dateType"
;
/* 日期类型:DAY:天,MONTH:月*/
public
static
final
String
FIELD_DATE_PROC
=
"dateProc"
;
/* 日期*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_INVENT_TYPE
=
"inventType"
;
/* 存货类型*/
public
static
final
String
FIELD_INVENT_CODE
=
"inventCode"
;
/* 存货编码*/
public
static
final
String
FIELD_INVENT_NAME
=
"inventName"
;
/* 存货名称*/
public
static
final
String
FIELD_INVENT_RECORD_ID
=
"inventRecordId"
;
/* 规格ID*/
public
static
final
String
FIELD_INIT_AMOUNT
=
"initAmount"
;
/* 期初数量*/
public
static
final
String
FIELD_INIT_WEIGHT
=
"initWeight"
;
/* 期初重量*/
public
static
final
String
FIELD_CG_ENTER_AMOUNT
=
"cgEnterAmount"
;
/* 采购入库数量*/
public
static
final
String
FIELD_CG_ENTER_WEIGHT
=
"cgEnterWeight"
;
/* 采购入库重量*/
public
static
final
String
FIELD_SC_ENTER_AMOUNT
=
"scEnterAmount"
;
/* 生产入库数量*/
public
static
final
String
FIELD_SC_ENTER_WEIGHT
=
"scEnterWeight"
;
/* 生产入库重量*/
public
static
final
String
FIELD_QT_ENTER_AMOUNT
=
"qtEnterAmount"
;
/* 其它入库数量*/
public
static
final
String
FIELD_QT_ENTER_WEIGHT
=
"qtEnterWeight"
;
/* 其它入库重量*/
public
static
final
String
FIELD_ENTER_AMOUNT
=
"enterAmount"
;
/* 入库数量*/
public
static
final
String
FIELD_ENTER_WEIGHT
=
"enterWeight"
;
/* 入库重量*/
public
static
final
String
FIELD_SC_OUTER_AMOUNT
=
"scOuterAmount"
;
/* 生产领料数量*/
public
static
final
String
FIELD_SC_OUTER_WEIGHT
=
"scOuterWeight"
;
/* 生产领料重量*/
public
static
final
String
FIELD_XS_OUTER_AMOUNT
=
"xsOuterAmount"
;
/* 销售出库数量*/
public
static
final
String
FIELD_XS_OUTER_WEIGHT
=
"xsOuterWeight"
;
/* 销售出库重量*/
public
static
final
String
FIELD_QT_OUTER_AMOUNT
=
"qtOuterAmount"
;
/* 其它出库数量*/
public
static
final
String
FIELD_QT_OUTER_WEIGHT
=
"qtOuterWeight"
;
/* 其它出库重量*/
public
static
final
String
FIELD_OUTER_AMOUNT
=
"outerAmount"
;
/* 出库数量*/
public
static
final
String
FIELD_OUTER_WEIGHT
=
"outerWeight"
;
/* 出库重量*/
public
static
final
String
FIELD_PD_DIFF_AMOUNT
=
"pdDiffAmount"
;
/* 盘点差异数量*/
public
static
final
String
FIELD_PD_DIFF_WEIGHT
=
"pdDiffWeight"
;
/* 盘点差异重量*/
public
static
final
String
FIELD_END_AMOUNT
=
"endAmount"
;
/* 期末数量*/
public
static
final
String
FIELD_END_WEIGHT
=
"endWeight"
;
/* 期末重量*/
public
static
final
String
FIELD_CREATED_BY
=
"createdBy"
;
/* 创建人*/
public
static
final
String
FIELD_CREATED_NAME
=
"createdName"
;
/* 创建人名称*/
public
static
final
String
FIELD_CREATED_TIME
=
"createdTime"
;
/* 创建时间*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 更新人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_COMPANY_CODE
=
"COMPANY_CODE"
;
/* 企业编码 预留*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_DATE_TYPE
=
"DATE_TYPE"
;
/* 日期类型:DAY:天,MONTH:月*/
public
static
final
String
COL_DATE_PROC
=
"DATE_PROC"
;
/* 日期*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
public
static
final
String
COL_INVENT_TYPE
=
"INVENT_TYPE"
;
/* 存货类型*/
public
static
final
String
COL_INVENT_CODE
=
"INVENT_CODE"
;
/* 存货编码*/
public
static
final
String
COL_INVENT_NAME
=
"INVENT_NAME"
;
/* 存货名称*/
public
static
final
String
COL_INVENT_RECORD_ID
=
"INVENT_RECORD_ID"
;
/* 规格ID*/
public
static
final
String
COL_INIT_AMOUNT
=
"INIT_AMOUNT"
;
/* 期初数量*/
public
static
final
String
COL_INIT_WEIGHT
=
"INIT_WEIGHT"
;
/* 期初重量*/
public
static
final
String
COL_CG_ENTER_AMOUNT
=
"CG_ENTER_AMOUNT"
;
/* 采购入库数量*/
public
static
final
String
COL_CG_ENTER_WEIGHT
=
"CG_ENTER_WEIGHT"
;
/* 采购入库重量*/
public
static
final
String
COL_SC_ENTER_AMOUNT
=
"SC_ENTER_AMOUNT"
;
/* 生产入库数量*/
public
static
final
String
COL_SC_ENTER_WEIGHT
=
"SC_ENTER_WEIGHT"
;
/* 生产入库重量*/
public
static
final
String
COL_QT_ENTER_AMOUNT
=
"QT_ENTER_AMOUNT"
;
/* 其它入库数量*/
public
static
final
String
COL_QT_ENTER_WEIGHT
=
"QT_ENTER_WEIGHT"
;
/* 其它入库重量*/
public
static
final
String
COL_ENTER_AMOUNT
=
"ENTER_AMOUNT"
;
/* 入库数量*/
public
static
final
String
COL_ENTER_WEIGHT
=
"ENTER_WEIGHT"
;
/* 入库重量*/
public
static
final
String
COL_SC_OUTER_AMOUNT
=
"SC_OUTER_AMOUNT"
;
/* 生产领料数量*/
public
static
final
String
COL_SC_OUTER_WEIGHT
=
"SC_OUTER_WEIGHT"
;
/* 生产领料重量*/
public
static
final
String
COL_XS_OUTER_AMOUNT
=
"XS_OUTER_AMOUNT"
;
/* 销售出库数量*/
public
static
final
String
COL_XS_OUTER_WEIGHT
=
"XS_OUTER_WEIGHT"
;
/* 销售出库重量*/
public
static
final
String
COL_QT_OUTER_AMOUNT
=
"QT_OUTER_AMOUNT"
;
/* 其它出库数量*/
public
static
final
String
COL_QT_OUTER_WEIGHT
=
"QT_OUTER_WEIGHT"
;
/* 其它出库重量*/
public
static
final
String
COL_OUTER_AMOUNT
=
"OUTER_AMOUNT"
;
/* 出库数量*/
public
static
final
String
COL_OUTER_WEIGHT
=
"OUTER_WEIGHT"
;
/* 出库重量*/
public
static
final
String
COL_PD_DIFF_AMOUNT
=
"PD_DIFF_AMOUNT"
;
/* 盘点差异数量*/
public
static
final
String
COL_PD_DIFF_WEIGHT
=
"PD_DIFF_WEIGHT"
;
/* 盘点差异重量*/
public
static
final
String
COL_END_AMOUNT
=
"END_AMOUNT"
;
/* 期末数量*/
public
static
final
String
COL_END_WEIGHT
=
"END_WEIGHT"
;
/* 期末重量*/
public
static
final
String
COL_CREATED_BY
=
"CREATED_BY"
;
/* 创建人*/
public
static
final
String
COL_CREATED_NAME
=
"CREATED_NAME"
;
/* 创建人名称*/
public
static
final
String
COL_CREATED_TIME
=
"CREATED_TIME"
;
/* 创建时间*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 更新人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
QUERY
=
"HGKC009.query"
;
public
static
final
String
COUNT
=
"HGKC009.count"
;
public
static
final
String
INSERT
=
"HGKC009.insert"
;
public
static
final
String
UPDATE
=
"HGKC009.update"
;
public
static
final
String
DELETE
=
"HGKC009.delete"
;
private
Long
id
=
null
;
private
String
companyCode
=
" "
;
/* 企业编码 预留*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
dateType
=
" "
;
/* 日期类型:DAY:天,MONTH:月*/
private
String
dateProc
=
" "
;
/* 日期*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
inventType
=
" "
;
/* 存货类型*/
private
String
inventCode
=
" "
;
/* 存货编码*/
private
String
inventName
=
" "
;
/* 存货名称*/
private
Long
inventRecordId
=
null
;
/* 规格ID*/
private
BigDecimal
initAmount
=
new
BigDecimal
(
0.00
);
/* 期初数量*/
private
BigDecimal
initWeight
=
new
BigDecimal
(
0.00
);
/* 期初重量*/
private
BigDecimal
cgEnterAmount
=
new
BigDecimal
(
0.00
);
/* 采购入库数量*/
private
BigDecimal
cgEnterWeight
=
new
BigDecimal
(
0.00
);
/* 采购入库重量*/
private
BigDecimal
scEnterAmount
=
new
BigDecimal
(
0.00
);
/* 生产入库数量*/
private
BigDecimal
scEnterWeight
=
new
BigDecimal
(
0.00
);
/* 生产入库重量*/
private
BigDecimal
qtEnterAmount
=
new
BigDecimal
(
0.00
);
/* 其它入库数量*/
private
BigDecimal
qtEnterWeight
=
new
BigDecimal
(
0.00
);
/* 其它入库重量*/
private
BigDecimal
enterAmount
=
new
BigDecimal
(
0.00
);
/* 入库数量*/
private
BigDecimal
enterWeight
=
new
BigDecimal
(
0.00
);
/* 入库重量*/
private
BigDecimal
scOuterAmount
=
new
BigDecimal
(
0.00
);
/* 生产领料数量*/
private
BigDecimal
scOuterWeight
=
new
BigDecimal
(
0.00
);
/* 生产领料重量*/
private
BigDecimal
xsOuterAmount
=
new
BigDecimal
(
0.00
);
/* 销售出库数量*/
private
BigDecimal
xsOuterWeight
=
new
BigDecimal
(
0.00
);
/* 销售出库重量*/
private
BigDecimal
qtOuterAmount
=
new
BigDecimal
(
0.00
);
/* 其它出库数量*/
private
BigDecimal
qtOuterWeight
=
new
BigDecimal
(
0.00
);
/* 其它出库重量*/
private
BigDecimal
outerAmount
=
new
BigDecimal
(
0.00
);
/* 出库数量*/
private
BigDecimal
outerWeight
=
new
BigDecimal
(
0.00
);
/* 出库重量*/
private
BigDecimal
pdDiffAmount
=
new
BigDecimal
(
0.00
);
/* 盘点差异数量*/
private
BigDecimal
pdDiffWeight
=
new
BigDecimal
(
0.00
);
/* 盘点差异重量*/
private
BigDecimal
endAmount
=
new
BigDecimal
(
0.00
);
/* 期末数量*/
private
BigDecimal
endWeight
=
new
BigDecimal
(
0.00
);
/* 期末重量*/
private
String
createdBy
=
" "
;
/* 创建人*/
private
String
createdName
=
" "
;
/* 创建人名称*/
private
String
createdTime
=
" "
;
/* 创建时间*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
=
" "
;
/* 更新时间*/
/**
* initialize the metadata.
*/
public
void
initMetaData
()
{
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
" "
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"企业编码 预留"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DATE_TYPE
);
eiColumn
.
setDescName
(
"日期类型:DAY:天,MONTH:月"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DATE_PROC
);
eiColumn
.
setDescName
(
"日期"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WH_CODE
);
eiColumn
.
setDescName
(
"仓库编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WH_NAME
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INIT_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"期初数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INIT_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"期初重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CG_ENTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"采购入库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CG_ENTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"采购入库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SC_ENTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"生产入库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SC_ENTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"生产入库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QT_ENTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"其它入库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QT_ENTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"其它入库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ENTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"入库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ENTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"入库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SC_OUTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"生产领料数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SC_OUTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"生产领料重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_XS_OUTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"销售出库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_XS_OUTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"销售出库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QT_OUTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"其它出库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QT_OUTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"其它出库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_OUTER_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"出库数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_OUTER_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"出库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PD_DIFF_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"盘点差异数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PD_DIFF_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"盘点差异重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_END_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"期末数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_END_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
2
);
eiColumn
.
setFieldLength
(
10
);
eiColumn
.
setDescName
(
"期末重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"更新人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"更新人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
* the constructor.
*/
public
HGKC009
()
{
initMetaData
();
}
/**
* get the id .
* @return the id
*/
public
Long
getId
()
{
return
this
.
id
;
}
/**
* set the id .
*
* @param id
*/
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
/**
* get the companyCode - 企业编码 预留.
* @return the companyCode
*/
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
}
/**
* set the companyCode - 企业编码 预留.
*
* @param companyCode - 企业编码 预留
*/
public
void
setCompanyCode
(
String
companyCode
)
{
this
.
companyCode
=
companyCode
;
}
/**
* get the depCode - 部门编码.
* @return the depCode
*/
public
String
getDepCode
()
{
return
this
.
depCode
;
}
/**
* set the depCode - 部门编码.
*
* @param depCode - 部门编码
*/
public
void
setDepCode
(
String
depCode
)
{
this
.
depCode
=
depCode
;
}
/**
* get the dateType - 日期类型:DAY:天,MONTH:月.
* @return the dateType
*/
public
String
getDateType
()
{
return
this
.
dateType
;
}
/**
* set the dateType - 日期类型:DAY:天,MONTH:月.
*
* @param dateType - 日期类型:DAY:天,MONTH:月
*/
public
void
setDateType
(
String
dateType
)
{
this
.
dateType
=
dateType
;
}
/**
* get the dateProc - 日期.
* @return the dateProc
*/
public
String
getDateProc
()
{
return
this
.
dateProc
;
}
/**
* set the dateProc - 日期.
*
* @param dateProc - 日期
*/
public
void
setDateProc
(
String
dateProc
)
{
this
.
dateProc
=
dateProc
;
}
/**
* get the whCode - 仓库编码.
* @return the whCode
*/
public
String
getWhCode
()
{
return
this
.
whCode
;
}
/**
* set the whCode - 仓库编码.
*
* @param whCode - 仓库编码
*/
public
void
setWhCode
(
String
whCode
)
{
this
.
whCode
=
whCode
;
}
/**
* get the whName - 仓库名称.
* @return the whName
*/
public
String
getWhName
()
{
return
this
.
whName
;
}
/**
* set the whName - 仓库名称.
*
* @param whName - 仓库名称
*/
public
void
setWhName
(
String
whName
)
{
this
.
whName
=
whName
;
}
/**
* get the inventType - 存货类型.
* @return the inventType
*/
public
String
getInventType
()
{
return
this
.
inventType
;
}
/**
* set the inventType - 存货类型.
*
* @param inventType - 存货类型
*/
public
void
setInventType
(
String
inventType
)
{
this
.
inventType
=
inventType
;
}
/**
* get the inventCode - 存货编码.
* @return the inventCode
*/
public
String
getInventCode
()
{
return
this
.
inventCode
;
}
/**
* set the inventCode - 存货编码.
*
* @param inventCode - 存货编码
*/
public
void
setInventCode
(
String
inventCode
)
{
this
.
inventCode
=
inventCode
;
}
/**
* get the inventName - 存货名称.
* @return the inventName
*/
public
String
getInventName
()
{
return
this
.
inventName
;
}
/**
* set the inventName - 存货名称.
*
* @param inventName - 存货名称
*/
public
void
setInventName
(
String
inventName
)
{
this
.
inventName
=
inventName
;
}
/**
* get the inventRecordId - 规格ID.
* @return the inventRecordId
*/
public
Long
getInventRecordId
()
{
return
this
.
inventRecordId
;
}
/**
* set the inventRecordId - 规格ID.
*
* @param inventRecordId - 规格ID
*/
public
void
setInventRecordId
(
Long
inventRecordId
)
{
this
.
inventRecordId
=
inventRecordId
;
}
/**
* get the initAmount - 期初数量.
* @return the initAmount
*/
public
BigDecimal
getInitAmount
()
{
return
this
.
initAmount
;
}
/**
* set the initAmount - 期初数量.
*
* @param initAmount - 期初数量
*/
public
void
setInitAmount
(
BigDecimal
initAmount
)
{
this
.
initAmount
=
initAmount
;
}
/**
* get the initWeight - 期初重量.
* @return the initWeight
*/
public
BigDecimal
getInitWeight
()
{
return
this
.
initWeight
;
}
/**
* set the initWeight - 期初重量.
*
* @param initWeight - 期初重量
*/
public
void
setInitWeight
(
BigDecimal
initWeight
)
{
this
.
initWeight
=
initWeight
;
}
/**
* get the cgEnterAmount - 采购入库数量.
* @return the cgEnterAmount
*/
public
BigDecimal
getCgEnterAmount
()
{
return
this
.
cgEnterAmount
;
}
/**
* set the cgEnterAmount - 采购入库数量.
*
* @param cgEnterAmount - 采购入库数量
*/
public
void
setCgEnterAmount
(
BigDecimal
cgEnterAmount
)
{
this
.
cgEnterAmount
=
cgEnterAmount
;
}
/**
* get the cgEnterWeight - 采购入库重量.
* @return the cgEnterWeight
*/
public
BigDecimal
getCgEnterWeight
()
{
return
this
.
cgEnterWeight
;
}
/**
* set the cgEnterWeight - 采购入库重量.
*
* @param cgEnterWeight - 采购入库重量
*/
public
void
setCgEnterWeight
(
BigDecimal
cgEnterWeight
)
{
this
.
cgEnterWeight
=
cgEnterWeight
;
}
/**
* get the scEnterAmount - 生产入库数量.
* @return the scEnterAmount
*/
public
BigDecimal
getScEnterAmount
()
{
return
this
.
scEnterAmount
;
}
/**
* set the scEnterAmount - 生产入库数量.
*
* @param scEnterAmount - 生产入库数量
*/
public
void
setScEnterAmount
(
BigDecimal
scEnterAmount
)
{
this
.
scEnterAmount
=
scEnterAmount
;
}
/**
* get the scEnterWeight - 生产入库重量.
* @return the scEnterWeight
*/
public
BigDecimal
getScEnterWeight
()
{
return
this
.
scEnterWeight
;
}
/**
* set the scEnterWeight - 生产入库重量.
*
* @param scEnterWeight - 生产入库重量
*/
public
void
setScEnterWeight
(
BigDecimal
scEnterWeight
)
{
this
.
scEnterWeight
=
scEnterWeight
;
}
/**
* get the qtEnterAmount - 其它入库数量.
* @return the qtEnterAmount
*/
public
BigDecimal
getQtEnterAmount
()
{
return
this
.
qtEnterAmount
;
}
/**
* set the qtEnterAmount - 其它入库数量.
*
* @param qtEnterAmount - 其它入库数量
*/
public
void
setQtEnterAmount
(
BigDecimal
qtEnterAmount
)
{
this
.
qtEnterAmount
=
qtEnterAmount
;
}
/**
* get the qtEnterWeight - 其它入库重量.
* @return the qtEnterWeight
*/
public
BigDecimal
getQtEnterWeight
()
{
return
this
.
qtEnterWeight
;
}
/**
* set the qtEnterWeight - 其它入库重量.
*
* @param qtEnterWeight - 其它入库重量
*/
public
void
setQtEnterWeight
(
BigDecimal
qtEnterWeight
)
{
this
.
qtEnterWeight
=
qtEnterWeight
;
}
/**
* get the enterAmount - 入库数量.
* @return the enterAmount
*/
public
BigDecimal
getEnterAmount
()
{
return
this
.
enterAmount
;
}
/**
* set the enterAmount - 入库数量.
*
* @param enterAmount - 入库数量
*/
public
void
setEnterAmount
(
BigDecimal
enterAmount
)
{
this
.
enterAmount
=
enterAmount
;
}
/**
* get the enterWeight - 入库重量.
* @return the enterWeight
*/
public
BigDecimal
getEnterWeight
()
{
return
this
.
enterWeight
;
}
/**
* set the enterWeight - 入库重量.
*
* @param enterWeight - 入库重量
*/
public
void
setEnterWeight
(
BigDecimal
enterWeight
)
{
this
.
enterWeight
=
enterWeight
;
}
/**
* get the scOuterAmount - 生产领料数量.
* @return the scOuterAmount
*/
public
BigDecimal
getScOuterAmount
()
{
return
this
.
scOuterAmount
;
}
/**
* set the scOuterAmount - 生产领料数量.
*
* @param scOuterAmount - 生产领料数量
*/
public
void
setScOuterAmount
(
BigDecimal
scOuterAmount
)
{
this
.
scOuterAmount
=
scOuterAmount
;
}
/**
* get the scOuterWeight - 生产领料重量.
* @return the scOuterWeight
*/
public
BigDecimal
getScOuterWeight
()
{
return
this
.
scOuterWeight
;
}
/**
* set the scOuterWeight - 生产领料重量.
*
* @param scOuterWeight - 生产领料重量
*/
public
void
setScOuterWeight
(
BigDecimal
scOuterWeight
)
{
this
.
scOuterWeight
=
scOuterWeight
;
}
/**
* get the xsOuterAmount - 销售出库数量.
* @return the xsOuterAmount
*/
public
BigDecimal
getXsOuterAmount
()
{
return
this
.
xsOuterAmount
;
}
/**
* set the xsOuterAmount - 销售出库数量.
*
* @param xsOuterAmount - 销售出库数量
*/
public
void
setXsOuterAmount
(
BigDecimal
xsOuterAmount
)
{
this
.
xsOuterAmount
=
xsOuterAmount
;
}
/**
* get the xsOuterWeight - 销售出库重量.
* @return the xsOuterWeight
*/
public
BigDecimal
getXsOuterWeight
()
{
return
this
.
xsOuterWeight
;
}
/**
* set the xsOuterWeight - 销售出库重量.
*
* @param xsOuterWeight - 销售出库重量
*/
public
void
setXsOuterWeight
(
BigDecimal
xsOuterWeight
)
{
this
.
xsOuterWeight
=
xsOuterWeight
;
}
/**
* get the qtOuterAmount - 其它出库数量.
* @return the qtOuterAmount
*/
public
BigDecimal
getQtOuterAmount
()
{
return
this
.
qtOuterAmount
;
}
/**
* set the qtOuterAmount - 其它出库数量.
*
* @param qtOuterAmount - 其它出库数量
*/
public
void
setQtOuterAmount
(
BigDecimal
qtOuterAmount
)
{
this
.
qtOuterAmount
=
qtOuterAmount
;
}
/**
* get the qtOuterWeight - 其它出库重量.
* @return the qtOuterWeight
*/
public
BigDecimal
getQtOuterWeight
()
{
return
this
.
qtOuterWeight
;
}
/**
* set the qtOuterWeight - 其它出库重量.
*
* @param qtOuterWeight - 其它出库重量
*/
public
void
setQtOuterWeight
(
BigDecimal
qtOuterWeight
)
{
this
.
qtOuterWeight
=
qtOuterWeight
;
}
/**
* get the outerAmount - 出库数量.
* @return the outerAmount
*/
public
BigDecimal
getOuterAmount
()
{
return
this
.
outerAmount
;
}
/**
* set the outerAmount - 出库数量.
*
* @param outerAmount - 出库数量
*/
public
void
setOuterAmount
(
BigDecimal
outerAmount
)
{
this
.
outerAmount
=
outerAmount
;
}
/**
* get the outerWeight - 出库重量.
* @return the outerWeight
*/
public
BigDecimal
getOuterWeight
()
{
return
this
.
outerWeight
;
}
/**
* set the outerWeight - 出库重量.
*
* @param outerWeight - 出库重量
*/
public
void
setOuterWeight
(
BigDecimal
outerWeight
)
{
this
.
outerWeight
=
outerWeight
;
}
/**
* get the pdDiffAmount - 盘点差异数量.
* @return the pdDiffAmount
*/
public
BigDecimal
getPdDiffAmount
()
{
return
this
.
pdDiffAmount
;
}
/**
* set the pdDiffAmount - 盘点差异数量.
*
* @param pdDiffAmount - 盘点差异数量
*/
public
void
setPdDiffAmount
(
BigDecimal
pdDiffAmount
)
{
this
.
pdDiffAmount
=
pdDiffAmount
;
}
/**
* get the pdDiffWeight - 盘点差异重量.
* @return the pdDiffWeight
*/
public
BigDecimal
getPdDiffWeight
()
{
return
this
.
pdDiffWeight
;
}
/**
* set the pdDiffWeight - 盘点差异重量.
*
* @param pdDiffWeight - 盘点差异重量
*/
public
void
setPdDiffWeight
(
BigDecimal
pdDiffWeight
)
{
this
.
pdDiffWeight
=
pdDiffWeight
;
}
/**
* get the endAmount - 期末数量.
* @return the endAmount
*/
public
BigDecimal
getEndAmount
()
{
return
this
.
endAmount
;
}
/**
* set the endAmount - 期末数量.
*
* @param endAmount - 期末数量
*/
public
void
setEndAmount
(
BigDecimal
endAmount
)
{
this
.
endAmount
=
endAmount
;
}
/**
* get the endWeight - 期末重量.
* @return the endWeight
*/
public
BigDecimal
getEndWeight
()
{
return
this
.
endWeight
;
}
/**
* set the endWeight - 期末重量.
*
* @param endWeight - 期末重量
*/
public
void
setEndWeight
(
BigDecimal
endWeight
)
{
this
.
endWeight
=
endWeight
;
}
/**
* get the createdBy - 创建人.
* @return the createdBy
*/
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
}
/**
* set the createdBy - 创建人.
*
* @param createdBy - 创建人
*/
public
void
setCreatedBy
(
String
createdBy
)
{
this
.
createdBy
=
createdBy
;
}
/**
* get the createdName - 创建人名称.
* @return the createdName
*/
public
String
getCreatedName
()
{
return
this
.
createdName
;
}
/**
* set the createdName - 创建人名称.
*
* @param createdName - 创建人名称
*/
public
void
setCreatedName
(
String
createdName
)
{
this
.
createdName
=
createdName
;
}
/**
* get the createdTime - 创建时间.
* @return the createdTime
*/
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
}
/**
* set the createdTime - 创建时间.
*
* @param createdTime - 创建时间
*/
public
void
setCreatedTime
(
String
createdTime
)
{
this
.
createdTime
=
createdTime
;
}
/**
* get the updatedBy - 更新人.
* @return the updatedBy
*/
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
}
/**
* set the updatedBy - 更新人.
*
* @param updatedBy - 更新人
*/
public
void
setUpdatedBy
(
String
updatedBy
)
{
this
.
updatedBy
=
updatedBy
;
}
/**
* get the updatedName - 更新人名称.
* @return the updatedName
*/
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
}
/**
* set the updatedName - 更新人名称.
*
* @param updatedName - 更新人名称
*/
public
void
setUpdatedName
(
String
updatedName
)
{
this
.
updatedName
=
updatedName
;
}
/**
* get the updatedTime - 更新时间.
* @return the updatedTime
*/
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
}
/**
* set the updatedTime - 更新时间.
*
* @param updatedTime - 更新时间
*/
public
void
setUpdatedTime
(
String
updatedTime
)
{
this
.
updatedTime
=
updatedTime
;
}
/**
* get the value from Map.
*
* @param map - source data map
*/
@Override
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setCompanyCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_COMPANY_CODE
)),
companyCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setDateType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DATE_TYPE
)),
dateType
));
setDateProc
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DATE_PROC
)),
dateProc
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setInventType
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE
)),
inventType
));
setInventCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_CODE
)),
inventCode
));
setInventName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_NAME
)),
inventName
));
setInventRecordId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_RECORD_ID
)),
inventRecordId
));
setInitAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INIT_AMOUNT
)),
initAmount
));
setInitWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INIT_WEIGHT
)),
initWeight
));
setCgEnterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CG_ENTER_AMOUNT
)),
cgEnterAmount
));
setCgEnterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CG_ENTER_WEIGHT
)),
cgEnterWeight
));
setScEnterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SC_ENTER_AMOUNT
)),
scEnterAmount
));
setScEnterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SC_ENTER_WEIGHT
)),
scEnterWeight
));
setQtEnterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QT_ENTER_AMOUNT
)),
qtEnterAmount
));
setQtEnterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QT_ENTER_WEIGHT
)),
qtEnterWeight
));
setEnterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ENTER_AMOUNT
)),
enterAmount
));
setEnterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ENTER_WEIGHT
)),
enterWeight
));
setScOuterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SC_OUTER_AMOUNT
)),
scOuterAmount
));
setScOuterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SC_OUTER_WEIGHT
)),
scOuterWeight
));
setXsOuterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_XS_OUTER_AMOUNT
)),
xsOuterAmount
));
setXsOuterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_XS_OUTER_WEIGHT
)),
xsOuterWeight
));
setQtOuterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QT_OUTER_AMOUNT
)),
qtOuterAmount
));
setQtOuterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QT_OUTER_WEIGHT
)),
qtOuterWeight
));
setOuterAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_OUTER_AMOUNT
)),
outerAmount
));
setOuterWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_OUTER_WEIGHT
)),
outerWeight
));
setPdDiffAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PD_DIFF_AMOUNT
)),
pdDiffAmount
));
setPdDiffWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PD_DIFF_WEIGHT
)),
pdDiffWeight
));
setEndAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_END_AMOUNT
)),
endAmount
));
setEndWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_END_WEIGHT
)),
endWeight
));
setCreatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_BY
)),
createdBy
));
setCreatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_NAME
)),
createdName
));
setCreatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_CREATED_TIME
)),
createdTime
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
}
/**
* set the value to Map.
*/
@Override
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_COMPANY_CODE
,
StringUtils
.
toString
(
companyCode
,
eiMetadata
.
getMeta
(
FIELD_COMPANY_CODE
)));
map
.
put
(
FIELD_DEP_CODE
,
StringUtils
.
toString
(
depCode
,
eiMetadata
.
getMeta
(
FIELD_DEP_CODE
)));
map
.
put
(
FIELD_DATE_TYPE
,
StringUtils
.
toString
(
dateType
,
eiMetadata
.
getMeta
(
FIELD_DATE_TYPE
)));
map
.
put
(
FIELD_DATE_PROC
,
StringUtils
.
toString
(
dateProc
,
eiMetadata
.
getMeta
(
FIELD_DATE_PROC
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
map
.
put
(
FIELD_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_INVENT_TYPE
,
StringUtils
.
toString
(
inventType
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE
)));
map
.
put
(
FIELD_INVENT_CODE
,
StringUtils
.
toString
(
inventCode
,
eiMetadata
.
getMeta
(
FIELD_INVENT_CODE
)));
map
.
put
(
FIELD_INVENT_NAME
,
StringUtils
.
toString
(
inventName
,
eiMetadata
.
getMeta
(
FIELD_INVENT_NAME
)));
map
.
put
(
FIELD_INVENT_RECORD_ID
,
StringUtils
.
toString
(
inventRecordId
,
eiMetadata
.
getMeta
(
FIELD_INVENT_RECORD_ID
)));
map
.
put
(
FIELD_INIT_AMOUNT
,
StringUtils
.
toString
(
initAmount
,
eiMetadata
.
getMeta
(
FIELD_INIT_AMOUNT
)));
map
.
put
(
FIELD_INIT_WEIGHT
,
StringUtils
.
toString
(
initWeight
,
eiMetadata
.
getMeta
(
FIELD_INIT_WEIGHT
)));
map
.
put
(
FIELD_CG_ENTER_AMOUNT
,
StringUtils
.
toString
(
cgEnterAmount
,
eiMetadata
.
getMeta
(
FIELD_CG_ENTER_AMOUNT
)));
map
.
put
(
FIELD_CG_ENTER_WEIGHT
,
StringUtils
.
toString
(
cgEnterWeight
,
eiMetadata
.
getMeta
(
FIELD_CG_ENTER_WEIGHT
)));
map
.
put
(
FIELD_SC_ENTER_AMOUNT
,
StringUtils
.
toString
(
scEnterAmount
,
eiMetadata
.
getMeta
(
FIELD_SC_ENTER_AMOUNT
)));
map
.
put
(
FIELD_SC_ENTER_WEIGHT
,
StringUtils
.
toString
(
scEnterWeight
,
eiMetadata
.
getMeta
(
FIELD_SC_ENTER_WEIGHT
)));
map
.
put
(
FIELD_QT_ENTER_AMOUNT
,
StringUtils
.
toString
(
qtEnterAmount
,
eiMetadata
.
getMeta
(
FIELD_QT_ENTER_AMOUNT
)));
map
.
put
(
FIELD_QT_ENTER_WEIGHT
,
StringUtils
.
toString
(
qtEnterWeight
,
eiMetadata
.
getMeta
(
FIELD_QT_ENTER_WEIGHT
)));
map
.
put
(
FIELD_ENTER_AMOUNT
,
StringUtils
.
toString
(
enterAmount
,
eiMetadata
.
getMeta
(
FIELD_ENTER_AMOUNT
)));
map
.
put
(
FIELD_ENTER_WEIGHT
,
StringUtils
.
toString
(
enterWeight
,
eiMetadata
.
getMeta
(
FIELD_ENTER_WEIGHT
)));
map
.
put
(
FIELD_SC_OUTER_AMOUNT
,
StringUtils
.
toString
(
scOuterAmount
,
eiMetadata
.
getMeta
(
FIELD_SC_OUTER_AMOUNT
)));
map
.
put
(
FIELD_SC_OUTER_WEIGHT
,
StringUtils
.
toString
(
scOuterWeight
,
eiMetadata
.
getMeta
(
FIELD_SC_OUTER_WEIGHT
)));
map
.
put
(
FIELD_XS_OUTER_AMOUNT
,
StringUtils
.
toString
(
xsOuterAmount
,
eiMetadata
.
getMeta
(
FIELD_XS_OUTER_AMOUNT
)));
map
.
put
(
FIELD_XS_OUTER_WEIGHT
,
StringUtils
.
toString
(
xsOuterWeight
,
eiMetadata
.
getMeta
(
FIELD_XS_OUTER_WEIGHT
)));
map
.
put
(
FIELD_QT_OUTER_AMOUNT
,
StringUtils
.
toString
(
qtOuterAmount
,
eiMetadata
.
getMeta
(
FIELD_QT_OUTER_AMOUNT
)));
map
.
put
(
FIELD_QT_OUTER_WEIGHT
,
StringUtils
.
toString
(
qtOuterWeight
,
eiMetadata
.
getMeta
(
FIELD_QT_OUTER_WEIGHT
)));
map
.
put
(
FIELD_OUTER_AMOUNT
,
StringUtils
.
toString
(
outerAmount
,
eiMetadata
.
getMeta
(
FIELD_OUTER_AMOUNT
)));
map
.
put
(
FIELD_OUTER_WEIGHT
,
StringUtils
.
toString
(
outerWeight
,
eiMetadata
.
getMeta
(
FIELD_OUTER_WEIGHT
)));
map
.
put
(
FIELD_PD_DIFF_AMOUNT
,
StringUtils
.
toString
(
pdDiffAmount
,
eiMetadata
.
getMeta
(
FIELD_PD_DIFF_AMOUNT
)));
map
.
put
(
FIELD_PD_DIFF_WEIGHT
,
StringUtils
.
toString
(
pdDiffWeight
,
eiMetadata
.
getMeta
(
FIELD_PD_DIFF_WEIGHT
)));
map
.
put
(
FIELD_END_AMOUNT
,
StringUtils
.
toString
(
endAmount
,
eiMetadata
.
getMeta
(
FIELD_END_AMOUNT
)));
map
.
put
(
FIELD_END_WEIGHT
,
StringUtils
.
toString
(
endWeight
,
eiMetadata
.
getMeta
(
FIELD_END_WEIGHT
)));
map
.
put
(
FIELD_CREATED_BY
,
StringUtils
.
toString
(
createdBy
,
eiMetadata
.
getMeta
(
FIELD_CREATED_BY
)));
map
.
put
(
FIELD_CREATED_NAME
,
StringUtils
.
toString
(
createdName
,
eiMetadata
.
getMeta
(
FIELD_CREATED_NAME
)));
map
.
put
(
FIELD_CREATED_TIME
,
StringUtils
.
toString
(
createdTime
,
eiMetadata
.
getMeta
(
FIELD_CREATED_TIME
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
0 → 100644
View file @
0364fded
package
com
.
baosight
.
hggp
.
hg
.
kc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.pz.domain.HGPZ004
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.domain.HGPZ007
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.util.*
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.web.threadlocal.UserSession
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.MapUtils
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.time.temporal.TemporalAdjusters
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
* 库存收发存
*
* @author:songx
* @date:2024/6/11,11:20
*/
public
class
ServiceHGKC009
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAME_BLOCK_ID), null);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC_BLOCK_ID), null);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGKC009
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"查询"
,
operDesc
=
"查询"
)
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
String
receiptDate
=
MapUtils
.
getString
(
queryRow
,
"dateProc"
);
queryRow
.
put
(
"dateProc"
,
StringUtil
.
removeSpecifiedCharacter
(
receiptDate
,
StringUtil
.
DEFAULT_CHARACTER_TO_BE_REMOVED
));
queryRow
.
put
(
"dateType"
,
CommonConstant
.
DateType
.
MONTH
);
inInfo
=
super
.
query
(
inInfo
,
HGKC009
.
QUERY
,
new
HGKC009
());
List
sum
=
dao
.
query
(
HGSqlConstant
.
HGKC009
.
QUERY_SUM
,
queryRow
);
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
set
(
EiConstant
.
COLUMN_TOTAL_SUM
,
sum
.
get
(
0
));
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 按天统计
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"插入"
,
operDesc
=
"按天统计"
)
public
EiInfo
statDay
(
EiInfo
inInfo
)
{
try
{
// 取昨天的日期
Map
queryMap
=
new
HashMap
();
LocalDate
nowDate
=
LocalDate
.
now
();
String
yesterDay
=
LocalDate
.
now
().
minusDays
(
1
).
format
(
DateUtils
.
SHORT_DATE
);
queryMap
.
put
(
"yesterFrom"
,
yesterDay
);
queryMap
.
put
(
"yesterTo"
,
yesterDay
);
queryMap
.
put
(
"yesterDate"
,
yesterDay
);
queryMap
.
put
(
"beforeDate"
,
nowDate
.
minusDays
(
2
).
format
(
DateUtils
.
SHORT_DATE
));
queryMap
.
put
(
"dateType"
,
CommonConstant
.
DateType
.
DAY
);
// 0.清除数据
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"yesterDate"
));
dao
.
delete
(
HGSqlConstant
.
HGKC009
.
DELETE_BY_TIME
,
queryMap
);
// 1、统计收发存
List
<
HGKC009
>
results
=
this
.
statData
(
queryMap
);
// 4、设置基础信息
this
.
setBaseInfo
(
results
);
// 5、写入数据库
dao
.
insertBatch
(
HGKC009
.
INSERT
,
results
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"按天统计成功"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"按天统计失败"
);
}
return
inInfo
;
}
/**
* 按月统计
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"库存收发存"
,
operType
=
"插入"
,
operDesc
=
"按月统计"
)
public
EiInfo
statMonth
(
EiInfo
inInfo
)
{
try
{
// 上个月的日期
Map
queryMap
=
new
HashMap
();
LocalDate
nowDate
=
LocalDate
.
now
();
LocalDate
yesterMonth
=
nowDate
.
minusMonths
(
1
);
queryMap
.
put
(
"yesterFrom"
,
yesterMonth
.
with
(
TemporalAdjusters
.
firstDayOfMonth
())
.
format
(
DateUtils
.
SHORT_DATE
));
queryMap
.
put
(
"yesterTo"
,
yesterMonth
.
with
(
TemporalAdjusters
.
lastDayOfMonth
())
.
format
(
DateUtils
.
SHORT_DATE
));
queryMap
.
put
(
"yesterDate"
,
yesterMonth
.
format
(
DateUtils
.
SHORT_MONTH
));
// 期初库存查询条件需要取前两个月的收发存记录
queryMap
.
put
(
"beforeDate"
,
nowDate
.
minusMonths
(
2
).
format
(
DateUtils
.
SHORT_MONTH
));
queryMap
.
put
(
"dateType"
,
CommonConstant
.
DateType
.
MONTH
);
// 0.清除数据
queryMap
.
put
(
"dateProc"
,
queryMap
.
get
(
"yesterDate"
));
dao
.
delete
(
HGSqlConstant
.
HGKC009
.
DELETE_BY_TIME
,
queryMap
);
// 1、统计收发存
List
<
HGKC009
>
results
=
this
.
statData
(
queryMap
);
// 4、设置基础信息
this
.
setBaseInfo
(
results
);
// 5、写入数据库
dao
.
insertBatch
(
HGKC009
.
INSERT
,
results
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsg
(
"按月统计成功"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"按月统计失败"
);
}
return
inInfo
;
}
/**
* 统计库存收发存
*
* @param queryMap
* @return
*/
private
List
<
HGKC009
>
statData
(
Map
queryMap
)
{
// 1.1、期末库存
Map
<
String
,
HGKC010A
>
endKcs
=
this
.
listInvData
(
queryMap
,
HGKC010A
.
QUERY
);
// 1.2、采购入库
Map
<
String
,
HGKC001
>
cgRkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC001
.
STAT_DATE
);
// 1.4、其他入库
Map
<
String
,
HGKC006A
>
qtRkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC006A
.
STAT_DATE
);
// 1.5、生产领料
Map
<
String
,
HGKC008A
>
scCkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC008A
.
STAT_DATE
);
// 1.7、其它出库
Map
<
String
,
HGKC007A
>
qtCkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC007A
.
STAT_DATE
);
// 1.8、盘点差异数量
Map
<
String
,
HGKC005
>
pdDiffMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC005
.
STAT_DATE
);
// 1.9、期初库存
Map
<
String
,
HGKC009
>
initKcMap
=
this
.
listInvData
(
queryMap
,
HGKC009
.
QUERY
);
// 根据期末库存生成收发存对象
return
buildKcBean
(
queryMap
,
endKcs
,
cgRkMap
,
qtRkMap
,
scCkMap
,
qtCkMap
,
pdDiffMap
,
initKcMap
);
}
/**
* 构建库存收发存对象
*
* @param queryMap
* @param endKcs
* @param cgRkMap
* @param qtCkMap
* @param scCkMap
* @param qtRkMap
* @param pdDiffMap
* @param initKcMap
* @return
*/
private
List
<
HGKC009
>
buildKcBean
(
Map
queryMap
,
Map
<
String
,
HGKC010A
>
endKcs
,
Map
<
String
,
HGKC001
>
cgRkMap
,
Map
<
String
,
HGKC006A
>
qtRkMap
,
Map
<
String
,
HGKC008A
>
scCkMap
,
Map
<
String
,
HGKC007A
>
qtCkMap
,
Map
<
String
,
HGKC005
>
pdDiffMap
,
Map
<
String
,
HGKC009
>
initKcMap
)
{
List
<
HGKC009
>
newKc009s
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
HGKC010A
>
entry
:
endKcs
.
entrySet
())
{
String
key
=
entry
.
getKey
();
HGKC010A
endKc
=
entry
.
getValue
();
HGKC009
kc009
=
BeanUtils
.
copy
(
endKc
,
HGKC009
.
class
);
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
// 1.1期末
kc009
.
setEndAmount
(
endKc
.
getInvQty
());
kc009
.
setEndWeight
(
endKc
.
getInvWeight
());
// 1.2、采购入库
HGKC001
cgRk
=
cgRkMap
.
get
(
key
);
kc009
.
setCgEnterAmount
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getDepositQty
());
kc009
.
setCgEnterWeight
(
cgRk
==
null
?
BigDecimal
.
ZERO
:
cgRk
.
getDepositWeight
());
// 1.3、其他入库
HGKC006A
qtRk
=
qtRkMap
.
get
(
key
);
kc009
.
setQtEnterAmount
(
qtRk
==
null
?
BigDecimal
.
ZERO
:
qtRk
.
getInvQty
());
kc009
.
setQtEnterWeight
(
qtRk
==
null
?
BigDecimal
.
ZERO
:
qtRk
.
getPartWidth
());
// 1.4、入库
kc009
.
setEnterAmount
(
kc009
.
getCgEnterAmount
().
add
(
kc009
.
getScEnterAmount
())
.
add
(
kc009
.
getQtEnterAmount
()));
kc009
.
setEnterWeight
(
kc009
.
getCgEnterWeight
().
add
(
kc009
.
getScEnterWeight
())
.
add
(
kc009
.
getQtEnterWeight
()));
// 1.5、生产领料
HGKC008A
scCk
=
scCkMap
.
get
(
key
);
kc009
.
setScOuterAmount
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getInvQty
());
kc009
.
setScOuterWeight
(
scCk
==
null
?
BigDecimal
.
ZERO
:
scCk
.
getInvWeight
());
// 1.7、其他出库
HGKC007A
qtCk
=
qtCkMap
.
get
(
key
);
kc009
.
setQtOuterAmount
(
qtCk
==
null
?
BigDecimal
.
ZERO
:
qtCk
.
getInvQty
());
kc009
.
setQtOuterWeight
(
qtCk
==
null
?
BigDecimal
.
ZERO
:
qtCk
.
getInvWeight
());
// 1.8、出库
kc009
.
setOuterAmount
(
kc009
.
getScOuterAmount
().
add
(
kc009
.
getXsOuterAmount
())
.
add
(
kc009
.
getQtOuterAmount
()));
kc009
.
setOuterWeight
(
kc009
.
getScOuterWeight
().
add
(
kc009
.
getXsOuterWeight
())
.
add
(
kc009
.
getQtOuterWeight
()));
// 1.8、盘点差异数量
HGKC005
pdDiff
=
pdDiffMap
.
get
(
key
);
kc009
.
setPdDiffAmount
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffAmount
());
kc009
.
setPdDiffWeight
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffWeight
());
// 1.9、期初
HGKC009
initKc
=
initKcMap
.
get
(
key
);
kc009
.
setInitAmount
(
initKc
!=
null
?
initKc
.
getEndAmount
()
:
kc009
.
getEndAmount
()
.
subtract
(
kc009
.
getPdDiffAmount
()).
add
(
kc009
.
getOuterAmount
()).
subtract
(
kc009
.
getEnterAmount
()));
kc009
.
setInitWeight
(
initKc
!=
null
?
initKc
.
getEndWeight
()
:
kc009
.
getEndWeight
()
.
subtract
(
kc009
.
getPdDiffWeight
()).
add
(
kc009
.
getOuterWeight
()).
subtract
(
kc009
.
getEnterWeight
()));
newKc009s
.
add
(
kc009
);
}
return
newKc009s
;
}
/**
* 查询库存数据
*
* @param DataMap
* @param sqlId
* @param <T>
* @return
*/
private
<
T
extends
DaoEPBase
>
Map
<
String
,
T
>
listInvData
(
Map
DataMap
,
String
sqlId
)
{
Map
queryMap
=
new
HashMap
();
if
(
HGKC010A
.
QUERY
.
equals
(
sqlId
))
{
// 期末库存
queryMap
.
put
(
"dateProc"
,
DataMap
.
get
(
"yesterTo"
));
}
else
if
(
HGKC009
.
QUERY
.
equals
(
sqlId
))
{
// 期初库存
queryMap
.
put
(
"dateProc"
,
DataMap
.
get
(
"beforeDate"
));
}
else
{
queryMap
.
put
(
"createdTimeFrom"
,
DataMap
.
get
(
"yesterFrom"
)
+
"000000"
);
queryMap
.
put
(
"createdTimeTo"
,
DataMap
.
get
(
"yesterTo"
)
+
"235959"
);
}
List
<
T
>
results
=
dao
.
query
(
sqlId
,
queryMap
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
new
HashMap
<>();
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
item
->
buildKey
(
item
.
toMap
()),
item
->
item
));
}
/**
* 设置基础信息
*
* @param kc009s
*/
private
void
setBaseInfo
(
List
<
HGKC009
>
kc009s
)
{
// 仓库名称
List
<
String
>
whCodes
=
kc009s
.
stream
().
map
(
HGKC009:
:
getWhCode
).
collect
(
Collectors
.
toList
());
Map
<
String
,
HGPZ007
>
mapPz007
=
HGPZTools
.
HgPz007
.
map
(
whCodes
);
// 存货名称
List
<
Long
>
recordIds
=
kc009s
.
stream
().
map
(
HGKC009:
:
getInventRecordId
).
collect
(
Collectors
.
toList
());
Map
<
Long
,
HGPZ005
>
mapPz005
=
HGPZTools
.
HgPz005
.
map
(
recordIds
);
for
(
HGKC009
kc009
:
kc009s
)
{
// 仓库名称
String
whCode
=
kc009
.
getWhCode
();
HGPZ007
pz007
=
mapPz007
==
null
?
null
:
mapPz007
.
get
(
whCode
);
kc009
.
setWhName
(
pz007
==
null
?
""
:
pz007
.
getWhName
());
// 存货名称
Long
recordId
=
kc009
.
getInventRecordId
();
HGPZ005
pz005
=
mapPz005
==
null
?
null
:
mapPz005
.
get
(
recordId
);
kc009
.
setInventName
(
pz005
==
null
?
""
:
pz005
.
getInventName
());
// 创建时间
kc009
.
setCreatedBy
(
UserSession
.
getLoginName
());
kc009
.
setCreatedName
(
UserSession
.
getLoginCName
());
kc009
.
setCreatedTime
(
DateUtils
.
shortDateTime
());
}
}
/**
* 构建KEY
*
* @param dataMap
* @return
*/
private
String
buildKey
(
Map
dataMap
)
{
return
buildKey
(
dataMap
.
get
(
"companyCode"
),
dataMap
.
get
(
"depCode"
),
dataMap
.
get
(
"inventType"
),
dataMap
.
get
(
"inventCode"
),
dataMap
.
get
(
"whCode"
),
dataMap
.
get
(
"inventRecordId"
));
}
/**
* 构建KEY
*
* @param companyCode
* @param depCode
* @param inventType
* @param inventCode
* @param whCode
* @param inventRecordId
* @return
*/
private
String
buildKey
(
Object
companyCode
,
Object
depCode
,
Object
inventType
,
Object
inventCode
,
Object
whCode
,
Object
inventRecordId
)
{
return
ObjectUtils
.
trimToEmpty
(
companyCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
depCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventType
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
whCode
)
+
"#"
+
ObjectUtils
.
trimToEmpty
(
inventRecordId
);
}
}
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
0364fded
...
@@ -199,4 +199,23 @@
...
@@ -199,4 +199,23 @@
<include
refid=
"idCondition"
/>
<include
refid=
"idCondition"
/>
</update>
</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>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006A.xml
View file @
0364fded
...
@@ -342,4 +342,23 @@
...
@@ -342,4 +342,23 @@
ID = #id#
ID = #id#
</update>
</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>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007A.xml
View file @
0364fded
...
@@ -335,4 +335,24 @@
...
@@ -335,4 +335,24 @@
ID = #id#
ID = #id#
</update>
</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>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
View file @
0364fded
...
@@ -233,4 +233,23 @@
...
@@ -233,4 +233,23 @@
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</delete>
</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>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC009.xml
0 → 100644
View file @
0364fded
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGKC009"
>
<sql
id=
"column"
>
ID as "id",
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DATE_TYPE as "dateType",
<!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC as "dateProc",
<!-- 日期 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格ID -->
INIT_AMOUNT as "initAmount",
<!-- 期初数量 -->
INIT_WEIGHT as "initWeight",
<!-- 期初重量 -->
CG_ENTER_AMOUNT as "cgEnterAmount",
<!-- 采购入库数量 -->
CG_ENTER_WEIGHT as "cgEnterWeight",
<!-- 采购入库重量 -->
SC_ENTER_AMOUNT as "scEnterAmount",
<!-- 生产入库数量 -->
SC_ENTER_WEIGHT as "scEnterWeight",
<!-- 生产入库重量 -->
QT_ENTER_AMOUNT as "qtEnterAmount",
<!-- 其它入库数量 -->
QT_ENTER_WEIGHT as "qtEnterWeight",
<!-- 其它入库重量 -->
ENTER_AMOUNT as "enterAmount",
<!-- 入库数量 -->
ENTER_WEIGHT as "enterWeight",
<!-- 入库重量 -->
SC_OUTER_AMOUNT as "scOuterAmount",
<!-- 生产领料数量 -->
SC_OUTER_WEIGHT as "scOuterWeight",
<!-- 生产领料重量 -->
XS_OUTER_AMOUNT as "xsOuterAmount",
<!-- 销售出库数量 -->
XS_OUTER_WEIGHT as "xsOuterWeight",
<!-- 销售出库重量 -->
QT_OUTER_AMOUNT as "qtOuterAmount",
<!-- 其它出库数量 -->
QT_OUTER_WEIGHT as "qtOuterWeight",
<!-- 其它出库重量 -->
OUTER_AMOUNT as "outerAmount",
<!-- 出库数量 -->
OUTER_WEIGHT as "outerWeight",
<!-- 出库重量 -->
PD_DIFF_AMOUNT as "pdDiffAmount",
<!-- 盘点差异数量 -->
PD_DIFF_WEIGHT as "pdDiffWeight",
<!-- 盘点差异重量 -->
END_AMOUNT as "endAmount",
<!-- 期末数量 -->
END_WEIGHT as "endWeight",
<!-- 期末重量 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建人名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime"
<!-- 更新时间 -->
</sql>
<sql
id=
"authCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCode"
>
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"depCodes"
>
DEP_CODE IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"depCodes"
>
#depCodes[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"condition"
>
<include
refid=
"authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dateType"
>
DATE_TYPE = #dateType#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dateProc"
>
DATE_PROC = #dateProc#
</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>
</sql>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
ID DESC
</isEmpty>
</dynamic>
</sql>
<!-- 查询 -->
<select
id=
"query"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HGKC009"
>
SELECT
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGKC009
WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"order"
/>
</select>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM ${hggpSchema}.HGKC009 WHERE 1=1
<include
refid=
"condition"
/>
</select>
<!-- 查询统计 -->
<select
id=
"querySum"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HGKC009"
>
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount",
<!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight",
<!-- 期初重量 -->
COALESCE(SUM(CG_ENTER_AMOUNT), 0) AS "cgEnterAmount",
<!-- 采购入库数量 -->
COALESCE(SUM(CG_ENTER_WEIGHT), 0) AS "cgEnterWeight",
<!-- 采购入库重量 -->
COALESCE(SUM(SC_ENTER_AMOUNT), 0) AS "scEnterAmount",
<!-- 生产入库数量 -->
COALESCE(SUM(SC_ENTER_WEIGHT), 0) AS "scEnterWeight",
<!-- 生产入库重量 -->
COALESCE(SUM(QT_ENTER_AMOUNT), 0) AS "qtEnterAmount",
<!-- 其它入库数量 -->
COALESCE(SUM(QT_ENTER_WEIGHT), 0) AS "qtEnterWeight",
<!-- 其它入库重量 -->
COALESCE(SUM(ENTER_AMOUNT), 0) AS "enterAmount",
<!-- 入库数量 -->
COALESCE(SUM(ENTER_WEIGHT), 0) AS "enterWeight",
<!-- 入库重量 -->
COALESCE(SUM(SC_OUTER_AMOUNT), 0) AS "scOuterAmount",
<!-- 生产领料数量 -->
COALESCE(SUM(SC_OUTER_WEIGHT), 0) AS "scOuterWeight",
<!-- 生产领料重量 -->
COALESCE(SUM(XS_OUTER_AMOUNT), 0) AS "xsOuterAmount",
<!-- 销售出库数量 -->
COALESCE(SUM(XS_OUTER_WEIGHT), 0) AS "xsOuterWeight",
<!-- 销售出库重量 -->
COALESCE(SUM(QT_OUTER_AMOUNT), 0) AS "qtOuterAmount",
<!-- 其它出库数量 -->
COALESCE(SUM(QT_OUTER_WEIGHT), 0) AS "qtOuterWeight",
<!-- 其它出库重量 -->
COALESCE(SUM(OUTER_AMOUNT), 0) AS "outerAmount",
<!-- 出库数量 -->
COALESCE(SUM(OUTER_WEIGHT), 0) AS "outerWeight",
<!-- 出库重量 -->
COALESCE(SUM(PD_DIFF_AMOUNT), 0) AS "pdDiffAmount",
<!-- 盘点差异数量 -->
COALESCE(SUM(PD_DIFF_WEIGHT), 0) AS "pdDiffWeight",
<!-- 盘点差异重量 -->
COALESCE(SUM(END_AMOUNT), 0) AS "endAmount",
<!-- 期末数量 -->
COALESCE(SUM(END_WEIGHT), 0) AS "endWeight"
<!-- 期末重量 -->
FROM ${hggpSchema}.HGKC009
WHERE 1=1
<include
refid=
"condition"
/>
</select>
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC009 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 -->
DATE_TYPE,
<!-- 日期类型:DAY:天,MONTH:月 -->
DATE_PROC,
<!-- 日期 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_RECORD_ID,
<!-- 规格ID -->
INIT_AMOUNT,
<!-- 期初数量 -->
INIT_WEIGHT,
<!-- 期初重量 -->
CG_ENTER_AMOUNT,
<!-- 采购入库数量 -->
CG_ENTER_WEIGHT,
<!-- 采购入库重量 -->
SC_ENTER_AMOUNT,
<!-- 生产入库数量 -->
SC_ENTER_WEIGHT,
<!-- 生产入库重量 -->
QT_ENTER_AMOUNT,
<!-- 其它入库数量 -->
QT_ENTER_WEIGHT,
<!-- 其它入库重量 -->
ENTER_AMOUNT,
<!-- 入库数量 -->
ENTER_WEIGHT,
<!-- 入库重量 -->
SC_OUTER_AMOUNT,
<!-- 生产领料数量 -->
SC_OUTER_WEIGHT,
<!-- 生产领料重量 -->
XS_OUTER_AMOUNT,
<!-- 销售出库数量 -->
XS_OUTER_WEIGHT,
<!-- 销售出库重量 -->
QT_OUTER_AMOUNT,
<!-- 其它出库数量 -->
QT_OUTER_WEIGHT,
<!-- 其它出库重量 -->
OUTER_AMOUNT,
<!-- 出库数量 -->
OUTER_WEIGHT,
<!-- 出库重量 -->
PD_DIFF_AMOUNT,
<!-- 盘点差异数量 -->
PD_DIFF_WEIGHT,
<!-- 盘点差异重量 -->
END_AMOUNT,
<!-- 期末数量 -->
END_WEIGHT,
<!-- 期末重量 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
) VALUES (
#companyCode#, #depCode#, #dateType#, #dateProc#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #inventRecordId#, #initAmount#,
#initWeight#, #cgEnterAmount#, #cgEnterWeight#, #scEnterAmount#, #scEnterWeight#,
#qtEnterAmount#, #qtEnterWeight#, #enterAmount#, #enterWeight#, #scOuterAmount#,
#scOuterWeight#, #xsOuterAmount#, #xsOuterWeight#, #qtOuterAmount#, #qtOuterWeight#,
#outerAmount#, #outerWeight#, #pdDiffAmount#, #pdDiffWeight#, #endAmount#,
#endWeight#, #createdBy#, #createdName#, #createdTime#
)
</insert>
<delete
id=
"delete"
>
DELETE FROM ${hggpSchema}.HGKC009 WHERE ID = #id#
</delete>
<!-- 按时间删除数据 -->
<delete
id=
"deleteByTime"
>
DELETE FROM ${hggpSchema}.HGKC009 WHERE DATE_PROC = #dateProc#
</delete>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
0364fded
...
@@ -48,7 +48,7 @@ public class HGKCTools {
...
@@ -48,7 +48,7 @@ public class HGKCTools {
}
}
Map
paramMap
=
new
HashMap
();
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"depositNos"
,
depositNos
);
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
;
package
com
.
baosight
.
hggp
.
hg
.
pz
.
tools
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
...
@@ -81,6 +82,63 @@ public class HGPZTools {
...
@@ -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定义
* HPPZ007 公共DAO定义
*
*
...
@@ -102,6 +160,35 @@ public class HGPZTools {
...
@@ -102,6 +160,35 @@ public class HGPZTools {
List
<
HGPZ007
>
results
=
DaoBase
.
getInstance
().
query
(
HGPZ007
.
QUERY
,
queryMap
);
List
<
HGPZ007
>
results
=
DaoBase
.
getInstance
().
query
(
HGPZ007
.
QUERY
,
queryMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
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 {
...
@@ -344,7 +431,7 @@ public class HGPZTools {
public
static
HGPZ005
checkAndSave
(
Integer
inventType
,
String
inventName
,
BigDecimal
length
,
public
static
HGPZ005
checkAndSave
(
Integer
inventType
,
String
inventName
,
BigDecimal
length
,
BigDecimal
width
,
BigDecimal
thick
,
BigDecimal
coefficient
,
String
material
,
String
unit
)
{
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
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventType"
,
inventType
);
queryMap
.
put
(
"inventType"
,
inventType
);
//queryMap.put("inventCode", inventCode);
//queryMap.put("inventCode", inventCode);
...
...
src/main/webapp/HG/SC/HGSC004.jsp
View file @
0364fded
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
<EF:EFOptions
blockId=
"companyBox_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"companyBox_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
hidden=
"true"
/>
<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=
"projName"
cname=
"项目名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"blueprintCode"
cname=
"蓝图编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"blueprintCode"
cname=
"蓝图编码"
enable=
"true"
width=
"120"
align=
"center"
required=
"true"
/>
<EF:EFColumn
ename=
"blueprintName"
cname=
"蓝图名称"
enable=
"false"
width=
"120"
align=
"center"
/>
<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