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
a0d900a3
Commit
a0d900a3
authored
Aug 13, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
手动新增收货时直接生成入库单,并入默认仓库
parent
007cf0a8
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
1 deletions
+50
-1
ServiceHGCG003.java
.../java/com/baosight/hggp/hg/cg/service/ServiceHGCG003.java
+1
-1
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+43
-0
HGKC001.js
src/main/webapp/HG/KC/HGKC001.js
+6
-0
No files found.
src/main/java/com/baosight/hggp/hg/cg/service/ServiceHGCG003.java
View file @
a0d900a3
...
...
@@ -359,7 +359,7 @@ public class ServiceHGCG003 extends ServiceBase {
paramDetailMap
.
put
(
HGCG003B
.
FIELD_DEPOSIT_QTY
,
o
.
getReceiveQty
());
DaoUtils
.
update
(
HGSqlConstant
.
HgCg003B
.
UPDATE_CONFIRM
,
paramDetailMap
);
//采购入库
HGKCTools
.
HgKc001
.
putInStorageData
(
o
.
getId
());
HGKCTools
.
HgKc001
.
putInStorageData
AndSubmit
(
o
.
getId
());
});
}
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
a0d900a3
...
...
@@ -11,6 +11,7 @@ import com.baosight.hggp.hg.cg.domain.HGCG003B;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
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.kc.domain.*
;
import
com.baosight.hggp.hg.kc.utils.HGKCUtils
;
import
com.baosight.hggp.hg.pz.domain.HGPZ005
;
...
...
@@ -135,6 +136,45 @@ public class HGKCTools {
}
/**
* 生产入库(入库质检单)
* @param receiveId
*/
public
static
void
putInStorageDataAndSubmit
(
Long
receiveId
)
{
List
<
Long
>
receiveIDsList
=
new
LinkedList
<>();
receiveIDsList
.
add
(
receiveId
);
// db数据
Map
<
Long
,
HGCG003B
>
dbCg003BMap
=
HGCGUtils
.
HgCg003B
.
lockGetData
(
receiveIDsList
);
HGCG003B
dbCg003B
=
dbCg003BMap
.
get
(
receiveId
);
HGKC001
newKc001
=
new
HGKC001
();
BeanUtils
.
copyProperties
(
dbCg003B
,
newKc001
,
"id"
,
"createdBy"
,
"createdName"
,
"createdTime"
,
"updatedBy"
,
"updatedName"
,
"updatedTime"
);
newKc001
.
setDepositDate
(
DateUtils
.
shortDate
());
newKc001
.
setDepositNo
(
SequenceGenerator
.
getNextSequence
(
HGConstant
.
SequenceId
.
CG_DEPOSIT_NO
));
newKc001
.
setDepositQty
(
dbCg003B
.
getDepositQty
());
newKc001
.
setDepositUnitWeight
(
dbCg003B
.
getReceiveUnitWeight
());
newKc001
.
setDepositWeight
(
dbCg003B
.
getDepositQty
().
multiply
(
dbCg003B
.
getReceiveUnitWeight
()));
newKc001
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
newKc001
.
setSubmitStatus
(
HGConstant
.
ProductStatus
.
YTJ
);
newKc001
.
setStorageType
(
HGConstant
.
StorageType
.
RK
);
newKc001
.
setIsReturn
(
CommonConstant
.
YesNo
.
NO_0
);
newKc001
.
setReceiveDetailId
(
dbCg003B
.
getId
());
List
<
HGPZ007
>
hgpz007List
=
HGPZTools
.
HgPz007
.
allList
();
//获取仓库信息
HGPZ007
hgpz007
=
hgpz007List
.
stream
().
filter
(
wh
->
wh
.
getInventTypeDetail
()
!=
null
&&
wh
.
getInventTypeDetail
().
intValue
()
==
newKc001
.
getInventTypeDetail
()).
findAny
().
orElse
(
null
);
if
(
Objects
.
nonNull
(
hgpz007
)){
newKc001
.
setWhCode
(
hgpz007
.
getWhCode
());
newKc001
.
setWhName
(
hgpz007
.
getWhName
());
}
else
{
AssertUtils
.
isNull
(
hgpz007
.
getId
(),
"仓库信息未获取到,请检查仓库档案是否维护存货大类!"
);
}
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);
}
/**
* 查询
* 成本核算数据检查
* @param paramMap
...
...
@@ -265,6 +305,7 @@ public class HGKCTools {
DaoUtils
.
insertBatch
(
HGKC003
.
INSERT
,
hgkc003List
);
//可能全部不合格
if
(!
CollectionUtils
.
isEmpty
(
hgkc003List
)){
//查看是否能获取到账期,获取不到就提示
List
<
String
>
inventCodes
=
hgkc003List
.
stream
().
map
(
HGKC003:
:
getPrdtCode
).
collect
(
Collectors
.
toList
());
List
<
HGPZ005A
>
hgpz005AList
=
HGPZTools
.
HgPz005A
.
queryByInventCodes
(
inventCodes
);
hgkc003List
.
forEach
(
hgkc003
->{
...
...
@@ -336,6 +377,8 @@ public class HGKCTools {
AssertUtils
.
isNull
(
hgpz007
.
getId
(),
"仓库信息未获取到,请检查仓库档案是否维护存货大类!"
);
}
hgkc003
.
setDepositDate
(
DateUtils
.
shortDate
());
//检查是否能入库
// HGCWTools.HgCw001.getAccountPeriod(hgkc003.getCompanyCode(),hgkc003.getDepositDate());
hgkc003
.
setStorageType
(
HGConstant
.
StorageType
.
RK
);
hgkc003
.
setIsReturn
(
CommonConstant
.
YesNo
.
NO_0
);
hgkc003
.
setDeleteFlag
(
DeleteFlagEnum
.
UN_REMOVE
.
getCode
());
...
...
src/main/webapp/HG/KC/HGKC001.js
View file @
a0d900a3
...
...
@@ -29,6 +29,12 @@ $(function () {
}
}
],
beforeEdit
:
function
(
e
)
{
let
item
=
e
.
model
;
if
(
item
.
submitStatus
!=
'0'
){
e
.
preventDefault
();
}
},
loadComplete
:
function
(
grid
)
{
// 确认
$
(
"#CONFIRM"
).
on
(
"click"
,
confirm
);
...
...
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