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
de5887cb
Commit
de5887cb
authored
Oct 27, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产领料单增加选择产品清单功能
parent
ddb9b1f4
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
919 additions
and
129 deletions
+919
-129
HGConstant.java
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
+14
-0
HGSqlConstant.java
...ain/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
+21
-5
HGKC008.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008.java
+23
-7
HGKC008A.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008A.java
+137
-90
ServiceHGKC008B.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC008B.java
+4
-3
ServiceHGKC008D.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC008D.java
+192
-0
HGKC008.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
+8
-3
HGKC008A.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
+19
-3
HGSC004A.java
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
+23
-0
HGSC004A.xml
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
+101
-0
HGSCTools.java
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
+40
-0
HgScUtils.java
src/main/java/com/baosight/hggp/hg/sc/util/HgScUtils.java
+39
-7
HGKC008.jsp
src/main/webapp/HG/KC/HGKC008.jsp
+3
-0
HGKC008A.js
src/main/webapp/HG/KC/HGKC008A.js
+54
-9
HGKC008A.jsp
src/main/webapp/HG/KC/HGKC008A.jsp
+7
-2
HGKC008D.js
src/main/webapp/HG/KC/HGKC008D.js
+176
-0
HGKC008D.jsp
src/main/webapp/HG/KC/HGKC008D.jsp
+58
-0
No files found.
src/main/java/com/baosight/hggp/hg/constant/HGConstant.java
View file @
de5887cb
...
@@ -549,4 +549,18 @@ public class HGConstant {
...
@@ -549,4 +549,18 @@ public class HGConstant {
// 已开票
// 已开票
public
static
final
Integer
S2
=
2
;
public
static
final
Integer
S2
=
2
;
}
}
/**
* 领料来源
*
* @author:jhs
* @date:2024/10/27,13:57
*/
public
static
class
ReceiveDataSource
{
// 库存
public
static
final
Integer
S1
=
1
;
// 产品清单
public
static
final
Integer
S2
=
2
;
}
}
}
src/main/java/com/baosight/hggp/hg/constant/HGSqlConstant.java
View file @
de5887cb
...
@@ -108,13 +108,13 @@ public class HGSqlConstant {
...
@@ -108,13 +108,13 @@ public class HGSqlConstant {
// 收货完成
// 收货完成
public
static
final
String
UPDATE_CONFIRM
=
MODULE_NAME
+
"updateConfirm"
;
public
static
final
String
UPDATE_CONFIRM
=
MODULE_NAME
+
"updateConfirm"
;
}
}
/**
/**
* @author:songx
* @author:songx
* @date:2024/8/30,16:25
* @date:2024/8/30,16:25
*/
*/
public
class
HgCg003A
{
public
class
HgCg003A
{
// 模块名称:HGCW003A
// 模块名称:HGCW003A
private
static
final
String
MODULE_NAME
=
"HGCG003A."
;
private
static
final
String
MODULE_NAME
=
"HGCG003A."
;
//
//
...
@@ -560,6 +560,22 @@ public class HGSqlConstant {
...
@@ -560,6 +560,22 @@ public class HGSqlConstant {
}
}
/**
/**
* HGKC010 SQL 定义
*
* @author:jhs
* @date:2024/10/27,16:45
*/
public
class
HGSC004A
{
// 模块名称
private
static
final
String
MODULE_NAME
=
"HGSC004A."
;
// 物料清单查询
public
static
final
String
QUERY_MATERIAL
=
MODULE_NAME
+
"queryMaterial"
;
// 锁
public
static
final
String
LOCKS
=
MODULE_NAME
+
"locks"
;
}
/**
* @author:songx
* @author:songx
* @date:2024/2/5,10:16
* @date:2024/2/5,10:16
*/
*/
...
@@ -614,7 +630,7 @@ public class HGSqlConstant {
...
@@ -614,7 +630,7 @@ public class HGSqlConstant {
* @date:2024/10/22,16:05
* @date:2024/10/22,16:05
*/
*/
public
class
HGZL004
{
public
class
HGZL004
{
// 锁
// 锁
public
static
final
String
LOCK
=
"HGZL004.lock"
;
public
static
final
String
LOCK
=
"HGZL004.lock"
;
}
}
...
@@ -626,7 +642,7 @@ public class HGSqlConstant {
...
@@ -626,7 +642,7 @@ public class HGSqlConstant {
* @date:2024/5/8,10:55
* @date:2024/5/8,10:55
*/
*/
public
class
HgXsUser
{
public
class
HgXsUser
{
// 查询
// 查询
public
static
final
String
GET_BY_LOGIN
=
"HGXSUser.getByLogin"
;
public
static
final
String
GET_BY_LOGIN
=
"HGXSUser.getByLogin"
;
// 查询
// 查询
...
@@ -656,7 +672,7 @@ public class HGSqlConstant {
...
@@ -656,7 +672,7 @@ public class HGSqlConstant {
* @date:2024/1/20,16:45
* @date:2024/1/20,16:45
*/
*/
public
class
HgXsOrg
{
public
class
HgXsOrg
{
// 查询组织机构
// 查询组织机构
public
static
final
String
GET
=
"HGXSOrg.get"
;
public
static
final
String
GET
=
"HGXSOrg.get"
;
// 查询组织机构
// 查询组织机构
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008.java
View file @
de5887cb
...
@@ -44,6 +44,7 @@ public class HGKC008 extends DaoEPBase {
...
@@ -44,6 +44,7 @@ public class HGKC008 extends DaoEPBase {
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_RECEIVE_USER_ID
=
"receiveUserId"
;
/* 领用人ID*/
public
static
final
String
FIELD_RECEIVE_USER_ID
=
"receiveUserId"
;
/* 领用人ID*/
public
static
final
String
FIELD_RECEIVE_USER_NAME
=
"receiveUserName"
;
/* 领用人姓名*/
public
static
final
String
FIELD_RECEIVE_USER_NAME
=
"receiveUserName"
;
/* 领用人姓名*/
public
static
final
String
FIELD_DATA_SOURCE
=
"dataSource"
;
/* 数据来源 1存货 2产品清单*/
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"
;
/* 账套*/
...
@@ -98,6 +99,7 @@ public class HGKC008 extends DaoEPBase {
...
@@ -98,6 +99,7 @@ public class HGKC008 extends DaoEPBase {
private
String
projName
=
" "
;
/* 项目名称*/
private
String
projName
=
" "
;
/* 项目名称*/
private
String
receiveUserId
=
" "
;
/* 领用人ID*/
private
String
receiveUserId
=
" "
;
/* 领用人ID*/
private
String
receiveUserName
=
" "
;
/* 领用人姓名*/
private
String
receiveUserName
=
" "
;
/* 领用人姓名*/
private
Integer
dataSource
=
new
Integer
(
0
);
/* 数据来源 1存货 2产品清单*/
/**
/**
* initialize the metadata.
* initialize the metadata.
...
@@ -184,14 +186,18 @@ public class HGKC008 extends DaoEPBase {
...
@@ -184,14 +186,18 @@ public class HGKC008 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_USER_ID
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_USER_ID
);
eiColumn
.
setDescName
(
"领用人ID"
);
eiColumn
.
setDescName
(
"领用人ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_USER_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_USER_NAME
);
eiColumn
.
setDescName
(
"领用人姓名"
);
eiColumn
.
setDescName
(
"领用人姓名"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DATA_SOURCE
);
eiColumn
.
setDescName
(
"数据来源 1存货 2产品清单"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -505,23 +511,31 @@ public class HGKC008 extends DaoEPBase {
...
@@ -505,23 +511,31 @@ public class HGKC008 extends DaoEPBase {
public
void
setProjName
(
String
projName
)
{
public
void
setProjName
(
String
projName
)
{
this
.
projName
=
projName
;
this
.
projName
=
projName
;
}
}
public
String
getReceiveUserId
()
{
public
String
getReceiveUserId
()
{
return
receiveUserId
;
return
receiveUserId
;
}
}
public
void
setReceiveUserId
(
String
receiveUserId
)
{
public
void
setReceiveUserId
(
String
receiveUserId
)
{
this
.
receiveUserId
=
receiveUserId
;
this
.
receiveUserId
=
receiveUserId
;
}
}
public
String
getReceiveUserName
()
{
public
String
getReceiveUserName
()
{
return
receiveUserName
;
return
receiveUserName
;
}
}
public
void
setReceiveUserName
(
String
receiveUserName
)
{
public
void
setReceiveUserName
(
String
receiveUserName
)
{
this
.
receiveUserName
=
receiveUserName
;
this
.
receiveUserName
=
receiveUserName
;
}
}
public
Integer
getDataSource
()
{
return
dataSource
;
}
public
void
setDataSource
(
Integer
dataSource
)
{
this
.
dataSource
=
dataSource
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -552,6 +566,7 @@ public class HGKC008 extends DaoEPBase {
...
@@ -552,6 +566,7 @@ public class HGKC008 extends DaoEPBase {
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setReceiveUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER_ID
)),
receiveUserId
));
setReceiveUserId
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER_ID
)),
receiveUserId
));
setReceiveUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER_NAME
)),
receiveUserName
));
setReceiveUserName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_USER_NAME
)),
receiveUserName
));
setDataSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DATA_SOURCE
)),
dataSource
));
}
}
/**
/**
...
@@ -583,6 +598,7 @@ public class HGKC008 extends DaoEPBase {
...
@@ -583,6 +598,7 @@ public class HGKC008 extends DaoEPBase {
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_RECEIVE_USER_ID
,
StringUtils
.
toString
(
receiveUserId
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER_ID
)));
map
.
put
(
FIELD_RECEIVE_USER_ID
,
StringUtils
.
toString
(
receiveUserId
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER_ID
)));
map
.
put
(
FIELD_RECEIVE_USER_NAME
,
StringUtils
.
toString
(
receiveUserName
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER_NAME
)));
map
.
put
(
FIELD_RECEIVE_USER_NAME
,
StringUtils
.
toString
(
receiveUserName
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_USER_NAME
)));
map
.
put
(
FIELD_DATA_SOURCE
,
StringUtils
.
toString
(
dataSource
,
eiMetadata
.
getMeta
(
FIELD_DATA_SOURCE
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC008A.java
View file @
de5887cb
...
@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
...
@@ -19,9 +19,9 @@ import com.baosight.iplat4j.core.util.StringUtils;
* @history 2024-09-29 13:48:32 create
* @history 2024-09-29 13:48:32 create
*/
*/
public
class
HGKC008A
extends
DaoEPBase
{
public
class
HGKC008A
extends
DaoEPBase
{
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
String
FIELD_ID
=
"id"
;
/* 主键id*/
public
static
final
String
FIELD_ID
=
"id"
;
/* 主键id*/
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 账套*/
public
static
final
String
FIELD_ACCOUNT_CODE
=
"accountCode"
;
/* 账套*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
public
static
final
String
FIELD_DEP_CODE
=
"depCode"
;
/* 部门编码*/
...
@@ -59,7 +59,10 @@ public class HGKC008A extends DaoEPBase {
...
@@ -59,7 +59,10 @@ public class HGKC008A extends DaoEPBase {
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/* 存货类型大类*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/* 存货类型大类*/
public
static
final
String
FIELD_QUALITY_NO
=
"qualityNo"
;
/* 质检单号*/
public
static
final
String
FIELD_QUALITY_NO
=
"qualityNo"
;
/* 质检单号*/
public
static
final
String
FIELD_INV_ID
=
"invId"
;
/* 库存ID*/
public
static
final
String
FIELD_INV_ID
=
"invId"
;
/* 库存ID*/
public
static
final
String
FIELD_MAT_ID
=
"matId"
;
/* 物料清单ID*/
public
static
final
String
FIELD_MAT_DETAIL_ID
=
"matDetailId"
;
/* 物料清单明细ID*/
public
static
final
String
FIELD_DATA_SOURCE
=
"dataSource"
;
/* 数据来源 1存货 2产品清单*/
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"
;
/* 部门编码*/
...
@@ -97,13 +100,13 @@ public class HGKC008A extends DaoEPBase {
...
@@ -97,13 +100,13 @@ public class HGKC008A extends DaoEPBase {
public
static
final
String
COL_INVENT_TYPE_DETAIL
=
"INVENT_TYPE_DETAIL"
;
/* 存货类型大类*/
public
static
final
String
COL_INVENT_TYPE_DETAIL
=
"INVENT_TYPE_DETAIL"
;
/* 存货类型大类*/
public
static
final
String
COL_QUALITY_NO
=
"QUALITY_NO"
;
/* 质检单号*/
public
static
final
String
COL_QUALITY_NO
=
"QUALITY_NO"
;
/* 质检单号*/
public
static
final
String
COL_INV_ID
=
"INV_ID"
;
/* 库存ID*/
public
static
final
String
COL_INV_ID
=
"INV_ID"
;
/* 库存ID*/
public
static
final
String
QUERY
=
"HGKC008A.query"
;
public
static
final
String
QUERY
=
"HGKC008A.query"
;
public
static
final
String
COUNT
=
"HGKC008A.count"
;
public
static
final
String
COUNT
=
"HGKC008A.count"
;
public
static
final
String
INSERT
=
"HGKC008A.insert"
;
public
static
final
String
INSERT
=
"HGKC008A.insert"
;
public
static
final
String
UPDATE
=
"HGKC008A.update"
;
public
static
final
String
UPDATE
=
"HGKC008A.update"
;
public
static
final
String
DELETE
=
"HGKC008A.delete"
;
public
static
final
String
DELETE
=
"HGKC008A.delete"
;
private
Long
id
=
new
Long
(
0
);
/* 主键id*/
private
Long
id
=
new
Long
(
0
);
/* 主键id*/
private
String
accountCode
=
" "
;
/* 账套*/
private
String
accountCode
=
" "
;
/* 账套*/
private
String
depCode
=
" "
;
/* 部门编码*/
private
String
depCode
=
" "
;
/* 部门编码*/
...
@@ -141,195 +144,209 @@ public class HGKC008A extends DaoEPBase {
...
@@ -141,195 +144,209 @@ public class HGKC008A extends DaoEPBase {
private
Integer
inventTypeDetail
;
/* 存货类型大类*/
private
Integer
inventTypeDetail
;
/* 存货类型大类*/
private
String
qualityNo
=
" "
;
/* 质检单号*/
private
String
qualityNo
=
" "
;
/* 质检单号*/
private
Long
invId
=
new
Long
(
0
);
/* 库存ID*/
private
Long
invId
=
new
Long
(
0
);
/* 库存ID*/
private
Long
matId
=
new
Long
(
0
);
/* 物料清单ID*/
private
Long
matDetailId
=
new
Long
(
0
);
/* 物料清单明细ID*/
private
Integer
dataSource
=
new
Integer
(
0
);
/* 数据来源 1存货 2产品清单*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
public
void
initMetaData
()
{
public
void
initMetaData
()
{
EiColumn
eiColumn
;
EiColumn
eiColumn
;
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
=
new
EiColumn
(
FIELD_ID
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setPrimaryKey
(
true
);
eiColumn
.
setDescName
(
"主键id"
);
eiColumn
.
setDescName
(
"主键id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_ACCOUNT_CODE
);
eiColumn
.
setDescName
(
"账套"
);
eiColumn
.
setDescName
(
"账套"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_DEP_CODE
);
eiColumn
.
setDescName
(
"部门编码"
);
eiColumn
.
setDescName
(
"部门编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_BY
);
eiColumn
.
setDescName
(
"创建人"
);
eiColumn
.
setDescName
(
"创建人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_NAME
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiColumn
.
setDescName
(
"创建人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
=
new
EiColumn
(
FIELD_CREATED_TIME
);
eiColumn
.
setDescName
(
"创建时间"
);
eiColumn
.
setDescName
(
"创建时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_BY
);
eiColumn
.
setDescName
(
"修改人"
);
eiColumn
.
setDescName
(
"修改人"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_NAME
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiColumn
.
setDescName
(
"修改人名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
=
new
EiColumn
(
FIELD_UPDATED_TIME
);
eiColumn
.
setDescName
(
"修改时间"
);
eiColumn
.
setDescName
(
"修改时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
=
new
EiColumn
(
FIELD_DELETE_FLAG
);
eiColumn
.
setDescName
(
"是否删除 0-否1-是"
);
eiColumn
.
setDescName
(
"是否删除 0-否1-是"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
=
new
EiColumn
(
FIELD_STATUS
);
eiColumn
.
setDescName
(
"0.未提交,1-已提交,2.质检中"
);
eiColumn
.
setDescName
(
"0.未提交,1-已提交,2.质检中"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_APPLY_LINE_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_APPLY_LINE_CODE
);
eiColumn
.
setDescName
(
"领料单行号"
);
eiColumn
.
setDescName
(
"领料单行号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_APPLY_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_APPLY_CODE
);
eiColumn
.
setDescName
(
"领料单号"
);
eiColumn
.
setDescName
(
"领料单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_ID
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_ID
);
eiColumn
.
setDescName
(
"领料单id"
);
eiColumn
.
setDescName
(
"领料单id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_CODE
);
eiColumn
.
setDescName
(
"公司编码"
);
eiColumn
.
setDescName
(
"公司编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_COMPANY_NAME
);
eiColumn
.
setDescName
(
"公司名称"
);
eiColumn
.
setDescName
(
"公司名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_CODE
);
eiColumn
.
setDescName
(
"项目编码"
);
eiColumn
.
setDescName
(
"项目编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_PROJ_NAME
);
eiColumn
.
setDescName
(
"项目名称"
);
eiColumn
.
setDescName
(
"项目名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WH_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_WH_CODE
);
eiColumn
.
setDescName
(
"仓库编号"
);
eiColumn
.
setDescName
(
"仓库编号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_WH_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_WH_NAME
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiColumn
.
setDescName
(
"仓库名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_RECORD_ID
);
eiColumn
.
setDescName
(
"存货档案id"
);
eiColumn
.
setDescName
(
"存货档案id"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE
);
eiColumn
.
setDescName
(
"存货类型"
);
eiColumn
.
setDescName
(
"存货类型"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_CODE
);
eiColumn
.
setDescName
(
"存货编码"
);
eiColumn
.
setDescName
(
"存货编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_NAME
);
eiColumn
.
setDescName
(
"存货名称"
);
eiColumn
.
setDescName
(
"存货名称"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC_ID
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC_ID
);
eiColumn
.
setDescName
(
"规格ID"
);
eiColumn
.
setDescName
(
"规格ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC
);
eiColumn
=
new
EiColumn
(
FIELD_INV_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_LENGTH
);
eiColumn
=
new
EiColumn
(
FIELD_INV_LENGTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"长度(MM)"
);
eiColumn
.
setDescName
(
"长度(MM)"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_WIDTH
);
eiColumn
=
new
EiColumn
(
FIELD_INV_WIDTH
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"宽度(MM)"
);
eiColumn
.
setDescName
(
"宽度(MM)"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_THICK
);
eiColumn
=
new
EiColumn
(
FIELD_INV_THICK
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"厚度(MM)"
);
eiColumn
.
setDescName
(
"厚度(MM)"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_QTY
);
eiColumn
=
new
EiColumn
(
FIELD_INV_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"数量"
);
eiColumn
.
setDescName
(
"数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_UNIT_WEIGHT
);
eiColumn
=
new
EiColumn
(
FIELD_INV_UNIT_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"单重"
);
eiColumn
.
setDescName
(
"单重"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_WEIGHT
);
eiColumn
=
new
EiColumn
(
FIELD_INV_WEIGHT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setFieldLength
(
20
);
eiColumn
.
setDescName
(
"重量"
);
eiColumn
.
setDescName
(
"重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
=
new
EiColumn
(
FIELD_PRICE
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"单价"
);
eiColumn
.
setDescName
(
"单价"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
=
new
EiColumn
(
FIELD_AMOUNT
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setScaleLength
(
3
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setFieldLength
(
12
);
eiColumn
.
setDescName
(
"金额"
);
eiColumn
.
setDescName
(
"金额"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
.
setDescName
(
"存货类型大类"
);
eiColumn
.
setDescName
(
"存货类型大类"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_NO
);
eiColumn
=
new
EiColumn
(
FIELD_QUALITY_NO
);
eiColumn
.
setDescName
(
"质检单号"
);
eiColumn
.
setDescName
(
"质检单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_INV_ID
);
eiColumn
=
new
EiColumn
(
FIELD_INV_ID
);
eiColumn
.
setDescName
(
"库存ID"
);
eiColumn
.
setDescName
(
"库存ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MAT_ID
);
eiColumn
.
setDescName
(
"物料清单ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_MAT_DETAIL_ID
);
eiColumn
.
setDescName
(
"物料清单明细ID"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_DATA_SOURCE
);
eiColumn
.
setDescName
(
"数据来源 1存货 2产品清单"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
* the constructor.
* the constructor.
*/
*/
public
HGKC008A
()
{
public
HGKC008A
()
{
initMetaData
();
initMetaData
();
}
}
/**
/**
* get the id - 主键id.
* get the id - 主键id.
* @return the id
* @return the id
...
@@ -337,7 +354,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -337,7 +354,7 @@ public class HGKC008A extends DaoEPBase {
public
Long
getId
()
{
public
Long
getId
()
{
return
this
.
id
;
return
this
.
id
;
}
}
/**
/**
* set the id - 主键id.
* set the id - 主键id.
*
*
...
@@ -353,7 +370,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -353,7 +370,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getAccountCode
()
{
public
String
getAccountCode
()
{
return
this
.
accountCode
;
return
this
.
accountCode
;
}
}
/**
/**
* set the accountCode - 账套.
* set the accountCode - 账套.
*
*
...
@@ -369,7 +386,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -369,7 +386,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getDepCode
()
{
public
String
getDepCode
()
{
return
this
.
depCode
;
return
this
.
depCode
;
}
}
/**
/**
* set the depCode - 部门编码.
* set the depCode - 部门编码.
*
*
...
@@ -385,7 +402,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -385,7 +402,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getCreatedBy
()
{
public
String
getCreatedBy
()
{
return
this
.
createdBy
;
return
this
.
createdBy
;
}
}
/**
/**
* set the createdBy - 创建人.
* set the createdBy - 创建人.
*
*
...
@@ -401,7 +418,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -401,7 +418,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getCreatedName
()
{
public
String
getCreatedName
()
{
return
this
.
createdName
;
return
this
.
createdName
;
}
}
/**
/**
* set the createdName - 创建人名称.
* set the createdName - 创建人名称.
*
*
...
@@ -417,7 +434,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -417,7 +434,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getCreatedTime
()
{
public
String
getCreatedTime
()
{
return
this
.
createdTime
;
return
this
.
createdTime
;
}
}
/**
/**
* set the createdTime - 创建时间.
* set the createdTime - 创建时间.
*
*
...
@@ -433,7 +450,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -433,7 +450,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getUpdatedBy
()
{
public
String
getUpdatedBy
()
{
return
this
.
updatedBy
;
return
this
.
updatedBy
;
}
}
/**
/**
* set the updatedBy - 修改人.
* set the updatedBy - 修改人.
*
*
...
@@ -449,7 +466,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -449,7 +466,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getUpdatedName
()
{
public
String
getUpdatedName
()
{
return
this
.
updatedName
;
return
this
.
updatedName
;
}
}
/**
/**
* set the updatedName - 修改人名称.
* set the updatedName - 修改人名称.
*
*
...
@@ -465,7 +482,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -465,7 +482,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getUpdatedTime
()
{
public
String
getUpdatedTime
()
{
return
this
.
updatedTime
;
return
this
.
updatedTime
;
}
}
/**
/**
* set the updatedTime - 修改时间.
* set the updatedTime - 修改时间.
*
*
...
@@ -481,7 +498,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -481,7 +498,7 @@ public class HGKC008A extends DaoEPBase {
public
Integer
getDeleteFlag
()
{
public
Integer
getDeleteFlag
()
{
return
this
.
deleteFlag
;
return
this
.
deleteFlag
;
}
}
/**
/**
* set the deleteFlag - 是否删除 0-否1-是.
* set the deleteFlag - 是否删除 0-否1-是.
*
*
...
@@ -497,7 +514,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -497,7 +514,7 @@ public class HGKC008A extends DaoEPBase {
public
Integer
getStatus
()
{
public
Integer
getStatus
()
{
return
this
.
status
;
return
this
.
status
;
}
}
/**
/**
* set the status - 0.未提交,1-已提交,2.质检中.
* set the status - 0.未提交,1-已提交,2.质检中.
*
*
...
@@ -513,7 +530,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -513,7 +530,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getApplyLineCode
()
{
public
String
getApplyLineCode
()
{
return
this
.
applyLineCode
;
return
this
.
applyLineCode
;
}
}
/**
/**
* set the applyLineCode - 领料单行号.
* set the applyLineCode - 领料单行号.
*
*
...
@@ -529,7 +546,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -529,7 +546,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getApplyCode
()
{
public
String
getApplyCode
()
{
return
this
.
applyCode
;
return
this
.
applyCode
;
}
}
/**
/**
* set the applyCode - 领料单号.
* set the applyCode - 领料单号.
*
*
...
@@ -545,7 +562,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -545,7 +562,7 @@ public class HGKC008A extends DaoEPBase {
public
Long
getReceiveId
()
{
public
Long
getReceiveId
()
{
return
this
.
receiveId
;
return
this
.
receiveId
;
}
}
/**
/**
* set the receiveId - 领料单id.
* set the receiveId - 领料单id.
*
*
...
@@ -561,7 +578,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -561,7 +578,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getCompanyCode
()
{
public
String
getCompanyCode
()
{
return
this
.
companyCode
;
return
this
.
companyCode
;
}
}
/**
/**
* set the companyCode - 公司编码.
* set the companyCode - 公司编码.
*
*
...
@@ -577,7 +594,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -577,7 +594,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getCompanyName
()
{
public
String
getCompanyName
()
{
return
this
.
companyName
;
return
this
.
companyName
;
}
}
/**
/**
* set the companyName - 公司名称.
* set the companyName - 公司名称.
*
*
...
@@ -593,7 +610,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -593,7 +610,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getProjCode
()
{
public
String
getProjCode
()
{
return
this
.
projCode
;
return
this
.
projCode
;
}
}
/**
/**
* set the projCode - 项目编码.
* set the projCode - 项目编码.
*
*
...
@@ -609,7 +626,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -609,7 +626,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getProjName
()
{
public
String
getProjName
()
{
return
this
.
projName
;
return
this
.
projName
;
}
}
/**
/**
* set the projName - 项目名称.
* set the projName - 项目名称.
*
*
...
@@ -625,7 +642,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -625,7 +642,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getWhCode
()
{
public
String
getWhCode
()
{
return
this
.
whCode
;
return
this
.
whCode
;
}
}
/**
/**
* set the whCode - 仓库编号.
* set the whCode - 仓库编号.
*
*
...
@@ -641,7 +658,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -641,7 +658,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getWhName
()
{
public
String
getWhName
()
{
return
this
.
whName
;
return
this
.
whName
;
}
}
/**
/**
* set the whName - 仓库名称.
* set the whName - 仓库名称.
*
*
...
@@ -657,7 +674,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -657,7 +674,7 @@ public class HGKC008A extends DaoEPBase {
public
Long
getInventRecordId
()
{
public
Long
getInventRecordId
()
{
return
this
.
inventRecordId
;
return
this
.
inventRecordId
;
}
}
/**
/**
* set the inventRecordId - 存货档案id.
* set the inventRecordId - 存货档案id.
*
*
...
@@ -673,7 +690,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -673,7 +690,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getInventType
()
{
public
String
getInventType
()
{
return
this
.
inventType
;
return
this
.
inventType
;
}
}
/**
/**
* set the inventType - 存货类型.
* set the inventType - 存货类型.
*
*
...
@@ -689,7 +706,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -689,7 +706,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getInventCode
()
{
public
String
getInventCode
()
{
return
this
.
inventCode
;
return
this
.
inventCode
;
}
}
/**
/**
* set the inventCode - 存货编码.
* set the inventCode - 存货编码.
*
*
...
@@ -705,7 +722,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -705,7 +722,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getInventName
()
{
public
String
getInventName
()
{
return
this
.
inventName
;
return
this
.
inventName
;
}
}
/**
/**
* set the inventName - 存货名称.
* set the inventName - 存货名称.
*
*
...
@@ -721,7 +738,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -721,7 +738,7 @@ public class HGKC008A extends DaoEPBase {
public
Long
getInvSpecId
()
{
public
Long
getInvSpecId
()
{
return
this
.
invSpecId
;
return
this
.
invSpecId
;
}
}
/**
/**
* set the invSpecId - 规格ID.
* set the invSpecId - 规格ID.
*
*
...
@@ -737,7 +754,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -737,7 +754,7 @@ public class HGKC008A extends DaoEPBase {
public
String
getInvSpec
()
{
public
String
getInvSpec
()
{
return
this
.
invSpec
;
return
this
.
invSpec
;
}
}
/**
/**
* set the invSpec - 规格.
* set the invSpec - 规格.
*
*
...
@@ -753,7 +770,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -753,7 +770,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvLength
()
{
public
BigDecimal
getInvLength
()
{
return
this
.
invLength
;
return
this
.
invLength
;
}
}
/**
/**
* set the invLength - 长度(MM).
* set the invLength - 长度(MM).
*
*
...
@@ -769,7 +786,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -769,7 +786,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvWidth
()
{
public
BigDecimal
getInvWidth
()
{
return
this
.
invWidth
;
return
this
.
invWidth
;
}
}
/**
/**
* set the invWidth - 宽度(MM).
* set the invWidth - 宽度(MM).
*
*
...
@@ -785,7 +802,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -785,7 +802,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvThick
()
{
public
BigDecimal
getInvThick
()
{
return
this
.
invThick
;
return
this
.
invThick
;
}
}
/**
/**
* set the invThick - 厚度(MM).
* set the invThick - 厚度(MM).
*
*
...
@@ -801,7 +818,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -801,7 +818,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvQty
()
{
public
BigDecimal
getInvQty
()
{
return
this
.
invQty
;
return
this
.
invQty
;
}
}
/**
/**
* set the invQty - 数量.
* set the invQty - 数量.
*
*
...
@@ -817,7 +834,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -817,7 +834,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvUnitWeight
()
{
public
BigDecimal
getInvUnitWeight
()
{
return
this
.
invUnitWeight
;
return
this
.
invUnitWeight
;
}
}
/**
/**
* set the invUnitWeight - 单重.
* set the invUnitWeight - 单重.
*
*
...
@@ -833,7 +850,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -833,7 +850,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getInvWeight
()
{
public
BigDecimal
getInvWeight
()
{
return
this
.
invWeight
;
return
this
.
invWeight
;
}
}
/**
/**
* set the invWeight - 重量.
* set the invWeight - 重量.
*
*
...
@@ -849,7 +866,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -849,7 +866,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getPrice
()
{
public
BigDecimal
getPrice
()
{
return
this
.
price
;
return
this
.
price
;
}
}
/**
/**
* set the price - 单价.
* set the price - 单价.
*
*
...
@@ -865,7 +882,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -865,7 +882,7 @@ public class HGKC008A extends DaoEPBase {
public
BigDecimal
getAmount
()
{
public
BigDecimal
getAmount
()
{
return
this
.
amount
;
return
this
.
amount
;
}
}
/**
/**
* set the amount - 金额.
* set the amount - 金额.
*
*
...
@@ -881,7 +898,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -881,7 +898,7 @@ public class HGKC008A extends DaoEPBase {
public
Integer
getInventTypeDetail
()
{
public
Integer
getInventTypeDetail
()
{
return
this
.
inventTypeDetail
;
return
this
.
inventTypeDetail
;
}
}
/**
/**
* set the inventTypeDetail - 存货类型大类.
* set the inventTypeDetail - 存货类型大类.
*
*
...
@@ -890,23 +907,47 @@ public class HGKC008A extends DaoEPBase {
...
@@ -890,23 +907,47 @@ public class HGKC008A extends DaoEPBase {
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
this
.
inventTypeDetail
=
inventTypeDetail
;
}
}
public
String
getQualityNo
()
{
public
String
getQualityNo
()
{
return
qualityNo
;
return
qualityNo
;
}
}
public
void
setQualityNo
(
String
qualityNo
)
{
public
void
setQualityNo
(
String
qualityNo
)
{
this
.
qualityNo
=
qualityNo
;
this
.
qualityNo
=
qualityNo
;
}
}
public
Long
getInvId
()
{
public
Long
getInvId
()
{
return
invId
;
return
invId
;
}
}
public
void
setInvId
(
Long
invId
)
{
public
void
setInvId
(
Long
invId
)
{
this
.
invId
=
invId
;
this
.
invId
=
invId
;
}
}
public
Long
getMatId
()
{
return
matId
;
}
public
void
setMatId
(
Long
matId
)
{
this
.
matId
=
matId
;
}
public
Long
getMatDetailId
()
{
return
matDetailId
;
}
public
void
setMatDetailId
(
Long
matDetailId
)
{
this
.
matDetailId
=
matDetailId
;
}
public
Integer
getDataSource
()
{
return
dataSource
;
}
public
void
setDataSource
(
Integer
dataSource
)
{
this
.
dataSource
=
dataSource
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -914,7 +955,7 @@ public class HGKC008A extends DaoEPBase {
...
@@ -914,7 +955,7 @@ public class HGKC008A extends DaoEPBase {
*/
*/
@Override
@Override
public
void
fromMap
(
Map
map
)
{
public
void
fromMap
(
Map
map
)
{
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ID
)),
id
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setAccountCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_ACCOUNT_CODE
)),
accountCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
setDepCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEP_CODE
)),
depCode
));
...
@@ -952,14 +993,17 @@ public class HGKC008A extends DaoEPBase {
...
@@ -952,14 +993,17 @@ public class HGKC008A extends DaoEPBase {
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setQualityNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_NO
)),
qualityNo
));
setQualityNo
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_QUALITY_NO
)),
qualityNo
));
setInvId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_ID
)),
invId
));
setInvId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INV_ID
)),
invId
));
setMatId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_ID
)),
matId
));
setMatDetailId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_MAT_DETAIL_ID
)),
matDetailId
));
setDataSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DATA_SOURCE
)),
dataSource
));
}
}
/**
/**
* set the value to Map.
* set the value to Map.
*/
*/
@Override
@Override
public
Map
toMap
()
{
public
Map
toMap
()
{
Map
map
=
new
HashMap
();
Map
map
=
new
HashMap
();
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ID
,
StringUtils
.
toString
(
id
,
eiMetadata
.
getMeta
(
FIELD_ID
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
map
.
put
(
FIELD_ACCOUNT_CODE
,
StringUtils
.
toString
(
accountCode
,
eiMetadata
.
getMeta
(
FIELD_ACCOUNT_CODE
)));
...
@@ -998,7 +1042,10 @@ public class HGKC008A extends DaoEPBase {
...
@@ -998,7 +1042,10 @@ public class HGKC008A extends DaoEPBase {
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
map
.
put
(
FIELD_QUALITY_NO
,
StringUtils
.
toString
(
qualityNo
,
eiMetadata
.
getMeta
(
FIELD_QUALITY_NO
)));
map
.
put
(
FIELD_QUALITY_NO
,
StringUtils
.
toString
(
qualityNo
,
eiMetadata
.
getMeta
(
FIELD_QUALITY_NO
)));
map
.
put
(
FIELD_INV_ID
,
StringUtils
.
toString
(
invId
,
eiMetadata
.
getMeta
(
FIELD_INV_ID
)));
map
.
put
(
FIELD_INV_ID
,
StringUtils
.
toString
(
invId
,
eiMetadata
.
getMeta
(
FIELD_INV_ID
)));
map
.
put
(
FIELD_MAT_ID
,
StringUtils
.
toString
(
matId
,
eiMetadata
.
getMeta
(
FIELD_MAT_ID
)));
map
.
put
(
FIELD_MAT_DETAIL_ID
,
StringUtils
.
toString
(
matDetailId
,
eiMetadata
.
getMeta
(
FIELD_MAT_DETAIL_ID
)));
map
.
put
(
FIELD_DATA_SOURCE
,
StringUtils
.
toString
(
dataSource
,
eiMetadata
.
getMeta
(
FIELD_DATA_SOURCE
)));
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008B.java
View file @
de5887cb
...
@@ -117,7 +117,7 @@ public class ServiceHGKC008B extends ServiceBase {
...
@@ -117,7 +117,7 @@ public class ServiceHGKC008B extends ServiceBase {
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
/**
* 确认数量
* 确认数量
*
*
...
@@ -149,10 +149,11 @@ public class ServiceHGKC008B extends ServiceBase {
...
@@ -149,10 +149,11 @@ public class ServiceHGKC008B extends ServiceBase {
newKc008A
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc008A
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc008A
.
setAccountCode
(
""
);
newKc008A
.
setAccountCode
(
""
);
newKc008A
.
setDepCode
(
""
);
newKc008A
.
setDepCode
(
""
);
newKc008A
.
setDataSource
(
HGConstant
.
ReceiveDataSource
.
S1
);
DaoUtils
.
insert
(
HGKC008A
.
INSERT
,
newKc008A
);
DaoUtils
.
insert
(
HGKC008A
.
INSERT
,
newKc008A
);
}
}
}
}
/**
/**
* 数据校验
* 数据校验
*
*
...
@@ -187,5 +188,5 @@ public class ServiceHGKC008B extends ServiceBase {
...
@@ -187,5 +188,5 @@ public class ServiceHGKC008B extends ServiceBase {
}
}
}
}
}
}
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008D.java
0 → 100644
View file @
de5887cb
package
com
.
baosight
.
hggp
.
hg
.
kc
.
service
;
import
com.baosight.hggp.aspect.annotation.OperationLogAnnotation
;
import
com.baosight.hggp.common.DdynamicEnum
;
import
com.baosight.hggp.common.InventTypeDetailEnum
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.constant.HgKcConst
;
import
com.baosight.hggp.hg.kc.domain.HGKC008
;
import
com.baosight.hggp.hg.kc.domain.HGKC008A
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.util.HgScUtils
;
import
com.baosight.hggp.hg.xs.domain.Company
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.contants.ACConstants
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
org.apache.commons.collections.CollectionUtils
;
import
java.math.BigDecimal
;
import
java.util.*
;
import
java.util.stream.Collectors
;
/**
* @author:songx
* @date:2024/5/9,11:04
*/
public
class
ServiceHGKC008D
extends
ServiceBase
{
/**
* 画面初始化
*
* @param inInfo
* @return
*/
@Override
@OperationLogAnnotation
(
operModul
=
"产品清单"
,
operType
=
"查询"
,
operDesc
=
"初始化"
)
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
map
=
new
HashMap
();
map
.
put
(
"inventTypeDetails"
,
InventTypeDetailEnum
.
getInentTypeTwo
());
map
.
put
(
HGKC008
.
FIELD_ACCOUNT_CODE
,
UserSessionUtils
.
getAccountCode
());
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
COMPANY_BOX_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BLOCK_ID
,
DdynamicEnum
.
PROJ_RECORD_BY_ROLE_BLOCK_ID
,
DdynamicEnum
.
WH_RECORD_BLOCK_ID
,
DdynamicEnum
.
USER_BLOCK_ID
,
DdynamicEnum
.
INVENT_TYPE_BLOCK_ID
),
map
,
false
);
EiInfoUtils
.
addBlock
(
inInfo
,
"roleCompany"
,
UserSessionUtils
.
getRoleCompany
(),
Company
.
class
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HGSC004A
().
eiMetadata
);
}
catch
(
Exception
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
);
inInfo
=
super
.
query
(
inInfo
,
HGSqlConstant
.
HGSC004A
.
QUERY_MATERIAL
,
new
HGSC004A
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 确认操作.
*
* @param inInfo
* @return
*/
@OperationLogAnnotation
(
operModul
=
"产品清单"
,
operType
=
"查询"
,
operDesc
=
"确认"
)
public
EiInfo
confirm
(
EiInfo
inInfo
)
{
try
{
String
receiveId
=
inInfo
.
getCellStr
(
EiConstant
.
queryBlock
,
ACConstants
.
ROW_CODE_0
,
HGKC008A
.
FIELD_RECEIVE_ID
);
List
<
HGSC004A
>
hgsc004as
=
MapUtils
.
toDaoEPBases
(
inInfo
,
HGSC004A
.
class
);
// db数据
Map
<
Long
,
HGSC004A
>
dbSc004aMap
=
HgScUtils
.
HgSc004A
.
lockGetDataEp
(
hgsc004as
);
// 领料明细
List
<
HGKC008A
>
dbKc008As
=
HGKCUtils
.
HgKc008A
.
listByPrimaryId
(
receiveId
);
// 领料主信息
HGKC008
hgkc008
=
HGKCUtils
.
HgKc008
.
get
(
receiveId
);
List
<
String
>
inventCodes
=
new
LinkedList
<>();
dbSc004aMap
.
forEach
((
k
,
v
)
->{
inventCodes
.
add
(
v
.
getProductCode
());
});
// 实时库存数据
List
<
HGKC010
>
dbKc010s
=
HGKCTools
.
HgKc010
.
getListByBussiness
(
hgkc008
.
getCompanyCode
(),
hgkc008
.
getWhCode
(),
inventCodes
);
// 数据校验
this
.
checkConfirmData
(
hgsc004as
,
dbKc008As
,
dbSc004aMap
,
hgkc008
,
dbKc010s
);
// 保存数据
this
.
confirmData
(
hgsc004as
,
dbKc010s
,
hgkc008
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
hgsc004as
.
size
()
+
"]条数据保存成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"保存失败"
);
}
return
inInfo
;
}
/**
* 确认数量
*
* @param hgsc004As
* @param dbKc010s
* @param dbKc008
*/
private
void
confirmData
(
List
<
HGSC004A
>
hgsc004As
,
List
<
HGKC010
>
dbKc010s
,
HGKC008
dbKc008
)
{
for
(
HGSC004A
hgsc004A
:
hgsc004As
)
{
HGKC010
dbKc010
=
dbKc010s
.
stream
().
filter
(
o
->
o
.
getInventCode
().
equals
(
hgsc004A
.
getProductCode
())).
findAny
().
orElse
(
null
);
HGKC008A
newKc008A
=
BeanUtils
.
copy
(
dbKc010
,
HGKC008A
.
class
);
newKc008A
.
setApplyCode
(
dbKc008
.
getApplyCode
());
newKc008A
.
setApplyLineCode
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
SC_APPLY_LINE_CODE
,
new
String
[]{
dbKc008
.
getApplyCode
()}));
newKc008A
.
setProjCode
(
dbKc008
.
getProjCode
());
newKc008A
.
setProjName
(
dbKc008
.
getProjName
());
newKc008A
.
setCompanyCode
(
dbKc008
.
getCompanyCode
());
newKc008A
.
setCompanyName
(
dbKc008
.
getCompanyName
());
newKc008A
.
setReceiveId
(
dbKc008
.
getId
());
newKc008A
.
setInvId
(
dbKc010
.
getId
());
newKc008A
.
setInvQty
(
hgsc004A
.
getApplyQty
());
newKc008A
.
setInvWeight
(
hgsc004A
.
getApplyQty
().
multiply
(
dbKc010
.
getInvUnitWeight
()));
newKc008A
.
setInvWidth
(
dbKc010
.
getWidth
());
newKc008A
.
setInvLength
(
dbKc010
.
getLength
());
newKc008A
.
setInvThick
(
dbKc010
.
getThick
());
newKc008A
.
setInvSpec
(
dbKc010
.
getSpec
());
newKc008A
.
setInvSpecId
(
dbKc010
.
getSpecId
());
newKc008A
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc008A
.
setAccountCode
(
""
);
newKc008A
.
setDepCode
(
""
);
newKc008A
.
setMatId
(
hgsc004A
.
getMaterialId
());
newKc008A
.
setMatDetailId
(
hgsc004A
.
getId
());
newKc008A
.
setDataSource
(
HGConstant
.
ReceiveDataSource
.
S2
);
DaoUtils
.
insert
(
HGKC008A
.
INSERT
,
newKc008A
);
}
}
/**
* 数据校验
*
* @param sc004As
* @param dbKc008As
* @param dbSc004Map
* @param dbKc008
*/
private
void
checkConfirmData
(
List
<
HGSC004A
>
sc004As
,
List
<
HGKC008A
>
dbKc008As
,
Map
<
Long
,
HGSC004A
>
dbSc004Map
,
HGKC008
dbKc008
,
List
<
HGKC010
>
dbKc010s
)
{
AssertUtils
.
isEquals
(
dbKc008
.
getStatus
(),
HGConstant
.
ProductStatus
.
YTJ
,
"领料单已提交,不可修改"
);
for
(
HGSC004A
sc004A
:
sc004As
)
{
HGKC010
hgkc010
=
dbKc010s
.
stream
().
filter
(
o
->
o
.
getInventCode
().
equals
(
sc004A
.
getProductCode
())).
findAny
().
orElse
(
null
);
AssertUtils
.
isNull
(
hgkc010
,
String
.
format
(
"库存【%s】不存在"
,
sc004A
.
getProductCode
()));
AssertUtils
.
isGe
(
BigDecimal
.
ZERO
,
sc004A
.
getApplyQty
(),
String
.
format
(
"库存【%s】申请数量必须大于0"
,
sc004A
.
getProductCode
()));
// 查询已申请未提交的领料数量
List
<
HGKC008A
>
qtyKc008As
=
HGKCTools
.
HgKc008A
.
listByInv
(
hgkc010
.
getCompanyCode
(),
hgkc010
.
getWhCode
(),
hgkc010
.
getInventCode
());
BigDecimal
applyQtySum
=
CollectionUtils
.
isEmpty
(
qtyKc008As
)
?
BigDecimal
.
ZERO
:
qtyKc008As
.
stream
().
filter
(
item
->
HgKcConst
.
HgKc008
.
Status
.
S0
.
equals
(
item
.
getStatus
()))
.
map
(
HGKC008A:
:
getInvQty
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
totalApplyQty
=
applyQtySum
.
add
(
sc004A
.
getApplyQty
());
AssertUtils
.
isGt
(
totalApplyQty
,
hgkc010
.
getInvQty
(),
String
.
format
(
"存货【%s(%s)】累计申请数量【%s】超过库存数量【%s】"
,
hgkc010
.
getInventCode
(),
hgkc010
.
getInventName
(),
totalApplyQty
.
stripTrailingZeros
().
toPlainString
(),
hgkc010
.
getInvQty
()));
HGKC008A
hgkc008a
=
dbKc008As
.
stream
().
filter
(
o
->
o
.
getMatDetailId
().
intValue
()
==
sc004A
.
getId
().
intValue
()).
findAny
().
orElse
(
null
);
AssertUtils
.
isNotNull
(
hgkc008a
,
String
.
format
(
"此领料单已选择存货:%s"
,
sc004A
.
getProductCode
()));
}
}
}
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008.xml
View file @
de5887cb
...
@@ -24,7 +24,8 @@
...
@@ -24,7 +24,8 @@
PROJ_NAME as "projName",
<!-- 项目名称 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
RECEIVE_TYPE as "receiveType",
<!-- 领料单类型 0:正常,1:退库 -->
RECEIVE_TYPE as "receiveType",
<!-- 领料单类型 0:正常,1:退库 -->
RECEIVE_USER_ID as "receiveUserId",
<!-- 领料人ID -->
RECEIVE_USER_ID as "receiveUserId",
<!-- 领料人ID -->
RECEIVE_USER_NAME as "receiveUserName"
<!-- 领料人姓名 -->
RECEIVE_USER_NAME as "receiveUserName",
<!-- 领料人姓名 -->
DATA_SOURCE as "dataSource"
<!-- 数据来源 1存货 2产品清单 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -87,6 +88,9 @@
...
@@ -87,6 +88,9 @@
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
PROJ_NAME like ('%$projName$%')
PROJ_NAME like ('%$projName$%')
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dataSource"
>
DATA_SOURCE = #dataSource#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<sql
id=
"customCondition"
>
...
@@ -154,11 +158,12 @@
...
@@ -154,11 +158,12 @@
STATUS,
<!-- 状态 0未提交,1已提交 -->
STATUS,
<!-- 状态 0未提交,1已提交 -->
RECEIVE_TYPE,
<!-- 领料单类型 0:正常,1:退库 -->
RECEIVE_TYPE,
<!-- 领料单类型 0:正常,1:退库 -->
RECEIVE_USER_ID,
RECEIVE_USER_ID,
RECEIVE_USER_NAME
RECEIVE_USER_NAME,
DATA_SOURCE
) VALUES (
) VALUES (
#projCode#, #projName#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#projCode#, #projName#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #receiptDate#,
#deleteFlag#, #companyCode#, #companyName#, #receiptDate#,
#applyCode#, #whCode#, #whName#, #status#, #receiveType#, #receiveUserId#, #receiveUserName#)
#applyCode#, #whCode#, #whName#, #status#, #receiveType#, #receiveUserId#, #receiveUserName#
, #dataSource#
)
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
<selectKey
resultClass=
"long"
keyProperty=
"id"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC008
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC008
</selectKey>
</selectKey>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC008A.xml
View file @
de5887cb
...
@@ -39,7 +39,10 @@
...
@@ -39,7 +39,10 @@
AMOUNT as "amount",
<!-- 金额 -->
AMOUNT as "amount",
<!-- 金额 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型大类 -->
QUALITY_NO as "qualityNo",
<!-- 质检单号 -->
QUALITY_NO as "qualityNo",
<!-- 质检单号 -->
INV_ID as "invId"
<!-- 库存ID -->
INV_ID as "invId",
<!-- 库存ID -->
MAT_ID as "matId",
<!-- 物料清单ID -->
MAT_DETAIL_ID as "matDetailId",
<!-- 物料清单明细ID -->
DATA_SOURCE as "dataSource"
<!-- 数据来源 1存货 2产品清单 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -130,6 +133,16 @@
...
@@ -130,6 +133,16 @@
<isNotEmpty
prepend=
" AND "
property=
"invId"
>
<isNotEmpty
prepend=
" AND "
property=
"invId"
>
INV_ID = #invId#
INV_ID = #invId#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"matId"
>
MAT_ID = #matId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"matDetailId"
>
MAT_DETAIL_ID = #matDetailId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"dataSource"
>
DATA_SOURCE = #dataSource#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"idCondition"
>
<sql
id=
"idCondition"
>
...
@@ -236,12 +249,15 @@
...
@@ -236,12 +249,15 @@
AMOUNT,
<!-- 金额 -->
AMOUNT,
<!-- 金额 -->
INVENT_TYPE_DETAIL,
INVENT_TYPE_DETAIL,
QUALITY_NO,
QUALITY_NO,
INV_ID
INV_ID,
MAT_ID,
MAT_DETAIL_ID,
DATA_SOURCE
) VALUES (#accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#,
) VALUES (#accountCode#,#projCode#, #projName#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #status#, #applyLineCode#, #applyCode#, #receiveId#, #companyCode#, #companyName#, #whCode#,
#deleteFlag#, #status#, #applyLineCode#, #applyCode#, #receiveId#, #companyCode#, #companyName#, #whCode#,
#whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpecId#,#invSpec#, #invLength#,
#whName#, #inventRecordId#, #inventType#, #inventCode#, #inventName#, #invSpecId#,#invSpec#, #invLength#,
#invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#, #inventTypeDetail#,
#invWidth#, #invThick#, #invQty#, #invUnitWeight#, #invWeight#, #price#, #amount#, #inventTypeDetail#,
#qualityNo#, #invId#)
#qualityNo#, #invId#
, #matId#, #matDetailId#, #dataSource#
)
</insert>
</insert>
<delete
id=
"delete"
>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hggp/hg/sc/domain/HGSC004A.java
View file @
de5887cb
...
@@ -66,6 +66,7 @@ public class HGSC004A extends DaoEPBase {
...
@@ -66,6 +66,7 @@ public class HGSC004A extends DaoEPBase {
public
static
final
String
FIELD_invent_source
=
"inventSource"
;
/* 物料来源 1加工 2外购*/
public
static
final
String
FIELD_invent_source
=
"inventSource"
;
/* 物料来源 1加工 2外购*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_id
=
"id"
;
/* 主键*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码(预留)*/
public
static
final
String
COL_company_code
=
"company_code"
;
/* 公司编码(预留)*/
public
static
final
String
COL_company_name
=
"company_name"
;
/* 公司名称(预留)*/
public
static
final
String
COL_company_name
=
"company_name"
;
/* 公司名称(预留)*/
...
@@ -176,6 +177,11 @@ public class HGSC004A extends DaoEPBase {
...
@@ -176,6 +177,11 @@ public class HGSC004A extends DaoEPBase {
private
String
projCodePrefix
=
" "
;
/*项目前缀*/
private
String
projCodePrefix
=
" "
;
/*项目前缀*/
@ExcelAnno
(
index
=
15
)
@ExcelAnno
(
index
=
15
)
private
String
projNamePrefix
=
" "
;
private
String
projNamePrefix
=
" "
;
//生产领料申请
public
static
final
String
FIELD_APPLY_QTY
=
"applyQty"
;
/* 申请数量*/
public
static
final
String
COL_APPLY_QTY
=
"APPLY_QTY"
;
/* 申请数量*/
private
BigDecimal
applyQty
=
new
BigDecimal
(
0.000
);
/* 申请数量*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -407,6 +413,13 @@ public class HGSC004A extends DaoEPBase {
...
@@ -407,6 +413,13 @@ public class HGSC004A extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_invent_source
);
eiColumn
=
new
EiColumn
(
FIELD_invent_source
);
eiColumn
.
setDescName
(
"物料来源 1加工 2外购"
);
eiColumn
.
setDescName
(
"物料来源 1加工 2外购"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_APPLY_QTY
);
eiColumn
.
setType
(
"N"
);
eiColumn
.
setScaleLength
(
0
);
eiColumn
.
setFieldLength
(
15
);
eiColumn
.
setDescName
(
"申请数量"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -973,7 +986,13 @@ public class HGSC004A extends DaoEPBase {
...
@@ -973,7 +986,13 @@ public class HGSC004A extends DaoEPBase {
public
void
setInventSource
(
Integer
inventSource
)
{
public
void
setInventSource
(
Integer
inventSource
)
{
this
.
inventSource
=
inventSource
;
this
.
inventSource
=
inventSource
;
}
}
public
BigDecimal
getApplyQty
()
{
return
applyQty
;
}
public
void
setApplyQty
(
BigDecimal
applyQty
)
{
this
.
applyQty
=
applyQty
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -1023,6 +1042,8 @@ public class HGSC004A extends DaoEPBase {
...
@@ -1023,6 +1042,8 @@ public class HGSC004A extends DaoEPBase {
setProjCodePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_code_prefix
)),
projCodePrefix
));
setProjCodePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_code_prefix
)),
projCodePrefix
));
setProjNamePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name_prefix
)),
projNamePrefix
));
setProjNamePrefix
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_proj_name_prefix
)),
projNamePrefix
));
setInventSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_invent_source
)),
inventSource
));
setInventSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_invent_source
)),
inventSource
));
setApplyQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_APPLY_QTY
)),
applyQty
));
}
}
/**
/**
...
@@ -1073,6 +1094,8 @@ public class HGSC004A extends DaoEPBase {
...
@@ -1073,6 +1094,8 @@ public class HGSC004A extends DaoEPBase {
map
.
put
(
FIELD_proj_code_prefix
,
StringUtils
.
toString
(
projCodePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_code_prefix
)));
map
.
put
(
FIELD_proj_code_prefix
,
StringUtils
.
toString
(
projCodePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_code_prefix
)));
map
.
put
(
FIELD_proj_name_prefix
,
StringUtils
.
toString
(
projNamePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_name_prefix
)));
map
.
put
(
FIELD_proj_name_prefix
,
StringUtils
.
toString
(
projNamePrefix
,
eiMetadata
.
getMeta
(
FIELD_proj_name_prefix
)));
map
.
put
(
FIELD_invent_source
,
StringUtils
.
toString
(
inventSource
,
eiMetadata
.
getMeta
(
FIELD_invent_source
)));
map
.
put
(
FIELD_invent_source
,
StringUtils
.
toString
(
inventSource
,
eiMetadata
.
getMeta
(
FIELD_invent_source
)));
map
.
put
(
FIELD_APPLY_QTY
,
StringUtils
.
toString
(
applyQty
,
eiMetadata
.
getMeta
(
FIELD_APPLY_QTY
)));
return
map
;
return
map
;
}
}
}
}
src/main/java/com/baosight/hggp/hg/sc/sql/HGSC004A.xml
View file @
de5887cb
...
@@ -164,6 +164,15 @@
...
@@ -164,6 +164,15 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"idCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
ID IN
<iterate
open=
"("
close=
")"
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
SELECT
SELECT
...
@@ -518,6 +527,98 @@
...
@@ -518,6 +527,98 @@
</update>
</update>
<select
id=
"queryMaterial"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hggp.hg.sc.domain.HGSC004A"
>
SELECT
a.id as "id",
<!-- 主键 -->
a.company_code as "companyCode",
<!-- 公司编码(预留) -->
a.company_name as "companyName",
<!-- 公司名称(预留) -->
a.dep_code as "depCode",
<!-- 部门编号(预留) -->
a.dep_name as "depName",
<!-- 部门名称(预留) -->
a.proj_code as "projCode",
<!-- 项目编码(预留) -->
a.proj_name as "projName",
<!-- 项目名称(预留) -->
a.parent_prod_code as "parentProdCode",
<!-- 父节点-产品编码 -->
a.parent_prod_name as "parentProdName",
<!-- 父节点-产品名称 -->
a.material_id as "materialId",
<!-- 物料清单id -->
a.product_id as "productId",
<!-- 产品id -->
a.product_type as "productType",
<!-- 产品类别 -->
a.product_code as "productCode",
<!-- 产品编号 -->
a.product_name as "productName",
<!-- 产品名称 -->
a.invent_type as "inventType",
<!-- 档案类型 -->
a.invent_source as "inventSource",
<!-- 物料来源 1加工 2外购 -->
a.spec as "spec",
a.length as "length",
<!-- 长 -->
a.width as "width",
<!-- 宽 -->
a.thick as "thick",
<!-- 厚 -->
a.product_status as "productStatus",
<!-- 产品状态 0:未提交,1:已提交 -->
a.change_type as "changeType",
<!-- 变更类型:默认0,1:增加,2:替换,3:删除 -->
a.quantity as "quantity",
<!-- 数量 -->
a.single_weight as "singleWeight",
<!-- 单重 -->
a.total_weight as "totalWeight",
<!-- 总重 -->
a.approval_status as "approvalStatus",
<!-- 审批状态 0:待审;1:审核中;2:已审 -->
a.leaf as "leaf",
<!-- 是否有叶子节点 -->
a.sort as "sort",
<!-- 排序字段 -->
a.lv as "lv",
<!-- 层级 -->
a.account_code as "accountCode",
<!-- 帐套 -->
a.created_by as "createdBy",
<!-- 创建人 -->
a.created_name as "createdName",
<!-- 创建人名称 -->
a.created_time as "createdTime",
<!-- 创建时间 -->
a.updated_by as "updatedBy",
<!-- 更新人 -->
a.updated_name as "updatedName",
<!-- 修改人名称 -->
a.updated_time as "updatedTime"
<!-- 更新时间 -->
FROM ${hggpSchema}.HGSC004A a
left join ${hggpSchema}.HGSC004 b on a.material_id = b.id
WHERE 1=1
and a.lv NOT IN (1,2)
and b.material_status = 2
<isNotEmpty
prepend=
" AND "
property=
"projName"
>
a.proj_name like CONCAT('%', #projName#, '%')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"projCode"
>
a.proj_code = #projCode#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"companyCode"
>
a.company_code = #companyCode#
</isNotEmpty>
<!-- 材料名称查询 -->
<isNotEmpty
prepend=
" AND "
property=
"materialName"
>
(a.lv = 4
and a.product_name like CONCAT('%', #materialName#, '%')
)
</isNotEmpty>
<!-- 产品名称查询 -->
<isNotEmpty
prepend=
" AND "
property=
"productName"
>
(a.lv = 3
and a.product_name like CONCAT('%', #productName#, '%')
)
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
a.id = #id#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"ids"
>
a.id IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"ids"
>
#ids[]#
</iterate>
</isNotEmpty>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
</dynamic>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
a.CREATED_TIME desc
</isEmpty>
</dynamic>
</select>
<!-- 锁 -->
<update
id=
"locks"
>
UPDATE ${hggpSchema}.HGSC004A
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<include
refid=
"idCondition"
/>
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/sc/tools/HGSCTools.java
View file @
de5887cb
...
@@ -399,6 +399,46 @@ public class HGSCTools {
...
@@ -399,6 +399,46 @@ public class HGSCTools {
}
}
public
static
class
THGSC004A
{
public
static
class
THGSC004A
{
/**
* 锁
*
* @param ids
* @return
*/
public
static
void
lock
(
List
<
Long
>
ids
)
{
if
(
CollectionUtils
.
isEmpty
(
ids
))
{
return
;
}
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HGSC004A
.
LOCKS
,
paramMap
);
}
/**
* 查询
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HGSC004A
>
map
(
List
<
Long
>
ids
)
{
List
<
HGSC004A
>
results
=
list
(
ids
);
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGSC004A:
:
getId
,
item
->
item
));
}
/**
* 查询
*
* @param ids
* @return
*/
public
static
List
<
HGSC004A
>
list
(
List
<
Long
>
ids
)
{
AssertUtils
.
isEmpty
(
ids
,
"物料ID不能为空"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"ids"
,
ids
);
return
DaoBase
.
getInstance
().
query
(
HGSC004A
.
QUERY
,
paramMap
);
}
public
static
void
checkFatherSubmitStatus
(
Long
matId
)
{
public
static
void
checkFatherSubmitStatus
(
Long
matId
)
{
HGSC005
hgsc005
=
THGSC005
.
queryByMatId
(
matId
);
HGSC005
hgsc005
=
THGSC005
.
queryByMatId
(
matId
);
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
AssertUtils
.
isTrue
(
hgsc005
.
getCommitStatus
().
compareTo
(
CommonConstant
.
YesNo
.
NO_0
)==
1
,
"生产计划已提交,不能操作!"
);
...
...
src/main/java/com/baosight/hggp/hg/sc/util/HgScUtils.java
View file @
de5887cb
...
@@ -4,7 +4,10 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -4,7 +4,10 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.core.security.UserSessionUtils
;
import
com.baosight.hggp.hg.kc.domain.HGKC010
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.constant.HgScSqlConstant
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC007
;
import
com.baosight.hggp.hg.sc.domain.HGSC007B
;
import
com.baosight.hggp.hg.sc.domain.HGSC007B
;
import
com.baosight.hggp.hg.sc.domain.HGSC010A
;
import
com.baosight.hggp.hg.sc.domain.HGSC010A
;
...
@@ -29,11 +32,40 @@ import java.util.stream.Collectors;
...
@@ -29,11 +32,40 @@ import java.util.stream.Collectors;
public
class
HgScUtils
{
public
class
HgScUtils
{
/**
/**
* @author:jhs
* @date:2024/10/27,16:17
*/
public
static
class
HgSc004A
{
/**
* 锁并且获取数据
*
* @param sc004a
* @return
*/
public
static
Map
<
Long
,
HGSC004A
>
lockGetDataEp
(
List
<?
extends
HGSC004A
>
sc004a
)
{
return
lockGetData
(
ObjectUtils
.
listEpKey
(
sc004a
,
HGSC004A
.
FIELD_id
));
}
/**
* 锁并且获取数据
*
* @param ids
* @return
*/
public
static
Map
<
Long
,
HGSC004A
>
lockGetData
(
List
<
Long
>
ids
)
{
// 锁
HGSCTools
.
THGSC004A
.
lock
(
ids
);
// db数据
return
HGSCTools
.
THGSC004A
.
map
(
ids
);
}
}
/**
* @author:songx
* @author:songx
* @date:2024/8/22,16:17
* @date:2024/8/22,16:17
*/
*/
public
static
class
HgSc007
{
public
static
class
HgSc007
{
/**
/**
* 设置组织机构查询条件
* 设置组织机构查询条件
*
*
...
@@ -65,7 +97,7 @@ public class HgScUtils {
...
@@ -65,7 +97,7 @@ public class HgScUtils {
queryMap
.
put
(
"enableRoleAuth"
,
CommonConstant
.
YesNo
.
NO_0
);
queryMap
.
put
(
"enableRoleAuth"
,
CommonConstant
.
YesNo
.
NO_0
);
}
}
}
}
/**
/**
* HGSC007B 定义
* HGSC007B 定义
*
*
...
@@ -73,7 +105,7 @@ public class HgScUtils {
...
@@ -73,7 +105,7 @@ public class HgScUtils {
* @date:2024/9/14,14:35
* @date:2024/9/14,14:35
*/
*/
public
static
class
HgSc007B
{
public
static
class
HgSc007B
{
/**
/**
* 新增组人员
* 新增组人员
*
*
...
@@ -94,7 +126,7 @@ public class HgScUtils {
...
@@ -94,7 +126,7 @@ public class HgScUtils {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
DaoUtils
.
batchInsert
(
HgScSqlConstant
.
HgSc007B
.
BATCH_INSERT
,
newSc007Bs
);
DaoUtils
.
batchInsert
(
HgScSqlConstant
.
HgSc007B
.
BATCH_INSERT
,
newSc007Bs
);
}
}
/**
/**
* 更新组人员
* 更新组人员
*
*
...
@@ -117,15 +149,15 @@ public class HgScUtils {
...
@@ -117,15 +149,15 @@ public class HgScUtils {
}).
collect
(
Collectors
.
toList
());
}).
collect
(
Collectors
.
toList
());
DaoUtils
.
batchInsert
(
HgScSqlConstant
.
HgSc007B
.
BATCH_INSERT
,
newSc007Bs
);
DaoUtils
.
batchInsert
(
HgScSqlConstant
.
HgSc007B
.
BATCH_INSERT
,
newSc007Bs
);
}
}
}
}
/**
/**
* @author:songx
* @author:songx
* @date:2024/8/22,16:17
* @date:2024/8/22,16:17
*/
*/
public
static
class
HgSc010A
{
public
static
class
HgSc010A
{
/**
/**
* 锁并获取数据
* 锁并获取数据
*
*
...
...
src/main/webapp/HG/KC/HGKC008.jsp
View file @
de5887cb
...
@@ -47,6 +47,9 @@
...
@@ -47,6 +47,9 @@
<EF:EFComboColumn
cname=
"类型"
ename=
"receiveType"
width=
"80"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFComboColumn
cname=
"类型"
ename=
"receiveType"
width=
"80"
align=
"center"
required=
"false"
enable=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.receiveType"
/>
<EF:EFCodeOption
codeName=
"hggp.receiveType"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFComboColumn
cname=
"领料来源"
ename=
"dataSource"
width=
"80"
align=
"center"
required=
"true"
enable=
"true"
>
<EF:EFCodeOption
codeName=
"hggp.receiveDataSource"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
textField=
"textField"
valueField=
"valueField"
...
...
src/main/webapp/HG/KC/HGKC008A.js
View file @
de5887cb
...
@@ -5,6 +5,7 @@ $(function (){
...
@@ -5,6 +5,7 @@ $(function (){
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
".row"
).
children
().
attr
(
"class"
,
"col-md-3"
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
var
receiveDataSource
=
$
(
"#main-0-dataSource"
).
val
();
/* 页面查询框的尺寸设置 */
/* 页面查询框的尺寸设置 */
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
$
.
extend
(
true
,
IPLATUI
.
Config
,
{
EFGrid
:
{
EFGrid
:
{
...
@@ -18,6 +19,13 @@ $(function (){
...
@@ -18,6 +19,13 @@ $(function (){
pageSize
:
10
,
pageSize
:
10
,
pageSizes
:
[
10
,
20
,
50
,
100
],
pageSizes
:
[
10
,
20
,
50
,
100
],
},
},
toolbarConfig
:
{
// hidden: false, // true时,不显示功能按钮,但保留setting导出按钮
add
:
receiveDataSource
===
2
?
false
:
true
,
// 不显示新增按钮
add
:
receiveDataSource
===
2
?
false
:
true
,
// 不显示取消按钮
save
:
receiveDataSource
===
2
?
false
:
true
// 不显示保存按钮
// delete: false, // 显示删除按钮
},
beforeEdit
:
function
(
e
)
{
beforeEdit
:
function
(
e
)
{
var
status
=
$
(
"#inqu_status-0-status"
).
val
();
var
status
=
$
(
"#inqu_status-0-status"
).
val
();
//如果提交了,则不能修改
//如果提交了,则不能修改
...
@@ -137,8 +145,12 @@ $(function (){
...
@@ -137,8 +145,12 @@ $(function (){
},
},
}
}
}
}
// 选择合同
// 选择合同
$
(
"#SELECT_INVENT"
).
on
(
"click"
,
selectInvent
);
$
(
"#SELECT_INVENT"
).
on
(
"click"
,
selectInvent
);
// 选择产品清单
$
(
"#SELECT_MBOM"
).
on
(
"click"
,
selectMbom
);
downKeyUp
();
downKeyUp
();
})
})
...
@@ -148,17 +160,27 @@ $(function (){
...
@@ -148,17 +160,27 @@ $(function (){
* 页面加载时执行
* 页面加载时执行
*/
*/
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 按钮显示
let
status
=
$
(
"#main-0-status"
).
val
();
//如果提交了,则不能修改
if
(
isBlank
(
status
)
||
status
!=
"0"
)
{
$
(
'#add'
).
hide
();
$
(
'#save-changes'
).
hide
();
$
(
'#cancel-changes'
).
hide
();
$
(
'#delete'
).
hide
();
}
let
receiveDataSource
=
$
(
"#main-0-dataSource"
).
val
();
//选择产品时
if
(
receiveDataSource
==
2
){
$
(
"#SELECT_INVENT"
).
hide
();
$
(
'#add'
).
hide
();
$
(
'#save-changes'
).
hide
();
$
(
'#cancel-changes'
).
hide
();
}
else
{
$
(
"#SELECT_MBOM"
).
hide
();
}
// 查询
// 查询
query
();
query
();
// 按钮显示
let
status
=
$
(
"#main-0-status"
).
val
();
//如果提交了,则不能修改
if
(
isBlank
(
status
)
||
status
!=
"0"
)
{
$
(
'#add'
).
hide
();
$
(
'#save-changes'
).
hide
();
$
(
'#cancel-changes'
).
hide
();
$
(
'#delete'
).
hide
();
}
});
});
/**
/**
...
@@ -240,6 +262,29 @@ let selectInvent = function () {
...
@@ -240,6 +262,29 @@ let selectInvent = function () {
}
}
/**
/**
* 选择
*/
let
selectMbom
=
function
()
{
let
params
=
{
"inqu_status-0-receiveId"
:
$
(
"#inqu_status-0-receiveId"
).
val
(),
"inqu_status-0-companyCode"
:
$
(
"#main-0-companyCode"
).
val
(),
"inqu_status-0-whCode"
:
$
(
"#main-0-whCode"
).
val
(),
"inqu_status-0-whName"
:
$
(
"#main-0-whName"
).
val
(),
"inqu_status-0-companyName"
:
$
(
"#main-0-companyName"
).
val
(),
"inqu_status-0-projCode"
:
$
(
"#main-0-projCode"
).
val
(),
"inqu_status-0-projName"
:
$
(
"#main-0-projName"
).
val
()
}
JSColorbox
.
open
({
href
:
"HGKC008D"
,
title
:
"<div style='text-align: center;'>产品清单</div>"
,
width
:
"90%"
,
height
:
"90%"
,
params
:
params
,
callbackName
:
selectInventCallback
});
}
/**
* 选择回调
* 选择回调
*/
*/
let
selectInventCallback
=
function
()
{
let
selectInventCallback
=
function
()
{
...
...
src/main/webapp/HG/KC/HGKC008A.jsp
View file @
de5887cb
...
@@ -12,8 +12,13 @@
...
@@ -12,8 +12,13 @@
<EF:EFInput
ename=
"main-0-applyCode"
cname=
"领料单号"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-applyCode"
cname=
"领料单号"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-status"
cname=
"状态"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-status"
cname=
"状态"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-whCode"
cname=
"仓库编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-whCode"
cname=
"仓库编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-companyCode"
cname=
"公司编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-whName"
cname=
"仓库名称"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFInput
ename=
"main-0-companyCode"
cname=
"公司编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-companyName"
cname=
"公司名称"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-projCode"
cname=
"项目编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-projName"
cname=
"项目名称"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"main-0-dataSource"
cname=
"领料来源"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFInput
ename=
"inqu_status-0-applyCode"
cname=
"申请编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-applyCode"
cname=
"申请编码"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-receiveId"
cname=
"领料单id"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-receiveId"
cname=
"领料单id"
colWidth=
"3"
type=
"hidden"
/>
<div
class=
"row"
>
<div
class=
"row"
>
...
...
src/main/webapp/HG/KC/HGKC008D.js
0 → 100644
View file @
de5887cb
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
exportGrid
:
false
,
// 隐藏右侧自定义导出按钮
columns
:
[{
field
:
"whCode"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-whCode"
).
val
();
}
},
{
field
:
"whCode"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-whCode"
).
val
();
}
},
{
field
:
"whName"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-whName"
).
val
();
}
},
{
field
:
"companyCode"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-companyCode"
).
val
();
}
},
{
field
:
"companyName"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-companyName"
).
val
();
}
},
{
field
:
"projCode"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-projCode"
).
val
();
}
},
{
field
:
"projName"
,
template
:
function
(
dataItem
)
{
return
$
(
"#inqu_status-0-projName"
).
val
();
}
}
// {
// field: "productCode",
// template: function (dataItem) {
// let lv = dataItem.lv;
// let template = dataItem.productCode;
// if(lv == 4){
// template = dataItem.parentProdCode;
// }
// return template;
// }
// },
// {
// field: "productName",
// template: function (dataItem) {
// let lv = dataItem.lv;
// let template = dataItem.productName;
// if(lv == 4){
// template = dataItem.parentProdName;
// }
// return template;
// }
// },
// {
// field: "materialCode",
// template: function (dataItem) {
// let lv = dataItem.lv;
// let template = '';
// if(lv == 4){
// template = dataItem.productCode;
// }
// return template;
// }
// },
// {
// field: "materialtName",
// template: function (dataItem) {
// let lv = dataItem.lv;
// let template = '';
// if(lv == 4){
// template = dataItem.productName;
// }
// return template;
// }
// }
]
},
};
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 确认
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 查询
query
();
//存货编号查询条件
// initInventCode();
});
/**
* 查询
*/
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
// 点击查询按钮,从第1页开始查询
}
/**
* 选择
*/
let
confirm
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
applyQty
=
rows
[
i
][
'applyQty'
];
let
invQty
=
rows
[
i
][
'invQty'
];
if
(
!
isPositiveNumber
(
applyQty
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行申请数量必须大于0"
);
return
;
}
if
(
parseFloat
(
invQty
)
<
parseFloat
(
applyQty
))
{
message
(
"勾选的第"
+
(
i
+
1
)
+
"行申请数量不能大于库存数量"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选的["
+
rows
.
length
+
"]条数据进行
\"
生产领料
\"
操作吗? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HGKC008D"
,
"confirm"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
/**
* 存货编号
*/
let
initInventCode
=
function
()
{
//物料信息下拉
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
let
dataSource
;
var
input
=
$
(
"#inqu_status-0-inventCode"
);
dataSource
=
ei
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataSource
,
template
:
"[#:valueField#]#:textField#|#:param2Field#"
,
filter
:
"contains"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
src/main/webapp/HG/KC/HGKC008D.jsp
0 → 100644
View file @
de5887cb
<!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=
"查询条件"
>
<EF:EFInput
ename=
"inqu_status-0-companyCode"
cname=
"公司编号"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-companyName"
cname=
"公司编号"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-receiveId"
cname=
"领料单id"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-projCode"
cname=
"项目编号"
colWidth=
"3"
type=
"hidden"
/>
<EF:EFInput
ename=
"inqu_status-0-whName"
cname=
"仓库名称"
colWidth=
"3"
type=
"hidden"
/>
<div
class=
"row"
>
<EF:EFInput
cname=
"项目名称"
ename=
"projName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
readonly=
"true"
/>
<EF:EFInput
cname=
"仓库名称"
ename=
"whName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
readonly=
"true"
/>
<EF:EFInput
cname=
"材料名称"
ename=
"materialName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
<EF:EFInput
cname=
"成品名称"
ename=
"productName"
blockId=
"inqu_status"
row=
"0"
colWidth=
"3"
/>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projCode"
cname=
"项目编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"projName"
cname=
"项目名称"
enable=
"false"
width=
"130"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"whCode"
cname=
"仓库编号"
enable=
"false"
width=
"130"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"whName"
cname=
"仓库名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"100"
align=
"center"
blockName=
"invent_type_block_id"
textField=
"textField"
valueField=
"valueField"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"productCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"productName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<
%
--
<
EF:EFColumn
ename=
"productCode"
cname=
"成品编码"
enable=
"false"
width=
"100"
align=
"center"
/>
--%>
<
%
--
<
EF:EFColumn
ename=
"productName"
cname=
"成品名称"
enable=
"false"
width=
"100"
align=
"center"
/>
--%>
<
%
--
<
EF:EFColumn
ename=
"materialCode"
cname=
"材料编码"
enable=
"false"
width=
"100"
align=
"center"
/>
--%>
<
%
--
<
EF:EFColumn
ename=
"materialtName"
cname=
"材料名称"
enable=
"false"
width=
"100"
align=
"center"
/>
--%>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"applyQty"
cname=
"申请数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"quantity"
cname=
"数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWeight"
cname=
"重量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"material"
cname=
"材质"
enable=
"false"
width=
"80"
align=
"center"
/>
<EF:EFColumn
ename=
"length"
cname=
"长(MM)"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"width"
cname=
"宽(MM)"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"thick"
cname=
"厚(MM)"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
<EF:EFColumn
ename=
"updatedName"
cname=
"更新人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"updatedTime"
cname=
"更新时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
</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