Commit 30d109a0 authored by tangwei's avatar tangwei

修改并网列表

parent 9e7f618b
......@@ -29,7 +29,7 @@ public class BasicGridAcceptanceDto extends BaseDto {
private Long peasantHouseholdId;
@ApiModelProperty(value = "并网状态")
private String stringQuantity;
private String gridStatus;
@ApiModelProperty(value = "验收状态")
private String acceptanceStatus;
......@@ -59,5 +59,15 @@ public class BasicGridAcceptanceDto extends BaseDto {
//下个节点key
private String nextNodeKey;
private String gridStatus;
//电站编号
private String peasantHouseholdNo;
//户主姓名
private String ownersName;
///项目地址
private String projectAddressName;
//并网日期
private Date gridConnectionTime;
}
......@@ -14,26 +14,37 @@
<select id="selectPageList" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.BasicGridAcceptanceDto">
SELECT
hogaa
hps.power_station_code AS powerStationCode,
hph.owners_name AS ownersName,
hps.power_station_type AS powerStationType,
hps.power_station_type AS projectAddress,
hbga.sequence_nbr sequenceNbr,
hbga.work_order_id workOrderId,
hbga.work_order_power_station_id workOrderPowerStationId,
hbga.peasant_household_id peasantHouseholdId,
hbga.acceptance_rec_date acceptanceRecDate,
hbga.instance_id instanceId,
hbga.next_executor_ids nextExecutorIds,
hbga.next_node_key,
hph.owners_name AS ownersName,
hph.peasant_household_no peasantHouseholdNo,
hph.project_address_name projectAddressName,
DATE_FORMAT(hogaa.grid_connection_time, '%Y-%m-%d') AS gridConnectionTime,
CASE WHEN hbga.grid_status = '1' THEN '待登记'
WHEN hbga.grid_status = '2' THEN '待审核'
WHEN hbga.grid_status = '3' THEN '已完成'
ELSE '未通过' END AS gridStatus,
CASE WHEN hbga.grid_status = '2' THEN '待审核'
WHEN hbga.grid_status = '3' THEN '已完成'
ELSE '未通过' END AS gridCheckStatus
ELSE '未通过' END AS gridStatus
FROM
hygf_basic_grid_acceptance hbga
LEFT JOIN hygf_peasant_household hph ON hph.sequence_nbr = hbga.peasant_household_id
LEFT JOIN hygf_on_grid_and_acceptance hogaa ON hogaa.work_order_power_station_id = hbga.work_order_power_station_id
LEFT JOIN hygf_power_station hps ON hps.peasant_household_id = hph.sequence_nbr
LEFT JOIN hygf_work_order ON hygf_work_order.sequence_nbr = hbga.work_order_id
<where>
hogaa.is_delete = 0
hbga.is_delete = 0
<if test="map.amosDealerId!=null and map.amosDealerId!=''">
and hygf_work_order.amos_dealer_id = #{map.amosDealerId}
</if>
<if test="map.regionCompanyId!=null and map.regionCompanyId!=''">
and hygf_work_order.region_company_id =#{map.regionCompanyId}
</if>
<if test="map.formType != null and map.formType!=''">
AND hbga.grid_status IN ('2', '3', '4')
</if>
......
......@@ -2,11 +2,13 @@ package com.yeejoin.amos.boot.module.hygf.biz.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.yeejoin.amos.boot.module.hygf.api.Enum.GridStatusEnum;
import com.yeejoin.amos.boot.module.hygf.api.dto.UserUnitInformationDto;
import com.yeejoin.amos.boot.module.hygf.api.entity.BasicGridAcceptance;
import com.yeejoin.amos.boot.module.hygf.api.entity.HygfOnGrid;
import com.yeejoin.amos.boot.module.hygf.api.entity.PeasantHousehold;
import com.yeejoin.amos.boot.module.hygf.api.mapper.BasicGridAcceptanceMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.HygfOnGridMapper;
import com.yeejoin.amos.boot.module.hygf.api.mapper.PersonnelBusinessMapper;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import io.swagger.annotations.ApiOperation;
......@@ -48,6 +50,9 @@ public class BasicGridAcceptanceController extends BaseController {
@Autowired
HygfOnGridMapper onGridMapper;
@Autowired
PersonnelBusinessMapper personnelBusinessMapper;
/**
* 新增
*
......@@ -119,12 +124,14 @@ public class BasicGridAcceptanceController extends BaseController {
@ApiOperation(httpMethod = "GET",value = "分页查询", notes = "分页查询")
public ResponseModel<Page<BasicGridAcceptanceDto>> queryForPage(@RequestParam(value = "current") int current,
@RequestParam(value = "size") int size,
@RequestParam(value = "projectAddress") String projectAddress,
@RequestParam(value = "powerStationCode") String powerStationCode,
@RequestParam(value = "ownersName") String ownersName,
@RequestParam(value = "gridStatus") String gridStatus,
@RequestParam(value = "gridConnectionTime") Date gridConnectionTime) {
Page<BasicGridAcceptanceDto> page = basicGridAcceptanceServiceImpl.selectPage(current, size, projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "");
@RequestParam(required = false,value = "projectAddress") String projectAddress,
@RequestParam(required = false,value = "powerStationCode") String powerStationCode,
@RequestParam(required = false,value = "ownersName") String ownersName,
@RequestParam(required = false,value = "gridStatus") String gridStatus,
@RequestParam(required = false,value = "gridConnectionTime") Date gridConnectionTime) {
//当前登录人所属场站
UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
Page<BasicGridAcceptanceDto> page = basicGridAcceptanceServiceImpl.selectPage(userUnitInformationDto.getRegionalCompaniesSeq(),userUnitInformationDto.getAmosDealerId(),current, size, projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "");
return ResponseHelper.buildResponse(page);
}
......@@ -145,7 +152,10 @@ public class BasicGridAcceptanceController extends BaseController {
@RequestParam(value = "ownersName") String ownersName,
@RequestParam(value = "gridStatus") String gridStatus,
@RequestParam(value = "gridConnectionTime") Date gridConnectionTime) {
Page<BasicGridAcceptanceDto> page = basicGridAcceptanceServiceImpl.selectPage(current, size, projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "check");
//当前登录人所属场站
UserUnitInformationDto userUnitInformationDto=personnelBusinessMapper.getUserUnitInformationDto( getUserInfo().getUserId());
Page<BasicGridAcceptanceDto> page = basicGridAcceptanceServiceImpl.selectPage(userUnitInformationDto.getRegionalCompaniesSeq(),userUnitInformationDto.getAmosDealerId(),current, size, projectAddress, powerStationCode, ownersName, gridStatus, gridConnectionTime, "check");
return ResponseHelper.buildResponse(page);
}
......
......@@ -25,7 +25,7 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
@Autowired
BasicGridAcceptanceMapper basicGridAcceptanceMapper;
public Page<BasicGridAcceptanceDto> selectPage(int current, int size, String projectAddress, String powerStationCode, String ownersName, String gridStatus, Date gridConnectionTime, String formType) {
public Page<BasicGridAcceptanceDto> selectPage(Long regionCompanyId ,Long amosDealerId ,int current, int size, String projectAddress, String powerStationCode, String ownersName, String gridStatus, Date gridConnectionTime, String formType) {
PageHelper.startPage(current, size);
Map<String, Object> map = new HashMap<>();
map.put("projectAddress", projectAddress);
......@@ -34,6 +34,8 @@ public class BasicGridAcceptanceServiceImpl extends BaseService<BasicGridAccepta
map.put("gridStatus", gridStatus);
map.put("gridConnectionTime", gridConnectionTime);
map.put("formType", formType);
map.put("regionCompanyId", regionCompanyId);
map.put("amosDealerId", amosDealerId);
List<BasicGridAcceptanceDto> list = basicGridAcceptanceMapper.selectPageList(map);
PageInfo<BasicGridAcceptanceDto> page = new PageInfo(list);
Page<BasicGridAcceptanceDto> pageNew = new Page<>();
......
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