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
9304ab98
Commit
9304ab98
authored
Jan 08, 2025
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
扫码新接口添加
parent
3ac58936
Hide whitespace changes
Inline
Side-by-side
Showing
34 changed files
with
1340 additions
and
294 deletions
+1340
-294
encodings.xml
.idea/encodings.xml
+2
-1
StockController.java
...opsunit/scanservice/ximai/controller/StockController.java
+24
-10
CoptgDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/CoptgDao.java
+22
-0
CopthDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/CopthDao.java
+22
-0
CoptnDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/CoptnDao.java
+24
-0
CoptoDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/CoptoDao.java
+27
-0
InvmlDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/InvmlDao.java
+7
-0
PurccDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/PurccDao.java
+8
-4
CoptgCreateParams.java
...com/topsunit/scanservice/ximai/dto/CoptgCreateParams.java
+144
-0
CopthCreateParams.java
...com/topsunit/scanservice/ximai/dto/CopthCreateParams.java
+129
-0
InvtaCreateParams.java
...com/topsunit/scanservice/ximai/dto/InvtaCreateParams.java
+3
-1
PurccCreateParams.java
...com/topsunit/scanservice/ximai/dto/PurccCreateParams.java
+49
-0
PurcdCreateParams.java
...com/topsunit/scanservice/ximai/dto/PurcdCreateParams.java
+68
-0
StockArrivalParams.java
...om/topsunit/scanservice/ximai/dto/StockArrivalParams.java
+32
-0
StockArrivalQuery.java
...com/topsunit/scanservice/ximai/dto/StockArrivalQuery.java
+28
-0
StockSaleOutDto.java
...a/com/topsunit/scanservice/ximai/dto/StockSaleOutDto.java
+4
-3
StockSaleOutParams.java
...om/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
+6
-4
Coptg.java
...ain/java/com/topsunit/scanservice/ximai/entity/Coptg.java
+147
-0
CoptgId.java
...n/java/com/topsunit/scanservice/ximai/entity/CoptgId.java
+15
-0
Copth.java
...ain/java/com/topsunit/scanservice/ximai/entity/Copth.java
+133
-0
CopthId.java
...n/java/com/topsunit/scanservice/ximai/entity/CopthId.java
+17
-0
Coptn.java
...ain/java/com/topsunit/scanservice/ximai/entity/Coptn.java
+80
-0
CoptnId.java
...n/java/com/topsunit/scanservice/ximai/entity/CoptnId.java
+23
-0
Copto.java
...ain/java/com/topsunit/scanservice/ximai/entity/Copto.java
+103
-0
CoptoId.java
...n/java/com/topsunit/scanservice/ximai/entity/CoptoId.java
+18
-0
Invtb.java
...ain/java/com/topsunit/scanservice/ximai/entity/Invtb.java
+2
-0
Purcc.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purcc.java
+15
-88
Purcd.java
...ain/java/com/topsunit/scanservice/ximai/entity/Purcd.java
+3
-176
CopthService.java
.../com/topsunit/scanservice/ximai/service/CopthService.java
+88
-0
CoptoService.java
.../com/topsunit/scanservice/ximai/service/CoptoService.java
+38
-0
InvmcService.java
.../com/topsunit/scanservice/ximai/service/InvmcService.java
+11
-0
InvtaService.java
.../com/topsunit/scanservice/ximai/service/InvtaService.java
+2
-2
PurccService.java
.../com/topsunit/scanservice/ximai/service/PurccService.java
+45
-4
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
No files found.
.idea/encodings.xml
View file @
9304ab98
<?xml version="1.0" encoding="UTF-8"?>
<project
version=
"4"
>
<component
name=
"Encoding"
>
<component
name=
"Encoding"
defaultCharsetForPropertiesFiles=
"UTF-8"
>
<file
url=
"file://$PROJECT_DIR$/src/main/java"
charset=
"UTF-8"
/>
<file
url=
"file://$PROJECT_DIR$/src/main/resources"
charset=
"UTF-8"
/>
<file
url=
"PROJECT"
charset=
"UTF-8"
/>
</component>
</project>
\ No newline at end of file
src/main/java/com/topsunit/scanservice/ximai/controller/StockController.java
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
controller
;
import
com.topsunit.scanservice.ximai.dto.StockAllocateParams
;
import
com.topsunit.scanservice.ximai.dto.StockSaleOutQueryParams
;
import
com.topsunit.scanservice.ximai.dto.StockTakingParams
;
import
com.topsunit.scanservice.ximai.service.InvtaService
;
import
com.topsunit.scanservice.ximai.dto.*
;
import
com.topsunit.scanservice.ximai.service.*
;
import
io.swagger.annotations.ApiModelProperty
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>Title: StockTakingController</p>
* <p>Description: 库存相关操作</p>
...
...
@@ -23,6 +24,14 @@ public class StockController {
@Autowired
private
InvtaService
invtaService
;
@Autowired
private
InvmcService
invmcService
;
@Autowired
private
CopthService
copthService
;
@Autowired
private
CoptoService
coptoService
;
@Autowired
private
PurccService
purccService
;
@ApiModelProperty
(
"库存盘点确认"
)
@PostMapping
(
"/stockTaking/confirm"
)
...
...
@@ -38,20 +47,25 @@ public class StockController {
@ApiModelProperty
(
"销售出库通知单查询"
)
@PostMapping
(
"/stockSaleOut/list"
)
public
void
stockSaleOutList
(
@RequestBody
StockSaleOutQueryParams
params
)
{
//invtaService.createInvtaByStockAllocate
(params);
public
StockSaleOutDto
stockSaleOutList
(
@RequestBody
StockSaleOutQueryParams
params
)
{
return
coptoService
.
getStockSaleOutDto
(
params
);
}
@ApiModelProperty
(
"销售出库通知单库存查询"
)
@PostMapping
(
"/stockSaleOut/stockList"
)
public
void
stockSaleOutStockList
(
@RequestBody
StockSaleOutQueryParams
params
)
{
//invtaService.createInvtaByStockAllocate(params
);
public
List
<
InvmlDto
>
stockSaleOutStockList
(
@RequestBody
StockSaleOutQueryParams
params
)
{
return
invmcService
.
getInvmlWithCopto
(
"251"
,
params
.
getSaleOutNo
()
);
}
@ApiModelProperty
(
"销售出库确认"
)
@PostMapping
(
"/stockSaleOut/confirm"
)
public
void
stockSaleOutConfirm
(
@RequestBody
StockSaleOutQueryParams
params
)
{
//invtaService.createInvtaByStockAllocate(params);
public
void
stockSaleOutConfirm
(
@RequestBody
StockSaleOutParams
params
)
{
copthService
.
create
(
params
);
}
@ApiModelProperty
(
"到货确认"
)
@PostMapping
(
"/stockArrival/confirm"
)
public
void
stockArrivalConfirm
(
@RequestBody
StockArrivalParams
params
)
{
purccService
.
create
(
params
);
}
}
src/main/java/com/topsunit/scanservice/ximai/dao/CoptgDao.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dao
;
import
com.topsunit.scanservice.ximai.entity.*
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.List
;
import
java.util.Optional
;
/**
* <p>Title: CoptgDao</p>
* <p>Description: CoptgDao</p>
*
* @author chicheng.li
* @version V1.0
* @date 2025/1/6
*/
public
interface
CoptgDao
extends
JpaRepository
<
Coptg
,
CoptgId
>,
JpaSpecificationExecutor
<
Coptg
>
{
Optional
<
Coptg
>
findFirstByTg001AndTg002StartingWithOrderByTg002Desc
(
String
tg001
,
String
tg002
);
}
src/main/java/com/topsunit/scanservice/ximai/dao/CopthDao.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dao
;
import
com.topsunit.scanservice.ximai.entity.Copth
;
import
com.topsunit.scanservice.ximai.entity.CopthId
;
import
com.topsunit.scanservice.ximai.entity.Coptn
;
import
com.topsunit.scanservice.ximai.entity.CoptnId
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
/**
* <p>Title: CopthDao</p>
* <p>Description: CopthDao</p>
*
* @author chicheng.li
* @version V1.0
* @date 2025/1/6
*/
public
interface
CopthDao
extends
JpaRepository
<
Copth
,
CopthId
>,
JpaSpecificationExecutor
<
Copth
>
{
}
src/main/java/com/topsunit/scanservice/ximai/dao/CoptnDao.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dao
;
import
com.topsunit.scanservice.ximai.entity.Coptn
;
import
com.topsunit.scanservice.ximai.entity.CoptnId
;
import
com.topsunit.scanservice.ximai.entity.Purtc
;
import
com.topsunit.scanservice.ximai.entity.PurtcId
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.Optional
;
/**
* <p>Title: CoptnDao</p>
* <p>Description: CoptnDao</p>
*
* @author chicheng.li
* @version V1.0
* @date 2025/1/6
*/
public
interface
CoptnDao
extends
JpaRepository
<
Coptn
,
CoptnId
>,
JpaSpecificationExecutor
<
Coptn
>
{
public
Optional
<
Coptn
>
findFirstByTn001AndTn002
(
String
tn001
,
String
tn002
);
}
src/main/java/com/topsunit/scanservice/ximai/dao/CoptoDao.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dao
;
import
com.topsunit.scanservice.ximai.entity.Coptn
;
import
com.topsunit.scanservice.ximai.entity.CoptnId
;
import
com.topsunit.scanservice.ximai.entity.Copto
;
import
com.topsunit.scanservice.ximai.entity.CoptoId
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.List
;
import
java.util.Optional
;
/**
* <p>Title: CoptoDao</p>
* <p>Description: CoptoDao</p>
*
* @author chicheng.li
* @version V1.0
* @date 2025/1/6
*/
public
interface
CoptoDao
extends
JpaRepository
<
Copto
,
CoptoId
>,
JpaSpecificationExecutor
<
Copto
>
{
List
<
Copto
>
findByTo001AndTo002
(
String
t0001
,
String
t0002
);
Optional
<
Copto
>
findFirstByTo001AndTo002AndTo007
(
String
t0001
,
String
t0002
,
String
t0007
);
}
src/main/java/com/topsunit/scanservice/ximai/dao/InvmlDao.java
View file @
9304ab98
...
...
@@ -4,6 +4,8 @@ import com.topsunit.scanservice.ximai.entity.Invml;
import
com.topsunit.scanservice.ximai.entity.InvmlId
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
org.springframework.data.jpa.repository.Query
;
import
org.springframework.data.repository.query.Param
;
import
java.util.List
;
import
java.util.Optional
;
...
...
@@ -16,4 +18,9 @@ import java.util.Optional;
public
interface
InvmlDao
extends
JpaRepository
<
Invml
,
InvmlId
>,
JpaSpecificationExecutor
<
Invml
>
{
List
<
Invml
>
findByMl001OrderByMl002AscMl003AscMl004Asc
(
String
ml001
);
List
<
Invml
>
findByMl001InOrderByMl002AscMl003AscMl004Asc
(
List
<
String
>
ml001List
);
/*
关联通知单查询库明细
*/
@Query
(
value
=
"select il.* from COPTO co left join INVML il on il.ML001 = co.TO007 where TO001 = :to001 and TO002 = :to002"
,
nativeQuery
=
true
)
List
<
Invml
>
findWithCopto
(
@Param
(
value
=
"to001"
)
String
to001
,
@Param
(
value
=
"to002"
)
String
to002
);
}
src/main/java/com/topsunit/scanservice/ximai/dao/PurccDao.java
View file @
9304ab98
...
...
@@ -5,14 +5,18 @@ import com.topsunit.scanservice.ximai.entity.PurccId;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
import
java.util.Optional
;
/**
* <p>Title: Purcc
d
ao</p>
* <p>Description: Purcc
d
ao</p>
* <p>Title: Purcc
D
ao</p>
* <p>Description: Purcc
D
ao</p>
*
* @author
xi.feng
* @author
chicheng.li
* @version V1.0
* @date 202
1/10/19
* @date 202
5/1/8
*/
public
interface
PurccDao
extends
JpaRepository
<
Purcc
,
PurccId
>,
JpaSpecificationExecutor
<
Purcc
>
{
public
Optional
<
Purcc
>
findFirstByCc001AndCc002StartingWithOrderByCc002Desc
(
String
cc001
,
String
cc002
);
}
src/main/java/com/topsunit/scanservice/ximai/dto/CoptgCreateParams.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
java.math.BigDecimal
;
@Data
public
class
CoptgCreateParams
{
@ApiModelProperty
(
"单别"
)
private
String
tg001
=
"230"
;
@ApiModelProperty
(
"单号"
)
private
String
tg002
;
@ApiModelProperty
(
"销货日期"
)
private
String
tg003
;
@ApiModelProperty
(
"客户编号"
)
private
String
tg004
;
@ApiModelProperty
(
"部门"
)
private
String
tg005
=
""
;
@ApiModelProperty
(
"业务员"
)
private
String
tg006
=
""
;
@ApiModelProperty
(
"客户全称"
)
private
String
tg007
=
""
;
@ApiModelProperty
(
"送货地址一"
)
private
String
tg008
;
@ApiModelProperty
(
"送货地址二"
)
private
String
tg009
;
@ApiModelProperty
(
"出货工厂"
)
private
String
tg010
=
"01"
;
@ApiModelProperty
(
"币种"
)
private
String
tg011
;
@ApiModelProperty
(
"汇率"
)
private
BigDecimal
tg012
;
@ApiModelProperty
(
"原币销货金额"
)
private
BigDecimal
tg013
;
@ApiModelProperty
(
"发票号码"
)
private
String
tg014
;
@ApiModelProperty
(
"税号"
)
private
String
tg015
;
@ApiModelProperty
(
"发票种类"
)
private
String
tg016
;
@ApiModelProperty
(
"税种"
)
private
String
tg017
;
@ApiModelProperty
(
"发票地址一"
)
private
String
tg018
;
@ApiModelProperty
(
"发票地址二"
)
private
String
tg019
;
@ApiModelProperty
(
"备注"
)
private
String
tg020
;
@ApiModelProperty
(
"发票日期"
)
private
String
tg021
;
@ApiModelProperty
(
"打印次数"
)
private
Integer
tg022
=
0
;
@ApiModelProperty
(
"审核码"
)
private
String
tg023
=
"N"
;
@ApiModelProperty
(
"更新码"
)
private
String
tg024
=
"N"
;
@ApiModelProperty
(
"原币销货税额"
)
private
BigDecimal
tg025
;
@ApiModelProperty
(
"收款业务员"
)
private
String
tg026
=
""
;
@ApiModelProperty
(
"备注一"
)
private
String
tg027
=
""
;
@ApiModelProperty
(
"备注二"
)
private
String
tg028
=
""
;
@ApiModelProperty
(
"备注三"
)
private
String
tg029
=
""
;
@ApiModelProperty
(
"发票作废"
)
private
String
tg030
;
@ApiModelProperty
(
"烟酒注记"
)
private
String
tg031
=
"N"
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
tg032
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"总数量"
)
private
BigDecimal
tg033
;
@ApiModelProperty
(
"现销"
)
private
String
tg034
=
""
;
@ApiModelProperty
(
"员工编号"
)
private
String
tg035
=
""
;
@ApiModelProperty
(
"生成分录(收入)"
)
private
String
tg036
=
"N"
;
@ApiModelProperty
(
"生成分录(成本)"
)
private
String
tg037
=
"N"
;
@ApiModelProperty
(
"申报年月"
)
private
String
tg038
=
""
;
@ApiModelProperty
(
"l/c_no"
)
private
String
tg039
=
""
;
@ApiModelProperty
(
"invoice_no"
)
private
String
tg040
=
""
;
@ApiModelProperty
(
"发票打印次数"
)
private
Integer
tg041
=
0
;
@ApiModelProperty
(
"单据日期"
)
private
String
tg042
;
@ApiModelProperty
(
"审核者"
)
private
String
tg043
;
@ApiModelProperty
(
"税率"
)
private
BigDecimal
tg044
;
@ApiModelProperty
(
"本币销货金额"
)
private
BigDecimal
tg045
;
@ApiModelProperty
(
"本币销货税额"
)
private
BigDecimal
tg046
;
@ApiModelProperty
(
"付款条件编号"
)
private
String
tg047
;
@ApiModelProperty
(
"订单单别"
)
private
String
tg048
;
@ApiModelProperty
(
"订单单号"
)
private
String
tg049
;
@ApiModelProperty
(
"预收待抵单别"
)
private
String
tg050
;
@ApiModelProperty
(
"预收待抵单号"
)
private
String
tg051
;
@ApiModelProperty
(
"冲抵金额"
)
private
BigDecimal
tg052
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"冲抵税额"
)
private
BigDecimal
tg053
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"总包装数量"
)
private
BigDecimal
tg054
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"签核状态码"
)
private
String
tg055
=
"N"
;
@ApiModelProperty
(
"更换发票码"
)
private
String
tg056
=
""
;
@ApiModelProperty
(
"新销货单别"
)
private
String
tg057
=
""
;
@ApiModelProperty
(
"新销货单号"
)
private
String
tg058
=
""
;
@ApiModelProperty
(
"抛转状态"
)
private
String
tg059
=
"N"
;
@ApiModelProperty
(
"流程编号"
)
private
String
tg060
;
@ApiModelProperty
(
"随货附发票"
)
private
String
tg061
;
@ApiModelProperty
(
"开票人"
)
private
String
tg064
;
@ApiModelProperty
(
"发票代码"
)
private
String
tg065
;
@ApiModelProperty
(
"海关手册"
)
private
String
tg066
;
@ApiModelProperty
(
"传送次数"
)
private
Integer
tg067
=
0
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/CopthCreateParams.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
java.math.BigDecimal
;
/**
* 销货单单身档
*/
@Data
public
class
CopthCreateParams
{
@Id
@ApiModelProperty
(
"单别"
)
private
String
th001
;
@Id
@ApiModelProperty
(
"单号"
)
private
String
th002
;
@Id
@ApiModelProperty
(
"序号"
)
private
String
th003
;
@ApiModelProperty
(
"品号"
)
private
String
th004
;
@ApiModelProperty
(
"品名"
)
private
String
th005
;
@ApiModelProperty
(
"规格"
)
private
String
th006
;
@ApiModelProperty
(
"仓库"
)
private
String
th007
;
@ApiModelProperty
(
"数量"
)
private
BigDecimal
th008
;
@ApiModelProperty
(
"单位"
)
private
String
th009
;
@ApiModelProperty
(
"库存数量"
)
private
BigDecimal
th010
=
BigDecimal
.
ZERO
;
@ApiModelProperty
(
"小单位"
)
private
String
th011
;
@ApiModelProperty
(
"单价"
)
private
BigDecimal
th012
;
@ApiModelProperty
(
"金额"
)
private
BigDecimal
th013
;
@ApiModelProperty
(
"订单单别"
)
private
String
th014
;
@ApiModelProperty
(
"订单单号"
)
private
String
th015
;
@ApiModelProperty
(
"订单序号"
)
private
String
th016
;
@ApiModelProperty
(
"批号"
)
private
String
th017
=
"********************"
;
@ApiModelProperty
(
"备注"
)
private
String
th018
;
@ApiModelProperty
(
"客户品号"
)
private
String
th019
;
@ApiModelProperty
(
"审核码"
)
private
String
th020
=
"N"
;
@ApiModelProperty
(
"更新码"
)
private
String
th021
=
"N"
;
@ApiModelProperty
(
"保留字段"
)
private
String
th022
;
@ApiModelProperty
(
"保留字段"
)
private
String
th023
;
@ApiModelProperty
(
"赠/备品量"
)
private
BigDecimal
th024
;
@ApiModelProperty
(
"折扣率"
)
private
BigDecimal
th025
;
@ApiModelProperty
(
"结账码"
)
private
String
th026
=
"N"
;
@ApiModelProperty
(
"结账单别"
)
private
String
th027
;
@ApiModelProperty
(
"结账单号"
)
private
String
th028
;
@ApiModelProperty
(
"结账序号"
)
private
String
th029
;
@ApiModelProperty
(
"项目编号"
)
private
String
th030
;
@ApiModelProperty
(
"类型"
)
private
String
th031
;
@ApiModelProperty
(
"借出单别"
)
private
String
th032
;
@ApiModelProperty
(
"借出单号"
)
private
String
th033
;
@ApiModelProperty
(
"借出序号"
)
private
String
th034
;
@ApiModelProperty
(
"原币税前金额"
)
private
BigDecimal
th035
;
@ApiModelProperty
(
"原币税额"
)
private
BigDecimal
th036
;
@ApiModelProperty
(
"本币税前金额"
)
private
BigDecimal
th037
;
@ApiModelProperty
(
"本币税额"
)
private
BigDecimal
th038
;
@ApiModelProperty
(
"包装数量"
)
private
BigDecimal
th039
;
@ApiModelProperty
(
"赠/备品包装量"
)
private
BigDecimal
th040
;
@ApiModelProperty
(
"包装单位"
)
private
String
th041
;
@ApiModelProperty
(
"已结账数量"
)
private
BigDecimal
th042
;
@ApiModelProperty
(
"件装"
)
private
BigDecimal
th043
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
th044
;
@ApiModelProperty
(
"出货通知单别"
)
private
String
th045
;
@ApiModelProperty
(
"出货通知单号"
)
private
String
th046
;
@ApiModelProperty
(
"出货通知序号"
)
private
String
th047
;
@ApiModelProperty
(
"预留字段"
)
private
BigDecimal
th048
;
@ApiModelProperty
(
"批发价"
)
private
BigDecimal
th049
;
@ApiModelProperty
(
"零售价"
)
private
BigDecimal
th050
;
@ApiModelProperty
(
"生产日期"
)
private
String
th051
;
@ApiModelProperty
(
"有效日期"
)
private
String
th052
;
@ApiModelProperty
(
"复检日期"
)
private
String
th053
;
@ApiModelProperty
(
"原始客户"
)
private
String
th054
;
@ApiModelProperty
(
"批号说明"
)
private
String
th055
;
@ApiModelProperty
(
"库位"
)
private
String
th056
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvtaCreateParams.java
View file @
9304ab98
...
...
@@ -63,7 +63,7 @@ public class InvtaCreateParams {
@ApiModelProperty
(
"不合格原因"
)
private
String
ta020
;
@ApiModelProperty
(
"传送次数"
)
private
Integer
ta021
;
private
Integer
ta021
=
0
;
@ApiModelProperty
(
"汇入日期"
)
private
String
ta022
;
@ApiModelProperty
(
"门店编号"
)
...
...
@@ -72,4 +72,6 @@ public class InvtaCreateParams {
private
String
ta024
;
@ApiModelProperty
(
"单据来源"
)
private
String
ta025
=
"1"
;
@ApiModelProperty
(
"批号"
)
private
String
ta033
=
"********************"
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/PurccCreateParams.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.entity.EntityBase
;
import
com.topsunit.scanservice.ximai.entity.PurccId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.util.ArrayList
;
import
java.util.List
;
/**
* <p>Title: Purcc</p>
* <p>Description: 到货单单头档</p>
*
* @author xi.feng
* @version V1.0
* @date 2021/10/19
*/
@Data
public
class
PurccCreateParams
{
@ApiModelProperty
(
"单别"
)
private
String
cc001
;
@ApiModelProperty
(
"单号"
)
private
String
cc002
;
@ApiModelProperty
(
"日期"
)
private
String
cc003
;
@ApiModelProperty
(
""
)
private
String
cc004
;
@ApiModelProperty
(
"供货商号"
)
private
String
cc005
;
@ApiModelProperty
(
""
)
private
String
cc006
;
@ApiModelProperty
(
""
)
private
String
cc009
;
@ApiModelProperty
(
""
)
private
String
cc010
;
@ApiModelProperty
(
"供货商名称"
)
private
String
cc012
;
@ApiModelProperty
(
""
)
private
String
cc026
;
@ApiModelProperty
(
"库房标识"
)
private
String
udf01
;
@ApiModelProperty
(
"到货明细"
)
List
<
PurcdCreateParams
>
detailList
=
new
ArrayList
<>();
}
src/main/java/com/topsunit/scanservice/ximai/dto/PurcdCreateParams.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.entity.EntityBase
;
import
com.topsunit.scanservice.ximai.entity.PurcdId
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.math.BigDecimal
;
/**
* <p>Title: Purcd</p>
* <p>Description: 到货单单身档</p>
*
* @author xi.feng
* @version V1.0
* @date 2021/10/19
*/
@Data
public
class
PurcdCreateParams
{
@ApiModelProperty
(
"单别"
)
private
String
cd001
;
@ApiModelProperty
(
"单号"
)
private
String
cd002
;
@ApiModelProperty
(
"序号"
)
private
String
cd003
;
@ApiModelProperty
(
"品号"
)
private
String
cd004
;
@ApiModelProperty
(
"品名"
)
private
String
cd005
;
@ApiModelProperty
(
"规格"
)
private
String
cd006
;
@ApiModelProperty
(
"库存单位"
)
private
String
cd007
;
@ApiModelProperty
(
"到货数量"
)
private
BigDecimal
cd008
;
@ApiModelProperty
(
"采购单别"
)
private
String
cd010
;
@ApiModelProperty
(
"采购单号"
)
private
String
cd011
;
@ApiModelProperty
(
"采购序号"
)
private
String
cd012
;
@ApiModelProperty
(
""
)
private
String
cd017
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd018
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd019
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd020
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd026
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd027
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd028
;
@ApiModelProperty
(
""
)
private
BigDecimal
cd029
;
@ApiModelProperty
(
""
)
private
String
cd034
=
"N"
;
@ApiModelProperty
(
""
)
private
String
udf01
;
@ApiModelProperty
(
""
)
private
String
udf02
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockArrivalParams.java
0 → 100644
View file @
9304ab98
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
StockArrivalParams
{
@ApiModelProperty
(
"确认明细"
)
List
<
StockArrivalParams
.
StockArrivalDetail
>
details
;
@Data
public
static
class
StockArrivalDetail
{
@ApiModelProperty
(
"供应商代码"
)
String
supplierNo
;
@ApiModelProperty
(
"采购单单别"
)
String
purchaseType
;
@ApiModelProperty
(
"采购单单号"
)
String
purchaseNo
;
@ApiModelProperty
(
"采购单序号"
)
String
purchaseSerial
;
@ApiModelProperty
(
"品号"
)
String
materialNo
;
@ApiModelProperty
(
"到货数量"
)
BigDecimal
arrivalQuantity
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockArrivalQuery.java
0 → 100644
View file @
9304ab98
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
StockArrivalQuery
{
@ApiModelProperty
(
"供应商代码"
)
String
supplierNo
;
@ApiModelProperty
(
"采购单单别"
)
String
purchaseType
;
@ApiModelProperty
(
"采购单单号"
)
String
purchaseNo
;
@ApiModelProperty
(
"采购单序号"
)
String
purchaseSerial
;
@ApiModelProperty
(
"品号"
)
String
materialNo
;
@ApiModelProperty
(
"到货数量"
)
BigDecimal
arrivalQuantity
;
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockSaleOutDto.java
View file @
9304ab98
...
...
@@ -14,9 +14,6 @@ public class StockSaleOutDto {
@ApiModelProperty
(
"交货单号"
)
String
applyNo
;
@ApiModelProperty
(
"交货数量"
)
BigDecimal
outQuantity
;
@ApiModelProperty
(
"通知单明细"
)
List
<
StockSaleOutDetail
>
data
;
@Data
...
...
@@ -27,5 +24,9 @@ public class StockSaleOutDto {
String
materialName
;
@ApiModelProperty
(
"计划出库日期"
)
String
planOutDate
;
@ApiModelProperty
(
"单位"
)
String
unit
;
@ApiModelProperty
(
"交货数量"
)
BigDecimal
deliverQuantity
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/StockSaleOutParams.java
View file @
9304ab98
...
...
@@ -15,21 +15,23 @@ public class StockSaleOutParams {
@ApiModelProperty
(
"交货单号"
)
String
applyNo
;
@ApiModelProperty
(
"交货数量"
)
BigDecimal
outQuantity
;
@ApiModelProperty
(
"确认明细"
)
List
<
StockSaleOut
Dto
.
StockSaleOutDetail
>
data
;
List
<
StockSaleOut
Params
.
StockSaleOutDetail
>
data
;
@Data
public
static
class
StockSaleOutDetail
{
@ApiModelProperty
(
"物料号"
)
String
materialNo
;
@ApiModelProperty
(
"物料名称"
)
String
materialName
;
@ApiModelProperty
(
"单位"
)
String
unit
;
@ApiModelProperty
(
"计划出库日期"
)
String
planOutDate
;
@ApiModelProperty
(
"交货数量"
)
BigDecimal
deliverQuantity
;
@ApiModelProperty
(
"出库数量"
)
String
outQuantity
;
BigDecimal
outQuantity
;
@ApiModelProperty
(
"仓库"
)
String
warehouse
;
@ApiModelProperty
(
"储位"
)
...
...
src/main/java/com/topsunit/scanservice/ximai/entity/Coptg.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.math.BigDecimal
;
@Data
@IdClass
(
CoptgId
.
class
)
@Entity
public
class
Coptg
extends
EntityBase
{
@Id
@ApiModelProperty
(
"单别"
)
private
String
tg001
;
@Id
@ApiModelProperty
(
"单号"
)
private
String
tg002
;
@ApiModelProperty
(
"销货日期"
)
private
String
tg003
;
@ApiModelProperty
(
"客户编号"
)
private
String
tg004
;
@ApiModelProperty
(
"部门"
)
private
String
tg005
;
@ApiModelProperty
(
"业务员"
)
private
String
tg006
;
@ApiModelProperty
(
"客户全称"
)
private
String
tg007
;
@ApiModelProperty
(
"送货地址一"
)
private
String
tg008
;
@ApiModelProperty
(
"送货地址二"
)
private
String
tg009
;
@ApiModelProperty
(
"出货工厂"
)
private
String
tg010
;
@ApiModelProperty
(
"币种"
)
private
String
tg011
;
@ApiModelProperty
(
"汇率"
)
private
BigDecimal
tg012
;
@ApiModelProperty
(
"原币销货金额"
)
private
BigDecimal
tg013
;
@ApiModelProperty
(
"发票号码"
)
private
String
tg014
;
@ApiModelProperty
(
"税号"
)
private
String
tg015
;
@ApiModelProperty
(
"发票种类"
)
private
String
tg016
;
@ApiModelProperty
(
"税种"
)
private
String
tg017
;
@ApiModelProperty
(
"发票地址一"
)
private
String
tg018
;
@ApiModelProperty
(
"发票地址二"
)
private
String
tg019
;
@ApiModelProperty
(
"备注"
)
private
String
tg020
;
@ApiModelProperty
(
"发票日期"
)
private
String
tg021
;
@ApiModelProperty
(
"打印次数"
)
private
Integer
tg022
;
@ApiModelProperty
(
"审核码"
)
private
String
tg023
;
@ApiModelProperty
(
"更新码"
)
private
String
tg024
;
@ApiModelProperty
(
"原币销货税额"
)
private
BigDecimal
tg025
;
@ApiModelProperty
(
"收款业务员"
)
private
String
tg026
;
@ApiModelProperty
(
"备注一"
)
private
String
tg027
;
@ApiModelProperty
(
"备注二"
)
private
String
tg028
;
@ApiModelProperty
(
"备注三"
)
private
String
tg029
;
@ApiModelProperty
(
"发票作废"
)
private
String
tg030
;
@ApiModelProperty
(
"烟酒注记"
)
private
String
tg031
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
tg032
;
@ApiModelProperty
(
"总数量"
)
private
BigDecimal
tg033
;
@ApiModelProperty
(
"现销"
)
private
String
tg034
;
@ApiModelProperty
(
"员工编号"
)
private
String
tg035
;
@ApiModelProperty
(
"生成分录(收入)"
)
private
String
tg036
;
@ApiModelProperty
(
"生成分录(成本)"
)
private
String
tg037
;
@ApiModelProperty
(
"申报年月"
)
private
String
tg038
;
@ApiModelProperty
(
"l/c_no"
)
private
String
tg039
;
@ApiModelProperty
(
"invoice_no"
)
private
String
tg040
;
@ApiModelProperty
(
"发票打印次数"
)
private
Integer
tg041
;
@ApiModelProperty
(
"单据日期"
)
private
String
tg042
;
@ApiModelProperty
(
"审核者"
)
private
String
tg043
;
@ApiModelProperty
(
"税率"
)
private
BigDecimal
tg044
;
@ApiModelProperty
(
"本币销货金额"
)
private
BigDecimal
tg045
;
@ApiModelProperty
(
"本币销货税额"
)
private
BigDecimal
tg046
;
@ApiModelProperty
(
"付款条件编号"
)
private
String
tg047
;
@ApiModelProperty
(
"订单单别"
)
private
String
tg048
;
@ApiModelProperty
(
"订单单号"
)
private
String
tg049
;
@ApiModelProperty
(
"预收待抵单别"
)
private
String
tg050
;
@ApiModelProperty
(
"预收待抵单号"
)
private
String
tg051
;
@ApiModelProperty
(
"冲抵金额"
)
private
BigDecimal
tg052
;
@ApiModelProperty
(
"冲抵税额"
)
private
BigDecimal
tg053
;
@ApiModelProperty
(
"总包装数量"
)
private
BigDecimal
tg054
;
@ApiModelProperty
(
"签核状态码"
)
private
String
tg055
;
@ApiModelProperty
(
"更换发票码"
)
private
String
tg056
;
@ApiModelProperty
(
"新销货单别"
)
private
String
tg057
;
@ApiModelProperty
(
"新销货单号"
)
private
String
tg058
;
@ApiModelProperty
(
"抛转状态"
)
private
String
tg059
;
@ApiModelProperty
(
"流程编号"
)
private
String
tg060
;
@ApiModelProperty
(
"随货附发票"
)
private
String
tg061
;
@ApiModelProperty
(
"开票人"
)
private
String
tg064
;
@ApiModelProperty
(
"发票代码"
)
private
String
tg065
;
@ApiModelProperty
(
"海关手册"
)
private
String
tg066
;
@ApiModelProperty
(
"传送次数"
)
private
Integer
tg067
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/CoptgId.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
java.io.Serializable
;
@Data
public
class
CoptgId
implements
Serializable
{
@ApiModelProperty
(
"单别"
)
private
String
tg001
;
@ApiModelProperty
(
"单号"
)
private
String
tg002
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/Copth.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.math.BigDecimal
;
/**
* 销货单单身档
*/
@Data
@IdClass
(
CopthId
.
class
)
@Entity
public
class
Copth
extends
EntityBase
{
@Id
@ApiModelProperty
(
"单别"
)
private
String
th001
;
@Id
@ApiModelProperty
(
"单号"
)
private
String
th002
;
@Id
@ApiModelProperty
(
"序号"
)
private
String
th003
;
@ApiModelProperty
(
"品号"
)
private
String
th004
;
@ApiModelProperty
(
"品名"
)
private
String
th005
;
@ApiModelProperty
(
"规格"
)
private
String
th006
;
@ApiModelProperty
(
"仓库"
)
private
String
th007
;
@ApiModelProperty
(
"数量"
)
private
BigDecimal
th008
;
@ApiModelProperty
(
"单位"
)
private
String
th009
;
@ApiModelProperty
(
"库存数量"
)
private
BigDecimal
th010
;
@ApiModelProperty
(
"小单位"
)
private
String
th011
;
@ApiModelProperty
(
"单价"
)
private
BigDecimal
th012
;
@ApiModelProperty
(
"金额"
)
private
BigDecimal
th013
;
@ApiModelProperty
(
"订单单别"
)
private
String
th014
;
@ApiModelProperty
(
"订单单号"
)
private
String
th015
;
@ApiModelProperty
(
"订单序号"
)
private
String
th016
;
@ApiModelProperty
(
"批号"
)
private
String
th017
;
@ApiModelProperty
(
"备注"
)
private
String
th018
;
@ApiModelProperty
(
"客户品号"
)
private
String
th019
;
@ApiModelProperty
(
"审核码"
)
private
String
th020
;
@ApiModelProperty
(
"更新码"
)
private
String
th021
;
@ApiModelProperty
(
"保留字段"
)
private
String
th022
;
@ApiModelProperty
(
"保留字段"
)
private
String
th023
;
@ApiModelProperty
(
"赠/备品量"
)
private
BigDecimal
th024
;
@ApiModelProperty
(
"折扣率"
)
private
BigDecimal
th025
;
@ApiModelProperty
(
"结账码"
)
private
String
th026
;
@ApiModelProperty
(
"结账单别"
)
private
String
th027
;
@ApiModelProperty
(
"结账单号"
)
private
String
th028
;
@ApiModelProperty
(
"结账序号"
)
private
String
th029
;
@ApiModelProperty
(
"项目编号"
)
private
String
th030
;
@ApiModelProperty
(
"类型"
)
private
String
th031
;
@ApiModelProperty
(
"借出单别"
)
private
String
th032
;
@ApiModelProperty
(
"借出单号"
)
private
String
th033
;
@ApiModelProperty
(
"借出序号"
)
private
String
th034
;
@ApiModelProperty
(
"原币税前金额"
)
private
BigDecimal
th035
;
@ApiModelProperty
(
"原币税额"
)
private
BigDecimal
th036
;
@ApiModelProperty
(
"本币税前金额"
)
private
BigDecimal
th037
;
@ApiModelProperty
(
"本币税额"
)
private
BigDecimal
th038
;
@ApiModelProperty
(
"包装数量"
)
private
BigDecimal
th039
;
@ApiModelProperty
(
"赠/备品包装量"
)
private
BigDecimal
th040
;
@ApiModelProperty
(
"包装单位"
)
private
String
th041
;
@ApiModelProperty
(
"已结账数量"
)
private
BigDecimal
th042
;
@ApiModelProperty
(
"件装"
)
private
BigDecimal
th043
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
th044
;
@ApiModelProperty
(
"出货通知单别"
)
private
String
th045
;
@ApiModelProperty
(
"出货通知单号"
)
private
String
th046
;
@ApiModelProperty
(
"出货通知序号"
)
private
String
th047
;
@ApiModelProperty
(
"预留字段"
)
private
BigDecimal
th048
;
@ApiModelProperty
(
"批发价"
)
private
BigDecimal
th049
;
@ApiModelProperty
(
"零售价"
)
private
BigDecimal
th050
;
@ApiModelProperty
(
"生产日期"
)
private
String
th051
;
@ApiModelProperty
(
"有效日期"
)
private
String
th052
;
@ApiModelProperty
(
"复检日期"
)
private
String
th053
;
@ApiModelProperty
(
"原始客户"
)
private
String
th054
;
@ApiModelProperty
(
"批号说明"
)
private
String
th055
;
@ApiModelProperty
(
"库位"
)
private
String
th056
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/CopthId.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Id
;
import
java.io.Serializable
;
@Data
public
class
CopthId
implements
Serializable
{
@ApiModelProperty
(
"单别"
)
private
String
th001
;
@ApiModelProperty
(
"单号"
)
private
String
th002
;
@ApiModelProperty
(
"序号"
)
private
String
th003
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/Coptn.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.math.BigDecimal
;
/**
* 出货通知单头档
*/
@Data
@IdClass
(
CoptnId
.
class
)
@Entity
public
class
Coptn
extends
EntityBase
{
@Id
@ApiModelProperty
(
"通知单别"
)
private
String
tn001
;
@Id
@ApiModelProperty
(
"通知单号"
)
private
String
tn002
;
@ApiModelProperty
(
"通知日期"
)
private
String
tn003
;
@ApiModelProperty
(
"客户编号"
)
private
String
tn004
;
@ApiModelProperty
(
"复核者"
)
private
String
tn005
;
@ApiModelProperty
(
"部门编号"
)
private
String
tn006
;
@ApiModelProperty
(
"业务人员"
)
private
String
tn007
;
@ApiModelProperty
(
"送货客户"
)
private
String
tn008
;
@ApiModelProperty
(
"送货地址(一)"
)
private
String
tn009
;
@ApiModelProperty
(
"送货地址(二)"
)
private
String
tn010
;
@ApiModelProperty
(
"1.应税内含、2.应税外加、3.零税率、4.免税、9.不计税"
)
private
String
tn011
;
@ApiModelProperty
(
"备注"
)
private
String
tn012
;
@ApiModelProperty
(
"币种"
)
private
String
tn013
;
@ApiModelProperty
(
"汇率 //20030324 modi by 29618 7.4->10.7"
)
private
BigDecimal
tn014
;
@ApiModelProperty
(
"销货金额"
)
private
BigDecimal
tn015
;
@ApiModelProperty
(
"本单已否审核的判断码(y/n)"
)
private
String
tn016
;
@ApiModelProperty
(
"工厂"
)
private
String
tn017
;
@ApiModelProperty
(
"复核日期"
)
private
String
tn018
;
@ApiModelProperty
(
"销货税额"
)
private
BigDecimal
tn019
;
@ApiModelProperty
(
"打印次数"
)
private
Integer
tn020
;
@ApiModelProperty
(
"单据日期[formate:ymd]"
)
private
String
tn021
;
@ApiModelProperty
(
"审核者"
)
private
String
tn022
;
@ApiModelProperty
(
"付款条件编号"
)
private
String
tn023
;
@ApiModelProperty
(
"0.待处理、1.签核中、2.退件、3.已核准、4.撤销审核中、5.作废中、6.取消作废中、n.不运行电子签核"
)
private
String
tn024
;
@ApiModelProperty
(
"海关手册"
)
private
String
tn025
;
@ApiModelProperty
(
"生成分录"
)
private
String
tn026
;
@ApiModelProperty
(
"质量状况"
)
private
String
tn027
;
@ApiModelProperty
(
"出货人"
)
private
String
tn028
;
@ApiModelProperty
(
"传送次数[def:0] //20030424 add by 28985 for p00-03040011"
)
private
Integer
tn029
;
@ApiModelProperty
(
"税率(%)"
)
private
BigDecimal
tn030
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/CoptnId.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
java.io.Serializable
;
@Data
public
class
CoptnId
implements
Serializable
{
public
CoptnId
(){}
public
CoptnId
(
String
tn001
,
String
tn002
){
this
.
tn001
=
tn001
;
this
.
tn002
=
tn002
;
}
@ApiModelProperty
(
"通知单别"
)
private
String
tn001
;
@ApiModelProperty
(
"通知单号"
)
private
String
tn002
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/Copto.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
com.topsunit.scanservice.ximai.entity.EntityBase
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
javax.persistence.IdClass
;
import
java.math.BigDecimal
;
/**
* 出货通知单身
*/
@Data
@IdClass
(
CoptoId
.
class
)
@Entity
public
class
Copto
extends
EntityBase
{
@Id
@ApiModelProperty
(
"通知单别"
)
private
String
to001
;
@Id
@ApiModelProperty
(
"通知单号"
)
private
String
to002
;
@Id
@ApiModelProperty
(
"通知序号"
)
private
String
to003
;
@ApiModelProperty
(
"订单单别"
)
private
String
to004
;
@ApiModelProperty
(
"订单单号"
)
private
String
to005
;
@ApiModelProperty
(
"订单序号"
)
private
String
to006
;
@ApiModelProperty
(
"品号"
)
private
String
to007
;
@ApiModelProperty
(
"品名"
)
private
String
to008
;
@ApiModelProperty
(
"规格"
)
private
String
to009
;
@ApiModelProperty
(
"单位"
)
private
String
to010
;
@ApiModelProperty
(
"仓库"
)
private
String
to011
;
@ApiModelProperty
(
"件装"
)
private
BigDecimal
to012
;
@ApiModelProperty
(
"件数"
)
private
BigDecimal
to013
;
@ApiModelProperty
(
"批号"
)
private
String
to014
;
@ApiModelProperty
(
"复检日期"
)
private
String
to015
;
@ApiModelProperty
(
"有效日期"
)
private
String
to016
;
@ApiModelProperty
(
"出货数量"
)
private
BigDecimal
to017
;
@ApiModelProperty
(
"类型"
)
private
String
to018
;
@ApiModelProperty
(
"赠备品量"
)
private
BigDecimal
to019
;
@ApiModelProperty
(
"单价"
)
private
BigDecimal
to020
;
@ApiModelProperty
(
"金额"
)
private
BigDecimal
to021
;
@ApiModelProperty
(
"备注"
)
private
String
to022
;
@ApiModelProperty
(
"审核码"
)
private
String
to023
;
@ApiModelProperty
(
"预计出货数量"
)
private
BigDecimal
to024
;
@ApiModelProperty
(
"预计赠备品量"
)
private
BigDecimal
to025
;
@ApiModelProperty
(
"客户品号"
)
private
String
to026
;
@ApiModelProperty
(
"折扣率"
)
private
BigDecimal
to027
;
@ApiModelProperty
(
"预计出货包装数量"
)
private
BigDecimal
to028
;
@ApiModelProperty
(
"预计赠备品包装量"
)
private
BigDecimal
to029
;
@ApiModelProperty
(
"出货包装数量"
)
private
BigDecimal
to030
;
@ApiModelProperty
(
"赠备品包装量"
)
private
BigDecimal
to031
;
@ApiModelProperty
(
"包装单位"
)
private
String
to032
;
@ApiModelProperty
(
"小单位"
)
private
String
to033
;
@ApiModelProperty
(
"税率"
)
private
BigDecimal
to034
;
@ApiModelProperty
(
"税前金额"
)
private
BigDecimal
to035
;
@ApiModelProperty
(
"税额"
)
private
BigDecimal
to036
;
@ApiModelProperty
(
"生产日期"
)
private
String
to037
;
@ApiModelProperty
(
"批号说明"
)
private
String
to038
;
@ApiModelProperty
(
"库位"
)
private
String
to039
;
@ApiModelProperty
(
"计划出库日期"
)
private
String
udf01
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/CoptoId.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
import
java.io.Serializable
;
@Data
public
class
CoptoId
implements
Serializable
{
@ApiModelProperty
(
"通知单别"
)
private
String
to001
;
@ApiModelProperty
(
"通知单号"
)
private
String
to002
;
@ApiModelProperty
(
"通知序号"
)
private
String
to003
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/Invtb.java
View file @
9304ab98
...
...
@@ -86,5 +86,7 @@ public class Invtb extends EntityBase {
private
String
tb030
;
@ApiModelProperty
(
"生产日期"
)
private
String
tb031
;
@ApiModelProperty
(
"客户图号"
)
private
String
udf01
;
}
src/main/java/com/topsunit/scanservice/ximai/entity/Purcc.java
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.persistence.*
;
/**
...
...
@@ -10,117 +13,41 @@ import javax.persistence.*;
* @version V1.0
* @date 2021/10/19
*/
@Data
@Entity
@IdClass
(
PurccId
.
class
)
public
class
Purcc
extends
EntityBase
{
@Id
@ApiModelProperty
(
"单别"
)
private
String
cc001
;
@Id
@ApiModelProperty
(
"单号"
)
private
String
cc002
;
@Column
@ApiModelProperty
(
"日期"
)
private
String
cc003
;
@Column
@ApiModelProperty
(
""
)
private
String
cc004
;
@Column
@ApiModelProperty
(
"供货商号"
)
private
String
cc005
;
@Column
@ApiModelProperty
(
""
)
private
String
cc006
;
@Column
@ApiModelProperty
(
""
)
private
String
cc009
;
@Column
@ApiModelProperty
(
""
)
private
String
cc010
;
@Column
@ApiModelProperty
(
"供货商名称"
)
private
String
cc012
;
@Column
@ApiModelProperty
(
""
)
private
String
cc026
;
@Column
@ApiModelProperty
(
"库房标识"
)
private
String
udf01
;
public
String
getCc001
()
{
return
cc001
;
}
public
void
setCc001
(
String
cc001
)
{
this
.
cc001
=
cc001
;
}
public
String
getCc002
()
{
return
cc002
;
}
public
void
setCc002
(
String
cc002
)
{
this
.
cc002
=
cc002
;
}
public
String
getCc003
()
{
return
cc003
;
}
public
void
setCc003
(
String
cc003
)
{
this
.
cc003
=
cc003
;
}
public
String
getCc004
()
{
return
cc004
;
}
public
void
setCc004
(
String
cc004
)
{
this
.
cc004
=
cc004
;
}
public
String
getCc005
()
{
return
cc005
;
}
public
void
setCc005
(
String
cc005
)
{
this
.
cc005
=
cc005
;
}
public
String
getCc006
()
{
return
cc006
;
}
public
void
setCc006
(
String
cc006
)
{
this
.
cc006
=
cc006
;
}
public
String
getCc009
()
{
return
cc009
;
}
public
void
setCc009
(
String
cc009
)
{
this
.
cc009
=
cc009
;
}
public
String
getCc010
()
{
return
cc010
;
}
public
void
setCc010
(
String
cc010
)
{
this
.
cc010
=
cc010
;
}
public
String
getCc012
()
{
return
cc012
;
}
public
void
setCc012
(
String
cc012
)
{
this
.
cc012
=
cc012
;
}
public
String
getCc026
()
{
return
cc026
;
}
public
void
setCc026
(
String
cc026
)
{
this
.
cc026
=
cc026
;
}
public
String
getUdf01
()
{
return
udf01
;
}
public
void
setUdf01
(
String
udf01
)
{
this
.
udf01
=
udf01
;
}
}
src/main/java/com/topsunit/scanservice/ximai/entity/Purcd.java
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
entity
;
import
lombok.Data
;
import
javax.persistence.Column
;
import
javax.persistence.Entity
;
import
javax.persistence.Id
;
...
...
@@ -14,6 +16,7 @@ import java.math.BigDecimal;
* @version V1.0
* @date 2021/10/19
*/
@Data
@Entity
@IdClass
(
PurcdId
.
class
)
public
class
Purcd
extends
EntityBase
{
...
...
@@ -61,180 +64,4 @@ public class Purcd extends EntityBase {
private
String
udf01
;
@Column
private
String
udf02
;
public
String
getCd001
()
{
return
cd001
;
}
public
void
setCd001
(
String
cd001
)
{
this
.
cd001
=
cd001
;
}
public
String
getCd002
()
{
return
cd002
;
}
public
void
setCd002
(
String
cd002
)
{
this
.
cd002
=
cd002
;
}
public
String
getCd003
()
{
return
cd003
;
}
public
void
setCd003
(
String
cd003
)
{
this
.
cd003
=
cd003
;
}
public
String
getCd004
()
{
return
cd004
;
}
public
void
setCd004
(
String
cd004
)
{
this
.
cd004
=
cd004
;
}
public
String
getCd005
()
{
return
cd005
;
}
public
void
setCd005
(
String
cd005
)
{
this
.
cd005
=
cd005
;
}
public
String
getCd006
()
{
return
cd006
;
}
public
void
setCd006
(
String
cd006
)
{
this
.
cd006
=
cd006
;
}
public
String
getCd007
()
{
return
cd007
;
}
public
void
setCd007
(
String
cd007
)
{
this
.
cd007
=
cd007
;
}
public
BigDecimal
getCd008
()
{
return
cd008
;
}
public
void
setCd008
(
BigDecimal
cd008
)
{
this
.
cd008
=
cd008
;
}
public
String
getCd010
()
{
return
cd010
;
}
public
void
setCd010
(
String
cd010
)
{
this
.
cd010
=
cd010
;
}
public
String
getCd011
()
{
return
cd011
;
}
public
void
setCd011
(
String
cd011
)
{
this
.
cd011
=
cd011
;
}
public
String
getCd012
()
{
return
cd012
;
}
public
void
setCd012
(
String
cd012
)
{
this
.
cd012
=
cd012
;
}
public
String
getCd017
()
{
return
cd017
;
}
public
void
setCd017
(
String
cd017
)
{
this
.
cd017
=
cd017
;
}
public
BigDecimal
getCd018
()
{
return
cd018
;
}
public
void
setCd018
(
BigDecimal
cd018
)
{
this
.
cd018
=
cd018
;
}
public
BigDecimal
getCd019
()
{
return
cd019
;
}
public
void
setCd019
(
BigDecimal
cd019
)
{
this
.
cd019
=
cd019
;
}
public
BigDecimal
getCd020
()
{
return
cd020
;
}
public
void
setCd020
(
BigDecimal
cd020
)
{
this
.
cd020
=
cd020
;
}
public
BigDecimal
getCd026
()
{
return
cd026
;
}
public
void
setCd026
(
BigDecimal
cd026
)
{
this
.
cd026
=
cd026
;
}
public
BigDecimal
getCd027
()
{
return
cd027
;
}
public
void
setCd027
(
BigDecimal
cd027
)
{
this
.
cd027
=
cd027
;
}
public
BigDecimal
getCd028
()
{
return
cd028
;
}
public
void
setCd028
(
BigDecimal
cd028
)
{
this
.
cd028
=
cd028
;
}
public
BigDecimal
getCd029
()
{
return
cd029
;
}
public
void
setCd029
(
BigDecimal
cd029
)
{
this
.
cd029
=
cd029
;
}
public
String
getCd034
()
{
return
cd034
;
}
public
void
setCd034
(
String
cd034
)
{
this
.
cd034
=
cd034
;
}
public
String
getUdf01
()
{
return
udf01
;
}
public
void
setUdf01
(
String
udf01
)
{
this
.
udf01
=
udf01
;
}
public
String
getUdf02
()
{
return
udf02
;
}
public
void
setUdf02
(
String
udf02
)
{
this
.
udf02
=
udf02
;
}
}
src/main/java/com/topsunit/scanservice/ximai/service/CopthService.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.topsunit.scanservice.ximai.common.DateUtil
;
import
com.topsunit.scanservice.ximai.dao.CoptgDao
;
import
com.topsunit.scanservice.ximai.dao.CopthDao
;
import
com.topsunit.scanservice.ximai.dao.CoptnDao
;
import
com.topsunit.scanservice.ximai.dao.CoptoDao
;
import
com.topsunit.scanservice.ximai.dto.*
;
import
com.topsunit.scanservice.ximai.entity.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.hibernate.service.spi.ServiceException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.List
;
import
java.util.Optional
;
@Service
public
class
CopthService
{
@Autowired
private
CopthDao
copthDao
;
@Autowired
private
CoptgDao
coptgDao
;
@Autowired
private
CoptnDao
coptnDao
;
@Autowired
private
CoptoDao
coptoDao
;
public
void
create
(
StockSaleOutParams
params
){
Coptn
coptn
=
coptnDao
.
findFirstByTn001AndTn002
(
"251"
,
params
.
getApplyNo
())
.
orElseThrow
(()->
new
ServiceException
(
"未找到出货通知单:"
+
params
.
getApplyNo
()));
BigDecimal
total
=
BigDecimal
.
ZERO
;
Calendar
curr
=
Calendar
.
getInstance
();
String
currStr
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
curr
.
getTime
(),
"yyyyMMdd"
);
Coptg
coptg
=
BeanUtil
.
copyProperties
(
new
CoptgCreateParams
(),
Coptg
.
class
);
coptg
.
setTg002
(
this
.
getNewTg002
(
coptg
.
getTg001
()));
coptg
.
setTg003
(
currStr
);
coptg
.
setTg004
(
coptn
.
getTn004
());
coptg
.
setTg008
(
coptn
.
getTn009
());
coptg
.
setTg009
(
coptn
.
getTn010
());
coptg
.
setTg011
(
coptn
.
getTn013
());
coptg
.
setTg012
(
coptn
.
getTn014
());
coptg
.
setTg044
(
coptn
.
getTn030
());
int
i
=
1
;
for
(
StockSaleOutParams
.
StockSaleOutDetail
s
:
params
.
getData
()){
//查询出货通知单明细
Copto
copto
=
coptoDao
.
findFirstByTo001AndTo002AndTo007
(
"251"
,
params
.
getApplyNo
(),
s
.
getMaterialNo
())
.
orElseThrow
(()->
new
ServiceException
(
String
.
format
(
"未找到出货通知单明细:%s,%s"
,
params
.
getApplyNo
(),
s
.
getMaterialNo
())));
CopthCreateParams
copthCreateParams
=
new
CopthCreateParams
();
Copth
copth
=
BeanUtil
.
copyProperties
(
copthCreateParams
,
Copth
.
class
);
copth
.
setTh001
(
coptg
.
getTg001
());
copth
.
setTh002
(
coptg
.
getTg002
());
copth
.
setTh003
(
StringUtils
.
leftPad
(
i
+
""
,
4
,
"0"
));
copth
.
setTh004
(
s
.
getMaterialNo
());
copth
.
setTh005
(
s
.
getMaterialName
());
copth
.
setTh006
(
s
.
getUnit
());
copth
.
setTh007
(
s
.
getWarehouse
());
copth
.
setTh008
(
s
.
getOutQuantity
());
copth
.
setTh014
(
copto
.
getTo004
());
copth
.
setTh015
(
copto
.
getTo005
());
copth
.
setTh016
(
copto
.
getTo006
());
copth
.
setTh045
(
copto
.
getTo001
());
copth
.
setTh046
(
copto
.
getTo002
());
copth
.
setTh047
(
copto
.
getTo003
());
copthDao
.
save
(
copth
);
total
=
total
.
add
(
s
.
getOutQuantity
());
i
++;
}
coptg
.
setTg033
(
total
);
coptgDao
.
save
(
coptg
);
}
private
String
getNewTg002
(
String
tg001
)
{
String
prefix
=
DateUtil
.
currentDateString
();
return
coptgDao
.
findFirstByTg001AndTg002StartingWithOrderByTg002Desc
(
tg001
,
prefix
)
.
map
(
i
->
{
int
currentOrdianl
=
Integer
.
parseInt
(
i
.
getTg002
().
replace
(
prefix
,
""
));
return
prefix
+
String
.
format
(
"%03d"
,
currentOrdianl
+
1
);
})
.
orElse
(
prefix
+
"001"
);
}
}
src/main/java/com/topsunit/scanservice/ximai/service/CoptoService.java
0 → 100644
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
cn.hutool.core.util.StrUtil
;
import
com.topsunit.scanservice.ximai.dao.CoptoDao
;
import
com.topsunit.scanservice.ximai.dto.StockSaleOutDto
;
import
com.topsunit.scanservice.ximai.dto.StockSaleOutQueryParams
;
import
com.topsunit.scanservice.ximai.entity.Copto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.ArrayList
;
import
java.util.List
;
@Service
public
class
CoptoService
{
@Autowired
private
CoptoDao
coptoDao
;
public
StockSaleOutDto
getStockSaleOutDto
(
StockSaleOutQueryParams
params
){
StockSaleOutDto
rst
=
new
StockSaleOutDto
();
List
<
StockSaleOutDto
.
StockSaleOutDetail
>
data
=
new
ArrayList
<>();
List
<
Copto
>
list
=
coptoDao
.
findByTo001AndTo002
(
"251"
,
params
.
getSaleOutNo
());
list
.
forEach
(
s
->{
StockSaleOutDto
.
StockSaleOutDetail
saleOutDetail
=
new
StockSaleOutDto
.
StockSaleOutDetail
();
saleOutDetail
.
setDeliverQuantity
(
s
.
getTo017
());
saleOutDetail
.
setPlanOutDate
(
s
.
getUdf01
());
saleOutDetail
.
setMaterialName
(
StrUtil
.
trim
(
s
.
getTo008
()));
saleOutDetail
.
setMaterialNo
(
StrUtil
.
trim
(
s
.
getTo007
()));
saleOutDetail
.
setUnit
(
StrUtil
.
trim
(
s
.
getTo010
()));
data
.
add
(
saleOutDetail
);
});
rst
.
setData
(
data
);
rst
.
setApplyNo
(
params
.
getSaleOutNo
());
return
rst
;
}
}
src/main/java/com/topsunit/scanservice/ximai/service/InvmcService.java
View file @
9304ab98
...
...
@@ -68,4 +68,15 @@ public class InvmcService {
return
invmlMapper
.
toInvmlDto
(
list
);
}
/**
* 通过交货通知单查询库存
* @param to001 单别
* @param to002 单号
* @return
*/
public
List
<
InvmlDto
>
getInvmlWithCopto
(
String
to001
,
String
to002
){
List
<
Invml
>
list
=
invmlDao
.
findWithCopto
(
to001
,
to002
);
return
invmlMapper
.
toInvmlDto
(
list
);
}
}
src/main/java/com/topsunit/scanservice/ximai/service/InvtaService.java
View file @
9304ab98
...
...
@@ -90,8 +90,7 @@ public class InvtaService {
}
private
void
saveData
(
String
type
,
List
<
StockTransactionParams
>
data
){
InvtaCreateParams
invtaDto
=
new
InvtaCreateParams
();
Invta
invta
=
BeanUtil
.
toBeanIgnoreError
(
invtaDto
,
Invta
.
class
);
Invta
invta
=
BeanUtil
.
toBeanIgnoreError
(
new
InvtaCreateParams
(),
Invta
.
class
);
String
ta002
=
this
.
getNewTa002
(
type
);
invta
.
setTa001
(
type
);
invta
.
setTa002
(
ta002
);
...
...
@@ -117,6 +116,7 @@ public class InvtaService {
invtb
.
setTb005
(
detail
.
getMaterialName
());
invtb
.
setTb006
(
invmb
.
getMb003
());
invtb
.
setTb008
(
invmb
.
getMb149
());
invtb
.
setUdf01
(
invmb
.
getMb029
());
//盘点数量
invtb
.
setTb007
(
detail
.
getQuantity
());
invtb
.
setTb009
(
detail
.
getQuantity
());
...
...
src/main/java/com/topsunit/scanservice/ximai/service/PurccService.java
View file @
9304ab98
package
com
.
topsunit
.
scanservice
.
ximai
.
service
;
import
cn.hutool.core.bean.BeanUtil
;
import
com.fasterxml.jackson.core.JsonProcessingException
;
import
com.topsunit.scanservice.ximai.common.*
;
import
com.topsunit.scanservice.ximai.dao.InvmcDao
;
import
com.topsunit.scanservice.ximai.dao.PurccDao
;
import
com.topsunit.scanservice.ximai.dao.PurcdDao
;
import
com.topsunit.scanservice.ximai.dao.PurtdDao
;
import
com.topsunit.scanservice.ximai.dao.*
;
import
com.topsunit.scanservice.ximai.dto.*
;
import
com.topsunit.scanservice.ximai.dto.mapper.PurccMapper
;
import
com.topsunit.scanservice.ximai.entity.*
;
import
com.topsunit.scanservice.ximai.security.CurrentActor
;
import
com.topsunit.scanservice.ximai.webapi.PrintApi
;
import
com.topsunit.scanservice.ximai.webapi.dto.PrintField
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
...
...
@@ -39,6 +38,10 @@ public class PurccService {
private
final
InvmcDao
invmcDao
;
@Autowired
private
PrintConfig
printConfig
;
@Autowired
private
InvmbDao
invmbDao
;
private
static
String
DATA_TYPE
=
"3701"
;
public
PurccService
(
PurccDao
purccDao
,
PurcdDao
purcdDao
,
PurtdDao
purtdDao
,
PurccMapper
purccMapper
,
CurrentActor
currentActor
,
PrintApi
printApi
,
InvmcDao
invmcDao
)
{
this
.
purccDao
=
purccDao
;
...
...
@@ -218,4 +221,42 @@ public class PurccService {
}
return
byMc001
.
stream
().
findFirst
();
}
public
void
create
(
StockArrivalParams
stockArrivalParams
){
Purcc
purcc
=
BeanUtil
.
copyProperties
(
new
PurccCreateParams
(),
Purcc
.
class
);
Calendar
curr
=
Calendar
.
getInstance
();
String
currStr
=
cn
.
hutool
.
core
.
date
.
DateUtil
.
format
(
curr
.
getTime
(),
"yyyyMMdd"
);
purcc
.
setCc003
(
currStr
);
purcc
.
setCc001
(
DATA_TYPE
);
purcc
.
setCc002
(
this
.
getNewCc002
(
DATA_TYPE
));
purccDao
.
save
(
purcc
);
int
i
=
1
;
for
(
StockArrivalParams
.
StockArrivalDetail
detail
:
stockArrivalParams
.
getDetails
()){
Invmb
invmb
=
invmbDao
.
findById
(
detail
.
getMaterialNo
()).
orElseThrow
(()->
new
TopsunitException
(
"未找到物料:"
+
detail
.
getMaterialNo
()));
Purcd
purcd
=
BeanUtil
.
copyProperties
(
new
PurcdCreateParams
(),
Purcd
.
class
);
purcd
.
setCd001
(
purcc
.
getCc001
());
purcd
.
setCd002
(
purcc
.
getCc002
());
purcd
.
setCd003
(
StringUtils
.
leftPad
(
i
+
""
,
4
,
"0"
));
purcd
.
setCd004
(
invmb
.
getMb001
());
purcd
.
setCd005
(
invmb
.
getMb002
());
purcd
.
setCd006
(
invmb
.
getMb003
());
purcd
.
setCd007
(
invmb
.
getMb004
());
purcd
.
setCd008
(
detail
.
getArrivalQuantity
());
purcd
.
setCd010
(
detail
.
getPurchaseType
());
purcd
.
setCd011
(
detail
.
getPurchaseNo
());
purcd
.
setCd012
(
detail
.
getPurchaseSerial
());
purcdDao
.
save
(
purcd
);
i
++;
}
}
private
String
getNewCc002
(
String
tg001
)
{
String
prefix
=
DateUtil
.
currentDateString
();
return
purccDao
.
findFirstByCc001AndCc002StartingWithOrderByCc002Desc
(
tg001
,
prefix
)
.
map
(
i
->
{
int
currentOrdianl
=
Integer
.
parseInt
(
i
.
getCc002
().
replace
(
prefix
,
""
));
return
prefix
+
String
.
format
(
"%03d"
,
currentOrdianl
+
1
);
})
.
orElse
(
prefix
+
"001"
);
}
}
src/main/resources/application-dev.yml
View file @
9304ab98
...
...
@@ -54,7 +54,7 @@ spring:
name
:
DEMO
username
:
sa
password
:
123qweQWE
url
:
jdbc:sqlserver://localhost:1433;DatabaseName=
ximai
url
:
jdbc:sqlserver://localhost:1433;DatabaseName=
leader
type
:
com.alibaba.druid.pool.DruidDataSource
druid
:
filters
:
stat
...
...
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