Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hp-smart
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
platform
hp-smart
Commits
37ddf6e2
Commit
37ddf6e2
authored
Jan 25, 2024
by
宋祥
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.销售出库选择库存,删除红冲
parent
5c145c43
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
663 additions
and
268 deletions
+663
-268
InventTypeEnun.java
src/main/java/com/baosight/hpjx/common/InventTypeEnun.java
+2
-1
HPSqlConstant.java
...ain/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
+2
-0
HPKC002.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC002.java
+14
-14
HPKC004.java
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC004.java
+0
-0
ServiceHPKC002.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
+1
-1
ServiceHPKC004.java
.../java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004.java
+45
-77
ServiceHPKC004A.java
...java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004A.java
+137
-0
HPKC001.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
+19
-0
HPKC002.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
+25
-7
HPKC003.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC003.xml
+16
-1
HPKC004.xml
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC004.xml
+74
-25
HPKCTools.java
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
+44
-0
HPKC001.jsp
src/main/webapp/HP/KC/HPKC001.jsp
+11
-0
HPKC002.jsp
src/main/webapp/HP/KC/HPKC002.jsp
+33
-22
HPKC003.jsp
src/main/webapp/HP/KC/HPKC003.jsp
+19
-4
HPKC004.js
src/main/webapp/HP/KC/HPKC004.js
+33
-90
HPKC004.jsp
src/main/webapp/HP/KC/HPKC004.jsp
+48
-26
HPKC004A.js
src/main/webapp/HP/KC/HPKC004A.js
+78
-0
HPKC004A.jsp
src/main/webapp/HP/KC/HPKC004A.jsp
+58
-0
HPKC005.jsp
src/main/webapp/HP/KC/HPKC005.jsp
+3
-0
HPKC007.jsp
src/main/webapp/HP/KC/HPKC007.jsp
+1
-0
No files found.
src/main/java/com/baosight/hpjx/common/InventTypeEnun.java
View file @
37ddf6e2
...
@@ -16,7 +16,8 @@ public enum InventTypeEnun {
...
@@ -16,7 +16,8 @@ public enum InventTypeEnun {
CONSUMABLE
(
2
,
"耗材"
),
CONSUMABLE
(
2
,
"耗材"
),
SEMI_FINISHED_PRODUCT
(
3
,
"半成品"
),
SEMI_FINISHED_PRODUCT
(
3
,
"半成品"
),
FINISHED_PRODUCT
(
4
,
"产成品"
),
FINISHED_PRODUCT
(
4
,
"产成品"
),
WASTE
(
5
,
"废料"
);
WASTE
(
5
,
"废料"
),
OTHER
(
6
,
"其他"
);
private
Integer
code
;
private
Integer
code
;
...
...
src/main/java/com/baosight/hpjx/hp/constant/HPSqlConstant.java
View file @
37ddf6e2
...
@@ -54,6 +54,8 @@ public class HPSqlConstant {
...
@@ -54,6 +54,8 @@ public class HPSqlConstant {
// 统计
// 统计
public
static
final
String
STAT_DATE
=
"HPKC004.statDate"
;
public
static
final
String
STAT_DATE
=
"HPKC004.statDate"
;
// 锁
public
static
final
String
LOCK
=
"HPKC004.lock"
;
}
}
/**
/**
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC002.java
View file @
37ddf6e2
...
@@ -33,7 +33,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -33,7 +33,7 @@ public class HPKC002 extends DaoEPBase {
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_BY
=
"updatedBy"
;
/* 更新人*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 更新人名称*/
public
static
final
String
FIELD_UPDATED_NAME
=
"updatedName"
;
/* 更新人名称*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_UPDATED_TIME
=
"updatedTime"
;
/* 更新时间*/
public
static
final
String
FIELD_REQ_
CODE
=
"reqCode
"
;
/* 领料单号*/
public
static
final
String
FIELD_REQ_
NO
=
"reqNo
"
;
/* 领料单号*/
public
static
final
String
FIELD_RECEIPT_DATE
=
"receiptDate"
;
/* 单据日期*/
public
static
final
String
FIELD_RECEIPT_DATE
=
"receiptDate"
;
/* 单据日期*/
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"
;
/* 仓库名称*/
...
@@ -55,7 +55,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -55,7 +55,7 @@ public class HPKC002 extends DaoEPBase {
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_BY
=
"UPDATED_BY"
;
/* 更新人*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 更新人名称*/
public
static
final
String
COL_UPDATED_NAME
=
"UPDATED_NAME"
;
/* 更新人名称*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_UPDATED_TIME
=
"UPDATED_TIME"
;
/* 更新时间*/
public
static
final
String
COL_REQ_
CODE
=
"REQ_CODE
"
;
/* 领料单号*/
public
static
final
String
COL_REQ_
NO
=
"REQ_NO
"
;
/* 领料单号*/
public
static
final
String
COL_RECEIPT_DATE
=
"RECEIPT_DATE"
;
/* 单据日期*/
public
static
final
String
COL_RECEIPT_DATE
=
"RECEIPT_DATE"
;
/* 单据日期*/
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"
;
/* 仓库名称*/
...
@@ -83,7 +83,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -83,7 +83,7 @@ public class HPKC002 extends DaoEPBase {
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedBy
=
" "
;
/* 更新人*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedName
=
" "
;
/* 更新人名称*/
private
String
updatedTime
;
/* 更新时间*/
private
String
updatedTime
;
/* 更新时间*/
private
String
req
Code
=
" "
;
/* 领料单号*/
private
String
req
No
=
" "
;
/* 领料单号*/
private
String
receiptDate
;
/* 单据日期*/
private
String
receiptDate
;
/* 单据日期*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whCode
=
" "
;
/* 仓库编码*/
private
String
whName
=
" "
;
/* 仓库名称*/
private
String
whName
=
" "
;
/* 仓库名称*/
...
@@ -139,7 +139,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -139,7 +139,7 @@ public class HPKC002 extends DaoEPBase {
eiColumn
.
setDescName
(
"更新时间"
);
eiColumn
.
setDescName
(
"更新时间"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_REQ_
CODE
);
eiColumn
=
new
EiColumn
(
FIELD_REQ_
NO
);
eiColumn
.
setDescName
(
"领料单号"
);
eiColumn
.
setDescName
(
"领料单号"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
...
@@ -348,20 +348,20 @@ public class HPKC002 extends DaoEPBase {
...
@@ -348,20 +348,20 @@ public class HPKC002 extends DaoEPBase {
this
.
updatedTime
=
updatedTime
;
this
.
updatedTime
=
updatedTime
;
}
}
/**
/**
* get the req
Code
- 领料单号.
* get the req
No
- 领料单号.
* @return the req
Code
* @return the req
No
*/
*/
public
String
getReq
Code
()
{
public
String
getReq
No
()
{
return
this
.
req
Code
;
return
this
.
req
No
;
}
}
/**
/**
* set the req
Code
- 领料单号.
* set the req
No
- 领料单号.
*
*
* @param req
Code
- 领料单号
* @param req
No
- 领料单号
*/
*/
public
void
setReq
Code
(
String
reqCode
)
{
public
void
setReq
No
(
String
reqNo
)
{
this
.
req
Code
=
reqCode
;
this
.
req
No
=
reqNo
;
}
}
/**
/**
* get the receiptDate - 单据日期.
* get the receiptDate - 单据日期.
...
@@ -556,7 +556,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -556,7 +556,7 @@ public class HPKC002 extends DaoEPBase {
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedBy
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_BY
)),
updatedBy
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_NAME
)),
updatedName
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setReq
Code
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REQ_CODE
)),
reqCode
));
setReq
No
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_REQ_NO
)),
reqNo
));
setReceiptDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIPT_DATE
)),
receiptDate
));
setReceiptDate
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIPT_DATE
)),
receiptDate
));
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
));
...
@@ -586,7 +586,7 @@ public class HPKC002 extends DaoEPBase {
...
@@ -586,7 +586,7 @@ public class HPKC002 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_BY
,
StringUtils
.
toString
(
updatedBy
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_BY
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_NAME
,
StringUtils
.
toString
(
updatedName
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_NAME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_REQ_
CODE
,
StringUtils
.
toString
(
reqCode
,
eiMetadata
.
getMeta
(
FIELD_REQ_CODE
)));
map
.
put
(
FIELD_REQ_
NO
,
StringUtils
.
toString
(
reqNo
,
eiMetadata
.
getMeta
(
FIELD_REQ_NO
)));
map
.
put
(
FIELD_RECEIPT_DATE
,
StringUtils
.
toString
(
receiptDate
,
eiMetadata
.
getMeta
(
FIELD_RECEIPT_DATE
)));
map
.
put
(
FIELD_RECEIPT_DATE
,
StringUtils
.
toString
(
receiptDate
,
eiMetadata
.
getMeta
(
FIELD_RECEIPT_DATE
)));
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
)));
...
...
src/main/java/com/baosight/hpjx/hp/kc/domain/HPKC004.java
View file @
37ddf6e2
This diff is collapsed.
Click to expand it.
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC002.java
View file @
37ddf6e2
...
@@ -78,7 +78,7 @@ public class ServiceHPKC002 extends ServiceBase {
...
@@ -78,7 +78,7 @@ public class ServiceHPKC002 extends ServiceBase {
//存货类型
//存货类型
insertEntity
.
setInventType
(
InventTypeEnun
.
getNameByCode
(
insertEntity
.
getInventType
()));
insertEntity
.
setInventType
(
InventTypeEnun
.
getNameByCode
(
insertEntity
.
getInventType
()));
// 生成单据号
// 生成单据号
insertEntity
.
setReq
Code
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC002_NUMBER
));
insertEntity
.
setReq
No
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC002_NUMBER
));
dao
.
insert
(
"HPKC002.insert"
,
insertEntity
);
dao
.
insert
(
"HPKC002.insert"
,
insertEntity
);
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
...
...
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004.java
View file @
37ddf6e2
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
import
com.baosight.hpjx.hp.kc.domain.HPKC006
;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.hp.pz.tools.HPPZTools
;
import
com.baosight.hpjx.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.hpjx.util.StringUtil
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -21,11 +27,16 @@ import org.apache.commons.collections.MapUtils;
...
@@ -21,11 +27,16 @@ import org.apache.commons.collections.MapUtils;
import
java.util.*
;
import
java.util.*
;
/**
/**
* @author
YK
* @author
:songx
* @date
2024年01月09日 10:18
* @date
:2024/1/25,22:22
*/
*/
public
class
ServiceHPKC004
extends
ServiceBase
{
public
class
ServiceHPKC004
extends
ServiceBase
{
// 指定存货类型
private
static
final
Integer
[]
DEFAULT_INVENT_CODE
=
{
InventTypeEnun
.
MATERIAL
.
getCode
(),
InventTypeEnun
.
CONSUMABLE
.
getCode
(),
InventTypeEnun
.
SEMI_FINISHED_PRODUCT
.
getCode
(),
InventTypeEnun
.
FINISHED_PRODUCT
.
getCode
()};
/**
/**
* 画面初始化
* 画面初始化
*
*
...
@@ -34,8 +45,12 @@ public class ServiceHPKC004 extends ServiceBase {
...
@@ -34,8 +45,12 @@ public class ServiceHPKC004 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
);
Map
queryMap
=
new
HashMap
();
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
null
);
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC004
().
eiMetadata
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC004
().
eiMetadata
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
...
@@ -56,7 +71,8 @@ public class ServiceHPKC004 extends ServiceBase {
...
@@ -56,7 +71,8 @@ public class ServiceHPKC004 extends ServiceBase {
String
receiptDate
=
MapUtils
.
getString
(
queryRow
,
"receiptDate"
);
String
receiptDate
=
MapUtils
.
getString
(
queryRow
,
"receiptDate"
);
queryRow
.
put
(
"receiptDate"
,
StringUtil
.
removeSpecifiedCharacter
(
receiptDate
,
queryRow
.
put
(
"receiptDate"
,
StringUtil
.
removeSpecifiedCharacter
(
receiptDate
,
StringUtil
.
DEFAULT_CHARACTER_TO_BE_REMOVED
));
StringUtil
.
DEFAULT_CHARACTER_TO_BE_REMOVED
));
inInfo
=
super
.
query
(
inInfo
,
"HPKC004.query"
,
new
HPKC004
());
queryRow
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
inInfo
=
super
.
query
(
inInfo
,
HPKC004
.
QUERY
,
new
HPKC004
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
}
...
@@ -64,91 +80,43 @@ public class ServiceHPKC004 extends ServiceBase {
...
@@ -64,91 +80,43 @@ public class ServiceHPKC004 extends ServiceBase {
}
}
/**
/**
*
新增
操作
*
删除
操作
*
*
* @param inInfo
* @param inInfo
* @return
* @return
*/
*/
@Override
public
EiInfo
delete
(
EiInfo
inInfo
)
{
public
EiInfo
insert
(
EiInfo
inInfo
)
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
try
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 数据写入
// 销售单号
List
<
String
>
saleNos
=
ObjectUtils
.
listKey
(
resultRows
,
"saleNo"
);
// 锁记录
HPKCTools
.
lockKc004
(
saleNos
);
// 查询数据库记录
Map
<
String
,
HPKC004
>
mapKc004
=
HPKCTools
.
mapKc004
(
saleNos
);
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC004
fKc004
=
new
HPKC004
();
HPKC004
fKc004
=
new
HPKC004
();
fKc004
.
fromMap
(
resultRows
.
get
(
i
));
fKc004
.
fromMap
(
resultRows
.
get
(
i
));
fKc004
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc004
.
getReceiptDate
()));
DaoUtils
.
update
(
HPKC004
.
DELETE
,
fKc004
);
// 仓库名称
// 生成红冲记录
fKc004
.
setWhName
(
HPPZTools
.
getPz007ByCode
(
fKc004
.
getWhCode
()).
getWhName
());
HPKC004
dbKc004
=
mapKc004
.
get
(
fKc004
.
getSaleNo
());
// 存货名称
HPKC004
newKc004
=
BeanUtils
.
copy
(
dbKc004
,
HPKC004
.
class
);
fKc004
.
setInventName
(
HPPZTools
.
getPz004ByCode
(
fKc004
.
getInventCode
()).
getInventName
());
newKc004
.
setSaleNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC004_SALE_NO
));
// 生成销售单号
newKc004
.
setAmount
(
dbKc004
.
getAmount
().
negate
());
fKc004
.
setSaleNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC004_SALE_NO
));
newKc004
.
setWeight
(
dbKc004
.
getWeight
().
negate
());
DaoUtils
.
insert
(
"HPKC004.insert"
,
fKc004
);
newKc004
.
setOldSaleNo
(
dbKc004
.
getSaleNo
());
newKc004
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
insert
(
HPKC004
.
INSERT
,
newKc004
);
// 修改库存
HPKCTools
.
updateStock
(
dbKc004
.
getWhCode
(),
dbKc004
.
getInventRecordId
(),
dbKc004
.
getAmount
(),
dbKc004
.
getWeight
());
}
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据
新增
成功!"
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据
删除
成功!"
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
新增
失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"
删除
失败"
);
}
}
return
inInfo
;
return
inInfo
;
}
}
/**
* 修改操作
*
* @param inInfo
* @return
*/
public
EiInfo
update
(
EiInfo
inInfo
)
{
CommonMethod
.
creatorInfo
(
inInfo
,
EiConstant
.
resultBlock
);
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
for
(
int
i
=
0
;
i
<
resultRows
.
size
();
i
++)
{
HPKC004
fKc004
=
new
HPKC004
();
fKc004
.
fromMap
(
resultRows
.
get
(
i
));
fKc004
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc004
.
getReceiptDate
()));
// 仓库名称
fKc004
.
setWhName
(
HPPZTools
.
getPz007ByCode
(
fKc004
.
getWhCode
()).
getWhName
());
// 存货名称
fKc004
.
setInventName
(
HPPZTools
.
getPz004ByCode
(
fKc004
.
getInventCode
()).
getInventName
());
DaoUtils
.
update
(
"HPKC004.update"
,
fKc004
);
}
inInfo
=
this
.
query
(
inInfo
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_DEFAULT
);
inInfo
.
setMsg
(
"操作成功!本次对["
+
resultRows
.
size
()
+
"]条数据修改成功!"
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"修改失败"
);
}
return
inInfo
;
}
/**
* 删除操作.
*/
public
EiInfo
delete
(
EiInfo
eiInfo
)
{
HPKC004
HPKC004
=
new
HPKC004
();
EiBlock
eiBlock
=
eiInfo
.
getBlock
(
EiConstant
.
resultBlock
);
try
{
for
(
int
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
HPKC004
.
fromMap
(
map
);
this
.
dao
.
delete
(
"HPKC004.delete"
,
HPKC004
.
toMap
());
}
}
catch
(
PlatException
e
)
{
eiInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
eiInfo
.
setMsg
(
"删除失败,原因参见详细错误描述!"
);
eiInfo
.
setDetailMsg
(
e
.
getMessage
());
logError
(
"删除失败!"
,
e
.
getMessage
());
return
eiInfo
;
}
eiInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
eiInfo
.
setMsg
(
"删除成功!"
);
return
eiInfo
;
}
}
}
src/main/java/com/baosight/hpjx/hp/kc/service/ServiceHPKC004A.java
0 → 100644
View file @
37ddf6e2
package
com
.
baosight
.
hpjx
.
hp
.
kc
.
service
;
import
com.baosight.hpjx.common.DdynamicEnum
;
import
com.baosight.hpjx.common.InventTypeEnun
;
import
com.baosight.hpjx.core.constant.CommonConstant
;
import
com.baosight.hpjx.core.dao.DaoUtils
;
import
com.baosight.hpjx.hp.constant.HPConstant
;
import
com.baosight.hpjx.hp.kc.domain.HPKC004
;
import
com.baosight.hpjx.hp.kc.domain.HPKC007
;
import
com.baosight.hpjx.hp.kc.domain.HPKC010
;
import
com.baosight.hpjx.hp.kc.tools.HPKCTools
;
import
com.baosight.hpjx.util.AssertUtils
;
import
com.baosight.hpjx.util.BeanUtils
;
import
com.baosight.hpjx.util.CommonMethod
;
import
com.baosight.hpjx.util.DateUtils
;
import
com.baosight.hpjx.util.EiInfoUtils
;
import
com.baosight.hpjx.util.LogUtils
;
import
com.baosight.hpjx.util.MapUtils
;
import
com.baosight.hpjx.util.ObjectUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.service.impl.ServiceEPBase
;
import
com.baosight.iplat4j.ed.util.SequenceGenerator
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
* 其他出库单挑选库存
*
* @author:songx
* @date:2022/7/11,11:08
*/
public
class
ServiceHPKC004A
extends
ServiceEPBase
{
// 指定存货类型
private
static
final
Integer
[]
DEFAULT_INVENT_CODE
=
{
InventTypeEnun
.
MATERIAL
.
getCode
(),
InventTypeEnun
.
CONSUMABLE
.
getCode
(),
InventTypeEnun
.
SEMI_FINISHED_PRODUCT
.
getCode
(),
InventTypeEnun
.
FINISHED_PRODUCT
.
getCode
()};
/**
* 初始化
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
initLoad
(
EiInfo
inInfo
)
{
try
{
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
WH_RECORD_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_NAME_BLOCK_ID
),
queryMap
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
INVENT_SPEC_BLOCK_ID
),
queryMap
,
false
);
CommonMethod
.
initBlock
(
inInfo
,
Arrays
.
asList
(
DdynamicEnum
.
SPEC_NAME_BLOCK_ID
),
queryMap
,
false
);
inInfo
.
addBlock
(
EiConstant
.
resultBlock
).
addBlockMeta
(
new
HPKC010
().
eiMetadata
);
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"初始化失败"
);
}
return
inInfo
;
}
/**
* 查询数据列表
*
* @param inInfo
* @return
*/
@Override
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
Map
queryRow
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryRow
.
put
(
"inventTypes"
,
DEFAULT_INVENT_CODE
);
inInfo
=
super
.
query
(
inInfo
,
HPKC010
.
QUERY
,
new
HPKC010
());
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
}
return
inInfo
;
}
/**
* 生成出库单
*
* @param inInfo
* @return
*/
public
EiInfo
select
(
EiInfo
inInfo
)
{
try
{
List
<
Map
>
resultRows
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
).
getRows
();
// 库存ID
List
<
Long
>
ids
=
ObjectUtils
.
listKey
(
resultRows
,
"id"
);
// 行锁
HPKCTools
.
lockKc010
(
ids
);
// 获取库存信息
Map
<
Long
,
HPKC010
>
dbKc010Map
=
HPKCTools
.
mapKc010
(
ids
);
// 状态校验
for
(
Map
row
:
resultRows
)
{
Long
id
=
MapUtils
.
getLong
(
row
,
"id"
);
HPKC010
dbKc010
=
dbKc010Map
.
get
(
id
);
AssertUtils
.
isNull
(
dbKc010
,
"库存号["
+
id
+
"]不存在!"
);
// 校验数量
BigDecimal
applyAmount
=
MapUtils
.
getBigDecimal
(
row
,
"applyAmount"
);
AssertUtils
.
isGt
(
applyAmount
,
dbKc010
.
getAmount
(),
"库存号["
+
id
+
"]可用数量不足!"
);
BigDecimal
applyWeight
=
MapUtils
.
getBigDecimal
(
row
,
"applyWeight"
);
AssertUtils
.
isGt
(
applyWeight
,
dbKc010
.
getWeight
(),
"库存号["
+
id
+
"]可用重量不足!"
);
}
// 生成销售库单
for
(
Map
row
:
resultRows
)
{
BigDecimal
applyAmount
=
MapUtils
.
getBigDecimal
(
row
,
"applyAmount"
);
BigDecimal
applyWeight
=
MapUtils
.
getBigDecimal
(
row
,
"applyWeight"
);
String
applyRemark
=
MapUtils
.
getString
(
row
,
"applyRemark"
);
Long
kcId
=
MapUtils
.
getLong
(
row
,
"id"
);
HPKC010
dbKc010
=
dbKc010Map
.
get
(
kcId
);
HPKC004
newKc004
=
BeanUtils
.
copy
(
dbKc010
,
HPKC004
.
class
);
newKc004
.
setSaleNo
(
SequenceGenerator
.
getNextSequence
(
HPConstant
.
SequenceId
.
HPKC004_SALE_NO
));
newKc004
.
setReceiptDate
(
DateUtils
.
shortDate
());
newKc004
.
setAmount
(
applyAmount
);
newKc004
.
setWeight
(
applyWeight
);
newKc004
.
setRemark
(
applyRemark
);
newKc004
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HPKC004
.
INSERT
,
newKc004
);
// 修改库存数量
HPKCTools
.
updateStock
(
newKc004
.
getWhCode
(),
newKc004
.
getInventRecordId
(),
newKc004
.
getAmount
().
negate
(),
newKc004
.
getWeight
().
negate
());
}
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"生成出库单失败"
);
}
return
inInfo
;
}
}
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC001.xml
View file @
37ddf6e2
...
@@ -96,11 +96,29 @@
...
@@ -96,11 +96,29 @@
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
<isEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
</isEqual>
<isNotEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC001"
>
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC001"
>
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpkc001 WHERE 1=1
FROM hpjx.t_hpkc001 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
$orderBy$
...
@@ -114,6 +132,7 @@
...
@@ -114,6 +132,7 @@
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc001 WHERE 1=1
SELECT COUNT(*) FROM hpjx.t_hpkc001 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC002.xml
View file @
37ddf6e2
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
REQ_
CODE as "reqCode
",
<!-- 领料单号 -->
REQ_
NO as "reqNo
",
<!-- 领料单号 -->
RECEIPT_DATE as "receiptDate",
<!-- 单据日期 -->
RECEIPT_DATE as "receiptDate",
<!-- 单据日期 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
...
@@ -54,8 +54,8 @@
...
@@ -54,8 +54,8 @@
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
<isNotEmpty
prepend=
" AND "
property=
"updatedTime"
>
UPDATED_TIME = #updatedTime#
UPDATED_TIME = #updatedTime#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"req
Code
"
>
<isNotEmpty
prepend=
" AND "
property=
"req
No
"
>
REQ_
CODE = #reqCode
#
REQ_
NO= #reqNo
#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
<isNotEmpty
prepend=
" AND "
property=
"receiptDate"
>
RECEIPT_DATE = #receiptDate#
RECEIPT_DATE = #receiptDate#
...
@@ -91,11 +91,30 @@
...
@@ -91,11 +91,30 @@
DELETE_FLAG = #deleteFlag#
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</isNotEmpty>
</sql>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
<isEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
</isEqual>
<isNotEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
<select
id=
"query"
parameterClass=
"java.util.HashMap"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC002"
>
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC002"
>
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpkc002 WHERE 1=1
FROM hpjx.t_hpkc002 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
<isNotEmpty
property=
"orderBy"
>
<isNotEmpty
property=
"orderBy"
>
$orderBy$
$orderBy$
...
@@ -104,13 +123,12 @@
...
@@ -104,13 +123,12 @@
ID asc
ID asc
</isEmpty>
</isEmpty>
</dynamic>
</dynamic>
</select>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1
SELECT COUNT(*) FROM hpjx.t_hpkc002 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
...
@@ -120,7 +138,7 @@
...
@@ -120,7 +138,7 @@
CREATED_BY,
<!-- 创建人 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME,
<!-- 创建时间 -->
CREATED_TIME,
<!-- 创建时间 -->
REQ_
CODE
,
<!-- 领料单号 -->
REQ_
NO
,
<!-- 领料单号 -->
RECEIPT_DATE,
<!-- 单据日期 -->
RECEIPT_DATE,
<!-- 单据日期 -->
WH_CODE,
<!-- 仓库编码 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
...
@@ -150,7 +168,7 @@
...
@@ -150,7 +168,7 @@
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
REQ_
CODE = #reqCode
#,
<!-- 领料单号 -->
REQ_
NO = #reqNo
#,
<!-- 领料单号 -->
RECEIPT_DATE = #receiptDate#,
<!-- 单据日期 -->
RECEIPT_DATE = #receiptDate#,
<!-- 单据日期 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC003.xml
View file @
37ddf6e2
...
@@ -22,7 +22,8 @@
...
@@ -22,7 +22,8 @@
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
UPDATED_NAME as "updatedName"
<!-- 修改人名称 -->
UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
PROD_NO_OLD as "ProdNoOld"
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -53,6 +54,18 @@
...
@@ -53,6 +54,18 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
INVENT_NAME = #inventName#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
</sql>
<sql
id=
"order"
>
<sql
id=
"order"
>
...
@@ -70,12 +83,14 @@
...
@@ -70,12 +83,14 @@
SELECT
<include
refid=
"column"
/>
SELECT
<include
refid=
"column"
/>
FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
<include
refid=
"order"
/>
</select>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
SELECT COUNT(*) FROM hpjx.t_hpkc003 WHERE 1=1 AND DELETE_FLAG = 0
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
...
...
src/main/java/com/baosight/hpjx/hp/kc/sql/HPKC004.xml
View file @
37ddf6e2
...
@@ -3,26 +3,29 @@
...
@@ -3,26 +3,29 @@
<sqlMap
namespace=
"HPKC004"
>
<sqlMap
namespace=
"HPKC004"
>
<sql
id=
"column"
>
<sql
id=
"column"
>
ID as "id",
ID as "id",
<!-- ID -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
COMPANY_CODE as "companyCode",
<!-- 企业编码 预留 -->
DEP_CODE as "depCode",
<!-- 部门编码 -->
DEP_CODE as "depCode",
<!-- 部门编码
预留
-->
RECEIPT_DATE as "receiptDate",
<!--
单
据日期 -->
RECEIPT_DATE as "receiptDate",
<!--
票
据日期 -->
SALE_NO as "saleNo",
<!-- 销售
出库
单号 -->
SALE_NO as "saleNo",
<!-- 销售单号 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_CODE as "whCode",
<!-- 仓库编码 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
WH_NAME as "whName",
<!-- 仓库名称 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_TYPE as "inventType",
<!-- 存货类型 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_CODE as "inventCode",
<!-- 存货编码 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_NAME as "inventName",
<!-- 存货名称 -->
INVENT_RECORD_ID as "inventRecordId",
<!-- 规格 -->
AMOUNT as "amount",
<!-- 数量 -->
AMOUNT as "amount",
<!-- 数量 -->
WEIGHT as "weight",
<!-- 重量 -->
WEIGHT as "weight",
<!-- 重量 -->
STATUS as "status",
<!--
单据状态 0待审核 1已审核
-->
STATUS as "status",
<!--
状态
-->
REMARK as "remark",
<!-- 备注 -->
REMARK as "remark",
<!-- 备注 -->
OLD_SALE_NO as "oldSaleNo",
<!-- 原销售单号 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_BY as "createdBy",
<!-- 创建人 -->
CREATED_NAME as "createdName",
<!-- 创建名称 -->
CREATED_NAME as "createdName",
<!-- 创建
人
名称 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
CREATED_TIME as "createdTime",
<!-- 创建时间 -->
UPDATED_BY as "updatedBy",
<!-- 更新人 -->
UPDATED_BY as "updatedBy",
<!-- 修改人 -->
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_NAME as "updatedName",
<!-- 修改人名称 -->
UPDATED_TIME as "updatedTime"
<!-- 更新时间 -->
UPDATED_TIME as "updatedTime",
<!-- 修改时间 -->
DELETE_FLAG as "deleteFlag"
<!-- 是否删除 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -56,7 +59,33 @@
...
@@ -56,7 +59,33 @@
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
<isNotEmpty
prepend=
" AND "
property=
"inventName"
>
INVENT_NAME = #inventName#
INVENT_NAME = #inventName#
</isNotEmpty>
</isNotEmpty>
</sql>
<isNotEmpty
prepend=
" AND "
property=
"inventRecordId"
>
INVENT_RECORD_ID = #inventRecordId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"deleteFlag"
>
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"saleNos"
>
SALE_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"saleNos"
>
#saleNos[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
<isEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = '')
</isEqual>
<isNotEqual
property=
"spec"
compareValue=
"无规格"
>
INVENT_RECORD_ID IN (SELECT ID FROM ${hpjxSchema}.T_HPPZ006 WHERE SPEC = #spec#)
</isNotEqual>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateFrom"
>
CREATED_TIME
>
= CONCAT(REPLACE(#createdDateFrom#, '-', ''), '000000')
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"createdDateTo"
>
CREATED_TIME
<
= CONCAT(REPLACE(#createdDateTo#, '-', ''), '235959')
</isNotEmpty>
</sql>
<sql
id=
"order"
>
<sql
id=
"order"
>
<dynamic
prepend=
"ORDER BY"
>
<dynamic
prepend=
"ORDER BY"
>
...
@@ -74,47 +103,53 @@
...
@@ -74,47 +103,53 @@
<include
refid=
"column"
/>
<include
refid=
"column"
/>
FROM hpjx.T_HPKC004 WHERE 1=1
FROM hpjx.T_HPKC004 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
<include
refid=
"order"
/>
<include
refid=
"order"
/>
</select>
</select>
<select
id=
"count"
resultClass=
"int"
>
<select
id=
"count"
resultClass=
"int"
>
SELECT COUNT(*) FROM hpjx.T_HPKC004 WHERE 1=1
SELECT COUNT(*) FROM hpjx.T_HPKC004 WHERE 1=1
<include
refid=
"condition"
/>
<include
refid=
"condition"
/>
<include
refid=
"customCondition"
/>
</select>
</select>
<insert
id=
"insert"
>
<insert
id=
"insert"
>
INSERT INTO ${hpjxSchema}.T_HPKC004 (
INSERT INTO ${hpjxSchema}.T_HPKC004 (
COMPANY_CODE,
<!-- 企业编码 预留 -->
COMPANY_CODE,
<!-- 企业编码 预留 -->
DEP_CODE,
<!-- 部门编码 -->
DEP_CODE,
<!-- 部门编码
预留
-->
RECEIPT_DATE,
<!--
单
据日期 -->
RECEIPT_DATE,
<!--
票
据日期 -->
SALE_NO,
<!-- 销售
出库
单号 -->
SALE_NO,
<!-- 销售单号 -->
WH_CODE,
<!-- 仓库编码 -->
WH_CODE,
<!-- 仓库编码 -->
WH_NAME,
<!-- 仓库名称 -->
WH_NAME,
<!-- 仓库名称 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_TYPE,
<!-- 存货类型 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_CODE,
<!-- 存货编码 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_NAME,
<!-- 存货名称 -->
INVENT_RECORD_ID,
<!-- 规格 -->
AMOUNT,
<!-- 数量 -->
AMOUNT,
<!-- 数量 -->
WEIGHT,
<!-- 重量 -->
WEIGHT,
<!-- 重量 -->
STATUS,
<!--
单据状态 0待审核 1已审核
-->
STATUS,
<!--
状态
-->
REMARK,
<!-- 备注 -->
REMARK,
<!-- 备注 -->
OLD_SALE_NO,
<!-- 原销售单号 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_BY,
<!-- 创建人 -->
CREATED_NAME,
<!-- 创建名称 -->
CREATED_NAME,
<!-- 创建人名称 -->
CREATED_TIME
<!-- 创建时间 -->
CREATED_TIME,
<!-- 创建时间 -->
DELETE_FLAG
<!-- 是否删除 -->
) VALUES (
) VALUES (
#companyCode#, #depCode#, #receiptDate#, #saleNo#, #whCode#, #whName#,
#companyCode#, #depCode#, #receiptDate#, #saleNo#, #whCode#, #whName#,
#inventType#, #inventCode#, #inventName#, #amount#, #weight#, #status#,
#inventType#, #inventCode#, #inventName#, #
inventRecordId#, #
amount#, #weight#, #status#,
#remark#, #
createdBy#, #createdName#, #createdTime
#
#remark#, #
oldSaleNo#, #createdBy#, #createdName#, #createdTime#, #deleteFlag
#
)
)
</insert>
</insert>
<!-- 逻辑删除 -->
<delete
id=
"delete"
>
<delete
id=
"delete"
>
DELETE FROM ${hpjxSchema}.T_HPKC004 WHERE
ID = #id#
UPDATE ${hpjxSchema}.T_HPKC004 SET DELETE_FLAG = 1 WHERE
ID = #id#
</delete>
</delete>
<update
id=
"update"
>
<update
id=
"update"
>
UPDATE ${hpjxSchema}.T_HPKC004
UPDATE ${hpjxSchema}.T_HPKC004
SET
SET
RECEIPT_DATE = #receiptDate#,
<!--
单
据日期 -->
RECEIPT_DATE = #receiptDate#,
<!--
票
据日期 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_CODE = #whCode#,
<!-- 仓库编码 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
WH_NAME = #whName#,
<!-- 仓库名称 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
INVENT_TYPE = #inventType#,
<!-- 存货类型 -->
...
@@ -122,14 +157,27 @@
...
@@ -122,14 +157,27 @@
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
INVENT_NAME = #inventName#,
<!-- 存货名称 -->
AMOUNT = #amount#,
<!-- 数量 -->
AMOUNT = #amount#,
<!-- 数量 -->
WEIGHT = #weight#,
<!-- 重量 -->
WEIGHT = #weight#,
<!-- 重量 -->
STATUS = #status#,
<!--
单据状态 0待审核 1已审核
-->
STATUS = #status#,
<!--
状态
-->
REMARK = #remark#,
<!-- 备注 -->
REMARK = #remark#,
<!-- 备注 -->
UPDATED_BY = #updatedBy#,
<!--
更新
人 -->
UPDATED_BY = #updatedBy#,
<!--
修改
人 -->
UPDATED_NAME = #updatedName#,
<!--
更新
人名称 -->
UPDATED_NAME = #updatedName#,
<!--
修改
人名称 -->
UPDATED_TIME = #updatedTime#
<!-- 更新
时间 -->
UPDATED_TIME = #updatedTime#
<!-- 修改
时间 -->
WHERE ID = #id#
WHERE ID = #id#
</update>
</update>
<!-- 行锁 -->
<update
id=
"lock"
>
UPDATE ${hpjxSchema}.T_HPKC004
SET CREATED_TIME = CREATED_TIME
WHERE 1=1
<isNotEmpty
prepend=
" AND "
property=
"saleNo"
>
SALE_NO = #saleNo#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"saleNos"
>
SALE_NO IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"saleNos"
>
#saleNos[]#
</iterate>
</isNotEmpty>
</update>
<!-- 统计库存 -->
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC004"
>
<select
id=
"statDate"
resultClass=
"com.baosight.hpjx.hp.kc.domain.HPKC004"
>
SELECT
SELECT
...
@@ -138,6 +186,7 @@
...
@@ -138,6 +186,7 @@
WH_CODE AS "whCode",
WH_CODE AS "whCode",
INVENT_TYPE AS "inventType",
INVENT_TYPE AS "inventType",
INVENT_CODE AS "inventCode",
INVENT_CODE AS "inventCode",
INVENT_RECORD_ID AS "inventRecordId";
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(AMOUNT), 0) AS "amount",
COALESCE(SUM(WEIGHT), 0) AS "weight"
COALESCE(SUM(WEIGHT), 0) AS "weight"
FROM ${hpjxSchema}.T_HPKC004
FROM ${hpjxSchema}.T_HPKC004
...
@@ -145,7 +194,7 @@
...
@@ -145,7 +194,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
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE
, INVENT_RECORD_ID
</select>
</select>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hpjx/hp/kc/tools/HPKCTools.java
View file @
37ddf6e2
...
@@ -112,6 +112,50 @@ public class HPKCTools {
...
@@ -112,6 +112,50 @@ public class HPKCTools {
/**
/**
* 锁
* 锁
*
*
* @param saleNos
* @return
*/
public
static
void
lockKc004
(
List
<
String
>
saleNos
)
{
if
(
CollectionUtils
.
isEmpty
(
saleNos
))
{
return
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"saleNos"
,
saleNos
);
DaoBase
.
getInstance
().
update
(
HPSqlConstant
.
HPKC004
.
LOCK
,
queryMap
);
}
/**
* 查询销售出库信息
*
* @param saleNos
* @return
*/
public
static
List
<
HPKC004
>
listKc004
(
List
<
String
>
saleNos
)
{
if
(
CollectionUtils
.
isEmpty
(
saleNos
))
{
return
null
;
}
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"saleNos"
,
saleNos
);
return
DaoBase
.
getInstance
().
query
(
HPKC004
.
QUERY
,
queryMap
);
}
/**
* 查询销售出库信息
*
* @param saleNos
* @return
*/
public
static
Map
<
String
,
HPKC004
>
mapKc004
(
List
<
String
>
saleNos
)
{
List
<
HPKC004
>
results
=
listKc004
(
saleNos
);
if
(
CollectionUtils
.
isEmpty
(
results
))
{
return
null
;
}
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HPKC004:
:
getSaleNo
,
item
->
item
));
}
/**
* 锁
*
* @param otherEnterNos
* @param otherEnterNos
* @return
* @return
*/
*/
...
...
src/main/webapp/HP/KC/HPKC001.jsp
View file @
37ddf6e2
...
@@ -30,7 +30,17 @@
...
@@ -30,7 +30,17 @@
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFDateSpan
startCname=
"创建日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
</div>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
...
@@ -50,6 +60,7 @@
...
@@ -50,6 +60,7 @@
<EF:EFColumn
ename=
"amount"
cname=
"数量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"weight"
cname=
"重量"
format=
"{0:N3}"
maxLength=
"20"
width=
"90"
align=
"right"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
readonly=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
readonly=
"true"
/>
<EF:EFColumn
ename=
"oldPurchaseNo"
cname=
"原采购单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时刻"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
...
...
src/main/webapp/HP/KC/HPKC002.jsp
View file @
37ddf6e2
...
@@ -8,35 +8,46 @@
...
@@ -8,35 +8,46 @@
<EF:EFPage
title=
"生产领料单"
>
<EF:EFPage
title=
"生产领料单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"inqu_status-0-documentTime"
cname=
"单据日期"
format=
"yyyy-MM-dd"
required=
"true"
/>
<EF:EFDatePicker
ename=
"inqu_status-0-documentTime"
cname=
"单据日期"
colWidth=
"3"
format=
"yyyy-MM-dd"
<EF:EFInput
ename=
"inqu_status-0-documentCode"
cname=
"生产领料单号"
colWidth=
"4"
readonly=
"false"
/>
required=
"true"
/>
<EF:EFSelect
cname=
"存货类型"
blockId=
"inqu_status"
ename=
"materialType"
row=
"0"
colWidth=
"3"
>
<EF:EFInput
ename=
"inqu_status-0-documentCode"
cname=
"生产领料单号"
colWidth=
"3"
readonly=
"false"
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
<EF:EFOption
label=
"全部"
value=
""
/>
</EF:EFSelect>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
</EF:EFSelect>
valueTemplate=
"#=textField#"
filter=
"contains"
<EF:EFSelect
cname=
"仓库名称"
ename=
"inqu_status-0-whCode"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
required=
"false"
defultValue=
"ALL"
<EF:EFOption
label=
"全部"
value=
""
/>
template=
"#=textField#"
>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
</EF:EFSelect>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-materialCode"
cname=
"存货名称"
valueTemplate=
"#=textField#"
filter=
"contains"
required=
"false"
defultValue=
"ALL"
template=
"#=textField#"
>
<EF:EFOption
label=
"请选择"
value=
""
></EF:EFOption>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFDateSpan
startCname=
"创建日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"false"
isFloat=
"true"
autoFit=
"true"
>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"主键id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"documentTime"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
width=
"100"
required=
"true"
/>
<EF:EFColumn
ename=
"documentTime"
cname=
"单据日期"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyy-MM-dd']"
width=
"100"
required=
"true"
/>
<EF:EFColumn
ename=
"
documentCode
"
cname=
"生产领料单号"
width=
"100"
readonly=
"false"
align=
"center"
required=
"false"
enable=
"false"
/>
<EF:EFColumn
ename=
"
reqNo
"
cname=
"生产领料单号"
width=
"100"
readonly=
"false"
align=
"center"
required=
"false"
enable=
"false"
/>
<EF:EFComboColumn
ename=
"materialType"
cname=
"存货类型"
width=
"90"
align=
"center"
>
<EF:EFComboColumn
ename=
"materialType"
cname=
"存货类型"
width=
"90"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
...
src/main/webapp/HP/KC/HPKC003.jsp
View file @
37ddf6e2
...
@@ -11,14 +11,28 @@
...
@@ -11,14 +11,28 @@
<EF:EFDatePicker
ename=
"inqu_status-0-documentDate"
cname=
"单据日期"
colWidth=
"3"
format=
"yyyy-MM-dd"
<EF:EFDatePicker
ename=
"inqu_status-0-documentDate"
cname=
"单据日期"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"true"
/>
readonly=
"true"
/>
<EF:EFInput
ename=
"inqu_status-0-prodNo"
cname=
"生产入库单号"
colWidth=
"3"
/>
<EF:EFInput
ename=
"inqu_status-0-prodNo"
cname=
"生产入库单号"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"请选择"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFSelect>
<EF:EFSelect
cname=
"仓库名称"
ename=
"inqu_status-0-whCode"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-inventCode"
cname=
"存货名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
</div>
<EF:EFOption
label=
"请选择"
value=
""
/>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
</EF:EFSelect>
<EF:EFDateSpan
startCname=
"创建日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
...
@@ -44,6 +58,7 @@
...
@@ -44,6 +58,7 @@
<EF:EFColumn
cname=
"存货代码"
ename=
"inventCode"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
cname=
"存货代码"
ename=
"inventCode"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
cname=
"存货名称"
ename=
"inventName"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
cname=
"存货名称"
ename=
"inventName"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
editType=
"textarea"
readonly=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
editType=
"textarea"
readonly=
"true"
/>
<EF:EFColumn
cname=
"原生产单号"
ename=
"ProdNoOld"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
cname=
"创建人名称"
ename=
"createdName"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"创建人名称"
ename=
"createdName"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
...
...
src/main/webapp/HP/KC/HPKC004.js
View file @
37ddf6e2
let
inventNameGlobalData
=
[];
$
(
function
()
{
$
(
function
()
{
var
eiInfo
=
new
EiInfo
();
var
globalData
=
[];
// var day1 = new Date();
// day1.setTime(day1.getTime());
// var s1 = day1.getFullYear() + "-" + (day1.getMonth() + 1) + "-" + day1.getDate();
// $("#inqu_status-0-receiptDate").val(s1);
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
IPLATUI
.
EFGrid
=
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
"result"
:
{
columns
:
[{
columns
:
[{
field
:
"inventCode"
,
field
:
"createdName"
,
template
:
function
(
dataItem
)
{
template
:
function
(
options
)
{
for
(
let
i
=
0
;
i
<
inventNameGlobalData
.
length
;
i
++
)
{
return
showUserName
(
options
.
createdBy
,
options
.
createdName
);
if
(
inventNameGlobalData
[
i
][
'valueField'
]
===
dataItem
[
'inventCode'
])
{
return
inventNameGlobalData
[
i
][
'textField'
];
}
}
return
""
;
},
editor
:
function
(
container
,
options
)
{
var
grid
=
container
.
closest
(
".k-grid"
).
data
(
"kendoGrid"
);
var
cellIndex
=
grid
.
cellIndex
(
container
);
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
let
eiInfo
=
new
EiInfo
();
eiInfo
.
set
(
"inventType"
,
options
.
model
[
"inventType"
]);
var
dataSource
;
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
eiInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
inventNameGlobalData
=
dataSource
;
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
dataSource
:
dataSource
,
template
:
"#=textField#"
});
}
}
}],
}],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
//删除
$
(
"#DELETE"
).
on
(
"click"
,
function
()
{
var
btnNode
=
$
(
this
);
//禁用按钮
btnNode
.
attr
(
"disabled"
,
true
);
var
dataItems
=
resultGrid
.
getCheckedRows
();
if
(
dataItems
==
null
||
dataItems
==
""
)
{
NotificationUtil
({
msg
:
'选择要删除的数据'
},
"warning"
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
return
false
;
}
IPLAT
.
submitNode
(
$
(
"#HPKC004"
),
"HPKC004"
,
"delete"
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
[
"status"
]
==
-
1
)
{
NotificationUtil
(
ei
,
"error"
);
}
else
{
NotificationUtil
({
msg
:
'删除成功'
});
// 绑定grid
resultGrid
.
setEiInfo
(
ei
);
}
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
},
onFail
:
function
(
ei
)
{
// onFail
// 表示失败回调函数
// 发生异常
console
.
log
(
ei
);
//释放禁用按钮
btnNode
.
attr
(
"disabled"
,
false
);
}
});
});
}
}
}
}
}
}
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 挑选库存
$
(
"#SELECT_STOCK"
).
on
(
"click"
,
selectStock
);
});
});
...
@@ -97,15 +25,6 @@ $(function () {
...
@@ -97,15 +25,6 @@ $(function () {
* 页面加载时执行
* 页面加载时执行
*/
*/
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 存货名称
let
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HPPZ004"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventNameGlobalData
=
ei
.
getBlock
(
"invent_name_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
// 查询
// 查询
query
();
query
();
});
});
...
@@ -116,3 +35,27 @@ $(window).load(function () {
...
@@ -116,3 +35,27 @@ $(window).load(function () {
let
query
=
function
()
{
let
query
=
function
()
{
resultGrid
.
dataSource
.
page
(
1
);
resultGrid
.
dataSource
.
page
(
1
);
}
}
/**
* 挑选库存
*/
let
selectStock
=
function
()
{
JSColorbox
.
open
({
href
:
"HPKC004A?methodName=initLoad"
,
title
:
"<div style='text-align: center;'>库存查询</div>"
,
width
:
"90%"
,
height
:
"80%"
,
callbackName
:
selectStockCallback
});
}
/**
* 挑选库存回调
*/
let
selectStockCallback
=
function
()
{
// 刷新页面
query
();
// 关闭弹窗
JSColorbox
.
close
();
}
src/main/webapp/HP/KC/HPKC004.jsp
View file @
37ddf6e2
...
@@ -8,47 +8,69 @@
...
@@ -8,47 +8,69 @@
<EF:EFPage
title=
"销售出库单"
>
<EF:EFPage
title=
"销售出库单"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<EF:EFRegion
id=
"inqu"
title=
"查询条件"
>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFDatePicker
ename=
"inqu_status-0-receiptDate"
cname=
"单据日期
"
colWidth=
"3"
format=
"yyyy-MM-dd"
<EF:EFDatePicker
cname=
"单据日期"
ename=
"inqu_status-0-receiptDate
"
colWidth=
"3"
format=
"yyyy-MM-dd"
readonly=
"true"
/>
readonly=
"true"
/>
<EF:EFInput
ename=
"inqu_status-0-saleNo"
cname=
"生产销售单号"
colWidth=
"3"
/>
<EF:EFInput
cname=
"销售单号"
ename=
"inqu_status-0-saleNo"
colWidth=
"3"
/>
<EF:EFSelect
ename=
"inqu_status-0-whCode"
cname=
"仓库名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"请选择"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('1', '2', '3', '4')"
/>
</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:EFOptions
blockId=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-inventCode"
cname=
"存货名称"
colWidth=
"3"
filter=
"contains"
defultValue=
""
>
</div>
<EF:EFOption
label=
"请选择"
value=
""
/>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFDateSpan
startCname=
"创建日期(从)"
endCname=
"至"
blockId=
"inqu_status"
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
</EF:EFSelect>
</div>
</div>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFRegion
id=
"result"
title=
"明细信息"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"saleNo"
cname=
"销售出库单号"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"saleNo"
cname=
"销售单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
width=
"100"
align=
"center"
editType=
"date"
<EF:EFColumn
ename=
"receiptDate"
cname=
"单据日期"
enable=
"false"
width=
"90"
align=
"center"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFComboColumn
cname=
"仓库名称"
ename=
"whCode"
columnTemplate=
"#=textField#"
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"100"
align=
"center"
>
itemTemplate=
"#=textField#"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
align=
"center"
filter=
"contains"
width=
"120"
>
</EF:EFComboColumn>
<EF:EFComboColumn
cname=
"存货类型"
ename=
"inventType"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
<EF:EFColumn
cname=
"存货名称"
ename=
"inventCode"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库编码"
enable=
"false"
width=
"120"
align=
"center"
<EF:EFColumn
cname=
"数量"
ename=
"amount"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
blockName=
"wh_record_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventCode"
cname=
"存货名称"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"amount"
cname=
"数量"
enable=
"false"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"center"
/>
align=
"center"
/>
<EF:EFColumn
cname=
"重量"
ename=
"weight
"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
<EF:EFColumn
ename=
"weight"
cname=
"重量"
enable=
"false
"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"center"
/>
align=
"center"
/>
<EF:EFComboColumn
cname=
"单据状态"
ename=
"status"
width=
"100"
readonly=
"true"
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"100"
align=
"center"
/>
textField=
"textField"
valueField=
"valueField"
align=
"center"
>
<EF:EFColumn
ename=
"oldSaleNo"
cname=
"原销售单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFOption
label=
"0-待审核"
value=
"0"
></EF:EFOption>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFOption
label=
"1-已审核"
value=
"1"
></EF:EFOption>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建时间"
enable=
"false"
width=
"140"
align=
"center"
</EF:EFComboColumn>
<EF:EFColumn
cname=
"备注"
ename=
"remark"
width=
"100"
readonly=
"false"
align=
"center"
/>
<EF:EFColumn
cname=
"创建人名称"
ename=
"createdName"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
cname=
"创建时间"
ename=
"createdTime"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss','yyyy-MM-dd HH:mm:ss']"
/>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
...
...
src/main/webapp/HP/KC/HPKC004A.js
0 → 100644
View file @
37ddf6e2
$
(
function
()
{
IPLATUI
.
EFGrid
=
{
"result"
:
{
columns
:
[],
dataBound
:
function
()
{
}
}
};
$
(
"#ef_form_head"
).
hide
();
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
// 选择
$
(
"#BTN_SELECT"
).
on
(
"click"
,
select
);
});
/**
* 页面加载时执行
*/
$
(
window
).
load
(
function
()
{
// 初始化查询
query
();
});
/**
* 查询
*/
var
query
=
function
(
e
)
{
resultGrid
.
dataSource
.
page
(
1
);
};
/**
* 选择库存
*/
let
select
=
function
()
{
let
rows
=
resultGrid
.
getCheckedRows
();
if
(
rows
.
length
<
1
)
{
message
(
"请选择数据"
)
return
;
}
for
(
let
i
=
0
;
i
<
rows
.
length
;
i
++
)
{
let
applyAmount
=
rows
[
i
][
'applyAmount'
];
let
applyWeight
=
rows
[
i
][
'applyWeight'
];
let
amount
=
rows
[
i
][
'amount'
];
let
weight
=
rows
[
i
][
'weight'
];
if
(
isBlank
(
applyAmount
)
||
!
isNumber
(
applyAmount
)
||
!
(
applyAmount
>
0
))
{
message
(
"第"
+
(
i
+
1
)
+
"行申请数量必须大于0"
);
return
;
}
if
(
parseFloat
(
applyAmount
)
>
parseFloat
(
amount
))
{
message
(
"第"
+
(
i
+
1
)
+
"行申请数量不能大于库存数量"
);
return
;
}
if
(
isBlank
(
applyWeight
)
||
!
isNumber
(
applyWeight
)
||
!
(
applyWeight
>
0
))
{
message
(
"第"
+
(
i
+
1
)
+
"行申请重量必须大于0"
);
return
;
}
if
(
parseFloat
(
applyWeight
)
>
parseFloat
(
weight
))
{
message
(
"第"
+
(
i
+
1
)
+
"行申请重量不能大于库存重量"
);
return
;
}
}
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据生成出库单吗? "
,
{
ok
:
function
()
{
JSUtils
.
submitGridsData
(
"result"
,
"HPKC004A"
,
"select"
,
true
,
function
(
e
)
{
var
status
=
e
.
getStatus
();
if
(
status
!==
-
1
)
{
parent
.
JSColorbox
.
setValueCallback
();
}
}
);
}
});
}
src/main/webapp/HP/KC/HPKC004A.jsp
0 → 100644
View file @
37ddf6e2
<!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=
"查询区域"
type=
"query"
>
<div
class=
"row"
>
<EF:EFSelect
cname=
"存货类型"
ename=
"inqu_status-0-inventType"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
condition=
"ITEM_CODE IN ('1', '2', '3', '4')"
/>
</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:EFSelect
cname=
"存货名称"
ename=
"inqu_status-0-inventCode"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
<EF:EFSelect
ename=
"inqu_status-0-spec"
cname=
"规格"
colWidth=
"3"
filter=
"contains"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOptions
blockId=
"spec_name_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</div>
</EF:EFRegion>
<EF:EFRegion
id=
"result"
title=
"记录集"
>
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"库存ID"
enable=
"false"
width=
"60"
align=
"center"
/>
<EF:EFComboColumn
ename=
"inventType"
cname=
"存货类型"
enable=
"false"
width=
"100"
align=
"center"
>
<EF:EFCodeOption
codeName=
"hpjx.hpkc.inventType"
/>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"false"
width=
"120"
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=
"120"
align=
"center"
blockName=
"invent_name_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFComboColumn
ename=
"inventRecordId"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
blockName=
"invent_spec_block_id"
textField=
"textField"
valueField=
"valueField"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"applyAmount"
cname=
"申请数量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyWeight"
cname=
"申请重量"
width=
"120"
align=
"right"
format=
"{0:N3}"
required=
"true"
/>
<EF:EFColumn
ename=
"applyRemark"
cname=
"说明"
enable=
"false"
width=
"150"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"amount"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"weight"
cname=
"库存重量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFPage>
src/main/webapp/HP/KC/HPKC005.jsp
View file @
37ddf6e2
...
@@ -33,6 +33,8 @@
...
@@ -33,6 +33,8 @@
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
startName=
"createdDateFrom"
endName=
"createdDateTo"
row=
"0"
role=
"date"
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
format=
"yyyy-MM-dd"
ratio=
"3:3"
satrtRatio=
"4:8"
endRatio=
"4:8"
readonly=
"true"
>
</EF:EFDateSpan>
</EF:EFDateSpan>
</div>
<div
class=
"row"
>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFSelect
cname=
"是否删除"
ename=
"inqu_status-0-deleteFlag"
colWidth=
"3"
defaultValue=
"0"
>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFOption
label=
"全部"
value=
""
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
<EF:EFCodeOption
codeName=
"hpjx.hpjx.deleteFlag"
/>
...
@@ -65,6 +67,7 @@
...
@@ -65,6 +67,7 @@
<EF:EFColumn
ename=
"diffWeight"
cname=
"差异重量"
enable=
"false"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
<EF:EFColumn
ename=
"diffWeight"
cname=
"差异重量"
enable=
"false"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"right"
sumType=
"all"
readonly=
"true"
/>
align=
"right"
sumType=
"all"
readonly=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
readonly=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
width=
"150"
readonly=
"true"
/>
<EF:EFColumn
ename=
"oldCheckNo"
cname=
"原盘点单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建日期"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建日期"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
...
...
src/main/webapp/HP/KC/HPKC007.jsp
View file @
37ddf6e2
...
@@ -68,6 +68,7 @@
...
@@ -68,6 +68,7 @@
<EF:EFColumn
ename=
"weight"
cname=
"重量"
enable=
"false"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
<EF:EFColumn
ename=
"weight"
cname=
"重量"
enable=
"false"
format=
"{0:N3}"
maxLength=
"20"
width=
"100"
align=
"right"
sumType=
"all"
required=
"true"
/>
align=
"right"
sumType=
"all"
required=
"true"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
/>
<EF:EFColumn
ename=
"oldOuterNo"
cname=
"原出库单号"
enable=
"false"
width=
"140"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdName"
cname=
"创建人"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"createdTime"
cname=
"创建日期"
enable=
"false"
width=
"140"
align=
"center"
<EF:EFColumn
ename=
"createdTime"
cname=
"创建日期"
enable=
"false"
width=
"140"
align=
"center"
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
editType=
"datetime"
parseFormats=
"['yyyyMMddHHmmss']"
/>
...
...
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