人口信息入口查看我的房屋逻辑修改
This commit is contained in:
parent
5b525ffbfc
commit
e49bc1ac79
@ -11,6 +11,7 @@ import com.cm.common.utils.UUIDUtil;
|
||||
import com.cm.population.dao.house.IHouseDao;
|
||||
import com.cm.population.dao.population.IPopulationDao;
|
||||
import com.cm.population.pojo.bos.house.HouseBO;
|
||||
import com.cm.population.pojo.bos.population.PopulationBO;
|
||||
import com.cm.population.pojo.dtos.building.BuildingDTO;
|
||||
import com.cm.population.pojo.dtos.house.AutoHouseDTO;
|
||||
import com.cm.population.pojo.dtos.house.BatchHouseDTO;
|
||||
@ -30,8 +31,10 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.pdfbox.contentstream.operator.state.Save;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
@ -243,6 +246,11 @@ public class HouseServiceImpl extends AbstractService implements IHouseService {
|
||||
public List<HouseDTO> listByPopulationInfoId(String populationInfoId) {
|
||||
Map<String, Object> params = getHashMap(2);
|
||||
params.put("populationInfoId", populationInfoId);
|
||||
List<PopulationBO> populationBOS = populationdao.listBO(params);
|
||||
if(!CollectionUtils.isEmpty(populationBOS)) {
|
||||
params.put("cardNum", populationBOS.get(0).getCardNum());
|
||||
params.remove("populationInfoId");
|
||||
}
|
||||
return list(params);
|
||||
}
|
||||
|
||||
|
@ -847,7 +847,7 @@
|
||||
#{houseIds[${index}]}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="populationInfoId != null and populationInfoId != ''">
|
||||
<if test="(populationInfoId != null and populationInfoId != '') or (cardNum != '' and cardNum != '')">
|
||||
AND
|
||||
t1.house_id IN (
|
||||
SELECT
|
||||
@ -855,7 +855,13 @@
|
||||
FROM
|
||||
house_population hp
|
||||
WHERE
|
||||
hp.population_info_id = #{populationInfoId}
|
||||
1 = 1
|
||||
<if test="populationInfoId != null and populationInfoId != ''">
|
||||
AND hp.population_info_id = #{populationInfoId}
|
||||
</if>
|
||||
<if test="cardNum != null and cardNum != ''">
|
||||
AND hp.card_num = #{cardNum}
|
||||
</if>
|
||||
)
|
||||
</if>
|
||||
ORDER BY (affiliation_unit + 0), (affiliation_floors + 0), (house_num + 0) ASC
|
||||
|
@ -363,10 +363,12 @@
|
||||
t1.is_delete = 0
|
||||
<if test="keywords != null and keywords != ''">
|
||||
AND (
|
||||
<!-- 这里添加其他条件 -->
|
||||
t1.id LIKE CONCAT('%', #{keywords}, '%')
|
||||
)
|
||||
</if>
|
||||
<if test="populationInfoId != null and populationInfoId != ''">
|
||||
AND t1.population_info_id = #{populationInfoId}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != ''">
|
||||
AND
|
||||
LEFT(t1.gmt_create, 10) <![CDATA[ >= ]]> #{startTime}
|
||||
|
Loading…
Reference in New Issue
Block a user