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
674963de
Commit
674963de
authored
Jul 26, 2024
by
江和松
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
采购入库新增采购收货明细id
parent
d6836703
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
17 deletions
+42
-17
HGKC001.java
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
+17
-0
ServiceHGKC001.java
.../java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
+1
-0
HGKC001.xml
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
+11
-3
HGKCTools.java
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
+12
-13
ServiceHGZL001.java
.../java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
+1
-1
No files found.
src/main/java/com/baosight/hggp/hg/kc/domain/HGKC001.java
View file @
674963de
...
...
@@ -60,6 +60,7 @@ public class HGKC001 extends DaoEPBase {
public
static
final
String
FIELD_PRICE
=
"price"
;
/* 单价*/
public
static
final
String
FIELD_AMOUNT
=
"amount"
;
/* 金额*/
public
static
final
String
FIELD_INVENT_TYPE_DETAIL
=
"inventTypeDetail"
;
/*存货类型明细*/
public
static
final
String
FIELD_RECEIVE_DETAIL_ID
=
"receiveDetailId"
;
/*采购收货明细id*/
public
static
final
String
COL_ID
=
"ID"
;
public
static
final
String
COL_ACCOUNT_CODE
=
"ACCOUNT_CODE"
;
/* 企业编码*/
...
...
@@ -149,6 +150,7 @@ public class HGKC001 extends DaoEPBase {
private
BigDecimal
price
=
new
BigDecimal
(
0.000
);
/* 单价*/
private
BigDecimal
amount
=
new
BigDecimal
(
0.000
);
/* 金额*/
private
Integer
inventTypeDetail
;
/*存货类型明细 1:构建 2:零件*/
private
Long
receiveDetailId
=
new
Long
(
0
);
/* 采购收货明细id*/
/**
* initialize the metadata.
...
...
@@ -332,6 +334,10 @@ public class HGKC001 extends DaoEPBase {
eiColumn
=
new
EiColumn
(
FIELD_INVENT_TYPE_DETAIL
);
eiColumn
.
setDescName
(
"存货类型明细"
);
eiMetadata
.
addMeta
(
eiColumn
);
eiColumn
=
new
EiColumn
(
FIELD_RECEIVE_DETAIL_ID
);
eiColumn
.
setDescName
(
"采购收货明细id"
);
eiMetadata
.
addMeta
(
eiColumn
);
}
/**
...
...
@@ -941,6 +947,15 @@ public class HGKC001 extends DaoEPBase {
public
void
setInventTypeDetail
(
Integer
inventTypeDetail
)
{
this
.
inventTypeDetail
=
inventTypeDetail
;
}
public
Long
getReceiveDetailId
()
{
return
receiveDetailId
;
}
public
void
setReceiveDetailId
(
Long
receiveDetailId
)
{
this
.
receiveDetailId
=
receiveDetailId
;
}
/**
* get the value from Map.
*
...
...
@@ -987,6 +1002,7 @@ public class HGKC001 extends DaoEPBase {
setPrice
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_PRICE
)),
price
));
setAmount
(
NumberUtils
.
toBigDecimal
(
StringUtils
.
toString
(
map
.
get
(
FIELD_AMOUNT
)),
amount
));
setInventTypeDetail
(
NumberUtils
.
toInteger
(
StringUtils
.
toString
(
map
.
get
(
FIELD_INVENT_TYPE_DETAIL
)),
inventTypeDetail
));
setReceiveDetailId
(
NumberUtils
.
toLong
(
StringUtils
.
toString
(
map
.
get
(
FIELD_RECEIVE_DETAIL_ID
)),
receiveDetailId
));
}
/**
...
...
@@ -1034,6 +1050,7 @@ public class HGKC001 extends DaoEPBase {
map
.
put
(
FIELD_PRICE
,
StringUtils
.
toString
(
price
,
eiMetadata
.
getMeta
(
FIELD_PRICE
)));
map
.
put
(
FIELD_AMOUNT
,
StringUtils
.
toString
(
amount
,
eiMetadata
.
getMeta
(
FIELD_AMOUNT
)));
map
.
put
(
FIELD_INVENT_TYPE_DETAIL
,
StringUtils
.
toString
(
inventTypeDetail
,
eiMetadata
.
getMeta
(
FIELD_INVENT_TYPE_DETAIL
)));
map
.
put
(
FIELD_RECEIVE_DETAIL_ID
,
StringUtils
.
toString
(
receiveDetailId
,
eiMetadata
.
getMeta
(
FIELD_RECEIVE_DETAIL_ID
)));
return
map
;
}
...
...
src/main/java/com/baosight/hggp/hg/kc/service/ServiceHGKC001.java
View file @
674963de
...
...
@@ -208,6 +208,7 @@ public class ServiceHGKC001 extends ServiceBase {
hgkc001
.
getDepositQty
(),
hgkc001
.
getDepositUnitWeight
(),
hgkc001
.
getDepositWeight
());
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateStatus
(
hgkc001
.
getReceiveNo
(),
HGConstant
.
CgReceiveStatus
.
S_5
);
HGCGTools
.
HgCg003B
.
updateStatus
(
hgkc001
.
getReceiveDetailId
(),
HGConstant
.
CgReceiveStatus
.
S_5
);
}
inInfo
.
setStatus
(
EiConstant
.
STATUS_SUCCESS
);
inInfo
.
setMsgByKey
(
"ep.1000"
,
new
String
[]{
String
.
valueOf
(
i
),
I18nMessages
.
getText
(
"label.update"
,
"提交"
)});
...
...
src/main/java/com/baosight/hggp/hg/kc/sql/HGKC001.xml
View file @
674963de
...
...
@@ -40,7 +40,8 @@
PRICE as "price",
<!-- 单价 -->
AMOUNT as "amount",
<!-- 金额 -->
SUBMIT_STATUS as "submitStatus",
<!-- 提交状态 -->
INVENT_TYPE_DETAIL as "inventTypeDetail"
INVENT_TYPE_DETAIL as "inventTypeDetail",
<!-- 存货类型明细 -->
RECEIVE_DETAIL_ID as "receiveDetailId"
<!-- 采购收货明细id -->
</sql>
<sql
id=
"condition"
>
...
...
@@ -120,6 +121,12 @@
<isNotEmpty
prepend=
" AND "
property=
"inventTypeDetails"
>
INVENT_TYPE_DETAIL IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"inventTypeDetails"
>
#inventTypeDetails[]#
</iterate>
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveDetailId"
>
RECEIVE_DETAIL_ID = #receiveDetailId#
</isNotEmpty>
<isNotEmpty
prepend=
" AND "
property=
"receiveDetailIds"
>
RECEIVE_DETAIL_ID IN
<iterate
close=
")"
open=
"("
conjunction=
","
property=
"receiveDetailIds"
>
#receiveDetailIds[]#
</iterate>
</isNotEmpty>
</sql>
<sql
id=
"idCondition"
>
...
...
@@ -206,14 +213,15 @@
PRICE,
<!-- 单价 -->
AMOUNT,
<!-- 金额 -->
SUBMIT_STATUS,
INVENT_TYPE_DETAIL
INVENT_TYPE_DETAIL,
RECEIVE_DETAIL_ID
) VALUES (
#accountCode#, #depCode#, #createdBy#, #createdName#, #createdTime#,
#deleteFlag#, #companyCode#, #companyName#, #depositDate#, #depositNo#,
#receiveNo#, #planNo#, #contractNo#, #whCode#, #whName#, #inventType#,
#inventCode#, #inventName#, #specId#, #spec#, #material#,
#unit#, #length#, #width#, #thick#, #depositQty#, #depositUnitWeight#, #depositWeight#,
#storageType#, #isReturn#,#price#, #amount#,#submitStatus#,#inventTypeDetail#
#storageType#, #isReturn#,#price#, #amount#,#submitStatus#,#inventTypeDetail#
, #receiveDetailId#
)
</insert>
...
...
src/main/java/com/baosight/hggp/hg/kc/tools/HGKCTools.java
View file @
674963de
...
...
@@ -3,12 +3,11 @@ package com.baosight.hggp.hg.kc.tools;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baosight.hggp.common.CheckTypeEnum
;
import
com.baosight.hggp.common.InventorySource
;
import
com.baosight.hggp.core.constant.CommonConstant
;
import
com.baosight.hggp.core.dao.DaoBase
;
import
com.baosight.hggp.core.dao.DaoUtils
;
import
com.baosight.hggp.core.enums.DeleteFlagEnum
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
;
import
com.baosight.hggp.hg.cg.domain.HGCG003
B
;
import
com.baosight.hggp.hg.cg.utils.HGCGUtils
;
import
com.baosight.hggp.hg.constant.HGConstant
;
import
com.baosight.hggp.hg.constant.HGSqlConstant
;
...
...
@@ -104,25 +103,25 @@ public class HGKCTools {
/**
* 生产入库(入库质检单)
* @param receive
No
* @param receive
Id
*/
public
static
void
putInStorageData
(
String
receiveNo
)
{
List
<
String
>
receiveNo
List
=
new
LinkedList
<>();
receive
NoList
.
add
(
receiveNo
);
public
static
void
putInStorageData
(
Long
receiveId
)
{
List
<
Long
>
receiveIDs
List
=
new
LinkedList
<>();
receive
IDsList
.
add
(
receiveId
);
// db数据
Map
<
String
,
HGCG003
>
dbCg003Map
=
HGCGUtils
.
HgCg003
.
lockGetData
(
receiveNo
List
);
HGCG003
dbCg003
=
dbCg003Map
.
get
(
receiveNo
);
HGKC001
newKc001
=
BeanUtils
.
copy
(
dbCg003
,
HGKC001
.
class
);
Map
<
Long
,
HGCG003B
>
dbCg003BMap
=
HGCGUtils
.
HgCg003B
.
lockGetData
(
receiveIDs
List
);
HGCG003
B
dbCg003B
=
dbCg003BMap
.
get
(
receiveId
);
HGKC001
newKc001
=
BeanUtils
.
copy
(
dbCg003
B
,
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
.
setDepositQty
(
dbCg003
B
.
getDepositQty
());
newKc001
.
setDepositUnitWeight
(
dbCg003
B
.
getReceiveUnitWeight
());
newKc001
.
setDepositWeight
(
dbCg003
B
.
getDepositQty
().
multiply
(
dbCg003B
.
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
);
newKc001
.
setReceiveDetailId
(
dbCg003B
.
getId
());
DaoUtils
.
insert
(
HGKC001
.
INSERT
,
newKc001
);
// 更新库存数量
// HGKCUtils.HgKc010.updateInv(newKc001.getCompanyCode(), newKc001.getWhCode(), newKc001.getInventCode(),
...
...
src/main/java/com/baosight/hggp/hg/zl/service/ServiceHGZL001.java
View file @
674963de
...
...
@@ -243,7 +243,7 @@ public class ServiceHGZL001 extends ServiceBase {
// // 更新收货单状态
// HGCGTools.HgCg003.updateCheck(dbZl001);
//生成采购入库单
HGKCTools
.
HgKc001
.
putInStorageData
(
dbZl001
.
getReceive
No
());
HGKCTools
.
HgKc001
.
putInStorageData
(
dbZl001
.
getReceive
DetailId
());
}
// 更新收货单状态
HGCGTools
.
HgCg003
.
updateChecks
(
fZl001s
);
...
...
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