Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
36c7037d
Commit
36c7037d
authored
Sep 22, 2023
by
tangwei
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
da861501
fbe6a474
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
130 additions
and
62 deletions
+130
-62
JpCollectorDto.java
...yeejoin/amos/boot/module/hygf/api/dto/JpCollectorDto.java
+7
-2
JpInverterDto.java
.../yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
+2
-0
JpCollectorMapper.xml
...api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
+1
-1
JpInverterMapper.xml
...-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
+1
-1
JpCollectorController.java
...oot/module/hygf/biz/controller/JpCollectorController.java
+75
-53
JpInverterController.java
...boot/module/hygf/biz/controller/JpInverterController.java
+26
-4
JpCollectorServiceImpl.java
.../module/hygf/biz/service/impl/JpCollectorServiceImpl.java
+3
-0
JpInverterElectricityServiceImpl.java
...gf/biz/service/impl/JpInverterElectricityServiceImpl.java
+11
-1
JpInverterServiceImpl.java
...t/module/hygf/biz/service/impl/JpInverterServiceImpl.java
+4
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpCollectorDto.java
View file @
36c7037d
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
package
com
.
yeejoin
.
amos
.
boot
.
module
.
hygf
.
api
.
dto
;
import
java.util.Date
;
import
java.util.List
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
io.swagger.annotations.ApiModelProperty
;
import
com.yeejoin.amos.boot.biz.common.dto.BaseDto
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
/**
/**
* 户用光伏监盘采集器表
* 户用光伏监盘采集器表
...
@@ -68,4 +71,6 @@ public class JpCollectorDto extends BaseDto {
...
@@ -68,4 +71,6 @@ public class JpCollectorDto extends BaseDto {
@ApiModelProperty
(
value
=
"电站地址"
)
@ApiModelProperty
(
value
=
"电站地址"
)
private
String
addr
;
private
String
addr
;
private
List
<
String
>
stationIds
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/java/com/yeejoin/amos/boot/module/hygf/api/dto/JpInverterDto.java
View file @
36c7037d
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
...
@@ -7,6 +7,7 @@ import com.yeejoin.amos.boot.biz.common.dto.BaseDto;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
lombok.EqualsAndHashCode
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
/**
/**
* 户用光伏监盘逆变器表
* 户用光伏监盘逆变器表
...
@@ -94,4 +95,5 @@ public class JpInverterDto extends BaseDto {
...
@@ -94,4 +95,5 @@ public class JpInverterDto extends BaseDto {
@ApiModelProperty
(
value
=
"所属电站"
)
@ApiModelProperty
(
value
=
"所属电站"
)
private
String
stationName
;
private
String
stationName
;
private
List
<
String
>
stationIds
;
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpCollectorMapper.xml
View file @
36c7037d
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpCollectorMapper"
>
<select
id=
"queryCollectorCountStatus"
resultType=
"
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
"
>
<select
id=
"queryCollectorCountStatus"
resultType=
"
Map
"
>
select
select
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-api/src/main/resources/mapper/mysql/JpInverterMapper.xml
View file @
36c7037d
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper"
>
<mapper
namespace=
"com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper"
>
<select
id=
"queryInverterCountStatus"
resultType=
"
com.yeejoin.amos.boot.module.hygf.api.dto.JpStationDto
"
>
<select
id=
"queryInverterCountStatus"
resultType=
"
Map
"
>
select
select
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpCollectorController.java
View file @
36c7037d
...
@@ -6,14 +6,22 @@ import io.swagger.annotations.Api;
...
@@ -6,14 +6,22 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpCollectorServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.TdHygfJpInverterWarnDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpPersonStationMapper
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -28,89 +36,103 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
...
@@ -28,89 +36,103 @@ import org.typroject.tyboot.core.foundation.enumeration.UserType;
@RequestMapping
(
value
=
"/jp-collector"
)
@RequestMapping
(
value
=
"/jp-collector"
)
public
class
JpCollectorController
extends
BaseController
{
public
class
JpCollectorController
extends
BaseController
{
@Autowired
@Autowired
JpCollectorServiceImpl
jpCollectorServiceImpl
;
JpCollectorServiceImpl
jpCollectorServiceImpl
;
/**
@Autowired
* 新增户用光伏监盘采集器表
JpPersonStationMapper
pPersonStationMapper
;
*
* @return
/**
*/
* 新增户用光伏监盘采集器表
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
*
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增户用光伏监盘采集器表"
,
notes
=
"新增户用光伏监盘采集器表"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增户用光伏监盘采集器表"
,
notes
=
"新增户用光伏监盘采集器表"
)
public
ResponseModel
<
JpCollectorDto
>
save
(
@RequestBody
JpCollectorDto
model
)
{
public
ResponseModel
<
JpCollectorDto
>
save
(
@RequestBody
JpCollectorDto
model
)
{
model
=
jpCollectorServiceImpl
.
createWithModel
(
model
);
model
=
jpCollectorServiceImpl
.
createWithModel
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
return
ResponseHelper
.
buildResponse
(
model
);
}
}
/**
/**
* 根据sequenceNbr更新
* 根据sequenceNbr更新
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@PutMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘采集器表"
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"根据sequenceNbr更新户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr更新户用光伏监盘采集器表"
)
public
ResponseModel
<
JpCollectorDto
>
updateBySequenceNbrJpCollector
(
@RequestBody
JpCollectorDto
model
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
public
ResponseModel
<
JpCollectorDto
>
updateBySequenceNbrJpCollector
(
@RequestBody
JpCollectorDto
model
,
model
.
setSequenceNbr
(
sequenceNbr
);
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
updateWithModel
(
model
));
model
.
setSequenceNbr
(
sequenceNbr
);
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
updateWithModel
(
model
));
}
}
/**
/**
* 根据sequenceNbr删除
* 根据sequenceNbr删除
*
*
* @param sequenceNbr 主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@DeleteMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr删除户用光伏监盘采集器表"
)
@ApiOperation
(
httpMethod
=
"DELETE"
,
value
=
"根据sequenceNbr删除户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr删除户用光伏监盘采集器表"
)
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
){
public
ResponseModel
<
Boolean
>
deleteBySequenceNbr
(
HttpServletRequest
request
,
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
removeById
(
sequenceNbr
));
@PathVariable
(
value
=
"sequenceNbr"
)
Long
sequenceNbr
)
{
}
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
removeById
(
sequenceNbr
));
}
/**
/**
* 根据sequenceNbr查询
* 根据sequenceNbr查询
*
*
* @param sequenceNbr
主键
* @param sequenceNbr 主键
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@GetMapping
(
value
=
"/{sequenceNbr}"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr查询单个户用光伏监盘采集器表"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据sequenceNbr查询单个户用光伏监盘采集器表"
,
notes
=
"根据sequenceNbr查询单个户用光伏监盘采集器表"
)
public
ResponseModel
<
JpCollectorDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
public
ResponseModel
<
JpCollectorDto
>
selectOne
(
@PathVariable
Long
sequenceNbr
)
{
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryBySeq
(
sequenceNbr
));
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryBySeq
(
sequenceNbr
));
}
}
/**
/**
* 列表分页查询
* 列表分页查询
*
*
* @param current 当前页
* @param current 当前页
* @param current 每页大小
* @param current 每页大小
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/page"
)
@GetMapping
(
value
=
"/page"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表分页查询"
,
notes
=
"户用光伏监盘采集器表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表分页查询"
,
notes
=
"户用光伏监盘采集器表分页查询"
)
public
ResponseModel
<
Page
<
JpCollectorDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
public
ResponseModel
<
Page
<
JpCollectorDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
(
value
=
"size"
)
int
size
,
JpCollectorDto
jpCollectorDto
)
{
@RequestParam
(
value
=
"size"
)
int
size
,
JpCollectorDto
jpCollectorDto
)
{
Page
<
JpCollectorDto
>
page
=
new
Page
<
JpCollectorDto
>();
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
page
.
setCurrent
(
current
);
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
page
.
setSize
(
size
);
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryForJpCollectorPage
(
page
,
jpCollectorDto
));
if
(!
pPersonStation
.
isEmpty
())
{
Page
<
JpCollectorDto
>
page
=
new
Page
<
JpCollectorDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
List
<
String
>
ids
=
pPersonStation
.
stream
().
map
(
i
->
i
.
getStationId
()).
collect
(
Collectors
.
toList
());
jpCollectorDto
.
setStationIds
(
ids
);
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryForJpCollectorPage
(
page
,
jpCollectorDto
));
}
else
{
return
ResponseHelper
.
buildResponse
(
new
Page
<
JpCollectorDto
>());
}
}
}
/**
/**
* 列表全部数据查询
* 列表全部数据查询
*
*
* @return
* @return
*/
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器表列表全部数据查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘采集器表列表全部数据查询"
,
notes
=
"户用光伏监盘采集器表列表全部数据查询"
)
@GetMapping
(
value
=
"/list"
)
@GetMapping
(
value
=
"/list"
)
public
ResponseModel
<
List
<
JpCollectorDto
>>
selectForList
()
{
public
ResponseModel
<
List
<
JpCollectorDto
>>
selectForList
()
{
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryForJpCollectorList
());
return
ResponseHelper
.
buildResponse
(
jpCollectorServiceImpl
.
queryForJpCollectorList
());
}
}
}
}
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/controller/JpInverterController.java
View file @
36c7037d
...
@@ -6,14 +6,22 @@ import io.swagger.annotations.Api;
...
@@ -6,14 +6,22 @@ import io.swagger.annotations.Api;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl
;
import
com.yeejoin.amos.boot.module.hygf.biz.service.impl.JpInverterServiceImpl
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpCollectorDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpPersonStation
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpPersonStationMapper
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
...
@@ -30,6 +38,10 @@ public class JpInverterController extends BaseController {
...
@@ -30,6 +38,10 @@ public class JpInverterController extends BaseController {
@Autowired
@Autowired
JpInverterServiceImpl
jpInverterServiceImpl
;
JpInverterServiceImpl
jpInverterServiceImpl
;
@Autowired
JpPersonStationMapper
pPersonStationMapper
;
/**
/**
* 新增户用光伏监盘逆变器表
* 新增户用光伏监盘逆变器表
...
@@ -98,10 +110,20 @@ public class JpInverterController extends BaseController {
...
@@ -98,10 +110,20 @@ public class JpInverterController extends BaseController {
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器表分页查询"
,
notes
=
"户用光伏监盘逆变器表分页查询"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"户用光伏监盘逆变器表分页查询"
,
notes
=
"户用光伏监盘逆变器表分页查询"
)
public
ResponseModel
<
Page
<
JpInverterDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
public
ResponseModel
<
Page
<
JpInverterDto
>>
queryForPage
(
@RequestParam
(
value
=
"current"
)
int
current
,
@RequestParam
(
value
=
"size"
)
int
size
,
JpInverterDto
jpInverterDto
)
{
@RequestParam
(
value
=
"size"
)
int
size
,
JpInverterDto
jpInverterDto
)
{
Page
<
JpInverterDto
>
page
=
new
Page
<
JpInverterDto
>();
page
.
setCurrent
(
current
);
LambdaQueryWrapper
<
JpPersonStation
>
qug
=
new
LambdaQueryWrapper
<>();
page
.
setSize
(
size
);
qug
.
eq
(
JpPersonStation:
:
getPersonId
,
getUserInfo
().
getUserId
());
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
queryForJpInverterPage
(
page
,
jpInverterDto
));
List
<
JpPersonStation
>
pPersonStation
=
pPersonStationMapper
.
selectList
(
qug
);
if
(!
pPersonStation
.
isEmpty
())
{
Page
<
JpInverterDto
>
page
=
new
Page
<
JpInverterDto
>();
page
.
setCurrent
(
current
);
page
.
setSize
(
size
);
List
<
String
>
ids
=
pPersonStation
.
stream
().
map
(
i
->
i
.
getStationId
()).
collect
(
Collectors
.
toList
());
jpInverterDto
.
setStationIds
(
ids
);
return
ResponseHelper
.
buildResponse
(
jpInverterServiceImpl
.
queryForJpInverterPage
(
page
,
jpInverterDto
));
}
else
{
return
ResponseHelper
.
buildResponse
(
new
Page
<
JpInverterDto
>());
}
}
}
/**
/**
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpCollectorServiceImpl.java
View file @
36c7037d
...
@@ -39,6 +39,9 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec
...
@@ -39,6 +39,9 @@ public class JpCollectorServiceImpl extends BaseService<JpCollectorDto, JpCollec
if
(
jpCollectorDto
.
getState
()
!=
null
)
{
if
(
jpCollectorDto
.
getState
()
!=
null
)
{
wrapper
.
eq
(
JpCollector:
:
getState
,
jpCollectorDto
.
getState
());
wrapper
.
eq
(
JpCollector:
:
getState
,
jpCollectorDto
.
getState
());
}
}
if
(!
jpCollectorDto
.
getStationIds
().
isEmpty
())
{
wrapper
.
in
(
JpCollector:
:
getThirdStationId
,
jpCollectorDto
.
getStationIds
());
}
entiryPage
=
(
Page
<
JpCollector
>)
this
.
page
(
entiryPage
,
wrapper
);
entiryPage
=
(
Page
<
JpCollector
>)
this
.
page
(
entiryPage
,
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
{
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
{
page
.
setTotal
(
entiryPage
.
getTotal
());
page
.
setTotal
(
entiryPage
.
getTotal
());
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterElectricityServiceImpl.java
View file @
36c7037d
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterElectricityDto;
...
@@ -8,6 +8,7 @@ import com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterElectricityDto;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.foundation.utils.Bean
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
...
@@ -24,6 +25,13 @@ import java.util.List;
...
@@ -24,6 +25,13 @@ import java.util.List;
public
class
JpInverterElectricityServiceImpl
public
class
JpInverterElectricityServiceImpl
extends
BaseService
<
JpInverterElectricityDto
,
JpInverterElectricity
,
JpInverterElectricityMapper
>
extends
BaseService
<
JpInverterElectricityDto
,
JpInverterElectricity
,
JpInverterElectricityMapper
>
implements
IJpInverterElectricityService
{
implements
IJpInverterElectricityService
{
@Autowired
private
JpStationServiceImpl
jpStationServiceImpl
;
@Autowired
private
JpInverterServiceImpl
JpInverterServiceImpl
;
/**
/**
* 分页查询
* 分页查询
*/
*/
...
@@ -35,8 +43,10 @@ public class JpInverterElectricityServiceImpl
...
@@ -35,8 +43,10 @@ public class JpInverterElectricityServiceImpl
* 列表查询 示例
* 列表查询 示例
*/
*/
public
List
<
JpInverterElectricityDto
>
queryForJpInverterElectricityList
(
String
id
)
{
public
List
<
JpInverterElectricityDto
>
queryForJpInverterElectricityList
(
String
id
)
{
JpInverter
jpInverter
=
JpInverterServiceImpl
.
getById
(
id
);
LambdaQueryWrapper
<
JpInverterElectricity
>
wrapper
=
new
LambdaQueryWrapper
<>();
LambdaQueryWrapper
<
JpInverterElectricity
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
JpInverterElectricity:
:
getInverterId
,
id
);
wrapper
.
eq
(
JpInverterElectricity:
:
getSnCode
,
jpInverter
.
getSnCode
());
wrapper
.
eq
(
JpInverterElectricity:
:
getThirdStationId
,
jpInverter
.
getThirdStationId
());
List
<
JpInverterElectricity
>
list
=
this
.
list
(
wrapper
);
List
<
JpInverterElectricity
>
list
=
this
.
list
(
wrapper
);
return
Bean
.
toModels
(
list
,
this
.
getModelClass
());
return
Bean
.
toModels
(
list
,
this
.
getModelClass
());
}
}
...
...
amos-boot-system-jxiop/amos-boot-module-hygf-biz/src/main/java/com/yeejoin/amos/boot/module/hygf/biz/service/impl/JpInverterServiceImpl.java
View file @
36c7037d
...
@@ -11,6 +11,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
...
@@ -11,6 +11,7 @@ import org.typroject.tyboot.core.rdbms.service.BaseService;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.dto.JpInverterDto
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpCollector
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.entity.JpInverter
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.mapper.JpInverterMapper
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService
;
import
com.yeejoin.amos.boot.module.hygf.api.service.IJpInverterService
;
...
@@ -36,6 +37,9 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
...
@@ -36,6 +37,9 @@ public class JpInverterServiceImpl extends BaseService<JpInverterDto, JpInverter
if
(
StringUtils
.
isNotEmpty
(
jpInverterDto
.
getSnCode
()))
{
if
(
StringUtils
.
isNotEmpty
(
jpInverterDto
.
getSnCode
()))
{
wrapper
.
likeRight
(
JpInverter:
:
getSnCode
,
jpInverterDto
.
getSnCode
());
wrapper
.
likeRight
(
JpInverter:
:
getSnCode
,
jpInverterDto
.
getSnCode
());
}
}
if
(!
jpInverterDto
.
getStationIds
().
isEmpty
())
{
wrapper
.
in
(
JpInverter:
:
getThirdStationId
,
jpInverterDto
.
getStationIds
());
}
wrapper
.
orderByDesc
(
JpInverter:
:
getUpdateTime
);
wrapper
.
orderByDesc
(
JpInverter:
:
getUpdateTime
);
entiryPage
=
(
Page
<
JpInverter
>)
this
.
page
(
entiryPage
,
wrapper
);
entiryPage
=
(
Page
<
JpInverter
>)
this
.
page
(
entiryPage
,
wrapper
);
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
{
if
(!
ValidationUtil
.
isEmpty
(
entiryPage
.
getRecords
()))
{
...
...
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