Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
E
erp-service
Project
Project
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
ximai
erp-service
Commits
5c32c654
Commit
5c32c654
authored
Jan 14, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调拨、盘点默认值调整
parent
6c0122e6
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
180 additions
and
8 deletions
+180
-8
InvtaCreateParamsAllo.java
...topsunit/scanservice/ximai/dto/InvtaCreateParamsAllo.java
+77
-0
InvtbCreateParams.java
...com/topsunit/scanservice/ximai/dto/InvtbCreateParams.java
+1
-1
InvtbCreateParamsAllo.java
...topsunit/scanservice/ximai/dto/InvtbCreateParamsAllo.java
+84
-0
InvtaService.java
.../com/topsunit/scanservice/ximai/service/InvtaService.java
+18
-7
No files found.
src/main/java/com/topsunit/scanservice/ximai/dto/InvtaCreateParamsAllo.java
0 → 100644
View file @
5c32c654
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
java.math.BigDecimal
;
/**
* <p>Title: InvtaCreateParamsAllo</p>
* <p>Description: 交易单据单头档</p>
*
* @author chicheng.li
* @version V1.0
* @date 2024/12/27
*/
@Data
public
class
InvtaCreateParamsAllo
{
/**
* 105:盘盈
* 106:盘亏
*/
@Id
@ApiModelProperty
(
"单别"
)
private
String
ta001
;
@Id
@ApiModelProperty
(
"单号"
)
private
String
ta002
;
@ApiModelProperty
(
"交易日期"
)
private
String
ta003
;
@ApiModelProperty
(
"部门编号"
)
private
String
ta004
=
""
;
@ApiModelProperty
(
"备注"
)
private
String
ta005
=
""
;
@ApiModelProperty
(
"审核码"
)
private
String
ta006
=
"N"
;
@ApiModelProperty
(
"打印次数"
)
private
Integer
ta007
=
0
;
@ApiModelProperty
(
"工厂编号"
)
private
String
ta008
=
"01"
;
@ApiModelProperty
(
"单据性质码"
)
private
String
ta009
;
@ApiModelProperty
(
"件数"
)
private
Integer
ta010
=
0
;
@ApiModelProperty
(
"总数量"
)
private
BigDecimal
ta011
;
@ApiModelProperty
(
"总金额"
)
private
BigDecimal
ta012
;
@ApiModelProperty
(
"生成分录"
)
private
String
ta013
=
"N"
;
@ApiModelProperty
(
"单据日期"
)
private
String
ta014
;
@ApiModelProperty
(
"审核者"
)
private
String
ta015
=
""
;
@ApiModelProperty
(
"总包装数量"
)
private
BigDecimal
ta016
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"签核状态码"
)
private
String
ta017
=
"N"
;
@ApiModelProperty
(
"海关手册"
)
private
String
ta018
=
""
;
@ApiModelProperty
(
"审批意见"
)
private
String
ta019
=
""
;
@ApiModelProperty
(
"不合格原因"
)
private
String
ta020
=
""
;
@ApiModelProperty
(
"传送次数"
)
private
Integer
ta021
=
0
;
@ApiModelProperty
(
"汇入日期"
)
private
String
ta022
=
""
;
@ApiModelProperty
(
"门店编号"
)
private
String
ta023
=
""
;
@ApiModelProperty
(
"对方汇出日期"
)
private
String
ta024
=
""
;
@ApiModelProperty
(
"单据来源"
)
private
String
ta025
=
"1"
;
@ApiModelProperty
(
"批号"
)
private
String
ta033
=
"********************"
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvtbCreateParams.java
View file @
5c32c654
...
...
@@ -58,7 +58,7 @@ public class InvtbCreateParams {
@ApiModelProperty
(
"小单位"
)
private
String
tb020
=
""
;
@ApiModelProperty
(
"项目编号"
)
private
String
tb021
=
"
********************
"
;
private
String
tb021
=
""
;
@ApiModelProperty
(
"包装数量"
)
private
BigDecimal
tb022
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"包装单位"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/InvtbCreateParamsAllo.java
0 → 100644
View file @
5c32c654
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
/**
* <p>Title: InvtbCreateParamsAllo</p>
* <p>Description: 交易单据单身档</p>
*
* @author chicheng.li
* @version V1.0
* @date 2024/12/27
*/
@Data
public
class
InvtbCreateParamsAllo
{
@ApiModelProperty
(
"单别"
)
private
String
tb001
;
@ApiModelProperty
(
"单号"
)
private
String
tb002
;
@ApiModelProperty
(
"序号"
)
private
String
tb003
;
@ApiModelProperty
(
"品号"
)
private
String
tb004
;
@ApiModelProperty
(
"品名"
)
private
String
tb005
;
@ApiModelProperty
(
"规格"
)
private
String
tb006
;
@ApiModelProperty
(
"数量"
)
private
BigDecimal
tb007
;
@ApiModelProperty
(
"单位"
)
private
String
tb008
;
@ApiModelProperty
(
"库存数量"
)
private
BigDecimal
tb009
;
@ApiModelProperty
(
"单位成本"
)
private
BigDecimal
tb010
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"金额"
)
private
BigDecimal
tb011
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"转出库"
)
private
String
tb012
;
@ApiModelProperty
(
"转入库"
)
private
String
tb013
=
""
;
@ApiModelProperty
(
"批号"
)
private
String
tb014
=
"********************"
;
@ApiModelProperty
(
"有效日期"
)
private
String
tb015
=
""
;
@ApiModelProperty
(
"复检日期"
)
private
String
tb016
=
""
;
@ApiModelProperty
(
"备注"
)
private
String
tb017
=
""
;
@ApiModelProperty
(
"审核码"
)
private
String
tb018
=
"N"
;
@ApiModelProperty
(
"预留字段"
)
private
String
tb019
;
@ApiModelProperty
(
"小单位"
)
private
String
tb020
=
""
;
@ApiModelProperty
(
"项目编号"
)
private
String
tb021
=
""
;
@ApiModelProperty
(
"包装数量"
)
private
BigDecimal
tb022
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"包装单位"
)
private
String
tb023
=
""
;
@ApiModelProperty
(
"存储位置"
)
private
String
tb024
=
""
;
@ApiModelProperty
(
"已销毁数量"
)
private
BigDecimal
tb025
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"件装"
)
private
BigDecimal
tb026
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
tb027
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"批号说明"
)
private
String
tb028
=
""
;
@ApiModelProperty
(
"转出库位"
)
private
String
tb029
;
@ApiModelProperty
(
"转入库位"
)
private
String
tb030
=
""
;
@ApiModelProperty
(
"生产日期"
)
private
String
tb031
=
""
;
@ApiModelProperty
(
"图号"
)
private
String
udf01
=
""
;
}
src/main/java/com/topsunit/scanservice/ximai/service/InvtaService.java
View file @
5c32c654
...
...
@@ -94,22 +94,29 @@ public class InvtaService {
}
private
void
saveData
(
String
type
,
List
<
StockTransactionParams
>
data
){
Invta
invta
=
BeanUtil
.
toBeanIgnoreError
(
new
InvtaCreateParams
(),
Invta
.
class
)
;
Invta
invta
=
null
;
String
ta002
=
this
.
getNewTa002
(
type
);
invta
.
setTa001
(
type
);
invta
.
setTa002
(
ta002
);
if
(
type
.
equals
(
inventory_allocate
)){
invta
=
BeanUtil
.
toBeanIgnoreError
(
new
InvtaCreateParamsAllo
(),
Invta
.
class
);
invta
.
setTa009
(
"12"
);
}
else
{
invta
=
BeanUtil
.
toBeanIgnoreError
(
new
InvtaCreateParams
(),
Invta
.
class
);
invta
.
setTa009
(
"11"
);
}
invta
.
setTa001
(
type
);
invta
.
setTa002
(
ta002
);
String
currDate
=
DateUtil
.
currentDateString
();
invta
.
setTa003
(
currDate
);
invta
.
setTa014
(
currDate
);
int
i
=
1
;
BigDecimal
total
=
BigDecimal
.
ZERO
;
for
(
StockTransactionParams
detail
:
data
){
InvtbCreateParams
invtbDto
=
new
InvtbCreateParams
();
Object
invtbDto
=
null
;
if
(
type
.
equals
(
inventory_allocate
))
{
invtbDto
=
new
InvtbCreateParamsAllo
();
}
else
{
invtbDto
=
new
InvtbCreateParams
();
}
//查询物料
Invmb
invmb
=
invmbDao
.
findById
(
detail
.
getMaterialNo
())
.
orElseThrow
(()->
new
TopsunitException
(
String
.
format
(
"未找到物料:%s"
,
detail
.
getMaterialNo
())));
...
...
@@ -121,7 +128,9 @@ public class InvtaService {
invtb
.
setTb005
(
detail
.
getMaterialName
());
invtb
.
setTb006
(
invmb
.
getMb003
());
invtb
.
setTb008
(
invmb
.
getMb149
());
if
(!
type
.
equals
(
inventory_allocate
)){
invtb
.
setUdf01
(
invmb
.
getMb029
());
}
//盘点数量
invtb
.
setTb007
(
detail
.
getQuantity
());
invtb
.
setTb009
(
detail
.
getQuantity
());
...
...
@@ -137,8 +146,10 @@ public class InvtaService {
throw
new
TopsunitException
(
"调拨库位与当前一致"
);
}
}
if
(
type
.
equals
(
inventory_allocate
))
{
invtb
.
setTb013
(
detail
.
getAllocateWarehouse
());
invtb
.
setTb030
(
detail
.
getAllocateLocation
());
}
invtbDao
.
save
(
invtb
);
total
=
total
.
add
(
invtb
.
getTb007
());
i
++;
...
...
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