Browse Source

优化代码

java110 5 years ago
parent
commit
3eb2e4acc2

+ 144 - 139
java110-db/src/main/resources/mapper/community/FloorAttrServiceDaoImplMapper.xml

@@ -5,168 +5,173 @@
 <mapper namespace="floorAttrServiceDaoImpl">
 
     <!-- 保存考勤班组属性信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessFloorAttrInfo" parameterType="Map">
-           insert into business_floor_attr(
-floor_id,attr_id,operate,spec_cd,community_id,b_id,value
-) values (
-#{floorId},#{attrId},#{operate},#{specCd},#{communityId},#{bId},#{value}
-)
-       </insert>
-
-
-       <!-- 查询考勤班组属性信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessFloorAttrInfo" parameterType="Map" resultType="Map">
-           select  t.floor_id,t.floor_id floorId,t.attr_id,t.attr_id attrId,t.operate,t.spec_cd,t.spec_cd specCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value 
-from business_floor_attr t 
-where 1 =1 
-<if test="floorId !=null and floorId != ''">
-   and t.floor_id= #{floorId}
-</if> 
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-
-       </select>
+    <insert id="saveBusinessFloorAttrInfo" parameterType="Map">
+        insert into business_floor_attr(
+        floor_id,attr_id,operate,spec_cd,community_id,b_id,value
+        ) values (
+        #{floorId},#{attrId},#{operate},#{specCd},#{communityId},#{bId},#{value}
+        )
+    </insert>
 
+    <!--保存楼栋属性-->
+    <insert id="saveFloorAttr" parameterType="Map">
+        insert into f_floor_attr(
+            floor_id,attr_id,spec_cd,community_id,b_id,value
+        ) values (
+            #{floorId},#{attrId},#{specCd},#{communityId},'-1',#{value}
+        )
+    </insert>
 
+    <!-- 查询考勤班组属性信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessFloorAttrInfo" parameterType="Map" resultType="Map">
+        select t.floor_id,t.floor_id floorId,t.attr_id,t.attr_id attrId,t.operate,t.spec_cd,t.spec_cd
+        specCd,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.value
+        from business_floor_attr t
+        where 1 =1
+        <if test="floorId !=null and floorId != ''">
+            and t.floor_id= #{floorId}
+        </if>
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
 
+    </select>
 
 
     <!-- 保存考勤班组属性信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveFloorAttrInfoInstance" parameterType="Map">
         insert into f_floor_attr(
-floor_id,attr_id,spec_cd,status_cd,community_id,b_id,value
-) select t.floor_id,t.attr_id,t.spec_cd,'0',t.community_id,t.b_id,t.value from business_floor_attr t where 1=1
-<if test="floorId !=null and floorId != ''">
-   and t.floor_id= #{floorId}
-</if> 
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-   and t.operate= 'ADD'
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
+        floor_id,attr_id,spec_cd,status_cd,community_id,b_id,value
+        ) select t.floor_id,t.attr_id,t.spec_cd,'0',t.community_id,t.b_id,t.value from business_floor_attr t where 1=1
+        <if test="floorId !=null and floorId != ''">
+            and t.floor_id= #{floorId}
+        </if>
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        and t.operate= 'ADD'
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
 
     </insert>
 
 
-
     <!-- 查询考勤班组属性信息 add by wuxw 2018-07-03 -->
     <select id="getFloorAttrInfo" parameterType="Map" resultType="Map">
-        select  t.floor_id,t.floor_id floorId,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.b_id,t.b_id bId,t.value 
-from f_floor_attr t 
-where 1 =1 
-<if test="floorId !=null and floorId != ''">
-   and t.floor_id= #{floorId}
-</if> 
-<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="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</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.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.b_id,t.b_id bId,t.value
+        from f_floor_attr t
+        where 1 =1
+        <if test="floorId !=null and floorId != ''">
+            and t.floor_id= #{floorId}
+        </if>
+        <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="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </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="updateFloorAttrInfoInstance" parameterType="Map">
-        update  f_floor_attr 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="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> 
- where 1=1 <if test="attrId !=null and attrId != ''">
-and t.attr_id= #{attrId}
-</if> 
-<if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
+        update f_floor_attr 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="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>
+        where 1=1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
 
     </update>
 
     <!-- 查询考勤班组属性数量 add by wuxw 2018-07-03 -->
-     <select id="queryFloorAttrsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from f_floor_attr t 
-where 1 =1 
-<if test="floorId !=null and floorId != ''">
-   and t.floor_id= #{floorId}
-</if> 
-<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="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-
-
-     </select>
+    <select id="queryFloorAttrsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from f_floor_attr t
+        where 1 =1
+        <if test="floorId !=null and floorId != ''">
+            and t.floor_id= #{floorId}
+        </if>
+        <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="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+
+
+    </select>
 
 </mapper>

+ 131 - 124
java110-db/src/main/resources/mapper/community/UnitAttrServiceDaoImplMapper.xml

@@ -5,153 +5,160 @@
 <mapper namespace="unitAttrServiceDaoImpl">
 
     <!-- 保存单元属性信息 add by wuxw 2018-07-03 -->
-       <insert id="saveBusinessUnitAttrInfo" parameterType="Map">
-           insert into business_building_unit_attr(
-attr_id,operate,unit_id,spec_cd,b_id,value
-) values (
-#{attrId},#{operate},#{unitId},#{specCd},#{bId},#{value}
-)
-       </insert>
-
-
-       <!-- 查询单元属性信息(Business) add by wuxw 2018-07-03 -->
-       <select id="getBusinessUnitAttrInfo" parameterType="Map" resultType="Map">
-           select  t.attr_id,t.attr_id attrId,t.operate,t.unit_id,t.unit_id unitId,t.spec_cd,t.spec_cd specCd,t.b_id,t.b_id bId,t.value 
-from business_building_unit_attr t 
-where 1 =1 
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-<if test="operate !=null and operate != ''">
-   and t.operate= #{operate}
-</if> 
-<if test="unitId !=null and unitId != ''">
-   and t.unit_id= #{unitId}
-</if> 
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-
-       </select>
+    <insert id="saveBusinessUnitAttrInfo" parameterType="Map">
+        insert into business_building_unit_attr(
+        attr_id,operate,unit_id,spec_cd,b_id,value
+        ) values (
+        #{attrId},#{operate},#{unitId},#{specCd},#{bId},#{value}
+        )
+    </insert>
+
 
 
+    <insert id="saveUnitAttr" parameterType="Map">
+        insert into building_unit_attr(
+        attr_id,unit_id,spec_cd,b_id,value
+        ) values (
+        #{attrId},#{unitId},#{specCd},'-1',#{value}
+        )
+    </insert>
 
 
+    <!-- 查询单元属性信息(Business) add by wuxw 2018-07-03 -->
+    <select id="getBusinessUnitAttrInfo" parameterType="Map" resultType="Map">
+        select t.attr_id,t.attr_id attrId,t.operate,t.unit_id,t.unit_id unitId,t.spec_cd,t.spec_cd specCd,t.b_id,t.b_id
+        bId,t.value
+        from business_building_unit_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="operate !=null and operate != ''">
+            and t.operate= #{operate}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            and t.unit_id= #{unitId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+
+    </select>
+
 
     <!-- 保存单元属性信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveUnitAttrInfoInstance" parameterType="Map">
         insert into building_unit_attr(
-attr_id,unit_id,spec_cd,status_cd,b_id,value
-) select t.attr_id,t.unit_id,t.spec_cd,'0',t.b_id,t.value from business_building_unit_attr t where 1=1
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-   and t.operate= 'ADD'
-<if test="unitId !=null and unitId != ''">
-   and t.unit_id= #{unitId}
-</if> 
-<if test="specCd !=null and specCd != ''">
-   and t.spec_cd= #{specCd}
-</if> 
-<if test="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
+        attr_id,unit_id,spec_cd,status_cd,b_id,value
+        ) select t.attr_id,t.unit_id,t.spec_cd,'0',t.b_id,t.value from business_building_unit_attr t where 1=1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        and t.operate= 'ADD'
+        <if test="unitId !=null and unitId != ''">
+            and t.unit_id= #{unitId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            and t.spec_cd= #{specCd}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
 
     </insert>
 
 
-
     <!-- 查询单元属性信息 add by wuxw 2018-07-03 -->
     <select id="getUnitAttrInfo" parameterType="Map" resultType="Map">
-        select  t.attr_id,t.attr_id attrId,t.unit_id,t.unit_id unitId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd statusCd,t.b_id,t.b_id bId,t.value 
-from building_unit_attr t 
-where 1 =1 
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-<if test="unitId !=null and unitId != ''">
-   and t.unit_id= #{unitId}
-</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="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.attr_id,t.attr_id attrId,t.unit_id,t.unit_id unitId,t.spec_cd,t.spec_cd specCd,t.status_cd,t.status_cd
+        statusCd,t.b_id,t.b_id bId,t.value
+        from building_unit_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            and t.unit_id= #{unitId}
+        </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="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </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="updateUnitAttrInfoInstance" parameterType="Map">
-        update  building_unit_attr t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="unitId !=null and unitId != ''">
-, t.unit_id= #{unitId}
-</if> 
-<if test="specCd !=null and specCd != ''">
-, t.spec_cd= #{specCd}
-</if> 
-<if test="value !=null and value != ''">
-, t.value= #{value}
-</if> 
- where 1=1 <if test="attrId !=null and attrId != ''">
-and t.attr_id= #{attrId}
-</if> 
-<if test="bId !=null and bId != ''">
-and t.b_id= #{bId}
-</if> 
+        update building_unit_attr t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            , t.unit_id= #{unitId}
+        </if>
+        <if test="specCd !=null and specCd != ''">
+            , t.spec_cd= #{specCd}
+        </if>
+        <if test="value !=null and value != ''">
+            , t.value= #{value}
+        </if>
+        where 1=1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
 
     </update>
 
     <!-- 查询单元属性数量 add by wuxw 2018-07-03 -->
-     <select id="queryUnitAttrsCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from building_unit_attr t 
-where 1 =1 
-<if test="attrId !=null and attrId != ''">
-   and t.attr_id= #{attrId}
-</if> 
-<if test="unitId !=null and unitId != ''">
-   and t.unit_id= #{unitId}
-</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="bId !=null and bId != ''">
-   and t.b_id= #{bId}
-</if> 
-<if test="value !=null and value != ''">
-   and t.value= #{value}
-</if> 
-
-
-     </select>
+    <select id="queryUnitAttrsCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from building_unit_attr t
+        where 1 =1
+        <if test="attrId !=null and attrId != ''">
+            and t.attr_id= #{attrId}
+        </if>
+        <if test="unitId !=null and unitId != ''">
+            and t.unit_id= #{unitId}
+        </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="bId !=null and bId != ''">
+            and t.b_id= #{bId}
+        </if>
+        <if test="value !=null and value != ''">
+            and t.value= #{value}
+        </if>
+
+
+    </select>
 
 </mapper>

+ 11 - 1
java110-core/src/main/java/com/java110/core/smo/community/IFloorAttrInnerServiceSMO.java

@@ -1,4 +1,4 @@
-package com.java110.core.smo.community;
+package com.java110.intf.community;
 
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.floorAttr.FloorAttrDto;
@@ -39,4 +39,14 @@ public interface IFloorAttrInnerServiceSMO {
      */
     @RequestMapping(value = "/queryFloorAttrsCount", method = RequestMethod.POST)
     int queryFloorAttrsCount(@RequestBody FloorAttrDto floorAttrDto);
+
+
+    /**
+     * 保存 楼栋属性
+     *
+     * @param floorAttrDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/saveFloorAttr", method = RequestMethod.POST)
+    int saveFloorAttr(@RequestBody FloorAttrDto floorAttrDto);
 }

+ 11 - 2
java110-core/src/main/java/com/java110/core/smo/community/IUnitAttrInnerServiceSMO.java

@@ -1,4 +1,4 @@
-package com.java110.core.smo.community;
+package com.java110.intf.community;
 
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.unitAttr.UnitAttrDto;
@@ -24,7 +24,6 @@ public interface IUnitAttrInnerServiceSMO {
     /**
      * <p>查询小区楼信息</p>
      *
-     *
      * @param unitAttrDto 数据对象分享
      * @return UnitAttrDto 对象数据
      */
@@ -39,4 +38,14 @@ public interface IUnitAttrInnerServiceSMO {
      */
     @RequestMapping(value = "/queryUnitAttrsCount", method = RequestMethod.POST)
     int queryUnitAttrsCount(@RequestBody UnitAttrDto unitAttrDto);
+
+
+    /**
+     * 保存单元属性
+     *
+     * @param unitAttrDto 数据对象分享
+     * @return 小区下的小区楼记录数
+     */
+    @RequestMapping(value = "/saveUnitAttr", method = RequestMethod.POST)
+    int saveUnitAttr(@RequestBody UnitAttrDto unitAttrDto);
 }

+ 1 - 1
service-api/src/main/java/com/java110/api/bmo/floorAttr/impl/FloorAttrBMOImpl.java

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.ApiBaseBMO;
 import com.java110.api.bmo.floorAttr.IFloorAttrBMO;
 import com.java110.core.context.DataFlowContext;
-import com.java110.core.smo.community.IFloorAttrInnerServiceSMO;
+import com.java110.intf.community.IFloorAttrInnerServiceSMO;
 import com.java110.po.floorAttr.FloorAttrPo;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.util.BeanConvertUtil;

+ 1 - 1
service-api/src/main/java/com/java110/api/bmo/unitAttr/impl/UnitAttrBMOImpl.java

@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSONObject;
 import com.java110.api.bmo.ApiBaseBMO;
 import com.java110.api.bmo.unitAttr.IUnitAttrBMO;
 import com.java110.core.context.DataFlowContext;
-import com.java110.core.smo.community.IUnitAttrInnerServiceSMO;
+import com.java110.intf.community.IUnitAttrInnerServiceSMO;
 import com.java110.po.unitAttr.UnitAttrPo;
 import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.util.BeanConvertUtil;

+ 1 - 1
service-api/src/main/java/com/java110/api/listener/floor/ListFloorAttrsListener.java

@@ -5,7 +5,7 @@ import com.java110.api.listener.AbstractServiceApiListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.core.smo.community.IFloorAttrInnerServiceSMO;
+import com.java110.intf.community.IFloorAttrInnerServiceSMO;
 import com.java110.dto.floorAttr.FloorAttrDto;
 import com.java110.utils.constant.ServiceCodeFloorAttrConstant;
 import com.java110.utils.util.BeanConvertUtil;

+ 1 - 1
service-api/src/main/java/com/java110/api/listener/unit/ListUnitAttrsListener.java

@@ -5,7 +5,7 @@ import com.java110.api.listener.AbstractServiceApiListener;
 import com.java110.core.annotation.Java110Listener;
 import com.java110.core.context.DataFlowContext;
 import com.java110.core.event.service.api.ServiceDataFlowEvent;
-import com.java110.core.smo.community.IUnitAttrInnerServiceSMO;
+import com.java110.intf.community.IUnitAttrInnerServiceSMO;
 import com.java110.dto.unitAttr.UnitAttrDto;
 import com.java110.utils.constant.ServiceCodeUnitAttrConstant;
 import com.java110.utils.util.BeanConvertUtil;

+ 1 - 0
service-community/src/main/java/com/java110/community/dao/IFloorAttrServiceDao.java

@@ -78,4 +78,5 @@ public interface IFloorAttrServiceDao {
      */
     int queryFloorAttrsCount(Map info);
 
+    int saveFloorAttr(Map info);
 }

+ 6 - 0
service-community/src/main/java/com/java110/community/dao/IUnitAttrServiceDao.java

@@ -78,4 +78,10 @@ public interface IUnitAttrServiceDao {
      */
     int queryUnitAttrsCount(Map info);
 
+    /**
+     * 保存但愿你属性
+     * @param beanCovertMap
+     * @return
+     */
+    int saveUnitAttr(Map beanCovertMap);
 }

+ 40 - 23
service-community/src/main/java/com/java110/community/dao/impl/FloorAttrServiceDaoImpl.java

@@ -1,15 +1,14 @@
 package com.java110.community.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.community.dao.IFloorAttrServiceDao;
+import com.java110.core.base.dao.BaseServiceDao;
 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.community.dao.IFloorAttrServiceDao;
 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;
@@ -26,6 +25,7 @@ public class FloorAttrServiceDaoImpl extends BaseServiceDao implements IFloorAtt
 
     /**
      * 考勤班组属性信息封装
+     *
      * @param businessFloorAttrInfo 考勤班组属性信息 封装
      * @throws DAOException DAO异常
      */
@@ -33,17 +33,18 @@ public class FloorAttrServiceDaoImpl extends BaseServiceDao implements IFloorAtt
     public void saveBusinessFloorAttrInfo(Map businessFloorAttrInfo) throws DAOException {
         businessFloorAttrInfo.put("month", DateUtil.getCurrentMonth());
         // 查询business_user 数据是否已经存在
-        logger.debug("保存考勤班组属性信息 入参 businessFloorAttrInfo : {}",businessFloorAttrInfo);
-        int saveFlag = sqlSessionTemplate.insert("floorAttrServiceDaoImpl.saveBusinessFloorAttrInfo",businessFloorAttrInfo);
+        logger.debug("保存考勤班组属性信息 入参 businessFloorAttrInfo : {}", businessFloorAttrInfo);
+        int saveFlag = sqlSessionTemplate.insert("floorAttrServiceDaoImpl.saveBusinessFloorAttrInfo", businessFloorAttrInfo);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存考勤班组属性数据失败:"+ JSONObject.toJSONString(businessFloorAttrInfo));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存考勤班组属性数据失败:" + JSONObject.toJSONString(businessFloorAttrInfo));
         }
     }
 
 
     /**
      * 查询考勤班组属性信息
+     *
      * @param info bId 信息
      * @return 考勤班组属性信息
      * @throws DAOException DAO异常
@@ -51,43 +52,44 @@ public class FloorAttrServiceDaoImpl extends BaseServiceDao implements IFloorAtt
     @Override
     public List<Map> getBusinessFloorAttrInfo(Map info) throws DAOException {
 
-        logger.debug("查询考勤班组属性信息 入参 info : {}",info);
+        logger.debug("查询考勤班组属性信息 入参 info : {}", info);
 
-        List<Map> businessFloorAttrInfos = sqlSessionTemplate.selectList("floorAttrServiceDaoImpl.getBusinessFloorAttrInfo",info);
+        List<Map> businessFloorAttrInfos = sqlSessionTemplate.selectList("floorAttrServiceDaoImpl.getBusinessFloorAttrInfo", info);
 
         return businessFloorAttrInfos;
     }
 
 
-
     /**
      * 保存考勤班组属性信息 到 instance
-     * @param info   bId 信息
+     *
+     * @param info bId 信息
      * @throws DAOException DAO异常
      */
     @Override
     public void saveFloorAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("保存考勤班组属性信息Instance 入参 info : {}",info);
+        logger.debug("保存考勤班组属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("floorAttrServiceDaoImpl.saveFloorAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("floorAttrServiceDaoImpl.saveFloorAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存考勤班组属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存考勤班组属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
 
     /**
      * 查询考勤班组属性信息(instance)
+     *
      * @param info bId 信息
      * @return List<Map>
      * @throws DAOException DAO异常
      */
     @Override
     public List<Map> getFloorAttrInfo(Map info) throws DAOException {
-        logger.debug("查询考勤班组属性信息 入参 info : {}",info);
+        logger.debug("查询考勤班组属性信息 入参 info : {}", info);
 
-        List<Map> businessFloorAttrInfos = sqlSessionTemplate.selectList("floorAttrServiceDaoImpl.getFloorAttrInfo",info);
+        List<Map> businessFloorAttrInfos = sqlSessionTemplate.selectList("floorAttrServiceDaoImpl.getFloorAttrInfo", info);
 
         return businessFloorAttrInfos;
     }
@@ -95,28 +97,30 @@ public class FloorAttrServiceDaoImpl extends BaseServiceDao implements IFloorAtt
 
     /**
      * 修改考勤班组属性信息
+     *
      * @param info 修改信息
      * @throws DAOException DAO异常
      */
     @Override
     public void updateFloorAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("修改考勤班组属性信息Instance 入参 info : {}",info);
+        logger.debug("修改考勤班组属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("floorAttrServiceDaoImpl.updateFloorAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("floorAttrServiceDaoImpl.updateFloorAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改考勤班组属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改考勤班组属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
-     /**
+    /**
      * 查询考勤班组属性数量
+     *
      * @param info 考勤班组属性信息
      * @return 考勤班组属性数量
      */
     @Override
     public int queryFloorAttrsCount(Map info) {
-        logger.debug("查询考勤班组属性数据 入参 info : {}",info);
+        logger.debug("查询考勤班组属性数据 入参 info : {}", info);
 
         List<Map> businessFloorAttrInfos = sqlSessionTemplate.selectList("floorAttrServiceDaoImpl.queryFloorAttrsCount", info);
         if (businessFloorAttrInfos.size() < 1) {
@@ -126,5 +130,18 @@ public class FloorAttrServiceDaoImpl extends BaseServiceDao implements IFloorAtt
         return Integer.parseInt(businessFloorAttrInfos.get(0).get("count").toString());
     }
 
+    @Override
+    public int saveFloorAttr(Map info) {
+        logger.debug("保存saveFloorAttr 入参 info : {}", info);
+
+        int saveFlag = sqlSessionTemplate.insert("floorAttrServiceDaoImpl.saveFloorAttr", info);
+
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存saveFloorAttr数据失败:" + JSONObject.toJSONString(info));
+        }
+
+        return saveFlag;
+    }
+
 
 }

+ 35 - 23
service-community/src/main/java/com/java110/community/dao/impl/UnitAttrServiceDaoImpl.java

@@ -1,15 +1,14 @@
 package com.java110.community.dao.impl;
 
 import com.alibaba.fastjson.JSONObject;
+import com.java110.community.dao.IUnitAttrServiceDao;
+import com.java110.core.base.dao.BaseServiceDao;
 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.community.dao.IUnitAttrServiceDao;
 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;
@@ -26,6 +25,7 @@ public class UnitAttrServiceDaoImpl extends BaseServiceDao implements IUnitAttrS
 
     /**
      * 单元属性信息封装
+     *
      * @param businessUnitAttrInfo 单元属性信息 封装
      * @throws DAOException DAO异常
      */
@@ -33,17 +33,18 @@ public class UnitAttrServiceDaoImpl extends BaseServiceDao implements IUnitAttrS
     public void saveBusinessUnitAttrInfo(Map businessUnitAttrInfo) throws DAOException {
         businessUnitAttrInfo.put("month", DateUtil.getCurrentMonth());
         // 查询business_user 数据是否已经存在
-        logger.debug("保存单元属性信息 入参 businessUnitAttrInfo : {}",businessUnitAttrInfo);
-        int saveFlag = sqlSessionTemplate.insert("unitAttrServiceDaoImpl.saveBusinessUnitAttrInfo",businessUnitAttrInfo);
+        logger.debug("保存单元属性信息 入参 businessUnitAttrInfo : {}", businessUnitAttrInfo);
+        int saveFlag = sqlSessionTemplate.insert("unitAttrServiceDaoImpl.saveBusinessUnitAttrInfo", businessUnitAttrInfo);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存单元属性数据失败:"+ JSONObject.toJSONString(businessUnitAttrInfo));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存单元属性数据失败:" + JSONObject.toJSONString(businessUnitAttrInfo));
         }
     }
 
 
     /**
      * 查询单元属性信息
+     *
      * @param info bId 信息
      * @return 单元属性信息
      * @throws DAOException DAO异常
@@ -51,43 +52,44 @@ public class UnitAttrServiceDaoImpl extends BaseServiceDao implements IUnitAttrS
     @Override
     public List<Map> getBusinessUnitAttrInfo(Map info) throws DAOException {
 
-        logger.debug("查询单元属性信息 入参 info : {}",info);
+        logger.debug("查询单元属性信息 入参 info : {}", info);
 
-        List<Map> businessUnitAttrInfos = sqlSessionTemplate.selectList("unitAttrServiceDaoImpl.getBusinessUnitAttrInfo",info);
+        List<Map> businessUnitAttrInfos = sqlSessionTemplate.selectList("unitAttrServiceDaoImpl.getBusinessUnitAttrInfo", info);
 
         return businessUnitAttrInfos;
     }
 
 
-
     /**
      * 保存单元属性信息 到 instance
-     * @param info   bId 信息
+     *
+     * @param info bId 信息
      * @throws DAOException DAO异常
      */
     @Override
     public void saveUnitAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("保存单元属性信息Instance 入参 info : {}",info);
+        logger.debug("保存单元属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.insert("unitAttrServiceDaoImpl.saveUnitAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.insert("unitAttrServiceDaoImpl.saveUnitAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"保存单元属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "保存单元属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
 
     /**
      * 查询单元属性信息(instance)
+     *
      * @param info bId 信息
      * @return List<Map>
      * @throws DAOException DAO异常
      */
     @Override
     public List<Map> getUnitAttrInfo(Map info) throws DAOException {
-        logger.debug("查询单元属性信息 入参 info : {}",info);
+        logger.debug("查询单元属性信息 入参 info : {}", info);
 
-        List<Map> businessUnitAttrInfos = sqlSessionTemplate.selectList("unitAttrServiceDaoImpl.getUnitAttrInfo",info);
+        List<Map> businessUnitAttrInfos = sqlSessionTemplate.selectList("unitAttrServiceDaoImpl.getUnitAttrInfo", info);
 
         return businessUnitAttrInfos;
     }
@@ -95,28 +97,30 @@ public class UnitAttrServiceDaoImpl extends BaseServiceDao implements IUnitAttrS
 
     /**
      * 修改单元属性信息
+     *
      * @param info 修改信息
      * @throws DAOException DAO异常
      */
     @Override
     public void updateUnitAttrInfoInstance(Map info) throws DAOException {
-        logger.debug("修改单元属性信息Instance 入参 info : {}",info);
+        logger.debug("修改单元属性信息Instance 入参 info : {}", info);
 
-        int saveFlag = sqlSessionTemplate.update("unitAttrServiceDaoImpl.updateUnitAttrInfoInstance",info);
+        int saveFlag = sqlSessionTemplate.update("unitAttrServiceDaoImpl.updateUnitAttrInfoInstance", info);
 
-        if(saveFlag < 1){
-            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR,"修改单元属性信息Instance数据失败:"+ JSONObject.toJSONString(info));
+        if (saveFlag < 1) {
+            throw new DAOException(ResponseConstant.RESULT_PARAM_ERROR, "修改单元属性信息Instance数据失败:" + JSONObject.toJSONString(info));
         }
     }
 
-     /**
+    /**
      * 查询单元属性数量
+     *
      * @param info 单元属性信息
      * @return 单元属性数量
      */
     @Override
     public int queryUnitAttrsCount(Map info) {
-        logger.debug("查询单元属性数据 入参 info : {}",info);
+        logger.debug("查询单元属性数据 入参 info : {}", info);
 
         List<Map> businessUnitAttrInfos = sqlSessionTemplate.selectList("unitAttrServiceDaoImpl.queryUnitAttrsCount", info);
         if (businessUnitAttrInfos.size() < 1) {
@@ -126,5 +130,13 @@ public class UnitAttrServiceDaoImpl extends BaseServiceDao implements IUnitAttrS
         return Integer.parseInt(businessUnitAttrInfos.get(0).get("count").toString());
     }
 
+    @Override
+    public int saveUnitAttr(Map beanCovertMap) {
+
+        int saveFlag = sqlSessionTemplate.update("unitAttrServiceDaoImpl.saveUnitAttr", beanCovertMap);
+
+        return saveFlag;
+    }
+
 
 }

+ 6 - 1
service-community/src/main/java/com/java110/community/smo/impl/FloorAttrInnerServiceSMOImpl.java

@@ -3,7 +3,7 @@ package com.java110.community.smo.impl;
 
 import com.java110.community.dao.IFloorAttrServiceDao;
 import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.core.smo.community.IFloorAttrInnerServiceSMO;
+import com.java110.intf.community.IFloorAttrInnerServiceSMO;
 import com.java110.dto.PageDto;
 import com.java110.dto.floorAttr.FloorAttrDto;
 import com.java110.utils.util.BeanConvertUtil;
@@ -50,6 +50,11 @@ public class FloorAttrInnerServiceSMOImpl extends BaseServiceSMO implements IFlo
         return floorAttrServiceDaoImpl.queryFloorAttrsCount(BeanConvertUtil.beanCovertMap(floorAttrDto));
     }
 
+    @Override
+    public int saveFloorAttr(@RequestBody FloorAttrDto floorAttrDto) {
+        return floorAttrServiceDaoImpl.saveFloorAttr(BeanConvertUtil.beanCovertMap(floorAttrDto));
+    }
+
     public IFloorAttrServiceDao getFloorAttrServiceDaoImpl() {
         return floorAttrServiceDaoImpl;
     }

+ 6 - 3
service-community/src/main/java/com/java110/community/smo/impl/UnitAttrInnerServiceSMOImpl.java

@@ -3,16 +3,14 @@ package com.java110.community.smo.impl;
 
 import com.java110.community.dao.IUnitAttrServiceDao;
 import com.java110.core.base.smo.BaseServiceSMO;
-import com.java110.core.smo.community.IUnitAttrInnerServiceSMO;
+import com.java110.intf.community.IUnitAttrInnerServiceSMO;
 import com.java110.dto.PageDto;
 import com.java110.dto.unitAttr.UnitAttrDto;
-import com.java110.dto.user.UserDto;
 import com.java110.utils.util.BeanConvertUtil;
 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;
 
 /**
@@ -54,6 +52,11 @@ public class UnitAttrInnerServiceSMOImpl extends BaseServiceSMO implements IUnit
         return unitAttrServiceDaoImpl.queryUnitAttrsCount(BeanConvertUtil.beanCovertMap(unitAttrDto));
     }
 
+    @Override
+    public int saveUnitAttr(@RequestBody UnitAttrDto unitAttrDto) {
+        return unitAttrServiceDaoImpl.saveUnitAttr(BeanConvertUtil.beanCovertMap(unitAttrDto));
+    }
+
     public IUnitAttrServiceDao getUnitAttrServiceDaoImpl() {
         return unitAttrServiceDaoImpl;
     }