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
5c56f43d
Commit
5c56f43d
authored
Oct 18, 2024
by
李驰骋
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
同步接口提交
parent
d2f7d875
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
224 additions
and
806 deletions
+224
-806
PageParams.java
...ava/com/topsunit/scanservice/ximai/common/PageParams.java
+102
-0
CmsmcController.java
...opsunit/scanservice/ximai/controller/CmsmcController.java
+2
-0
CopmaController.java
...opsunit/scanservice/ximai/controller/CopmaController.java
+1
-1
InvmbController.java
...opsunit/scanservice/ximai/controller/InvmbController.java
+2
-4
InvmbDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/InvmbDao.java
+3
-0
InvmlDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/InvmlDao.java
+1
-0
MoctbDao.java
...ain/java/com/topsunit/scanservice/ximai/dao/MoctbDao.java
+2
-0
CopmaDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/CopmaDto.java
+8
-18
InvmbCriteria.java
...ava/com/topsunit/scanservice/ximai/dto/InvmbCriteria.java
+6
-3
InvmbDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/InvmbDto.java
+33
-49
MoctaCriteria.java
...ava/com/topsunit/scanservice/ximai/dto/MoctaCriteria.java
+4
-3
MoctaDto.java
...ain/java/com/topsunit/scanservice/ximai/dto/MoctaDto.java
+6
-704
EntityBase.java
...ava/com/topsunit/scanservice/ximai/entity/EntityBase.java
+13
-10
EntityChangeListener.java
...nservice/ximai/entity/listeners/EntityChangeListener.java
+2
-2
InvmbService.java
.../com/topsunit/scanservice/ximai/service/InvmbService.java
+21
-6
MoctaService.java
.../com/topsunit/scanservice/ximai/service/MoctaService.java
+18
-6
No files found.
src/main/java/com/topsunit/scanservice/ximai/common/PageParams.java
0 → 100644
View file @
5c56f43d
package
com
.
topsunit
.
scanservice
.
ximai
.
common
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.Pageable
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* <p>Title: PageParams</p>
* <p>Description: 分页参数</p>
*
* @author xi.feng
* @version V1.0
*/
public
class
PageParams
{
private
int
current
;
private
int
pageSize
;
private
Sort
sort
;
public
Pageable
toPageable
()
{
if
(
sort
==
null
){
return
PageRequest
.
of
(
current
-
1
,
pageSize
);
}
return
PageRequest
.
of
(
current
-
1
,
pageSize
,
sort
.
toJpaSort
());
}
public
static
class
Sort
{
private
List
<
Order
>
orders
;
org
.
springframework
.
data
.
domain
.
Sort
toJpaSort
(){
if
(
orders
==
null
||
orders
.
size
()==
0
){
return
org
.
springframework
.
data
.
domain
.
Sort
.
unsorted
();
}
return
org
.
springframework
.
data
.
domain
.
Sort
.
by
(
orders
.
stream
().
map
(
Order:
:
toJpaOrder
).
collect
(
Collectors
.
toList
()));
}
public
List
<
Order
>
getOrders
()
{
return
orders
;
}
public
void
setOrders
(
List
<
Order
>
orders
)
{
this
.
orders
=
orders
;
}
}
public
static
class
Order
{
private
String
direction
;
private
String
property
;
org
.
springframework
.
data
.
domain
.
Sort
.
Order
toJpaOrder
(){
if
(
"ASC"
.
equalsIgnoreCase
(
direction
)){
return
org
.
springframework
.
data
.
domain
.
Sort
.
Order
.
asc
(
property
);
}
return
org
.
springframework
.
data
.
domain
.
Sort
.
Order
.
desc
(
property
);
}
public
String
getDirection
()
{
return
direction
;
}
public
void
setDirection
(
String
direction
)
{
this
.
direction
=
direction
;
}
public
String
getProperty
()
{
return
property
;
}
public
void
setProperty
(
String
property
)
{
this
.
property
=
property
;
}
}
public
int
getCurrent
()
{
return
current
;
}
public
void
setCurrent
(
int
current
)
{
this
.
current
=
current
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
Sort
getSort
()
{
return
sort
;
}
public
void
setSort
(
Sort
sort
)
{
this
.
sort
=
sort
;
}
}
src/main/java/com/topsunit/scanservice/ximai/controller/CmsmcController.java
View file @
5c56f43d
...
@@ -6,6 +6,7 @@ import com.topsunit.scanservice.ximai.dto.CmsniCriteria;
...
@@ -6,6 +6,7 @@ import com.topsunit.scanservice.ximai.dto.CmsniCriteria;
import
com.topsunit.scanservice.ximai.dto.CmsniDto
;
import
com.topsunit.scanservice.ximai.dto.CmsniDto
;
import
com.topsunit.scanservice.ximai.service.CmsmcService
;
import
com.topsunit.scanservice.ximai.service.CmsmcService
;
import
com.topsunit.scanservice.ximai.service.CmsniService
;
import
com.topsunit.scanservice.ximai.service.CmsniService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -26,6 +27,7 @@ public class CmsmcController {
...
@@ -26,6 +27,7 @@ public class CmsmcController {
@Autowired
@Autowired
private
CmsmcService
cmsmcService
;
private
CmsmcService
cmsmcService
;
@ApiOperation
(
"查询仓库列表"
)
@PostMapping
(
"/cmsmc/getCmsmcList"
)
@PostMapping
(
"/cmsmc/getCmsmcList"
)
public
List
<
CmsmcDto
>
getCmsmcList
(
@RequestBody
CmsmcCriteria
criteria
){
public
List
<
CmsmcDto
>
getCmsmcList
(
@RequestBody
CmsmcCriteria
criteria
){
return
cmsmcService
.
getCmsmcList
(
criteria
);
return
cmsmcService
.
getCmsmcList
(
criteria
);
...
...
src/main/java/com/topsunit/scanservice/ximai/controller/CopmaController.java
View file @
5c56f43d
...
@@ -30,7 +30,7 @@ public class CopmaController {
...
@@ -30,7 +30,7 @@ public class CopmaController {
@ApiOperation
(
"查询客户列表"
)
@ApiOperation
(
"查询客户列表"
)
@PostMapping
(
"/copma/getCopmaList"
)
@PostMapping
(
"/copma/getCopmaList"
)
public
List
<
CopmaDto
>
get
ForCreate
(
@RequestBody
CopmaCriteria
criteria
){
public
List
<
CopmaDto
>
get
CopmaList
(
@RequestBody
CopmaCriteria
criteria
){
return
copmaService
.
getCopmaDtoList
(
criteria
);
return
copmaService
.
getCopmaDtoList
(
criteria
);
}
}
...
...
src/main/java/com/topsunit/scanservice/ximai/controller/InvmbController.java
View file @
5c56f43d
...
@@ -4,6 +4,7 @@ import com.topsunit.scanservice.ximai.dto.InvmbCriteria;
...
@@ -4,6 +4,7 @@ import com.topsunit.scanservice.ximai.dto.InvmbCriteria;
import
com.topsunit.scanservice.ximai.dto.InvmbDto
;
import
com.topsunit.scanservice.ximai.dto.InvmbDto
;
import
com.topsunit.scanservice.ximai.dto.InvmbIdCriteria
;
import
com.topsunit.scanservice.ximai.dto.InvmbIdCriteria
;
import
com.topsunit.scanservice.ximai.service.InvmbService
;
import
com.topsunit.scanservice.ximai.service.InvmbService
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -32,13 +33,10 @@ public class InvmbController {
...
@@ -32,13 +33,10 @@ public class InvmbController {
return
invmbService
.
getForInvmbInfo
(
criteria
);
return
invmbService
.
getForInvmbInfo
(
criteria
);
}
}
@ApiOperation
(
"查询物料列表"
)
@PostMapping
(
"/invmb/getInvmbList"
)
@PostMapping
(
"/invmb/getInvmbList"
)
public
List
<
InvmbDto
>
getInvmbList
(
@RequestBody
InvmbCriteria
criteria
)
{
public
List
<
InvmbDto
>
getInvmbList
(
@RequestBody
InvmbCriteria
criteria
)
{
return
invmbService
.
getInvmbList
(
criteria
);
return
invmbService
.
getInvmbList
(
criteria
);
}
}
@PostMapping
(
"/invml/getInvmlList"
)
public
List
<
InvmbDto
>
getInvmlList
(
@RequestBody
InvmbCriteria
criteria
)
{
return
invmbService
.
getInvmbList
(
criteria
);
}
}
}
src/main/java/com/topsunit/scanservice/ximai/dao/InvmbDao.java
View file @
5c56f43d
...
@@ -14,4 +14,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
...
@@ -14,4 +14,7 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
* @date 2021/10/26
* @date 2021/10/26
*/
*/
public
interface
InvmbDao
extends
JpaRepository
<
Invmb
,
String
>,
JpaSpecificationExecutor
<
Invmb
>
{
public
interface
InvmbDao
extends
JpaRepository
<
Invmb
,
String
>,
JpaSpecificationExecutor
<
Invmb
>
{
}
}
src/main/java/com/topsunit/scanservice/ximai/dao/InvmlDao.java
View file @
5c56f43d
...
@@ -15,4 +15,5 @@ import java.util.Optional;
...
@@ -15,4 +15,5 @@ import java.util.Optional;
*/
*/
public
interface
InvmlDao
extends
JpaRepository
<
Invml
,
InvmlId
>,
JpaSpecificationExecutor
<
Invml
>
{
public
interface
InvmlDao
extends
JpaRepository
<
Invml
,
InvmlId
>,
JpaSpecificationExecutor
<
Invml
>
{
List
<
Invml
>
findByMl001OrderByMl002AscMl003AscMl004Asc
(
String
ml001
);
List
<
Invml
>
findByMl001OrderByMl002AscMl003AscMl004Asc
(
String
ml001
);
List
<
Invml
>
findByMl001InOrderByMl002AscMl003AscMl004Asc
(
List
<
String
>
ml001List
);
}
}
src/main/java/com/topsunit/scanservice/ximai/dao/MoctbDao.java
View file @
5c56f43d
...
@@ -14,4 +14,6 @@ import java.util.List;
...
@@ -14,4 +14,6 @@ import java.util.List;
*/
*/
public
interface
MoctbDao
extends
JpaRepository
<
Moctb
,
MoctbId
>,
JpaSpecificationExecutor
<
Moctb
>
{
public
interface
MoctbDao
extends
JpaRepository
<
Moctb
,
MoctbId
>,
JpaSpecificationExecutor
<
Moctb
>
{
List
<
Moctb
>
findByTb001AndTb002OrderByTb003AscTb006Asc
(
String
tb001
,
String
tb002
);
List
<
Moctb
>
findByTb001AndTb002OrderByTb003AscTb006Asc
(
String
tb001
,
String
tb002
);
List
<
Moctb
>
findByTb002InOrderByTb003AscTb006Asc
(
List
<
String
>
tb002List
);
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/CopmaDto.java
View file @
5c56f43d
...
@@ -3,6 +3,8 @@ package com.topsunit.scanservice.ximai.dto;
...
@@ -3,6 +3,8 @@ 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.Id
;
/**
/**
* <p>Title: CopmaDto</p>
* <p>Title: CopmaDto</p>
* <p>Description: 客户</p>
* <p>Description: 客户</p>
...
@@ -14,33 +16,21 @@ import lombok.Data;
...
@@ -14,33 +16,21 @@ import lombok.Data;
@Data
@Data
public
class
CopmaDto
{
public
class
CopmaDto
{
@ApiModelProperty
(
"
供应商
编号"
)
@ApiModelProperty
(
"
客户
编号"
)
private
String
ma001
;
private
String
ma001
;
@ApiModelProperty
(
"简称"
)
@ApiModelProperty
(
"
客户
简称"
)
private
String
ma002
;
private
String
ma002
;
@ApiModelProperty
(
"
公司
全称"
)
@ApiModelProperty
(
"
客户
全称"
)
private
String
ma003
;
private
String
ma003
;
@ApiModelProperty
(
"税号"
)
private
String
ma005
;
/**
/**
* 1:已核准、2:尚待核准、3:不准交易
* 1:已核准、2:尚待核准、3:不准交易
[DEF:1]//20030312 5.0 P00-03030003 ADD BY 28995↓
*/
*/
@ApiModelProperty
(
"核准状态"
)
@ApiModelProperty
(
"核准状态"
)
private
String
ma016
;
private
String
ma097
;
@ApiModelProperty
(
"交易币种"
)
private
String
ma021
;
/**
* 1.二联式、2.三联式、3.二联式收银机发票、4.三联式收银机发票、5.电子计算机发票、6.免用统一发票、S.可抵扣专用发票、B.普通发票、T.运输发票、N.不可抵扣专用发票 A.农产品收购凭证、G.海关代征完税凭证、W.废旧物资收购凭证、Z.其他 //901025 S06-9009036 MODI A~Z //8
*/
@ApiModelProperty
(
"发票种类"
)
private
String
ma030
;
@ApiModelProperty
(
"备注"
)
@ApiModelProperty
(
"备注"
)
private
String
ma04
0
;
private
String
ma04
9
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvmbCriteria.java
View file @
5c56f43d
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.PageParams
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -14,13 +15,15 @@ import javax.persistence.Id;
...
@@ -14,13 +15,15 @@ import javax.persistence.Id;
* @date 2024/10/17
* @date 2024/10/17
*/
*/
@Data
@Data
public
class
InvmbCriteria
{
public
class
InvmbCriteria
extends
PageParams
{
@ApiModelProperty
(
"品号"
)
@ApiModelProperty
(
"品号"
)
private
String
mb001
;
private
String
mb001
;
@ApiModelProperty
(
"品名"
)
@ApiModelProperty
(
"品名"
)
private
String
mb002
;
private
String
mb002
;
@ApiModelProperty
(
"核准状态"
)
private
String
mb109
;
@ApiModelProperty
(
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
private
String
gt
Create_d
ate
;
private
String
gt
EqCreateD
ate
;
@ApiModelProperty
(
"修改日期"
)
@ApiModelProperty
(
"修改日期"
)
private
String
gt
Modi_d
ate
;
private
String
gt
EqModiD
ate
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/InvmbDto.java
View file @
5c56f43d
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -10,6 +13,7 @@ import java.util.List;
...
@@ -10,6 +13,7 @@ import java.util.List;
* @version V1.0
* @version V1.0
* @date 2021/11/11
* @date 2021/11/11
*/
*/
@Data
public
class
InvmbDto
{
public
class
InvmbDto
{
/**
/**
* 品号
* 品号
...
@@ -27,60 +31,40 @@ public class InvmbDto {
...
@@ -27,60 +31,40 @@ public class InvmbDto {
* 库存单位
* 库存单位
*/
*/
private
String
mb004
;
private
String
mb004
;
@ApiModelProperty
(
"品号类别"
)
private
String
mb005
;
/**
/**
*
批号管理
*
N:不需要、Y:需要不检查库存量、W:仅需警告、T:需要且检查库存量
*/
*/
@ApiModelProperty
(
"批号管理"
)
private
String
mb022
;
private
String
mb022
;
/**
*
*/
private
List
<
InvmlDto
>
invmls
;
public
String
getMb001
()
{
return
mb001
;
}
public
void
setMb001
(
String
mb001
)
{
this
.
mb001
=
mb001
;
}
public
String
getMb002
()
{
return
mb002
;
}
public
void
setMb002
(
String
mb002
)
{
this
.
mb002
=
mb002
;
}
public
String
getMb003
()
{
return
mb003
;
}
public
void
setMb003
(
String
mb003
)
{
@ApiModelProperty
(
"客户图号"
)
this
.
mb003
=
mb003
;
private
String
mb029
;
}
public
String
getMb004
()
{
/**
return
mb004
;
* 0:免检、1:抽检(减量)、2:抽检(正常)、3:抽检(加严)、4:全检
}
*/
@ApiModelProperty
(
"检验方式"
)
public
void
setMb004
(
String
mb004
)
{
private
String
mb043
;
this
.
mb004
=
mb004
;
}
public
String
getMb022
()
{
return
mb022
;
}
public
void
setMb022
(
String
mb022
)
{
this
.
mb022
=
mb022
;
}
public
List
<
InvmlDto
>
getInvmls
()
{
@ApiModelProperty
(
"计价单位"
)
return
invmls
;
private
String
mb149
;
}
@ApiModelProperty
(
"客户品号"
)
private
String
udf01
;
@ApiModelProperty
(
"主要仓库"
)
private
String
mb017
;
/**
* Y:已核准、y:尚待核准、N:不准交易[DEF:"Y"]
*/
@ApiModelProperty
(
"核准状态"
)
private
String
mb109
;
public
void
setInvmls
(
List
<
InvmlDto
>
invmls
)
{
@ApiModelProperty
(
"备注"
)
this
.
invmls
=
invmls
;
private
String
mb028
;
}
/**
*
*/
private
List
<
InvmlDto
>
invmls
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/MoctaCriteria.java
View file @
5c56f43d
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
com.topsunit.scanservice.ximai.common.PageParams
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
lombok.Data
;
...
@@ -12,7 +13,7 @@ import java.util.List;
...
@@ -12,7 +13,7 @@ import java.util.List;
* Description: 工单单头Dto
* Description: 工单单头Dto
*/
*/
@Data
@Data
public
class
MoctaCriteria
{
public
class
MoctaCriteria
extends
PageParams
{
/*工单单别*/
/*工单单别*/
private
String
ta001
;
private
String
ta001
;
/*工单单号*/
/*工单单号*/
...
@@ -20,8 +21,8 @@ public class MoctaCriteria {
...
@@ -20,8 +21,8 @@ public class MoctaCriteria {
@ApiModelProperty
(
"审核码"
)
@ApiModelProperty
(
"审核码"
)
private
String
ta013
;
private
String
ta013
;
@ApiModelProperty
(
"创建日期"
)
@ApiModelProperty
(
"创建日期"
)
private
String
gt
Create_d
ate
;
private
String
gt
EqCreateD
ate
;
@ApiModelProperty
(
"修改日期"
)
@ApiModelProperty
(
"修改日期"
)
private
String
gt
Modi_d
ate
;
private
String
gt
EqModiD
ate
;
}
}
src/main/java/com/topsunit/scanservice/ximai/dto/MoctaDto.java
View file @
5c56f43d
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
package
com
.
topsunit
.
scanservice
.
ximai
.
dto
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.List
;
import
java.util.List
;
...
@@ -8,6 +10,7 @@ import java.util.List;
...
@@ -8,6 +10,7 @@ import java.util.List;
* Date: 2021/10/29 8:50
* Date: 2021/10/29 8:50
* Description: 工单单头Dto
* Description: 工单单头Dto
*/
*/
@Data
public
class
MoctaDto
{
public
class
MoctaDto
{
/*工单单别*/
/*工单单别*/
private
String
ta001
;
private
String
ta001
;
...
@@ -185,709 +188,8 @@ public class MoctaDto {
...
@@ -185,709 +188,8 @@ public class MoctaDto {
/*项目编号*/
/*项目编号*/
private
String
ta083
;
private
String
ta083
;
/**
* 工单材料明细
*/
private
List
<
MoctbDto
>
moctbDtos
;
private
List
<
MoctbDto
>
moctbDtos
;
public
String
getTa001
()
{
return
ta001
;
}
public
void
setTa001
(
String
ta001
)
{
this
.
ta001
=
ta001
;
}
public
String
getTa002
()
{
return
ta002
;
}
public
void
setTa002
(
String
ta002
)
{
this
.
ta002
=
ta002
;
}
public
String
getTa003
()
{
return
ta003
;
}
public
void
setTa003
(
String
ta003
)
{
this
.
ta003
=
ta003
;
}
public
String
getTa004
()
{
return
ta004
;
}
public
void
setTa004
(
String
ta004
)
{
this
.
ta004
=
ta004
;
}
public
String
getTa005
()
{
return
ta005
;
}
public
void
setTa005
(
String
ta005
)
{
this
.
ta005
=
ta005
;
}
public
String
getTa006
()
{
return
ta006
;
}
public
void
setTa006
(
String
ta006
)
{
this
.
ta006
=
ta006
;
}
public
String
getTa007
()
{
return
ta007
;
}
public
void
setTa007
(
String
ta007
)
{
this
.
ta007
=
ta007
;
}
public
String
getTa008
()
{
return
ta008
;
}
public
void
setTa008
(
String
ta008
)
{
this
.
ta008
=
ta008
;
}
public
String
getTa009
()
{
return
ta009
;
}
public
void
setTa009
(
String
ta009
)
{
this
.
ta009
=
ta009
;
}
public
String
getTa010
()
{
return
ta010
;
}
public
void
setTa010
(
String
ta010
)
{
this
.
ta010
=
ta010
;
}
public
String
getTa011
()
{
return
ta011
;
}
public
void
setTa011
(
String
ta011
)
{
this
.
ta011
=
ta011
;
}
public
String
getTa012
()
{
return
ta012
;
}
public
void
setTa012
(
String
ta012
)
{
this
.
ta012
=
ta012
;
}
public
String
getTa013
()
{
return
ta013
;
}
public
void
setTa013
(
String
ta013
)
{
this
.
ta013
=
ta013
;
}
public
String
getTa014
()
{
return
ta014
;
}
public
void
setTa014
(
String
ta014
)
{
this
.
ta014
=
ta014
;
}
public
BigDecimal
getTa015
()
{
return
ta015
;
}
public
void
setTa015
(
BigDecimal
ta015
)
{
this
.
ta015
=
ta015
;
}
public
BigDecimal
getTa016
()
{
return
ta016
;
}
public
void
setTa016
(
BigDecimal
ta016
)
{
this
.
ta016
=
ta016
;
}
public
BigDecimal
getTa017
()
{
return
ta017
;
}
public
void
setTa017
(
BigDecimal
ta017
)
{
this
.
ta017
=
ta017
;
}
public
BigDecimal
getTa018
()
{
return
ta018
;
}
public
void
setTa018
(
BigDecimal
ta018
)
{
this
.
ta018
=
ta018
;
}
public
String
getTa019
()
{
return
ta019
;
}
public
void
setTa019
(
String
ta019
)
{
this
.
ta019
=
ta019
;
}
public
String
getTa020
()
{
return
ta020
;
}
public
void
setTa020
(
String
ta020
)
{
this
.
ta020
=
ta020
;
}
public
String
getTa021
()
{
return
ta021
;
}
public
void
setTa021
(
String
ta021
)
{
this
.
ta021
=
ta021
;
}
public
BigDecimal
getTa022
()
{
return
ta022
;
}
public
void
setTa022
(
BigDecimal
ta022
)
{
this
.
ta022
=
ta022
;
}
public
String
getTa023
()
{
return
ta023
;
}
public
void
setTa023
(
String
ta023
)
{
this
.
ta023
=
ta023
;
}
public
String
getTa024
()
{
return
ta024
;
}
public
void
setTa024
(
String
ta024
)
{
this
.
ta024
=
ta024
;
}
public
String
getTa025
()
{
return
ta025
;
}
public
void
setTa025
(
String
ta025
)
{
this
.
ta025
=
ta025
;
}
public
String
getTa026
()
{
return
ta026
;
}
public
void
setTa026
(
String
ta026
)
{
this
.
ta026
=
ta026
;
}
public
String
getTa027
()
{
return
ta027
;
}
public
void
setTa027
(
String
ta027
)
{
this
.
ta027
=
ta027
;
}
public
String
getTa028
()
{
return
ta028
;
}
public
void
setTa028
(
String
ta028
)
{
this
.
ta028
=
ta028
;
}
public
String
getTa029
()
{
return
ta029
;
}
public
void
setTa029
(
String
ta029
)
{
this
.
ta029
=
ta029
;
}
public
String
getTa030
()
{
return
ta030
;
}
public
void
setTa030
(
String
ta030
)
{
this
.
ta030
=
ta030
;
}
public
Integer
getTa031
()
{
return
ta031
;
}
public
void
setTa031
(
Integer
ta031
)
{
this
.
ta031
=
ta031
;
}
public
String
getTa032
()
{
return
ta032
;
}
public
void
setTa032
(
String
ta032
)
{
this
.
ta032
=
ta032
;
}
public
String
getTa033
()
{
return
ta033
;
}
public
void
setTa033
(
String
ta033
)
{
this
.
ta033
=
ta033
;
}
public
String
getTa034
()
{
return
ta034
;
}
public
void
setTa034
(
String
ta034
)
{
this
.
ta034
=
ta034
;
}
public
String
getTa035
()
{
return
ta035
;
}
public
void
setTa035
(
String
ta035
)
{
this
.
ta035
=
ta035
;
}
public
String
getTa036
()
{
return
ta036
;
}
public
void
setTa036
(
String
ta036
)
{
this
.
ta036
=
ta036
;
}
public
String
getTa037
()
{
return
ta037
;
}
public
void
setTa037
(
String
ta037
)
{
this
.
ta037
=
ta037
;
}
public
String
getTa038
()
{
return
ta038
;
}
public
void
setTa038
(
String
ta038
)
{
this
.
ta038
=
ta038
;
}
public
String
getTa039
()
{
return
ta039
;
}
public
void
setTa039
(
String
ta039
)
{
this
.
ta039
=
ta039
;
}
public
String
getTa040
()
{
return
ta040
;
}
public
void
setTa040
(
String
ta040
)
{
this
.
ta040
=
ta040
;
}
public
String
getTa041
()
{
return
ta041
;
}
public
void
setTa041
(
String
ta041
)
{
this
.
ta041
=
ta041
;
}
public
String
getTa042
()
{
return
ta042
;
}
public
void
setTa042
(
String
ta042
)
{
this
.
ta042
=
ta042
;
}
public
BigDecimal
getTa043
()
{
return
ta043
;
}
public
void
setTa043
(
BigDecimal
ta043
)
{
this
.
ta043
=
ta043
;
}
public
String
getTa044
()
{
return
ta044
;
}
public
void
setTa044
(
String
ta044
)
{
this
.
ta044
=
ta044
;
}
public
BigDecimal
getTa045
()
{
return
ta045
;
}
public
void
setTa045
(
BigDecimal
ta045
)
{
this
.
ta045
=
ta045
;
}
public
BigDecimal
getTa046
()
{
return
ta046
;
}
public
void
setTa046
(
BigDecimal
ta046
)
{
this
.
ta046
=
ta046
;
}
public
BigDecimal
getTa047
()
{
return
ta047
;
}
public
void
setTa047
(
BigDecimal
ta047
)
{
this
.
ta047
=
ta047
;
}
public
String
getTa048
()
{
return
ta048
;
}
public
void
setTa048
(
String
ta048
)
{
this
.
ta048
=
ta048
;
}
public
String
getTa049
()
{
return
ta049
;
}
public
void
setTa049
(
String
ta049
)
{
this
.
ta049
=
ta049
;
}
public
String
getTa050
()
{
return
ta050
;
}
public
void
setTa050
(
String
ta050
)
{
this
.
ta050
=
ta050
;
}
public
String
getTa051
()
{
return
ta051
;
}
public
void
setTa051
(
String
ta051
)
{
this
.
ta051
=
ta051
;
}
public
String
getTa052
()
{
return
ta052
;
}
public
void
setTa052
(
String
ta052
)
{
this
.
ta052
=
ta052
;
}
public
String
getTa053
()
{
return
ta053
;
}
public
void
setTa053
(
String
ta053
)
{
this
.
ta053
=
ta053
;
}
public
Integer
getTa054
()
{
return
ta054
;
}
public
void
setTa054
(
Integer
ta054
)
{
this
.
ta054
=
ta054
;
}
public
String
getTa055
()
{
return
ta055
;
}
public
void
setTa055
(
String
ta055
)
{
this
.
ta055
=
ta055
;
}
public
BigDecimal
getTa056
()
{
return
ta056
;
}
public
void
setTa056
(
BigDecimal
ta056
)
{
this
.
ta056
=
ta056
;
}
public
String
getTa057
()
{
return
ta057
;
}
public
void
setTa057
(
String
ta057
)
{
this
.
ta057
=
ta057
;
}
public
String
getTa058
()
{
return
ta058
;
}
public
void
setTa058
(
String
ta058
)
{
this
.
ta058
=
ta058
;
}
public
String
getTa059
()
{
return
ta059
;
}
public
void
setTa059
(
String
ta059
)
{
this
.
ta059
=
ta059
;
}
public
BigDecimal
getTa060
()
{
return
ta060
;
}
public
void
setTa060
(
BigDecimal
ta060
)
{
this
.
ta060
=
ta060
;
}
public
BigDecimal
getTa061
()
{
return
ta061
;
}
public
void
setTa061
(
BigDecimal
ta061
)
{
this
.
ta061
=
ta061
;
}
public
Integer
getTa062
()
{
return
ta062
;
}
public
void
setTa062
(
Integer
ta062
)
{
this
.
ta062
=
ta062
;
}
public
String
getTa063
()
{
return
ta063
;
}
public
void
setTa063
(
String
ta063
)
{
this
.
ta063
=
ta063
;
}
public
String
getTa064
()
{
return
ta064
;
}
public
void
setTa064
(
String
ta064
)
{
this
.
ta064
=
ta064
;
}
public
String
getTa065
()
{
return
ta065
;
}
public
void
setTa065
(
String
ta065
)
{
this
.
ta065
=
ta065
;
}
public
String
getTa066
()
{
return
ta066
;
}
public
void
setTa066
(
String
ta066
)
{
this
.
ta066
=
ta066
;
}
public
String
getTa067
()
{
return
ta067
;
}
public
void
setTa067
(
String
ta067
)
{
this
.
ta067
=
ta067
;
}
public
BigDecimal
getTa068
()
{
return
ta068
;
}
public
void
setTa068
(
BigDecimal
ta068
)
{
this
.
ta068
=
ta068
;
}
public
BigDecimal
getTa069
()
{
return
ta069
;
}
public
void
setTa069
(
BigDecimal
ta069
)
{
this
.
ta069
=
ta069
;
}
public
BigDecimal
getTa070
()
{
return
ta070
;
}
public
void
setTa070
(
BigDecimal
ta070
)
{
this
.
ta070
=
ta070
;
}
public
String
getTa071
()
{
return
ta071
;
}
public
void
setTa071
(
String
ta071
)
{
this
.
ta071
=
ta071
;
}
public
BigDecimal
getTa072
()
{
return
ta072
;
}
public
void
setTa072
(
BigDecimal
ta072
)
{
this
.
ta072
=
ta072
;
}
public
String
getTa073
()
{
return
ta073
;
}
public
void
setTa073
(
String
ta073
)
{
this
.
ta073
=
ta073
;
}
public
String
getTa074
()
{
return
ta074
;
}
public
void
setTa074
(
String
ta074
)
{
this
.
ta074
=
ta074
;
}
public
BigDecimal
getTad01
()
{
return
tad01
;
}
public
void
setTad01
(
BigDecimal
tad01
)
{
this
.
tad01
=
tad01
;
}
public
String
getTac01
()
{
return
tac01
;
}
public
void
setTac01
(
String
tac01
)
{
this
.
tac01
=
tac01
;
}
public
BigDecimal
getTac02
()
{
return
tac02
;
}
public
void
setTac02
(
BigDecimal
tac02
)
{
this
.
tac02
=
tac02
;
}
public
BigDecimal
getTac03
()
{
return
tac03
;
}
public
void
setTac03
(
BigDecimal
tac03
)
{
this
.
tac03
=
tac03
;
}
public
String
getTa075
()
{
return
ta075
;
}
public
void
setTa075
(
String
ta075
)
{
this
.
ta075
=
ta075
;
}
public
String
getTa076
()
{
return
ta076
;
}
public
void
setTa076
(
String
ta076
)
{
this
.
ta076
=
ta076
;
}
public
String
getTa077
()
{
return
ta077
;
}
public
void
setTa077
(
String
ta077
)
{
this
.
ta077
=
ta077
;
}
public
String
getTa078
()
{
return
ta078
;
}
public
void
setTa078
(
String
ta078
)
{
this
.
ta078
=
ta078
;
}
public
String
getTa079
()
{
return
ta079
;
}
public
void
setTa079
(
String
ta079
)
{
this
.
ta079
=
ta079
;
}
public
String
getTa080
()
{
return
ta080
;
}
public
void
setTa080
(
String
ta080
)
{
this
.
ta080
=
ta080
;
}
public
BigDecimal
getTa081
()
{
return
ta081
;
}
public
void
setTa081
(
BigDecimal
ta081
)
{
this
.
ta081
=
ta081
;
}
public
BigDecimal
getTa082
()
{
return
ta082
;
}
public
void
setTa082
(
BigDecimal
ta082
)
{
this
.
ta082
=
ta082
;
}
public
String
getTa083
()
{
return
ta083
;
}
public
void
setTa083
(
String
ta083
)
{
this
.
ta083
=
ta083
;
}
public
List
<
MoctbDto
>
getMoctbDtos
()
{
return
moctbDtos
;
}
public
void
setMoctbDtos
(
List
<
MoctbDto
>
moctbDtos
)
{
this
.
moctbDtos
=
moctbDtos
;
}
}
}
src/main/java/com/topsunit/scanservice/ximai/entity/EntityBase.java
View file @
5c56f43d
...
@@ -2,6 +2,7 @@ package com.topsunit.scanservice.ximai.entity;
...
@@ -2,6 +2,7 @@ package com.topsunit.scanservice.ximai.entity;
import
com.topsunit.scanservice.ximai.entity.listeners.EntityChangeListener
;
import
com.topsunit.scanservice.ximai.entity.listeners.EntityChangeListener
;
import
javax.persistence.Column
;
import
javax.persistence.EntityListeners
;
import
javax.persistence.EntityListeners
;
import
javax.persistence.MappedSuperclass
;
import
javax.persistence.MappedSuperclass
;
...
@@ -19,9 +20,11 @@ public abstract class EntityBase {
...
@@ -19,9 +20,11 @@ public abstract class EntityBase {
private
String
company
=
""
;
private
String
company
=
""
;
private
String
creator
=
""
;
private
String
creator
=
""
;
private
String
usr_group
=
""
;
private
String
usr_group
=
""
;
private
String
create_date
=
""
;
@Column
(
name
=
"create_date"
)
private
String
createDate
=
""
;
private
String
modifier
=
""
;
private
String
modifier
=
""
;
private
String
modi_date
=
""
;
@Column
(
name
=
"modi_date"
)
private
String
modiDate
=
""
;
private
Integer
flag
;
private
Integer
flag
;
public
String
getCompany
()
{
public
String
getCompany
()
{
...
@@ -48,12 +51,12 @@ public abstract class EntityBase {
...
@@ -48,12 +51,12 @@ public abstract class EntityBase {
this
.
usr_group
=
usr_group
;
this
.
usr_group
=
usr_group
;
}
}
public
String
getCreate
_d
ate
()
{
public
String
getCreate
D
ate
()
{
return
create
_d
ate
;
return
create
D
ate
;
}
}
public
void
setCreate
_date
(
String
create_d
ate
)
{
public
void
setCreate
Date
(
String
createD
ate
)
{
this
.
create
_date
=
create_d
ate
;
this
.
create
Date
=
createD
ate
;
}
}
public
String
getModifier
()
{
public
String
getModifier
()
{
...
@@ -64,12 +67,12 @@ public abstract class EntityBase {
...
@@ -64,12 +67,12 @@ public abstract class EntityBase {
this
.
modifier
=
modifier
;
this
.
modifier
=
modifier
;
}
}
public
String
getModi
_d
ate
()
{
public
String
getModi
D
ate
()
{
return
modi
_d
ate
;
return
modi
D
ate
;
}
}
public
void
setModi
_date
(
String
modi_d
ate
)
{
public
void
setModi
Date
(
String
modiD
ate
)
{
this
.
modi
_date
=
modi_d
ate
;
this
.
modi
Date
=
modiD
ate
;
}
}
public
Integer
getFlag
()
{
public
Integer
getFlag
()
{
...
...
src/main/java/com/topsunit/scanservice/ximai/entity/listeners/EntityChangeListener.java
View file @
5c56f43d
...
@@ -38,7 +38,7 @@ public class EntityChangeListener implements ApplicationContextAware {
...
@@ -38,7 +38,7 @@ public class EntityChangeListener implements ApplicationContextAware {
String
company
=
getCompany
();
String
company
=
getCompany
();
entity
.
setCompany
(
company
);
entity
.
setCompany
(
company
);
entity
.
setCreator
(
currentActor
.
getMv001
());
entity
.
setCreator
(
currentActor
.
getMv001
());
entity
.
setCreate
_d
ate
(
DateUtil
.
currentDateTimeString
());
entity
.
setCreate
D
ate
(
DateUtil
.
currentDateTimeString
());
entity
.
setUsr_group
(
currentActor
.
getUsr_group
());
entity
.
setUsr_group
(
currentActor
.
getUsr_group
());
entity
.
setFlag
(
1
);
entity
.
setFlag
(
1
);
}
}
...
@@ -55,7 +55,7 @@ public class EntityChangeListener implements ApplicationContextAware {
...
@@ -55,7 +55,7 @@ public class EntityChangeListener implements ApplicationContextAware {
EntityBase
entity
=
(
EntityBase
)
object
;
EntityBase
entity
=
(
EntityBase
)
object
;
Cmsmv
currentActor
=
getCurrentActor
();
Cmsmv
currentActor
=
getCurrentActor
();
entity
.
setModifier
(
currentActor
.
getMv001
());
entity
.
setModifier
(
currentActor
.
getMv001
());
entity
.
setModi
_d
ate
(
DateUtil
.
currentDateTimeString
());
entity
.
setModi
D
ate
(
DateUtil
.
currentDateTimeString
());
if
(
entity
.
getFlag
()
==
null
)
{
if
(
entity
.
getFlag
()
==
null
)
{
entity
.
setFlag
(
1
);
entity
.
setFlag
(
1
);
}
else
{
}
else
{
...
...
src/main/java/com/topsunit/scanservice/ximai/service/InvmbService.java
View file @
5c56f43d
...
@@ -7,7 +7,9 @@ import com.topsunit.scanservice.ximai.dto.mapper.InvmbMapper;
...
@@ -7,7 +7,9 @@ import com.topsunit.scanservice.ximai.dto.mapper.InvmbMapper;
import
com.topsunit.scanservice.ximai.entity.Copma
;
import
com.topsunit.scanservice.ximai.entity.Copma
;
import
com.topsunit.scanservice.ximai.entity.Invmb
;
import
com.topsunit.scanservice.ximai.entity.Invmb
;
import
com.topsunit.scanservice.ximai.entity.Invml
;
import
com.topsunit.scanservice.ximai.entity.Invml
;
import
jdk.nashorn.internal.parser.DateParser
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -16,8 +18,10 @@ import javax.persistence.criteria.CriteriaQuery;
...
@@ -16,8 +18,10 @@ import javax.persistence.criteria.CriteriaQuery;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Predicate
;
import
javax.persistence.criteria.Root
;
import
javax.persistence.criteria.Root
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.DateFormat
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -64,19 +68,30 @@ public class InvmbService {
...
@@ -64,19 +68,30 @@ public class InvmbService {
Predicate
predicate
=
criteriaBuilder
.
like
(
root
.
get
(
"mb001"
),
criteria
.
getMb001
()
+
"%"
);
Predicate
predicate
=
criteriaBuilder
.
like
(
root
.
get
(
"mb001"
),
criteria
.
getMb001
()
+
"%"
);
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
if
(
StringUtils
.
isNotBlank
(
criteria
.
get
GtCreate_date
()))
{
if
(
StringUtils
.
isNotBlank
(
criteria
.
get
Mb109
()))
{
Predicate
predicate
=
criteriaBuilder
.
greaterThan
(
root
.
get
(
"create_date"
),
criteria
.
getGtCreate_date
()
);
Predicate
predicate
=
criteriaBuilder
.
like
(
root
.
get
(
"mb109"
),
criteria
.
getMb109
()
+
"%"
);
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGtModi_date
()))
{
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGtEqCreateDate
()))
{
Predicate
predicate
=
criteriaBuilder
.
greaterThan
(
root
.
get
(
"modi_date"
),
criteria
.
getGtModi_date
());
Predicate
predicate
=
criteriaBuilder
.
greaterThanOrEqualTo
(
root
.
get
(
"createDate"
),
criteria
.
getGtEqCreateDate
());
predicates
.
add
(
predicate
);
}
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGtEqModiDate
()))
{
Predicate
predicate
=
criteriaBuilder
.
greaterThanOrEqualTo
(
root
.
get
(
"modiDate"
),
criteria
.
getGtEqModiDate
());
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
return
criteriaQuery
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
])).
getRestriction
();
return
criteriaQuery
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
])).
getRestriction
();
}
}
};
};
List
<
Invmb
>
list
=
invmbDao
.
findAll
(
query
);
Page
<
Invmb
>
list
=
invmbDao
.
findAll
(
query
,
criteria
.
toPageable
());
return
invmbMapper
.
toInvmbDtoList
(
list
);
List
<
InvmbDto
>
rstList
=
invmbMapper
.
toInvmbDtoList
(
list
.
toList
());
List
<
String
>
mb001List
=
rstList
.
stream
().
map
(
s
->
s
.
getMb001
()).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
Invml
>>
invmlMap
=
invmlDao
.
findByMl001InOrderByMl002AscMl003AscMl004Asc
(
mb001List
).
stream
().
collect
(
Collectors
.
groupingBy
(
s
->
s
.
getMl001
()));
rstList
.
forEach
(
i
->{
List
<
Invml
>
tempList
=
invmlMap
.
getOrDefault
(
i
.
getMb001
(),
new
ArrayList
<
Invml
>());
i
.
setInvmls
(
invmbMapper
.
toInvmlDto
(
tempList
));
});
return
rstList
;
}
}
public
List
<
InvmlDto
>
getInvmlList
(
InvmlCriteria
criteria
)
{
public
List
<
InvmlDto
>
getInvmlList
(
InvmlCriteria
criteria
)
{
...
...
src/main/java/com/topsunit/scanservice/ximai/service/MoctaService.java
View file @
5c56f43d
...
@@ -10,6 +10,8 @@ import com.topsunit.scanservice.ximai.entity.Mocta;
...
@@ -10,6 +10,8 @@ import com.topsunit.scanservice.ximai.entity.Mocta;
import
com.topsunit.scanservice.ximai.entity.Moctb
;
import
com.topsunit.scanservice.ximai.entity.Moctb
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Pageable
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -19,7 +21,9 @@ import javax.persistence.criteria.Predicate;
...
@@ -19,7 +21,9 @@ import javax.persistence.criteria.Predicate;
import
javax.persistence.criteria.Root
;
import
javax.persistence.criteria.Root
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Optional
;
import
java.util.Optional
;
import
java.util.stream.Collectors
;
/**
/**
* <p>Title: MoctaService</p>
* <p>Title: MoctaService</p>
...
@@ -68,19 +72,27 @@ public class MoctaService {
...
@@ -68,19 +72,27 @@ public class MoctaService {
Predicate
predicate
=
criteriaBuilder
.
equal
(
root
.
get
(
"ta001"
),
criteria
.
getTa001
()
);
Predicate
predicate
=
criteriaBuilder
.
equal
(
root
.
get
(
"ta001"
),
criteria
.
getTa001
()
);
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGt
Create_d
ate
()))
{
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGt
EqCreateD
ate
()))
{
Predicate
predicate
=
criteriaBuilder
.
greaterThan
(
root
.
get
(
"create_date"
),
criteria
.
getGtCreate_d
ate
());
Predicate
predicate
=
criteriaBuilder
.
greaterThan
OrEqualTo
(
root
.
get
(
"createDate"
),
criteria
.
getGtEqCreateD
ate
());
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGt
Modi_d
ate
()))
{
if
(
StringUtils
.
isNotBlank
(
criteria
.
getGt
EqModiD
ate
()))
{
Predicate
predicate
=
criteriaBuilder
.
greaterThan
(
root
.
get
(
"modi_date"
),
criteria
.
getGtModi_d
ate
());
Predicate
predicate
=
criteriaBuilder
.
greaterThan
OrEqualTo
(
root
.
get
(
"modiDate"
),
criteria
.
getGtEqModiD
ate
());
predicates
.
add
(
predicate
);
predicates
.
add
(
predicate
);
}
}
return
criteriaQuery
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
])).
getRestriction
();
return
criteriaQuery
.
where
(
predicates
.
toArray
(
new
Predicate
[
0
])).
getRestriction
();
}
}
};
};
List
<
Mocta
>
list
=
moctaDao
.
findAll
(
query
);
Pageable
pageable
=
criteria
.
toPageable
();
return
moctaMapper
.
toMoctaDtoList
(
list
);
Page
<
Mocta
>
list
=
moctaDao
.
findAll
(
query
,
pageable
);
List
<
MoctaDto
>
rstList
=
moctaMapper
.
toMoctaDtoList
(
list
.
toList
());
List
<
String
>
ta002List
=
rstList
.
stream
().
map
(
s
->
s
.
getTa002
()).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
Moctb
>>
moctbMap
=
moctbDao
.
findByTb002InOrderByTb003AscTb006Asc
(
ta002List
).
stream
().
collect
(
Collectors
.
groupingBy
(
s
->
s
.
getTb001
()+
s
.
getTb002
()));
rstList
.
forEach
(
i
->{
List
<
Moctb
>
tempList
=
moctbMap
.
getOrDefault
(
i
.
getTa001
()
+
i
.
getTa002
(),
new
ArrayList
<>());
i
.
setMoctbDtos
(
moctaMapper
.
toMoctbDto
(
tempList
));
});
return
rstList
;
}
}
...
...
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