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
89fd34a1
Commit
89fd34a1
authored
Jun 22, 2024
by
liuyang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' of
http://git.pseer.com:8800/platform/hg-smart
into dev-ly
parents
c4b98103
7d65781f
Show whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
418 additions
and
82 deletions
+418
-82
DdynamicEnum.java
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
+21
-2
HGKC001.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
+56
-0
ServiceHGKC001.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
+49
-7
ServiceHGKC001A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC001A.java
+2
-1
ServiceHGKC002.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC002.java
+1
-1
ServiceHGKC002A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC002A.java
+1
-1
ServiceHGKC003.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
+2
-2
ServiceHGKC004.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC004.java
+1
-1
ServiceHGKC005.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
+1
-1
ServiceHGKC006.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
+1
-1
ServiceHGKC007.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
+1
-1
ServiceHGKC007A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC007A.java
+1
-1
ServiceHGKC008.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
+1
-1
ServiceHGKC013A.java
...java/com/baosight/hggp/hg/kc/service/ServiceHGKC013A.java
+1
-1
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+41
-3
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+55
-8
HGKCUtils.java
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
+16
-16
HGPZ005.xml
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
+2
-1
HGPZTools.java
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
+10
-10
ServiceHGYX001.java
.../java/com/baosight/hggp/hg/yx/service/ServiceHGYX001.java
+5
-5
ServiceHGZL001.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
+3
-0
ServiceHGZL001B.java
...java/com/baosight/hggp/hg/zl/service/ServiceHGZL001B.java
+3
-3
HGCG002.js
src/main/webapp/HG/CG/HGCG002.js
+28
-1
HGCG002.jsp
src/main/webapp/HG/CG/HGCG002.jsp
+5
-5
HGCG003.js
src/main/webapp/HG/CG/HGCG003.js
+27
-0
HGCG003.jsp
src/main/webapp/HG/CG/HGCG003.jsp
+6
-6
HGKC001.js
src/main/webapp/HG/KC/HGKC001.js
+59
-1
HGKC001.jsp
src/main/webapp/HG/KC/HGKC001.jsp
+5
-1
HGSC009.js
src/main/webapp/HG/SC/HGSC009.js
+3
-0
HGSC009A.js
src/main/webapp/HG/SC/HGSC009A.js
+10
-0
HGSC009A.jsp
src/main/webapp/HG/SC/HGSC009A.jsp
+1
-1
No files found.
src/main/java/com/baosight/hggp/common/DdynamicEnum.java
View file @
89fd34a1
...
@@ -92,7 +92,7 @@ public enum DdynamicEnum {
...
@@ -92,7 +92,7 @@ public enum DdynamicEnum {
* 用途:存货档案下拉框 (不默认状态)
* 用途:存货档案下拉框 (不默认状态)
* 编写:
* 编写:
*/
*/
INVENT_RECORD_BOX_BLOCK_ID
(
"invent_record_box_block_id"
,
"inventCode"
,
"inventName"
,
"status"
,
"id"
,
"inventType"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"HGPZ005.queryInventCodeBox"
),
INVENT_RECORD_BOX_BLOCK_ID
(
"invent_record_box_block_id"
,
"inventCode"
,
"inventName"
,
"status"
,
"id"
,
"inventType"
,
"spec"
,
"material"
,
"unit"
,
"length"
,
"width"
,
"thick"
,
"
coefficient"
,
"
HGPZ005.queryInventCodeBox"
),
/**
/**
* 模块:存货档案
* 模块:存货档案
...
@@ -520,9 +520,27 @@ public enum DdynamicEnum {
...
@@ -520,9 +520,27 @@ public enum DdynamicEnum {
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
}
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
param10
,
String
dbSource
)
{
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
text
=
text
;
this
.
param1
=
param1
;
this
.
param2
=
param2
;
this
.
param3
=
param3
;
this
.
param4
=
param4
;
this
.
param5
=
param5
;
this
.
param6
=
param6
;
this
.
param7
=
param7
;
this
.
param8
=
param8
;
this
.
param9
=
param9
;
this
.
param10
=
param10
;
this
.
dbSource
=
dbSource
;
}
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
DdynamicEnum
(
String
blockId
,
String
value
,
String
text
,
String
param1
,
String
param2
,
String
param3
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
param4
,
String
param5
,
String
param6
,
String
param7
,
String
param8
,
String
param9
,
String
param10
,
String
dbSource
,
Map
paramMap
)
{
String
dbSource
,
Map
paramMap
)
{
this
.
blockId
=
blockId
;
this
.
blockId
=
blockId
;
this
.
value
=
value
;
this
.
value
=
value
;
...
@@ -536,6 +554,7 @@ public enum DdynamicEnum {
...
@@ -536,6 +554,7 @@ public enum DdynamicEnum {
this
.
param7
=
param7
;
this
.
param7
=
param7
;
this
.
param8
=
param8
;
this
.
param8
=
param8
;
this
.
param9
=
param9
;
this
.
param9
=
param9
;
this
.
param10
=
param10
;
this
.
dbSource
=
dbSource
;
this
.
dbSource
=
dbSource
;
this
.
paramMap
=
paramMap
;
this
.
paramMap
=
paramMap
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
View file @
89fd34a1
...
@@ -54,6 +54,10 @@ public class HGKC001 extends DaoEPBase {
...
@@ -54,6 +54,10 @@ public class HGKC001 extends DaoEPBase {
public
static
final
String
FIELD_DEPOSIT_QTY
=
"depositQty"
;
/* 入库数量*/
public
static
final
String
FIELD_DEPOSIT_QTY
=
"depositQty"
;
/* 入库数量*/
public
static
final
String
FIELD_DEPOSIT_UNIT_WEIGHT
=
"depositUnitWeight"
;
/* 入库单重*/
public
static
final
String
FIELD_DEPOSIT_UNIT_WEIGHT
=
"depositUnitWeight"
;
/* 入库单重*/
public
static
final
String
FIELD_DEPOSIT_WEIGHT
=
"depositWeight"
;
/* 入库重量*/
public
static
final
String
FIELD_DEPOSIT_WEIGHT
=
"depositWeight"
;
/* 入库重量*/
public
static
final
String
FIELD_SUBMIT_STATUS
=
"submitStatus"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
FIELD_STORAGE_TYPE
=
"storageType"
;
/* 入库类型:1:入库 2:退回*/
public
static
final
String
FIELD_IS_RETURN
=
"isReturn"
;
/* 是否退回*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
@@ -88,11 +92,18 @@ public class HGKC001 extends DaoEPBase {
...
@@ -88,11 +92,18 @@ public class HGKC001 extends DaoEPBase {
public
static
final
String
COL_DEPOSIT_UNIT_WEIGHT
=
"DEPOSIT_UNIT_WEIGHT"
;
/* 入库单重*/
public
static
final
String
COL_DEPOSIT_UNIT_WEIGHT
=
"DEPOSIT_UNIT_WEIGHT"
;
/* 入库单重*/
public
static
final
String
COL_DEPOSIT_WEIGHT
=
"DEPOSIT_WEIGHT"
;
/* 入库重量*/
public
static
final
String
COL_DEPOSIT_WEIGHT
=
"DEPOSIT_WEIGHT"
;
/* 入库重量*/
public
static
final
String
COL_SUBMIT_STATUS
=
"SUBMIT_STATUS"
;
/* 提交状态 0未提交,1已提交*/
public
static
final
String
COL_STORAGE_TYPE
=
"STORAGE_TYPE"
;
/* 入库类型:1:入库 2:退回*/
public
static
final
String
COL_IS_RETURN
=
"IS_RETURN"
;
/* 是否退回*/
public
static
final
String
QUERY
=
"HGKC001.query"
;
public
static
final
String
QUERY
=
"HGKC001.query"
;
public
static
final
String
COUNT
=
"HGKC001.count"
;
public
static
final
String
COUNT
=
"HGKC001.count"
;
public
static
final
String
INSERT
=
"HGKC001.insert"
;
public
static
final
String
INSERT
=
"HGKC001.insert"
;
public
static
final
String
UPDATE
=
"HGKC001.update"
;
public
static
final
String
UPDATE
=
"HGKC001.update"
;
public
static
final
String
DELETE
=
"HGKC001.delete"
;
public
static
final
String
DELETE
=
"HGKC001.delete"
;
public
static
final
String
UPDATE_WH_CODE
=
"HGKC001.updateWhCode"
;
public
static
final
String
UPDATE_SUBMIT_STATUS
=
"HGKC001.updateSubmitStatus"
;
private
Long
id
=
new
Long
(
0
);
private
Long
id
=
new
Long
(
0
);
private
String
accountCode
=
" "
;
/* 企业编码*/
private
String
accountCode
=
" "
;
/* 企业编码*/
...
@@ -127,6 +138,10 @@ public class HGKC001 extends DaoEPBase {
...
@@ -127,6 +138,10 @@ public class HGKC001 extends DaoEPBase {
private
BigDecimal
depositUnitWeight
=
new
BigDecimal
(
0.000
);
/* 入库单重*/
private
BigDecimal
depositUnitWeight
=
new
BigDecimal
(
0.000
);
/* 入库单重*/
private
BigDecimal
depositWeight
=
new
BigDecimal
(
0.000
);
/* 入库重量*/
private
BigDecimal
depositWeight
=
new
BigDecimal
(
0.000
);
/* 入库重量*/
private
Integer
submitStatus
;
/* 提交状态 0未提交,1已提交*/
private
Integer
storageType
;
/* 入库类型:1:入库 2:退回*/
private
Integer
isReturn
;
/* 是否退回:0:否 1:是*/
/**
/**
* initialize the metadata.
* initialize the metadata.
*/
*/
...
@@ -280,7 +295,17 @@ public class HGKC001 extends DaoEPBase {
...
@@ -280,7 +295,17 @@ public class HGKC001 extends DaoEPBase {
eiColumn
.
setDescName
(
"入库重量"
);
eiColumn
.
setDescName
(
"入库重量"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_SUBMIT_STATUS
);
eiColumn
.
setDescName
(
"提交状态"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_STORAGE_TYPE
);
eiColumn
.
setDescName
(
"入库类型:1:入库 2:退回"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_IS_RETURN
);
eiColumn
.
setDescName
(
"是否退回:0:否 1:是"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
}
/**
/**
...
@@ -802,6 +827,31 @@ public class HGKC001 extends DaoEPBase {
...
@@ -802,6 +827,31 @@ public class HGKC001 extends DaoEPBase {
public
void
setDepositWeight
(
BigDecimal
depositWeight
)
{
public
void
setDepositWeight
(
BigDecimal
depositWeight
)
{
this
.
depositWeight
=
depositWeight
;
this
.
depositWeight
=
depositWeight
;
}
}
public
Integer
getSubmitStatus
()
{
return
submitStatus
;
}
public
void
setSubmitStatus
(
Integer
submitStatus
)
{
this
.
submitStatus
=
submitStatus
;
}
public
Integer
getStorageType
()
{
return
storageType
;
}
public
void
setStorageType
(
Integer
storageType
)
{
this
.
storageType
=
storageType
;
}
public
Integer
getIsReturn
()
{
return
isReturn
;
}
public
void
setIsReturn
(
Integer
isReturn
)
{
this
.
isReturn
=
isReturn
;
}
/**
/**
* get the value from Map.
* get the value from Map.
*
*
...
@@ -842,6 +892,9 @@ public class HGKC001 extends DaoEPBase {
...
@@ -842,6 +892,9 @@ public class HGKC001 extends DaoEPBase {
setDepositQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_QTY
)),
depositQty
));
setDepositQty
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_QTY
)),
depositQty
));
setDepositUnitWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_UNIT_WEIGHT
)),
depositUnitWeight
));
setDepositUnitWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_UNIT_WEIGHT
)),
depositUnitWeight
));
setDepositWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_WEIGHT
)),
depositWeight
));
setDepositWeight
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_DEPOSIT_WEIGHT
)),
depositWeight
));
setSubmitStatus
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_SUBMIT_STATUS
)),
submitStatus
));
setStorageType
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_STORAGE_TYPE
)),
storageType
));
setIsReturn
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_IS_RETURN
)),
isReturn
));
}
}
/**
/**
...
@@ -883,6 +936,9 @@ public class HGKC001 extends DaoEPBase {
...
@@ -883,6 +936,9 @@ public class HGKC001 extends DaoEPBase {
map
.
put
(
FIELD_DEPOSIT_QTY
,
StringUtils
.
toString
(
depositQty
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_QTY
)));
map
.
put
(
FIELD_DEPOSIT_QTY
,
StringUtils
.
toString
(
depositQty
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_QTY
)));
map
.
put
(
FIELD_DEPOSIT_UNIT_WEIGHT
,
StringUtils
.
toString
(
depositUnitWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_UNIT_WEIGHT
)));
map
.
put
(
FIELD_DEPOSIT_UNIT_WEIGHT
,
StringUtils
.
toString
(
depositUnitWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_UNIT_WEIGHT
)));
map
.
put
(
FIELD_DEPOSIT_WEIGHT
,
StringUtils
.
toString
(
depositWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_WEIGHT
)));
map
.
put
(
FIELD_DEPOSIT_WEIGHT
,
StringUtils
.
toString
(
depositWeight
,
eiMetadata
.
getMeta
(
FIELD_DEPOSIT_WEIGHT
)));
map
.
put
(
FIELD_SUBMIT_STATUS
,
StringUtils
.
toString
(
submitStatus
,
eiMetadata
.
getMeta
(
FIELD_SUBMIT_STATUS
)));
map
.
put
(
FIELD_STORAGE_TYPE
,
StringUtils
.
toString
(
storageType
,
eiMetadata
.
getMeta
(
FIELD_STORAGE_TYPE
)));
map
.
put
(
FIELD_IS_RETURN
,
StringUtils
.
toString
(
isReturn
,
eiMetadata
.
getMeta
(
FIELD_IS_RETURN
)));
return
map
;
return
map
;
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
View file @
89fd34a1
...
@@ -7,15 +7,15 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
...
@@ -7,15 +7,15 @@ import com.baosight.hggp.core.enums.DeleteFlagEnum;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC001
;
import
com.baosight.hggp.hg.kc.domain.HGKC003
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.*
;
import
com.baosight.hggp.util.CommonMethod
;
import
com.baosight.iplat4j.core.ei.EiBlock
;
import
com.baosight.hggp.util.EiInfoUtils
;
import
com.baosight.hggp.util.LogUtils
;
import
com.baosight.hggp.util.MapUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.ei.EiInfo
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.exception.PlatException
;
import
com.baosight.iplat4j.core.resource.I18nMessages
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
com.baosight.iplat4j.core.service.impl.ServiceBase
;
import
java.util.Arrays
;
import
java.util.Arrays
;
...
@@ -116,7 +116,7 @@ public class ServiceHGKC001 extends ServiceBase {
...
@@ -116,7 +116,7 @@ public class ServiceHGKC001 extends ServiceBase {
*/
*/
private
void
saveData
(
List
<
HGKC001
>
fCg004s
,
Map
<
String
,
HGKC001
>
dbCg004Map
)
{
private
void
saveData
(
List
<
HGKC001
>
fCg004s
,
Map
<
String
,
HGKC001
>
dbCg004Map
)
{
for
(
HGKC001
fCg004
:
fCg004s
)
{
for
(
HGKC001
fCg004
:
fCg004s
)
{
String
depositNo
=
fCg004
.
getDepositNo
(
);
DaoUtils
.
update
(
HGKC001
.
UPDATE_WH_CODE
,
fCg004
);
}
}
}
}
...
@@ -172,11 +172,53 @@ public class ServiceHGKC001 extends ServiceBase {
...
@@ -172,11 +172,53 @@ public class ServiceHGKC001 extends ServiceBase {
dbKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
REMOVE
.
getCode
());
dbKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
REMOVE
.
getCode
());
DaoUtils
.
update
(
HGKC001
.
DELETE
,
dbKc001
);
DaoUtils
.
update
(
HGKC001
.
DELETE
,
dbKc001
);
// 扣减库存
// 扣减库存
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc001
.
getCompanyCode
(),
dbKc001
.
getWhCode
(),
dbKc001
.
get
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc001
.
getCompanyCode
(),
dbKc001
.
getWhCode
(),
dbKc001
.
get
InventCode
(),
dbKc001
.
getDepositQty
().
negate
(),
dbKc001
.
getDepositWeight
().
negate
());
dbKc001
.
getDepositQty
().
negate
(),
dbKc001
.
getDepositWeight
().
negate
());
// 更新收货单状态
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateStatus
(
dbKc001
.
getReceiveNo
(),
HGConstant
.
CgReceiveStatus
.
S_2
);
HGCGTools
.
HgCg003
.
updateStatus
(
dbKc001
.
getReceiveNo
(),
HGConstant
.
CgReceiveStatus
.
S_2
);
}
}
}
}
/**
* 修改提交状态
* @param inInfo
* @return
*/
public
EiInfo
updateSubmitStatus
(
EiInfo
inInfo
){
int
i
=
0
;
try
{
HGKC001
hgkc001
=
new
HGKC001
();
EiBlock
eiBlock
=
inInfo
.
getBlock
(
EiConstant
.
resultBlock
);
for
(
i
=
0
;
i
<
eiBlock
.
getRowCount
();
i
++)
{
Map
<?,
?>
map
=
eiBlock
.
getRow
(
i
);
hgkc001
.
fromMap
(
map
);
hgkc001
=
HGKCTools
.
HgKc001
.
getId
(
hgkc001
.
getId
());
hgkc001
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
// 校验数据
this
.
checkSubmitData
(
hgkc001
);
DaoUtils
.
update
(
HGKC001
.
UPDATE_SUBMIT_STATUS
,
hgkc001
);
// 更新库存数量
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc001
.
getCompanyCode
(),
hgkc001
.
getWhCode
(),
hgkc001
.
getInventCode
(),
hgkc001
.
getDepositQty
(),
hgkc001
.
getDepositUnitWeight
(),
hgkc001
.
getDepositWeight
());
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateStatus
(
hgkc001
.
getReceiveNo
(),
HGConstant
.
CgReceiveStatus
.
S_5
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"提交"
)});
}
catch
(
PlatException
e
)
{
e
.
printStackTrace
();
inInfo
.
setStatus
(
EiConstant
.
STATUS_FAILURE
);
ErrorCodeUtils
.
handleUpdateException
(
inInfo
,
i
,
e
);
logError
(
"修改失败"
,
e
.
getMessage
());
return
inInfo
;
}
return
inInfo
;
}
private
void
checkSubmitData
(
HGKC001
hgkc001
)
{
AssertUtils
.
isEmpty
(
hgkc001
.
getWhCode
(),
"仓库编码不能为空!"
);
AssertUtils
.
isEmpty
(
hgkc001
.
getWhName
(),
"仓库名称不能为空!"
);
}
}
}
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC001A.java
View file @
89fd34a1
...
@@ -138,9 +138,10 @@ public class ServiceHGKC001A extends ServiceBase {
...
@@ -138,9 +138,10 @@ public class ServiceHGKC001A extends ServiceBase {
newKc001
.
setDepositUnitWeight
(
dbCg003
.
getReceiveUnitWeight
());
newKc001
.
setDepositUnitWeight
(
dbCg003
.
getReceiveUnitWeight
());
newKc001
.
setDepositWeight
(
dbCg003
.
getDepositQty
().
multiply
(
dbCg003
.
getReceiveUnitWeight
()));
newKc001
.
setDepositWeight
(
dbCg003
.
getDepositQty
().
multiply
(
dbCg003
.
getReceiveUnitWeight
()));
newKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc001
.
setSpecId
(
dbCg003
.
getSpecId
());
DaoUtils
.
insert
(
HGKC001
.
INSERT
,
newKc001
);
DaoUtils
.
insert
(
HGKC001
.
INSERT
,
newKc001
);
// 更新库存数量
// 更新库存数量
HGKCUtils
.
HgKc010
.
updateInv
(
newKc001
.
getCompanyCode
(),
newKc001
.
getWhCode
(),
newKc001
.
get
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
newKc001
.
getCompanyCode
(),
newKc001
.
getWhCode
(),
newKc001
.
get
InventCode
(),
newKc001
.
getDepositQty
(),
newKc001
.
getDepositUnitWeight
(),
newKc001
.
getDepositWeight
());
newKc001
.
getDepositQty
(),
newKc001
.
getDepositUnitWeight
(),
newKc001
.
getDepositWeight
());
// 更新收货单状态
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateStatus
(
receiveNo
,
HGConstant
.
CgReceiveStatus
.
S_5
);
HGCGTools
.
HgCg003
.
updateStatus
(
receiveNo
,
HGConstant
.
CgReceiveStatus
.
S_5
);
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC002.java
View file @
89fd34a1
...
@@ -132,7 +132,7 @@ public class ServiceHGKC002 extends ServiceBase {
...
@@ -132,7 +132,7 @@ public class ServiceHGKC002 extends ServiceBase {
newKc002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
newKc002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
YES_1
);
DaoUtils
.
insert
(
HGKC002
.
INSERT
,
newKc002
);
DaoUtils
.
insert
(
HGKC002
.
INSERT
,
newKc002
);
// 修改库存
// 修改库存
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc002
.
getCompanyCode
(),
dbKc002
.
getWhCode
(),
dbKc002
.
get
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc002
.
getCompanyCode
(),
dbKc002
.
getWhCode
(),
dbKc002
.
get
InventCode
(),
dbKc002
.
getApplyQty
(),
dbKc002
.
getApplyWeight
());
dbKc002
.
getApplyQty
(),
dbKc002
.
getApplyWeight
());
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC002A.java
View file @
89fd34a1
...
@@ -137,7 +137,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
...
@@ -137,7 +137,7 @@ public class ServiceHGKC002A extends ServiceEPBase {
newKc002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
newKc002
.
setDeleteFlag
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HGKC002
.
INSERT
,
newKc002
);
DaoUtils
.
insert
(
HGKC002
.
INSERT
,
newKc002
);
// 修改库存数量
// 修改库存数量
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc010
.
getCompanyCode
(),
dbKc010
.
getWhCode
(),
dbKc010
.
get
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
dbKc010
.
getCompanyCode
(),
dbKc010
.
getWhCode
(),
dbKc010
.
get
InventCode
(),
applyQty
.
negate
(),
dbKc010
.
getInvUnitWeight
(),
newKc002
.
getApplyWeight
().
negate
());
applyQty
.
negate
(),
dbKc010
.
getInvUnitWeight
(),
newKc002
.
getApplyWeight
().
negate
());
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC003.java
View file @
89fd34a1
...
@@ -160,7 +160,7 @@ public class ServiceHGKC003 extends ServiceBase {
...
@@ -160,7 +160,7 @@ public class ServiceHGKC003 extends ServiceBase {
//修改计划生产任务完工数量
//修改计划生产任务完工数量
HGSCTools
.
complete
(
hgkc003
.
getQualityId
(),
hgkc003
.
getInvQty
().
intValue
(),
hgkc003
.
getRectificationId
());
HGSCTools
.
complete
(
hgkc003
.
getQualityId
(),
hgkc003
.
getInvQty
().
intValue
(),
hgkc003
.
getRectificationId
());
// 修改库存
// 修改库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc003
.
getCompanyCode
(),
hgkc003
.
getWhCode
(),
hgkc003
.
getPart
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc003
.
getCompanyCode
(),
hgkc003
.
getWhCode
(),
hgkc003
.
getPart
Code
(),
hgkc003
.
getInvQty
(),
hgkc003
.
getInvWeight
());
hgkc003
.
getInvQty
(),
hgkc003
.
getInvWeight
());
}
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
...
@@ -246,7 +246,7 @@ public class ServiceHGKC003 extends ServiceBase {
...
@@ -246,7 +246,7 @@ public class ServiceHGKC003 extends ServiceBase {
//修改计划生产任务完工数量
//修改计划生产任务完工数量
HGSCTools
.
complete
(
fKc003
.
getQualityId
(),
newKc003
.
getInvQty
().
intValue
(),
fKc003
.
getRectificationId
());
HGSCTools
.
complete
(
fKc003
.
getQualityId
(),
newKc003
.
getInvQty
().
intValue
(),
fKc003
.
getRectificationId
());
// 修改库存
// 修改库存
HGKCUtils
.
HgKc010
.
updateInv
(
newKc003
.
getCompanyCode
(),
newKc003
.
getWhCode
(),
newKc003
.
getPart
SpecId
(),
HGKCUtils
.
HgKc010
.
updateInv
(
newKc003
.
getCompanyCode
(),
newKc003
.
getWhCode
(),
newKc003
.
getPart
Code
(),
newKc003
.
getInvQty
(),
newKc003
.
getInvWeight
());
newKc003
.
getInvQty
(),
newKc003
.
getInvWeight
());
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC004.java
View file @
89fd34a1
...
@@ -166,7 +166,7 @@ public class ServiceHGKC004 extends ServiceEPBase {
...
@@ -166,7 +166,7 @@ public class ServiceHGKC004 extends ServiceEPBase {
if
(
hgkc004A
.
getPrice
().
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
hgkc004A
.
getAmount
().
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
if
(
hgkc004A
.
getPrice
().
compareTo
(
BigDecimal
.
ZERO
)<=
0
||
hgkc004A
.
getAmount
().
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
throw
new
PlatException
(
"单价和金额不能小于0!"
);
throw
new
PlatException
(
"单价和金额不能小于0!"
);
}
}
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
kc004
.
getCompanyCode
(),
kc004
.
getWhCode
(),
hgkc004A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
kc004
.
getCompanyCode
(),
kc004
.
getWhCode
(),
hgkc004A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC005.java
View file @
89fd34a1
...
@@ -178,7 +178,7 @@ public class ServiceHGKC005 extends ServiceEPBase {
...
@@ -178,7 +178,7 @@ public class ServiceHGKC005 extends ServiceEPBase {
// 存货名称
// 存货名称
fKc005
.
setInventName
(
HGPZTools
.
HgPz005
.
getByCode
(
fKc005
.
getInventCode
()).
getInventName
());
fKc005
.
setInventName
(
HGPZTools
.
HgPz005
.
getByCode
(
fKc005
.
getInventCode
()).
getInventName
());
// 根据规格计算账面单重
// 根据规格计算账面单重
BigDecimal
unitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
fKc005
.
getInvent
RecordId
());
BigDecimal
unitWeight
=
HGPZTools
.
HgPz005
.
calcUnitWeight
(
fKc005
.
getInvent
Code
());
fKc005
.
setBookUnitWeight
(
unitWeight
);
fKc005
.
setBookUnitWeight
(
unitWeight
);
fKc005
.
setEntityUnitWeight
(
unitWeight
);
fKc005
.
setEntityUnitWeight
(
unitWeight
);
// 计算总重
// 计算总重
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC006.java
View file @
89fd34a1
...
@@ -176,7 +176,7 @@ public class ServiceHGKC006 extends ServiceBase {
...
@@ -176,7 +176,7 @@ public class ServiceHGKC006 extends ServiceBase {
for
(
HGKC006A
hgkc006A
:
hgkc006AList
){
for
(
HGKC006A
hgkc006A
:
hgkc006AList
){
//增加库存
//增加库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc006A
.
getCompanyCode
(),
hgkc006A
.
getWhCode
(),
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc006A
.
getCompanyCode
(),
hgkc006A
.
getWhCode
(),
hgkc006A
.
getPart
SpecId
(),
hgkc006A
.
getInvQty
(),
hgkc006A
.
getPart
Code
(),
hgkc006A
.
getInvQty
(),
hgkc006A
.
getInvUnitWeight
(),
hgkc006A
.
getInvWeight
());
hgkc006A
.
getInvUnitWeight
(),
hgkc006A
.
getInvWeight
());
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007.java
View file @
89fd34a1
...
@@ -176,7 +176,7 @@ public class ServiceHGKC007 extends ServiceBase {
...
@@ -176,7 +176,7 @@ public class ServiceHGKC007 extends ServiceBase {
BigDecimal
invWeight
=
hgkc007A
.
getInvWeight
().
multiply
(
new
BigDecimal
(-
1
));
BigDecimal
invWeight
=
hgkc007A
.
getInvWeight
().
multiply
(
new
BigDecimal
(-
1
));
//减少库存
//减少库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc007A
.
getCompanyCode
(),
hgkc007A
.
getWhCode
(),
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc007A
.
getCompanyCode
(),
hgkc007A
.
getWhCode
(),
hgkc007A
.
getPart
SpecId
(),
qty
,
hgkc007A
.
getPart
Code
(),
qty
,
invUnitWeight
,
invWeight
);
invUnitWeight
,
invWeight
);
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC007A.java
View file @
89fd34a1
...
@@ -135,7 +135,7 @@ public class ServiceHGKC007A extends ServiceBase {
...
@@ -135,7 +135,7 @@ public class ServiceHGKC007A extends ServiceBase {
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getAccountCode
(),
"当前用户未绑定公司,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isEmpty
(
UserSessionUtils
.
getOrgId
(),
"当前用户未绑定部门,无法操作数据,请联系管理员!"
);
AssertUtils
.
isNull
(
hgkc007a
.
getPrimaryId
(),
"未获取到其他出库单ID信息"
);
AssertUtils
.
isNull
(
hgkc007a
.
getPrimaryId
(),
"未获取到其他出库单ID信息"
);
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgkc007a
.
getCompanyCode
(),
hgkc007a
.
getWhCode
(),
hgkc007a
.
getPart
SpecId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgkc007a
.
getCompanyCode
(),
hgkc007a
.
getWhCode
(),
hgkc007a
.
getPart
Code
());
if
(
hgkc010
==
null
){
if
(
hgkc010
==
null
){
throw
new
PlatException
(
"实时库存不存在!"
);
throw
new
PlatException
(
"实时库存不存在!"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC008.java
View file @
89fd34a1
...
@@ -136,7 +136,7 @@ public class ServiceHGKC008 extends ServiceBase {
...
@@ -136,7 +136,7 @@ public class ServiceHGKC008 extends ServiceBase {
BigDecimal
invWeight
=
hgkc008A
.
getInvWeight
().
multiply
(
new
BigDecimal
(-
1
));
BigDecimal
invWeight
=
hgkc008A
.
getInvWeight
().
multiply
(
new
BigDecimal
(-
1
));
//增加库存
//增加库存
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc008A
.
getCompanyCode
(),
hgkc008A
.
getWhCode
(),
HGKCUtils
.
HgKc010
.
updateInv
(
hgkc008A
.
getCompanyCode
(),
hgkc008A
.
getWhCode
(),
hgkc008A
.
getInv
SpecId
(),
qty
,
hgkc008A
.
getInv
entCode
(),
qty
,
invUnitWeight
,
invWeight
);
invUnitWeight
,
invWeight
);
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC013A.java
View file @
89fd34a1
...
@@ -99,7 +99,7 @@ public class ServiceHGKC013A extends ServiceEPBase {
...
@@ -99,7 +99,7 @@ public class ServiceHGKC013A extends ServiceEPBase {
Object
object
=
this
.
dao
.
get
(
HGKC013
.
QUERY
,
HGKC010
.
FIELD_ID
,
parentId
);
Object
object
=
this
.
dao
.
get
(
HGKC013
.
QUERY
,
HGKC010
.
FIELD_ID
,
parentId
);
if
(
object
!=
null
){
if
(
object
!=
null
){
Map
map1
=
MapUtils
.
toMap
(
object
);
Map
map1
=
MapUtils
.
toMap
(
object
);
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
map1
.
get
(
HGKC013
.
FIELD_COMPANY_CODE
).
toString
(),
map1
.
get
(
HGKC013
.
FIELD_CALLOUT_WH_CODE
).
toString
(),
hgkc013a
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
map1
.
get
(
HGKC013
.
FIELD_COMPANY_CODE
).
toString
(),
map1
.
get
(
HGKC013
.
FIELD_CALLOUT_WH_CODE
).
toString
(),
hgkc013a
.
getInvent
Code
());
if
(
hgkc010
==
null
){
if
(
hgkc010
==
null
){
throw
new
PlatException
(
"实时库存不存在!"
);
throw
new
PlatException
(
"实时库存不存在!"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
89fd34a1
...
@@ -34,7 +34,10 @@
...
@@ -34,7 +34,10 @@
THICK as "thick",
<!-- 厚度 -->
THICK as "thick",
<!-- 厚度 -->
DEPOSIT_QTY as "depositQty",
<!-- 入库数量 -->
DEPOSIT_QTY as "depositQty",
<!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT as "depositUnitWeight",
<!-- 入库单重 -->
DEPOSIT_UNIT_WEIGHT as "depositUnitWeight",
<!-- 入库单重 -->
DEPOSIT_WEIGHT as "depositWeight"
<!-- 入库重量 -->
DEPOSIT_WEIGHT as "depositWeight",
<!-- 入库重量 -->
STORAGE_TYPE as "storageType",
<!-- 入库类型:1:入库 2:退回 -->
IS_RETURN as "isReturn",
<!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS as "submitStatus"
<!-- 提交状态 -->
</sql>
</sql>
<sql
id=
"condition"
>
<sql
id=
"condition"
>
...
@@ -93,6 +96,15 @@
...
@@ -93,6 +96,15 @@
<isNotEmpty
prepend=
" AND "
property=
"unit"
>
<isNotEmpty
prepend=
" AND "
property=
"unit"
>
UNIT = #unit#
UNIT = #unit#
</isNotEmpty>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"submitStatus"
>
SUBMIT_STATUS = #submitStatus#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"isReturn"
>
IS_RETURN = #isReturn#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"storageType"
>
STORAGE_TYPE = #storageType#
</isNotEmpty>
</sql>
</sql>
<sql
id=
"idCondition"
>
<sql
id=
"idCondition"
>
...
@@ -173,13 +185,17 @@
...
@@ -173,13 +185,17 @@
THICK,
<!-- 厚度 -->
THICK,
<!-- 厚度 -->
DEPOSIT_QTY,
<!-- 入库数量 -->
DEPOSIT_QTY,
<!-- 入库数量 -->
DEPOSIT_UNIT_WEIGHT,
<!-- 入库单重 -->
DEPOSIT_UNIT_WEIGHT,
<!-- 入库单重 -->
DEPOSIT_WEIGHT
<!-- 入库重量 -->
DEPOSIT_WEIGHT,
<!-- 入库重量 -->
STORAGE_TYPE,
<!-- 入库类型:1:入库 2:退回 -->
IS_RETURN,
<!-- 是否退回:0:否 1:是 -->
SUBMIT_STATUS
) VALUES (
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#,
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #depositQty#, #depositUnitWeight#, #depositWeight#
#unit#, #length#, #width#, #thick#, #depositQty#, #depositUnitWeight#, #depositWeight#,
#storageType#, #isReturn#,#submitStatus#
)
)
</insert>
</insert>
...
@@ -199,6 +215,17 @@
...
@@ -199,6 +215,17 @@
<include
refid=
"idCondition"
/>
<include
refid=
"idCondition"
/>
</update>
</update>
<update
id=
"updateWhCode"
>
UPDATE ${hggpSchema}.HGKC001
SET
WH_CODE = #whCode#,
WH_NAME = #whName#,
UPDATED_BY = #updatedBy#,
UPDATED_NAME = #updatedName#,
UPDATED_TIME = #updatedTime#
WHERE DEPOSIT_NO = #depositNo#
</update>
<!-- 统计库存 -->
<!-- 统计库存 -->
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC001"
>
<select
id=
"statDate"
resultClass=
"com.baosight.hggp.hg.kc.domain.HGKC001"
>
SELECT
SELECT
...
@@ -218,4 +245,15 @@
...
@@ -218,4 +245,15 @@
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE,SPEC_ID
GROUP BY COMPANY_CODE, DEP_CODE, WH_CODE, INVENT_TYPE, INVENT_CODE,SPEC_ID
</select>
</select>
<update
id=
"updateSubmitStatus"
>
UPDATE ${hggpSchema}.HGKC001
SET
UPDATED_BY = #updatedBy#,
<!-- 更新人 -->
UPDATED_NAME = #updatedName#,
<!-- 更新人名称 -->
UPDATED_TIME = #updatedTime#,
<!-- 更新时间 -->
SUBMIT_STATUS = #submitStatus#
<!-- 提交状态 -->
WHERE
ID = #id#
</update>
</sqlMap>
</sqlMap>
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
89fd34a1
...
@@ -6,6 +6,8 @@ import com.baosight.hggp.core.constant.CommonConstant;
...
@@ -6,6 +6,8 @@ import com.baosight.hggp.core.constant.CommonConstant;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.domain.*
;
import
com.baosight.hggp.hg.kc.domain.*
;
...
@@ -14,6 +16,7 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
...
@@ -14,6 +16,7 @@ import com.baosight.hggp.hg.pz.tools.HGPZTools;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.domain.HGZL002
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
import
com.baosight.hggp.hg.zl.domain.HGZL004
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.BeanUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.DateUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.hggp.util.StringUtils
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
import
com.baosight.iplat4j.core.ei.EiConstant
;
...
@@ -42,6 +45,21 @@ public class HGKCTools {
...
@@ -42,6 +45,21 @@ public class HGKCTools {
public
static
class
HgKc001
{
public
static
class
HgKc001
{
/**
/**
* 生产入库单信息
*
* @param id
* @return
*/
public
static
HGKC001
getId
(
Long
id
)
{
AssertUtils
.
isEmpty
(
Collections
.
singleton
(
id
),
"采购入库单为空!"
);
Map
<
String
,
Object
>
paramMap
=
new
HashMap
();
paramMap
.
put
(
"id"
,
id
);
paramMap
.
put
(
"deleteFlag"
,
0
);
List
<
HGKC001
>
list
=
DaoBase
.
getInstance
().
query
(
HGKC001
.
QUERY
,
paramMap
);
AssertUtils
.
isEmpty
(
list
,
"采购入库单为空!"
);
return
list
.
get
(
0
);
}
/**
* 锁
* 锁
*
*
* @param depositNos
* @param depositNos
...
@@ -80,6 +98,35 @@ public class HGKCTools {
...
@@ -80,6 +98,35 @@ public class HGKCTools {
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC001:
:
getDepositNo
,
item
->
item
));
return
results
.
stream
().
collect
(
Collectors
.
toMap
(
HGKC001:
:
getDepositNo
,
item
->
item
));
}
}
/**
* 生产入库(入库质检单)
* @param receiveNo
*/
public
static
void
putInStorageData
(
String
receiveNo
)
{
List
<
String
>
receiveNoList
=
new
LinkedList
<>();
receiveNoList
.
add
(
receiveNo
);
// db数据
Map
<
String
,
HGCG003
>
dbCg003Map
=
HGCGUtils
.
HgCg003
.
lockGetData
(
receiveNoList
);
HGCG003
dbCg003
=
dbCg003Map
.
get
(
receiveNo
);
HGKC001
newKc001
=
BeanUtils
.
copy
(
dbCg003
,
HGKC001
.
class
);
newKc001
.
setDepositDate
(
DateUtils
.
shortDate
());
newKc001
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_DEPOSIT_NO
));
newKc001
.
setDepositQty
(
dbCg003
.
getDepositQty
());
newKc001
.
setDepositUnitWeight
(
dbCg003
.
getReceiveUnitWeight
());
newKc001
.
setDepositWeight
(
dbCg003
.
getDepositQty
().
multiply
(
dbCg003
.
getReceiveUnitWeight
()));
newKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc001
.
setSpecId
(
dbCg003
.
getSpecId
());
newKc001
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
WTJ
);
newKc001
.
setStorageType
(
HGConstant
.
StorageType
.
RK
);
newKc001
.
setIsReturn
(
CommonConstant
.
YesNo
.
NO_0
);
DaoUtils
.
insert
(
HGKC001
.
INSERT
,
newKc001
);
// 更新库存数量
// HGKCUtils.HgKc010.updateInv(newKc001.getCompanyCode(), newKc001.getWhCode(), newKc001.getInventCode(),
// newKc001.getDepositQty(), newKc001.getDepositUnitWeight(), newKc001.getDepositWeight());
// 更新收货单状态
// HGCGTools.HgCg003.updateStatus(receiveNo, HGConstant.CgReceiveStatus.S_5);
}
}
}
/**
/**
...
@@ -700,33 +747,33 @@ public class HGKCTools {
...
@@ -700,33 +747,33 @@ public class HGKCTools {
*
*
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
* @return
* @return
*/
*/
public
static
void
lock
(
String
companyCode
,
String
whCode
,
Long
specId
)
{
public
static
void
lock
(
String
companyCode
,
String
whCode
,
String
inventCode
)
{
if
(
StringUtils
.
isBlank
(
companyCode
)
||
StringUtils
.
isBlank
(
whCode
)
||
specId
==
null
)
{
if
(
StringUtils
.
isBlank
(
companyCode
)
||
StringUtils
.
isBlank
(
whCode
)
||
StringUtils
.
isBlank
(
inventCode
)
)
{
return
;
return
;
}
}
Map
paramMap
=
new
HashMap
();
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"
specId"
,
specId
);
paramMap
.
put
(
"
inventCode"
,
inventCode
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc010
.
LOCK
,
paramMap
);
DaoBase
.
getInstance
().
update
(
HGSqlConstant
.
HgKc010
.
LOCK
,
paramMap
);
}
}
/**
/**
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
*/
*/
public
static
HGKC010
get
(
String
companyCode
,
String
whCode
,
Long
specId
)
{
public
static
HGKC010
get
(
String
companyCode
,
String
whCode
,
String
inventCode
)
{
AssertUtils
.
isEmpty
(
companyCode
,
"公司编码不能为空"
);
AssertUtils
.
isEmpty
(
companyCode
,
"公司编码不能为空"
);
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
AssertUtils
.
is
True
(
specId
==
null
||
specId
==
0
,
"规格ID
不能为空"
);
AssertUtils
.
is
Empty
(
inventCode
,
"物料编码
不能为空"
);
Map
paramMap
=
new
HashMap
();
Map
paramMap
=
new
HashMap
();
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"companyCode"
,
companyCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"whCode"
,
whCode
);
paramMap
.
put
(
"
specId"
,
specId
);
paramMap
.
put
(
"
inventCode"
,
inventCode
);
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
List
<
HGKC010
>
results
=
DaoBase
.
getInstance
().
query
(
HGKC010
.
QUERY
,
paramMap
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
return
CollectionUtils
.
isEmpty
(
results
)
?
null
:
results
.
get
(
0
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/kc/utils/HGKCUtils.java
View file @
89fd34a1
...
@@ -218,13 +218,13 @@ public class HGKCUtils {
...
@@ -218,13 +218,13 @@ public class HGKCUtils {
*
*
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
* @param qty
* @param qty
* @param weight
* @param weight
*/
*/
public
static
void
updateInv
(
String
companyCode
,
String
whCode
,
Long
specId
,
BigDecimal
qty
,
public
static
void
updateInv
(
String
companyCode
,
String
whCode
,
String
inventCode
,
BigDecimal
qty
,
BigDecimal
weight
)
{
BigDecimal
weight
)
{
updateInv
(
companyCode
,
whCode
,
specId
,
qty
,
null
,
weight
);
updateInv
(
companyCode
,
whCode
,
inventCode
,
qty
,
null
,
weight
);
}
}
/**
/**
...
@@ -232,20 +232,20 @@ public class HGKCUtils {
...
@@ -232,20 +232,20 @@ public class HGKCUtils {
*
*
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
* @param qty
* @param qty
* @param unitWeight
* @param unitWeight
* @param weight
* @param weight
*/
*/
public
static
void
updateInv
(
String
companyCode
,
String
whCode
,
Long
specId
,
BigDecimal
qty
,
public
static
void
updateInv
(
String
companyCode
,
String
whCode
,
String
inventCode
,
BigDecimal
qty
,
BigDecimal
unitWeight
,
BigDecimal
weight
)
{
BigDecimal
unitWeight
,
BigDecimal
weight
)
{
HGKC010
newKc010
=
buildBean
(
companyCode
,
whCode
,
specId
,
qty
,
unitWeight
,
weight
);
HGKC010
newKc010
=
buildBean
(
companyCode
,
whCode
,
inventCode
,
qty
,
unitWeight
,
weight
);
// 参数校验
// 参数校验
checkUpdateInv
(
companyCode
,
whCode
,
specId
,
qty
,
weight
);
checkUpdateInv
(
companyCode
,
whCode
,
inventCode
,
qty
,
weight
);
// 锁库存
// 锁库存
HGKCTools
.
HgKc010
.
lock
(
companyCode
,
whCode
,
specId
);
HGKCTools
.
HgKc010
.
lock
(
companyCode
,
whCode
,
inventCode
);
// 获取DB数据
// 获取DB数据
HGKC010
dbKc010
=
HGKCTools
.
HgKc010
.
get
(
companyCode
,
whCode
,
specId
);
HGKC010
dbKc010
=
HGKCTools
.
HgKc010
.
get
(
companyCode
,
whCode
,
inventCode
);
if
(
dbKc010
==
null
)
{
if
(
dbKc010
==
null
)
{
addInvData
(
newKc010
);
addInvData
(
newKc010
);
}
else
{
}
else
{
...
@@ -258,18 +258,18 @@ public class HGKCUtils {
...
@@ -258,18 +258,18 @@ public class HGKCUtils {
*
*
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
* @param qty
* @param qty
* @param unitWeight
* @param unitWeight
* @param weight
* @param weight
* @return
* @return
*/
*/
private
static
HGKC010
buildBean
(
String
companyCode
,
String
whCode
,
Long
specId
,
BigDecimal
qty
,
private
static
HGKC010
buildBean
(
String
companyCode
,
String
whCode
,
String
inventCode
,
BigDecimal
qty
,
BigDecimal
unitWeight
,
BigDecimal
weight
)
{
BigDecimal
unitWeight
,
BigDecimal
weight
)
{
HGKC010
newKc010
=
new
HGKC010
();
HGKC010
newKc010
=
new
HGKC010
();
newKc010
.
setCompanyCode
(
companyCode
);
newKc010
.
setCompanyCode
(
companyCode
);
newKc010
.
setWhCode
(
whCode
);
newKc010
.
setWhCode
(
whCode
);
newKc010
.
set
SpecId
(
specId
);
newKc010
.
set
InventCode
(
inventCode
);
newKc010
.
setInvQty
(
qty
);
newKc010
.
setInvQty
(
qty
);
newKc010
.
setInvUnitWeight
(
unitWeight
);
newKc010
.
setInvUnitWeight
(
unitWeight
);
newKc010
.
setInvWeight
(
weight
);
newKc010
.
setInvWeight
(
weight
);
...
@@ -281,15 +281,15 @@ public class HGKCUtils {
...
@@ -281,15 +281,15 @@ public class HGKCUtils {
*
*
* @param companyCode
* @param companyCode
* @param whCode
* @param whCode
* @param
specId
* @param
inventCode
* @param qty
* @param qty
* @param weight
* @param weight
*/
*/
private
static
void
checkUpdateInv
(
String
companyCode
,
String
whCode
,
Long
specId
,
BigDecimal
qty
,
private
static
void
checkUpdateInv
(
String
companyCode
,
String
whCode
,
String
inventCode
,
BigDecimal
qty
,
BigDecimal
weight
)
{
BigDecimal
weight
)
{
AssertUtils
.
isEmpty
(
companyCode
,
"公司编码不能为空"
);
AssertUtils
.
isEmpty
(
companyCode
,
"公司编码不能为空"
);
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
AssertUtils
.
isEmpty
(
whCode
,
"仓库编码不能为空"
);
AssertUtils
.
is
True
(
specId
==
null
||
specId
==
0
,
"规格ID
不能为空"
);
AssertUtils
.
is
Empty
(
inventCode
,
"物料编码
不能为空"
);
AssertUtils
.
isNull
(
qty
,
"库存变更数量不能为空"
);
AssertUtils
.
isNull
(
qty
,
"库存变更数量不能为空"
);
AssertUtils
.
isNull
(
weight
,
"库存变更重量不能为空"
);
AssertUtils
.
isNull
(
weight
,
"库存变更重量不能为空"
);
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
AssertUtils
.
isTrue
(
qty
.
compareTo
(
BigDecimal
.
ZERO
)
==
0
...
@@ -307,7 +307,7 @@ public class HGKCUtils {
...
@@ -307,7 +307,7 @@ public class HGKCUtils {
// 仓库
// 仓库
newKc010
.
setWhName
(
HGPZTools
.
HgPz007
.
get
(
newKc010
.
getWhCode
()).
getWhName
());
newKc010
.
setWhName
(
HGPZTools
.
HgPz007
.
get
(
newKc010
.
getWhCode
()).
getWhName
());
// 规格
// 规格
HGPZ005
dbPz005
=
HGPZTools
.
HgPz005
.
get
(
newKc010
.
get
SpecId
());
HGPZ005
dbPz005
=
HGPZTools
.
HgPz005
.
get
(
newKc010
.
get
InventCode
());
newKc010
.
setInventType
(
dbPz005
.
getInventType
());
newKc010
.
setInventType
(
dbPz005
.
getInventType
());
newKc010
.
setInventCode
(
dbPz005
.
getInventCode
());
newKc010
.
setInventCode
(
dbPz005
.
getInventCode
());
newKc010
.
setInventName
(
dbPz005
.
getInventName
());
newKc010
.
setInventName
(
dbPz005
.
getInventName
());
...
...
src/main/java/com/baosight/hggp/hg/pz/sql/HGPZ005.xml
View file @
89fd34a1
...
@@ -327,7 +327,8 @@
...
@@ -327,7 +327,8 @@
LENGTH as "length",
<!-- 长 -->
LENGTH as "length",
<!-- 长 -->
WIDTH as "width",
<!-- 宽 -->
WIDTH as "width",
<!-- 宽 -->
THICK as "thick",
<!-- 厚 -->
THICK as "thick",
<!-- 厚 -->
STATUS as "status"
STATUS as "status",
COEFFICIENT as "coefficient"
<!-- 系数 -->
FROM ${hggpSchema}.HGPZ005
FROM ${hggpSchema}.HGPZ005
WHERE DELETE_FLAG = 0
WHERE DELETE_FLAG = 0
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
<isNotEmpty
prepend=
" AND "
property=
"accountCode"
>
...
...
src/main/java/com/baosight/hggp/hg/pz/tools/HGPZTools.java
View file @
89fd34a1
...
@@ -235,12 +235,12 @@ public class HGPZTools {
...
@@ -235,12 +235,12 @@ public class HGPZTools {
*/
*/
public
static
class
HgPz005
{
public
static
class
HgPz005
{
public
static
HGPZ005
get
(
Long
id
)
{
public
static
HGPZ005
get
(
String
inventCode
)
{
AssertUtils
.
isNull
(
i
d
,
"规格ID
不能为空"
);
AssertUtils
.
isNull
(
i
nventCode
,
"物料编码
不能为空"
);
Map
queryMap
=
new
HashMap
();
Map
queryMap
=
new
HashMap
();
queryMap
.
put
(
"i
d"
,
id
);
queryMap
.
put
(
"i
nventCode"
,
inventCode
);
List
<
HGPZ005
>
results
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
queryMap
);
List
<
HGPZ005
>
results
=
DaoBase
.
getInstance
().
query
(
HGPZ005
.
QUERY
,
queryMap
);
AssertUtils
.
isEmpty
(
results
,
String
.
format
(
"
规格[%s]不存在"
,
id
));
AssertUtils
.
isEmpty
(
results
,
String
.
format
(
"
物料编码[%s]不存在"
,
inventCode
));
return
results
.
get
(
0
);
return
results
.
get
(
0
);
}
}
...
@@ -391,11 +391,11 @@ public class HGPZTools {
...
@@ -391,11 +391,11 @@ public class HGPZTools {
/**
/**
* 计算单重
* 计算单重
*
*
* @param i
d
* @param i
nventCode
* @return
* @return
*/
*/
public
static
BigDecimal
calcUnitWeight
(
Long
id
)
{
public
static
BigDecimal
calcUnitWeight
(
String
inventCode
)
{
HGPZ005
hgpz005
=
get
(
i
d
);
HGPZ005
hgpz005
=
get
(
i
nventCode
);
return
calcUnitWeight
(
hgpz005
);
return
calcUnitWeight
(
hgpz005
);
}
}
...
@@ -567,11 +567,11 @@ public class HGPZTools {
...
@@ -567,11 +567,11 @@ public class HGPZTools {
*/
*/
public
static
void
setSpecInfo
(
DaoEPBase
bean
,
String
keyName
)
{
public
static
void
setSpecInfo
(
DaoEPBase
bean
,
String
keyName
)
{
try
{
try
{
String
invent
RecordId
=
BeanUtils
.
getProperty
(
bean
,
keyName
);
String
invent
Code
=
BeanUtils
.
getProperty
(
bean
,
keyName
);
if
(
StringUtils
.
isBlank
(
invent
RecordId
))
{
if
(
StringUtils
.
isBlank
(
invent
Code
))
{
return
;
return
;
}
}
HGPZ005
dbPz06
=
get
(
Long
.
parseLong
(
inventRecordId
)
);
HGPZ005
dbPz06
=
get
(
inventCode
);
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_SPEC
,
dbPz06
.
getSpec
());
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_SPEC
,
dbPz06
.
getSpec
());
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_LENGTH
,
dbPz06
.
getLength
());
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_LENGTH
,
dbPz06
.
getLength
());
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_WIDTH
,
dbPz06
.
getWidth
());
BeanUtils
.
setProperty
(
bean
,
HGPZ005
.
FIELD_WIDTH
,
dbPz06
.
getWidth
());
...
...
src/main/java/com/baosight/hggp/hg/yx/service/ServiceHGYX001.java
View file @
89fd34a1
...
@@ -110,7 +110,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
...
@@ -110,7 +110,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
@@ -127,7 +127,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
...
@@ -127,7 +127,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
@@ -254,7 +254,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
...
@@ -254,7 +254,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
*/
*/
public
void
addHGKC004A
(
List
<
HGYX001A
>
hgyx001As
,
HGKC004
hgkc004
)
{
public
void
addHGKC004A
(
List
<
HGYX001A
>
hgyx001As
,
HGKC004
hgkc004
)
{
for
(
HGYX001A
hgyx001A
:
hgyx001As
)
{
for
(
HGYX001A
hgyx001A
:
hgyx001As
)
{
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgkc004
.
getCompanyCode
(),
hgkc004
.
getWhCode
(),
hgyx001A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgkc004
.
getCompanyCode
(),
hgkc004
.
getWhCode
(),
hgyx001A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
@@ -300,7 +300,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
...
@@ -300,7 +300,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
@@ -319,7 +319,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
...
@@ -319,7 +319,7 @@ public class ServiceHGYX001 extends ServiceEPBase {
HGYX001A
hgyx001A
=
new
HGYX001A
();
HGYX001A
hgyx001A
=
new
HGYX001A
();
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
fromMap
(
resultRow
);
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
hgyx001A
.
setParentId
(
hgyx001
.
getId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
RecordId
());
HGKC010
hgkc010
=
HGKCTools
.
HgKc010
.
get
(
hgyx001
.
getCompanyCode
(),
hgyx001
.
getConsWhCode
(),
hgyx001A
.
getInvent
Code
());
if
(
hgkc010
==
null
)
{
if
(
hgkc010
==
null
)
{
throw
new
PlatException
(
"库存不足!"
);
throw
new
PlatException
(
"库存不足!"
);
}
}
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
View file @
89fd34a1
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
...
@@ -7,6 +7,7 @@ import com.baosight.hggp.core.dao.DaoUtils;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.cg.tools.HGCGTools
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
import
com.baosight.hggp.hg.kc.tools.HGKCTools
;
import
com.baosight.hggp.hg.zl.domain.HGZL001
;
import
com.baosight.hggp.hg.zl.domain.HGZL001
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.hg.zl.utils.HGZLUtils
;
import
com.baosight.hggp.util.AssertUtils
;
import
com.baosight.hggp.util.AssertUtils
;
...
@@ -233,6 +234,8 @@ public class ServiceHGZL001 extends ServiceBase {
...
@@ -233,6 +234,8 @@ public class ServiceHGZL001 extends ServiceBase {
DaoUtils
.
update
(
HGSqlConstant
.
HgZl001
.
PROCESS
,
dbZl001
);
DaoUtils
.
update
(
HGSqlConstant
.
HgZl001
.
PROCESS
,
dbZl001
);
// 更新收货单状态
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateCheck
(
dbZl001
);
HGCGTools
.
HgCg003
.
updateCheck
(
dbZl001
);
//生成采购入库单
HGKCTools
.
HgKc001
.
putInStorageData
(
dbZl001
.
getReceiveNo
());
}
}
}
}
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL001B.java
View file @
89fd34a1
...
@@ -65,7 +65,7 @@ public class ServiceHGZL001B extends ServiceEPBase {
...
@@ -65,7 +65,7 @@ public class ServiceHGZL001B extends ServiceEPBase {
public
EiInfo
query
(
EiInfo
inInfo
)
{
public
EiInfo
query
(
EiInfo
inInfo
)
{
try
{
try
{
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
Map
queryMap
=
EiInfoUtils
.
getFirstRow
(
inInfo
);
queryMap
.
put
(
HGCG003
.
FIELD_STATUS
,
HGConstant
.
CgReceiveStatus
.
S_
2
);
queryMap
.
put
(
HGCG003
.
FIELD_STATUS
,
HGConstant
.
CgReceiveStatus
.
S_
0
);
inInfo
=
super
.
query
(
inInfo
,
HGCG003
.
QUERY
,
new
HGCG003
());
inInfo
=
super
.
query
(
inInfo
,
HGCG003
.
QUERY
,
new
HGCG003
());
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
LogUtils
.
setDetailMsg
(
inInfo
,
e
,
"查询失败"
);
...
@@ -104,8 +104,8 @@ public class ServiceHGZL001B extends ServiceEPBase {
...
@@ -104,8 +104,8 @@ public class ServiceHGZL001B extends ServiceEPBase {
for
(
HGCG003
fCg003
:
fCg003s
)
{
for
(
HGCG003
fCg003
:
fCg003s
)
{
String
receiveNo
=
fCg003
.
getReceiveNo
();
String
receiveNo
=
fCg003
.
getReceiveNo
();
HGCG003
dbSc003
=
dbCg003Map
.
get
(
fCg003
.
getReceiveNo
());
HGCG003
dbSc003
=
dbCg003Map
.
get
(
fCg003
.
getReceiveNo
());
AssertUtils
.
isNotEquals
(
HGConstant
.
CgReceiveStatus
.
S_
2
,
dbSc003
.
getStatus
(),
AssertUtils
.
isNotEquals
(
HGConstant
.
CgReceiveStatus
.
S_
0
,
dbSc003
.
getStatus
(),
String
.
format
(
"采购收货单[%s]状态不是\"
已收货
\",不允许操作"
,
receiveNo
));
String
.
format
(
"采购收货单[%s]状态不是\"
待确认
\",不允许操作"
,
receiveNo
));
}
}
}
}
...
...
src/main/webapp/HG/CG/HGCG002.js
View file @
89fd34a1
...
@@ -28,7 +28,6 @@ $(function () {
...
@@ -28,7 +28,6 @@ $(function () {
}
}
}
}
}
}
// 查询
// 查询
$
(
"#QUERY"
).
on
(
"click"
,
query
);
$
(
"#QUERY"
).
on
(
"click"
,
query
);
...
@@ -44,6 +43,9 @@ $(function () {
...
@@ -44,6 +43,9 @@ $(function () {
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 查询
// 查询
query
();
query
();
initInventCode
();
});
});
/**
/**
...
@@ -54,6 +56,31 @@ let query = function () {
...
@@ -54,6 +56,31 @@ let query = function () {
}
}
/**
/**
* 存货编号
*/
let
initInventCode
=
function
()
{
//物料信息下拉
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
let
dataSource
;
var
input
=
$
(
"#inqu_status-0-inventCode"
);
dataSource
=
ei
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"valueField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataSource
,
template
:
"[#:valueField#]#:textField#|#:param2Field#"
,
filter
:
"contains"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 供应商变更
* 供应商变更
*/
*/
let
supCodeChange
=
function
(
e
)
{
let
supCodeChange
=
function
(
e
)
{
...
...
src/main/webapp/HG/CG/HGCG002.jsp
View file @
89fd34a1
...
@@ -26,14 +26,14 @@
...
@@ -26,14 +26,14 @@
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
<EF:EFOptions
blockId=
"sup_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"sup_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"存货
名称
"
blockId=
"inqu_status"
ename=
"inventCode"
row=
"0"
colWidth=
"3"
<EF:EFSelect
cname=
"存货
编号
"
blockId=
"inqu_status"
ename=
"inventCode"
row=
"0"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
template=
"[#=valueField#]#=textField#"
>
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
template=
"[#=valueField#]#=textField#"
>
<EF:EFOptions
blockId=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
<
%
--
<
EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
--
%
>
defultValue=
""
>
<
%
--
defultValue=
""
>
--%
>
<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
>
--%
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFDateSpan
startCname=
"创建时间(从)"
endCname=
"至"
blockId=
"inqu_status"
<EF:EFDateSpan
startCname=
"创建时间(从)"
endCname=
"至"
blockId=
"inqu_status"
...
...
src/main/webapp/HG/CG/HGCG003.js
View file @
89fd34a1
...
@@ -40,6 +40,8 @@ $(function () {
...
@@ -40,6 +40,8 @@ $(function () {
$
(
window
).
load
(
function
()
{
$
(
window
).
load
(
function
()
{
// 查询
// 查询
query
();
query
();
initInventCode
();
});
});
/**
/**
...
@@ -50,6 +52,31 @@ let query = function () {
...
@@ -50,6 +52,31 @@ let query = function () {
}
}
/**
/**
* 存货编号
*/
let
initInventCode
=
function
()
{
//物料信息下拉
var
inInfo
=
new
EiInfo
();
EiCommunicator
.
send
(
"HGPZ005"
,
"queryComboBox"
,
inInfo
,
{
onSuccess
:
function
(
ei
)
{
let
dataSource
;
var
input
=
$
(
"#inqu_status-0-inventCode"
);
dataSource
=
ei
.
getBlock
(
"invent_record_block_id"
).
getMappedRows
();
input
.
kendoDropDownList
({
valuePrimitive
:
true
,
dataTextField
:
"valueField"
,
dataValueField
:
"valueField"
,
optionLabel
:
"请选择"
,
dataSource
:
dataSource
,
template
:
"[#:valueField#]#:textField#|#:param2Field#"
,
filter
:
"contains"
});
},
onFail
:
function
(
ei
)
{
}
},
{
async
:
false
});
}
/**
* 保存
* 保存
*/
*/
let
save
=
function
()
{
let
save
=
function
()
{
...
...
src/main/webapp/HG/CG/HGCG003.jsp
View file @
89fd34a1
...
@@ -26,14 +26,14 @@
...
@@ -26,14 +26,14 @@
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
<EF:EFOptions
blockId=
"sup_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"sup_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"存货
名称
"
blockId=
"inqu_status"
ename=
"inventCode"
row=
"0"
colWidth=
"3"
<EF:EFSelect
cname=
"存货
编号
"
blockId=
"inqu_status"
ename=
"inventCode"
row=
"0"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
filter=
"contains"
optionLabel=
"全部"
defultValue=
""
>
<EF:EFOptions
blockId=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
<EF:EFOptions
blockId=
"invent_record_block_id"
textField=
"textField"
valueField=
"valueField"
/>
</EF:EFSelect>
</EF:EFSelect>
<EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
<
%
--
<
EF:EFSelect
cname=
"规格"
ename=
"inqu_status-0-spec"
colWidth=
"3"
filter=
"contains"
optionLabel=
"全部"
--
%
>
defultValue=
""
>
<
%
--
defultValue=
""
>
--%
>
<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
>
--%
>
</div>
</div>
<div
class=
"row"
>
<div
class=
"row"
>
<EF:EFDateSpan
startCname=
"创建时间(从)"
endCname=
"至"
blockId=
"inqu_status"
<EF:EFDateSpan
startCname=
"创建时间(从)"
endCname=
"至"
blockId=
"inqu_status"
...
@@ -57,7 +57,7 @@
...
@@ -57,7 +57,7 @@
<EF:EFColumn
ename=
"supCode"
cname=
"供应商编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"supCode"
cname=
"供应商编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"supName"
cname=
"供应商名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"supName"
cname=
"供应商名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"purUserName"
cname=
"采购员"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"inventCode"
cname=
"存货编码"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"inventName"
cname=
"存货名称"
enable=
"false"
width=
"100"
align=
"center"
/>
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"specId"
cname=
"规格ID"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"spec"
cname=
"规格"
enable=
"false"
width=
"120"
align=
"center"
/>
...
...
src/main/webapp/HG/KC/HGKC001.js
View file @
89fd34a1
...
@@ -7,7 +7,28 @@ $(function () {
...
@@ -7,7 +7,28 @@ $(function () {
pageSize
:
20
,
pageSize
:
20
,
pageSizes
:
[
20
,
50
,
70
,
100
],
pageSizes
:
[
20
,
50
,
70
,
100
],
},
},
columns
:
[],
columns
:
[
{
field
:
"operator"
,
title
:
"操作"
,
template
:
function
(
item
)
{
let
status
=
item
.
submitStatus
;
let
isReturn
=
item
.
isReturn
;
let
template
=
''
;
if
(
item
.
id
){
if
(
status
==
0
)
{
template
+=
'<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
+
'onclick="updateSubmitStatus('
+
item
.
id
+
')" >提交</a>'
;
}
// if (status == 1 && isReturn == 0) {
// template += '<a style="cursor: pointer;display: inline-flex;justify-content: center;margin:auto 5px" '
// + 'onclick="sendBack(' + item.id + ')" >退回</a>';
// }
}
return
template
;
}
}
],
loadComplete
:
function
(
grid
)
{
loadComplete
:
function
(
grid
)
{
// 确认
// 确认
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
...
@@ -133,3 +154,40 @@ let selectReceiveCallback = function () {
...
@@ -133,3 +154,40 @@ let selectReceiveCallback = function () {
// 关闭弹窗
// 关闭弹窗
JSColorbox
.
close
();
JSColorbox
.
close
();
}
}
/**
* 提交
* @param id
* @param status
*/
function
updateSubmitStatus
(
id
)
{
let
inEiInfo
=
new
EiInfo
();
inEiInfo
.
set
(
"result-0-id"
,
id
);
JSUtils
.
confirm
(
"确定提交此采购入库单吗? "
,
{
ok
:
function
()
{
EiCommunicator
.
send
(
'HGKC001'
,
'updateSubmitStatus'
,
inEiInfo
,
{
onSuccess
:
function
(
ei
)
{
if
(
ei
.
getStatus
()
>=
0
)
{
try
{
query
();
}
catch
(
e
)
{
}
if
(
ei
.
getStatus
()
==
0
)
{
NotificationUtil
(
ei
,
'warning'
);
}
else
{
NotificationUtil
(
ei
);
}
}
else
{
NotificationUtil
(
ei
,
"error"
);
}
},
onFail
:
function
(
ei
)
{
// 发生异常
NotificationUtil
(
"操作失败,原因["
+
ei
+
"]"
,
"error"
);
}
}
);
}
});
}
src/main/webapp/HG/KC/HGKC001.jsp
View file @
89fd34a1
...
@@ -46,13 +46,14 @@
...
@@ -46,13 +46,14 @@
<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=
"operator"
cname=
"操作"
locked=
"true"
width=
"80"
enable=
"false"
align=
"center"
readonly=
"false"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyCode"
cname=
"公司编码"
enable=
"false"
width=
"100"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"companyName"
cname=
"公司名称"
enable=
"false"
width=
"130"
align=
"center"
/>
<EF:EFColumn
ename=
"depositDate"
cname=
"入库日期"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
<EF:EFColumn
ename=
"depositDate"
cname=
"入库日期"
enable=
"false"
width=
"100"
align=
"center"
editType=
"date"
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
dateFormat=
"yyyy-MM-dd"
parseFormats=
"['yyyyMMdd']"
/>
<EF:EFColumn
ename=
"depositNo"
cname=
"入库单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"depositNo"
cname=
"入库单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"receiveNo"
cname=
"收货单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFColumn
ename=
"receiveNo"
cname=
"收货单号"
enable=
"false"
width=
"120"
align=
"center"
/>
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"
fals
e"
width=
"120"
align=
"left"
defaultValue=
""
<EF:EFComboColumn
ename=
"whCode"
cname=
"仓库名称"
enable=
"
tru
e"
width=
"120"
align=
"left"
defaultValue=
""
filter=
"contains"
required=
"true"
>
filter=
"contains"
required=
"true"
>
<EF:EFOptions
blockId=
"wh_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
<EF:EFOptions
blockId=
"wh_record_block_id"
valueField=
"valueField"
textField=
"textField"
/>
</EF:EFComboColumn>
</EF:EFComboColumn>
...
@@ -71,6 +72,9 @@
...
@@ -71,6 +72,9 @@
<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']"
/>
<EF:EFComboColumn
cname=
"提交状态"
ename=
"submitStatus"
width=
"90"
align=
"center"
required=
"false"
>
<EF:EFCodeOption
codeName=
"hggp.sc.productStatus"
/>
</EF:EFComboColumn>
</EF:EFGrid>
</EF:EFGrid>
</EF:EFRegion>
</EF:EFRegion>
<EF:EFRegion
title=
"提示"
>
<EF:EFRegion
title=
"提示"
>
...
...
src/main/webapp/HG/SC/HGSC009.js
View file @
89fd34a1
...
@@ -226,10 +226,12 @@ function INSERTCG() {
...
@@ -226,10 +226,12 @@ function INSERTCG() {
$
.
each
(
rows
,
function
(
index
,
item
)
{
$
.
each
(
rows
,
function
(
index
,
item
)
{
if
(
item
.
get
(
"status"
)
==
0
){
if
(
item
.
get
(
"status"
)
==
0
){
message
(
"未提交,无法选中!"
);
message
(
"未提交,无法选中!"
);
flag
=
false
;
return
false
;
return
false
;
}
}
ids
.
push
(
item
.
planMaterialCode
)
ids
.
push
(
item
.
planMaterialCode
)
});
});
if
(
flag
)
{
inEiInfo
.
set
(
"planMaterialCodes"
,
ids
.
join
(
','
));
inEiInfo
.
set
(
"planMaterialCodes"
,
ids
.
join
(
','
));
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
JSUtils
.
confirm
(
"确定对勾选中的["
+
rows
.
length
+
"]条数据做
\"
保存
\"
操作? "
,
{
ok
:
function
()
{
ok
:
function
()
{
...
@@ -248,6 +250,7 @@ function INSERTCG() {
...
@@ -248,6 +250,7 @@ function INSERTCG() {
}
}
});
});
}
inEiInfo
.
set
(
"planMaterialCodes"
,
ids
.
join
(
','
));
inEiInfo
.
set
(
"planMaterialCodes"
,
ids
.
join
(
','
));
}
}
...
...
src/main/webapp/HG/SC/HGSC009A.js
View file @
89fd34a1
...
@@ -82,6 +82,9 @@ $(function () {
...
@@ -82,6 +82,9 @@ $(function () {
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'length'
,
inventRecordBoxBlockId
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'length'
,
inventRecordBoxBlockId
[
i
][
'param7Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'width'
,
inventRecordBoxBlockId
[
i
][
'param8Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'width'
,
inventRecordBoxBlockId
[
i
][
'param8Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'thick'
,
inventRecordBoxBlockId
[
i
][
'param9Field'
])
resultGrid
.
setCellValue
(
e
.
items
[
0
],
'thick'
,
inventRecordBoxBlockId
[
i
][
'param9Field'
])
//系数
let
coefficient
=
inventRecordBoxBlockId
[
i
][
'param10Field'
]
calUnitWeight
(
e
.
items
[
0
],
e
.
items
[
0
].
length
,
e
.
items
[
0
].
width
,
e
.
items
[
0
].
thick
,
coefficient
);
}
}
}
}
}
}
...
@@ -203,3 +206,10 @@ let deleteFunc = function () {
...
@@ -203,3 +206,10 @@ let deleteFunc = function () {
});
});
}
}
let
calUnitWeight
=
function
(
item
,
length
,
width
,
thick
,
coefficient
)
{
if
(
length
&&
width
&&
thick
&&
coefficient
){
let
amount
=
length
*
width
*
thick
*
coefficient
/
1000000
;
//item['amount'] = amount.toString();
resultGrid
.
setCellValue
(
item
,
'singleWeight'
,
amount
);
}
}
src/main/webapp/HG/SC/HGSC009A.jsp
View file @
89fd34a1
...
@@ -58,7 +58,7 @@
...
@@ -58,7 +58,7 @@
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
<EF:EFColumn
ename=
"singleWeight"
cname=
"单重"
width=
"120"
align=
"right"
format=
"{0:N3}"
defaultValue=
"0"
defaultValue=
"0"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-regex=
"/^-?[0-9]{1,17}([.][0-9]{1,3})?$/"
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
/>
data-errorprompt=
"请输入数字,该值最大可设置17位整数和3位小数!"
enable=
"false"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"grossAmount"
cname=
"总重"
width=
"120"
align=
"right"
enable=
"false"
format=
"{0:N3}"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"prdtCode"
cname=
"部件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
<EF:EFColumn
ename=
"partCode"
cname=
"零件编码"
enable=
"false"
width=
"120"
align=
"center"
hidden=
"true"
/>
...
...
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