소스 검색

优化报修,采购,缴费bug

xiaogang 3 년 전
부모
커밋
146bd184f8
27개의 변경된 파일342개의 추가작업 그리고 351개의 파일을 삭제
  1. 0 1
      java110-bean/src/main/java/com/java110/dto/fee/FeeDto.java
  2. 9 0
      java110-bean/src/main/java/com/java110/po/meterWater/MeterWaterPo.java
  3. 1 1
      java110-bean/src/main/java/com/java110/po/resourceStoreUseRecord/ResourceStoreUseRecordPo.java
  4. 7 35
      java110-db/src/main/resources/mapper/community/AppServiceDaoImplMapper.xml
  5. 58 65
      java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml
  6. 2 2
      java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
  7. 1 1
      java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml
  8. 149 160
      java110-db/src/main/resources/mapper/fee/MeterWaterV1ServiceDaoImplMapper.xml
  9. 6 0
      java110-db/src/main/resources/mapper/fee/PayFeeDetailNewV1ServiceDaoImplMapper.xml
  10. 2 2
      java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml
  11. 2 2
      java110-db/src/main/resources/mapper/store/ResourceStoreUseRecordV1ServiceDaoImplMapper.xml
  12. 2 4
      java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml
  13. 0 3
      service-api/src/main/java/com/java110/api/components/file/UploadVedioComponent.java
  14. 6 9
      service-common/src/main/java/com/java110/common/cmd/machineTranslate/MachineGetFreeParkingSpaceCmd.java
  15. 16 1
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffFinishRepairsCmd.java
  16. 19 1
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffRepairsCmd.java
  17. 2 2
      service-community/src/main/java/com/java110/community/cmd/ownerRepair/RepairDispatchCmd.java
  18. 13 1
      service-community/src/main/java/com/java110/community/cmd/parkingArea/DeleteParkingAreaCmd.java
  19. 7 23
      service-community/src/main/java/com/java110/community/cmd/parkingSpace/QueryParkingSpacesCmd.java
  20. 1 6
      service-dev/src/main/java/com/java110/dev/cmd/app/UpdateAppCmd.java
  21. 9 1
      service-fee/src/main/java/com/java110/fee/cmd/fee/DeleteFeeCmd.java
  22. 5 7
      service-fee/src/main/java/com/java110/fee/cmd/meterWater/SaveMeterWaterCmd.java
  23. 5 10
      service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java
  24. 3 2
      service-order/src/main/java/com/java110/order/smo/impl/OIdServiceSMOImpl.java
  25. 9 2
      service-store/src/main/java/com/java110/store/cmd/purchase/UrgentPurchaseApplyCmd.java
  26. 8 5
      service-user/src/main/java/com/java110/user/cmd/owner/EditOwnerCmd.java
  27. 0 5
      service-user/src/main/java/com/java110/user/cmd/owner/ObtainOwnerAge.java

+ 0 - 1
java110-bean/src/main/java/com/java110/dto/fee/FeeDto.java

@@ -200,7 +200,6 @@ public class FeeDto extends PageDto implements Serializable {
         this.payerObjId = payerObjId;
     }
 
-
     public Date getCreateTime() {
         return createTime;
     }

+ 9 - 0
java110-bean/src/main/java/com/java110/po/meterWater/MeterWaterPo.java

@@ -20,6 +20,7 @@ public class MeterWaterPo implements Serializable {
     private double price;
     private Date createTime;
     private String statusCd = "0";
+    private String bId;
 
     public String getRemark() {
         return remark;
@@ -140,4 +141,12 @@ public class MeterWaterPo implements Serializable {
     public void setStatusCd(String statusCd) {
         this.statusCd = statusCd;
     }
+
+    public String getbId() {
+        return bId;
+    }
+
+    public void setbId(String bId) {
+        this.bId = bId;
+    }
 }

+ 1 - 1
java110-bean/src/main/java/com/java110/po/resourceStoreUseRecord/ResourceStoreUseRecordPo.java

@@ -19,7 +19,7 @@ public class ResourceStoreUseRecordPo implements Serializable {
     //1001 报废回收   2002 工单损耗   3003 公用损耗
     private String state;
 
-    private String statusCd;
+    private String statusCd = "0";
 
     public String getRepairId() {
         return repairId;

+ 7 - 35
java110-db/src/main/resources/mapper/community/AppServiceDaoImplMapper.xml

@@ -1,19 +1,14 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="appServiceDaoImpl">
 
     <!-- 保存应用信息 add by wuxw 2018-07-03 -->
     <insert id="saveAppInfo" parameterType="Map">
-        insert into c_app(
-        status_cd,app_id,black_list_ip,name,security_code,remark,while_list_ip
-        ) values (
-        '0',#{appId},#{blackListIp},#{name},#{securityCode},#{remark},#{whileListIp}
-        )
+        insert into c_app(status_cd, app_id, black_list_ip, name, security_code, remark, while_list_ip)
+        values ('0', #{appId}, #{blackListIp}, #{name}, #{securityCode}, #{remark}, #{whileListIp})
     </insert>
 
-
     <!-- 查询应用信息(Business) add by wuxw 2018-07-03 -->
     <select id="getBusinessAppInfo" parameterType="Map" resultType="Map">
         select t.operate,t.app_id,t.app_id appId,t.black_list_ip,t.black_list_ip
@@ -39,14 +34,11 @@
         <if test="remark !=null and remark != ''">
             and t.remark= #{remark}
         </if>
-
         <if test="whileListIp !=null and whileListIp != ''">
             and t.while_list_ip= #{whileListIp}
         </if>
-
     </select>
 
-
     <!-- 保存应用信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveAppInfoInstance" parameterType="Map">
         insert into c_app(
@@ -73,10 +65,8 @@
         <if test="whileListIp !=null and whileListIp != ''">
             and t.while_list_ip= #{whileListIp}
         </if>
-
     </insert>
 
-
     <!-- 查询应用信息 add by wuxw 2018-07-03 -->
     <select id="getAppInfo" parameterType="Map" resultType="Map">
         select t.app_id,t.app_id appId,t.black_list_ip,t.black_list_ip
@@ -93,7 +83,6 @@
                 #{item}
             </foreach>
         </if>
-
         <if test="blackListIp !=null and blackListIp != ''">
             and t.black_list_ip= #{blackListIp}
         </if>
@@ -109,41 +98,28 @@
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
-
         <if test="whileListIp !=null and whileListIp != ''">
             and t.while_list_ip= #{whileListIp}
         </if>
         <if test="page != -1 and page != null ">
             limit #{page}, #{row}
         </if>
-
     </select>
 
-
     <!-- 修改应用信息 add by wuxw 2018-07-03 -->
     <update id="updateAppInfo" parameterType="Map">
         update c_app t set t.status_cd = #{statusCd}
-        <if test="blackListIp !=null and blackListIp != ''">
-            , t.black_list_ip= #{blackListIp}
-        </if>
+        , t.black_list_ip= #{blackListIp}
         <if test="name !=null and name != ''">
             , t.name= #{name}
         </if>
-        <if test="securityCode !=null and securityCode != ''">
-            , t.security_code= #{securityCode}
-        </if>
-        <if test="remark !=null and remark != ''">
-            , t.remark= #{remark}
-        </if>
-
-        <if test="whileListIp !=null and whileListIp != ''">
-            , t.while_list_ip= #{whileListIp}
-        </if>
+        , t.security_code= #{securityCode}
+        , t.remark= #{remark}
+        , t.while_list_ip= #{whileListIp}
         where 1=1
         <if test="appId !=null and appId != ''">
             and t.app_id= #{appId}
         </if>
-
     </update>
 
     <!-- 查询应用数量 add by wuxw 2018-07-03 -->
@@ -175,12 +151,8 @@
         <if test="statusCd !=null and statusCd != ''">
             and t.status_cd= #{statusCd}
         </if>
-
         <if test="whileListIp !=null and whileListIp != ''">
             and t.while_list_ip= #{whileListIp}
         </if>
-
-
     </select>
-
 </mapper>

+ 58 - 65
java110-db/src/main/resources/mapper/community/ParkingSpaceServiceDaoImplMapper.xml

@@ -1,32 +1,29 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="parkingSpaceServiceDaoImpl">
 
     <!-- 保存停车位信息 add by wuxw 2018-07-03 -->
     <insert id="saveBusinessParkingSpaceInfo" parameterType="Map">
-        insert into business_parking_space(
-        area,operate,num,ps_id,pa_id, remark,state,community_id,b_id,parking_type
-        ) values (
-        #{area},#{operate},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId},#{parkingType}
-        )
+        insert into business_parking_space(area, operate, num, ps_id, pa_id, remark, state, community_id, b_id,
+                                           parking_type)
+        values (#{area}, #{operate}, #{num}, #{psId}, #{paId}, #{remark}, #{state}, #{communityId}, #{bId},
+                #{parkingType})
     </insert>
 
     <!-- 保存车位信息 -->
     <insert id="saveParkingSpace" parameterType="Map">
-        insert into parking_space(
-        area,num,ps_id,pa_id,remark,state,community_id,b_id,parking_type,create_time
-        ) values (
-        #{area},#{num},#{psId},#{paId},#{remark},#{state},#{communityId},#{bId},#{parkingType},#{createTime}
-        )
+        insert into parking_space(area, num, ps_id, pa_id, remark, state, community_id, b_id, parking_type, create_time)
+        values (#{area}, #{num}, #{psId}, #{paId}, #{remark}, #{state}, #{communityId}, #{bId}, #{parkingType},
+                #{createTime})
     </insert>
 
     <!-- 查询停车位信息(Business) add by wuxw 2018-07-03 -->
     <select id="getBusinessParkingSpaceInfo" parameterType="Map" resultType="Map">
         select t.area,t.operate,t.num,t.ps_id,t.ps_id
         psId,t.pa_id,t.pa_id
-        paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.parking_type,t.parking_type parkingType
+        paId,t.remark,t.state,t.community_id,t.community_id communityId,t.b_id,t.b_id bId,t.parking_type,t.parking_type
+        parkingType
         from business_parking_space t
         where 1 =1
         <if test="area !=null and area != ''">
@@ -35,7 +32,6 @@
         <if test="operate !=null and operate != ''">
             and t.operate= #{operate}
         </if>
-
         <if test="num !=null and num != ''">
             and t.num= #{num}
         </if>
@@ -51,7 +47,6 @@
         <if test="state !=null and state != ''">
             and t.state= #{state}
         </if>
-
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
@@ -63,7 +58,6 @@
         </if>
     </select>
 
-
     <!-- 保存停车位信息至 instance表中 add by wuxw 2018-07-03 -->
     <insert id="saveParkingSpaceInfoInstance" parameterType="Map">
         insert into parking_space(
@@ -101,7 +95,6 @@
         </if>
     </insert>
 
-
     <!-- 查询停车位信息 add by wuxw 2018-07-03 -->
     <select id="getParkingSpaceInfo" parameterType="Map" resultType="Map">
         SELECT
@@ -195,7 +188,6 @@
         </where>
     </select>
 
-
     <!-- 修改停车位信息 add by wuxw 2018-07-03 -->
     <update id="updateParkingSpaceInfoInstance" parameterType="Map">
         update parking_space t set t.status_cd = #{statusCd}
@@ -234,53 +226,54 @@
 
     <!-- 查询停车位数量 add by wuxw 2018-07-03 -->
     <select id="queryParkingSpacesCount" parameterType="Map" resultType="Map">
-        select count(1) count
+        SELECT count(1) count
         FROM
-        parking_space t,t_dict td,parking_area pa
-        where
-        t.state = td.status_cd
-        and td.table_name='parking_space'
-        and td.table_columns='state'
-        and t.pa_id = pa.pa_id
-        and pa.status_cd ='0'
-        <if test="area !=null and area != ''">
-            and t.area= #{area}
-        </if>
-        <if test="num !=null and num != ''">
-            and t.num= #{num}
-        </if>
-        <if test="areaNum !=null and areaNum != ''">
-            and pa.num= #{areaNum}
-        </if>
-        <if test="psId !=null and psId != ''">
-            and t.ps_id= #{psId}
-        </if>
-        <if test="paId !=null and paId != ''">
-            and t.pa_id= #{paId}
-        </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="state !=null and state != ''">
-            and t.state= #{state}
-        </if>
-        <if test="states != null and states != null">
-            and t.state in
-            <foreach collection="states" item="item" open="(" close=")" separator=",">
-                #{item}
-            </foreach>
-        </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>
-
-
+        parking_space t
+        LEFT JOIN t_dict td1 ON t.state = td1.status_cd
+        AND td1.table_name = 'parking_space'
+        AND td1.table_columns = 'state'
+        LEFT JOIN t_dict td2 ON t.parking_type = td2.status_cd
+        AND td2.table_name = 'parking_space'
+        AND td2.table_columns = 'parking_type'
+        LEFT JOIN parking_area pa ON t.pa_id = pa.pa_id
+        AND pa.status_cd = '0'
+        <where>
+            <if test="area !=null and area != ''">
+                and t.area= #{area}
+            </if>
+            <if test="num !=null and num != ''">
+                and t.num= #{num}
+            </if>
+            <if test="areaNum !=null and areaNum != ''">
+                and pa.num= #{areaNum}
+            </if>
+            <if test="psId !=null and psId != ''">
+                and t.ps_id= #{psId}
+            </if>
+            <if test="paId !=null and paId != ''">
+                and t.pa_id= #{paId}
+            </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="state !=null and state != ''">
+                and t.state= #{state}
+            </if>
+            <if test="states != null and states != null">
+                and t.state in
+                <foreach collection="states" item="item" open="(" close=")" separator=",">
+                    #{item}
+                </foreach>
+            </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>
+        </where>
     </select>
-
 </mapper>

+ 2 - 2
java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml

@@ -531,7 +531,7 @@
         left join t_dict td on rs.return_visit_flag = td.status_cd and td.table_name='r_repair_setting' and
         td.table_columns='return_visit_flag'
         where 1 =1
-        and ru.state in ('10002','10003','10004','10005','10009','11000','12000')
+        and ru.state in ('10002','10003','10004','10009','11000','12000')
         <if test="staffId !=null and staffId != ''">
             and ru.staff_id = #{staffId}
         </if>
@@ -596,7 +596,7 @@
         left join t_dict td on rs.return_visit_flag = td.status_cd and td.table_name='r_repair_setting' and
         td.table_columns='return_visit_flag'
         where 1 =1
-        and ru.state in ('10002','10003','10004','10005','10009','11000','12000')
+        and ru.state in ('10002','10003','10004','10009','11000','12000')
         <if test="staffId != null and staffId != ''">
             and ru.staff_id = #{staffId}
         </if>

+ 1 - 1
java110-db/src/main/resources/mapper/fee/FeeServiceDaoImplMapper.xml

@@ -204,7 +204,7 @@
         <if test="payerObjId !=null and payerObjId != ''">
             and t.payer_obj_id= #{payerObjId}
         </if>
-        <if test="payerObjIds != null ">
+        <if test="payerObjIds != null and payerObjIds.length > 0">
             and t.payer_obj_id in
             <foreach collection="payerObjIds" item="item" open="(" close=")" separator=",">
                 #{item}

+ 149 - 160
java110-db/src/main/resources/mapper/fee/MeterWaterV1ServiceDaoImplMapper.xml

@@ -1,178 +1,167 @@
 <?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 <mapper namespace="meterWaterV1ServiceDaoImpl">
 
-
-
-
-
     <!-- 保存水电抄表信息 add by wuxw 2018-07-03 -->
     <insert id="saveMeterWaterInfo" parameterType="Map">
-        insert into meter_water(
-remark,obj_name,fee_id,cur_reading_time,water_id,cur_degrees,price,meter_type,pre_degrees,obj_id,pre_reading_time,community_id,obj_type
-) values (
-#{remark},#{objName},#{feeId},#{curReadingTime},#{waterId},#{curDegrees},#{price},#{meterType},#{preDegrees},#{objId},#{preReadingTime},#{communityId},#{objType}
-)
+        insert into meter_water(remark, obj_name, fee_id, cur_reading_time, water_id, cur_degrees, price, meter_type,
+                                pre_degrees, obj_id, pre_reading_time, community_id, obj_type, b_id)
+        values (#{remark}, #{objName}, #{feeId}, #{curReadingTime}, #{waterId}, #{curDegrees}, #{price}, #{meterType},
+                #{preDegrees}, #{objId}, #{preReadingTime}, #{communityId}, #{objType}, #{bId})
     </insert>
 
-
-
     <!-- 查询水电抄表信息 add by wuxw 2018-07-03 -->
     <select id="getMeterWaterInfo" parameterType="Map" resultType="Map">
-        select  t.status_cd,t.status_cd statusCd,t.remark,t.obj_name,t.obj_name objName,t.fee_id,t.fee_id feeId,t.cur_reading_time,t.cur_reading_time curReadingTime,t.water_id,t.water_id waterId,t.cur_degrees,t.cur_degrees curDegrees,t.price,t.meter_type,t.meter_type meterType,t.pre_degrees,t.pre_degrees preDegrees,t.obj_id,t.obj_id objId,t.pre_reading_time,t.pre_reading_time preReadingTime,t.community_id,t.community_id communityId,t.obj_type,t.obj_type objType 
-from meter_water t 
-where 1 =1 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="objName !=null and objName != ''">
-   and t.obj_name= #{objName}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="curReadingTime !=null and curReadingTime != ''">
-   and t.cur_reading_time= #{curReadingTime}
-</if> 
-<if test="waterId !=null and waterId != ''">
-   and t.water_id= #{waterId}
-</if> 
-<if test="curDegrees !=null and curDegrees != ''">
-   and t.cur_degrees= #{curDegrees}
-</if> 
-<if test="price !=null and price != ''">
-   and t.price= #{price}
-</if> 
-<if test="meterType !=null and meterType != ''">
-   and t.meter_type= #{meterType}
-</if> 
-<if test="preDegrees !=null and preDegrees != ''">
-   and t.pre_degrees= #{preDegrees}
-</if> 
-<if test="objId !=null and objId != ''">
-   and t.obj_id= #{objId}
-</if> 
-<if test="preReadingTime !=null and preReadingTime != ''">
-   and t.pre_reading_time= #{preReadingTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="objType !=null and objType != ''">
-   and t.obj_type= #{objType}
-</if> 
-order by t.create_time desc
-<if test="page != -1 and page != null ">
-   limit #{page}, #{row}
-</if> 
-
+        select t.status_cd,t.status_cd statusCd,t.remark,t.obj_name,t.obj_name objName,t.fee_id,t.fee_id
+        feeId,t.cur_reading_time,t.cur_reading_time curReadingTime,t.water_id,t.water_id
+        waterId,t.cur_degrees,t.cur_degrees curDegrees,t.price,t.meter_type,t.meter_type
+        meterType,t.pre_degrees,t.pre_degrees preDegrees,t.obj_id,t.obj_id objId,t.pre_reading_time,t.pre_reading_time
+        preReadingTime,t.community_id,t.community_id communityId,t.obj_type,t.obj_type objType
+        from meter_water t
+        where 1 =1
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="curReadingTime !=null and curReadingTime != ''">
+            and t.cur_reading_time= #{curReadingTime}
+        </if>
+        <if test="waterId !=null and waterId != ''">
+            and t.water_id= #{waterId}
+        </if>
+        <if test="curDegrees !=null and curDegrees != ''">
+            and t.cur_degrees= #{curDegrees}
+        </if>
+        <if test="price !=null and price != ''">
+            and t.price= #{price}
+        </if>
+        <if test="meterType !=null and meterType != ''">
+            and t.meter_type= #{meterType}
+        </if>
+        <if test="preDegrees !=null and preDegrees != ''">
+            and t.pre_degrees= #{preDegrees}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="preReadingTime !=null and preReadingTime != ''">
+            and t.pre_reading_time= #{preReadingTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </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="updateMeterWaterInfo" parameterType="Map">
-        update  meter_water t set t.status_cd = #{statusCd}
-<if test="newBId != null and newBId != ''">
-,t.b_id = #{newBId}
-</if> 
-<if test="remark !=null and remark != ''">
-, t.remark= #{remark}
-</if> 
-<if test="objName !=null and objName != ''">
-, t.obj_name= #{objName}
-</if> 
-<if test="feeId !=null and feeId != ''">
-, t.fee_id= #{feeId}
-</if> 
-<if test="curReadingTime !=null and curReadingTime != ''">
-, t.cur_reading_time= #{curReadingTime}
-</if> 
-<if test="curDegrees !=null and curDegrees != ''">
-, t.cur_degrees= #{curDegrees}
-</if> 
-<if test="price !=null and price != ''">
-, t.price= #{price}
-</if> 
-<if test="meterType !=null and meterType != ''">
-, t.meter_type= #{meterType}
-</if> 
-<if test="preDegrees !=null and preDegrees != ''">
-, t.pre_degrees= #{preDegrees}
-</if> 
-<if test="objId !=null and objId != ''">
-, t.obj_id= #{objId}
-</if> 
-<if test="preReadingTime !=null and preReadingTime != ''">
-, t.pre_reading_time= #{preReadingTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-, t.community_id= #{communityId}
-</if> 
-<if test="objType !=null and objType != ''">
-, t.obj_type= #{objType}
-</if> 
- where 1=1 <if test="waterId !=null and waterId != ''">
-and t.water_id= #{waterId}
-</if> 
-
+        update meter_water t set t.status_cd = #{statusCd}
+        <if test="newBId != null and newBId != ''">
+            ,t.b_id = #{newBId}
+        </if>
+        <if test="remark !=null and remark != ''">
+            , t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            , t.obj_name= #{objName}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            , t.fee_id= #{feeId}
+        </if>
+        <if test="curReadingTime !=null and curReadingTime != ''">
+            , t.cur_reading_time= #{curReadingTime}
+        </if>
+        <if test="curDegrees !=null and curDegrees != ''">
+            , t.cur_degrees= #{curDegrees}
+        </if>
+        <if test="price !=null and price != ''">
+            , t.price= #{price}
+        </if>
+        <if test="meterType !=null and meterType != ''">
+            , t.meter_type= #{meterType}
+        </if>
+        <if test="preDegrees !=null and preDegrees != ''">
+            , t.pre_degrees= #{preDegrees}
+        </if>
+        <if test="objId !=null and objId != ''">
+            , t.obj_id= #{objId}
+        </if>
+        <if test="preReadingTime !=null and preReadingTime != ''">
+            , t.pre_reading_time= #{preReadingTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            , t.community_id= #{communityId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            , t.obj_type= #{objType}
+        </if>
+        where 1=1
+        <if test="waterId !=null and waterId != ''">
+            and t.water_id= #{waterId}
+        </if>
     </update>
 
     <!-- 查询水电抄表数量 add by wuxw 2018-07-03 -->
-     <select id="queryMeterWatersCount" parameterType="Map" resultType="Map">
-        select  count(1) count 
-from meter_water t 
-where 1 =1 
-<if test="statusCd !=null and statusCd != ''">
-   and t.status_cd= #{statusCd}
-</if> 
-<if test="remark !=null and remark != ''">
-   and t.remark= #{remark}
-</if> 
-<if test="objName !=null and objName != ''">
-   and t.obj_name= #{objName}
-</if> 
-<if test="feeId !=null and feeId != ''">
-   and t.fee_id= #{feeId}
-</if> 
-<if test="curReadingTime !=null and curReadingTime != ''">
-   and t.cur_reading_time= #{curReadingTime}
-</if> 
-<if test="waterId !=null and waterId != ''">
-   and t.water_id= #{waterId}
-</if> 
-<if test="curDegrees !=null and curDegrees != ''">
-   and t.cur_degrees= #{curDegrees}
-</if> 
-<if test="price !=null and price != ''">
-   and t.price= #{price}
-</if> 
-<if test="meterType !=null and meterType != ''">
-   and t.meter_type= #{meterType}
-</if> 
-<if test="preDegrees !=null and preDegrees != ''">
-   and t.pre_degrees= #{preDegrees}
-</if> 
-<if test="objId !=null and objId != ''">
-   and t.obj_id= #{objId}
-</if> 
-<if test="preReadingTime !=null and preReadingTime != ''">
-   and t.pre_reading_time= #{preReadingTime}
-</if> 
-<if test="communityId !=null and communityId != ''">
-   and t.community_id= #{communityId}
-</if> 
-<if test="objType !=null and objType != ''">
-   and t.obj_type= #{objType}
-</if> 
-
-
-     </select>
-
+    <select id="queryMeterWatersCount" parameterType="Map" resultType="Map">
+        select count(1) count
+        from meter_water t
+        where 1 =1
+        <if test="statusCd !=null and statusCd != ''">
+            and t.status_cd= #{statusCd}
+        </if>
+        <if test="remark !=null and remark != ''">
+            and t.remark= #{remark}
+        </if>
+        <if test="objName !=null and objName != ''">
+            and t.obj_name= #{objName}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
+        <if test="curReadingTime !=null and curReadingTime != ''">
+            and t.cur_reading_time= #{curReadingTime}
+        </if>
+        <if test="waterId !=null and waterId != ''">
+            and t.water_id= #{waterId}
+        </if>
+        <if test="curDegrees !=null and curDegrees != ''">
+            and t.cur_degrees= #{curDegrees}
+        </if>
+        <if test="price !=null and price != ''">
+            and t.price= #{price}
+        </if>
+        <if test="meterType !=null and meterType != ''">
+            and t.meter_type= #{meterType}
+        </if>
+        <if test="preDegrees !=null and preDegrees != ''">
+            and t.pre_degrees= #{preDegrees}
+        </if>
+        <if test="objId !=null and objId != ''">
+            and t.obj_id= #{objId}
+        </if>
+        <if test="preReadingTime !=null and preReadingTime != ''">
+            and t.pre_reading_time= #{preReadingTime}
+        </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="objType !=null and objType != ''">
+            and t.obj_type= #{objType}
+        </if>
+    </select>
 </mapper>

+ 6 - 0
java110-db/src/main/resources/mapper/fee/PayFeeDetailNewV1ServiceDaoImplMapper.xml

@@ -114,6 +114,12 @@
         <if test="detailId !=null and detailId != ''">
             and t.detail_id= #{detailId}
         </if>
+        <if test="communityId !=null and communityId != ''">
+            and t.community_id= #{communityId}
+        </if>
+        <if test="feeId !=null and feeId != ''">
+            and t.fee_id= #{feeId}
+        </if>
 
     </update>
 

+ 2 - 2
java110-db/src/main/resources/mapper/report/ReportFeeMonthStatisticsServiceDaoImplMapper.xml

@@ -1633,7 +1633,7 @@
         = "fee_type_cd"
         left join t_dict d3 on t.state = d3.status_cd and d3.table_name = "pay_fee_detail" and d3.table_columns =
         "state"
-        where t.status_cd = '0'
+        where t.status_cd = '0'  and pf.status_cd = '0'
         <if test="roomNum !=null and roomNum != ''">
             and br.room_num= #{roomNum}
         </if>
@@ -1725,7 +1725,7 @@
         "state"
         LEFT JOIN contract co on pf.payer_obj_id = co.contract_id and co.status_cd = '0' and pf.payer_obj_type='7777'
         LEFT JOIN c_business cb on t.b_id = cb.b_id
-        where t.status_cd = '0'
+        where t.status_cd = '0'  and pf.status_cd = '0'
         <if test="roomNum !=null and roomNum != ''">
             and br.room_num= #{roomNum}
         </if>

+ 2 - 2
java110-db/src/main/resources/mapper/store/ResourceStoreUseRecordV1ServiceDaoImplMapper.xml

@@ -11,9 +11,9 @@
     <!-- 保存使用记录信息 add by wuxw 2018-07-03 -->
     <insert id="saveResourceStoreUseRecordInfo" parameterType="Map">
         insert into resource_store_use_record(
-unit_price,create_user_id,quantity,resource_store_name,rsur_id,repair_id,create_user_name,remark,store_id,res_id,state,community_id
+unit_price,create_user_id,quantity,resource_store_name,rsur_id,repair_id,create_user_name,remark,store_id,res_id,state,community_id,status_cd
 ) values (
-#{unitPrice},#{createUserId},#{quantity},#{resourceStoreName},#{rsurId},#{repairId},#{createUserName},#{remark},#{storeId},#{resId},#{state},#{communityId}
+#{unitPrice},#{createUserId},#{quantity},#{resourceStoreName},#{rsurId},#{repairId},#{createUserName},#{remark},#{storeId},#{resId},#{state},#{communityId},#{statusCd}
 )
     </insert>
 

+ 2 - 4
java110-db/src/main/resources/mapper/user/OwnerV1ServiceDaoImplMapper.xml

@@ -72,9 +72,7 @@
         <if test="newBId != null and newBId != ''">
             ,t.b_id = #{newBId}
         </if>
-        <if test="idCard !=null and idCard != ''">
-            , t.id_card= #{idCard}
-        </if>
+        , t.id_card= #{idCard}
         <if test="sex !=null and sex != ''">
             , t.sex= #{sex}
         </if>
@@ -105,7 +103,7 @@
         <if test="communityId !=null and communityId != ''">
             , t.community_id= #{communityId}
         </if>
-        <if test="age !=null and age != ''">
+        <if test="age != ''">
             , t.age= #{age}
         </if>
         where 1=1

+ 0 - 3
service-api/src/main/java/com/java110/api/components/file/UploadVedioComponent.java

@@ -1,6 +1,5 @@
 package com.java110.api.components.file;
 
-
 import com.java110.core.context.IPageData;
 import com.java110.api.smo.file.IUploadVedioSMO;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -10,7 +9,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
 
-
 /**
  * 应用组件管理类
  * <p>
@@ -24,7 +22,6 @@ public class UploadVedioComponent {
     @Autowired
     private IUploadVedioSMO uploadVedioSMOImpl;
 
-
     /**
      * 查询应用列表
      *

+ 6 - 9
service-common/src/main/java/com/java110/common/cmd/machineTranslate/MachineGetFreeParkingSpaceCmd.java

@@ -25,7 +25,6 @@ import java.util.*;
 @Java110Cmd(serviceCode = "machineTranslate.machineGetFreeParkingSpace")
 public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
 
-
     private static final String MACHINE_DIRECTION_IN = "3306"; // 进入
 
     private static final String MACHINE_DIRECTION_OUT = "3307"; //出去
@@ -53,7 +52,6 @@ public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
     @Autowired
     private IOwnerCarInnerServiceSMO ownerCarInnerServiceSMOImpl;
 
-
     @Autowired
     private ICommunityInnerServiceSMO communityInnerServiceSMOImpl;
 
@@ -64,7 +62,7 @@ public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
 
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
-//JSONObject outParam = null;
+        //JSONObject outParam = null;
         String communityId = reqJson.getString("communityId");
 
         //查询出小区内车位状态为空闲的数量
@@ -73,7 +71,6 @@ public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
         parkingSpaceDto.setState("F");
         int freeParkingSpaceCount = parkingSpaceInnerServiceSMOImpl.queryParkingSpacesCount(parkingSpaceDto);
 
-
         //查询出小区内的在场车辆
         CarInoutDto carInoutDto = new CarInoutDto();
         carInoutDto.setCommunityId(communityId);
@@ -85,16 +82,16 @@ public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
         }
         OwnerCarDto ownerCarDto = new OwnerCarDto();
         ownerCarDto.setCommunityId(communityId);
-        if(!carNums.isEmpty()){
+        if (!carNums.isEmpty()) {
             ownerCarDto.setCarNums(carNums.toArray(new String[carNums.size()]));
         }
         List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
         //付款方ID-车牌号
-        Map<String,String> psIdAndCarNumMap = new HashMap<>();
+        Map<String, String> psIdAndCarNumMap = new HashMap<>();
         List<String> psIds = new ArrayList<>();
         for (OwnerCarDto tmpOwnerCarDto : ownerCarDtos) {
             psIds.add(tmpOwnerCarDto.getPsId());
-            psIdAndCarNumMap.put(tmpOwnerCarDto.getPsId(),tmpOwnerCarDto.getCarNum());
+            psIdAndCarNumMap.put(tmpOwnerCarDto.getPsId(), tmpOwnerCarDto.getCarNum());
         }
         FeeDto feeDto = new FeeDto();
         feeDto.setCommunityId(communityId);
@@ -103,8 +100,8 @@ public class MachineGetFreeParkingSpaceCmd extends BaseMachineCmd {
 
 //        int communityCarCount = feeInnerServiceSMOImpl.queryFeesCount(feeDto);
         List<FeeDto> communityCars = feeInnerServiceSMOImpl.queryFees(feeDto);//有效的月报车位信息,已经支付租金的
-        for(FeeDto communityCar:communityCars){
-            if(psIdAndCarNumMap.containsKey(communityCar.getPayerObjId())){
+        for (FeeDto communityCar : communityCars) {
+            if (psIdAndCarNumMap.containsKey(communityCar.getPayerObjId())) {
                 carNums.remove(psIdAndCarNumMap.get(communityCar.getPayerObjId()));//把场内月租车位的业主车牌去掉,不算进场车辆
             }
         }

+ 16 - 1
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffFinishRepairsCmd.java

@@ -5,6 +5,7 @@ import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.CommunitySettingFactory;
 import com.java110.dto.basePrivilege.BasePrivilegeDto;
 import com.java110.dto.repair.RepairDto;
 import com.java110.intf.community.IMenuInnerServiceSMO;
@@ -14,6 +15,7 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
@@ -39,6 +41,8 @@ public class ListStaffFinishRepairsCmd extends Cmd {
     //域
     public static final String DOMAIN_COMMON = "DOMAIN.COMMON";
 
+    public static final String VIEW_LIST_STAFF_REPAIRS = "VIEW_LIST_STAFF_REPAIRS";
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
@@ -46,11 +50,22 @@ public class ListStaffFinishRepairsCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "userId", "请求中未包含员工信息");
     }
 
+    /**
+     * 报修已办
+     * @param event              事件对象
+     * @param context 数据上文对象
+     * @param reqJson            请求报文
+     * @throws CmdException
+     * @throws ParseException
+     */
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         RepairDto ownerRepairDto = BeanConvertUtil.covertBean(reqJson, RepairDto.class);
         String userId = reqJson.getString("userId");
-        String viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,"VIEW_LIST_STAFF_REPAIRS");
+        String viewListStaffRepairs = CommunitySettingFactory.getValue(reqJson.getString("communityId"), VIEW_LIST_STAFF_REPAIRS);
+        if (StringUtil.isEmpty(viewListStaffRepairs)) {
+            viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,VIEW_LIST_STAFF_REPAIRS);
+        }
         List<Map> privileges = null;
         //这里加开关 其实让管理员看到所有单子这么做,不太优雅,建议 单独开发页面功能
         // 不要影响已办功能,add by 吴学文 2021-09-09

+ 19 - 1
service-community/src/main/java/com/java110/community/cmd/ownerRepair/ListStaffRepairsCmd.java

@@ -5,6 +5,7 @@ import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.CommunitySettingFactory;
 import com.java110.dto.basePrivilege.BasePrivilegeDto;
 import com.java110.dto.repair.RepairDto;
 import com.java110.intf.community.IMenuInnerServiceSMO;
@@ -13,6 +14,7 @@ import com.java110.utils.cache.MappingCache;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.StringUtil;
 import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
@@ -32,6 +34,11 @@ public class ListStaffRepairsCmd extends Cmd {
     @Autowired
     private IMenuInnerServiceSMO menuInnerServiceSMOImpl;
 
+    //域
+    public static final String DOMAIN_COMMON = "DOMAIN.COMMON";
+
+    public static final String VIEW_LIST_STAFF_REPAIRS = "VIEW_LIST_STAFF_REPAIRS";
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException {
         super.validatePageInfo(reqJson);
@@ -39,12 +46,23 @@ public class ListStaffRepairsCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "userId", "请求中未包含员工信息");
     }
 
+    /**
+     * 报修待办
+     * @param event              事件对象
+     * @param context 数据上文对象
+     * @param reqJson            请求报文
+     * @throws CmdException
+     * @throws ParseException
+     */
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext context, JSONObject reqJson) throws CmdException, ParseException {
         RepairDto ownerRepairDto = BeanConvertUtil.covertBean(reqJson, RepairDto.class);
         //获取用户id
         String userId = reqJson.getString("userId");
-        String viewListStaffRepairs = MappingCache.getValue("viewListStaffRepairs");
+        String viewListStaffRepairs = CommunitySettingFactory.getValue(reqJson.getString("communityId"), VIEW_LIST_STAFF_REPAIRS);
+        if (StringUtil.isEmpty(viewListStaffRepairs)) {
+            viewListStaffRepairs = MappingCache.getValue(DOMAIN_COMMON,VIEW_LIST_STAFF_REPAIRS);
+        }
         List<Map> privileges = null;
         if("ON".equals(viewListStaffRepairs)) {//是否让管理员看到所有工单
             //报修待办查看所有记录权限

+ 2 - 2
service-community/src/main/java/com/java110/community/cmd/ownerRepair/RepairDispatchCmd.java

@@ -210,7 +210,7 @@ public class RepairDispatchCmd extends Cmd {
             if (RepairDto.REPAIR_WAY_GRABBING.equals(repairDtos.get(0).getRepairWay())
                     || RepairDto.REPAIR_WAY_TRAINING.equals(repairDtos.get(0).getRepairWay())
             ) {
-                modifyBusinessRepairDispatch(reqJson, RepairDto.STATE_WAIT);
+                modifyBusinessRepairDispatch(reqJson, RepairDto.STATE_WAIT);//维修单变成未派单
                 //把自己改成退单
                 RepairUserPo repairUser = new RepairUserPo();
                 repairUser.setRuId(ruId);
@@ -218,7 +218,7 @@ public class RepairDispatchCmd extends Cmd {
                 repairUser.setState(RepairUserDto.STATE_BACK);
                 repairUser.setContext(reqJson.getString("context"));
                 repairUser.setCommunityId(reqJson.getString("communityId"));
-                flag = repairUserV1InnerServiceSMOImpl.updateRepairUserNew(repairUserPo);
+                flag = repairUserV1InnerServiceSMOImpl.updateRepairUserNew(repairUser);
                 if (flag < 1) {
                     throw new CmdException("修改用户失败");
                 }

+ 13 - 1
service-community/src/main/java/com/java110/community/cmd/parkingArea/DeleteParkingAreaCmd.java

@@ -6,14 +6,18 @@ import com.java110.core.annotation.Java110Transactional;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.dto.parking.ParkingSpaceDto;
 import com.java110.intf.community.IParkingAreaAttrV1InnerServiceSMO;
 import com.java110.intf.community.IParkingAreaV1InnerServiceSMO;
+import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
 import com.java110.po.parking.ParkingAreaPo;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 
+import java.util.List;
+
 @Java110Cmd(serviceCode = "parkingArea.deleteParkingArea")
 public class DeleteParkingAreaCmd extends Cmd {
 
@@ -23,6 +27,9 @@ public class DeleteParkingAreaCmd extends Cmd {
     @Autowired
     private IParkingAreaAttrV1InnerServiceSMO parkingAreaAttrV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         //Assert.hasKeyAndValue(reqJson, "xxx", "xxx");
@@ -33,8 +40,13 @@ public class DeleteParkingAreaCmd extends Cmd {
     @Override
     @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
         ParkingAreaPo parkingAreaPo = BeanConvertUtil.covertBean(reqJson, ParkingAreaPo.class);
+        ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
+        parkingSpaceDto.setPaId(parkingAreaPo.getPaId());
+        List<ParkingSpaceDto> parkingSpaceDtos = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
+        if (parkingSpaceDtos != null && parkingSpaceDtos.size() > 0) {
+            throw new IllegalArgumentException("请先删除该停车场下的停车位!");
+        }
         int flag = parkingAreaV1InnerServiceSMOImpl.deleteParkingArea(parkingAreaPo);
         if (flag < 1) {
             throw new CmdException("保存停车场失败");

+ 7 - 23
service-community/src/main/java/com/java110/community/cmd/parkingSpace/QueryParkingSpacesCmd.java

@@ -23,8 +23,7 @@ import java.util.ArrayList;
 import java.util.List;
 
 @Java110Cmd(serviceCode = "parkingSpace.queryParkingSpaces")
-public class QueryParkingSpacesCmd  extends Cmd {
-
+public class QueryParkingSpacesCmd extends Cmd {
 
     @Autowired
     private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
@@ -45,26 +44,20 @@ public class QueryParkingSpacesCmd  extends Cmd {
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         //根据车牌号去查询 车位信息
         if (reqJson.containsKey("carNum") && !StringUtil.isEmpty(reqJson.getString("carNum"))) {
-
             queryParkingSpaceByCarNum(reqJson, cmdDataFlowContext);
             return;
         }
-
-
         int row = reqJson.getInteger("row");
-
         ApiParkingSpaceVo apiParkingSpaceVo = new ApiParkingSpaceVo();
-
+        ParkingSpaceDto parkingSpaceDto = BeanConvertUtil.covertBean(reqJson, ParkingSpaceDto.class);
         //查询总记录数
-        int total = parkingSpaceInnerServiceSMOImpl.queryParkingSpacesCount(BeanConvertUtil.covertBean(reqJson, ParkingSpaceDto.class));
+        int total = parkingSpaceInnerServiceSMOImpl.queryParkingSpacesCount(parkingSpaceDto);
         apiParkingSpaceVo.setTotal(total);
         if (total > 0) {
             List<ParkingSpaceDto> parkingSpaceDtoList = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(BeanConvertUtil.covertBean(reqJson, ParkingSpaceDto.class));
             apiParkingSpaceVo.setParkingSpaces(BeanConvertUtil.covertBeanList(parkingSpaceDtoList, ApiParkingSpaceDataVo.class));
         }
-
         apiParkingSpaceVo.setRecords((int) Math.ceil((double) total / (double) row));
-
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiParkingSpaceVo), HttpStatus.OK);
         cmdDataFlowContext.setResponseEntity(responseEntity);
     }
@@ -72,45 +65,38 @@ public class QueryParkingSpacesCmd  extends Cmd {
     /**
      * 根据车牌号 查询 停车位
      *
-     * @param reqJson         请求报文
+     * @param reqJson            请求报文
      * @param cmdDataFlowContext 上线文对象
      */
     private void queryParkingSpaceByCarNum(JSONObject reqJson, ICmdDataFlowContext cmdDataFlowContext) {
-
-
         ApiParkingSpaceVo apiParkingSpaceVo = new ApiParkingSpaceVo();
-
         int row = reqJson.getInteger("row");
         //查询总记录数
         OwnerCarDto ownerCarDto = BeanConvertUtil.covertBean(reqJson, OwnerCarDto.class);
         List<OwnerCarDto> ownerCarDtos = ownerCarInnerServiceSMOImpl.queryOwnerCars(ownerCarDto);
         apiParkingSpaceVo.setTotal(ownerCarDtos.size());
-
         if (ownerCarDtos.size() > 0) {
             ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
             parkingSpaceDto.setPsIds(getPsIds(ownerCarDtos));
             List<ParkingSpaceDto> parkingSpaceDtoList = parkingSpaceInnerServiceSMOImpl.queryParkingSpaces(parkingSpaceDto);
             apiParkingSpaceVo.setParkingSpaces(BeanConvertUtil.covertBeanList(parkingSpaceDtoList, ApiParkingSpaceDataVo.class));
         }
-
         apiParkingSpaceVo.setRecords((int) Math.ceil((double) ownerCarDtos.size() / (double) row));
-
         ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(apiParkingSpaceVo), HttpStatus.OK);
         cmdDataFlowContext.setResponseEntity(responseEntity);
-
     }
 
     /**
      * 获取 停车位Ids
+     *
      * @param ownerCarDtos 业主车位
      * @return 停车位Ids
      */
-    private String[] getPsIds(List<OwnerCarDto> ownerCarDtos){
+    private String[] getPsIds(List<OwnerCarDto> ownerCarDtos) {
         List<String> psIds = new ArrayList<String>();
-        for (OwnerCarDto ownerCarDto : ownerCarDtos){
+        for (OwnerCarDto ownerCarDto : ownerCarDtos) {
             psIds.add(ownerCarDto.getPsId());
         }
-
         return psIds.toArray(new String[psIds.size()]);
     }
 
@@ -120,11 +106,9 @@ public class QueryParkingSpacesCmd  extends Cmd {
      * @param reqJson 请求数据对象
      */
     private void refreshReqJson(JSONObject reqJson) {
-
         if (!reqJson.containsKey("state")) {
             return;
         }
-
         if ("SH".equals(reqJson.getString("state"))) {
             reqJson.put("states", new String[]{"S", "H"});
             reqJson.remove("state");

+ 1 - 6
service-dev/src/main/java/com/java110/dev/cmd/app/UpdateAppCmd.java

@@ -21,6 +21,7 @@ public class UpdateAppCmd extends Cmd {
 
     @Autowired
     private IAppInnerServiceSMO appInnerServiceSMOImpl;
+
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         Assert.hasKeyAndValue(reqJson, "appId", "应用Id不能为空");
@@ -30,17 +31,11 @@ public class UpdateAppCmd extends Cmd {
     @Override
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         AppDto appDto = BeanConvertUtil.covertBean(reqJson, AppDto.class);
-
-
         int count = appInnerServiceSMOImpl.updateApp(appDto);
-
-
         if (count < 1) {
             throw new ListenerExecuteException(ResponseConstant.RESULT_CODE_ERROR, "修改数据失败");
         }
-
         ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK);
-
         cmdDataFlowContext.setResponseEntity(responseEntity);
     }
 }

+ 9 - 1
service-fee/src/main/java/com/java110/fee/cmd/fee/DeleteFeeCmd.java

@@ -10,7 +10,9 @@ import com.java110.dto.fee.FeeDto;
 import com.java110.intf.community.IRoomInnerServiceSMO;
 import com.java110.intf.fee.IFeeDetailInnerServiceSMO;
 import com.java110.intf.fee.IFeeInnerServiceSMO;
+import com.java110.intf.fee.IPayFeeDetailV1InnerServiceSMO;
 import com.java110.intf.fee.IPayFeeV1InnerServiceSMO;
+import com.java110.po.fee.PayFeeDetailPo;
 import com.java110.po.fee.PayFeePo;
 import com.java110.utils.cache.MappingCache;
 import com.java110.utils.exception.CmdException;
@@ -32,6 +34,9 @@ public class DeleteFeeCmd extends Cmd {
     @Autowired
     private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl;
 
+    @Autowired
+    private IPayFeeDetailV1InnerServiceSMO payFeeDetailV1InnerServiceSMOImpl;
+
     @Autowired
     private IFeeDetailInnerServiceSMO feeDetailInnerServiceSMOImpl;
 
@@ -79,7 +84,10 @@ public class DeleteFeeCmd extends Cmd {
         PayFeePo payFeePo = BeanConvertUtil.covertBean(businessUnit, PayFeePo.class);
 
         int flag = payFeeV1InnerServiceSMOImpl.deletePayFee(payFeePo);
-        if (flag < 1) {
+
+        PayFeeDetailPo payFeeDetailPo = BeanConvertUtil.covertBean(businessUnit, PayFeeDetailPo.class);
+        int flag2 = payFeeDetailV1InnerServiceSMOImpl.deletePayFeeDetailNew(payFeeDetailPo);
+        if (flag < 1 || flag2 < 1) {
             throw new IllegalArgumentException("删除失败");
         }
     }

+ 5 - 7
service-fee/src/main/java/com/java110/fee/cmd/meterWater/SaveMeterWaterCmd.java

@@ -71,7 +71,6 @@ public class SaveMeterWaterCmd extends Cmd {
 
     public static final String CODE_PREFIX_ID = "10";
 
-
     @Autowired
     private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
 
@@ -87,7 +86,6 @@ public class SaveMeterWaterCmd extends Cmd {
     @Autowired
     private IOwnerInnerServiceSMO ownerInnerServiceSMOImpl;
 
-
     @Autowired
     private IPayFeeBatchV1InnerServiceSMO payFeeBatchV1InnerServiceSMOImpl;
 
@@ -97,7 +95,6 @@ public class SaveMeterWaterCmd extends Cmd {
     @Autowired
     private IMeterWaterV1InnerServiceSMO meterWaterV1InnerServiceSMOImpl;
 
-
     @Autowired
     private IPayFeeV1InnerServiceSMO payFeeV1InnerServiceSMOImpl;
 
@@ -116,13 +113,11 @@ public class SaveMeterWaterCmd extends Cmd {
         Assert.hasKeyAndValue(reqJson, "curReadingTime", "请求报文中未包含curReadingTime");
         Assert.hasKeyAndValue(reqJson, "objType", "请求报文中未包含objType");
         Assert.hasKeyAndValue(reqJson, "meterType", "请求报文中未包含抄表类型");
-
     }
 
     @Override
     @Java110Transactional
     public void doCmd(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
-
         String objId = reqJson.getString("objId");
         RoomDto roomDto = new RoomDto();
         roomDto.setRoomId(objId);
@@ -232,14 +227,18 @@ public class SaveMeterWaterCmd extends Cmd {
         }
         cmdDataFlowContext.setResponseEntity(ResultVo.success());
     }
+
     /**
      * 添加小区信息
      *
-     * @param paramInJson     接口调用放传入入参
+     * @param paramInJson 接口调用放传入入参
      * @return 订单服务能够接受的报文
      */
     public void addMeterWater(JSONObject paramInJson) {
         MeterWaterPo meterWaterPo = BeanConvertUtil.covertBean(paramInJson, MeterWaterPo.class);
+        if (StringUtil.isEmpty(meterWaterPo.getbId())) {
+            meterWaterPo.setbId("-1");
+        }
         meterWaterPo.setWaterId(GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
 
         int flag = meterWaterV1InnerServiceSMOImpl.saveMeterWater(meterWaterPo);
@@ -250,7 +249,6 @@ public class SaveMeterWaterCmd extends Cmd {
     }
 
 
-
     /**
      * 生成批次号
      *

+ 5 - 10
service-fee/src/main/java/com/java110/fee/cmd/returnPayFee/UpdateReturnPayFeeCmd.java

@@ -18,7 +18,6 @@ package com.java110.fee.cmd.returnPayFee;
 import com.alibaba.fastjson.JSONObject;
 import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.annotation.Java110Transactional;
-import com.java110.core.context.DataFlowContext;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
@@ -36,7 +35,6 @@ import com.java110.po.fee.PayFeeDetailPo;
 import com.java110.po.fee.PayFeePo;
 import com.java110.po.payFeeDetailDiscount.PayFeeDetailDiscountPo;
 import com.java110.po.returnPayFee.ReturnPayFeePo;
-import com.java110.utils.constant.BusinessTypeConstant;
 import com.java110.utils.exception.CmdException;
 import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
@@ -52,7 +50,6 @@ import java.util.Calendar;
 import java.util.Date;
 import java.util.List;
 
-
 /**
  * 类表述:更新
  * 服务编码:returnPayFee.updateReturnPayFee
@@ -71,7 +68,6 @@ public class UpdateReturnPayFeeCmd extends Cmd {
     @Autowired
     private IReturnPayFeeV1InnerServiceSMO returnPayFeeV1InnerServiceSMOImpl;
 
-
     @Autowired
     private IPayFeeConfigDiscountInnerServiceSMO payFeeConfigDiscountInnerServiceSMOImpl;
 
@@ -84,8 +80,6 @@ public class UpdateReturnPayFeeCmd extends Cmd {
     @Autowired
     private IFeeDiscountSpecInnerServiceSMO feeDiscountSpecInnerServiceSMOImpl;
 
-
-
     @Autowired
     private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
 
@@ -111,6 +105,7 @@ public class UpdateReturnPayFeeCmd extends Cmd {
 
     private static final String SPEC_MONTH = "89002020980014"; //月份
 
+    public static final String CODE_PREFIX_ID = "10";
 
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) {
@@ -284,7 +279,7 @@ public class UpdateReturnPayFeeCmd extends Cmd {
     /**
      * 添加活动信息
      *
-     * @param paramInJson     接口调用放传入入参
+     * @param paramInJson 接口调用放传入入参
      * @return 订单服务能够接受的报文
      */
     public void updateReturnPayFee(JSONObject paramInJson) {
@@ -348,19 +343,19 @@ public class UpdateReturnPayFeeCmd extends Cmd {
     /**
      * 添加小区信息
      *
-     * @param paramInJson     接口调用放传入入参
+     * @param paramInJson 接口调用放传入入参
      * @return 订单服务能够接受的报文
      */
     public void addPayFeeDetailDiscountTwo(JSONObject paramInJson, JSONObject discountJson) {
         JSONObject businessFee = new JSONObject();
-        businessFee.put("detailDiscountId", "-1");
+        businessFee.put("detailDiscountId", GenerateCodeFactory.getGeneratorId(CODE_PREFIX_ID));
         businessFee.put("discountPrice", discountJson.getString("discountPrice"));
         businessFee.put("discountId", discountJson.getString("discountId"));
         businessFee.put("detailId", paramInJson.containsKey("newDetailId") ? paramInJson.getString("newDetailId") : paramInJson.getString("detailId"));
         businessFee.put("communityId", paramInJson.getString("communityId"));
         businessFee.put("feeId", paramInJson.getString("feeId"));
         PayFeeDetailDiscountPo payFeeDetailDiscountPo = BeanConvertUtil.covertBean(businessFee, PayFeeDetailDiscountPo.class);
-        int flag =payFeeDetailDiscountNewV1InnerServiceSMOImpl.savePayFeeDetailDiscountNew(payFeeDetailDiscountPo);
+        int flag = payFeeDetailDiscountNewV1InnerServiceSMOImpl.savePayFeeDetailDiscountNew(payFeeDetailDiscountPo);
         if (flag < 1) {
             throw new CmdException("更新数据失败");
         }

+ 3 - 2
service-order/src/main/java/com/java110/order/smo/impl/OIdServiceSMOImpl.java

@@ -116,9 +116,9 @@ public class OIdServiceSMOImpl implements IOIdServiceSMO {
                 JSONArray params = generateParam(orderItemDto);
                 httpEntity = new HttpEntity<String>(params.toJSONString(), header);
 
-                if(Environment.isStartBootWay()){
+                if (Environment.isStartBootWay()) {
                     outRestTemplate.exchange(BOOT_FALLBACK_URL, HttpMethod.POST, httpEntity, String.class);
-                }else {
+                } else if (!StringUtil.isEmpty(orderItemDto.getActionObj()) && !orderItemDto.getActionObj().equals("meter_water")) {
                     restTemplate.exchange(FALLBACK_URL.replace(SERVICE_NAME, orderItemDto.getServiceName()), HttpMethod.POST, httpEntity, String.class);
                 }
 
@@ -360,6 +360,7 @@ public class OIdServiceSMOImpl implements IOIdServiceSMO {
     /**
      * 这里 兼容性处理
      * 因为我们不涉及 物理删除 都是逻辑删除 所以 status_cd 为 1 时强行设置为DEL 为逻辑删除
+     *
      * @param orderItemDto
      * @return
      */

+ 9 - 2
service-store/src/main/java/com/java110/store/cmd/purchase/UrgentPurchaseApplyCmd.java

@@ -6,6 +6,7 @@ import com.java110.core.annotation.Java110Cmd;
 import com.java110.core.context.ICmdDataFlowContext;
 import com.java110.core.event.cmd.Cmd;
 import com.java110.core.event.cmd.CmdEvent;
+import com.java110.core.factory.CommunitySettingFactory;
 import com.java110.core.factory.GenerateCodeFactory;
 import com.java110.dto.allocationStorehouse.AllocationStorehouseDto;
 import com.java110.dto.allocationStorehouseApply.AllocationStorehouseApplyDto;
@@ -24,6 +25,7 @@ import com.java110.utils.util.Assert;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.DateUtil;
 import com.java110.utils.util.StringUtil;
+import com.java110.vo.ResultVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.http.ResponseEntity;
 
@@ -95,13 +97,18 @@ public class UrgentPurchaseApplyCmd extends Cmd {
         //查询当月紧急采购的次数
         int count = purchaseApplyInnerServiceSMOImpl.queryPurchaseApplysCount(purchaseApplyDto);
         //取出开关映射的值
-        String value = MappingCache.getValue(DOMAIN_COMMON, URGRNT_NUMBER);
+        String value = CommunitySettingFactory.getValue(purchaseApplyDto.getCommunityId(), URGRNT_NUMBER);
+        if (StringUtil.isEmpty(value)) {
+            value = MappingCache.getValue(DOMAIN_COMMON, URGRNT_NUMBER);
+        }
         if (StringUtil.isEmpty(value)) {
             throw new IllegalArgumentException("映射值为空!");
         }
         int number = Integer.parseInt(value);
         if (count >= number) {
-            throw new IllegalArgumentException("本月紧急采购次数已超过" + number + "次,请下月再使用!");
+            ResponseEntity<String> responseEntity = ResultVo.createResponseEntity(ResultVo.CODE_BUSINESS_VERIFICATION, "本月紧急采购次数已超过" + number + "次,请下月再使用!");
+            context.setResponseEntity(responseEntity);
+            return;
         }
         PurchaseApplyPo purchaseApplyPo = new PurchaseApplyPo();
         purchaseApplyPo.setApplyOrderId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_applyOrderId));

+ 8 - 5
service-user/src/main/java/com/java110/user/cmd/owner/EditOwnerCmd.java

@@ -36,7 +36,6 @@ import java.util.List;
 @Java110Cmd(serviceCode = "owner.editOwner")
 public class EditOwnerCmd extends Cmd {
 
-
     @Autowired
     private IFileInnerServiceSMO fileInnerServiceSMOImpl;
 
@@ -51,18 +50,18 @@ public class EditOwnerCmd extends Cmd {
 
     @Autowired
     private IOwnerAppUserInnerServiceSMO ownerAppUserInnerServiceSMOImpl;
+
     @Autowired
     private IOwnerAppUserV1InnerServiceSMO ownerAppUserV1InnerServiceSMOImpl;
 
     @Autowired
     private IFileRelInnerServiceSMO fileRelInnerServiceSMOImpl;
 
-
     @Override
     public void validate(CmdEvent event, ICmdDataFlowContext cmdDataFlowContext, JSONObject reqJson) throws CmdException {
         Assert.jsonObjectHaveKey(reqJson, "memberId", "请求报文中未包含ownerId");
         Assert.jsonObjectHaveKey(reqJson, "name", "请求报文中未包含name");
-        Assert.jsonObjectHaveKey(reqJson, "age", "请求报文中未包含age");
+//        Assert.jsonObjectHaveKey(reqJson, "age", "请求报文中未包含age");
         Assert.jsonObjectHaveKey(reqJson, "link", "请求报文中未包含link");
         Assert.jsonObjectHaveKey(reqJson, "sex", "请求报文中未包含sex");
         Assert.jsonObjectHaveKey(reqJson, "ownerTypeCd", "请求报文中未包含ownerTypeCd");
@@ -84,6 +83,7 @@ public class EditOwnerCmd extends Cmd {
         }
         //获取身份证号(判断身份证号是否重复)
         String idCard = reqJson.getString("idCard");
+
         if (!StringUtil.isEmpty(idCard) && idCard.contains("*")) {
             OwnerDto owner = new OwnerDto();
             owner.setOwnerId(reqJson.getString("ownerId"));
@@ -97,8 +97,8 @@ public class EditOwnerCmd extends Cmd {
 
         String userValidate = MappingCache.getValue("USER_VALIDATE");
 
-        if(!"ON".equals(userValidate)){
-            return ;
+        if (!"ON".equals(userValidate)) {
+            return;
         }
 
         OwnerDto ownerDto = new OwnerDto();
@@ -199,6 +199,9 @@ public class EditOwnerCmd extends Cmd {
         }
         businessOwner.put("state", ownerDtos.get(0).getState());
         OwnerPo ownerPo = BeanConvertUtil.covertBean(businessOwner, OwnerPo.class);
+        if (StringUtil.isEmpty(ownerPo.getIdCard())) {
+            ownerPo.setAge(null);
+        }
         int flag = ownerV1InnerServiceSMOImpl.updateOwner(ownerPo);
         if (flag < 1) {
             throw new CmdException("修改业主失败");

+ 0 - 5
service-user/src/main/java/com/java110/user/cmd/owner/ObtainOwnerAge.java

@@ -71,11 +71,6 @@ public class ObtainOwnerAge extends Cmd {
             ownerDto.setAge(String.valueOf(age));
             ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(ownerDto), HttpStatus.OK);
             cmdDataFlowContext.setResponseEntity(responseEntity);
-        } else {
-            msg = "业主身份证号码不匹配!";
-            ownerDto.setMsg(msg);
-            ResponseEntity<String> responseEntity = new ResponseEntity<String>(JSONObject.toJSONString(ownerDto), HttpStatus.OK);
-            cmdDataFlowContext.setResponseEntity(responseEntity);
         }
     }
 }