Commit 17576467 authored by 朱晨阳's avatar 朱晨阳

合同列表添加安装规模

parent 6f37197d
......@@ -257,4 +257,7 @@ public class HouseholdContract extends BaseEntity {
//查询一个农户拥有的合同是否全是已废弃
@TableField(exist = false)
private Boolean isAllDisuse;
@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);
}
......@@ -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>
......@@ -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;
}
......
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