Commit 29fb020d authored by 朱晨阳's avatar 朱晨阳

电站管理列表接口修改

parent bb908675
...@@ -101,4 +101,6 @@ public class PowerStationDto extends BaseDto { ...@@ -101,4 +101,6 @@ public class PowerStationDto extends BaseDto {
private String realScale; private String realScale;
@ApiModelProperty(value = "省份") @ApiModelProperty(value = "省份")
private String province; private String province;
@ApiModelProperty(value = "制单日期")
private String creatorTime;
} }
...@@ -23,8 +23,9 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> { ...@@ -23,8 +23,9 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> {
@Param("regionalCompaniesName") String regionalCompaniesName, @Param("processStatus") String processStatus, @Param("regionalCompaniesName") String regionalCompaniesName, @Param("processStatus") String processStatus,
@Param("province") String province, @Param("province") String province,
@Param("projectAddress") String projectAddress, @Param("projectAddress") String projectAddress,
@Param("status") String status); @Param("status") String status,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
String getInstanceIdByhouseId(String peasantHouseholdId); String getInstanceIdByhouseId(String peasantHouseholdId);
List<Map<String, Object>> getKcCreateTime(); List<Map<String, Object>> getKcCreateTime();
......
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
ph.project_address_detail, ph.project_address_detail,
SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province, SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province,
lc.stamp_status, lc.stamp_status,
lc.status lc.status,
hsi.creator_time
FROM FROM
hygf_power_station ps hygf_power_station ps
LEFT JOIN ( LEFT JOIN (
...@@ -56,6 +57,7 @@ ...@@ -56,6 +57,7 @@
ON lc.peasant_household_id = ps.peasant_household_id ON lc.peasant_household_id = ps.peasant_household_id
LEFT JOIN hygf_peasant_household ph LEFT JOIN hygf_peasant_household ph
ON ph.sequence_nbr = ps.peasant_household_id ON ph.sequence_nbr = ps.peasant_household_id
LEFT JOIN (select sequence_nbr, creator_time from hygf_survey_information ) hsi on ph.survey_information_id = hsi.sequence_nbr
WHERE WHERE
ps.is_delete = 0 ps.is_delete = 0
<if test="powerStationCode != null and powerStationCode != ''"> <if test="powerStationCode != null and powerStationCode != ''">
...@@ -85,6 +87,12 @@ ...@@ -85,6 +87,12 @@
<if test="status != null and status != ''"> <if test="status != null and status != ''">
AND lc.status = #{status} AND lc.status = #{status}
</if> </if>
<if test="startTime != null and startTime != ''">
AND hsi.creator_time &gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
AND hsi.creator_time &lt;= #{endTime}
</if>
ORDER BY ps.rec_date DESC ORDER BY ps.rec_date DESC
</select> </select>
<select id="getInstanceIdByhouseId" resultType="java.lang.String"> <select id="getInstanceIdByhouseId" resultType="java.lang.String">
......
...@@ -107,12 +107,14 @@ public class PowerStationController extends BaseController { ...@@ -107,12 +107,14 @@ public class PowerStationController extends BaseController {
@RequestParam(value = "regionalCompaniesName",required = false)String regionalCompaniesName, @RequestParam(value = "regionalCompaniesName",required = false)String regionalCompaniesName,
@RequestParam(value = "province",required = false)String province, @RequestParam(value = "province",required = false)String province,
@RequestParam(value = "projectAddress",required = false)String projectAddress, @RequestParam(value = "projectAddress",required = false)String projectAddress,
@RequestParam(value = "status",required = false)String status) { @RequestParam(value = "status",required = false)String status,
@RequestParam(value = "startTime",required = false)String startTime,
@RequestParam(value = "endTime",required = false)String endTime) {
Page<PowerStationDto> page = new Page<PowerStationDto>(); Page<PowerStationDto> page = new Page<PowerStationDto>();
page.setCurrent(current); page.setCurrent(current);
page.setSize(size); page.setSize(size);
AgencyUserModel userInfo = getUserInfo(); AgencyUserModel userInfo = getUserInfo();
return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo,serviceAgent,regionalCompaniesName,processStatus,province, projectAddress, status)); return ResponseHelper.buildResponse(powerStationServiceImpl.queryForPowerStationUserRoles(page,powerStationCode,ownersName,userInfo,serviceAgent,regionalCompaniesName,processStatus,province, projectAddress, status, startTime, endTime));
} }
/** /**
......
...@@ -98,7 +98,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -98,7 +98,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
private RedisLockUtil redisLockUtil; private RedisLockUtil redisLockUtil;
public Page<PowerStationDto> queryForPowerStationUserRoles(Page<PowerStationDto> page, String powerStationCode, public Page<PowerStationDto> queryForPowerStationUserRoles(Page<PowerStationDto> page, String powerStationCode,
String ownersName, AgencyUserModel userInfo, String serviceAgent, String regionalCompaniesName, String processStatus,String province, String projectAddress, String status) { String ownersName, AgencyUserModel userInfo, String serviceAgent, String regionalCompaniesName, String processStatus,String province, String projectAddress, String status, String startTime, String endTime) {
// Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles(); // Map<Long, List<RoleModel>> orgRoles = userInfo.getOrgRoles();
// Collection<List<RoleModel>> roleModels = orgRoles.values(); // Collection<List<RoleModel>> roleModels = orgRoles.values();
// if(roleModels !=null){ // if(roleModels !=null){
...@@ -124,7 +124,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -124,7 +124,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent); // this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
Page<PowerStationDto> powerStationDtoPage = this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName, Page<PowerStationDto> powerStationDtoPage = this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName,
serviceAgent, regionalCompaniesName, processStatus,province, projectAddress, status); serviceAgent, regionalCompaniesName, processStatus,province, projectAddress, status, startTime, endTime);
// if(powerStationDtoPage.getRecords() != null && powerStationDtoPage.getRecords().size() > 0) { // if(powerStationDtoPage.getRecords() != null && powerStationDtoPage.getRecords().size() > 0) {
// powerStationDtoPage.getRecords().forEach(e -> { // powerStationDtoPage.getRecords().forEach(e -> {
...@@ -170,10 +170,10 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS ...@@ -170,10 +170,10 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 查询电站审核记录 // 查询电站审核记录
public Page<PowerStationDto> queryPage(int current, int size, String powerStationCode, String ownersName, public Page<PowerStationDto> queryPage(int current, int size, String powerStationCode, String ownersName,
String serviceAgent,String regionalCompaniesName,String processStatus,String province,String projectAddress, String status) { String serviceAgent,String regionalCompaniesName,String processStatus,String province,String projectAddress, String status, String startTime, String endTime) {
PageHelper.startPage(current, size); PageHelper.startPage(current, size);
List<PowerStationDto> list = powerStationMapper.queryPage(powerStationCode, ownersName, serviceAgent,regionalCompaniesName,processStatus,province, projectAddress, status); List<PowerStationDto> list = powerStationMapper.queryPage(powerStationCode, ownersName, serviceAgent,regionalCompaniesName,processStatus,province, projectAddress, status, startTime, endTime);
PageInfo<PowerStationDto> pages = new PageInfo(list); PageInfo<PowerStationDto> pages = new PageInfo(list);
com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto>(); com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto> pagenew = new com.baomidou.mybatisplus.extension.plugins.pagination.Page<PowerStationDto>();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment