java110-bean/src/main/java/com/java110/entity/assetImport/ImportOwnerRoomDto.java
@@ -23,6 +23,7 @@ private String idCard; private String ownerTypeCd; private String layer; private String userId; public String getFloorNum() { @@ -169,4 +170,12 @@ public void setCommunityId(String communityId) { this.communityId = communityId; } public String getUserId() { return userId; } public void setUserId(String userId) { this.userId = userId; } } java110-db/src/main/resources/mapper/community/FloorV1ServiceDaoImplMapper.xml
@@ -5,128 +5,124 @@ <mapper namespace="floorV1ServiceDaoImpl"> <!-- 保存楼栋信息 add by wuxw 2018-07-03 --> <insert id="saveFloorInfo" parameterType="Map"> insert into f_floor( floor_id,name,remark,b_id,community_id,user_id,floor_num,floor_area ) values ( #{floorId},#{name},#{remark},#{bId},#{communityId},#{userId},#{floorNum},#{floorArea} ) floor_id,name,remark,b_id,community_id,user_id,floor_num,floor_area ) values ( #{floorId},#{name},#{remark},#{bId},#{communityId},#{userId},#{floorNum},#{floorArea} ) </insert> <!-- 查询楼栋信息 add by wuxw 2018-07-03 --> <select id="getFloorInfo" parameterType="Map" resultType="Map"> select t.floor_id,t.floor_id floorId,t.name floorName,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.user_id,t.user_id userId,t3.name userName, select t.floor_id,t.floor_id floorId,t.name floorName,t.remark,t.b_id,t.b_id bId,t.community_id,t.community_id communityId,t.user_id,t.user_id userId,t3.name userName, t.floor_num,t.floor_num floorNum,t.floor_area,t.floor_area floorArea from f_floor t LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id and t2.spec_cd='100201912001' and t2.value='8008' LEFT JOIN u_user t3 on t.user_id = t3.user_id and t3.status_cd = 0 where t2.spec_cd='100201912001' and t2.value='8008' and t.status_cd=0 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="name !=null and name != ''"> and t.name= #{name} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> and t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> and t.floor_area= #{floorArea} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> where and t.status_cd=0 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="name !=null and name != ''"> and t.name= #{name} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> and t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> and t.floor_area= #{floorArea} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> </select> <!-- 修改楼栋信息 add by wuxw 2018-07-03 --> <update id="updateFloorInfo" parameterType="Map"> update f_floor t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="name !=null and name != ''"> , t.name= #{name} </if> <if test="remark !=null and remark != ''"> , t.remark= #{remark} </if> <if test="communityId !=null and communityId != ''"> , t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> , t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> , t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> , t.floor_area= #{floorArea} </if> where 1=1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> update f_floor t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="name !=null and name != ''"> , t.name= #{name} </if> <if test="remark !=null and remark != ''"> , t.remark= #{remark} </if> <if test="communityId !=null and communityId != ''"> , t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> , t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> , t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> , t.floor_area= #{floorArea} </if> where 1=1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> </update> <!-- 查询楼栋数量 add by wuxw 2018-07-03 --> <select id="queryFloorsCount" parameterType="Map" resultType="Map"> select count(1) count from f_floor t LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id LEFT JOIN u_user t3 on t.user_id = t3.user_id and t3.status_cd = 0 where t2.spec_cd='100201912001' and t2.value='8008' and t.status_cd=0 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="name !=null and name != ''"> and t.name= #{name} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> and t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> and t.floor_area= #{floorArea} </if> <select id="queryFloorsCount" parameterType="Map" resultType="Map"> select count(1) count from f_floor t LEFT JOIN f_floor_attr t2 on t.floor_id = t2.floor_id LEFT JOIN u_user t3 on t.user_id = t3.user_id and t3.status_cd = 0 where t2.spec_cd='100201912001' and t2.value='8008' and t.status_cd=0 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="name !=null and name != ''"> and t.name= #{name} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="bId !=null and bId != ''"> and t.b_id= #{bId} </if> <if test="communityId !=null and communityId != ''"> and t.community_id= #{communityId} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> <if test="floorNum !=null and floorNum != ''"> and t.floor_num= #{floorNum} </if> <if test="floorArea !=null and floorArea != ''"> and t.floor_area= #{floorArea} </if> </select> </select> </mapper> java110-db/src/main/resources/mapper/community/UnitV1ServiceDaoImplMapper.xml
@@ -5,129 +5,126 @@ <mapper namespace="unitV1ServiceDaoImpl"> <!-- 保存单元新信息 add by wuxw 2018-07-03 --> <insert id="saveUnitInfo" parameterType="Map"> insert into building_unit( floor_id,layer_count,unit_area,unit_id,unit_num,lift,remark,user_id ) values ( #{floorId},#{layerCount},#{unitArea},#{unitId},#{unitNum},#{lift},#{remark},#{userId} ) floor_id,layer_count,unit_area,unit_id,unit_num,lift,remark,user_id ) values ( #{floorId},#{layerCount},#{unitArea},#{unitId},#{unitNum},#{lift},#{remark},#{userId} ) </insert> <!-- 查询单元新信息 add by wuxw 2018-07-03 --> <select id="getUnitInfo" parameterType="Map" resultType="Map"> select t.floor_id,t.floor_id floorId,t.layer_count,t.layer_count layerCount,t.unit_area,t.unit_area unitArea,t.unit_id,t.unit_id unitId,t.unit_num,t.unit_num unitNum,t.lift,t.remark,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId from building_unit t where 1 =1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> and t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> and t.unit_area= #{unitArea} </if> <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> <if test="unitNum !=null and unitNum != ''"> and t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> and t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> select t.floor_id,t.floor_id floorId,t.layer_count,t.layer_count layerCount,t.unit_area,t.unit_area unitArea,t.unit_id,t.unit_id unitId,t.unit_num,t.unit_num unitNum,t.lift,t.remark,t.status_cd,t.status_cd statusCd,t.user_id,t.user_id userId from building_unit t where 1 =1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> and t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> and t.unit_area= #{unitArea} </if> <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> <if test="unitNum !=null and unitNum != ''"> and t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> and t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> </select> <!-- 修改单元新信息 add by wuxw 2018-07-03 --> <update id="updateUnitInfo" parameterType="Map"> update building_unit t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="floorId !=null and floorId != ''"> , t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> , t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> , t.unit_area= #{unitArea} </if> <if test="unitNum !=null and unitNum != ''"> , t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> , t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> , t.remark= #{remark} </if> <if test="userId !=null and userId != ''"> , t.user_id= #{userId} </if> where 1=1 <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> update building_unit t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="floorId !=null and floorId != ''"> , t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> , t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> , t.unit_area= #{unitArea} </if> <if test="unitNum !=null and unitNum != ''"> , t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> , t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> , t.remark= #{remark} </if> <if test="userId !=null and userId != ''"> , t.user_id= #{userId} </if> where 1=1 <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> </update> <!-- 查询单元新数量 add by wuxw 2018-07-03 --> <select id="queryUnitsCount" parameterType="Map" resultType="Map"> select count(1) count from building_unit t where 1 =1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> and t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> and t.unit_area= #{unitArea} </if> <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> <if test="unitNum !=null and unitNum != ''"> and t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> and t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> <select id="queryUnitsCount" parameterType="Map" resultType="Map"> select count(1) count from building_unit t where 1 =1 <if test="floorId !=null and floorId != ''"> and t.floor_id= #{floorId} </if> <if test="layerCount !=null and layerCount != ''"> and t.layer_count= #{layerCount} </if> <if test="unitArea !=null and unitArea != ''"> and t.unit_area= #{unitArea} </if> <if test="unitId !=null and unitId != ''"> and t.unit_id= #{unitId} </if> <if test="unitNum !=null and unitNum != ''"> and t.unit_num= #{unitNum} </if> <if test="lift !=null and lift != ''"> and t.lift= #{lift} </if> <if test="remark !=null and remark != ''"> and t.remark= #{remark} </if> <if test="statusCd !=null and statusCd != ''"> and t.status_cd= #{statusCd} </if> <if test="userId !=null and userId != ''"> and t.user_id= #{userId} </if> </select> </select> </mapper> service-api/src/main/java/com/java110/api/smo/assetImport/impl/ImportOwnerRoomSMOImpl.java
@@ -213,6 +213,7 @@ importOwnerRoomDto = new ImportOwnerRoomDto(); importOwnerRoomDto.setCommunityId(result.getCommunityId()); importOwnerRoomDto.setUserId(result.getUserId()); importOwnerRoomDto.setFloorNum(os[0].toString().trim()); importOwnerRoomDto.setUnitNum(os[1].toString().trim()); importOwnerRoomDto.setRoomNum(os[2].toString().trim()); service-community/src/main/java/com/java110/community/smo/impl/ImportOwnerRoomInnerServiceSMOImpl.java
@@ -143,7 +143,7 @@ ownerPo.setLink(importOwnerRoomDto.getTel()); ownerPo.setMemberId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_ownerId)); ownerPo.setRemark("房产导入"); ownerPo.setUserId("-1"); ownerPo.setUserId(importOwnerRoomDto.getUserId()); flag = ownerV1InnerServiceSMOImpl.saveOwner(ownerPo); if (flag < 1) { @@ -164,7 +164,7 @@ ownerPo.setLink(importOwnerRoomDto.getTel()); ownerPo.setMemberId(ownerDtos.get(0).getMemberId()); ownerPo.setRemark("房产导入"); ownerPo.setUserId("-1"); ownerPo.setUserId(importOwnerRoomDto.getUserId()); flag = ownerV1InnerServiceSMOImpl.updateOwner(ownerPo); if (flag < 1) { throw new IllegalArgumentException("导入业主失败"); @@ -205,7 +205,7 @@ ownerPo.setLink(importOwnerRoomDto.getTel()); ownerPo.setMemberId(ownerPo.getOwnerId()); ownerPo.setRemark("房产导入"); ownerPo.setUserId("-1"); ownerPo.setUserId(importOwnerRoomDto.getUserId()); flag = ownerV1InnerServiceSMOImpl.saveOwner(ownerPo); if (flag < 1) { @@ -229,7 +229,7 @@ ownerPo.setLink(importOwnerRoomDto.getTel()); ownerPo.setMemberId(ownerPo.getOwnerId()); ownerPo.setRemark("房产导入"); ownerPo.setUserId("-1"); ownerPo.setUserId(importOwnerRoomDto.getUserId()); flag = ownerV1InnerServiceSMOImpl.updateOwner(ownerPo); if (flag < 1) { throw new IllegalArgumentException("导入业主失败"); @@ -246,7 +246,7 @@ } OwnerRoomRelPo ownerRoomRelPo = new OwnerRoomRelPo(); ownerRoomRelPo.setUserId("-1"); ownerRoomRelPo.setUserId(importOwnerRoomDto.getUserId()); ownerRoomRelPo.setbId("-1"); ownerRoomRelPo.setRelId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_relId)); ownerRoomRelPo.setState("2001"); @@ -288,7 +288,7 @@ roomPo.setRoomType("0".equals(importOwnerRoomDto.getUnitNum()) ? RoomDto.ROOM_TYPE_SHOPS : RoomDto.ROOM_TYPE_ROOM); roomPo.setUnitId(unitId); roomPo.setRemark("房产导入"); roomPo.setUserId("-1"); roomPo.setUserId(importOwnerRoomDto.getUserId()); flag = roomV1InnerServiceSMOImpl.saveRoom(roomPo); if (flag < 1) { @@ -315,7 +315,7 @@ roomPo.setRoomType("0".equals(importOwnerRoomDto.getUnitNum()) ? RoomDto.ROOM_TYPE_SHOPS : RoomDto.ROOM_TYPE_ROOM); roomPo.setUnitId(unitId); roomPo.setRemark("房产导入"); roomPo.setUserId("-1"); roomPo.setUserId(importOwnerRoomDto.getUserId()); flag = roomV1InnerServiceSMOImpl.updateRoom(roomPo); if (flag < 1) { throw new IllegalArgumentException("导入房屋失败"); @@ -353,7 +353,7 @@ unitPo.setUnitArea("1"); unitPo.setUnitNum(importOwnerRoomDto.getUnitNum()); unitPo.setRemark("房产导入"); unitPo.setUserId("-1"); unitPo.setUserId(importOwnerRoomDto.getUserId()); flag = unitV1InnerServiceSMOImpl.saveUnit(unitPo); if (flag < 1) { @@ -372,7 +372,7 @@ unitPo.setUnitArea("1"); unitPo.setUnitNum(importOwnerRoomDto.getUnitNum()); unitPo.setRemark("房产导入"); unitPo.setUserId("-1"); unitPo.setUserId(importOwnerRoomDto.getUserId()); flag = unitV1InnerServiceSMOImpl.updateUnit(unitPo); if (flag < 1) { throw new IllegalArgumentException("导入单元失败"); @@ -406,7 +406,7 @@ floorPo.setFloorNum(importOwnerRoomDto.getFloorNum()); floorPo.setName(importOwnerRoomDto.getFloorNum()+"栋"); floorPo.setRemark("房产导入"); floorPo.setUserId("-1"); floorPo.setUserId(importOwnerRoomDto.getUserId()); flag = floorV1InnerServiceSMOImpl.saveFloor(floorPo); if (flag < 1) { @@ -425,7 +425,7 @@ floorPo.setFloorNum(importOwnerRoomDto.getFloorNum()); floorPo.setName(importOwnerRoomDto.getFloorNum()+"栋"); floorPo.setRemark("房产导入"); floorPo.setUserId("-1"); floorPo.setUserId(importOwnerRoomDto.getUserId()); flag = floorV1InnerServiceSMOImpl.updateFloor(floorPo); if (flag < 1) { throw new IllegalArgumentException("导入楼栋失败");