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
f4f4e26c
Commit
f4f4e26c
authored
Jun 12, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收发库存汇总页面提交
parent
a8a4c433
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
373 additions
and
110 deletions
+373
-110
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+0
-23
HGKC004.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC004.java
+35
-0
HGKC004A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC004A.java
+78
-0
HGKC010A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC010A.java
+0
-0
ServiceHGKC002A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC002A.java
+14
-14
ServiceHGKC009.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
+13
-11
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+1
-1
HGKC004.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004.xml
+19
-57
HGKC004A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004A.xml
+1
-1
HGKC009.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC009.xml
+3
-3
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+31
-0
HGKCUtils.java
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
+30
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+1
-0
HGKC009.js
src/main/webapp/HG/KC/HGKC009.js
+55
-0
HGKC009.jsp
src/main/webapp/HG/KC/HGKC009.jsp
+92
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
f4f4e26c
...
@@ -335,17 +335,6 @@ public class HGSqlConstant {
...
@@ -335,17 +335,6 @@ public class HGSqlConstant {
public
static
final
String
QUERY_SUM
=
"HGKC009A.querySum"
;
public
static
final
String
QUERY_SUM
=
"HGKC009A.querySum"
;
}
}
/**
* HGKC010 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HGKC010
{
// 锁
public
static
final
String
LOCK
=
"HGKC010.lock"
;
}
/**
/**
* HGKC010A SQL 定义
* HGKC010A SQL 定义
...
@@ -362,18 +351,6 @@ public class HGSqlConstant {
...
@@ -362,18 +351,6 @@ public class HGSqlConstant {
}
}
/**
/**
* HGKC011 SQL 定义
*
* @author:songx
* @date:2024/1/20,16:45
*/
public
class
HGKC011
{
// 锁
public
static
final
String
LOCK
=
"HGKC011.lock"
;
}
/**
* HGKC011A SQL 定义
* HGKC011A SQL 定义
*
*
* @author:songx
* @author:songx
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC004.java
View file @
f4f4e26c
...
@@ -38,6 +38,8 @@ public class HGKC004 extends DaoEPBase {
...
@@ -38,6 +38,8 @@ public class HGKC004 extends DaoEPBase {
public
static
final
String
FIELD_SALE_OUT_CODE
=
"saleOutCode"
;
/* 销售出库单号*/
public
static
final
String
FIELD_SALE_OUT_CODE
=
"saleOutCode"
;
/* 销售出库单号*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-停止 1-启用*/
public
static
final
String
FIELD_STATUS
=
"status"
;
/* 状态 0-停止 1-启用*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
...
@@ -57,6 +59,8 @@ public class HGKC004 extends DaoEPBase {
...
@@ -57,6 +59,8 @@ public class HGKC004 extends DaoEPBase {
public
static
final
String
COL_SALE_OUT_CODE
=
"SALE_OUT_CODE"
;
/* 销售出库单号*/
public
static
final
String
COL_SALE_OUT_CODE
=
"SALE_OUT_CODE"
;
/* 销售出库单号*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态 0-停止 1-启用*/
public
static
final
String
COL_STATUS
=
"STATUS"
;
/* 状态 0-停止 1-启用*/
public
static
final
String
QUERY
=
"HGKC004.query"
;
public
static
final
String
QUERY
=
"HGKC004.query"
;
...
@@ -84,6 +88,8 @@ public class HGKC004 extends DaoEPBase {
...
@@ -84,6 +88,8 @@ public class HGKC004 extends DaoEPBase {
private
String
saleOutCode
=
" "
;
/* 销售出库单号*/
private
String
saleOutCode
=
" "
;
/* 销售出库单号*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
private
Integer
status
=
0
;
/* 状态 0-未提交 1-已提交*/
private
Integer
status
=
0
;
/* 状态 0-未提交 1-已提交*/
/**
/**
...
@@ -161,6 +167,14 @@ public class HGKC004 extends DaoEPBase {
...
@@ -161,6 +167,14 @@ public class HGKC004 extends DaoEPBase {
eiColumn
.
setDescName
(
"仓库名称"
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"状态 0-停止 1-启用"
);
eiColumn
.
setDescName
(
"状态 0-停止 1-启用"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -463,6 +477,23 @@ public class HGKC004 extends DaoEPBase {
...
@@ -463,6 +477,23 @@ public class HGKC004 extends DaoEPBase {
public
void
setStatus
(
Integer
status
)
{
public
void
setStatus
(
Integer
status
)
{
this
.
status
=
status
;
this
.
status
=
status
;
}
}
public
String
getProjCode
()
{
return
projCode
;
}
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
public
String
getProjName
()
{
return
projName
;
}
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -488,6 +519,8 @@ public class HGKC004 extends DaoEPBase {
...
@@ -488,6 +519,8 @@ public class HGKC004 extends DaoEPBase {
setSaleOutCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SALE_OUT_CODE
)),
saleOutCode
));
setSaleOutCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SALE_OUT_CODE
)),
saleOutCode
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
setStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STATUS
)),
status
));
}
}
...
@@ -515,6 +548,8 @@ public class HGKC004 extends DaoEPBase {
...
@@ -515,6 +548,8 @@ public class HGKC004 extends DaoEPBase {
map
.
put
(
FIELD_SALE_OUT_CODE
,
StringUtils
.
toString
(
saleOutCode
,
eiMetadata
.
getMeta
(
FIELD_SALE_OUT_CODE
)));
map
.
put
(
FIELD_SALE_OUT_CODE
,
StringUtils
.
toString
(
saleOutCode
,
eiMetadata
.
getMeta
(
FIELD_SALE_OUT_CODE
)));
map
.
put
(
FIELD_WH_CODE
,
StringUtils
.
toString
(
whCode
,
eiMetadata
.
getMeta
(
FIELD_WH_CODE
)));
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_WH_NAME
,
StringUtils
.
toString
(
whName
,
eiMetadata
.
getMeta
(
FIELD_WH_NAME
)));
map
.
put
(
FIELD_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
map
.
put
(
FIELD_STATUS
,
StringUtils
.
toString
(
status
,
eiMetadata
.
getMeta
(
FIELD_STATUS
)));
return
map
;
return
map
;
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC004A.java
View file @
f4f4e26c
...
@@ -49,6 +49,11 @@ public class HGKC004A extends DaoEPBase {
...
@@ -49,6 +49,11 @@ public class HGKC004A extends DaoEPBase {
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_WH_CODE
=
"whCode"
;
/* 仓库编码*/
public
static
final
String
FIELD_WH_NAME
=
"whName"
;
/* 仓库名称*/
public
static
final
String
FIELD_PROJ_CODE
=
"projCode"
;
/* 项目编码*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ID
=
"ID"
;
/* ID*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
public
static
final
String
COL_DEP_CODE
=
"DEP_CODE"
;
/* 部门编码*/
...
@@ -76,6 +81,12 @@ public class HGKC004A extends DaoEPBase {
...
@@ -76,6 +81,12 @@ public class HGKC004A extends DaoEPBase {
public
static
final
String
COL_PRICE
=
"PRICE"
;
/* 单价*/
public
static
final
String
COL_PRICE
=
"PRICE"
;
/* 单价*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_AMOUNT
=
"AMOUNT"
;
/* 金额*/
public
static
final
String
COL_WH_CODE
=
"WH_CODE"
;
/* 仓库编码*/
public
static
final
String
COL_WH_NAME
=
"WH_NAME"
;
/* 仓库名称*/
public
static
final
String
COL_PROJ_CODE
=
"PROJ_CODE"
;
/* 项目编码*/
public
static
final
String
COL_PROJ_NAME
=
"PROJ_NAME"
;
/* 项目名称*/
public
static
final
String
QUERY
=
"HGKC004A.query"
;
public
static
final
String
QUERY
=
"HGKC004A.query"
;
public
static
final
String
COUNT
=
"HGKC004A.count"
;
public
static
final
String
COUNT
=
"HGKC004A.count"
;
public
static
final
String
INSERT
=
"HGKC004A.insert"
;
public
static
final
String
INSERT
=
"HGKC004A.insert"
;
...
@@ -110,6 +121,13 @@ public class HGKC004A extends DaoEPBase {
...
@@ -110,6 +121,13 @@ public class HGKC004A extends DaoEPBase {
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
price
=
new
BigDecimal
(
"0"
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
BigDecimal
amount
=
new
BigDecimal
(
"0"
);
/* 金额*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
projCode
=
" "
;
/* 项目编码*/
private
String
projName
=
" "
;
/* 项目名称*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -246,6 +264,23 @@ public class HGKC004A extends DaoEPBase {
...
@@ -246,6 +264,23 @@ public class HGKC004A extends DaoEPBase {
eiMetadata
.
addMeta
(
eiColumn
);
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_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -671,6 +706,39 @@ public class HGKC004A extends DaoEPBase {
...
@@ -671,6 +706,39 @@ public class HGKC004A extends DaoEPBase {
public
void
setAmount
(
BigDecimal
amount
)
{
public
void
setAmount
(
BigDecimal
amount
)
{
this
.
amount
=
amount
;
this
.
amount
=
amount
;
}
}
public
String
getWhCode
()
{
return
whCode
;
}
public
void
setWhCode
(
String
whCode
)
{
this
.
whCode
=
whCode
;
}
public
String
getWhName
()
{
return
whName
;
}
public
void
setWhName
(
String
whName
)
{
this
.
whName
=
whName
;
}
public
String
getProjCode
()
{
return
projCode
;
}
public
void
setProjCode
(
String
projCode
)
{
this
.
projCode
=
projCode
;
}
public
String
getProjName
()
{
return
projName
;
}
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -705,6 +773,11 @@ public class HGKC004A extends DaoEPBase {
...
@@ -705,6 +773,11 @@ public class HGKC004A extends DaoEPBase {
setParentId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_ID
)),
parentId
));
setParentId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PARENT_ID
)),
parentId
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setWhCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_CODE
)),
whCode
));
setWhName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_WH_NAME
)),
whName
));
setProjCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_CODE
)),
projCode
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
}
}
/**
/**
...
@@ -741,6 +814,11 @@ public class HGKC004A extends DaoEPBase {
...
@@ -741,6 +814,11 @@ public class HGKC004A extends DaoEPBase {
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
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_PROJ_CODE
,
StringUtils
.
toString
(
projCode
,
eiMetadata
.
getMeta
(
FIELD_PROJ_CODE
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC010A.java
View file @
f4f4e26c
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC002A.java
View file @
f4f4e26c
...
@@ -33,8 +33,8 @@ import java.util.Map;
...
@@ -33,8 +33,8 @@ import java.util.Map;
* @date:2022/7/11,11:08
* @date:2022/7/11,11:08
*/
*/
public
class
ServiceHGKC002A
extends
ServiceEPBase
{
public
class
ServiceHGKC002A
extends
ServiceEPBase
{
/**
/**
* 初始化
* 初始化
*
*
...
@@ -57,7 +57,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
...
@@ -57,7 +57,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 查询数据列表
* 查询数据列表
*
*
...
@@ -75,7 +75,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
...
@@ -75,7 +75,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 生成出库单
* 生成出库单
*
*
...
@@ -85,47 +85,47 @@ public class ServiceHGKC002A extends ServiceEPBase {
...
@@ -85,47 +85,47 @@ public class ServiceHGKC002A extends ServiceEPBase {
@OperationLogAnnotation
(
operModul
=
"库存查询"
,
operType
=
"插入"
,
operDesc
=
"生产领料单-库存查询-生成出库单"
)
@OperationLogAnnotation
(
operModul
=
"库存查询"
,
operType
=
"插入"
,
operDesc
=
"生产领料单-库存查询-生成出库单"
)
public
EiInfo
select
(
EiInfo
inInfo
)
{
public
EiInfo
select
(
EiInfo
inInfo
)
{
try
{
try
{
List
<
HGKC010A
>
hc010
a
s
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGKC010A
.
class
);
List
<
HGKC010A
>
hc010s
=
MapUtils
.
toDaoEPBase
(
inInfo
,
HGKC010A
.
class
);
// 获取库存信息
// 获取库存信息
Map
<
Long
,
HGKC010
>
dbKc010Map
=
HGKCUtils
.
HgKc010
.
lockGetDataEp
(
hc010a
s
);
Map
<
Long
,
HGKC010
A
>
dbKc010Map
=
HGKCUtils
.
HgKc010A
.
lockGetDataEp
(
hc010
s
);
// 状态校验
// 状态校验
this
.
checkData
(
hc010
a
s
,
dbKc010Map
);
this
.
checkData
(
hc010s
,
dbKc010Map
);
// 生成销售库单
// 生成销售库单
this
.
saveData
(
hc010
a
s
,
dbKc010Map
);
this
.
saveData
(
hc010s
,
dbKc010Map
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setMsg
(
inInfo
,
e
,
"生成领料单失败"
);
LogUtils
.
setMsg
(
inInfo
,
e
,
"生成领料单失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 数据校验
* 数据校验
*
*
* @param fKc010as
* @param fKc010as
* @param dbKc010Map
* @param dbKc010Map
*/
*/
private
void
checkData
(
List
<
HGKC010A
>
fKc010as
,
Map
<
Long
,
HGKC010
>
dbKc010Map
)
{
private
void
checkData
(
List
<
HGKC010A
>
fKc010as
,
Map
<
Long
,
HGKC010
A
>
dbKc010Map
)
{
for
(
HGKC010A
fKc010a
:
fKc010as
)
{
for
(
HGKC010A
fKc010a
:
fKc010as
)
{
Long
id
=
fKc010a
.
getId
();
Long
id
=
fKc010a
.
getId
();
HGKC010
dbKc010
=
dbKc010Map
.
get
(
id
);
HGKC010
A
dbKc010
=
dbKc010Map
.
get
(
id
);
AssertUtils
.
isNull
(
dbKc010
,
String
.
format
(
"库存号[%s]不存在!"
,
id
));
AssertUtils
.
isNull
(
dbKc010
,
String
.
format
(
"库存号[%s]不存在!"
,
id
));
// 校验数量
// 校验数量
AssertUtils
.
isGt
(
fKc010a
.
getApplyQty
(),
dbKc010
.
getInvQty
(),
AssertUtils
.
isGt
(
fKc010a
.
getApplyQty
(),
dbKc010
.
getInvQty
(),
String
.
format
(
"库存号【%s】可用数量(%s)不足!"
,
id
,
dbKc010
.
getInvQty
()));
String
.
format
(
"库存号【%s】可用数量(%s)不足!"
,
id
,
dbKc010
.
getInvQty
()));
}
}
}
}
/**
/**
* 保存数据
* 保存数据
*
*
* @param fKc010as
* @param fKc010as
* @param dbKc010Map
* @param dbKc010Map
*/
*/
private
void
saveData
(
List
<
HGKC010A
>
fKc010as
,
Map
<
Long
,
HGKC010
>
dbKc010Map
)
{
private
void
saveData
(
List
<
HGKC010A
>
fKc010as
,
Map
<
Long
,
HGKC010
A
>
dbKc010Map
)
{
for
(
HGKC010A
fKc010a
:
fKc010as
)
{
for
(
HGKC010A
fKc010a
:
fKc010as
)
{
BigDecimal
applyQty
=
fKc010a
.
getApplyQty
();
BigDecimal
applyQty
=
fKc010a
.
getApplyQty
();
Long
invId
=
fKc010a
.
getId
();
Long
invId
=
fKc010a
.
getId
();
HGKC010
dbKc010
=
dbKc010Map
.
get
(
invId
);
HGKC010
A
dbKc010
=
dbKc010Map
.
get
(
invId
);
HGKC002
newKc002
=
BeanUtils
.
copy
(
dbKc010
,
HGKC002
.
class
);
HGKC002
newKc002
=
BeanUtils
.
copy
(
dbKc010
,
HGKC002
.
class
);
newKc002
.
setReqNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_REQ_NO
));
newKc002
.
setReqNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
PROD_REQ_NO
));
newKc002
.
setReceiptDate
(
DateUtils
.
shortDate
());
newKc002
.
setReceiptDate
(
DateUtils
.
shortDate
());
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC009.java
View file @
f4f4e26c
...
@@ -47,9 +47,9 @@ public class ServiceHGKC009 extends ServiceBase {
...
@@ -47,9 +47,9 @@ public class ServiceHGKC009 extends ServiceBase {
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
try
{
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
null
);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_NAM
E_BLOCK_ID), null);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_TYP
E_BLOCK_ID
),
null
);
// CommonMethod.initBlock(inInfo, Arrays.asList(DdynamicEnum.INVENT_SPEC
_BLOCK_ID), null);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_RECORD
_BLOCK_ID
),
null
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_
NAME
_BLOCK_ID
),
null
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_
RECORD
_BLOCK_ID
),
null
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGKC009
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGKC009
().
eiMetadata
);
}
catch
(
PlatException
e
)
{
}
catch
(
PlatException
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
@@ -162,7 +162,7 @@ public class ServiceHGKC009 extends ServiceBase {
...
@@ -162,7 +162,7 @@ public class ServiceHGKC009 extends ServiceBase {
*/
*/
private
List
<
HGKC009
>
statData
(
Map
queryMap
)
{
private
List
<
HGKC009
>
statData
(
Map
queryMap
)
{
// 1.1、期末库存
// 1.1、期末库存
Map
<
String
,
HGKC010
A
>
endKcs
=
this
.
listInvData
(
queryMap
,
HGKC010A
.
QUERY
);
Map
<
String
,
HGKC010
>
endKcs
=
this
.
listInvData
(
queryMap
,
HGKC010
.
QUERY
);
// 1.2、采购入库
// 1.2、采购入库
Map
<
String
,
HGKC001
>
cgRkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC001
.
STAT_DATE
);
Map
<
String
,
HGKC001
>
cgRkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC001
.
STAT_DATE
);
// 1.4、其他入库
// 1.4、其他入库
...
@@ -174,7 +174,8 @@ public class ServiceHGKC009 extends ServiceBase {
...
@@ -174,7 +174,8 @@ public class ServiceHGKC009 extends ServiceBase {
// 1.7、其它出库
// 1.7、其它出库
Map
<
String
,
HGKC007A
>
qtCkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC007A
.
STAT_DATE
);
Map
<
String
,
HGKC007A
>
qtCkMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC007A
.
STAT_DATE
);
// 1.8、盘点差异数量
// 1.8、盘点差异数量
Map
<
String
,
HGKC005
>
pdDiffMap
=
this
.
listInvData
(
queryMap
,
HGSqlConstant
.
HGKC005
.
STAT_DATE
);
// Map<String, HGKC005> pdDiffMap = this.listInvData(queryMap, HGSqlConstant.HGKC005.STAT_DATE);
Map
<
String
,
HGKC005
>
pdDiffMap
=
null
;
// 1.9、期初库存
// 1.9、期初库存
Map
<
String
,
HGKC009
>
initKcMap
=
this
.
listInvData
(
queryMap
,
HGKC009
.
QUERY
);
Map
<
String
,
HGKC009
>
initKcMap
=
this
.
listInvData
(
queryMap
,
HGKC009
.
QUERY
);
// 2.0 销售出库
// 2.0 销售出库
...
@@ -198,15 +199,16 @@ public class ServiceHGKC009 extends ServiceBase {
...
@@ -198,15 +199,16 @@ public class ServiceHGKC009 extends ServiceBase {
* @param xsCkMap
* @param xsCkMap
* @return
* @return
*/
*/
private
List
<
HGKC009
>
buildKcBean
(
Map
queryMap
,
Map
<
String
,
HGKC010
A
>
endKcs
,
Map
<
String
,
HGKC001
>
cgRkMap
,
private
List
<
HGKC009
>
buildKcBean
(
Map
queryMap
,
Map
<
String
,
HGKC010
>
endKcs
,
Map
<
String
,
HGKC001
>
cgRkMap
,
Map
<
String
,
HGKC006A
>
qtRkMap
,
Map
<
String
,
HGKC008A
>
scCkMap
,
Map
<
String
,
HGKC007A
>
qtCkMap
,
Map
<
String
,
HGKC006A
>
qtRkMap
,
Map
<
String
,
HGKC008A
>
scCkMap
,
Map
<
String
,
HGKC007A
>
qtCkMap
,
Map
<
String
,
HGKC005
>
pdDiffMap
,
Map
<
String
,
HGKC009
>
initKcMap
,
Map
<
String
,
HGKC003
>
scRkMap
,
Map
<
String
,
HGKC005
>
pdDiffMap
,
Map
<
String
,
HGKC009
>
initKcMap
,
Map
<
String
,
HGKC003
>
scRkMap
,
Map
<
String
,
HGKC004A
>
xsCkMap
)
{
Map
<
String
,
HGKC004A
>
xsCkMap
)
{
List
<
HGKC009
>
newKc009s
=
new
ArrayList
<>();
List
<
HGKC009
>
newKc009s
=
new
ArrayList
<>();
for
(
Map
.
Entry
<
String
,
HGKC010
A
>
entry
:
endKcs
.
entrySet
())
{
for
(
Map
.
Entry
<
String
,
HGKC010
>
entry
:
endKcs
.
entrySet
())
{
String
key
=
entry
.
getKey
();
String
key
=
entry
.
getKey
();
HGKC010
A
endKc
=
entry
.
getValue
();
HGKC010
endKc
=
entry
.
getValue
();
HGKC009
kc009
=
BeanUtils
.
copy
(
endKc
,
HGKC009
.
class
);
HGKC009
kc009
=
BeanUtils
.
copy
(
endKc
,
HGKC009
.
class
);
kc009
.
setInventRecordId
(
endKc
.
getSpecId
());
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateType
(
queryMap
.
get
(
"dateType"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
kc009
.
setDateProc
(
queryMap
.
get
(
"yesterDate"
).
toString
());
// 1.1期末
// 1.1期末
...
@@ -251,9 +253,9 @@ public class ServiceHGKC009 extends ServiceBase {
...
@@ -251,9 +253,9 @@ public class ServiceHGKC009 extends ServiceBase {
kc009
.
setOuterWeight
(
kc009
.
getScOuterWeight
().
add
(
kc009
.
getXsOuterWeight
())
kc009
.
setOuterWeight
(
kc009
.
getScOuterWeight
().
add
(
kc009
.
getXsOuterWeight
())
.
add
(
kc009
.
getQtOuterWeight
()));
.
add
(
kc009
.
getQtOuterWeight
()));
// 1.8、盘点差异数量
// 1.8、盘点差异数量
HGKC005
pdDiff
=
pdDiffMap
.
get
(
key
);
//
HGKC005 pdDiff = pdDiffMap.get(key);
kc009
.
setPdDiffAmount
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffAmount
());
//
kc009.setPdDiffAmount(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffAmount());
kc009
.
setPdDiffWeight
(
pdDiff
==
null
?
BigDecimal
.
ZERO
:
pdDiff
.
getDiffWeight
());
//
kc009.setPdDiffWeight(pdDiff == null ? BigDecimal.ZERO : pdDiff.getDiffWeight());
// 1.9、期初
// 1.9、期初
HGKC009
initKc
=
initKcMap
.
get
(
key
);
HGKC009
initKc
=
initKcMap
.
get
(
key
);
kc009
.
setInitAmount
(
initKc
!=
null
?
initKc
.
getEndAmount
()
:
kc009
.
getEndAmount
()
kc009
.
setInitAmount
(
initKc
!=
null
?
initKc
.
getEndAmount
()
:
kc009
.
getEndAmount
()
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
f4f4e26c
...
@@ -215,7 +215,7 @@
...
@@ -215,7 +215,7 @@
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
<isNotEmpty
prepend=
" AND "
property=
"createdTimeFrom"
>
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
CREATED_TIME BETWEEN #createdTimeFrom# AND #createdTimeTo#
</isNotEmpty>
</isNotEmpty>
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE,
INVENT_RECORD
_ID
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE,
SPEC
_ID
</select>
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004.xml
View file @
f4f4e26c
...
@@ -22,6 +22,8 @@
...
@@ -22,6 +22,8 @@
SALE_OUT_CODE as "saleOutCode",
<!-- 销售出库单号 -->
SALE_OUT_CODE as "saleOutCode",
<!-- 销售出库单号 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
STATUS as "status"
<!-- 状态 0-停止 1-启用 -->
STATUS as "status"
<!-- 状态 0-停止 1-启用 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -77,6 +79,12 @@
...
@@ -77,6 +79,12 @@
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME = #whName#
WH_NAME = #whName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
...
@@ -132,11 +140,13 @@
...
@@ -132,11 +140,13 @@
SALE_OUT_CODE,
<!-- 销售出库单号 -->
SALE_OUT_CODE,
<!-- 销售出库单号 -->
WH_CODE,
<!-- 仓库编码 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
STATUS
<!-- 状态 0-停止 1-启用 -->
STATUS
<!-- 状态 0-停止 1-启用 -->
)
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#,
#updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #parentId#, #receiptDate#, #saleOutCode#, #whCode#,
#whName#, #status#)
#whName#,
#projCode#,#projName#,
#status#)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC004
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC004
</selectKey>
</selectKey>
...
@@ -176,6 +186,8 @@
...
@@ -176,6 +186,8 @@
SALE_OUT_CODE = #saleOutCode#,
<!-- 销售出库单号 -->
SALE_OUT_CODE = #saleOutCode#,
<!-- 销售出库单号 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
STATUS = #status#
<!-- 状态 0-停止 1-启用 -->
STATUS = #status#
<!-- 状态 0-停止 1-启用 -->
WHERE
WHERE
ID = #id#
ID = #id#
...
@@ -253,6 +265,12 @@
...
@@ -253,6 +265,12 @@
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
<isNotEmpty
prepend=
" AND "
property=
"whName"
>
WH_NAME = #whName#
WH_NAME = #whName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
<isNotEmpty
prepend=
" AND "
property=
"status"
>
STATUS = #status#
STATUS = #status#
</isNotEmpty>
</isNotEmpty>
...
@@ -265,61 +283,5 @@
...
@@ -265,61 +283,5 @@
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</select>
</select>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="parentId">
PARENT_ID = #parentId#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="receiptDate">
RECEIPT_DATE = #receiptDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="saleOutCode">
SALE_OUT_CODE = #saleOutCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="status">
STATUS = #status#
</isNotEmpty>
-->
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC004A.xml
View file @
f4f4e26c
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
</update>
</update>
<!-- 统计库存 -->
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"
HGKC004
"
>
<select
id=
"statDate"
resultClass=
"
com.baosight.hggp.hg.kc.domain.HGKC004A
"
>
SELECT
SELECT
a.ACCOUNT_CODE AS "accountCode",
a.ACCOUNT_CODE AS "accountCode",
a.COMPANY_CODE as "companyCode",
a.COMPANY_CODE as "companyCode",
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC009.xml
View file @
f4f4e26c
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
INVENT_CODE = #inventCode#
INVENT_CODE = #inventCode#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME
= #inventName#
INVENT_NAME
like CONCAT('%',#inventName#,'%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
INVENT_RECORD_ID = #inventRecordId#
...
@@ -99,7 +99,7 @@
...
@@ -99,7 +99,7 @@
</sql>
</sql>
<!-- 查询 -->
<!-- 查询 -->
<select
id=
"query"
resultClass=
"com.baosight.h
pjx.hp
.kc.domain.HGKC009"
>
<select
id=
"query"
resultClass=
"com.baosight.h
ggp.hg
.kc.domain.HGKC009"
>
SELECT
SELECT
<include
refid=
"column"
/>
<include
refid=
"column"
/>
FROM ${hggpSchema}.HGKC009
FROM ${hggpSchema}.HGKC009
...
@@ -114,7 +114,7 @@
...
@@ -114,7 +114,7 @@
</select>
</select>
<!-- 查询统计 -->
<!-- 查询统计 -->
<select
id=
"querySum"
resultClass=
"com.baosight.h
pjx.hp
.kc.domain.HGKC009"
>
<select
id=
"querySum"
resultClass=
"com.baosight.h
ggp.hg
.kc.domain.HGKC009"
>
SELECT
SELECT
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount",
<!-- 期初数量 -->
COALESCE(SUM(INIT_AMOUNT), 0) AS "initAmount",
<!-- 期初数量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight",
<!-- 期初重量 -->
COALESCE(SUM(INIT_WEIGHT), 0) AS "initWeight",
<!-- 期初重量 -->
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
f4f4e26c
...
@@ -613,6 +613,37 @@ public class HGKCTools {
...
@@ -613,6 +613,37 @@ public class HGKCTools {
}
}
/**
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,14:33
*/
public
static
class
HgKc010A
{
/**
* 查询
*
* @param ids
* @return
*/
public
static
List
<
HGKC010A
>
list
(
List
<
Long
>
ids
)
{
AssertUtils
.
isEmpty
(
ids
,
"库存ID不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
return
DaoBase
.
getInstance
().
query
(
HGKC010A
.
QUERY
,
paramMap
);
}
/**
* 查询
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HGKC010A
>
map
(
List
<
Long
>
ids
)
{
List
<
HGKC010A
>
results
=
list
(
ids
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC010A:
:
getId
,
item
->
item
));
}
}
/**
* HGKC011 工具类
* HGKC011 工具类
*
*
* @author:songx
* @author:songx
...
...
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
View file @
f4f4e26c
...
@@ -365,6 +365,36 @@ public class HGKCUtils {
...
@@ -365,6 +365,36 @@ public class HGKCUtils {
}
}
/**
/**
* HGKC010 工具类
*
* @author:songx
* @date:2024/5/9,16:58
*/
public
static
class
HgKc010A
{
/**
* 锁并且获取数据
*
* @param kc010s
* @return
*/
public
static
Map
<
Long
,
HGKC010A
>
lockGetDataEp
(
List
<
HGKC010A
>
kc010s
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
kc010s
,
HGKC010A
.
FIELD_ID
));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HGKC010A
>
lockGetData
(
List
<
Long
>
ids
)
{
// 锁
HGKCTools
.
HgKc010
.
lock
(
ids
);
// db数据
return
HGKCTools
.
HgKc010A
.
map
(
ids
);
}
}
/**
* HGKC011 工具类
* HGKC011 工具类
*
*
* @author:songx
* @author:songx
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
f4f4e26c
...
@@ -28,6 +28,7 @@
...
@@ -28,6 +28,7 @@
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC010.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC010.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC010A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC011.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC011.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC013A.xml"
/>
...
...
src/main/webapp/HG/KC/HGKC009.js
0 → 100644
View file @
f4f4e26c
$
(
function
()
{
IPLATUI
.
EFGrid
.
result
=
{
pageable
:
{
pageSize
:
20
,
pageSizes
:
[
10
,
20
,
50
,
70
,
100
],
},
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
//手动触发按天统计
$
(
"#STARTDAY"
).
on
(
"click"
,
function
()
{
JSUtils
.
confirm
(
"确定手动触发按天统计自动任务? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGKC009"
,
"statDay"
,
true
);
}
});
});
//手动触发按月统计
$
(
"#STARTMONTH"
).
on
(
"click"
,
function
()
{
JSUtils
.
confirm
(
"确定手动触发按天统计自动任务? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGKC009"
,
"statMonth"
,
true
);
}
});
});
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
}
/**
* 删除
*/
let
startDay
=
function
()
{
JSUtils
.
confirm
(
"确定手动触发按天统计自动任务? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGKC009"
,
"statDay"
,
true
);
}
});
}
src/main/webapp/HG/KC/HGKC009.jsp
0 → 100644
View file @
f4f4e26c
<!DOCTYPE html>
<
%@
page
contentType=
"text/html; charset=UTF-8"
%
>
<
%@
taglib
uri=
"http://java.sun.com/jsp/jstl/core"
prefix=
"c"
%
>
<
%@
taglib
prefix=
"EF"
tagdir=
"/WEB-INF/tags/EF"
%
>
<c:set
var=
"ctx"
value=
"${pageContext.request.contextPath}"
/>
<EF:EFPage
title=
"库存收发存"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<EF:EFDatePicker
cname=
"单据日期"
ename=
"inqu_status-0-dateProc"
colWidth=
"3"
role=
"date"
format=
"yyyy-MM"
readonly=
"true"
start=
"year"
depth=
"year"
/>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"invent_type_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"仓库名称"
ename=
"inqu_status-0-whCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFInput
ename=
"inqu_status-0-inventName"
cname=
"存货名称"
colWidth=
"3"
/>
<
%
--
<
EF:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
>
--%>
<
%
--
<
EF:EFOption
label=
"全部"
value=
""
/>
--%>
<
%
--
<
EF:EFOptions
blockId=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
--%>
<
%
--
</
EF:EFSelect
>
--%>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-inventRecordId"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键"
hidden=
"true"
/>
<EF:EFColumn
ename=
"dateProc"
cname=
"日期"
enable=
"false"
width=
"90"
align=
"center"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"invent_type_block_id"
textField=
"textField"
valueField=
"valueField"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"100"
align=
"center"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventCode"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
blockName=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"spec_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"initAmount"
cname=
"期初数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"initWeight"
cname=
"期初重量(T)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterAmount"
cname=
"采购入库数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterWeight"
cname=
"采购入库重量(T)"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterAmount"
cname=
"其它入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterWeight"
cname=
"其它入库重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterAmount"
cname=
"入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterWeight"
cname=
"入库重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterAmount"
cname=
"生产领料数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterWeight"
cname=
"生产领料重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterAmount"
cname=
"其它出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterWeight"
cname=
"其它出库重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerAmount"
cname=
"出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerWeight"
cname=
"出库重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffAmount"
cname=
"盘点差异数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffWeight"
cname=
"盘点差异重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endAmount"
cname=
"期末数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endWeight"
cname=
"期末重量(T)"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
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