Commit b666c0df authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer' into developer

parents a24b3ad2 56677fe9
......@@ -73,4 +73,7 @@ public class BasicGridAcceptanceDto extends BaseDto {
//并网登记id
private Long fonGridId;
// 电站安装规模(kW)
private String scale;
}
......@@ -158,6 +158,12 @@ public class HygfIcbcRecordDTO {
* */
@ApiModelProperty(value = "区域公司名称")
private String regionalCompaniesName;
/*
* 商务信息-电站安装规模
* */
@ApiModelProperty(value = "电站安装规模(kW)")
private String scale;
}
}
\ No newline at end of file
......@@ -94,4 +94,7 @@ public class PowerStationDto extends BaseDto {
@ApiModelProperty(value = "合同状态")
private String status;
@ApiModelProperty(value = "电站安装规模")
private String scale;
}
......@@ -257,4 +257,7 @@ public class HouseholdContract extends BaseEntity {
//查询一个农户拥有的合同是否全是已废弃
@TableField(exist = false)
private Boolean isAllDisuse;
@TableField(exist = false)
private String scale;
}
......@@ -215,4 +215,10 @@ public class PeasantHousehold extends BaseEntity {
*/
@TableField(exist = false)
private Integer isAllRevoke;
/**
* 商务信息安装规模
*/
@TableField(exist = false)
private String scale;
}
......@@ -19,4 +19,6 @@ public interface HouseholdContractMapper extends BaseMapper<HouseholdContract> {
@UserEmpower(field ={"hygf_household_contract.regional_companies_code"} ,dealerField={"dealer_code","hygf_household_contract.regional_companies_code","developer_user_id"} ,fieldConditions ={"eq","in","eq"} ,relationship="and")
IPage<HouseholdContract> selectPage(@Param("dto") HouseholdContractPageDto dto);
String getHygfCommercialScale(String peasantHouseholdNumber);
}
......@@ -50,4 +50,6 @@ public interface PeasantHouseholdMapper extends BaseMapper<PeasantHousehold> {
void deleteHphByNo(String peasantHouseholdNo);
void deleteHhcByNo(String peasantHouseholdNo);
String getHygfCommercialScale(Long surveyInformationId);
}
......@@ -53,4 +53,10 @@
ORDER BY hygf_household_contract.rec_date DESC, hygf_household_contract.${orderBy} ${dto.isAsc}
</if>
</select>
<select id="getHygfCommercialScale" resultType="String">
select scale from hygf_commercial where survey_information_id = (select survey_information_id from hygf_peasant_household where peasant_household_no = #{peasantHouseholdNumber} )
</select>
</mapper>
......@@ -133,4 +133,8 @@ on hygf_document_station.preparation_money_id=hygf_preparation_money.sequence_nb
<select id="deleteHhcByNo">
DELETE FROM hygf_household_contract WHERE peasant_household_number=#{peasantHouseholdNo}
</select>
<select id="getHygfCommercialScale" resultType="String">
select scale from hygf_commercial where survey_information_id=${surveyInformationId}
</select>
</mapper>
......@@ -54,6 +54,8 @@ public class BasicGridAcceptanceServiceImpl
@Autowired
PeasantHouseholdMapper peasantHouseholdMapper;
@Autowired
HouseholdContractMapper householdContractMapper;
@Autowired
private CommonServiceImpl commonService;
private final String OK = "0";
......@@ -82,6 +84,15 @@ public class BasicGridAcceptanceServiceImpl
pageNew.setCurrent(current);
pageNew.setTotal(page.getTotal());
pageNew.setSize(size);
if(page.getList() != null && page.getList().size() > 0) {
page.getList().forEach(e -> {
if(e.getPeasantHouseholdNo() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
}
});
}
pageNew.setRecords(page.getList());
return pageNew;
}
......
......@@ -93,6 +93,16 @@ public class HouseholdContractServiceImpl extends BaseService<HouseholdContractD
// }
IPage<HouseholdContract> warningQuestionInfoIPage = householdContractMapper.selectPage(dto);
if(warningQuestionInfoIPage.getRecords() != null && warningQuestionInfoIPage.getRecords().size() > 0) {
warningQuestionInfoIPage.getRecords().forEach(e -> {
if(e.getPeasantHouseholdNumber() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNumber()));
}
});
}
return warningQuestionInfoIPage;
}
......
......@@ -22,6 +22,8 @@ import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.yeejoin.amos.boot.module.hygf.api.mapper.HouseholdContractMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils;
......@@ -62,6 +64,9 @@ import lombok.extern.slf4j.Slf4j;
@Service
@Slf4j
public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbcRecord, HygfIcbcRecordMapper>
implements IHygfIcbcService {
private static final String trxChannel = "05"; // 05表示小程序
......@@ -126,6 +131,9 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
@Resource(type = HygfIcbcRecordMapper.class)
private HygfIcbcRecordMapper hygfIcbcRecordMapper;
@Resource(type = HouseholdContractMapper.class)
private HouseholdContractMapper householdContractMapper;
@Resource(type = HygfIcbcRequestMapper.class)
private HygfIcbcRequestMapper hygfIcbcRequestMapper;
......@@ -412,6 +420,15 @@ public class HygfIcbcServiceImpl extends BaseService<HygfIcbcRecordDTO, HygfIcbc
Map<String, List<PeasantHousehold>> peasantHouseholdMap = peasantHouseholds.stream()
.collect(Collectors.groupingBy(PeasantHousehold::getAmosUserId));// 根据农户 ID 分组
List<PeasantHousehold> peasantHouseholdList = peasantHouseholdMap.get(amosUserId);
if(peasantHouseholdList != null && peasantHouseholdList.size() > 0) {
peasantHouseholdList.forEach(e -> {
if(e.getSurveyInformationId() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPeasantHouseholdNo()));
}
});
}
hygfIcbcRecordDTO.setPeasantHouseholds(
Bean.toModels(peasantHouseholdList, HygfIcbcRecordDTO.IcbcPeasantHousehold.class));
return hygfIcbcRecordDTO;
......
......@@ -271,6 +271,16 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
pagenew.setCurrent(current);
pagenew.setTotal(objectPageInfo.getTotal());
pagenew.setSize(size);
if(newRecords != null && newRecords.size() > 0) {
newRecords.forEach(e -> {
if(e.getSurveyInformationId() != null) {
e.setScale(peasantHouseholdMapper.getHygfCommercialScale(e.getSurveyInformationId()));
}
});
}
pagenew.setRecords(newRecords);
return pagenew;
......@@ -914,6 +924,18 @@ public class PeasantHouseholdServiceImpl extends BaseService<PeasantHouseholdDto
queryWrapper.like(StrUtil.isNotEmpty(peasantHouseholdPageDto.getRegionalCompaniesName()),"regional_companies_name", "%"+peasantHouseholdPageDto.getRegionalCompaniesName()+"%");
queryWrapper.like(StrUtil.isNotEmpty(peasantHouseholdPageDto.getDeveloperName()),"developer_name", "%"+peasantHouseholdPageDto.getDeveloperName()+"%");
queryWrapper.orderByDesc("rec_date");
return this.baseMapper.selectPage(new Page<>(peasantHouseholdPageDto.getCurrent(),peasantHouseholdPageDto.getSize()),queryWrapper);
IPage<PeasantHousehold> peasantHouseholdIPage = this.baseMapper.selectPage(new Page<>(peasantHouseholdPageDto.getCurrent(), peasantHouseholdPageDto.getSize()), queryWrapper);
if(peasantHouseholdIPage.getRecords() != null && peasantHouseholdIPage.getRecords().size() > 0) {
peasantHouseholdIPage.getRecords().forEach(e -> {
if(e.getSurveyInformationId() != null) {
e.setScale(peasantHouseholdMapper.getHygfCommercialScale(e.getSurveyInformationId()));
}
});
}
return peasantHouseholdIPage;
}
}
\ No newline at end of file
......@@ -118,8 +118,21 @@ public class PowerStationServiceImpl extends BaseService<PowerStationDto, PowerS
// return
// this.queryForPowerStationPage(page,powerStationCode,ownersName,serviceAgent);
return this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName,
serviceAgent,regionalCompaniesName,processStatus);
Page<PowerStationDto> powerStationDtoPage = this.queryPage((int) page.getCurrent(), (int) page.getSize(), powerStationCode, ownersName,
serviceAgent, regionalCompaniesName, processStatus);
if(powerStationDtoPage.getRecords() != null && powerStationDtoPage.getRecords().size() > 0) {
powerStationDtoPage.getRecords().forEach(e -> {
if(e.getPowerStationCode() != null) {
e.setScale(householdContractMapper.getHygfCommercialScale(e.getPowerStationCode()));
}
});
}
return powerStationDtoPage;
}
// 查询电站审核记录
......
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