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
51d3068f
Commit
51d3068f
authored
Aug 09, 2025
by
李驰骋
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加批次号管理
parent
d6d7e4de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
105 additions
and
1576 deletions
+105
-1576
Constants.java
...java/com/topsunit/scanservice/ximai/common/Constants.java
+5
-0
MoctaController.java
...opsunit/scanservice/ximai/controller/MoctaController.java
+5
-0
CopthCreateParams.java
...com/topsunit/scanservice/ximai/dto/CopthCreateParams.java
+2
-1
IInvmlDto.java
...in/java/com/topsunit/scanservice/ximai/dto/IInvmlDto.java
+3
-0
InvmlDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/InvmlDto.java
+5
-0
InvtaCreateParams.java
...com/topsunit/scanservice/ximai/dto/InvtaCreateParams.java
+2
-1
InvtbCreateParams.java
...com/topsunit/scanservice/ximai/dto/InvtbCreateParams.java
+2
-1
InvtbCreateParamsAllo.java
...topsunit/scanservice/ximai/dto/InvtbCreateParamsAllo.java
+2
-1
MoctaDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/MoctaDto.java
+8
-7
MoctfCreateParams2.java
...om/topsunit/scanservice/ximai/dto/MoctfCreateParams2.java
+2
-0
MoctgCreateParams.java
...com/topsunit/scanservice/ximai/dto/MoctgCreateParams.java
+2
-1
PurcdDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/PurcdDto.java
+2
-0
PurthCreateDto.java
...va/com/topsunit/scanservice/ximai/dto/PurthCreateDto.java
+3
-0
StockAllocateParams.java
...m/topsunit/scanservice/ximai/dto/StockAllocateParams.java
+2
-0
StockSaleOutParams.java
...om/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
+2
-0
StockTakingParams.java
...com/topsunit/scanservice/ximai/dto/StockTakingParams.java
+2
-0
StockTransactionParams.java
...opsunit/scanservice/ximai/dto/StockTransactionParams.java
+2
-0
Purcd.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purcd.java
+1
-1
Purtg.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purtg.java
+3
-664
Purth.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purth.java
+5
-888
CopthService.java
.../com/topsunit/scanservice/ximai/service/CopthService.java
+3
-0
InvmcService.java
.../com/topsunit/scanservice/ximai/service/InvmcService.java
+2
-0
InvtaService.java
.../com/topsunit/scanservice/ximai/service/InvtaService.java
+1
-0
MoctaService.java
.../com/topsunit/scanservice/ximai/service/MoctaService.java
+5
-0
MoctcService.java
.../com/topsunit/scanservice/ximai/service/MoctcService.java
+2
-1
MoctfService.java
.../com/topsunit/scanservice/ximai/service/MoctfService.java
+7
-4
PurccService.java
.../com/topsunit/scanservice/ximai/service/PurccService.java
+17
-0
PurtgService.java
.../com/topsunit/scanservice/ximai/service/PurtgService.java
+6
-5
SfctbService.java
.../com/topsunit/scanservice/ximai/service/SfctbService.java
+2
-1
No files found.
src/main/java/com/topsunit/scanservice/ximai/common/Constants.java
View file @
51d3068f
...
@@ -56,6 +56,11 @@ public class Constants {
...
@@ -56,6 +56,11 @@ public class Constants {
*/
*/
public
static
final
String
LOGIN_FAIL
=
"Error"
;
public
static
final
String
LOGIN_FAIL
=
"Error"
;
/**
* 默认批号
*/
public
static
final
String
BATCH_DEF
=
Constants
.
BATCH_DEF
;
/**
/**
* 验证码 redis key
* 验证码 redis key
*/
*/
...
...
src/main/java/com/topsunit/scanservice/ximai/controller/MoctaController.java
View file @
51d3068f
...
@@ -40,6 +40,11 @@ public class MoctaController {
...
@@ -40,6 +40,11 @@ public class MoctaController {
Optional
<
MoctaDocDto
>
getForDoc
(
@RequestBody
MoctaIdCriteria
criteria
){
Optional
<
MoctaDocDto
>
getForDoc
(
@RequestBody
MoctaIdCriteria
criteria
){
return
moctaService
.
getForDoc
(
criteria
);
return
moctaService
.
getForDoc
(
criteria
);
}
}
@ApiOperation
(
"获取工单信息"
)
@PostMapping
(
"/mocta/get"
)
Optional
<
MoctaDto
>
get
(
@RequestBody
MoctaIdCriteria
criteria
){
return
moctaService
.
get
(
criteria
);
}
@ApiOperation
(
"获取文件列表"
)
@ApiOperation
(
"获取文件列表"
)
@PostMapping
(
"/mocta/getfordocList"
)
@PostMapping
(
"/mocta/getfordocList"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/CopthCreateParams.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -47,7 +48,7 @@ public class CopthCreateParams {
...
@@ -47,7 +48,7 @@ public class CopthCreateParams {
@ApiModelProperty
(
"订单序号"
)
@ApiModelProperty
(
"订单序号"
)
private
String
th016
;
private
String
th016
;
@ApiModelProperty
(
"批号"
)
@ApiModelProperty
(
"批号"
)
private
String
th017
=
"********************"
;
private
String
th017
=
Constants
.
BATCH_DEF
;
@ApiModelProperty
(
"备注"
)
@ApiModelProperty
(
"备注"
)
private
String
th018
;
private
String
th018
;
@ApiModelProperty
(
"客户品号"
)
@ApiModelProperty
(
"客户品号"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/IInvmlDto.java
View file @
51d3068f
...
@@ -33,4 +33,7 @@ public interface IInvmlDto {
...
@@ -33,4 +33,7 @@ public interface IInvmlDto {
@ApiModelProperty
(
"库存数量"
)
@ApiModelProperty
(
"库存数量"
)
public
BigDecimal
getMl005
();
public
BigDecimal
getMl005
();
@ApiModelProperty
(
"最近入库日"
)
public
String
getMl009
();
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvmlDto.java
View file @
51d3068f
...
@@ -43,4 +43,9 @@ public class InvmlDto {
...
@@ -43,4 +43,9 @@ public class InvmlDto {
*/
*/
@ApiModelProperty
(
"库存数量"
)
@ApiModelProperty
(
"库存数量"
)
private
BigDecimal
ml005
;
private
BigDecimal
ml005
;
/**
* 最近入库日
*/
@ApiModelProperty
(
"最近入库日"
)
private
String
ml009
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvtaCreateParams.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -73,5 +74,5 @@ public class InvtaCreateParams {
...
@@ -73,5 +74,5 @@ public class InvtaCreateParams {
@ApiModelProperty
(
"单据来源"
)
@ApiModelProperty
(
"单据来源"
)
private
String
ta025
=
"1"
;
private
String
ta025
=
"1"
;
@ApiModelProperty
(
"批号"
)
@ApiModelProperty
(
"批号"
)
private
String
ta033
=
"********************"
;
private
String
ta033
=
Constants
.
BATCH_DEF
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvtbCreateParams.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -44,7 +45,7 @@ public class InvtbCreateParams {
...
@@ -44,7 +45,7 @@ public class InvtbCreateParams {
@ApiModelProperty
(
"转入库"
)
@ApiModelProperty
(
"转入库"
)
private
String
tb013
=
""
;
private
String
tb013
=
""
;
@ApiModelProperty
(
"批号"
)
@ApiModelProperty
(
"批号"
)
private
String
tb014
=
"********************"
;
private
String
tb014
=
Constants
.
BATCH_DEF
;
@ApiModelProperty
(
"有效日期"
)
@ApiModelProperty
(
"有效日期"
)
private
String
tb015
=
""
;
private
String
tb015
=
""
;
@ApiModelProperty
(
"复检日期"
)
@ApiModelProperty
(
"复检日期"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/InvtbCreateParamsAllo.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -43,7 +44,7 @@ public class InvtbCreateParamsAllo {
...
@@ -43,7 +44,7 @@ public class InvtbCreateParamsAllo {
@ApiModelProperty
(
"转入库"
)
@ApiModelProperty
(
"转入库"
)
private
String
tb013
=
""
;
private
String
tb013
=
""
;
@ApiModelProperty
(
"批号"
)
@ApiModelProperty
(
"批号"
)
private
String
tb014
=
"********************"
;
private
String
tb014
=
Constants
.
BATCH_DEF
;
@ApiModelProperty
(
"有效日期"
)
@ApiModelProperty
(
"有效日期"
)
private
String
tb015
=
""
;
private
String
tb015
=
""
;
@ApiModelProperty
(
"复检日期"
)
@ApiModelProperty
(
"复检日期"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/MoctaDto.java
View file @
51d3068f
...
@@ -22,11 +22,11 @@ public class MoctaDto {
...
@@ -22,11 +22,11 @@ public class MoctaDto {
private
String
ta003
;
private
String
ta003
;
/*BOM日期[FORMATE:YMD]*/
/*BOM日期[FORMATE:YMD]*/
private
String
ta004
;
private
String
ta004
;
/*BOM版本*/
@ApiModelProperty
(
"BOM版本"
)
private
String
ta005
;
private
String
ta005
;
/*产品品号*/
@ApiModelProperty
(
"产品品号"
)
private
String
ta006
;
private
String
ta006
;
/*单位*/
@ApiModelProperty
(
"单位"
)
private
String
ta007
;
private
String
ta007
;
/*预留字段 小单位*/
/*预留字段 小单位*/
private
String
ta008
;
private
String
ta008
;
...
@@ -41,16 +41,17 @@ public class MoctaDto {
...
@@ -41,16 +41,17 @@ public class MoctaDto {
/*审核码 Y、N、V*/
/*审核码 Y、N、V*/
private
String
ta013
;
private
String
ta013
;
/*实际完工[FORMATE:YMD]*/
/*实际完工[FORMATE:YMD]*/
@ApiModelProperty
(
"实际完工[FORMATE:YMD]"
)
private
String
ta014
;
private
String
ta014
;
/*预计产量*/
@ApiModelProperty
(
"预计产量"
)
private
BigDecimal
ta015
;
private
BigDecimal
ta015
;
/*已领套数*/
@ApiModelProperty
(
"已领套数"
)
private
BigDecimal
ta016
;
private
BigDecimal
ta016
;
/*已生产量*/
@ApiModelProperty
(
"已生产量"
)
private
BigDecimal
ta017
;
private
BigDecimal
ta017
;
/*报废数量*/
/*报废数量*/
private
BigDecimal
ta018
;
private
BigDecimal
ta018
;
/*工厂编号*/
@ApiModelProperty
(
"工厂编号"
)
private
String
ta019
;
private
String
ta019
;
/*入库仓库*/
/*入库仓库*/
private
String
ta020
;
private
String
ta020
;
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/MoctfCreateParams2.java
View file @
51d3068f
...
@@ -29,5 +29,7 @@ public class MoctfCreateParams2 {
...
@@ -29,5 +29,7 @@ public class MoctfCreateParams2 {
private
String
tg014
;
private
String
tg014
;
@ApiModelProperty
(
"工单单号"
)
@ApiModelProperty
(
"工单单号"
)
private
String
tg015
;
private
String
tg015
;
@ApiModelProperty
(
"批号"
)
private
String
batchNo
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/MoctgCreateParams.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -54,7 +55,7 @@ public class MoctgCreateParams {
...
@@ -54,7 +55,7 @@ public class MoctgCreateParams {
@ApiModelProperty
(
"检验状态"
)
@ApiModelProperty
(
"检验状态"
)
private
String
tg016
=
"0"
;
private
String
tg016
=
"0"
;
@ApiModelProperty
(
"批号"
)
@ApiModelProperty
(
"批号"
)
private
String
tg017
=
"********************"
;
private
String
tg017
=
Constants
.
BATCH_DEF
;
@ApiModelProperty
(
"急料"
)
@ApiModelProperty
(
"急料"
)
private
String
tg024
;
private
String
tg024
;
@ApiModelProperty
(
"生产日期"
)
@ApiModelProperty
(
"生产日期"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/PurcdDto.java
View file @
51d3068f
...
@@ -40,5 +40,7 @@ public class PurcdDto {
...
@@ -40,5 +40,7 @@ public class PurcdDto {
private
BigDecimal
cd018
;
private
BigDecimal
cd018
;
private
BigDecimal
cd019
;
private
BigDecimal
cd019
;
private
String
cd034
;
private
String
cd034
;
@ApiModelProperty
(
"批号"
)
private
String
udf07
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/PurthCreateDto.java
View file @
51d3068f
...
@@ -3,6 +3,7 @@ package com.topsunit.scanservice.ximai.dto;
...
@@ -3,6 +3,7 @@ package com.topsunit.scanservice.ximai.dto;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
/**
/**
...
@@ -53,4 +54,6 @@ public class PurthCreateDto {
...
@@ -53,4 +54,6 @@ public class PurthCreateDto {
@ApiModelProperty
(
""
)
@ApiModelProperty
(
""
)
private
Boolean
islot
=
false
;
private
Boolean
islot
=
false
;
@ApiModelProperty
(
"批号"
)
private
String
cd017
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockAllocateParams.java
View file @
51d3068f
...
@@ -25,6 +25,8 @@ public class StockAllocateParams {
...
@@ -25,6 +25,8 @@ public class StockAllocateParams {
String
warehouse
;
String
warehouse
;
@ApiModelProperty
(
"储位"
)
@ApiModelProperty
(
"储位"
)
String
location
;
String
location
;
@ApiModelProperty
(
"批号"
)
String
batchNo
;
@ApiModelProperty
(
"调拨数量"
)
@ApiModelProperty
(
"调拨数量"
)
BigDecimal
allocateQuantity
;
BigDecimal
allocateQuantity
;
@ApiModelProperty
(
"调入仓库"
)
@ApiModelProperty
(
"调入仓库"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
View file @
51d3068f
...
@@ -35,5 +35,7 @@ public class StockSaleOutParams {
...
@@ -35,5 +35,7 @@ public class StockSaleOutParams {
String
warehouse
;
String
warehouse
;
@ApiModelProperty
(
"储位"
)
@ApiModelProperty
(
"储位"
)
String
location
;
String
location
;
@ApiModelProperty
(
"批号"
)
String
batchNo
;
}
}
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockTakingParams.java
View file @
51d3068f
...
@@ -25,6 +25,8 @@ public class StockTakingParams {
...
@@ -25,6 +25,8 @@ public class StockTakingParams {
String
warehouse
;
String
warehouse
;
@ApiModelProperty
(
"储位"
)
@ApiModelProperty
(
"储位"
)
String
location
;
String
location
;
@ApiModelProperty
(
"批号"
)
String
batchNo
;
@ApiModelProperty
(
"库存数量"
)
@ApiModelProperty
(
"库存数量"
)
BigDecimal
stockQuantity
;
BigDecimal
stockQuantity
;
@ApiModelProperty
(
"盘点数量"
)
@ApiModelProperty
(
"盘点数量"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/dto/StockTransactionParams.java
View file @
51d3068f
...
@@ -19,6 +19,8 @@ public class StockTransactionParams {
...
@@ -19,6 +19,8 @@ public class StockTransactionParams {
String
warehouse
;
String
warehouse
;
@ApiModelProperty
(
"储位"
)
@ApiModelProperty
(
"储位"
)
String
location
;
String
location
;
@ApiModelProperty
(
"批号"
)
String
batchNo
;
@ApiModelProperty
(
"操作数量"
)
@ApiModelProperty
(
"操作数量"
)
BigDecimal
quantity
;
BigDecimal
quantity
;
@ApiModelProperty
(
"调入仓库"
)
@ApiModelProperty
(
"调入仓库"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/entity/Purcd.java
View file @
51d3068f
...
@@ -49,7 +49,7 @@ public class Purcd extends EntityBase {
...
@@ -49,7 +49,7 @@ public class Purcd extends EntityBase {
private
String
cd015
;
private
String
cd015
;
@ApiModelProperty
(
"到货仓"
)
@ApiModelProperty
(
"到货仓"
)
private
String
cd016
;
private
String
cd016
;
@
Column
@
ApiModelProperty
(
"批号"
)
private
String
cd017
;
private
String
cd017
;
@Column
@Column
private
BigDecimal
cd018
;
private
BigDecimal
cd018
;
...
...
src/main/java/com/topsunit/scanservice/ximai/entity/Purtg.java
View file @
51d3068f
This diff is collapsed.
Click to expand it.
src/main/java/com/topsunit/scanservice/ximai/entity/Purth.java
View file @
51d3068f
This diff is collapsed.
Click to expand it.
src/main/java/com/topsunit/scanservice/ximai/service/CopthService.java
View file @
51d3068f
...
@@ -93,6 +93,9 @@ public class CopthService {
...
@@ -93,6 +93,9 @@ public class CopthService {
copth
.
setTh014
(
copto
.
getTo004
());
copth
.
setTh014
(
copto
.
getTo004
());
copth
.
setTh015
(
copto
.
getTo005
());
copth
.
setTh015
(
copto
.
getTo005
());
copth
.
setTh016
(
copto
.
getTo006
());
copth
.
setTh016
(
copto
.
getTo006
());
if
(
StringUtils
.
isNotBlank
(
s
.
getBatchNo
())){
copth
.
setTh017
(
s
.
getBatchNo
());
}
copth
.
setTh045
(
copto
.
getTo001
());
copth
.
setTh045
(
copto
.
getTo001
());
copth
.
setTh046
(
copto
.
getTo002
());
copth
.
setTh046
(
copto
.
getTo002
());
copth
.
setTh047
(
copto
.
getTo003
());
copth
.
setTh047
(
copto
.
getTo003
());
...
...
src/main/java/com/topsunit/scanservice/ximai/service/InvmcService.java
View file @
51d3068f
...
@@ -11,6 +11,7 @@ import com.topsunit.scanservice.ximai.entity.Invmb;
...
@@ -11,6 +11,7 @@ import com.topsunit.scanservice.ximai.entity.Invmb;
import
com.topsunit.scanservice.ximai.entity.Invmc
;
import
com.topsunit.scanservice.ximai.entity.Invmc
;
import
com.topsunit.scanservice.ximai.entity.Invml
;
import
com.topsunit.scanservice.ximai.entity.Invml
;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -73,6 +74,7 @@ public class InvmcService {
...
@@ -73,6 +74,7 @@ public class InvmcService {
return
invmlMapper
.
toInvmlDto
(
list
);
return
invmlMapper
.
toInvmlDto
(
list
);
}
}
@ApiOperation
(
"查询库存"
)
public
List
<
InvmlDto
>
getInvmlList2
(
InvmlCriteria
criteria
)
{
public
List
<
InvmlDto
>
getInvmlList2
(
InvmlCriteria
criteria
)
{
invmbDao
.
findById
(
criteria
.
getMl001
()).
orElseThrow
(()->
new
TopsunitException
(
MessageUtils
.
getMessage
(
"未找到物料:"
)+
criteria
.
getMl001
()));
invmbDao
.
findById
(
criteria
.
getMl001
()).
orElseThrow
(()->
new
TopsunitException
(
MessageUtils
.
getMessage
(
"未找到物料:"
)+
criteria
.
getMl001
()));
...
...
src/main/java/com/topsunit/scanservice/ximai/service/InvtaService.java
View file @
51d3068f
...
@@ -139,6 +139,7 @@ public class InvtaService {
...
@@ -139,6 +139,7 @@ public class InvtaService {
invtb
.
setTb012
(
detail
.
getWarehouse
());
invtb
.
setTb012
(
detail
.
getWarehouse
());
invtb
.
setTb019
(
currDate
);
invtb
.
setTb019
(
currDate
);
invtb
.
setTb029
(
detail
.
getLocation
());
invtb
.
setTb029
(
detail
.
getLocation
());
invtb
.
setTb014
(
detail
.
getBatchNo
());
//判断调拨库位是否与当前一致
//判断调拨库位是否与当前一致
if
(
StringUtils
.
isNotEmpty
(
detail
.
getAllocateWarehouse
())
&&
if
(
StringUtils
.
isNotEmpty
(
detail
.
getAllocateWarehouse
())
&&
StringUtils
.
isNotEmpty
(
detail
.
getAllocateLocation
())){
StringUtils
.
isNotEmpty
(
detail
.
getAllocateLocation
())){
...
...
src/main/java/com/topsunit/scanservice/ximai/service/MoctaService.java
View file @
51d3068f
...
@@ -66,6 +66,11 @@ public class MoctaService {
...
@@ -66,6 +66,11 @@ public class MoctaService {
});
});
}
}
public
Optional
<
MoctaDto
>
get
(
MoctaIdCriteria
criteria
)
{
return
moctaDao
.
findById
(
moctaMapper
.
toMoctaId
(
criteria
))
.
map
(
moctaMapper:
:
toMoctaDto
);
}
public
MoctaDocDto
getForDoc2
(
MoctaIdCriteria
criteria
)
{
public
MoctaDocDto
getForDoc2
(
MoctaIdCriteria
criteria
)
{
MoctaDocDto
dto
=
moctaDao
.
findById
(
moctaMapper
.
toMoctaId
(
criteria
))
MoctaDocDto
dto
=
moctaDao
.
findById
(
moctaMapper
.
toMoctaId
(
criteria
))
.
map
(
moctaMapper:
:
toMoctaDocDto
).
orElse
(
new
MoctaDocDto
());
.
map
(
moctaMapper:
:
toMoctaDocDto
).
orElse
(
new
MoctaDocDto
());
...
...
src/main/java/com/topsunit/scanservice/ximai/service/MoctcService.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.common.StringUtil
;
import
com.topsunit.scanservice.ximai.common.StringUtil
;
import
com.topsunit.scanservice.ximai.common.TopsunitException
;
import
com.topsunit.scanservice.ximai.common.TopsunitException
;
...
@@ -253,7 +254,7 @@ public class MoctcService {
...
@@ -253,7 +254,7 @@ public class MoctcService {
// throw new TopsunitException(MessageUtils.getMessage("批管理品号{0}必须录入批号。", mocteCreateParams.getTb003()));
// throw new TopsunitException(MessageUtils.getMessage("批管理品号{0}必须录入批号。", mocteCreateParams.getTb003()));
// }
// }
// });
// });
invmlDao
.
findFirstByMl001AndMl002AndMl003AndMl004
(
mocteCreateParams
.
getTb003
(),
mocteCreateParams
.
getTe008
(),
mocteCreateParams
.
getTe025
(),
"********************"
)
invmlDao
.
findFirstByMl001AndMl002AndMl003AndMl004
(
mocteCreateParams
.
getTb003
(),
mocteCreateParams
.
getTe008
(),
mocteCreateParams
.
getTe025
(),
Constants
.
BATCH_DEF
)
.
filter
(
i
->
i
.
getMl005
().
compareTo
(
mocteCreateParams
.
getQuantity
())
>=
0
)
.
filter
(
i
->
i
.
getMl005
().
compareTo
(
mocteCreateParams
.
getQuantity
())
>=
0
)
.
orElseThrow
(()
->
new
TopsunitException
(
MessageUtils
.
getMessage
(
"品号{0}库存不足。"
,
mocteCreateParams
.
getTb003
().
trim
())));
.
orElseThrow
(()
->
new
TopsunitException
(
MessageUtils
.
getMessage
(
"品号{0}库存不足。"
,
mocteCreateParams
.
getTb003
().
trim
())));
...
...
src/main/java/com/topsunit/scanservice/ximai/service/MoctfService.java
View file @
51d3068f
...
@@ -7,6 +7,7 @@ import com.topsunit.scanservice.ximai.dao.*;
...
@@ -7,6 +7,7 @@ import com.topsunit.scanservice.ximai.dao.*;
import
com.topsunit.scanservice.ximai.dto.*
;
import
com.topsunit.scanservice.ximai.dto.*
;
import
com.topsunit.scanservice.ximai.entity.*
;
import
com.topsunit.scanservice.ximai.entity.*
;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
...
@@ -90,11 +91,13 @@ public class MoctfService {
...
@@ -90,11 +91,13 @@ public class MoctfService {
moctg
.
setTg007
(
invmb
.
getMb004
());
moctg
.
setTg007
(
invmb
.
getMb004
());
moctg
.
setTg013
(
create
.
getTg011
());
moctg
.
setTg013
(
create
.
getTg011
());
moctg
.
setTg037
(
invmb
.
getMb004
());
moctg
.
setTg037
(
invmb
.
getMb004
());
moctg
.
setTg010
(
invmb
.
getMb017
());
moctg
.
setTg010
(
create
.
getTg010
());
moctg
.
setTg017
(
create
.
getBatchNo
());
if
(
StringUtils
.
isBlank
(
create
.
getBatchNo
())){
throw
new
TopsunitException
(
MessageUtils
.
getMessage
(
"批管理品号{0}必须录入批号。"
,
moctg
.
getTg005
()));
}
ta083
.
set
(
mocta
.
getTa083
());
ta083
.
set
(
mocta
.
getTa083
());
//查询物料默认仓库
moctg
.
setTg036
(
create
.
getTg036
());
Invmc
invmc
=
invmcDao
.
findById
(
new
InvmcId
(
invmb
.
getMb001
(),
invmb
.
getMb017
())).
orElseThrow
(()->
new
TopsunitException
(
MessageUtils
.
getMessage
(
"未找到对应物料默认库:{0},{1}"
,
invmb
.
getMb001
(),
invmb
.
getMb017
())));
moctg
.
setTg036
(
invmc
.
getMc015
());
moctg
.
setTg030
(
currStr
);
moctg
.
setTg030
(
currStr
);
moctg
.
setTg038
(
moctg
.
getTg011
());
moctg
.
setTg038
(
moctg
.
getTg011
());
moctgDao
.
save
(
moctg
);
moctgDao
.
save
(
moctg
);
...
...
src/main/java/com/topsunit/scanservice/ximai/service/PurccService.java
View file @
51d3068f
...
@@ -12,12 +12,14 @@ import com.topsunit.scanservice.ximai.security.CurrentActor;
...
@@ -12,12 +12,14 @@ import com.topsunit.scanservice.ximai.security.CurrentActor;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
com.topsunit.scanservice.ximai.utils.MessageUtils
;
import
com.topsunit.scanservice.ximai.webapi.PrintApi
;
import
com.topsunit.scanservice.ximai.webapi.PrintApi
;
import
com.topsunit.scanservice.ximai.webapi.dto.PrintField
;
import
com.topsunit.scanservice.ximai.webapi.dto.PrintField
;
import
io.swagger.annotations.ApiOperation
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -183,6 +185,7 @@ public class PurccService {
...
@@ -183,6 +185,7 @@ public class PurccService {
objectMap
.
add
(
PrintField
.
of
(
"CD006"
,
j
.
getCd006
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"CD006"
,
j
.
getCd006
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"UDF01"
,
j
.
getUdf01
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"UDF01"
,
j
.
getUdf01
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"UDF02"
,
j
.
getUdf02
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"UDF02"
,
j
.
getUdf02
().
trim
()));
objectMap
.
add
(
PrintField
.
of
(
"CD017"
,
j
.
getCd017
().
trim
()));
//批号
objectMap
.
add
(
PrintField
.
of
(
"CC010"
,
optionalPurcc
objectMap
.
add
(
PrintField
.
of
(
"CC010"
,
optionalPurcc
.
map
(
Purcc:
:
getCc010
)
.
map
(
Purcc:
:
getCc010
)
.
map
(
DateUtil:
:
stringToLocalDate
)
.
map
(
DateUtil:
:
stringToLocalDate
)
...
@@ -224,6 +227,7 @@ public class PurccService {
...
@@ -224,6 +227,7 @@ public class PurccService {
return
byMc001
.
stream
().
findFirst
();
return
byMc001
.
stream
().
findFirst
();
}
}
@ApiOperation
(
""
)
@Transactional
@Transactional
public
void
create
(
StockArrivalParams
stockArrivalParams
){
public
void
create
(
StockArrivalParams
stockArrivalParams
){
if
(
CollectionUtil
.
isEmpty
(
stockArrivalParams
.
getDetails
())){
if
(
CollectionUtil
.
isEmpty
(
stockArrivalParams
.
getDetails
())){
...
@@ -271,6 +275,12 @@ public class PurccService {
...
@@ -271,6 +275,12 @@ public class PurccService {
purcd
.
setCd013
(
detail
.
getArrivalQuantity
());
purcd
.
setCd013
(
detail
.
getArrivalQuantity
());
purcd
.
setCd015
(
purtd
.
getTd009
());
purcd
.
setCd015
(
purtd
.
getTd009
());
purcd
.
setCd016
(
purtd
.
getTd007
());
purcd
.
setCd016
(
purtd
.
getTd007
());
//按批管理
if
(
"Y"
.
equalsIgnoreCase
(
invmb
.
getMb022
())){
purcd
.
setCd017
(
buildBatch
(
detail
));
//生成到货批次号
}
else
{
purcd
.
setCd017
(
Constants
.
BATCH_DEF
);
//生成到货批次号
}
purcd
.
setCd021
(
invmb
.
getMb004
());
purcd
.
setCd021
(
invmb
.
getMb004
());
purcdDao
.
save
(
purcd
);
purcdDao
.
save
(
purcd
);
sumQuantity
=
sumQuantity
.
add
(
detail
.
getArrivalQuantity
());
sumQuantity
=
sumQuantity
.
add
(
detail
.
getArrivalQuantity
());
...
@@ -299,4 +309,11 @@ public class PurccService {
...
@@ -299,4 +309,11 @@ public class PurccService {
})
})
.
orElse
(
prefix
+
"001"
);
.
orElse
(
prefix
+
"001"
);
}
}
//生成批次号:产品+客户+日期yyyyMMdd
private
String
buildBatch
(
StockArrivalParams
.
StockArrivalDetail
detail
){
String
rst
=
detail
.
getMaterialNo
()+
detail
.
getSupplierNo
();
rst
+=
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
LocalDateTime
.
now
(),
"yyyyMMdd"
);
return
rst
;
}
}
}
src/main/java/com/topsunit/scanservice/ximai/service/PurtgService.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.common.*
;
import
com.topsunit.scanservice.ximai.common.OrdinalHelper
;
import
com.topsunit.scanservice.ximai.common.StringUtil
;
import
com.topsunit.scanservice.ximai.common.TopsunitException
;
import
com.topsunit.scanservice.ximai.dao.*
;
import
com.topsunit.scanservice.ximai.dao.*
;
import
com.topsunit.scanservice.ximai.dto.PurtgCreateCriteria
;
import
com.topsunit.scanservice.ximai.dto.PurtgCreateCriteria
;
import
com.topsunit.scanservice.ximai.dto.PurtgCreateDto
;
import
com.topsunit.scanservice.ximai.dto.PurtgCreateDto
;
...
@@ -217,7 +214,11 @@ public class PurtgService {
...
@@ -217,7 +214,11 @@ public class PurtgService {
purth
.
setTh007
(
localPurcd
.
getCd018
());
// 进货数量
purth
.
setTh007
(
localPurcd
.
getCd018
());
// 进货数量
purth
.
setTh008
(
localPurcd
.
getCd007
());
// 单位
purth
.
setTh008
(
localPurcd
.
getCd007
());
// 单位
purth
.
setTh009
(
purthCreateParams
.
getTh009
());
// 仓库
purth
.
setTh009
(
purthCreateParams
.
getTh009
());
// 仓库
purth
.
setTh010
(
"********************"
);
// 批号
if
(
StringUtil
.
isNullOrEmpty
(
localPurcd
.
getCd017
())){
purth
.
setTh010
(
Constants
.
BATCH_DEF
);
// 批号
}
else
{
purth
.
setTh010
(
localPurcd
.
getCd017
());
}
purth
.
setTh011
(
localPurcd
.
getCd010
());
// 采购单别
purth
.
setTh011
(
localPurcd
.
getCd010
());
// 采购单别
purth
.
setTh012
(
localPurcd
.
getCd011
());
// 采购单号
purth
.
setTh012
(
localPurcd
.
getCd011
());
// 采购单号
purth
.
setTh013
(
localPurcd
.
getCd012
());
// 采购序号
purth
.
setTh013
(
localPurcd
.
getCd012
());
// 采购序号
...
...
src/main/java/com/topsunit/scanservice/ximai/service/SfctbService.java
View file @
51d3068f
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
com.topsunit.scanservice.ximai.common.Constants
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.common.TopsunitException
;
import
com.topsunit.scanservice.ximai.common.TopsunitException
;
import
com.topsunit.scanservice.ximai.dao.*
;
import
com.topsunit.scanservice.ximai.dao.*
;
...
@@ -145,7 +146,7 @@ public class SfctbService {
...
@@ -145,7 +146,7 @@ public class SfctbService {
// tc029
// tc029
// tc030
// tc030
// tc031
// tc031
sfctc
.
setTc032
(
"********************"
);
// 批号
sfctc
.
setTc032
(
Constants
.
BATCH_DEF
);
// 批号
// tc033
// tc033
// tc034
// tc034
sfctc
.
setTc035
(
"N"
);
// 急料
sfctc
.
setTc035
(
"N"
);
// 急料
...
...
李驰骋
@chicheng.li
mentioned in commit
78fdbc62
·
Oct 13, 2025
mentioned in commit
78fdbc62
mentioned in commit 78fdbc62b269cc4a3339897018aa9abffcd05632
Toggle commit list
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