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
6cc12926
Commit
6cc12926
authored
Jan 08, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
到货样验添加
parent
50cd8741
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
50 deletions
+49
-50
StockController.java
...opsunit/scanservice/ximai/controller/StockController.java
+7
-1
PurtdDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/PurtdDao.java
+4
-0
StockArrivalValidateParams.java
...nit/scanservice/ximai/dto/StockArrivalValidateParams.java
+22
-0
StockSaleOutParams.java
...om/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
+0
-1
Purtd.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purtd.java
+6
-48
PurccService.java
.../com/topsunit/scanservice/ximai/service/PurccService.java
+10
-0
No files found.
src/main/java/com/topsunit/scanservice/ximai/controller/StockController.java
View file @
6cc12926
...
...
@@ -63,9 +63,15 @@ public class StockController {
copthService
.
create
(
params
);
}
@ApiModelProperty
(
"到货确认"
)
@PostMapping
(
"/stockArrival/confirm"
)
@PostMapping
(
"/stockArrival/confirm"
)
public
void
stockArrivalConfirm
(
@RequestBody
StockArrivalParams
params
)
{
purccService
.
create
(
params
);
}
@ApiModelProperty
(
"到货校验"
)
@PostMapping
(
"/stockArrival/validate"
)
public
void
stockArrivalValidate
(
@RequestBody
StockArrivalValidateParams
params
)
{
purccService
.
validate
(
params
);
}
}
src/main/java/com/topsunit/scanservice/ximai/dao/PurtdDao.java
View file @
6cc12926
...
...
@@ -5,6 +5,8 @@ import com.topsunit.scanservice.ximai.entity.PurtdId;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.Optional
;
/**
* <p>Title: PurtdDao</p>
* <p>Description: PurtdDao</p>
...
...
@@ -14,4 +16,6 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* @date 2021/10/22
*/
public
interface
PurtdDao
extends
JpaRepository
<
Purtd
,
PurtdId
>,
JpaSpecificationExecutor
<
Purtd
>
{
public
Optional
<
Purtd
>
findFirstByTd001AndTd002AndTd003
(
String
td001
,
String
td002
,
String
td003
);
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockArrivalValidateParams.java
0 → 100644
View file @
6cc12926
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* 销售出库参数
*/
@Data
public
class
StockArrivalValidateParams
{
@ApiModelProperty
(
"采购单单别"
)
String
purchaseType
;
@ApiModelProperty
(
"采购单单号"
)
String
purchaseNo
;
@ApiModelProperty
(
"采购单序号"
)
String
purchaseSerial
;
@ApiModelProperty
(
"品号"
)
String
materialNo
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
View file @
6cc12926
...
...
@@ -15,7 +15,6 @@ public class StockSaleOutParams {
@ApiModelProperty
(
"交货单号"
)
String
applyNo
;
@ApiModelProperty
(
"确认明细"
)
List
<
StockSaleOutParams
.
StockSaleOutDetail
>
data
;
@Data
...
...
src/main/java/com/topsunit/scanservice/ximai/entity/Purtd.java
View file @
6cc12926
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
...
...
@@ -14,6 +17,7 @@ import java.math.BigDecimal;
* @version V1.0
* @date 2021/10/22
*/
@Data
@Entity
@IdClass
(
PurtdId
.
class
)
public
class
Purtd
extends
EntityBase
{
...
...
@@ -23,58 +27,12 @@ public class Purtd extends EntityBase {
private
String
td002
;
@Id
private
String
td003
;
@ApiModelProperty
(
"品号"
)
private
String
td004
;
@Column
private
BigDecimal
td010
;
@Column
private
BigDecimal
td015
;
@Column
private
BigDecimal
tdc04
;
public
String
getTd001
()
{
return
td001
;
}
public
void
setTd001
(
String
td001
)
{
this
.
td001
=
td001
;
}
public
String
getTd002
()
{
return
td002
;
}
public
void
setTd002
(
String
td002
)
{
this
.
td002
=
td002
;
}
public
String
getTd003
()
{
return
td003
;
}
public
void
setTd003
(
String
td003
)
{
this
.
td003
=
td003
;
}
public
BigDecimal
getTd010
()
{
return
td010
;
}
public
void
setTd010
(
BigDecimal
td010
)
{
this
.
td010
=
td010
;
}
public
BigDecimal
getTd015
()
{
return
td015
;
}
public
void
setTd015
(
BigDecimal
td015
)
{
this
.
td015
=
td015
;
}
public
BigDecimal
getTdc04
()
{
return
tdc04
;
}
public
void
setTdc04
(
BigDecimal
tdc04
)
{
this
.
tdc04
=
tdc04
;
}
}
src/main/java/com/topsunit/scanservice/ximai/service/PurccService.java
View file @
6cc12926
...
...
@@ -250,6 +250,16 @@ public class PurccService {
}
}
public
void
validate
(
StockArrivalValidateParams
params
){
Optional
<
Purtd
>
purtdOp
=
purtdDao
.
findFirstByTd001AndTd002AndTd003
(
params
.
getPurchaseType
(),
params
.
getPurchaseNo
(),
params
.
getPurchaseSerial
());
if
(!
purtdOp
.
isPresent
()){
throw
new
TopsunitException
(
String
.
format
(
"未找到采购订单%s,%s,%s"
,
params
.
getPurchaseType
(),
params
.
getPurchaseNo
(),
params
.
getPurchaseSerial
()));
}
if
(!
purtdOp
.
get
().
getTd004
().
trim
().
equals
(
params
.
getMaterialNo
().
trim
())){
throw
new
TopsunitException
(
String
.
format
(
"未找到采购订单%s,%s,%s"
,
params
.
getPurchaseType
(),
params
.
getPurchaseNo
(),
params
.
getPurchaseSerial
()));
}
}
private
String
getNewCc002
(
String
tg001
)
{
String
prefix
=
DateUtil
.
currentDateString
();
return
purccDao
.
findFirstByCc001AndCc002StartingWithOrderByCc002Desc
(
tg001
,
prefix
)
...
...
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