Przeglądaj źródła

Merge remote-tracking branch 'origin/xinghong-dev'

java110 4 lat temu
rodzic
commit
8814ee740c
29 zmienionych plików z 1204 dodań i 79 usunięć
  1. 35 19
      java110-bean/src/main/java/com/java110/dto/ownerCarAttr/OwnerCarAttrDto.java
  2. 9 0
      java110-bean/src/main/java/com/java110/dto/resourceStore/ResourceStoreDto.java
  3. 65 18
      java110-bean/src/main/java/com/java110/po/ownerCarAttr/OwnerCarAttrPo.java
  4. 18 0
      java110-bean/src/main/java/com/java110/vo/api/resourceStore/ApiResourceStoreVo.java
  5. 117 0
      java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml
  6. 102 0
      java110-db/src/main/resources/mapper/user/OwnerCarAttrV1ServiceDaoImplMapper.xml
  7. 10 0
      java110-interface/src/main/java/com/java110/intf/store/IResourceStoreInnerServiceSMO.java
  8. 68 0
      java110-interface/src/main/java/com/java110/intf/user/IOwnerCarAttrV1InnerServiceSMO.java
  9. 3 3
      service-api/src/main/java/com/java110/api/listener/org/ListOrgsListener.java
  10. 39 0
      service-api/src/main/java/com/java110/api/listener/owner/SaveOwnerCarListener.java
  11. 10 37
      service-api/src/main/java/com/java110/api/listener/resourceStore/ListResourceStoresListener.java
  12. 3 0
      service-api/src/main/java/com/java110/api/listener/resourceStore/ListStorehousesListener.java
  13. 33 0
      service-api/src/main/java/com/java110/api/smo/impl/StaffServiceSMOImpl.java
  14. 9 0
      service-community/src/main/java/com/java110/community/dao/IResourceStoreServiceDao.java
  15. 17 0
      service-community/src/main/java/com/java110/community/dao/impl/ResourceStoreServiceDaoImpl.java
  16. 1 2
      service-job/src/main/java/com/java110/job/adapt/hcGov/car/AddCarToHcGovReturnAdapt.java
  17. 14 0
      service-job/src/main/java/com/java110/job/adapt/hcIot/car/AddCarToIotAdapt.java
  18. 14 0
      service-job/src/main/java/com/java110/job/adapt/hcIot/car/DeleteCarToIotAdapt.java
  19. 14 0
      service-job/src/main/java/com/java110/job/adapt/hcIot/car/ModifyCarToIotAdapt.java
  20. 9 0
      service-store/src/main/java/com/java110/store/dao/IResourceStoreServiceDao.java
  21. 17 0
      service-store/src/main/java/com/java110/store/dao/impl/ResourceStoreServiceDaoImpl.java
  22. 11 0
      service-store/src/main/java/com/java110/store/smo/impl/ResourceStoreInnerServiceSMOImpl.java
  23. 71 0
      service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/DeleteOwnerCarAttrCmd.java
  24. 84 0
      service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/ListOwnerCarAttrCmd.java
  25. 78 0
      service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/SaveOwnerCarAttrCmd.java
  26. 75 0
      service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/UpdateOwnerCarAttrCmd.java
  27. 77 0
      service-user/src/main/java/com/java110/user/dao/IOwnerCarAttrV1ServiceDao.java
  28. 112 0
      service-user/src/main/java/com/java110/user/dao/impl/OwnerCarAttrV1ServiceDaoImpl.java
  29. 89 0
      service-user/src/main/java/com/java110/user/smo/impl/OwnerCarAttrV1InnerServiceSMOImpl.java

+ 35 - 19
java110-bean/src/main/java/com/java110/dto/ownerCarAttr/OwnerCarAttrDto.java

@@ -1,12 +1,13 @@
 package com.java110.dto.ownerCarAttr;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
 /**
  * @ClassName FloorDto
- * @Description 业主车辆属性数据层封装
+ * @Description 车辆属性数据层封装
  * @Author wuxw
  * @Date 2019/4/24 8:52
  * @Version 1.0
@@ -15,48 +16,55 @@ import java.util.Date;
 public class OwnerCarAttrDto extends PageDto implements Serializable {
 
     private String attrId;
-private String specCd;
-private String communityId;
-private String value;
-private String carId;
-
+    private String specCd;
+    private String communityId;
+    private String value;
+    private String memberId;
+    private String carId;
 
     private Date createTime;
 
     private String statusCd = "0";
 
-
     public String getAttrId() {
         return attrId;
     }
-public void setAttrId(String attrId) {
+
+    public void setAttrId(String attrId) {
         this.attrId = attrId;
     }
-public String getSpecCd() {
+
+    public String getSpecCd() {
         return specCd;
     }
-public void setSpecCd(String specCd) {
+
+    public void setSpecCd(String specCd) {
         this.specCd = specCd;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getValue() {
+
+    public String getValue() {
         return value;
     }
-public void setValue(String value) {
+
+    public void setValue(String value) {
         this.value = value;
     }
-public String getCarId() {
-        return carId;
-    }
-public void setCarId(String carId) {
-        this.carId = carId;
+
+    public String getMemberId() {
+        return memberId;
     }
 
+    public void setMemberId(String memberId) {
+        this.memberId = memberId;
+    }
 
     public Date getCreateTime() {
         return createTime;
@@ -73,4 +81,12 @@ public void setCarId(String carId) {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getCarId() {
+        return carId;
+    }
+
+    public void setCarId(String carId) {
+        this.carId = carId;
+    }
 }

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/resourceStore/ResourceStoreDto.java

@@ -45,6 +45,7 @@ public class ResourceStoreDto extends PageDto implements Serializable {
     private String warningStock;
     private String shType;
     private String shObjId;
+    private String[] shObjIds;
     private String averagePrice;
     private List<String> fileUrls;
     private Date createTime;
@@ -392,4 +393,12 @@ public class ResourceStoreDto extends PageDto implements Serializable {
     public void setIsFixedName(String isFixedName) {
         this.isFixedName = isFixedName;
     }
+
+    public String[] getShObjIds() {
+        return shObjIds;
+    }
+
+    public void setShObjIds(String[] shObjIds) {
+        this.shObjIds = shObjIds;
+    }
 }

+ 65 - 18
java110-bean/src/main/java/com/java110/po/ownerCarAttr/OwnerCarAttrPo.java

@@ -1,46 +1,93 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package com.java110.po.ownerCarAttr;
 
 import java.io.Serializable;
-import java.util.Date;
 
+/**
+ * 类表述: Po 数据模型实体对象 基本保持与数据库模型一直 用于 增加修改删除 等时的数据载体
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
 public class OwnerCarAttrPo implements Serializable {
 
     private String attrId;
-private String specCd;
-private String communityId;
-private String value;
-private String carId;
-public String getAttrId() {
+    private String specCd;
+    private String statusCd = "0";
+    private String communityId;
+    private String value;
+    private String memberId;
+    private String carId;
+
+    public String getAttrId() {
         return attrId;
     }
-public void setAttrId(String attrId) {
+
+    public void setAttrId(String attrId) {
         this.attrId = attrId;
     }
-public String getSpecCd() {
+
+    public String getSpecCd() {
         return specCd;
     }
-public void setSpecCd(String specCd) {
+
+    public void setSpecCd(String specCd) {
         this.specCd = specCd;
     }
-public String getCommunityId() {
+
+    public String getStatusCd() {
+        return statusCd;
+    }
+
+    public void setStatusCd(String statusCd) {
+        this.statusCd = statusCd;
+    }
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
-public String getValue() {
+
+    public String getValue() {
         return value;
     }
-public void setValue(String value) {
+
+    public void setValue(String value) {
         this.value = value;
     }
-public String getCarId() {
-        return carId;
-    }
-public void setCarId(String carId) {
-        this.carId = carId;
+
+    public String getMemberId() {
+        return memberId;
     }
 
+    public void setMemberId(String memberId) {
+        this.memberId = memberId;
+    }
 
+    public String getCarId() {
+        return carId;
+    }
 
+    public void setCarId(String carId) {
+        this.carId = carId;
+    }
 }

+ 18 - 0
java110-bean/src/main/java/com/java110/vo/api/resourceStore/ApiResourceStoreVo.java

@@ -7,6 +7,8 @@ import java.util.List;
 
 public class ApiResourceStoreVo extends MorePageVo implements Serializable {
     List<ApiResourceStoreDataVo> resourceStores;
+    private String subTotal;
+    private String totalPrice;
 
 
     public List<ApiResourceStoreDataVo> getResourceStores() {
@@ -16,4 +18,20 @@ public class ApiResourceStoreVo extends MorePageVo implements Serializable {
     public void setResourceStores(List<ApiResourceStoreDataVo> resourceStores) {
         this.resourceStores = resourceStores;
     }
+
+    public String getSubTotal() {
+        return subTotal;
+    }
+
+    public void setSubTotal(String subTotal) {
+        this.subTotal = subTotal;
+    }
+
+    public String getTotalPrice() {
+        return totalPrice;
+    }
+
+    public void setTotalPrice(String totalPrice) {
+        this.totalPrice = totalPrice;
+    }
 }

+ 117 - 0
java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml

@@ -288,6 +288,12 @@
         <if test="shObjId !=null and shObjId != ''">
             and sh.sh_obj_id= #{shObjId}
         </if>
+        <if test="shObjIds !=null">
+            and sh.sh_obj_id in
+            <foreach collection="shObjIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="showMobile != null and showMobile != ''">
             and t.show_mobile = #{showMobile}
         </if>
@@ -463,9 +469,115 @@
         <if test="shObjId !=null and shObjId != ''">
             and sh.sh_obj_id= #{shObjId}
         </if>
+        <if test="shObjIds !=null">
+            and sh.sh_obj_id in
+            <foreach collection="shObjIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="shType !=null and shType != ''">
+            and sh.sh_type= #{shType}
+        </if>
+        <if test="averagePrice != null and averagePrice != ''">
+            and t.average_price = #{averagePrice}
+        </if>
+        <if test="miniUnitCode !=null and miniUnitCode != ''">
+            and t.mini_unit_code= #{miniUnitCode}
+        </if>
+        <if test="miniUnitStock !=null and miniUnitStock != ''">
+            and t.mini_unit_stock= #{miniUnitStock}
+        </if>
+        <if test="miniStock !=null and miniStock != ''">
+            and t.mini_stock= #{miniStock}
+        </if>
+        <if test="isShow !=null and isShow != ''">
+            and sh.is_show= #{isShow}
+        </if>
+        <if test="isFixed !=null and isFixed != ''">
+            and t.is_fixed= #{isFixed}
+        </if>
+        <if test="resOrderType == '20000'">
+            and t.stock > 0
+        </if>
+    </select>
+    <!-- 查询资源信息 add by wuxw 2018-07-03 -->
+    <select id="queryResourceStoresTotalPrice" parameterType="Map" resultType="Map">
+        select sum(w.stock*w.average_price) as totalPrice from(
+        select t.stock,t.average_price from resource_store t
+        left join storehouse sh on t.sh_id = sh.sh_id and t.store_id = sh.store_id and sh.status_cd = '0'
+        where 1 = 1
+        <if test="resName !=null and resName != ''">
+            and t.res_name like concat('%',#{resName},'%')
+        </if>
+        <if test="name != null and name != ''">
+            and t.res_name = #{name}
+        </if>
+        <if test="price !=null and price != ''">
+            and t.price= #{price}
+        </if>
+        <if test="rstId !=null and rstId != ''">
+            and t.rst_id= #{rstId}
+        </if>
+        <if test="parentRstId !=null and parentRstId != ''">
+            and t.parent_rst_id= #{parentRstId}
+        </if>
+        <if test="rssId !=null and rssId != ''">
+            and t.rss_id= #{rssId}
+        </if>
+        <if test="outLowPrice !=null and outLowPrice != ''">
+            and t.out_low_price = #{outLowPrice}
+        </if>
+        <if test="outHighPrice != null and outHighPrice != ''">
+            and t.out_high_price = #{outHighPrice}
+        </if>
+        <if test="unitCode != null and unitCode != ''">
+            and t.unit_code = #{unitCode}
+        </if>
+        <if test="remark != null and remark != ''">
+            and t.remark = #{remark}
+        </if>
+        <if test="resCode !=null and resCode != ''">
+            and t.res_code= #{resCode}
+        </if>
+        <if test="description !=null and description != ''">
+            and t.description= #{description}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="storeId !=null and storeId != ''">
+            and t.store_id= #{storeId}
+        </if>
+        <if test="stock !=null and stock != ''">
+            and t.stock= #{stock}
+        </if>
+        <if test="warningStock !=null and warningStock != ''">
+            and t.warning_stock= #{warningStock}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="resId !=null and resId != ''">
+            and t.res_id= #{resId}
+        </if>
+        <if test="shId !=null and shId != ''">
+            and t.sh_id= #{shId}
+        </if>
         <if test="shType !=null and shType != ''">
             and sh.sh_type= #{shType}
         </if>
+        <if test="shObjId !=null and shObjId != ''">
+            and sh.sh_obj_id= #{shObjId}
+        </if>
+        <if test="shObjIds !=null">
+            and sh.sh_obj_id in
+            <foreach collection="shObjIds" item="item" index="index" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
+        <if test="showMobile != null and showMobile != ''">
+            and t.show_mobile = #{showMobile}
+        </if>
         <if test="averagePrice != null and averagePrice != ''">
             and t.average_price = #{averagePrice}
         </if>
@@ -487,5 +599,10 @@
         <if test="resOrderType == '20000'">
             and t.stock > 0
         </if>
+        order by t.create_time desc
+        <if test="page != -1 and page != null ">
+            limit #{page}, #{row}
+        </if>
+        )w
     </select>
 </mapper>

+ 102 - 0
java110-db/src/main/resources/mapper/user/OwnerCarAttrV1ServiceDaoImplMapper.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="ownerCarAttrV1ServiceDaoImpl">
+
+
+    <!-- 保存车辆属性信息 add by wuxw 2018-07-03 -->
+    <insert id="saveOwnerCarAttrInfo" parameterType="Map">
+        insert into owner_car_attr(
+attr_id,spec_cd,community_id,value,member_id
+) values (
+#{attrId},#{specCd},#{communityId},#{value},#{memberId}
+)
+    </insert>
+
+
+    <!-- 查询车辆属性信息 add by wuxw 2018-07-03 -->
+    <select id="getOwnerCarAttrInfo" parameterType="Map" resultType="Map">
+        select t.attr_id,t.attr_id attrId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd
+        statusCd,t.community_id,t.community_id communityId,t.value,t.member_id,t.member_id memberId
+        from owner_car_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </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="updateOwnerCarAttrInfo" parameterType="Map">
+        update owner_car_attr t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            , t.spec_cd= #{specCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            , t.member_id= #{memberId}
+        </if>
+        where 1=1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+
+    </update>
+
+    <!-- 查询车辆属性数量 add by wuxw 2018-07-03 -->
+    <select id="queryOwnerCarAttrsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from owner_car_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+        <if test="memberId !=null and memberId != ''">
+            and t.member_id= #{memberId}
+        </if>
+
+
+    </select>
+
+</mapper>

+ 10 - 0
java110-interface/src/main/java/com/java110/intf/store/IResourceStoreInnerServiceSMO.java

@@ -51,4 +51,14 @@ public interface IResourceStoreInnerServiceSMO {
     @RequestMapping(value = "/saveResourceStore", method = RequestMethod.POST)
     void saveResourceStore(@RequestBody ResourceStoreDto resourceStoreDto);
 
+    /**
+     * <p>查询物品总价</p>
+     *
+     * @param resourceResourceStoreDto 数据对象分享
+     * @return ResourceStoreDto 对象数据
+     */
+    @RequestMapping(value = "/queryResourceStoresTotalPrice", method = RequestMethod.POST)
+    String queryResourceStoresTotalPrice(@RequestBody ResourceStoreDto resourceResourceStoreDto);
+
+
 }

+ 68 - 0
java110-interface/src/main/java/com/java110/intf/user/IOwnerCarAttrV1InnerServiceSMO.java

@@ -0,0 +1,68 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.intf.user;
+
+import com.java110.config.feign.FeignConfiguration;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@FeignClient(name = "user-service", configuration = {FeignConfiguration.class})
+@RequestMapping("/ownerCarAttrV1Api")
+public interface IOwnerCarAttrV1InnerServiceSMO {
+
+
+    @RequestMapping(value = "/saveOwnerCarAttr", method = RequestMethod.POST)
+    public int saveOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo);
+
+    @RequestMapping(value = "/updateOwnerCarAttr", method = RequestMethod.POST)
+    public int updateOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo);
+
+    @RequestMapping(value = "/deleteOwnerCarAttr", method = RequestMethod.POST)
+    public int deleteOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo);
+
+    /**
+     * <p>查询小区楼信息</p>
+     *
+     *
+     * @param ownerCarAttrDto 数据对象分享
+     * @return OwnerCarAttrDto 对象数据
+     */
+    @RequestMapping(value = "/queryOwnerCarAttrs", method = RequestMethod.POST)
+    List<OwnerCarAttrDto> queryOwnerCarAttrs(@RequestBody OwnerCarAttrDto ownerCarAttrDto);
+
+    /**
+     * 查询<p>小区楼</p>总记录数
+     *
+     * @param ownerCarAttrDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/queryOwnerCarAttrsCount", method = RequestMethod.POST)
+    int queryOwnerCarAttrsCount(@RequestBody OwnerCarAttrDto ownerCarAttrDto);
+}

+ 3 - 3
service-api/src/main/java/com/java110/api/listener/org/ListOrgsListener.java

@@ -78,18 +78,18 @@ public class ListOrgsListener extends AbstractServiceApiListener {
 
         OrgDto orgDto = BeanConvertUtil.covertBean(reqJson, OrgDto.class);
         //2级别组织信息
-        if(reqJson.getString("orgLevel").equals("2")){
+        if (reqJson.containsKey("orgLevel") && reqJson.getString("orgLevel").equals("2")) {
             //默认只查看当前归属组织架构
             BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto();
             basePrivilegeDto.setResource("/viewAllOrganization");
             basePrivilegeDto.setUserId(reqJson.getString("userId"));
             List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto);
-            if(privileges.size()==0){
+            if (privileges.size() == 0) {
                 //查询员工所属二级组织架构
                 OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto();
                 orgStaffRelDto.setStaffId(reqJson.getString("userId"));
                 List<OrgStaffRelDto> orgStaffRelDtos = iOrgStaffRelInnerServiceSMO.queryOrgInfoByStaffIds(orgStaffRelDto);
-                if(orgStaffRelDtos.size()>0){
+                if (orgStaffRelDtos.size() > 0) {
                     orgDto.setOrgId(orgStaffRelDtos.get(0).getCompanyId());//当前人虽归属的二级组织信息
                 }
 

+ 39 - 0
service-api/src/main/java/com/java110/api/listener/owner/SaveOwnerCarListener.java

@@ -1,24 +1,32 @@
 package com.java110.api.listener.owner;
 
+import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.parkingSpace.IParkingSpaceBMO;
 import com.java110.api.listener.AbstractServiceApiPlusListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.event.service.api.ServiceDataFlowEvent;
+import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.dto.owner.OwnerCarDto;
 import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
 import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
+import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO;
 import com.java110.intf.user.IOwnerCarInnerServiceSMO;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.constant.ServiceCodeConstant;
 import com.java110.utils.exception.ListenerExecuteException;
 import com.java110.utils.util.Assert;
+import com.java110.utils.util.StringUtil;
 import org.slf4j.Logger;
 import com.java110.core.log.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.HttpMethod;
 
+import java.util.List;
+
 /**
  * @ClassName SaveParkingSpaceListener
  * @Description 保存小区楼信息
@@ -46,6 +54,9 @@ public class SaveOwnerCarListener extends AbstractServiceApiPlusListener {
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
+    @Autowired
+    private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl;
+
     @Override
     public String getServiceCode() {
         return ServiceCodeConstant.SERVICE_CODE_SAVE_OWNER_CAR;
@@ -103,6 +114,10 @@ public class SaveOwnerCarListener extends AbstractServiceApiPlusListener {
         if (count > 0) {
             throw new IllegalArgumentException("车辆已存在");
         }
+
+        /*OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo();
+        ownerCarAttrPo.setAttrId("");
+        ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo);*/
     }
 
     @Override
@@ -110,6 +125,30 @@ public class SaveOwnerCarListener extends AbstractServiceApiPlusListener {
         //添加小区楼
         parkingSpaceBMOImpl.sellParkingSpace(reqJson, context);
         parkingSpaceBMOImpl.modifySellParkingSpaceState(reqJson, context);
+        commit(context);
+        OwnerCarDto ownerCarDto = new OwnerCarDto();
+        ownerCarDto.setOwnerId(reqJson.getString("ownerId"));
+        ownerCarDto.setCarNum(reqJson.getString("carNum"));
+        //查询业主车辆
+        List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
+        Assert.listOnlyOne(ownerCarDtos, "查询业主车辆错误");
+        OwnerCarAttrPo ownerCarAttrPo = new OwnerCarAttrPo();
+        ownerCarAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_cartId));
+        ownerCarAttrPo.setCarId(ownerCarDtos.get(0).getCarId());
+        ownerCarAttrPo.setCommunityId(reqJson.getString("communityId"));
+        //获取属性值
+        String carAttrs = reqJson.getString("carAttrs");
+        if (StringUtil.isEmpty(carAttrs)) {
+            throw new IllegalArgumentException("属性值为空");
+        }
+        JSONArray jsonArray = JSONArray.parseArray(carAttrs);
+        String specCd = "";
+        if (jsonArray.size() > 0) {
+            specCd = jsonArray.getJSONObject(0).getString("specCd");
+        }
+        ownerCarAttrPo.setSpecCd(specCd);
+        ownerCarAttrPo.setValue(reqJson.getString("value"));
+        ownerCarAttrInnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo);
     }
 
 

+ 10 - 37
service-api/src/main/java/com/java110/api/listener/resourceStore/ListResourceStoresListener.java

@@ -79,7 +79,10 @@ public class ListResourceStoresListener extends AbstractServiceApiListener {
         basePrivilegeDto.setResource("/viewGroupResource");
         basePrivilegeDto.setUserId(userId);
         List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto);
-        if (StorehouseDto.SH_TYPE_COMMUNITY.equals(resourceStoreDto.getShType()) || privileges.size() == 0) {
+        if (reqJson.containsKey("operationType") && reqJson.getString("operationType").equals("1000") && privileges.size() > 0) {
+            resourceStoreDto.setShType("");
+            resourceStoreDto.setShObjIds(new String[]{reqJson.getString("communityId"), reqJson.getString("storeId")});
+        } else if (StorehouseDto.SH_TYPE_COMMUNITY.equals(resourceStoreDto.getShType()) || privileges.size() == 0) {
             resourceStoreDto.setShType(StorehouseDto.SH_TYPE_COMMUNITY);
             resourceStoreDto.setShObjId(reqJson.getString("communityId"));
         }
@@ -90,43 +93,11 @@ public class ListResourceStoresListener extends AbstractServiceApiListener {
         //计算总价(大计)
         BigDecimal totalPrice = BigDecimal.ZERO;
         if (count > 0) {
-            List<ApiResourceStoreDataVo> apiResourceStoreDataVos = BeanConvertUtil.covertBeanList(resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto), ApiResourceStoreDataVo.class);
-            for (ApiResourceStoreDataVo apiResourceStoreDataVo : apiResourceStoreDataVos) {
-                //获取均价
-                String averagePrice = apiResourceStoreDataVo.getAveragePrice();
-                //获取数量
-                String stock = apiResourceStoreDataVo.getStock();
-                if (!StringUtil.isEmpty(averagePrice) && !StringUtil.isEmpty(stock)) {
-                    //总价
-                    BigDecimal x1 = new BigDecimal(averagePrice);
-                    BigDecimal y1 = new BigDecimal(stock);
-                    BigDecimal price = x1.multiply(y1);
-                    //计算总价(小计)
-                    subTotalPrice = subTotalPrice.add(price);
-                }
-            }
+            resourceStores = BeanConvertUtil.covertBeanList(resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto), ApiResourceStoreDataVo.class);
+            //查询总价
+            subTotalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto));
             resourceStoreDto.setPage(PageDto.DEFAULT_PAGE);
-            //查询所有物品信息数据(不分组)
-            List<ResourceStoreDto> resourceStoreList = resourceStoreInnerServiceSMOImpl.queryResourceStores(resourceStoreDto);
-            for (ResourceStoreDto resourceStore : resourceStoreList) {
-                //获取均价
-                String averagePrice = resourceStore.getAveragePrice();
-                //获取数量
-                String stock = resourceStore.getStock();
-                if (!StringUtil.isEmpty(averagePrice) && !StringUtil.isEmpty(stock)) {
-                    //总价
-                    BigDecimal x1 = new BigDecimal(averagePrice);
-                    BigDecimal y1 = new BigDecimal(stock);
-                    BigDecimal price = x1.multiply(y1);
-                    //计算总价(大计)
-                    totalPrice = totalPrice.add(price);
-                }
-            }
-            for (ApiResourceStoreDataVo apiResourceStoreDataVo : apiResourceStoreDataVos) {
-                apiResourceStoreDataVo.setSubTotalPrice(String.format("%.2f", subTotalPrice));
-                apiResourceStoreDataVo.setHighTotalPrice(String.format("%.2f", totalPrice));
-                resourceStores.add(apiResourceStoreDataVo);
-            }
+            totalPrice = new BigDecimal(resourceStoreInnerServiceSMOImpl.queryResourceStoresTotalPrice(resourceStoreDto));
         } else {
             resourceStores = new ArrayList<>();
         }
@@ -134,6 +105,8 @@ public class ListResourceStoresListener extends AbstractServiceApiListener {
         apiResourceStoreVo.setTotal(count);
         apiResourceStoreVo.setRecords((int) Math.ceil((double) count / (double) reqJson.getInteger("row")));
         apiResourceStoreVo.setResourceStores(resourceStores);
+        apiResourceStoreVo.setTotalPrice(String.format("%.2f", totalPrice));
+        apiResourceStoreVo.setSubTotal(String.format("%.2f", subTotalPrice));
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiResourceStoreVo), HttpStatus.OK);
         context.setResponseEntity(responseEntity);
     }

+ 3 - 0
service-api/src/main/java/com/java110/api/listener/resourceStore/ListStorehousesListener.java

@@ -78,6 +78,9 @@ public class ListStorehousesListener extends AbstractServiceApiListener {
         if (privileges.size() == 0) {
             storehouseDto.setShObjIds(new String[]{reqJson.getString("communityId")});
         } else {
+            if (reqJson.containsKey("operationType") && reqJson.getString("operationType").equals("1000")) {
+                storehouseDto.setShType("");
+            }
             storehouseDto.setShObjIds(new String[]{reqJson.getString("communityId"), reqJson.getString("storeId")});
         }
         if (reqJson.containsKey("flag") && reqJson.getString("flag").equals("0")) {//调拨申请查看所有仓库

+ 33 - 0
service-api/src/main/java/com/java110/api/smo/impl/StaffServiceSMOImpl.java

@@ -5,8 +5,12 @@ import com.java110.api.smo.AppAbstractComponentSMO;
 import com.java110.api.smo.DefaultAbstractComponentSMO;
 import com.java110.core.component.BaseComponentSMO;
 import com.java110.core.context.IPageData;
+import com.java110.dto.basePrivilege.BasePrivilegeDto;
+import com.java110.dto.org.OrgStaffRelDto;
 import com.java110.entity.component.ComponentValidateResult;
 import com.java110.api.smo.IStaffServiceSMO;
+import com.java110.intf.community.IMenuInnerServiceSMO;
+import com.java110.intf.user.IOrgStaffRelInnerServiceSMO;
 import com.java110.utils.constant.ServiceConstant;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.StringUtil;
@@ -19,6 +23,9 @@ import org.springframework.http.ResponseEntity;
 import org.springframework.stereotype.Service;
 import org.springframework.web.client.RestTemplate;
 
+import java.util.List;
+import java.util.Map;
+
 /**
  * 员工服务类
  * Created by Administrator on 2019/4/2.
@@ -30,6 +37,12 @@ public class StaffServiceSMOImpl extends DefaultAbstractComponentSMO implements
     @Autowired
     private RestTemplate restTemplate;
 
+    @Autowired
+    private IOrgStaffRelInnerServiceSMO iOrgStaffRelInnerServiceSMO;
+
+    @Autowired
+    private IMenuInnerServiceSMO menuInnerServiceSMOImpl;
+
     /**
      * 添加员工信息
      *
@@ -81,12 +94,32 @@ public class StaffServiceSMOImpl extends DefaultAbstractComponentSMO implements
 
         Assert.jsonObjectHaveKey(pd.getReqData(), "page", "请求报文中未包含page节点");
         Assert.jsonObjectHaveKey(pd.getReqData(), "row", "请求报文中未包含rows节点");
+
         JSONObject paramIn = JSONObject.parseObject(pd.getReqData());
         Assert.isInteger(paramIn.getString("page"), "page不是数字");
         Assert.isInteger(paramIn.getString("row"), "rows不是数字");
         int page = Integer.parseInt(paramIn.getString("page"));
         int rows = Integer.parseInt(paramIn.getString("row"));
         String staffName = paramIn.getString("staffName");
+        //2级别组织信息
+        if (paramIn.containsKey("orgLevel") && paramIn.getString("orgLevel").equals("2")) {
+            //默认只查看当前归属组织架构
+            BasePrivilegeDto basePrivilegeDto = new BasePrivilegeDto();
+            basePrivilegeDto.setResource("/viewAllOrganization");
+            basePrivilegeDto.setUserId(pd.getUserId());
+            List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto);
+            if (privileges.size() == 0) {
+                //查询员工所属二级组织架构
+                OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto();
+                orgStaffRelDto.setStaffId(pd.getUserId());
+                List<OrgStaffRelDto> orgStaffRelDtos = iOrgStaffRelInnerServiceSMO.queryOrgInfoByStaffIds(orgStaffRelDto);
+                if (orgStaffRelDtos.size() > 0) {
+                    paramIn.put("branchOrgId", orgStaffRelDtos.get(0).getCompanyId());//当前人虽归属的二级组织信息
+                    paramIn.put("parentOrgId", orgStaffRelDtos.get(0).getCompanyId());//当前人虽归属的二级组织信息
+                }
+
+            }
+        }
 
         if (rows > 50) {
             return new ResponseEntity<String>("rows 数量不能大于50", HttpStatus.BAD_REQUEST);

+ 9 - 0
service-community/src/main/java/com/java110/community/dao/IResourceStoreServiceDao.java

@@ -21,4 +21,13 @@ public interface IResourceStoreServiceDao {
      */
     int getResourceStoresCount(Map info);
 
+    /**
+     * 查询资源总数
+     *
+     * @param info 资源信息
+     * @return 资源数量
+     */
+    String queryResourceStoresTotalPrice(Map info);
+
+
 }

+ 17 - 0
service-community/src/main/java/com/java110/community/dao/impl/ResourceStoreServiceDaoImpl.java

@@ -36,4 +36,21 @@ public class ResourceStoreServiceDaoImpl extends BaseServiceDao implements IReso
         }
         return Integer.parseInt(businessRoomRenovationInfos.get(0).get("count").toString());
     }
+
+    /**
+     * 查询资源总价
+     *
+     * @param info 资源信息
+     * @return 资源数量
+     */
+    @Override
+    public String queryResourceStoresTotalPrice(Map info) {
+        logger.debug("查询资源数据 入参 info : {}", info);
+        List<Map> businessResourceStoreInfos = sqlSessionTemplate.selectList("resourceResourceStoreServiceDaoImpl.queryResourceStoresTotalPrice", info);
+        if (businessResourceStoreInfos.size() < 1) {
+            return "0";
+        }
+        return businessResourceStoreInfos.get(0).get("totalPrice").toString();
+    }
+
 }

+ 1 - 2
service-job/src/main/java/com/java110/job/adapt/hcGov/car/AddCarToHcGovReturnAdapt.java

@@ -41,6 +41,7 @@ public class AddCarToHcGovReturnAdapt implements IReportReturnDataAdapt {
 
     @Autowired
     private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl;
+
     @Autowired
     private IHcGovTranslateInnerServiceSMO hcGovTranslateInnerServiceSMOImpl;
 
@@ -73,7 +74,5 @@ public class AddCarToHcGovReturnAdapt implements IReportReturnDataAdapt {
                 throw new IllegalArgumentException("保存楼栋属性失败");
             }
         }
-
-
     }
 }

+ 14 - 0
service-job/src/main/java/com/java110/job/adapt/hcIot/car/AddCarToIotAdapt.java

@@ -18,9 +18,12 @@ package com.java110.job.adapt.hcIot.car;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
 import com.java110.dto.parking.ParkingSpaceDto;
+import com.java110.dto.parkingAreaAttr.ParkingAreaAttrDto;
 import com.java110.entity.order.Business;
 import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO;
 import com.java110.intf.user.IOwnerCarInnerServiceSMO;
 import com.java110.job.adapt.DatabusAdaptImpl;
 import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn;
@@ -52,6 +55,9 @@ public class AddCarToIotAdapt extends DatabusAdaptImpl {
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
+    @Autowired
+    private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl;
+
     @Autowired
     private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
 
@@ -125,6 +131,13 @@ public class AddCarToIotAdapt extends DatabusAdaptImpl {
         ownerCarDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
         long parkingSpaceCount = ownerCarInnerServiceSMOImpl.queryOwnerParkingSpaceCount(ownerCarDto);
 
+        //查询属性
+        OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto();
+        ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId());
+        ownerCarAttrDto.setCommunityId(ownerCarDtos.get(0).getCommunityId());
+        List<OwnerCarAttrDto> parkingAreaAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto);
+
+
         JSONObject postParameters = new JSONObject();
 
         postParameters.put("carNum", ownerCarDtos.get(0).getCarNum());
@@ -137,6 +150,7 @@ public class AddCarToIotAdapt extends DatabusAdaptImpl {
         postParameters.put("extCarId", ownerCarDtos.get(0).getCarId());
         postParameters.put("parkingNum", parkingSpaceCount);
         postParameters.put("extCommunityId", ownerCarDtos.get(0).getCommunityId());
+        postParameters.put("attrs", parkingAreaAttrDtos);
         hcOwnerCarAsynImpl.addOwnerCar(postParameters);
     }
 }

+ 14 - 0
service-job/src/main/java/com/java110/job/adapt/hcIot/car/DeleteCarToIotAdapt.java

@@ -18,9 +18,11 @@ package com.java110.job.adapt.hcIot.car;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
 import com.java110.dto.parking.ParkingSpaceDto;
 import com.java110.entity.order.Business;
 import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO;
 import com.java110.intf.user.IOwnerCarInnerServiceSMO;
 import com.java110.job.adapt.DatabusAdaptImpl;
 import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn;
@@ -50,6 +52,10 @@ public class DeleteCarToIotAdapt extends DatabusAdaptImpl {
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
+
+    @Autowired
+    private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl;
+
     @Autowired
     private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
 
@@ -108,6 +114,13 @@ public class DeleteCarToIotAdapt extends DatabusAdaptImpl {
         ownerCarDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
         long parkingSpaceCount = ownerCarInnerServiceSMOImpl.queryOwnerParkingSpaceCount(ownerCarDto);
 
+
+        //查询属性
+        OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto();
+        ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId());
+        ownerCarAttrDto.setCommunityId(ownerCarDtos.get(0).getCommunityId());
+        List<OwnerCarAttrDto> parkingAreaAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto);
+
         JSONObject postParameters = new JSONObject();
         postParameters.put("extCarId", ownerCarDtos.get(0).getCarId());
         postParameters.put("carNum", ownerCarDtos.get(0).getCarNum());
@@ -118,6 +131,7 @@ public class DeleteCarToIotAdapt extends DatabusAdaptImpl {
         postParameters.put("extCarId", ownerCarDtos.get(0).getCarId());
         postParameters.put("parkingNum", parkingSpaceCount);
         postParameters.put("extCommunityId", ownerCarDtos.get(0).getCommunityId());
+        postParameters.put("attrs", parkingAreaAttrDtos);
         hcOwnerCarAsynImpl.deleteOwnerCar(postParameters);
     }
 }

+ 14 - 0
service-job/src/main/java/com/java110/job/adapt/hcIot/car/ModifyCarToIotAdapt.java

@@ -18,9 +18,11 @@ package com.java110.job.adapt.hcIot.car;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.dto.owner.OwnerCarDto;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
 import com.java110.dto.parking.ParkingSpaceDto;
 import com.java110.entity.order.Business;
 import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.user.IOwnerCarAttrInnerServiceSMO;
 import com.java110.intf.user.IOwnerCarInnerServiceSMO;
 import com.java110.job.adapt.DatabusAdaptImpl;
 import com.java110.job.adapt.hcIot.asyn.IIotSendAsyn;
@@ -50,6 +52,9 @@ public class ModifyCarToIotAdapt extends DatabusAdaptImpl {
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
+    @Autowired
+    private IOwnerCarAttrInnerServiceSMO ownerCarAttrInnerServiceSMOImpl;
+
     @Autowired
     private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
 
@@ -121,6 +126,14 @@ public class ModifyCarToIotAdapt extends DatabusAdaptImpl {
         ownerCarDto.setCommunityId(ownerCarPo.getCommunityId());
         ownerCarDto.setStatusCd(StatusConstant.STATUS_CD_VALID);
         long parkingSpaceCount = ownerCarInnerServiceSMOImpl.queryOwnerParkingSpaceCount(ownerCarDto);
+
+        //查询属性
+        OwnerCarAttrDto ownerCarAttrDto = new OwnerCarAttrDto();
+        ownerCarAttrDto.setCarId(ownerCarDtos.get(0).getCarId());
+        ownerCarAttrDto.setCommunityId(ownerCarDtos.get(0).getCommunityId());
+        List<OwnerCarAttrDto> parkingAreaAttrDtos = ownerCarAttrInnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto);
+
+
         JSONObject postParameters = new JSONObject();
 
         postParameters.put("carNum", ownerCarDtos.get(0).getCarNum());
@@ -133,6 +146,7 @@ public class ModifyCarToIotAdapt extends DatabusAdaptImpl {
         postParameters.put("extCarId", ownerCarDtos.get(0).getCarId());
         postParameters.put("parkingNum", parkingSpaceCount);
         postParameters.put("extCommunityId", ownerCarDtos.get(0).getCommunityId());
+        postParameters.put("attrs", parkingAreaAttrDtos);
         hcOwnerCarAsynImpl.updateOwnerCar(postParameters);
     }
 }

+ 9 - 0
service-store/src/main/java/com/java110/store/dao/IResourceStoreServiceDao.java

@@ -74,4 +74,13 @@ public interface IResourceStoreServiceDao {
      */
     int queryResourceStoresCount(Map info);
 
+    /**
+     * 查询资源总数
+     *
+     * @param info 资源信息
+     * @return 资源数量
+     */
+    String queryResourceStoresTotalPrice(Map info);
+
+
 }

+ 17 - 0
service-store/src/main/java/com/java110/store/dao/impl/ResourceStoreServiceDaoImpl.java

@@ -132,4 +132,21 @@ public class ResourceStoreServiceDaoImpl extends BaseServiceDao implements IReso
         return Integer.parseInt(businessResourceStoreInfos.get(0).get("count").toString());
     }
 
+    /**
+     * 查询资源总价
+     *
+     * @param info 资源信息
+     * @return 资源数量
+     */
+    @Override
+    public String queryResourceStoresTotalPrice(Map info) {
+        logger.debug("查询资源数据 入参 info : {}", info);
+        List<Map> businessResourceStoreInfos = sqlSessionTemplate.selectList("resourceResourceStoreServiceDaoImpl.queryResourceStoresTotalPrice", info);
+        if (businessResourceStoreInfos.size() < 1) {
+            return "0";
+        }
+        return businessResourceStoreInfos.get(0).get("totalPrice").toString();
+    }
+
+
 }

+ 11 - 0
service-store/src/main/java/com/java110/store/smo/impl/ResourceStoreInnerServiceSMOImpl.java

@@ -145,6 +145,17 @@ public class ResourceStoreInnerServiceSMOImpl extends BaseServiceSMO implements
         this.resourceResourceStoreServiceDaoImpl = resourceResourceStoreServiceDaoImpl;
     }
 
+    @Override
+    public String queryResourceStoresTotalPrice(@RequestBody ResourceStoreDto resourceResourceStoreDto) {
+        //校验是否传了 分页信息
+        int page = resourceResourceStoreDto.getPage();
+        if (page != PageDto.DEFAULT_PAGE) {
+            resourceResourceStoreDto.setPage((page - 1) * resourceResourceStoreDto.getRow());
+        }
+        return resourceResourceStoreServiceDaoImpl.queryResourceStoresTotalPrice(BeanConvertUtil.beanCovertMap(resourceResourceStoreDto));
+
+    }
+
     public IUserInnerServiceSMO getUserInnerServiceSMOImpl() {
         return userInnerServiceSMOImpl;
     }

+ 71 - 0
service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/DeleteOwnerCarAttrCmd.java

@@ -0,0 +1,71 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.cmd.ownerCarAttr;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+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.user.IOwnerCarAttrV1InnerServiceSMO;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/**
+ * 类表述:删除
+ * 服务编码:ownerCarAttr.deleteOwnerCarAttr
+ * 请求路劲:/app/ownerCarAttr.DeleteOwnerCarAttr
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerCarAttr.deleteOwnerCarAttr")
+public class DeleteOwnerCarAttrCmd extends AbstractServiceCmdListener {
+    private static Logger logger = LoggerFactory.getLogger(DeleteOwnerCarAttrCmd.class);
+
+    @Autowired
+    private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+        Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+        OwnerCarAttrPo ownerCarAttrPo = BeanConvertUtil.covertBean(reqJson, OwnerCarAttrPo.class);
+        int flag = ownerCarAttrV1InnerServiceSMOImpl.deleteOwnerCarAttr(ownerCarAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("删除数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 84 - 0
service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/ListOwnerCarAttrCmd.java

@@ -0,0 +1,84 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.cmd.ownerCarAttr;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+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.core.factory.GenerateCodeFactory;
+import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
+import java.util.List;
+import java.util.ArrayList;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.HttpStatus;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:查询
+ * 服务编码:ownerCarAttr.listOwnerCarAttr
+ * 请求路劲:/app/ownerCarAttr.ListOwnerCarAttr
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerCarAttr.listOwnerCarAttr")
+public class ListOwnerCarAttrCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(ListOwnerCarAttrCmd.class);
+    @Autowired
+    private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        super.validatePageInfo(reqJson);
+    }
+
+    @Override
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+           OwnerCarAttrDto ownerCarAttrDto = BeanConvertUtil.covertBean(reqJson, OwnerCarAttrDto.class);
+
+           int count = ownerCarAttrV1InnerServiceSMOImpl.queryOwnerCarAttrsCount(ownerCarAttrDto);
+
+           List<OwnerCarAttrDto> ownerCarAttrDtos = null;
+
+           if (count > 0) {
+               ownerCarAttrDtos = ownerCarAttrV1InnerServiceSMOImpl.queryOwnerCarAttrs(ownerCarAttrDto);
+           } else {
+               ownerCarAttrDtos = new ArrayList<>();
+           }
+
+           ResultVo resultVo = new ResultVo((int) Math.ceil((double) count / (double) reqJson.getInteger("row")), count, ownerCarAttrDtos);
+
+           ResponseEntity<String> responseEntity = new ResponseEntity<String>(resultVo.toString(), HttpStatus.OK);
+
+           cmdDataFlowContext.setResponseEntity(responseEntity);
+    }
+}

+ 78 - 0
service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/SaveOwnerCarAttrCmd.java

@@ -0,0 +1,78 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.cmd.ownerCarAttr;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+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.core.factory.GenerateCodeFactory;
+import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * 类表述:保存
+ * 服务编码:ownerCarAttr.saveOwnerCarAttr
+ * 请求路劲:/app/ownerCarAttr.SaveOwnerCarAttr
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerCarAttr.saveOwnerCarAttr")
+public class SaveOwnerCarAttrCmd extends AbstractServiceCmdListener {
+
+    private static Logger logger = LoggerFactory.getLogger(SaveOwnerCarAttrCmd.class);
+
+    public static final String CODE_PREFIX_ID = "10";
+
+    @Autowired
+    private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "memberId", "请求报文中未包含memberId");
+Assert.hasKeyAndValue(reqJson, "communityId", "请求报文中未包含communityId");
+Assert.hasKeyAndValue(reqJson, "specCd", "请求报文中未包含specCd");
+Assert.hasKeyAndValue(reqJson, "value", "请求报文中未包含value");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerCarAttrPo ownerCarAttrPo = BeanConvertUtil.covertBean(reqJson, OwnerCarAttrPo.class);
+        ownerCarAttrPo.setAttrId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
+        int flag = ownerCarAttrV1InnerServiceSMOImpl.saveOwnerCarAttr(ownerCarAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("保存数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 75 - 0
service-user/src/main/java/com/java110/user/cmd/ownerCarAttr/UpdateOwnerCarAttrCmd.java

@@ -0,0 +1,75 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.cmd.ownerCarAttr;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.core.annotation.Java110Cmd;
+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.core.factory.GenerateCodeFactory;
+import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import com.java110.utils.exception.CmdException;
+import com.java110.utils.util.Assert;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * 类表述:更新
+ * 服务编码:ownerCarAttr.updateOwnerCarAttr
+ * 请求路劲:/app/ownerCarAttr.UpdateOwnerCarAttr
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Java110Cmd(serviceCode = "ownerCarAttr.updateOwnerCarAttr")
+public class UpdateOwnerCarAttrCmd extends AbstractServiceCmdListener {
+
+  private static Logger logger = LoggerFactory.getLogger(UpdateOwnerCarAttrCmd.class);
+
+
+    @Autowired
+    private IOwnerCarAttrV1InnerServiceSMO ownerCarAttrV1InnerServiceSMOImpl;
+
+    @Override
+    public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
+        Assert.hasKeyAndValue(reqJson, "attrId", "attrId不能为空");
+Assert.hasKeyAndValue(reqJson, "communityId", "communityId不能为空");
+
+    }
+
+    @Override
+    @Java110Transactional
+    public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
+
+       OwnerCarAttrPo ownerCarAttrPo = BeanConvertUtil.covertBean(reqJson, OwnerCarAttrPo.class);
+        int flag = ownerCarAttrV1InnerServiceSMOImpl.updateOwnerCarAttr(ownerCarAttrPo);
+
+        if (flag < 1) {
+            throw new CmdException("更新数据失败");
+        }
+
+        cmdDataFlowContext.setResponseEntity(ResultVo.success());
+    }
+}

+ 77 - 0
service-user/src/main/java/com/java110/user/dao/IOwnerCarAttrV1ServiceDao.java

@@ -0,0 +1,77 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.dao;
+
+
+import com.java110.utils.exception.DAOException;
+import com.java110.entity.merchant.BoMerchant;
+import com.java110.entity.merchant.BoMerchantAttr;
+import com.java110.entity.merchant.Merchant;
+import com.java110.entity.merchant.MerchantAttr;
+
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+public interface IOwnerCarAttrV1ServiceDao {
+
+
+    /**
+     * 保存 车辆属性信息
+     * @param info
+     * @throws DAOException DAO异常
+     */
+    int saveOwnerCarAttrInfo(Map info) throws DAOException;
+
+
+
+
+    /**
+     * 查询车辆属性信息(instance过程)
+     * 根据bId 查询车辆属性信息
+     * @param info bId 信息
+     * @return 车辆属性信息
+     * @throws DAOException DAO异常
+     */
+    List<Map> getOwnerCarAttrInfo(Map info) throws DAOException;
+
+
+
+    /**
+     * 修改车辆属性信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    int updateOwnerCarAttrInfo(Map info) throws DAOException;
+
+
+    /**
+     * 查询车辆属性总数
+     *
+     * @param info 车辆属性信息
+     * @return 车辆属性数量
+     */
+    int queryOwnerCarAttrsCount(Map info);
+
+}

+ 112 - 0
service-user/src/main/java/com/java110/user/dao/impl/OwnerCarAttrV1ServiceDaoImpl.java

@@ -0,0 +1,112 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.dao.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.utils.constant.ResponseConstant;
+import com.java110.utils.exception.DAOException;
+import com.java110.utils.util.DateUtil;
+import com.java110.core.base.dao.BaseServiceDao;
+import com.java110.user.dao.IOwnerCarAttrV1ServiceDao;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 类表述:
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@Service("ownerCarAttrV1ServiceDaoImpl")
+public class OwnerCarAttrV1ServiceDaoImpl extends BaseServiceDao implements IOwnerCarAttrV1ServiceDao {
+
+    private static Logger logger = LoggerFactory.getLogger(OwnerCarAttrV1ServiceDaoImpl.class);
+
+
+
+
+
+    /**
+     * 保存车辆属性信息 到 instance
+     * @param info   bId 信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int saveOwnerCarAttrInfo(Map info) throws DAOException {
+        logger.debug("保存 saveOwnerCarAttrInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.insert("ownerCarAttrV1ServiceDaoImpl.saveOwnerCarAttrInfo",info);
+
+        return saveFlag;
+    }
+
+
+    /**
+     * 查询车辆属性信息(instance)
+     * @param info bId 信息
+     * @return List<Map>
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public List<Map> getOwnerCarAttrInfo(Map info) throws DAOException {
+        logger.debug("查询 getOwnerCarAttrInfo 入参 info : {}",info);
+
+        List<Map> businessOwnerCarAttrInfos = sqlSessionTemplate.selectList("ownerCarAttrV1ServiceDaoImpl.getOwnerCarAttrInfo",info);
+
+        return businessOwnerCarAttrInfos;
+    }
+
+
+    /**
+     * 修改车辆属性信息
+     * @param info 修改信息
+     * @throws DAOException DAO异常
+     */
+    @Override
+    public int updateOwnerCarAttrInfo(Map info) throws DAOException {
+        logger.debug("修改 updateOwnerCarAttrInfo 入参 info : {}",info);
+
+        int saveFlag = sqlSessionTemplate.update("ownerCarAttrV1ServiceDaoImpl.updateOwnerCarAttrInfo",info);
+
+        return saveFlag;
+    }
+
+     /**
+     * 查询车辆属性数量
+     * @param info 车辆属性信息
+     * @return 车辆属性数量
+     */
+    @Override
+    public int queryOwnerCarAttrsCount(Map info) {
+        logger.debug("查询 queryOwnerCarAttrsCount 入参 info : {}",info);
+
+        List<Map> businessOwnerCarAttrInfos = sqlSessionTemplate.selectList("ownerCarAttrV1ServiceDaoImpl.queryOwnerCarAttrsCount", info);
+        if (businessOwnerCarAttrInfos.size() < 1) {
+            return 0;
+        }
+
+        return Integer.parseInt(businessOwnerCarAttrInfos.get(0).get("count").toString());
+    }
+
+
+}

+ 89 - 0
service-user/src/main/java/com/java110/user/smo/impl/OwnerCarAttrV1InnerServiceSMOImpl.java

@@ -0,0 +1,89 @@
+/*
+ * Copyright 2017-2020 吴学文 and java110 team.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.java110.user.smo.impl;
+
+
+import com.java110.user.dao.IOwnerCarAttrV1ServiceDao;
+import com.java110.intf.user.IOwnerCarAttrV1InnerServiceSMO;
+import com.java110.dto.ownerCarAttr.OwnerCarAttrDto;
+import com.java110.po.ownerCarAttr.OwnerCarAttrPo;
+import com.java110.utils.util.BeanConvertUtil;
+import com.java110.core.base.smo.BaseServiceSMO;
+import com.java110.dto.user.UserDto;
+import com.java110.dto.PageDto;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * 类表述: 服务之前调用的接口实现类,不对外提供接口能力 只用于接口建调用
+ * add by 吴学文 at 2022-03-14 18:31:37 mail: 928255095@qq.com
+ * open source address: https://gitee.com/wuxw7/MicroCommunity
+ * 官网:http://www.homecommunity.cn
+ * 温馨提示:如果您对此文件进行修改 请不要删除原有作者及注释信息,请补充您的 修改的原因以及联系邮箱如下
+ * // modify by 张三 at 2021-09-12 第10行在某种场景下存在某种bug 需要修复,注释10至20行 加入 20行至30行
+ */
+@RestController
+public class OwnerCarAttrV1InnerServiceSMOImpl extends BaseServiceSMO implements IOwnerCarAttrV1InnerServiceSMO {
+
+    @Autowired
+    private IOwnerCarAttrV1ServiceDao ownerCarAttrV1ServiceDaoImpl;
+
+
+    @Override
+    public int saveOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo) {
+        int saveFlag = ownerCarAttrV1ServiceDaoImpl.saveOwnerCarAttrInfo(BeanConvertUtil.beanCovertMap(ownerCarAttrPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int updateOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo) {
+        int saveFlag = ownerCarAttrV1ServiceDaoImpl.updateOwnerCarAttrInfo(BeanConvertUtil.beanCovertMap(ownerCarAttrPo));
+        return saveFlag;
+    }
+
+     @Override
+    public int deleteOwnerCarAttr(@RequestBody  OwnerCarAttrPo ownerCarAttrPo) {
+       ownerCarAttrPo.setStatusCd("1");
+       int saveFlag = ownerCarAttrV1ServiceDaoImpl.updateOwnerCarAttrInfo(BeanConvertUtil.beanCovertMap(ownerCarAttrPo));
+       return saveFlag;
+    }
+
+    @Override
+    public List<OwnerCarAttrDto> queryOwnerCarAttrs(@RequestBody  OwnerCarAttrDto ownerCarAttrDto) {
+
+        //校验是否传了 分页信息
+
+        int page = ownerCarAttrDto.getPage();
+
+        if (page != PageDto.DEFAULT_PAGE) {
+            ownerCarAttrDto.setPage((page - 1) * ownerCarAttrDto.getRow());
+        }
+
+        List<OwnerCarAttrDto> ownerCarAttrs = BeanConvertUtil.covertBeanList(ownerCarAttrV1ServiceDaoImpl.getOwnerCarAttrInfo(BeanConvertUtil.beanCovertMap(ownerCarAttrDto)), OwnerCarAttrDto.class);
+
+        return ownerCarAttrs;
+    }
+
+
+    @Override
+    public int queryOwnerCarAttrsCount(@RequestBody OwnerCarAttrDto ownerCarAttrDto) {
+        return ownerCarAttrV1ServiceDaoImpl.queryOwnerCarAttrsCount(BeanConvertUtil.beanCovertMap(ownerCarAttrDto));    }
+
+}