Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
gf_back
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
tianchao
gf_back
Commits
2f189e9f
Commit
2f189e9f
authored
Aug 25, 2023
by
ZWT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(能源管理系统): 系统开发
1.开发基础信息配置-市电峰谷配置模块删除功能,完成接口冒烟测试并生成接口文档; BREAKING CHANGE: 无 Closes 无 [skip ci]
parent
fa9e503f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
115 deletions
+38
-115
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePriceStrategyService.java
.../java/pps/core/base/service/BasePriceStrategyService.java
+27
-9
C09-base/pps-core-base/src/main/java/pps/core/base/service/data/base_price_strategy/DeleteBasePriceStrategyInput.java
...ata/base_price_strategy/DeleteBasePriceStrategyInput.java
+11
-106
No files found.
C09-base/pps-core-base/src/main/java/pps/core/base/service/BasePriceStrategyService.java
View file @
2f189e9f
...
@@ -130,15 +130,33 @@ public class BasePriceStrategyService {
...
@@ -130,15 +130,33 @@ public class BasePriceStrategyService {
@XApiPost
@XApiPost
@XText
(
"删除市电峰谷策略"
)
@XText
(
"删除市电峰谷策略"
)
public
XServiceResult
deleteBasePriceStrategy
(
XContext
context
,
DeleteBasePriceStrategyInput
input
)
{
public
XServiceResult
deleteBasePriceStrategy
(
XContext
context
,
DeleteBasePriceStrategyInput
input
)
{
BasePriceStrategyMapper
mapper
=
context
.
getBean
(
BasePriceStrategyMapper
.
class
);
// PpsUserSession session = context.getSession(PpsUserSession.class);
QueryWrapper
<
BasePriceStrategyEnt
>
queryWrapper
=
new
QueryWrapper
<>();
PpsUserSession
session
=
new
PpsUserSession
();
queryWrapper
.
lambda
().
eq
(
BasePriceStrategyEnt:
:
getId
,
input
.
getId
());
session
.
setId
(
"123"
);
BasePriceStrategyEnt
entity
=
mapper
.
selectOne
(
queryWrapper
);
session
.
setUserName
(
"ceshi"
);
if
(
entity
==
null
)
{
String
strategyId
=
input
.
getId
();
return
XServiceResult
.
error
(
context
,
XError
.
NotFound
);
//todo: 检查是否被其它功能引用
}
return
XTransactionHelper
.
begin
(
context
,
()
->
{
mapper
.
deleteById
(
entity
);
BasePriceStrategyMapper
mapper
=
context
.
getBean
(
BasePriceStrategyMapper
.
class
);
return
XServiceResult
.
OK
;
QueryWrapper
<
BasePriceStrategyEnt
>
queryWrapper
=
new
QueryWrapper
<>();
queryWrapper
.
lambda
().
eq
(
BasePriceStrategyEnt:
:
getId
,
strategyId
);
BasePriceStrategyEnt
entity
=
mapper
.
selectOne
(
queryWrapper
);
if
(
entity
==
null
)
{
return
XServiceResult
.
error
(
context
,
XError
.
NotFound
);
}
//删除月数据
BasePriceStrategyMonthMapper
monthMapper
=
context
.
getBean
(
BasePriceStrategyMonthMapper
.
class
);
monthMapper
.
delete
(
new
QueryWrapper
<
BasePriceStrategyMonthEnt
>()
.
lambda
()
.
eq
(
BasePriceStrategyMonthEnt:
:
getStrategyId
,
strategyId
));
//删除明细数据
BasePriceStrategyDetailMapper
detailMapper
=
context
.
getBean
(
BasePriceStrategyDetailMapper
.
class
);
detailMapper
.
delete
(
new
QueryWrapper
<
BasePriceStrategyDetailEnt
>()
.
lambda
()
.
eq
(
BasePriceStrategyDetailEnt:
:
getStrategyId
,
strategyId
));
mapper
.
deleteById
(
entity
);
return
XServiceResult
.
OK
;
});
}
}
@XApiAnonymous
@XApiAnonymous
...
...
C09-base/pps-core-base/src/main/java/pps/core/base/service/data/base_price_strategy/DeleteBasePriceStrategyInput.java
View file @
2f189e9f
package
pps.core.base.service.data.base_price_strategy
;
package
pps.core.base.service.data.base_price_strategy
;
import
lombok.Data
;
import
xstartup.annotation.XText
;
import
xstartup.annotation.XText
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* 删除市电峰谷配置入参
*
* @author ZWT
* @date 2023/08/25
*/
@Data
public
class
DeleteBasePriceStrategyInput
{
public
class
DeleteBasePriceStrategyInput
{
@XText
(
"ID"
)
@XText
(
"ID"
)
private
String
id
;
private
String
id
;
...
@@ -43,109 +53,4 @@ public class DeleteBasePriceStrategyInput {
...
@@ -43,109 +53,4 @@ public class DeleteBasePriceStrategyInput {
@XText
(
"固定电价"
)
@XText
(
"固定电价"
)
private
BigDecimal
fixedElectricityPrice
;
private
BigDecimal
fixedElectricityPrice
;
public
String
getId
()
{
return
this
.
id
;
}
public
void
setId
(
String
value
)
{
this
.
id
=
value
;
}
public
Integer
getIsDeleted
()
{
return
this
.
isDeleted
;
}
public
void
setIsDeleted
(
Integer
value
)
{
this
.
isDeleted
=
value
;
}
public
String
getCreateById
()
{
return
this
.
createById
;
}
public
void
setCreateById
(
String
value
)
{
this
.
createById
=
value
;
}
public
String
getCreateByName
()
{
return
this
.
createByName
;
}
public
void
setCreateByName
(
String
value
)
{
this
.
createByName
=
value
;
}
public
Date
getCreateTime
()
{
return
this
.
createTime
;
}
public
void
setCreateTime
(
Date
value
)
{
this
.
createTime
=
value
;
}
public
String
getModifyById
()
{
return
this
.
modifyById
;
}
public
void
setModifyById
(
String
value
)
{
this
.
modifyById
=
value
;
}
public
String
getModifyByName
()
{
return
this
.
modifyByName
;
}
public
void
setModifyByName
(
String
value
)
{
this
.
modifyByName
=
value
;
}
public
Date
getModifyTime
()
{
return
this
.
modifyTime
;
}
public
void
setModifyTime
(
Date
value
)
{
this
.
modifyTime
=
value
;
}
public
String
getPolicyName
()
{
return
this
.
policyName
;
}
public
void
setPolicyName
(
String
value
)
{
this
.
policyName
=
value
;
}
public
String
getAreaCode
()
{
return
this
.
areaCode
;
}
public
void
setAreaCode
(
String
value
)
{
this
.
areaCode
=
value
;
}
public
Integer
getStrategyYear
()
{
return
this
.
strategyYear
;
}
public
void
setStrategyYear
(
Integer
value
)
{
this
.
strategyYear
=
value
;
}
public
Integer
getIsFixedPrice
()
{
return
this
.
isFixedPrice
;
}
public
void
setIsFixedPrice
(
Integer
value
)
{
this
.
isFixedPrice
=
value
;
}
public
BigDecimal
getFixedElectricityPrice
()
{
return
this
.
fixedElectricityPrice
;
}
public
void
setFixedElectricityPrice
(
BigDecimal
value
)
{
this
.
fixedElectricityPrice
=
value
;
}
}
}
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