限制房号重复录入 --renpc
This commit is contained in:
parent
34ee0d8d18
commit
9e762b5593
@ -1,6 +1,7 @@
|
|||||||
package com.cm.population.service.house.impl;
|
package com.cm.population.service.house.impl;
|
||||||
|
|
||||||
import com.cm.common.base.AbstractService;
|
import com.cm.common.base.AbstractService;
|
||||||
|
import com.cm.common.exception.SaveException;
|
||||||
import com.cm.common.pojo.ListPage;
|
import com.cm.common.pojo.ListPage;
|
||||||
import com.cm.common.pojo.bos.UserInfoBO;
|
import com.cm.common.pojo.bos.UserInfoBO;
|
||||||
import com.cm.common.result.SuccessResultList;
|
import com.cm.common.result.SuccessResultList;
|
||||||
@ -26,6 +27,7 @@ import com.cm.population.service.residential.IResidentialService;
|
|||||||
import com.github.pagehelper.PageHelper;
|
import com.github.pagehelper.PageHelper;
|
||||||
import com.github.pagehelper.PageInfo;
|
import com.github.pagehelper.PageInfo;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.pdfbox.contentstream.operator.state.Save;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -86,10 +88,15 @@ public class HouseServiceImpl extends AbstractService implements IHouseService {
|
|||||||
} else {
|
} else {
|
||||||
setSaveInfo(token, params);
|
setSaveInfo(token, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 查询当前房间信息是否存在,存在则不做操作
|
||||||
|
Integer count = houseDao.count(params);
|
||||||
|
if(count <= 0) {
|
||||||
houseDao.save(params);
|
houseDao.save(params);
|
||||||
|
|
||||||
// 2023年11月20日15:38:06 崔宝铖 创建saveAll函数
|
// 2023年11月20日15:38:06 崔宝铖 创建saveAll函数
|
||||||
populationService.saveAll(token, houseId, houseVO.getPopulationVOList(), true);
|
populationService.saveAll(token, houseId, houseVO.getPopulationVOList(), true);
|
||||||
|
}
|
||||||
|
|
||||||
return houseId;
|
return houseId;
|
||||||
}
|
}
|
||||||
|
@ -965,6 +965,15 @@
|
|||||||
SELECT COUNT(*)
|
SELECT COUNT(*)
|
||||||
FROM house_house t1
|
FROM house_house t1
|
||||||
WHERE t1.is_delete = 0
|
WHERE t1.is_delete = 0
|
||||||
|
<if test="buildingId != null and buildingId != ''">
|
||||||
|
AND building_id = #{buildingId}
|
||||||
|
</if>
|
||||||
|
<if test="affiliationFloors != null and affiliationFloors != ''">
|
||||||
|
AND affiliation_floors = #{affiliationFloors}
|
||||||
|
</if>
|
||||||
|
<if test="affiliationUnit != null and affiliationUnit != ''">
|
||||||
|
AND affiliation_unit = #{affiliationUnit}
|
||||||
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 以房找人列表 -->
|
<!-- 以房找人列表 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user