Commit b9649a94 authored by lixuan's avatar lixuan

feat: 房源

parent 1431c090
Pipeline #145360 failed with stages
......@@ -77,4 +77,10 @@ public class HouseResourceExport {
@Excel(name = "备注")
private String remark;
@Excel(name = "2024营收")
private BigDecimal YearSell2024;
@Excel(name = "2025营收")
private BigDecimal YearSell2025;
}
......@@ -123,4 +123,10 @@ public class HouseResourcePage {
private Integer workerNumber;
private String registeredAddress;
private String businessEntityInfoId;
private BigDecimal YearSell2024;
private BigDecimal YearSell2025;
}
......@@ -28,4 +28,6 @@ public interface BusinessEntitySellMapper {
List<BusinessEntitySell> selectBusinessEntitySellByEntityIds(@Param("entityIds") List<String> entityIds);
BusinessEntitySell selectBusinessEntitySellByBusinessEntityInfoId(@Param("businessEntityInfoId") String businessEntityInfoId, @Param("year") Integer year);
}
......@@ -304,6 +304,14 @@ public class HouseResourceServiceImpl implements HouseResourceService {
query.setWgCodes(gridRegionUsers.stream().map(GridRegionUser::getWgId).collect(Collectors.toList()));
}
List<HouseResourcePage> list = houseResourceMapper.exportList(query);
list.forEach(x -> {
BusinessEntitySell businessEntitySell2024 = businessEntitySellMapper.selectBusinessEntitySellByBusinessEntityInfoId(x.getBusinessEntityInfoId(), 2024);
if (Objects.nonNull(businessEntitySell2024)) {
if (Objects.nonNull(businessEntitySell2024.getYearSell())) {
x.setYearSell2024(businessEntitySell2024.getYearSell());
}
}
});
if (CollectionUtils.isEmpty(list)) {
return Collections.emptyList();
} else {
......
......@@ -59,4 +59,14 @@
resultType="com.ruoyi.system.domain.house.BusinessEntitySell">
SELECT * FROM business_entity_sell WHERE business_entity_info_id in <foreach collection="entityIds" item="entityId" open="(" close=")" separator=",">#{entityId}</foreach>
</select>
<select id="selectBusinessEntitySellByBusinessEntityInfoId"
resultType="com.ruoyi.system.domain.house.BusinessEntitySell">
SELECT
t2.*
FROM
business_entity_info t1
LEFT JOIN business_entity_sell t2 ON t1.id = t2.business_entity_info_id
WHERE t1.id = #{businessEntityInfoId} AND t2.year = #{year}
limit 1
</select>
</mapper>
......@@ -277,6 +277,7 @@
<select id="exportList" resultType="com.ruoyi.system.domain.house.vo.HouseResourcePage">
SELECT
t1.id,
t3.id AS businessEntityInfoId,
t1.two,
t1.three,
t2.wg_name AS wgName4,
......
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