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

电站管理列表接口修改

parent bb908675
......@@ -101,4 +101,6 @@ public class PowerStationDto extends BaseDto {
private String realScale;
@ApiModelProperty(value = "省份")
private String province;
@ApiModelProperty(value = "制单日期")
private String creatorTime;
}
......@@ -23,8 +23,9 @@ public interface PowerStationMapper extends BaseMapper<PowerStation> {
@Param("regionalCompaniesName") String regionalCompaniesName, @Param("processStatus") String processStatus,
@Param("province") String province,
@Param("projectAddress") String projectAddress,
@Param("status") String status);
@Param("status") String status,
@Param("startTime") String startTime,
@Param("endTime") String endTime);
String getInstanceIdByhouseId(String peasantHouseholdId);
List<Map<String, Object>> getKcCreateTime();
......
......@@ -34,7 +34,8 @@
ph.project_address_detail,
SUBSTRING_INDEX(ph.project_address_name, '/', 1) AS province,
lc.stamp_status,
lc.status
lc.status,
hsi.creator_time
FROM
hygf_power_station ps
LEFT JOIN (
......@@ -56,6 +57,7 @@
ON lc.peasant_household_id = ps.peasant_household_id
LEFT JOIN hygf_peasant_household ph
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
ps.is_delete = 0
<if test="powerStationCode != null and powerStationCode != ''">
......@@ -85,6 +87,12 @@
<if test="status != null and status != ''">
AND lc.status = #{status}
</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
</select>
<select id="getInstanceIdByhouseId" resultType="java.lang.String">
......
......@@ -107,12 +107,14 @@ public class PowerStationController extends BaseController {
@RequestParam(value = "regionalCompaniesName",required = false)String regionalCompaniesName,
@RequestParam(value = "province",required = false)String province,
@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.setCurrent(current);
page.setSize(size);
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
private RedisLockUtil redisLockUtil;
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();
// Collection<List<RoleModel>> roleModels = orgRoles.values();
// if(roleModels !=null){
......@@ -124,7 +124,7 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
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) {
// powerStationDtoPage.getRecords().forEach(e -> {
......@@ -170,10 +170,10 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// 查询电站审核记录
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);
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);
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