java110 лет назад: 4
Родитель
Сommit
dc70e5c538

+ 18 - 10
java110-bean/src/main/java/com/java110/dto/meterType/MeterTypeDto.java

@@ -1,6 +1,7 @@
 package com.java110.dto.meterType;
 
 import com.java110.dto.PageDto;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -15,9 +16,9 @@ import java.util.Date;
 public class MeterTypeDto extends PageDto implements Serializable {
 
     private String typeName;
-private String typeId;
-private String remark;
-private String communityId;
+    private String typeId;
+    private String remark;
+    private String communityId;
 
 
     private Date createTime;
@@ -28,25 +29,32 @@ private String communityId;
     public String getTypeName() {
         return typeName;
     }
-public void setTypeName(String typeName) {
+
+    public void setTypeName(String typeName) {
         this.typeName = typeName;
     }
-public String getTypeId() {
+
+    public String getTypeId() {
         return typeId;
     }
-public void setTypeId(String typeId) {
+
+    public void setTypeId(String typeId) {
         this.typeId = typeId;
     }
-public String getRemark() {
+
+    public String getRemark() {
         return remark;
     }
-public void setRemark(String remark) {
+
+    public void setRemark(String remark) {
         this.remark = remark;
     }
-public String getCommunityId() {
+
+    public String getCommunityId() {
         return communityId;
     }
-public void setCommunityId(String communityId) {
+
+    public void setCommunityId(String communityId) {
         this.communityId = communityId;
     }
 

+ 64 - 68
java110-db/src/main/resources/mapper/fee/MeterTypeV1ServiceDaoImplMapper.xml

@@ -5,93 +5,89 @@
 <mapper namespace="meterTypeV1ServiceDaoImpl">
 
 
-
-
-
     <!-- 保存抄表类型信息 add by wuxw 2018-07-03 -->
     <insert id="saveMeterTypeInfo" parameterType="Map">
         insert into meter_type(
-type_name,type_id,remark,community_id
-) values (
-#{typeName},#{typeId},#{remark},#{communityId}
-)
+        type_name,type_id,remark,community_id
+        ) values (
+        #{typeName},#{typeId},#{remark},#{communityId}
+        )
     </insert>
 
 
-
     <!-- 查询抄表类型信息 add by wuxw 2018-07-03 -->
     <select id="getMeterTypeInfo" parameterType="Map" resultType="Map">
-        select  t.type_name,t.type_name typeName,t.type_id,t.type_id typeId,t.remark,t.status_cd,t.status_cd statusCd,t.community_id,t.community_id communityId 
-from meter_type t 
-where 1 =1 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="typeId !=null and typeId != ''">
-   and t.type_id= #{typeId}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
+        select t.type_name,t.type_name typeName,t.type_id,t.type_id typeId,t.remark,t.status_cd,t.status_cd
+        statusCd,t.community_id,t.community_id communityId,t.create_time createTime
+        from meter_type t
+        where 1 =1
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="typeId !=null and typeId != ''">
+            and t.type_id= #{typeId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </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="updateMeterTypeInfo" parameterType="Map">
-        update  meter_type t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="typeName !=null and typeName != ''">
-, t.type_name= #{typeName}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
- where 1=1 <if test="typeId !=null and typeId != ''">
-and t.type_id= #{typeId}
-</if> 
+        update meter_type t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="typeName !=null and typeName != ''">
+            , t.type_name= #{typeName}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        where 1=1
+        <if test="typeId !=null and typeId != ''">
+            and t.type_id= #{typeId}
+        </if>
 
     </update>
 
     <!-- 查询抄表类型数量 add by wuxw 2018-07-03 -->
-     <select id="queryMeterTypesCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from meter_type t 
-where 1 =1 
-<if test="typeName !=null and typeName != ''">
-   and t.type_name= #{typeName}
-</if> 
-<if test="typeId !=null and typeId != ''">
-   and t.type_id= #{typeId}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
+    <select id="queryMeterTypesCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from meter_type t
+        where 1 =1
+        <if test="typeName !=null and typeName != ''">
+            and t.type_name= #{typeName}
+        </if>
+        <if test="typeId !=null and typeId != ''">
+            and t.type_id= #{typeId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
 
 
-     </select>
+    </select>
 
 </mapper>