excel批量导入、bug修改 --renpc
This commit is contained in:
parent
01d006b60c
commit
11f80c4e6d
@ -203,11 +203,17 @@ public class ResidentialController extends AbstractController {
|
|||||||
params.put("streetName", data.getStreet());
|
params.put("streetName", data.getStreet());
|
||||||
params.put("communityName", data.getCommunity());
|
params.put("communityName", data.getCommunity());
|
||||||
params.put("name", data.getResidential());
|
params.put("name", data.getResidential());
|
||||||
|
|
||||||
|
// 获取社区ID
|
||||||
|
String communityId = residentialService.getCommunityId(data.getCommunity());
|
||||||
|
String streetId = residentialService.getStreetId(data.getStreet());
|
||||||
List<ResidentialDTO> residentialDTOList = residentialService.list(params);
|
List<ResidentialDTO> residentialDTOList = residentialService.list(params);
|
||||||
if(CollectionUtils.isEmpty(residentialDTOList)) {
|
if(CollectionUtils.isEmpty(residentialDTOList)) {
|
||||||
ResidentialVO residentialVO = new ResidentialVO();
|
ResidentialVO residentialVO = new ResidentialVO();
|
||||||
residentialVO.setStreetName(data.getStreet());
|
residentialVO.setStreetName(data.getStreet());
|
||||||
residentialVO.setCommunityName(data.getCommunity());
|
residentialVO.setCommunityName(data.getCommunity());
|
||||||
|
residentialVO.setCommunity(communityId);
|
||||||
|
residentialVO.setStreet(streetId);
|
||||||
residentialVO.setName(data.getResidential());
|
residentialVO.setName(data.getResidential());
|
||||||
residentialService.save(residentialVO);
|
residentialService.save(residentialVO);
|
||||||
}
|
}
|
||||||
@ -220,6 +226,8 @@ public class ResidentialController extends AbstractController {
|
|||||||
buildingVO.setCommunityName(data.getCommunity());
|
buildingVO.setCommunityName(data.getCommunity());
|
||||||
buildingVO.setResidentialId(residentialDTOList1.get(0).getResidentialId());
|
buildingVO.setResidentialId(residentialDTOList1.get(0).getResidentialId());
|
||||||
buildingVO.setResidentialName(residentialDTOList1.get(0).getName());
|
buildingVO.setResidentialName(residentialDTOList1.get(0).getName());
|
||||||
|
buildingVO.setCommunity(communityId);
|
||||||
|
buildingVO.setStreet(streetId);
|
||||||
buildingVO.setName(data.getName());
|
buildingVO.setName(data.getName());
|
||||||
buildingVO.setBuildNum(data.getBuildingNum());
|
buildingVO.setBuildNum(data.getBuildingNum());
|
||||||
buildingVO.setUnitNum(data.getUnit());
|
buildingVO.setUnitNum(data.getUnit());
|
||||||
|
@ -117,4 +117,7 @@ public interface IResidentialDao {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params) throws SearchException;
|
Integer count(Map<String, Object> params) throws SearchException;
|
||||||
|
|
||||||
|
String getCommunityId(String community);
|
||||||
|
|
||||||
|
String getStreetId(String street);
|
||||||
}
|
}
|
@ -100,6 +100,8 @@ public class BatchHouseDTO {
|
|||||||
private String houseId;
|
private String houseId;
|
||||||
@ApiModelProperty(name = "name", value = "房屋编号")
|
@ApiModelProperty(name = "name", value = "房屋编号")
|
||||||
private String name;
|
private String name;
|
||||||
|
@ApiModelProperty(name = "gmtCreate", value = "创建时间")
|
||||||
|
private String gmtCreate;
|
||||||
|
|
||||||
public String getHouseId() {
|
public String getHouseId() {
|
||||||
return houseId;
|
return houseId;
|
||||||
@ -116,6 +118,14 @@ public class BatchHouseDTO {
|
|||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGmtCreate() {
|
||||||
|
return gmtCreate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGmtCreate(String gmtCreate) {
|
||||||
|
this.gmtCreate = gmtCreate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -293,6 +293,7 @@ public class HouseServiceImpl extends AbstractService implements IHouseService {
|
|||||||
if (j == houseDTO.getAffiliationUnit()) {
|
if (j == houseDTO.getAffiliationUnit()) {
|
||||||
house.setHouseId(houseDTO.getHouseId());
|
house.setHouseId(houseDTO.getHouseId());
|
||||||
house.setName(houseDTO.getHouseNum().toString());
|
house.setName(houseDTO.getHouseNum().toString());
|
||||||
|
house.setGmtCreate(houseDTO.getGmtCreate());
|
||||||
houseList.add(house);
|
houseList.add(house);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,6 +79,7 @@ public class PopulationServiceImpl extends AbstractService implements IPopulatio
|
|||||||
setSaveInfo(token, params);
|
setSaveInfo(token, params);
|
||||||
}
|
}
|
||||||
params.put("bindTime", params.get("gmtCreate"));
|
params.put("bindTime", params.get("gmtCreate"));
|
||||||
|
params.put("outHouse", 0);
|
||||||
populationDao.save(params);
|
populationDao.save(params);
|
||||||
return populationId;
|
return populationId;
|
||||||
}
|
}
|
||||||
|
@ -185,4 +185,7 @@ public interface IResidentialService {
|
|||||||
*/
|
*/
|
||||||
Integer count(Map<String, Object> params);
|
Integer count(Map<String, Object> params);
|
||||||
|
|
||||||
|
String getCommunityId(String community);
|
||||||
|
|
||||||
|
String getStreetId(String street);
|
||||||
}
|
}
|
@ -184,4 +184,14 @@ public class ResidentialServiceImpl extends AbstractService implements IResident
|
|||||||
return count == null ? 0 : count;
|
return count == null ? 0 : count;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCommunityId(String community) {
|
||||||
|
return residentialDao.getCommunityId(community);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getStreetId(String street) {
|
||||||
|
return residentialDao.getStreetId(street);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -248,7 +248,8 @@
|
|||||||
t1.house_id = hh.house_id
|
t1.house_id = hh.house_id
|
||||||
WHERE
|
WHERE
|
||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
AND t1.out_house = 0 OR t1.out_house IS NULL
|
AND (t1.out_house = 0
|
||||||
|
OR t1.out_house IS NULL)
|
||||||
AND
|
AND
|
||||||
hh.is_delete = 0
|
hh.is_delete = 0
|
||||||
<if test="keywords != null and keywords != ''">
|
<if test="keywords != null and keywords != ''">
|
||||||
|
@ -429,4 +429,12 @@
|
|||||||
t1.is_delete = 0
|
t1.is_delete = 0
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="getStreetId" parameterType="String" resultType="String">
|
||||||
|
SELECT dict_id FROM d_dict WHERE dict_name = #{street} and is_delete = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getCommunityId" parameterType="String" resultType="String">
|
||||||
|
SELECT community_id FROM d_community WHERE community_name = #{community} and is_delete = 0
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
Reference in New Issue
Block a user