Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cloud-fb
Overview
Overview
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
王衍超
cloud-fb
Commits
7e601607
Commit
7e601607
authored
Apr 28, 2021
by
高晓磊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
价格增加生效状态的筛选条件
parent
5aad3c9b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
5 deletions
+33
-5
PriceAdjustmentSearchEntity.java
.../xyst/dinas/price/entity/PriceAdjustmentSearchEntity.java
+9
-0
PriceAdjustmentDaoImpl.java
...xyst/dinas/price/internal/dao/PriceAdjustmentDaoImpl.java
+0
-0
PriceAdjustmentServiceImpl.java
...as/price/internal/service/PriceAdjustmentServiceImpl.java
+4
-2
PriceAdjustmentController.java
...a/com/xyst/dinas/price/web/PriceAdjustmentController.java
+20
-3
No files found.
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/entity/PriceAdjustmentSearchEntity.java
View file @
7e601607
...
...
@@ -12,6 +12,7 @@ import java.util.UUID;
*/
public
class
PriceAdjustmentSearchEntity
<
T
>
extends
Page
<
T
>
{
private
Integer
applyStatus
;
private
Integer
adjustmentStatus
;
private
List
<
UUID
>
stationIds
;
private
List
<
UUID
>
regionalCompanyIds
;
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
...
...
@@ -79,4 +80,12 @@ public class PriceAdjustmentSearchEntity<T> extends Page<T> {
public
void
setApplyEndDate
(
Date
applyEndDate
)
{
this
.
applyEndDate
=
applyEndDate
;
}
public
Integer
getAdjustmentStatus
()
{
return
adjustmentStatus
;
}
public
void
setAdjustmentStatus
(
Integer
adjustmentStatus
)
{
this
.
adjustmentStatus
=
adjustmentStatus
;
}
}
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/internal/dao/PriceAdjustmentDaoImpl.java
View file @
7e601607
This diff is collapsed.
Click to expand it.
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/internal/service/PriceAdjustmentServiceImpl.java
View file @
7e601607
...
...
@@ -8,6 +8,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentEchartReturnEntity;
import
com.xyst.dinas.price.entity.PriceAdjustmentEchartSearchEntity
;
import
com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity
;
import
com.xyst.dinas.price.entity.StationDinasTypePriceDetail
;
import
com.xyst.dinas.price.enumeration.PriceAdjustmentAdjustmentStatusEnum
;
import
com.xyst.dinas.price.service.PriceAdjustmentService
;
import
com.xyst.dinas.price.service.RegionalCompanyPriceAuthorityService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -139,8 +140,9 @@ public class PriceAdjustmentServiceImpl implements PriceAdjustmentService {
return
;
}
for
(
KObject
kObject
:
kObjects
)
{
kObject
.
set
(
"applyStatus"
,
BizProcessState
.
DONE_WITH_REJECT
.
getValue
());
kObject
.
set
(
"failureReason"
,
"本条数据所属生效日已有新记录审批通过,本条系统自动驳回"
);
// kObject.set("applyStatus", BizProcessState.DONE_WITH_REJECT.getValue());
kObject
.
set
(
"adjustmentStatus"
,
PriceAdjustmentAdjustmentStatusEnum
.
ABOLITION
.
getValue
());
// kObject.set("failureReason", "本条数据所属生效日已有新记录审批通过,本条系统自动废弃");
priceAdjustmentDao
.
modify
(
kObject
);
}
...
...
backend/xyst.dinas.price/src/main/java/com/xyst/dinas/price/web/PriceAdjustmentController.java
View file @
7e601607
...
...
@@ -16,6 +16,7 @@ import com.xyst.dinas.price.entity.PriceAdjustmentSearchEntity;
import
com.xyst.dinas.price.service.PriceAdjustmentService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.util.CollectionUtils
;
import
org.springframework.web.bind.annotation.*
;
...
...
@@ -215,13 +216,29 @@ public class PriceAdjustmentController {
*/
@GetMapping
(
"getSameMessage"
)
public
ResponseObj
getSameAdjustmentDateAndLtCreateDateInfo
(
Date
adjustmentDate
,
Date
createTime
,
UUID
stationId
){
public
ResponseObj
getSameAdjustmentDateAndLtCreateDateInfo
(
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@RequestParam
(
"adjustmentDate"
)
Date
adjustmentDate
,
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@RequestParam
(
"createTime"
)
Date
createTime
,
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd"
)
@RequestParam
(
"stationId"
)
UUID
stationId
){
List
<
KObject
>
sameAdjustmentDateAndLtCreateDateInfo
=
priceAdjustmentService
.
getSameAdjustmentDateAndLtCreateDateInfo
(
adjustmentDate
,
createTime
,
stationId
);
if
(
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
String
formart1DateString
=
DateTimeUtils
.
getFormart1DateString
(
adjustmentDate
);
String
message
=
"检查到该场站生效日期为["
+
formart1DateString
+
"]下有"
+
sameAdjustmentDateAndLtCreateDateInfo
.
size
()+
"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为驳回"
;
return
ResponseObj
.
success
(
message
,
sameAdjustmentDateAndLtCreateDateInfo
);
String
message
=
"检查到该场站生效日期为["
+
formart1DateString
+
"]下有"
+
sameAdjustmentDateAndLtCreateDateInfo
.
size
()+
"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效"
;
return
ResponseObj
.
error
(
message
,
sameAdjustmentDateAndLtCreateDateInfo
);
}
return
ResponseObj
.
success
();
}
/**
* 数据相同时候的提示
* @return
*/
@GetMapping
(
"getSameMessageById"
)
public
ResponseObj
getSameById
(
@RequestParam
(
"id"
)
UUID
id
){
KObject
byId
=
priceAdjustmentService
.
getById
(
id
);
List
<
KObject
>
sameAdjustmentDateAndLtCreateDateInfo
=
priceAdjustmentService
.
getSameAdjustmentDateAndLtCreateDateInfo
(
byId
.
getDate
(
"adjustmentDate"
),
byId
.
getDate
(
"createTime"
)
,
byId
.
get
(
"station"
).
getUuid
(
"Id"
));
if
(
CollectionUtils
.
isEmpty
(
sameAdjustmentDateAndLtCreateDateInfo
)){
String
formart1DateString
=
DateTimeUtils
.
getFormart1DateString
(
byId
.
getDate
(
"adjustmentDate"
));
String
message
=
"检查到该场站生效日期为["
+
formart1DateString
+
"]下有"
+
sameAdjustmentDateAndLtCreateDateInfo
.
size
()+
"条早先创建并审批通过的记录,当该记录提交审批通过后,会将其它记录置为失效"
;
return
ResponseObj
.
error
(
message
,
sameAdjustmentDateAndLtCreateDateInfo
);
}
return
ResponseObj
.
success
();
}
...
...
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