ソースを参照

优化 物业删除 释放小区 工鞥

java110 4 年 前
親
コミット
097622f129

+ 19 - 0
java110-bean/src/main/java/com/java110/dto/store/StoreDto.java

@@ -41,6 +41,9 @@ public class StoreDto extends PageDto implements Serializable {
     private String mapY;
     private String storeName;
     private String storeTypeName;
+    private String corporation;
+    private String foundingTime;
+
 
 
     private Date createTime;
@@ -158,4 +161,20 @@ public class StoreDto extends PageDto implements Serializable {
     public void setStoreIds(String[] storeIds) {
         this.storeIds = storeIds;
     }
+
+    public String getCorporation() {
+        return corporation;
+    }
+
+    public void setCorporation(String corporation) {
+        this.corporation = corporation;
+    }
+
+    public String getFoundingTime() {
+        return foundingTime;
+    }
+
+    public void setFoundingTime(String foundingTime) {
+        this.foundingTime = foundingTime;
+    }
 }

+ 12 - 3
java110-db/src/main/resources/mapper/community/CommunityMemberV1ServiceDaoImplMapper.xml

@@ -6,9 +6,9 @@
     <!-- 保存小区成员信息 add by wuxw 2018-07-03 -->
     <insert id="saveCommunityMemberInfo" parameterType="Map">
         insert into s_community_member(
-        member_type_cd,start_time,end_time,community_id,community_member_id,member_id
+        member_type_cd,start_time,end_time,community_id,community_member_id,member_id,audit_status_cd
         ) values (
-        #{memberTypeCd},#{startTime},#{endTime},#{communityId},#{communityMemberId},#{memberId}
+        #{memberTypeCd},#{startTime},#{endTime},#{communityId},#{communityMemberId},#{memberId},#{auditStatusCd}
         )
     </insert>
 
@@ -17,7 +17,7 @@
     <select id="getCommunityMemberInfo" parameterType="Map" resultType="Map">
         select t.member_type_cd,t.member_type_cd memberTypeCd,t.status_cd,t.status_cd statusCd,t.start_time,t.start_time
         startTime,t.end_time,t.end_time endTime,t.community_id,t.community_id
-        communityId,t.community_member_id,t.community_member_id communityMemberId,t.member_id,t.member_id memberId
+        communityId,t.community_member_id,t.community_member_id communityMemberId,t.member_id,t.member_id memberId,t.audit_status_cd auditStatusCd
         from s_community_member t
         where 1 =1
         <if test="memberTypeCd !=null and memberTypeCd != ''">
@@ -38,6 +38,9 @@
         <if test="communityMemberId !=null and communityMemberId != ''">
             and t.community_member_id= #{communityMemberId}
         </if>
+        <if test="auditStatusCd !=null and auditStatusCd != ''">
+            and t.audit_status_cd= #{auditStatusCd}
+        </if>
         <if test="memberId !=null and memberId != ''">
             and t.member_id= #{memberId}
         </if>
@@ -70,6 +73,9 @@
         <if test="communityMemberId !=null and communityMemberId != ''">
             , t.community_member_id= #{communityMemberId}
         </if>
+        <if test="auditStatusCd !=null and auditStatusCd != ''">
+            , t.audit_status_cd= #{auditStatusCd}
+        </if>
         where 1=1
         <if test="memberId !=null and memberId != ''">
             and t.member_id= #{memberId}
@@ -100,6 +106,9 @@
         <if test="communityMemberId !=null and communityMemberId != ''">
             and t.community_member_id= #{communityMemberId}
         </if>
+        <if test="auditStatusCd !=null and auditStatusCd != ''">
+            and t.audit_status_cd= #{auditStatusCd}
+        </if>
         <if test="memberId !=null and memberId != ''">
             and t.member_id= #{memberId}
         </if>

+ 117 - 114
java110-db/src/main/resources/mapper/store/StoreV1ServiceDaoImplMapper.xml

@@ -5,138 +5,141 @@
 <mapper namespace="storeV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存商户信息信息 add by wuxw 2018-07-03 -->
     <insert id="saveStoreInfo" parameterType="Map">
         insert into s_store(
-address,store_type_cd,name,tel,state,store_id,user_id,map_y,map_x
-) values (
-#{address},#{storeTypeCd},#{name},#{tel},#{state},#{storeId},#{userId},#{mapY},#{mapX}
-)
+        address,store_type_cd,name,tel,state,store_id,user_id,map_y,map_x,nearby_landmarks
+        ) values (
+        #{address},#{storeTypeCd},#{name},#{tel},#{state},#{storeId},#{userId},#{mapY},#{mapX},#{nearbyLandmarks}
+        )
     </insert>
 
 
-
     <!-- 查询商户信息信息 add by wuxw 2018-07-03 -->
     <select id="getStoreInfo" parameterType="Map" resultType="Map">
-        select  t.address,t.store_type_cd,t.store_type_cd storeTypeCd,t.name,t.tel,t.status_cd,t.status_cd statusCd,t.state,t.store_id,t.store_id storeId,t.user_id,t.user_id userId,t.map_y,t.map_y mapY,t.map_x,t.map_x mapX 
-from s_store t 
-where 1 =1 
-<if test="address !=null and address != ''">
-   and t.address= #{address}
-</if> 
-<if test="storeTypeCd !=null and storeTypeCd != ''">
-   and t.store_type_cd= #{storeTypeCd}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="storeId !=null and storeId != ''">
-   and t.store_id= #{storeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="mapY !=null and mapY != ''">
-   and t.map_y= #{mapY}
-</if> 
-<if test="mapX !=null and mapX != ''">
-   and t.map_x= #{mapX}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.address,t.store_type_cd,t.store_type_cd storeTypeCd,t.name,t.tel,t.status_cd,t.status_cd
+        statusCd,t.state,t.store_id,t.store_id storeId,t.user_id,t.user_id userId,t.map_y,t.map_y mapY,t.map_x,t.map_x
+        mapX,t.create_time createTime,t.nearby_landmarks nearbyLandmarks,sa.value corporation,sa1.value foundingTime
+        from s_store t
+        left join s_store_attr sa on t.store_id = sa.store_id and sa.spec_cd = '100201903001' and sa.status_cd='0'
+        left join s_store_attr sa1 on t.store_id = sa1.store_id and sa1.spec_cd = '100201903003' and sa1.status_cd='0'
+        where 1 =1
+        <if test="address !=null and address != ''">
+            and t.address= #{address}
+        </if>
+        <if test="storeTypeCd !=null and storeTypeCd != ''">
+            and t.store_type_cd= #{storeTypeCd}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="mapY !=null and mapY != ''">
+            and t.map_y= #{mapY}
+        </if>
+        <if test="mapX !=null and mapX != ''">
+            and t.map_x= #{mapX}
+        </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 -->
+    <!-- 修改商户信息信息 add by wuxw 2018-07-03  t.nearby_landmarks nearbyLandmarks -->
     <update id="updateStoreInfo" parameterType="Map">
-        update  s_store t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="address !=null and address != ''">
-, t.address= #{address}
-</if> 
-<if test="storeTypeCd !=null and storeTypeCd != ''">
-, t.store_type_cd= #{storeTypeCd}
-</if> 
-<if test="name !=null and name != ''">
-, t.name= #{name}
-</if> 
-<if test="tel !=null and tel != ''">
-, t.tel= #{tel}
-</if> 
-<if test="state !=null and state != ''">
-, t.state= #{state}
-</if> 
-<if test="userId !=null and userId != ''">
-, t.user_id= #{userId}
-</if> 
-<if test="mapY !=null and mapY != ''">
-, t.map_y= #{mapY}
-</if> 
-<if test="mapX !=null and mapX != ''">
-, t.map_x= #{mapX}
-</if> 
- where 1=1 <if test="storeId !=null and storeId != ''">
-and t.store_id= #{storeId}
-</if> 
+        update s_store t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="address !=null and address != ''">
+            , t.address= #{address}
+        </if>
+        <if test="storeTypeCd !=null and storeTypeCd != ''">
+            , t.store_type_cd= #{storeTypeCd}
+        </if>
+
+        <if test="nearbyLandmarks !=null and nearbyLandmarks != ''">
+            , t.nearby_landmarks= #{nearbyLandmarks}
+        </if>
+        <if test="name !=null and name != ''">
+            , t.name= #{name}
+        </if>
+        <if test="tel !=null and tel != ''">
+            , t.tel= #{tel}
+        </if>
+        <if test="state !=null and state != ''">
+            , t.state= #{state}
+        </if>
+        <if test="userId !=null and userId != ''">
+            , t.user_id= #{userId}
+        </if>
+        <if test="mapY !=null and mapY != ''">
+            , t.map_y= #{mapY}
+        </if>
+        <if test="mapX !=null and mapX != ''">
+            , t.map_x= #{mapX}
+        </if>
+        where 1=1
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
 
     </update>
 
     <!-- 查询商户信息数量 add by wuxw 2018-07-03 -->
-     <select id="queryStoresCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from s_store t 
-where 1 =1 
-<if test="address !=null and address != ''">
-   and t.address= #{address}
-</if> 
-<if test="storeTypeCd !=null and storeTypeCd != ''">
-   and t.store_type_cd= #{storeTypeCd}
-</if> 
-<if test="name !=null and name != ''">
-   and t.name= #{name}
-</if> 
-<if test="tel !=null and tel != ''">
-   and t.tel= #{tel}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="state !=null and state != ''">
-   and t.state= #{state}
-</if> 
-<if test="storeId !=null and storeId != ''">
-   and t.store_id= #{storeId}
-</if> 
-<if test="userId !=null and userId != ''">
-   and t.user_id= #{userId}
-</if> 
-<if test="mapY !=null and mapY != ''">
-   and t.map_y= #{mapY}
-</if> 
-<if test="mapX !=null and mapX != ''">
-   and t.map_x= #{mapX}
-</if> 
+    <select id="queryStoresCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from s_store t
+        where 1 =1
+        <if test="address !=null and address != ''">
+            and t.address= #{address}
+        </if>
+        <if test="storeTypeCd !=null and storeTypeCd != ''">
+            and t.store_type_cd= #{storeTypeCd}
+        </if>
+        <if test="name !=null and name != ''">
+            and t.name= #{name}
+        </if>
+        <if test="tel !=null and tel != ''">
+            and t.tel= #{tel}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="state !=null and state != ''">
+            and t.state= #{state}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="userId !=null and userId != ''">
+            and t.user_id= #{userId}
+        </if>
+        <if test="mapY !=null and mapY != ''">
+            and t.map_y= #{mapY}
+        </if>
+        <if test="mapX !=null and mapX != ''">
+            and t.map_x= #{mapX}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>

+ 13 - 0
service-store/src/main/java/com/java110/store/cmd/property/DeletePropertyCmd.java

@@ -21,7 +21,9 @@ import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.AbstractServiceCmdListener;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.intf.community.ICommunityMemberV1InnerServiceSMO;
 import com.java110.intf.store.IStoreV1InnerServiceSMO;
+import com.java110.po.community.CommunityMemberPo;
 import com.java110.po.store.StorePo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
@@ -48,6 +50,9 @@ public class DeletePropertyCmd extends AbstractServiceCmdListener {
     @Autowired
     private IStoreV1InnerServiceSMO storeV1InnerServiceSMOImpl;
 
+    @Autowired
+    private ICommunityMemberV1InnerServiceSMO communityMemberV1InnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
         Assert.hasKeyAndValue(reqJson, "storeId", "storeId不能为空");
@@ -66,6 +71,14 @@ public class DeletePropertyCmd extends AbstractServiceCmdListener {
             throw new CmdException("删除数据失败");
         }
 
+        //释放小区
+        CommunityMemberPo communityMemberPo = new CommunityMemberPo();
+        communityMemberPo.setMemberId(storePo.getStoreId());
+        flag = communityMemberV1InnerServiceSMOImpl.deleteCommunityMember(communityMemberPo);
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
         cmdDataFlowContext.setResponseEntity(ResultVo.success());
     }
 }