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
4b1ca3fc
Commit
4b1ca3fc
authored
Jul 06, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.所有中文括号的KG都改成英文的
2.盘点的盘盈、盘亏到其他出库入库增加字段、修改逻辑、处理bug
parent
182273de
Show whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
308 additions
and
470 deletions
+308
-470
HGKC005.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC005.java
+15
-0
HGKC006.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC006.java
+29
-2
HGKC007.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC007.java
+17
-3
ServiceHGKC005.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
+112
-33
ServiceHGKC005A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
+5
-6
HGKC003.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
+1
-0
HGKC005.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC005.xml
+8
-2
HGKC006.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006.xml
+16
-165
HGKC007.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
+7
-1
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+24
-0
sqlmap-config.xml
src/main/resources/resources/ibatis/sqlmap-config.xml
+2
-2
HGKC003A.jsp
src/main/webapp/HG/KC/HGKC003A.jsp
+1
-1
HGKC005.js
src/main/webapp/HG/KC/HGKC005.js
+19
-0
HGKC005.jsp
src/main/webapp/HG/KC/HGKC005.jsp
+10
-12
HGKC005A.jsp
src/main/webapp/HG/KC/HGKC005A.jsp
+1
-1
HGKC006.jsp
src/main/webapp/HG/KC/HGKC006.jsp
+8
-2
HGKC006A.js
src/main/webapp/HG/KC/HGKC006A.js
+12
-59
HGKC006A.jsp
src/main/webapp/HG/KC/HGKC006A.jsp
+4
-6
HGKC007A.js
src/main/webapp/HG/KC/HGKC007A.js
+0
-157
HGKC007A.jsp
src/main/webapp/HG/KC/HGKC007A.jsp
+7
-8
HGKC009.jsp
src/main/webapp/HG/KC/HGKC009.jsp
+9
-9
HGKC012.jsp
src/main/webapp/HG/KC/HGKC012.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC005.java
View file @
4b1ca3fc
...
...
@@ -56,6 +56,7 @@ public class HGKC005 extends DaoEPBase {
public
static
final
String
FIELD_DELETE_FLAG
=
"deleteFlag"
;
/* 是否删除0.否1.是*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态*/
public
static
final
String
FIELD_IS_AMOUNT
=
"isAmount"
;
public
static
final
String
FIELD_SPEC
=
"spec"
;
/* 规格*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -130,6 +131,7 @@ public class HGKC005 extends DaoEPBase {
private
String
updatedTime
=
" "
;
/* 更新时间*/
private
Integer
deleteFlag
=
0
;
/* 是否删除0.否1.是*/
private
Integer
submitStatus
;
/* 提交状态*/
private
String
spec
=
" "
;
/* 规格*/
/**
* initialize the metadata.
...
...
@@ -294,6 +296,9 @@ public class HGKC005 extends DaoEPBase {
eiColumn
.
setDescName
(
"提交状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SPEC
);
eiColumn
.
setDescName
(
"规格"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -824,6 +829,14 @@ public class HGKC005 extends DaoEPBase {
this
.
submitStatus
=
submitStatus
;
}
public
String
getSpec
()
{
return
spec
;
}
public
void
setSpec
(
String
spec
)
{
this
.
spec
=
spec
;
}
/**
* get the value from Map.
*
...
...
@@ -865,6 +878,7 @@ public class HGKC005 extends DaoEPBase {
setUpdatedTime
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_UPDATED_TIME
)),
updatedTime
));
setDeleteFlag
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DELETE_FLAG
)),
deleteFlag
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SPEC
)),
spec
));
}
/**
...
...
@@ -907,6 +921,7 @@ public class HGKC005 extends DaoEPBase {
map
.
put
(
FIELD_UPDATED_TIME
,
StringUtils
.
toString
(
updatedTime
,
eiMetadata
.
getMeta
(
FIELD_UPDATED_TIME
)));
map
.
put
(
FIELD_DELETE_FLAG
,
StringUtils
.
toString
(
deleteFlag
,
eiMetadata
.
getMeta
(
FIELD_DELETE_FLAG
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_SPEC
,
StringUtils
.
toString
(
spec
,
eiMetadata
.
getMeta
(
FIELD_SPEC
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC006.java
View file @
4b1ca3fc
...
...
@@ -5,6 +5,8 @@ import java.math.BigDecimal;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
...
...
@@ -61,6 +63,7 @@ public class HGKC006 extends DaoEPBase {
public
static
final
String
FIELD_PART_SPEC
=
"partSpec"
;
/* 零件规格*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态*/
public
static
final
String
FIELD_SOURCE
=
"source"
;
/* 数据来源*/
public
static
final
String
FIELD_SOURCE_CODE
=
"sourceCode"
;
/* 来源编号*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -108,6 +111,7 @@ public class HGKC006 extends DaoEPBase {
public
static
final
String
UPDATE
=
"HGKC006.update"
;
public
static
final
String
DELETE
=
"HGKC006.delete"
;
public
static
final
String
CHECK
=
"HGKC006.check"
;
public
static
final
String
MAX_ID
=
"HGKC006.maxId"
;
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
...
...
@@ -148,6 +152,9 @@ public class HGKC006 extends DaoEPBase {
private
String
partSpec
=
" "
;
/* 零件规格*/
private
Integer
submitStatus
;
/* 提交状态*/
private
Integer
source
;
/* 数据来源*/
private
String
sourceCode
=
" "
;
/* 数据来源编码*/
private
List
<
HGKC006A
>
detailList
=
new
LinkedList
<>();
/**
* initialize the metadata.
...
...
@@ -330,7 +337,9 @@ public class HGKC006 extends DaoEPBase {
eiColumn
.
setDescName
(
"数据来源"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SOURCE_CODE
);
eiColumn
.
setDescName
(
"数据来源编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -964,6 +973,23 @@ public class HGKC006 extends DaoEPBase {
public
void
setSource
(
Integer
source
)
{
this
.
source
=
source
;
}
public
List
<
HGKC006A
>
getDetailList
()
{
return
detailList
;
}
public
void
setDetailList
(
List
<
HGKC006A
>
detailList
)
{
this
.
detailList
=
detailList
;
}
public
String
getSourceCode
()
{
return
sourceCode
;
}
public
void
setSourceCode
(
String
sourceCode
)
{
this
.
sourceCode
=
sourceCode
;
}
/**
* get the value from Map.
*
...
...
@@ -1011,6 +1037,7 @@ public class HGKC006 extends DaoEPBase {
setPartSpec
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PART_SPEC
)),
partSpec
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE
)),
source
));
setSourceCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE_CODE
)),
sourceCode
));
}
/**
...
...
@@ -1059,7 +1086,7 @@ public class HGKC006 extends DaoEPBase {
map
.
put
(
FIELD_PART_SPEC
,
StringUtils
.
toString
(
partSpec
,
eiMetadata
.
getMeta
(
FIELD_PART_SPEC
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_SOURCE
,
StringUtils
.
toString
(
source
,
eiMetadata
.
getMeta
(
FIELD_SOURCE
)));
map
.
put
(
FIELD_SOURCE_CODE
,
StringUtils
.
toString
(
sourceCode
,
eiMetadata
.
getMeta
(
FIELD_SOURCE_CODE
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC007.java
View file @
4b1ca3fc
...
...
@@ -5,6 +5,7 @@ import java.math.BigDecimal;
import
com.baosight.iplat4j.core.ei.EiColumn
;
import
com.baosight.iplat4j.core.data.DaoEPBase
;
import
java.util.HashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
import
com.baosight.iplat4j.core.util.StringUtils
;
...
...
@@ -48,6 +49,7 @@ public class HGKC007 extends DaoEPBase {
public
static
final
String
FIELD_PROJ_NAME
=
"projName"
;
/* 项目名称*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态*/
public
static
final
String
FIELD_SOURCE
=
"source"
;
/* 数据来源*/
public
static
final
String
FIELD_SOURCE_CODE
=
"sourceCode"
;
/* 来源编号*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -109,9 +111,10 @@ public class HGKC007 extends DaoEPBase {
private
String
projName
=
" "
;
/* 项目名称*/
private
Integer
submitStatus
;
/* 提交状态*/
private
Integer
source
;
/* 数据来源*/
private
String
sourceCode
=
" "
;
/* 数据来源编码*/
//生成其他入库单明细数据
private
List
<
HGKC007A
>
detailList
;
private
List
<
HGKC007A
>
detailList
=
new
LinkedList
<>()
;
/**
* initialize the metadata.
...
...
@@ -220,7 +223,9 @@ public class HGKC007 extends DaoEPBase {
eiColumn
.
setDescName
(
"数据来源"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SOURCE_CODE
);
eiColumn
.
setDescName
(
"数据来源编码"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -639,6 +644,14 @@ public class HGKC007 extends DaoEPBase {
this
.
detailList
=
detailList
;
}
public
String
getSourceCode
()
{
return
sourceCode
;
}
public
void
setSourceCode
(
String
sourceCode
)
{
this
.
sourceCode
=
sourceCode
;
}
/**
* get the value from Map.
*
...
...
@@ -672,6 +685,7 @@ public class HGKC007 extends DaoEPBase {
setProjName
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PROJ_NAME
)),
projName
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setSource
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE
)),
source
));
setSourceCode
(
StringUtils
.
defaultIfEmpty
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SOURCE_CODE
)),
sourceCode
));
}
/**
...
...
@@ -706,7 +720,7 @@ public class HGKC007 extends DaoEPBase {
map
.
put
(
FIELD_PROJ_NAME
,
StringUtils
.
toString
(
projName
,
eiMetadata
.
getMeta
(
FIELD_PROJ_NAME
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_SOURCE
,
StringUtils
.
toString
(
source
,
eiMetadata
.
getMeta
(
FIELD_SOURCE
)));
map
.
put
(
FIELD_SOURCE_CODE
,
StringUtils
.
toString
(
sourceCode
,
eiMetadata
.
getMeta
(
FIELD_SOURCE_CODE
)));
return
map
;
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
View file @
4b1ca3fc
...
...
@@ -3,18 +3,19 @@ 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.InventTypeEnum
;
import
com.baosight.hggp.common.InventorySource
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.cw.tools.HGCWTools
;
import
com.baosight.hggp.hg.cw.vo.UserVO
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.domain.HGKC005
;
import
com.baosight.hggp.hg.kc.domain.HGKC007
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
import
com.baosight.hggp.hg.pz.tools.HGPZTools
;
import
com.baosight.hggp.hg.sc.domain.HGSC004A
;
import
com.baosight.hggp.hg.sc.tools.HGSCTools
;
import
com.baosight.hggp.hg.yx.domain.HGYX001
;
import
com.baosight.hggp.util.*
;
...
...
@@ -29,10 +30,7 @@ import com.baosight.iplat4j.ed.util.SequenceGenerator;
import
org.apache.commons.collections.MapUtils
;
import
java.math.BigDecimal
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.*
;
/**
* @author LiuYang
...
...
@@ -132,9 +130,10 @@ public class ServiceHGKC005 extends ServiceEPBase {
if
(
fKc005
.
getId
()
==
null
||
fKc005
.
getId
()
==
0
)
{
this
.
addData
(
fKc005
);
}
else
{
HGKC005
oldFKc005
=
HGKCTools
.
HgKc005
.
getId
(
fKc005
.
getId
());
// 设置基础信息
this
.
set
BaseInfo
(
f
Kc005
);
DaoUtils
.
update
(
HGKC005
.
UPDATE
,
f
Kc005
);
this
.
set
UpdateBaseInfo
(
fKc005
,
oldF
Kc005
);
DaoUtils
.
update
(
HGKC005
.
UPDATE
,
oldF
Kc005
);
}
}
}
...
...
@@ -150,6 +149,7 @@ public class ServiceHGKC005 extends ServiceEPBase {
fKc005
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
// 生成单据号
fKc005
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CHECK_NO
));
// fKc005.setCompanyCode();
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
fKc005
);
}
...
...
@@ -197,17 +197,27 @@ public class ServiceHGKC005 extends ServiceEPBase {
fKc005
.
setWhName
(
HGPZTools
.
HgPz007
.
get
(
fKc005
.
getWhCode
()).
getWhName
());
// 存货名称
fKc005
.
setInventName
(
HGPZTools
.
HgPz005
.
getByCode
(
fKc005
.
getInventCode
()).
getInventName
());
// 根据规格计算账面单重
BigDecimal
unitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
fKc005
.
getInventCode
());
fKc005
.
setBookUnitWeight
(
unitWeight
);
fKc005
.
setEntityUnitWeight
(
unitWeight
);
// 计算总重
fKc005
.
setBookWeight
(
fKc005
.
getBookAmount
().
multiply
(
unitWeight
).
divide
(
new
BigDecimal
(
"1000"
)));
fKc005
.
setEntityWeight
(
fKc005
.
getEntityAmount
().
multiply
(
unitWeight
).
divide
(
new
BigDecimal
(
"1000"
)));
}
/**
* 设置基础信息
*
* @param fKc005
* @param oldFKc005
*/
private
void
setUpdateBaseInfo
(
HGKC005
fKc005
,
HGKC005
oldFKc005
)
{
// 去除日期字符串中的-
oldFKc005
.
setReceiptDate
(
StringUtil
.
removeHorizontalLine
(
fKc005
.
getReceiptDate
()));
// 实物重量
oldFKc005
.
setEntityWeight
(
fKc005
.
getEntityWeight
());
// 实物数量
oldFKc005
.
setEntityAmount
(
fKc005
.
getEntityAmount
());
// 差异数量
fKc005
.
setDiffAmount
(
fKc005
.
getEntityAmount
().
subtract
(
fKc005
.
getBookAmount
()
));
oldFKc005
.
setDiffAmount
(
fKc005
.
getDiffAmount
(
));
// 差异重量
fKc005
.
setDiffWeight
(
fKc005
.
getEntityWeight
().
subtract
(
fKc005
.
getBookWeight
()));
oldFKc005
.
setDiffWeight
(
fKc005
.
getDiffWeight
());
// 备注
oldFKc005
.
setRemark
(
fKc005
.
getRemark
());
}
/**
...
...
@@ -248,18 +258,6 @@ public class ServiceHGKC005 extends ServiceEPBase {
HGKC005
fKc005
=
new
HGKC005
();
fKc005
.
fromMap
(
resultRows
.
get
(
i
));
DaoUtils
.
update
(
HGKC005
.
DELETE
,
fKc005
);
// 原盘点单
HGKC005
dbKc005
=
mapKc005
.
get
(
fKc005
.
getCheckNo
());
// 生成红冲记录
HGKC005
newKc005
=
BeanUtils
.
copy
(
dbKc005
,
HGKC005
.
class
);
newKc005
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CHECK_NO
));
newKc005
.
setDiffAmount
(
dbKc005
.
getDiffAmount
().
negate
());
newKc005
.
setDiffWeight
(
dbKc005
.
getDiffWeight
().
negate
());
newKc005
.
setOldCheckNo
(
dbKc005
.
getCheckNo
());
newKc005
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
newKc005
);
// 修改库存
HGKCTools
.
updateStock
(
newKc005
);
}
}
...
...
@@ -283,10 +281,10 @@ public class ServiceHGKC005 extends ServiceEPBase {
this
.
checkSubmitData
(
hgkc005
);
DaoUtils
.
update
(
HGKC005
.
UPDATE_SUBMIT_STATUS
,
hgkc005
);
//存在差异数量
if
(
hgkc005
.
getDiffAmount
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
setHgkc007
(
hgkc005
);
// //修改计划生产任务完工数量
// HGSCTools.complete(hgkc003.getQualityId(),hgkc003.getInvQty().intValue(),hgkc003.getRectificationId(),HGConstant.StorageType.RK);
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"提交"
)});
...
...
@@ -306,8 +304,89 @@ public class ServiceHGKC005 extends ServiceEPBase {
* @param hgkc005
*/
private
void
setHgkc007
(
HGKC005
hgkc005
)
{
HGPZ005
hgpz005
=
HGPZTools
.
HgPz005
.
get
(
hgkc005
.
getInventCode
());
UserVO
userVO
=
HGCWTools
.
HgCw002
.
getUserCompany
();
//如果差异数量小于0则为盘亏,生成出库单
if
(
hgkc005
.
getDiffAmount
().
compareTo
(
BigDecimal
.
ZERO
)
<
0
){
HGKC007
hgkc007
=
new
HGKC007
();
Long
maxId
=
(
Long
)
super
.
dao
.
get
(
HGKC007
.
MAX_ID
,
null
,
null
);
hgkc007
.
setId
(
maxId
+
1
);
hgkc007
.
setOtherOutNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
OTHER_OUT_NO
));
hgkc007
.
setCompanyCode
(
userVO
.
getUsercode
());
hgkc007
.
setCompanyName
(
userVO
.
getUsername
());
hgkc007
.
setOtherOutDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc007
.
setWhCode
(
hgkc005
.
getWhCode
());
hgkc007
.
setWhName
(
hgkc005
.
getWhName
());
hgkc007
.
setSource
(
InventorySource
.
INVENTORY
.
getCode
());
hgkc007
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
hgkc007
.
setSourceCode
(
hgkc005
.
getCheckNo
());
//明细数据处理
HGKC007A
hgkc007A
=
new
HGKC007A
();
hgkc007A
.
setPrimaryId
(
hgkc007
.
getId
());
hgkc007A
.
setCompanyCode
(
hgkc007
.
getCompanyCode
());
hgkc007A
.
setCompanyName
(
hgkc007
.
getCompanyName
());
hgkc007A
.
setOtherOutDate
(
hgkc007
.
getOtherOutDate
());
hgkc007A
.
setOtherOutNo
(
hgkc007
.
getOtherOutNo
());
hgkc007A
.
setWhCode
(
hgkc007
.
getWhCode
());
hgkc007A
.
setWhName
(
hgkc007
.
getWhName
());
hgkc007A
.
setInventRecordId
(
hgkc005
.
getInventRecordId
());
hgkc007A
.
setInventType
(
hgkc005
.
getInventType
());
hgkc007A
.
setInventCode
(
hgkc005
.
getInventCode
());
hgkc007A
.
setInventName
(
hgkc005
.
getInventName
());
//其他出库单的数量为正数
hgkc007A
.
setInvQty
(
hgkc005
.
getDiffAmount
().
negate
());
hgkc007A
.
setInvUnitWeight
(
hgkc005
.
getBookUnitWeight
());
hgkc007A
.
setInvWeight
(
hgkc005
.
getDiffWeight
().
negate
());
hgkc007A
.
setPrdtLength
(
hgpz005
.
getLength
());
hgkc007A
.
setPrdtWidth
(
hgpz005
.
getWidth
());
hgkc007A
.
setPrdtThick
(
hgpz005
.
getThick
());
hgkc007A
.
setPrdtSpec
(
hgpz005
.
getSpec
());
hgkc007A
.
setSource
(
InventorySource
.
INVENTORY
.
getCode
());
hgkc007A
.
setInventTypeDetail
(
hgpz005
.
getInventTypeDetail
());
hgkc007
.
getDetailList
().
add
(
hgkc007A
);
HGKCTools
.
HgKc007
.
generateHgkc007
(
hgkc007
);
}
//如果差异数量大于0则为盘盈,生成入库单
if
(
hgkc005
.
getDiffAmount
().
compareTo
(
BigDecimal
.
ZERO
)
>
0
){
HGKC006
hgkc006
=
new
HGKC006
();
Long
maxId
=
(
Long
)
super
.
dao
.
get
(
HGKC006
.
MAX_ID
,
null
,
null
);
hgkc006
.
setId
(
maxId
+
1
);
hgkc006
.
setOtherEnterNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
OTHER_ENTER_NO
));
hgkc006
.
setCompanyCode
(
userVO
.
getUsercode
());
hgkc006
.
setCompanyName
(
userVO
.
getUsername
());
hgkc006
.
setOtherEnterDate
(
DateUtils
.
formatShort
(
DateUtils
.
date
()));
hgkc006
.
setWhCode
(
hgkc005
.
getWhCode
());
hgkc006
.
setWhName
(
hgkc005
.
getWhName
());
hgkc006
.
setSource
(
InventorySource
.
INVENTORY
.
getCode
());
hgkc006
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
hgkc006
.
setSourceCode
(
hgkc005
.
getCheckNo
());
//明细数据处理
HGKC006A
hgkc006A
=
new
HGKC006A
();
hgkc006A
.
setPrimaryId
(
hgkc006
.
getId
());
hgkc006A
.
setCompanyCode
(
hgkc006
.
getCompanyCode
());
hgkc006A
.
setCompanyName
(
hgkc006
.
getCompanyName
());
hgkc006A
.
setOtherEnterDate
(
hgkc006
.
getOtherEnterDate
());
hgkc006A
.
setOtherEnterNo
(
hgkc006
.
getOtherEnterNo
());
hgkc006A
.
setWhCode
(
hgkc006
.
getWhCode
());
hgkc006A
.
setWhName
(
hgkc006
.
getWhName
());
hgkc006A
.
setInventRecordId
(
hgkc005
.
getInventRecordId
());
hgkc006A
.
setInventType
(
hgkc005
.
getInventType
());
hgkc006A
.
setInventCode
(
hgkc005
.
getInventCode
());
hgkc006A
.
setInventName
(
hgkc005
.
getInventName
());
hgkc006A
.
setInvQty
(
hgkc005
.
getDiffAmount
());
hgkc006A
.
setInvUnitWeight
(
hgkc005
.
getBookUnitWeight
());
hgkc006A
.
setInvWeight
(
hgkc005
.
getDiffWeight
());
hgkc006A
.
setPrdtLength
(
hgpz005
.
getLength
());
hgkc006A
.
setPrdtWidth
(
hgpz005
.
getWidth
());
hgkc006A
.
setPrdtThick
(
hgpz005
.
getThick
());
hgkc006A
.
setPrdtSpec
(
hgpz005
.
getSpec
());
hgkc006A
.
setSource
(
InventorySource
.
INVENTORY
.
getCode
());
hgkc006A
.
setInventTypeDetail
(
hgpz005
.
getInventTypeDetail
());
hgkc006
.
getDetailList
().
add
(
hgkc006A
);
HGKCTools
.
HgKc006
.
generateHgkc006
(
hgkc006
);
}
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005A.java
View file @
4b1ca3fc
...
...
@@ -132,16 +132,17 @@ public class ServiceHGKC005A extends ServiceEPBase {
Long
kcId
=
MapUtils
.
getLong
(
row
,
HGKC005
.
FIELD_ID
);
HGKC010
dbKc010
=
dbKc010Map
.
get
(
kcId
);
// 生成盘点单
HGKC005
newKc005
=
BeanUtils
.
copy
(
dbKc010
,
HGKC005
.
class
);
HGKC005
newKc005
=
new
HGKC005
();
BeanUtils
.
copyProperties
(
dbKc010
,
newKc005
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
,
"depCode"
);
newKc005
.
setCheckNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CHECK_NO
));
newKc005
.
setReceiptDate
(
DateUtils
.
shortDate
());
newKc005
.
setEntityAmount
(
entityAmount
);
newKc005
.
setEntityAmount
(
dbKc010
.
getInvQty
()
);
newKc005
.
setEntityUnitWeight
(
dbKc010
.
getInvUnitWeight
());
newKc005
.
setEntityWeight
(
dbKc010
.
getInv
UnitWeight
().
multiply
(
entityAmount
).
divide
(
new
BigDecimal
(
"1000"
)
));
newKc005
.
setEntityWeight
(
dbKc010
.
getInv
Weight
(
));
newKc005
.
setBookAmount
(
dbKc010
.
getInvQty
());
newKc005
.
setBookUnitWeight
(
dbKc010
.
getInvUnitWeight
());
newKc005
.
setBookWeight
(
dbKc010
.
getInvWeight
());
newKc005
.
setDiffAmount
(
entityAmount
.
subtract
(
dbKc010
.
getInvQty
()));
newKc005
.
setDiffAmount
(
BigDecimal
.
ZERO
);
//默认差异数量为0
newKc005
.
setDiffWeight
(
newKc005
.
getEntityWeight
().
subtract
(
dbKc010
.
getInvWeight
()));
newKc005
.
setKcId
(
kcId
);
newKc005
.
setRemark
(
entityRemark
);
...
...
@@ -149,8 +150,6 @@ public class ServiceHGKC005A extends ServiceEPBase {
newKc005
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
newKc005
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
DaoUtils
.
insert
(
HGKC005
.
INSERT
,
newKc005
);
HGKCTools
.
updateStock
(
newKc005
);
}
}
}
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC003.xml
View file @
4b1ca3fc
...
...
@@ -3,6 +3,7 @@
<sqlMap
namespace=
"HGKC003"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC005.xml
View file @
4b1ca3fc
...
...
@@ -4,6 +4,7 @@
<typeAlias
alias=
"HGKC005"
type=
"com.baosight.hggp.hg.kc.domain.HGKC005"
/>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -103,6 +104,9 @@
<isNotEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"spec"
>
SPEC = #spec#
</isNotEmpty>
</sql>
<sql
id=
"customCondition"
>
<isNotEmpty
prepend=
" AND "
property=
"checkNos"
>
...
...
@@ -158,6 +162,7 @@
UPDATED_NAME as "updatedName",
<!-- 更新人名称 -->
UPDATED_TIME as "updatedTime",
<!-- 更新时间 -->
DELETE_FLAG as "deleteFlag",
<!-- 是否删除0.否1.是 -->
SPEC as "spec",
<!-- 规格 -->
SUBMIT_STATUS as "submitStatus"
<!-- 提交状态 -->
FROM ${hggpSchema}.HGKC005 WHERE 1=1
<include
refid=
"condition"
/>
...
...
@@ -167,7 +172,7 @@
$orderBy$
</isNotEmpty>
<isEmpty
property=
"orderBy"
>
CREATED_TIME desc, ID
a
sc
CREATED_TIME desc, ID
de
sc
</isEmpty>
</dynamic>
...
...
@@ -226,9 +231,10 @@
UPDATED_NAME,
<!-- 更新人名称 -->
UPDATED_TIME,
<!-- 更新时间 -->
DELETE_FLAG,
<!-- 是否删除0.否1.是 -->
SPEC,
<!-- 规格 -->
SUBMIT_STATUS
<!-- 提交状态 -->
)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #submitStatus#)
VALUES (#accountCode#, #depCode#, #receiptDate#, #checkNo#, #companyCode#, #companyName#, #whCode#, #whName#, #inventType#, #inventCode#, #inventName#, #inventRecordId#, #bookAmount#, #bookUnitWeight#, #bookWeight#, #entityAmount#, #entityUnitWeight#, #entityWeight#, #diffAmount#, #diffWeight#, #kcId#, #status#, #remark#, #oldCheckNo#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #s
pec#, #s
ubmitStatus#)
</insert>
<delete
id=
"delete"
>
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC006.xml
View file @
4b1ca3fc
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<!-- table information
Generate time : 2024-05-24 16:39:20
Version : 1.0
schema : hggp
tableName : HGKC006
ID BIGINT NOT NULL primarykey,
ACCOUNT_CODE VARCHAR,
DEP_CODE VARCHAR,
CREATED_BY VARCHAR NOT NULL,
CREATED_NAME VARCHAR NOT NULL,
CREATED_TIME VARCHAR NOT NULL,
UPDATED_BY VARCHAR NOT NULL,
UPDATED_NAME VARCHAR NOT NULL,
UPDATED_TIME VARCHAR NOT NULL,
DELETE_FLAG TINYINT,
COMPANY_CODE VARCHAR,
COMPANY_NAME VARCHAR,
OTHER_ENTER_DATE VARCHAR,
OTHER_ENTER_NO VARCHAR NOT NULL,
WH_CODE VARCHAR,
WH_NAME VARCHAR,
OTHER_ENTER_NO_OLD VARCHAR,
REMARK VARCHAR,
FACTORY_CODE VARCHAR,
PROD_ORDER_NO VARCHAR,
PROD_TASK_NO VARCHAR,
PROJ_CODE VARCHAR,
PROJ_NAME VARCHAR,
PRDT_TYPE TINYINT,
PRDT_CODE VARCHAR,
PRDT_NAME VARCHAR,
PRDT_LENGTH DECIMAL,
PRDT_WIDTH DECIMAL,
PRDT_THICK DECIMAL,
PRDT_SPEC VARCHAR,
PART_TYPE TINYINT,
PART_CODE VARCHAR,
PART_NAME VARCHAR,
PART_LENGTH DECIMAL,
PART_WIDTH DECIMAL,
PART_THICK DECIMAL,
PART_SPEC VARCHAR,
SUBMIT_STATUS TINYINT,
SOURCE TINYINT
-->
<!DOCTYPE sqlMap PUBLIC "-//ibatis.apache.org//DTD SQL Map 2.0//EN" "http://ibatis.apache.org/dtd/sql-map-2.dtd">
<sqlMap
namespace=
"HGKC006"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -164,6 +121,9 @@
<isNotEmpty
prepend=
" AND "
property=
"source"
>
SOURCE = #source#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"sourceCode"
>
SOURCE_CODE = #sourceCode#
</isNotEmpty>
</sql>
<select
id=
"query"
parameterClass=
"java.util.HashMap"
...
...
@@ -207,6 +167,7 @@
PART_THICK as "partThick",
<!-- 零件-厚 -->
PART_SPEC as "partSpec",
<!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC006 WHERE 1=1 and DELETE_FLAG = 0
<include
refid=
"condition"
/>
...
...
@@ -233,125 +194,6 @@
<delete
id=
"delete"
>
UPDATE ${hggpSchema}.HGKC006 SET DELETE_FLAG = 1 WHERE ID = #id#
</delete>
<!--
<isNotEmpty prepend=" AND " property="id">
ID = #id#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="accountCode">
ACCOUNT_CODE = #accountCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="depCode">
DEP_CODE = #depCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdBy">
CREATED_BY = #createdBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdName">
CREATED_NAME = #createdName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="createdTime">
CREATED_TIME = #createdTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedBy">
UPDATED_BY = #updatedBy#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedName">
UPDATED_NAME = #updatedName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="updatedTime">
UPDATED_TIME = #updatedTime#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="deleteFlag">
DELETE_FLAG = #deleteFlag#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyCode">
COMPANY_CODE = #companyCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="companyName">
COMPANY_NAME = #companyName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterDate">
OTHER_ENTER_DATE = #otherEnterDate#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNo">
OTHER_ENTER_NO = #otherEnterNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whCode">
WH_CODE = #whCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="whName">
WH_NAME = #whName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="otherEnterNoOld">
OTHER_ENTER_NO_OLD = #otherEnterNoOld#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="remark">
REMARK = #remark#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="factoryCode">
FACTORY_CODE = #factoryCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodOrderNo">
PROD_ORDER_NO = #prodOrderNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prodTaskNo">
PROD_TASK_NO = #prodTaskNo#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projCode">
PROJ_CODE = #projCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="projName">
PROJ_NAME = #projName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtType">
PRDT_TYPE = #prdtType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtCode">
PRDT_CODE = #prdtCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtName">
PRDT_NAME = #prdtName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtLength">
PRDT_LENGTH = #prdtLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtWidth">
PRDT_WIDTH = #prdtWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtThick">
PRDT_THICK = #prdtThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="prdtSpec">
PRDT_SPEC = #prdtSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partType">
PART_TYPE = #partType#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partCode">
PART_CODE = #partCode#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partName">
PART_NAME = #partName#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partLength">
PART_LENGTH = #partLength#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partWidth">
PART_WIDTH = #partWidth#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partThick">
PART_THICK = #partThick#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="partSpec">
PART_SPEC = #partSpec#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="submitStatus">
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty prepend=" AND " property="source">
SOURCE = #source#
</isNotEmpty>
-->
<insert
id=
"insert"
>
INSERT INTO ${hggpSchema}.HGKC006 (ID,
...
...
@@ -392,9 +234,10 @@
PART_THICK,
<!-- 零件-厚 -->
PART_SPEC,
<!-- 零件规格 -->
SUBMIT_STATUS,
<!-- 提交状态 -->
SOURCE_CODE,
<!-- 数据来源编号 -->
SOURCE
<!-- 数据来源 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #submitStatus#, #source#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherEnterDate#, #otherEnterNo#, #whCode#, #whName#, #otherEnterNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #prdtType#, #prdtCode#, #prdtName#, #prdtLength#, #prdtWidth#, #prdtThick#, #prdtSpec#, #partType#, #partCode#, #partName#, #partLength#, #partWidth#, #partThick#, #partSpec#, #submitStatus#, #source
Code#, #source
#)
</insert>
...
...
@@ -439,6 +282,7 @@
PART_THICK = #partThick#,
<!-- 零件-厚 -->
PART_SPEC = #partSpec#,
<!-- 零件规格 -->
SUBMIT_STATUS = #submitStatus#,
<!-- 提交状态 -->
SOURCE_CODE = #sourceCode#,
<!-- 提交状态 -->
SOURCE = #source#
<!-- 数据来源 -->
WHERE
ID = #id#
...
...
@@ -485,6 +329,7 @@
PART_THICK as "partThick",
<!-- 零件-厚 -->
PART_SPEC as "partSpec",
<!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC006 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
...
@@ -575,6 +420,7 @@
PART_THICK as "partThick",
<!-- 零件-厚 -->
PART_SPEC as "partSpec",
<!-- 零件规格 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC006 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"billDate"
>
...
...
@@ -594,4 +440,9 @@
</select>
<select
id=
"maxId"
resultClass=
"long"
>
SELECT MAX(ID) AS "id" FROM ${hggpSchema}.HGKC006
</select>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC007.xml
View file @
4b1ca3fc
...
...
@@ -3,6 +3,7 @@
<sqlMap
namespace=
"HGKC007"
>
<sql
id=
"condition"
>
<include
refid=
"HGXSDataAuth.authCondition"
/>
<isNotEmpty
prepend=
" AND "
property=
"id"
>
ID = #id#
</isNotEmpty>
...
...
@@ -107,6 +108,7 @@
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC007 WHERE 1=1 and DELETE_FLAG = 0
<include
refid=
"condition"
/>
...
...
@@ -155,9 +157,10 @@
PROJ_CODE,
<!-- 项目编码 -->
PROJ_NAME,
<!-- 项目名称 -->
SUBMIT_STATUS,
<!-- 提交状态 -->
SOURCE_CODE,
<!-- 数据来源编号 -->
SOURCE
<!-- 数据来源 -->
)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#, #otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #submitStatus#, #source#)
VALUES (#id#, #accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#, #updatedBy#, #updatedName#, #updatedTime#, #deleteFlag#, #companyCode#, #companyName#, #otherOutDate#, #otherOutNo#, #whCode#, #whName#, #otherOutNoOld#, #remark#, #factoryCode#, #prodOrderNo#, #prodTaskNo#, #projCode#, #projName#, #submitStatus#, #source
Code#, #source
#)
</insert>
<delete
id=
"delete"
>
...
...
@@ -190,6 +193,7 @@
PROJ_CODE = #projCode#,
<!-- 项目编码 -->
PROJ_NAME = #projName#,
<!-- 项目名称 -->
SUBMIT_STATUS = #submitStatus#,
<!-- 提交状态 -->
SOURCE_CODE = #sourceCode#,
<!-- 数据来源编号 -->
SOURCE = #source#
<!-- 数据来源 -->
WHERE
ID = #id#
...
...
@@ -222,6 +226,7 @@
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC007 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
...
@@ -299,6 +304,7 @@
PROJ_CODE as "projCode",
<!-- 项目编码 -->
PROJ_NAME as "projName",
<!-- 项目名称 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
SOURCE_CODE as "sourceCode",
<!-- 数据来源编号 -->
SOURCE as "source"
<!-- 数据来源 -->
FROM ${hggpSchema}.HGKC007 WHERE 1=1 and DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"billDate"
>
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
4b1ca3fc
...
...
@@ -661,6 +661,27 @@ public class HGKCTools {
AssertUtils
.
isEmpty
(
paramMap
,
"时间不能为空"
);
return
DaoBase
.
getInstance
().
query
(
"HGKC006.queryCheckList"
,
paramMap
);
}
public
static
void
generateHgkc006
(
HGKC006
hgkc006
)
{
checkData
(
hgkc006
);
DaoUtils
.
insert
(
HGKC006
.
INSERT
,
hgkc006
);
DaoUtils
.
insertBatch
(
HGKC006A
.
INSERT
,
hgkc006
.
getDetailList
());
}
private
static
void
checkData
(
HGKC006
hgkc006
)
{
AssertUtils
.
isEmpty
(
hgkc006
.
getDetailList
(),
"其它入库单明细不能为空"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc006
.
getId
())||
hgkc006
.
getId
()<=
0
,
"其它入库单ID不能为空!"
);
AssertUtils
.
isTrue
(
Objects
.
isNull
(
hgkc006
.
getSource
())||
hgkc006
.
getSource
()<=
0
,
"其它入库单数据来源不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
hgkc006
.
getWhCode
()),
"其它入库单仓库不能为空!"
);
hgkc006
.
getDetailList
().
forEach
(
o
->{
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getWhCode
()),
"其它入库单明细仓库不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getInventCode
()),
"其它入库单明细存货编码不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getInventName
()),
"其它入库单明细存货名称不能为空!"
);
AssertUtils
.
isTrue
(
o
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它入库单明细数量不能小于等于0!"
);
AssertUtils
.
isTrue
(
o
.
getInvUnitWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它入库单明细单重小于等于0!"
);
AssertUtils
.
isTrue
(
o
.
getInvWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它入库单明细总重小于等于0!"
);
});
}
}
public
static
class
HgKc006A
{
...
...
@@ -706,6 +727,9 @@ public class HGKCTools {
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getWhCode
()),
"其它出库单明细仓库不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getInventCode
()),
"其它出库单明细存货编码不能为空!"
);
AssertUtils
.
isTrue
(
StringUtils
.
isBlank
(
o
.
getInventName
()),
"其它出库单明细存货名称不能为空!"
);
AssertUtils
.
isTrue
(
o
.
getInvQty
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它出库单明细数量不能小于等于0!"
);
AssertUtils
.
isTrue
(
o
.
getInvUnitWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它出库单明细单重小于等于0!"
);
AssertUtils
.
isTrue
(
o
.
getInvWeight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
,
"其它出库单明细总重小于等于0!"
);
});
}
...
...
src/main/resources/resources/ibatis/sqlmap-config.xml
View file @
4b1ca3fc
...
...
@@ -26,14 +26,14 @@
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC001.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC002.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC003.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC005.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC006.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC006A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC007.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC007A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC008.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC004A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC010.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC010A.xml"
/>
<sqlMap
resource=
"com/baosight/hggp/hg/kc/sql/HGKC011.xml"
/>
...
...
src/main/webapp/HG/KC/HGKC003A.jsp
View file @
4b1ca3fc
...
...
@@ -38,7 +38,7 @@
hidden=
"true"
/>
<EF:EFColumn
ename=
"unCompleteNum"
cname=
"待入库数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"num"
cname=
"任务数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"任务重量
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"totalWt"
cname=
"任务重量
(KG)
"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"factoryName"
cname=
"工厂"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"orgName"
cname=
"生产组名称"
enable=
"false"
width=
"150"
align=
"center"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"物料编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
...
...
src/main/webapp/HG/KC/HGKC005.js
View file @
4b1ca3fc
...
...
@@ -38,6 +38,25 @@ $(function() {
}
}],
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
//差异数量计算
if
(
e
.
field
==
"entityAmount"
)
{
if
(
item
.
bookAmount
&&
item
.
entityAmount
){
let
diffAmount
=
item
.
entityAmount
-
item
.
bookAmount
;
resultGrid
.
setCellValue
(
item
,
'diffAmount'
,
diffAmount
)
}
if
(
item
.
bookUnitWeight
&&
item
.
entityAmount
&&
item
.
bookWeight
){
//实物重量=单重*数量
let
entityWeight
=
item
.
bookUnitWeight
*
item
.
entityAmount
;
resultGrid
.
setCellValue
(
item
,
'entityWeight'
,
entityWeight
)
//差异重量=实物重量-账面重量
let
diffWeight
=
entityWeight
-
item
.
bookWeight
;
resultGrid
.
setCellValue
(
item
,
'diffWeight'
,
diffWeight
)
}
}
});
},
onSave
:
function
(
e
)
{
// 阻止后台保存请求,使用自定义保存
...
...
src/main/webapp/HG/KC/HGKC005.jsp
View file @
4b1ca3fc
...
...
@@ -71,22 +71,20 @@
</EF:EFComboColumn>
<EF:EFColumn ename="inventCode" cname="存货编码" enable="false" width="100" align="center"/>
<EF:EFColumn ename="inventName" cname="存货名称" enable="false" width="100" align="center"/>
<EF:EFComboColumn ename="inventRecordId" cname="规格" enable="true" readonly="true" width="120" align="center"
blockName="spec_record_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#">
</EF:EFComboColumn>
<EF:EFColumn ename="spec" cname="规格" enable="false" width="100" align="center"/>
<EF:EFColumn ename="bookAmount" cname="账面数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all" required="true" enable="true"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
sumType="all" required="false" enable="false"/>
<EF:EFColumn ename="bookWeight" cname="账面重量(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all" />
<EF:EFColumn ename="bookUnitWeight" cname="单重(KG)" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" />
<EF:EFColumn ename="entityAmount" cname="实物数量" format="{0:N0}" maxLength="20" width="120" align="right"
sumType="all"
required="true" enable="true"
/>
<EF:EFColumn ename="entityWeight" cname="实物重量
(KG)
" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"/>
sumType="all"
enable="true" required="true"
/>
<EF:EFColumn ename="entityWeight" cname="实物重量
(KG)
" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all"
required="false"
/>
<EF:EFColumn ename="diffAmount" cname="差异数量" enable="false" format="{0:N0}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="diffWeight" cname="差异重量
(KG)
" enable="false" format="{0:N3}" maxLength="20" width="120"
<EF:EFColumn ename="diffWeight" cname="差异重量
(KG)
" enable="false" format="{0:N3}" maxLength="20" width="120"
align="right" sumType="all" readonly="true"/>
<EF:EFColumn ename="remark" cname="备注" width="150" />
<EF:EFColumn ename="oldCheckNo" cname="原盘点单号" enable="false" hidden="true" width="140" align="center"/>
...
...
src/main/webapp/HG/KC/HGKC005A.jsp
View file @
4b1ca3fc
...
...
@@ -55,7 +55,7 @@
<EF:EFColumn
ename=
"entityRemark"
cname=
"盘点说明"
width=
"150"
editType=
"textarea"
copy=
"true"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"库存数量"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"库存单重(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
hidden=
"true"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"库存单重(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N0}"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"库存重量(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"remark"
cname=
"备注"
enable=
"false"
width=
"150"
hidden=
"true"
/>
...
...
src/main/webapp/HG/KC/HGKC006.jsp
View file @
4b1ca3fc
...
...
@@ -38,8 +38,14 @@
<EF:EFGrid
blockId=
"result"
autoDraw=
"override"
isFloat=
"true"
checkMode=
"row"
>
<EF:EFColumn
ename=
"id"
cname=
"内码"
hidden=
"true"
/>
<EF:EFColumn
ename=
"operator"
cname=
"操作"
locked=
"true"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
width=
"120"
align=
"center"
enable=
"false"
/>
<EF:EFComboColumn
ename=
"companyCode"
cname=
"公司名称"
columnTemplate=
"#=textField#"
itemTemplate=
"#=textField#"
textField=
"textField"
valueField=
"valueField"
maxLength=
"16"
readonly=
"false"
width=
"200"
required=
"true"
align=
"center"
filter=
"contains"
sort=
"true"
>
<EF:EFOptions
blockId=
"roleCompany"
textField=
"companyName"
valueField=
"companyCode"
/>
</EF:EFComboColumn>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
hidden=
"true"
/>
<EF:EFColumn
ename=
"otherEnterDate"
cname=
"单据日期"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
required=
"true"
/>
<EF:EFColumn
ename=
"otherEnterNo"
cname=
"其他入库单号"
enable=
"false"
width=
"140"
align=
"center"
/>
...
...
src/main/webapp/HG/KC/HGKC006A.js
View file @
4b1ca3fc
...
...
@@ -45,40 +45,10 @@ $(function () {
}
},
{
field
:
"partSpec"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
partSpec
){
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
partSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
return
specBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
item
.
partSpec
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
specBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
},
{
field
:
"invQty"
,
template
:
function
(
item
)
{
if
(
Number
(
item
.
invQty
)
>
0
){
calUnitWeight
(
item
,
item
.
p
artLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
par
tCoefficient
);
calUnitWeight
(
item
,
item
.
p
rdtLength
,
item
.
prdtWidth
,
item
.
prdtThick
,
item
.
prd
tCoefficient
);
}
return
item
.
invQty
==
0
?
"-"
:
item
.
invQty
;
...
...
@@ -120,7 +90,7 @@ $(function () {
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
calUnitWeight
(
item
,
item
.
p
artLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
par
tCoefficient
);
calUnitWeight
(
item
,
item
.
p
rdtLength
,
item
.
prdtWidth
,
item
.
prdtThick
,
item
.
prd
tCoefficient
);
loadChange
(
grid
,
e
,
"price"
);
}
//单价计算
...
...
@@ -144,11 +114,10 @@ $(function () {
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'prdtThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
...
...
@@ -173,31 +142,15 @@ $(function () {
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
specBoxBlocks
[
0
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
specBoxBlocks
[
0
][
'valueField'
]);
resultGrid
.
setCellValue
(
item
,
'partLength'
,
specBoxBlocks
[
0
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
specBoxBlocks
[
0
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'partThick'
,
specBoxBlocks
[
0
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'partCoefficient'
,
specBoxBlocks
[
0
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'prdtSpec'
,
specBoxBlocks
[
0
][
'valueField'
]);
resultGrid
.
setCellValue
(
item
,
'prdtLength'
,
specBoxBlocks
[
0
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtWidth'
,
specBoxBlocks
[
0
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtThick'
,
specBoxBlocks
[
0
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'prdtCoefficient'
,
specBoxBlocks
[
0
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
calUnitWeight
(
item
,
item
.
partLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
partCoefficient
);
loadChange
(
grid
,
e
,
"invQty"
);
}
if
(
e
.
field
==
"partSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
partSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'partLength'
,
specBoxBlocks
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
specBoxBlocks
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
specBoxBlocks
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'partCoefficient'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
specBoxBlocks
[
i
][
'param5Field'
])
calUnitWeight
(
item
,
item
.
partLength
,
item
.
partWidth
,
item
.
partThick
,
item
.
partCoefficient
);
}
}
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
""
)
calUnitWeight
(
item
,
item
.
prdtLength
,
item
.
prdtWidth
,
item
.
prdtThick
,
item
.
prdtCoefficient
);
loadChange
(
grid
,
e
,
"invQty"
);
}
});
...
...
src/main/webapp/HG/KC/HGKC006A.jsp
View file @
4b1ca3fc
...
...
@@ -46,13 +46,11 @@
<EF:EFColumn
ename=
"inventTypeDetail"
cname=
"存货类别大类"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"220"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"160"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
enable=
"true"
/>
<EF:EFColumn
ename=
"partSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"prdtSpec"
cname=
"规格"
width=
"120"
align=
"center"
required=
"true"
enable=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"存货档案id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"partCoefficient"
cname=
"系数"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
...
...
src/main/webapp/HG/KC/HGKC007A.js
View file @
4b1ca3fc
...
...
@@ -14,81 +14,6 @@ $(function () {
},
columns
:
[
{
field
:
"inventCode"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
inventCode
){
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
item
.
inventName
=
inventRecordBoxBlocks
[
i
][
'textField'
];
template
=
inventRecordBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
inventRecordBoxBlocks
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
valueTemplate
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
template
:
"[#:valueField#]#:textField#[#:param3Field#]"
,
filter
:
"contains"
});
}
},
{
field
:
"partSpec"
,
template
:
function
(
item
)
{
let
template
=
""
;
if
(
item
.
partSpec
){
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
partSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
template
=
specBoxBlocks
[
i
][
'valueField'
];
}
}
}
return
template
;
},
editor
:
function
(
container
,
options
)
{
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
options
.
model
[
"whCode"
]);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
options
.
model
[
"companyCode"
]);
inInfo
.
set
(
"inqu_status-0-inventType"
,
options
.
model
[
"inventType"
]);
inInfo
.
set
(
"inqu_status-0-inventCode"
,
options
.
model
[
"inventCode"
]);
inInfo
.
set
(
"field"
,
options
.
field
);
let
dataSource
;
EiCommunicator
.
send
(
"HGKC010"
,
"querySpecBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
dataSource
=
ei
.
getBlock
(
"spec_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
var
input
=
$
(
'<input />'
);
input
.
attr
(
"name"
,
options
.
field
);
input
.
attr
(
"id"
,
options
.
field
);
input
.
appendTo
(
container
);
input
.
kendoDropDownList
({
dataSource
:
dataSource
,
minLength
:
0
,
dataTextField
:
"textField"
,
dataValueField
:
"valueField"
,
optionLabelTemplate
:
"[#:valueField#]#:textField#"
,
valueTemplate
:
"[#:valueField#]#:textField#"
,
template
:
"[#:valueField#]#:textField#"
,
filter
:
"contains"
});
}
},
{
field
:
"primaryId"
,
template
:
function
(
item
)
{
item
[
'primaryId'
]
=
$
(
"#inqu_status-0-primaryId"
).
val
();
...
...
@@ -112,88 +37,6 @@ $(function () {
loadComplete
:
function
(
grid
)
{
// 此grid对象
grid
.
dataSource
.
bind
(
"change"
,
function
(
e
)
{
var
item
=
e
.
items
[
0
];
//数量计算
if
(
e
.
field
==
"invQty"
)
{
if
(
item
.
invQty
&&
item
.
invUnitWeight
){
let
totalWeight
=
item
.
invQty
*
item
.
invUnitWeight
;
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
totalWeight
)
}
if
(
item
.
price
&&
item
.
invQty
){
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
loadChange
(
grid
,
e
,
"price"
);
}
//单价计算
if
(
e
.
field
==
"price"
)
{
if
(
item
.
price
&&
item
.
invQty
){
let
totalAmount
=
item
.
price
*
item
.
invQty
;
resultGrid
.
setCellValue
(
item
,
'amount'
,
totalAmount
)
}
}
if
(
e
.
field
==
"inventType"
)
{
//选择后,先加载此方法,再加载属性中的方法,所以存货类型加载时,先修改存货编号下拉框的查询
let
inInfo
=
new
EiInfo
();
inInfo
.
set
(
"inqu_status-0-whCode"
,
item
.
whCode
);
inInfo
.
set
(
"inqu_status-0-companyCode"
,
item
.
companyCode
);
inInfo
.
set
(
"inqu_status-0-inventType"
,
item
.
inventType
);
EiCommunicator
.
send
(
"HGKC010"
,
"queryInventCodeBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
inventRecordBoxBlocks
=
ei
.
getBlock
(
"invent_code_box_block_id"
).
getMappedRows
();
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
resultGrid
.
setCellValue
(
item
,
'inventCode'
,
""
)
resultGrid
.
setCellValue
(
item
,
'inventName'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partLength'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
""
)
resultGrid
.
setCellValue
(
item
,
'partThick'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invQty'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
""
)
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
""
)
loadChange
(
grid
,
e
,
"inventCode"
);
}
if
(
e
.
field
==
"inventCode"
)
{
for
(
let
i
=
0
;
i
<
inventRecordBoxBlocks
.
length
;
i
++
){
if
(
item
.
inventCode
===
inventRecordBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'inventType'
,
inventRecordBoxBlocks
[
i
][
'param1Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventName'
,
inventRecordBoxBlocks
[
i
][
'textField'
]);
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
inventRecordBoxBlocks
[
i
][
'param2Field'
]);
resultGrid
.
setCellValue
(
item
,
'partSpec'
,
inventRecordBoxBlocks
[
i
][
'param3Field'
]);
resultGrid
.
setCellValue
(
item
,
'partLength'
,
inventRecordBoxBlocks
[
i
][
'param4Field'
]);
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
inventRecordBoxBlocks
[
i
][
'param5Field'
]);
resultGrid
.
setCellValue
(
item
,
'partThick'
,
inventRecordBoxBlocks
[
i
][
'param6Field'
]);
resultGrid
.
setCellValue
(
item
,
'invQty'
,
inventRecordBoxBlocks
[
i
][
'param7Field'
]);
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
inventRecordBoxBlocks
[
i
][
'param8Field'
]);
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
inventRecordBoxBlocks
[
i
][
'param9Field'
]);
resultGrid
.
setCellValue
(
item
,
'inventTypeDetail'
,
inventRecordBoxBlocks
[
i
][
'param10Field'
]);
break
}
}
loadChange
(
grid
,
e
,
"price"
);
}
if
(
e
.
field
==
"partSpec"
)
{
for
(
let
i
=
0
;
i
<
specBoxBlocks
.
length
;
i
++
){
if
(
item
.
partSpec
===
specBoxBlocks
[
i
][
'valueField'
]){
resultGrid
.
setCellValue
(
item
,
'partLength'
,
specBoxBlocks
[
i
][
'param1Field'
])
resultGrid
.
setCellValue
(
item
,
'partWidth'
,
specBoxBlocks
[
i
][
'param2Field'
])
resultGrid
.
setCellValue
(
item
,
'partThick'
,
specBoxBlocks
[
i
][
'param3Field'
])
resultGrid
.
setCellValue
(
item
,
'invQty'
,
specBoxBlocks
[
i
][
'param4Field'
])
resultGrid
.
setCellValue
(
item
,
'invUnitWeight'
,
specBoxBlocks
[
i
][
'param5Field'
])
resultGrid
.
setCellValue
(
item
,
'invWeight'
,
specBoxBlocks
[
i
][
'param6Field'
])
resultGrid
.
setCellValue
(
item
,
'partSpecId'
,
specBoxBlocks
[
i
][
'param7Field'
])
break
}
}
resultGrid
.
setCellValue
(
item
,
'price'
,
""
)
resultGrid
.
setCellValue
(
item
,
'amount'
,
""
)
loadChange
(
grid
,
e
,
"invQty"
);
}
});
},
onSave
:
function
(
e
)
{
...
...
src/main/webapp/HG/KC/HGKC007A.jsp
View file @
4b1ca3fc
...
...
@@ -38,17 +38,16 @@
<EF:EFColumn
ename=
"inventTypeDetail"
cname=
"存货类型大类"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
width=
"220"
align=
"center"
required=
"true"
readonly=
"true"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
width=
"160"
align=
"center"
required=
"true"
enable=
"false"
/>
<EF:EFColumn
ename=
"partSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"true"
required=
"true"
/>
<EF:EFColumn
ename=
"partSpecId"
cname=
"规格id"
hidden=
"true"
/>
<EF:EFColumn
ename=
"prdtSpec"
cname=
"规格"
width=
"120"
align=
"center"
enable=
"true"
required=
"true"
/>
<EF:EFColumn
ename=
"inventRecordId"
cname=
"规格id"
width=
"120"
align=
"center"
required=
"true"
enable=
"false"
hidden=
"true"
/>
<EF:EFColumn
ename=
"p
ar
tLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"p
ar
tWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"p
ar
tThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"p
rd
tLength"
cname=
"长(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"p
rd
tWidth"
cname=
"宽(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"p
rd
tThick"
cname=
"厚(MM)"
enable=
"false"
width=
"80"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"invQty"
cname=
"数量"
width=
"120"
align=
"right"
format=
"{0:N0}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
required=
"
tru
e"
/>
required=
"
fals
e"
/>
<EF:EFColumn
ename=
"invUnitWeight"
cname=
"单重(KG)"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
...
...
@@ -56,12 +55,12 @@
enable=
"false"
/>
<EF:EFColumn
ename=
"invWeight"
cname=
"总重(KG)"
enable=
"false"
width=
"120"
align=
"right"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"p
ar
tCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"p
rd
tCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"price"
cname=
"单价"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
required=
"
tru
e"
/>
required=
"
fals
e"
/>
<EF:EFColumn
ename=
"amount"
cname=
"金额"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/KC/HGKC009.jsp
View file @
4b1ca3fc
...
...
@@ -53,39 +53,39 @@
</EF:EFComboColumn>
<EF:EFColumn
ename=
"initAmount"
cname=
"期初数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"initWeight"
cname=
"期初重量
(KG)
"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"initWeight"
cname=
"期初重量
(KG)
"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterAmount"
cname=
"采购入库数量"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"cgEnterWeight"
cname=
"采购入库重量
(KG)
"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"cgEnterWeight"
cname=
"采购入库重量
(KG)
"
enable=
"false"
width=
"100"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterAmount"
cname=
"其它入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtEnterWeight"
cname=
"其它入库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"qtEnterWeight"
cname=
"其它入库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterAmount"
cname=
"入库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"enterWeight"
cname=
"入库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"enterWeight"
cname=
"入库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterAmount"
cname=
"生产领料数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"scOuterWeight"
cname=
"生产领料重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"scOuterWeight"
cname=
"生产领料重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterAmount"
cname=
"其它出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"qtOuterWeight"
cname=
"其它出库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"qtOuterWeight"
cname=
"其它出库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerAmount"
cname=
"出库数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"outerWeight"
cname=
"出库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"outerWeight"
cname=
"出库重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffAmount"
cname=
"盘点差异数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"pdDiffWeight"
cname=
"盘点差异重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"pdDiffWeight"
cname=
"盘点差异重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endAmount"
cname=
"期末数量"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N0}"
sumType=
"all"
/>
<EF:EFColumn
ename=
"endWeight"
cname=
"期末重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"endWeight"
cname=
"期末重量
(KG)
"
enable=
"false"
width=
"90"
align=
"right"
format=
"{0:N3}"
sumType=
"all"
/>
</EF:EFGrid>
</EF:EFRegion>
...
...
src/main/webapp/HG/KC/HGKC012.jsp
View file @
4b1ca3fc
...
...
@@ -64,7 +64,7 @@
<EF:EFColumn ename="unit" cname="单位" enable="false" width="120" align="center"/>
<EF:EFColumn ename="warnNum" cname="预警值" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invQty" cname="库存数量" enable="false" width="90" align="right" format="{0:N0}"/>
<EF:EFColumn ename="invWeight" cname="库存重量
(KG)
" enable="false" width="90" align="right" format="{0:N3}"/>
<EF:EFColumn ename="invWeight" cname="库存重量
(KG)
" enable="false" width="90" align="right" format="{0:N3}"/>
<%--<EF:EFComboColumn ename="princ" cname="仓库负责人" width="120" align="center" enable="false"
blockName="user_block_id" textField="textField" valueField="valueField"
columnTemplate="#=textField#" itemTemplate="#=textField#" filter="contains" />--%>
...
...
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