java110 лет назад: 5
Родитель
Сommit
fa7eef463c
20 измененных файлов с 495 добавлено и 10 удалено
  1. 2 0
      java110-bean/src/main/java/com/java110/dto/RoomDto.java
  2. 9 0
      java110-bean/src/main/java/com/java110/dto/fee/FeeConfigDto.java
  3. 9 0
      java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java
  4. 2 2
      java110-core/src/main/java/com/java110/core/factory/WechatFactory.java
  5. 13 0
      java110-db/src/main/resources/mapper/community/RepairServiceDaoImplMapper.xml
  6. 4 0
      java110-db/src/main/resources/mapper/fee/FeeConfigServiceDaoImplMapper.xml
  7. 6 0
      java110-interface/src/main/java/com/java110/intf/fee/IFeeInnerServiceSMO.java
  8. 1 1
      service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java
  9. 82 0
      service-community/src/main/java/com/java110/community/api/BigScreenApi.java
  10. 2 1
      service-community/src/main/java/com/java110/community/api/RoomApi.java
  11. 16 0
      service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsBMO.java
  12. 16 0
      service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsFeeBMO.java
  13. 16 0
      service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsRepairBMO.java
  14. 16 0
      service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsRoomBMO.java
  15. 65 0
      service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsBMOImpl.java
  16. 35 0
      service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsFeeBMOImpl.java
  17. 66 0
      service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsRepairBMOImpl.java
  18. 52 0
      service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsRoomBMOImpl.java
  19. 81 5
      service-fee/src/main/java/com/java110/fee/smo/impl/FeeInnerServiceSMOImpl.java
  20. 2 1
      service-front/src/main/java/com/java110/front/smo/payment/impl/ToNotifySMOImpl.java

+ 2 - 0
java110-bean/src/main/java/com/java110/dto/RoomDto.java

@@ -15,6 +15,8 @@ import java.util.List;
 public class RoomDto extends PageDto implements Serializable {
 
     public static final String STATE_SELL = "2001";
+    public static final String STATE_FREE = "2002";
+
 
     private String unitPrice;
     private String section;

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/fee/FeeConfigDto.java

@@ -34,6 +34,7 @@ public class FeeConfigDto extends PageDto implements Serializable {
     private String feeName;
     private String startTime;
     private String endTime;
+    private String curTime;
     private String communityId;
     private String feeTypeCdName;
     private String feeFlagName;
@@ -205,4 +206,12 @@ public class FeeConfigDto extends PageDto implements Serializable {
     public void setPaymentCycle(String paymentCycle) {
         this.paymentCycle = paymentCycle;
     }
+
+    public String getCurTime() {
+        return curTime;
+    }
+
+    public void setCurTime(String curTime) {
+        this.curTime = curTime;
+    }
 }

+ 9 - 0
java110-bean/src/main/java/com/java110/dto/repair/RepairDto.java

@@ -50,6 +50,7 @@ public class RepairDto extends PageDto implements Serializable {
     private String repairId;
     private String tel;
     private String state;
+    private String[] statess;
     private List<String> states;
     private String stateName;
     private String communityId;
@@ -286,4 +287,12 @@ public class RepairDto extends PageDto implements Serializable {
     public void setStates(List<String> states) {
         this.states = states;
     }
+
+    public String[] getStatess() {
+        return statess;
+    }
+
+    public void setStatess(String[] statess) {
+        this.statess = statess;
+    }
 }

+ 2 - 2
java110-core/src/main/java/com/java110/core/factory/WechatFactory.java

@@ -86,7 +86,7 @@ public class WechatFactory {
      * @return
      */
     public static String getWId(String appId) {
-        return AuthenticationFactory.encrypt(password,appId);
+        return AuthenticationFactory.encrypt(password, appId);
     }
 
     /**
@@ -96,7 +96,7 @@ public class WechatFactory {
      * @return
      */
     public static String getAppId(String wId) {
-        return AuthenticationFactory.decrypt(password,wId);
+        return AuthenticationFactory.decrypt(password, wId);
     }
 
 }

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

@@ -155,6 +155,12 @@
         <if test="state !=null and state != ''">
             and t.state= #{state}
         </if>
+        <if test="statess !=null">
+            and t.state in
+            <foreach collection="statess" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>
@@ -263,6 +269,13 @@
         <if test="state !=null and state != ''">
             and t.state= #{state}
         </if>
+
+        <if test="statess !=null">
+            and t.state in
+            <foreach collection="statess" item="item" open="(" close=")" separator=",">
+                #{item}
+            </foreach>
+        </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>

+ 4 - 0
java110-db/src/main/resources/mapper/fee/FeeConfigServiceDaoImplMapper.xml

@@ -179,6 +179,10 @@
         <if test="endTime !=null ">
             and t.end_time= #{endTime}
         </if>
+        <if test="curTime !=null ">
+            and t.end_time &gt; #{curTime}
+            and t.start_time &lt; #{curTime}
+        </if>
         <if test="communityId !=null and communityId != ''">
             and t.community_id= #{communityId}
         </if>

+ 6 - 0
java110-interface/src/main/java/com/java110/intf/fee/IFeeInnerServiceSMO.java

@@ -1,5 +1,7 @@
 package com.java110.intf.fee;
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.java110.config.feign.FeignConfiguration;
 import com.java110.dto.fee.BillDto;
 import com.java110.dto.fee.BillOweFeeDto;
@@ -143,4 +145,8 @@ public interface IFeeInnerServiceSMO {
 
     @RequestMapping(value = "/saveFee", method = RequestMethod.POST)
     int saveFee(@RequestBody List<PayFeePo> payFeePos);
+
+
+    @RequestMapping(value = "/getAssetsFee", method = RequestMethod.POST)
+    public JSONArray getAssetsFee(@RequestBody String communityId);
 }

+ 1 - 1
service-community/src/main/java/com/java110/community/CommunityServiceApplicationStart.java

@@ -33,7 +33,7 @@ import java.nio.charset.Charset;
 @EnableDiscoveryClient
 @Java110ListenerDiscovery(listenerPublishClass = BusinessServiceDataFlowEventPublishing.class,
         basePackages = {"com.java110.community.listener"})
-@EnableFeignClients(basePackages = {"com.java110.intf.user", "com.java110.intf.common"})
+@EnableFeignClients(basePackages = {"com.java110.intf.user", "com.java110.intf.common","com.java110.intf.fee"})
 public class CommunityServiceApplicationStart {
 
     private static Logger logger = LoggerFactory.getLogger(CommunityServiceApplicationStart.class);

+ 82 - 0
service-community/src/main/java/com/java110/community/api/BigScreenApi.java

@@ -0,0 +1,82 @@
+package com.java110.community.api;
+
+import com.java110.community.bmo.assets.IQueryAssetsBMO;
+import com.java110.community.bmo.assets.IQueryAssetsFeeBMO;
+import com.java110.community.bmo.assets.IQueryAssetsRepairBMO;
+import com.java110.community.bmo.assets.IQueryAssetsRoomBMO;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping(value = "/bigScreen")
+public class BigScreenApi {
+
+
+    @Autowired
+    private IQueryAssetsBMO queryAssetsBMOImpl;
+
+    @Autowired
+    private IQueryAssetsRoomBMO queryAssetsRoomBMOImpl;
+
+    @Autowired
+    private IQueryAssetsRepairBMO queryAssetsRepairBMOImpl;
+
+    @Autowired
+    private IQueryAssetsFeeBMO queryAssetsFeeBMOImpl;
+
+
+    /**
+     * 查询资产
+     *
+     * @param communityId
+     * @return
+     * @Service /bigScreen/getAssets
+     * @path /app/bigScreen/getAssets
+     */
+    @RequestMapping(value = "/getAssets", method = RequestMethod.GET)
+    public ResponseEntity<String> getAssets(@RequestParam(value = "communityId") String communityId) {
+        return queryAssetsBMOImpl.query(communityId);
+    }
+
+
+    /**
+     * 查询房屋
+     *
+     * @param communityId
+     * @return
+     * @Service /bigScreen/getAssetsRoom
+     * @path /app/bigScreen/getAssetsRoom
+     */
+    @RequestMapping(value = "/getAssetsRoom", method = RequestMethod.GET)
+    public ResponseEntity<String> getAssetsRoom(@RequestParam(value = "communityId") String communityId) {
+        return queryAssetsRoomBMOImpl.query(communityId);
+    }
+
+    /**
+     * @param communityId
+     * @return
+     * @Service /bigScreen/getAssetsRepair
+     * @path /app/bigScreen/getAssetsRepair
+     */
+    @RequestMapping(value = "/getAssetsRepair", method = RequestMethod.GET)
+    public ResponseEntity<String> getAssetsRepair(@RequestParam(value = "communityId") String communityId) {
+        return queryAssetsRepairBMOImpl.query(communityId);
+    }
+
+    /**
+     * 查询大屏费用
+     *
+     * @param communityId
+     * @return
+     * @Service /bigScreen/getAssetsFee
+     * @path /app/bigScreen/getAssetsFee
+     */
+    @RequestMapping(value = "/getAssetsFee", method = RequestMethod.GET)
+    public ResponseEntity<String> getAssetsFee(@RequestParam(value = "communityId") String communityId) {
+        return queryAssetsFeeBMOImpl.query(communityId);
+    }
+}

+ 2 - 1
service-community/src/main/java/com/java110/community/api/RoomApi.java

@@ -27,7 +27,8 @@ public class RoomApi {
      *
      * @param reqJson
      * @return
-     * @path /room/getRoom
+     * @Service /room/getRoom
+     * @path /app/room/getRoom
      */
     @RequestMapping(value = "/getRoom", method = RequestMethod.POST)
     public ResponseEntity<String> getRoom(@RequestBody JSONObject reqJson) {

+ 16 - 0
service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsBMO.java

@@ -0,0 +1,16 @@
+package com.java110.community.bmo.assets;
+
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 资产查询接口类
+ */
+public interface IQueryAssetsBMO {
+
+    /**
+     * 查询资产信息
+     * @param communityId
+     * @return
+     */
+    ResponseEntity<String> query(String communityId);
+}

+ 16 - 0
service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsFeeBMO.java

@@ -0,0 +1,16 @@
+package com.java110.community.bmo.assets;
+
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 资产查询接口类
+ */
+public interface IQueryAssetsFeeBMO {
+
+    /**
+     * 查询资产信息
+     * @param communityId
+     * @return
+     */
+    ResponseEntity<String> query(String communityId);
+}

+ 16 - 0
service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsRepairBMO.java

@@ -0,0 +1,16 @@
+package com.java110.community.bmo.assets;
+
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 资产查询接口类
+ */
+public interface IQueryAssetsRepairBMO {
+
+    /**
+     * 查询资产信息
+     * @param communityId
+     * @return
+     */
+    ResponseEntity<String> query(String communityId);
+}

+ 16 - 0
service-community/src/main/java/com/java110/community/bmo/assets/IQueryAssetsRoomBMO.java

@@ -0,0 +1,16 @@
+package com.java110.community.bmo.assets;
+
+import org.springframework.http.ResponseEntity;
+
+/**
+ * 资产查询接口类
+ */
+public interface IQueryAssetsRoomBMO {
+
+    /**
+     * 查询资产信息
+     * @param communityId
+     * @return
+     */
+    ResponseEntity<String> query(String communityId);
+}

+ 65 - 0
service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsBMOImpl.java

@@ -0,0 +1,65 @@
+package com.java110.community.bmo.assets.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.community.bmo.assets.IQueryAssetsBMO;
+import com.java110.dto.RoomDto;
+import com.java110.dto.machine.MachineDto;
+import com.java110.dto.parking.ParkingSpaceDto;
+import com.java110.intf.common.IMachineInnerServiceSMO;
+import com.java110.intf.community.IFloorInnerServiceSMO;
+import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.community.IRoomInnerServiceSMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service
+public class QueryAssetsBMOImpl implements IQueryAssetsBMO {
+
+    @Autowired
+    private IFloorInnerServiceSMO floorInnerServiceSMOImpl;
+
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
+    @Autowired
+    private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
+
+    @Autowired
+    private IMachineInnerServiceSMO machineInnerServiceSMOImpl;
+
+    /**
+     * @param communityId
+     * @return {
+     * data:{
+     * floorCount:30,
+     * roomCount:29,
+     * parkingSpaceCount:12,
+     * machineCount:12
+     * }
+     * }
+     */
+    @Override
+    public ResponseEntity<String> query(String communityId) {
+        JSONObject data = new JSONObject();
+        int floorCount = floorInnerServiceSMOImpl.queryFloorsCount(communityId);
+
+        RoomDto roomDto = new RoomDto();
+        roomDto.setCommunityId(communityId);
+        int roomCount = roomInnerServiceSMOImpl.queryRoomsCount(roomDto);
+
+        ParkingSpaceDto parkingSpaceDto = new ParkingSpaceDto();
+        parkingSpaceDto.setCommunityId(communityId);
+        int parkingSpaceCount = parkingSpaceInnerServiceSMOImpl.queryParkingSpacesCount(parkingSpaceDto);
+
+        MachineDto machineDto = new MachineDto();
+        machineDto.setCommunityId(communityId);
+        int machineCount = machineInnerServiceSMOImpl.queryMachinesCount(machineDto);
+        data.put("floorCount", floorCount);
+        data.put("roomCount", roomCount);
+        data.put("parkingSpaceCount", parkingSpaceCount);
+        data.put("machineCount", machineCount);
+        return ResultVo.createResponseEntity(data);
+    }
+}

+ 35 - 0
service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsFeeBMOImpl.java

@@ -0,0 +1,35 @@
+package com.java110.community.bmo.assets.impl;
+
+import com.alibaba.fastjson.JSONArray;
+import com.java110.community.bmo.assets.IQueryAssetsFeeBMO;
+import com.java110.intf.fee.IFeeInnerServiceSMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service
+public class QueryAssetsFeeBMOImpl implements IQueryAssetsFeeBMO {
+
+
+    @Autowired
+    private IFeeInnerServiceSMO feeInnerServiceSMOImpl;
+
+
+    /**
+     * @param communityId
+     * @return {
+     * data:{
+     * floorCount:30,
+     * roomCount:29,
+     * parkingSpaceCount:12,
+     * machineCount:12
+     * }
+     * }
+     */
+    @Override
+    public ResponseEntity<String> query(String communityId) {
+        JSONArray data = feeInnerServiceSMOImpl.getAssetsFee(communityId);
+        return ResultVo.createResponseEntity(data);
+    }
+}

+ 66 - 0
service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsRepairBMOImpl.java

@@ -0,0 +1,66 @@
+package com.java110.community.bmo.assets.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.community.bmo.assets.IQueryAssetsRepairBMO;
+import com.java110.dto.repair.RepairDto;
+import com.java110.intf.common.IMachineInnerServiceSMO;
+import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.community.IRepairInnerServiceSMO;
+import com.java110.intf.community.IRoomInnerServiceSMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service
+public class QueryAssetsRepairBMOImpl implements IQueryAssetsRepairBMO {
+
+    @Autowired
+    private IRepairInnerServiceSMO repairInnerServiceSMOImpl;
+
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
+    @Autowired
+    private IParkingSpaceInnerServiceSMO parkingSpaceInnerServiceSMOImpl;
+
+    @Autowired
+    private IMachineInnerServiceSMO machineInnerServiceSMOImpl;
+
+    /**
+     * @param communityId
+     * @return {
+     * data:{
+     * floorCount:30,
+     * roomCount:29,
+     * parkingSpaceCount:12,
+     * machineCount:12
+     * }
+     * }
+     */
+    @Override
+    public ResponseEntity<String> query(String communityId) {
+        JSONObject data = new JSONObject();
+        RepairDto repairDto = new RepairDto();
+        repairDto.setCommunityId(communityId);
+        String[] states = new String[]{"1000"};
+        repairDto.setStatess(states);
+        int unDealCount = repairInnerServiceSMOImpl.queryRepairsCount(repairDto);
+
+        states = new String[]{"1100", "1200", "1400", "1300", "1500"};
+        repairDto.setStatess(states);
+        int dealingCount = repairInnerServiceSMOImpl.queryRepairsCount(repairDto);
+
+        states = new String[]{
+                "1700",
+                "1800",
+                "1900",
+                "2000"};
+        repairDto.setStatess(states);
+        int dealedCount = repairInnerServiceSMOImpl.queryRepairsCount(repairDto);
+        data.put("unDealCount", unDealCount);
+        data.put("dealingCount", dealingCount);
+        data.put("dealedCount", dealedCount);
+        return ResultVo.createResponseEntity(data);
+    }
+}

+ 52 - 0
service-community/src/main/java/com/java110/community/bmo/assets/impl/QueryAssetsRoomBMOImpl.java

@@ -0,0 +1,52 @@
+package com.java110.community.bmo.assets.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import com.java110.community.bmo.assets.IQueryAssetsBMO;
+import com.java110.community.bmo.assets.IQueryAssetsRoomBMO;
+import com.java110.dto.RoomDto;
+import com.java110.dto.machine.MachineDto;
+import com.java110.dto.parking.ParkingSpaceDto;
+import com.java110.intf.common.IMachineInnerServiceSMO;
+import com.java110.intf.community.IFloorInnerServiceSMO;
+import com.java110.intf.community.IParkingSpaceInnerServiceSMO;
+import com.java110.intf.community.IRoomInnerServiceSMO;
+import com.java110.vo.ResultVo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.ResponseEntity;
+import org.springframework.stereotype.Service;
+
+@Service
+public class QueryAssetsRoomBMOImpl implements IQueryAssetsRoomBMO {
+
+
+    @Autowired
+    private IRoomInnerServiceSMO roomInnerServiceSMOImpl;
+
+
+    /**
+     * @param communityId
+     * @return {
+     * data:{
+     * floorCount:30,
+     * roomCount:29,
+     * parkingSpaceCount:12,
+     * machineCount:12
+     * }
+     * }
+     */
+    @Override
+    public ResponseEntity<String> query(String communityId) {
+
+        RoomDto roomDto = new RoomDto();
+        roomDto.setCommunityId(communityId);
+        roomDto.setState(RoomDto.STATE_SELL);
+        int sellRoomCount = roomInnerServiceSMOImpl.queryRoomsCount(roomDto);
+
+        roomDto.setState(RoomDto.STATE_FREE);
+        int freeRoomCount = roomInnerServiceSMOImpl.queryRoomsCount(roomDto);
+        JSONObject data = new JSONObject();
+        data.put("sellRoomCount", sellRoomCount);
+        data.put("freeRoomCount", freeRoomCount);
+        return ResultVo.createResponseEntity(data);
+    }
+}

+ 81 - 5
service-fee/src/main/java/com/java110/fee/smo/impl/FeeInnerServiceSMOImpl.java

@@ -1,19 +1,19 @@
 package com.java110.fee.smo.impl;
 
 
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
 import com.java110.core.base.smo.BaseServiceSMO;
 import com.java110.dto.PageDto;
-import com.java110.dto.fee.BillDto;
-import com.java110.dto.fee.BillOweFeeDto;
-import com.java110.dto.fee.FeeAttrDto;
-import com.java110.dto.fee.FeeDto;
+import com.java110.dto.fee.*;
 import com.java110.dto.user.UserDto;
 import com.java110.fee.dao.IFeeServiceDao;
+import com.java110.intf.fee.IFeeConfigInnerServiceSMO;
 import com.java110.intf.fee.IFeeInnerServiceSMO;
 import com.java110.intf.user.IUserInnerServiceSMO;
-import com.java110.po.fee.FeeAttrPo;
 import com.java110.po.fee.PayFeePo;
 import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.DateUtil;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RestController;
@@ -37,9 +37,13 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
     @Autowired
     private IFeeServiceDao feeServiceDaoImpl;
 
+    @Autowired
+    private IFeeConfigInnerServiceSMO feeConfigInnerServiceSMOImpl;
+
     @Autowired
     private IUserInnerServiceSMO userInnerServiceSMOImpl;
 
+
     @Override
     public List<FeeDto> queryFees(@RequestBody FeeDto feeDto) {
 
@@ -233,6 +237,78 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
         return feeServiceDaoImpl.insertFees(info);
     }
 
+    @Override
+    public JSONArray getAssetsFee(String communityId) {
+
+        JSONArray data = new JSONArray();
+        FeeConfigDto feeConfigDto = new FeeConfigDto();
+        feeConfigDto.setCommunityId(communityId);
+        feeConfigDto.setCurTime(DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+        List<FeeConfigDto> feeConfigDtos = feeConfigInnerServiceSMOImpl.queryFeeConfigs(feeConfigDto);
+
+        if (feeConfigDtos == null || feeConfigDtos.size() < 1) {
+            return data;
+        }
+
+
+        for (FeeConfigDto tmpFeeConfigDto : feeConfigDtos) {
+            dealFeeConfig(data, tmpFeeConfigDto);
+        }
+
+
+        return data;
+    }
+
+    private void dealFeeConfig(JSONArray data, FeeConfigDto tmpFeeConfigDto) {
+        String billType = tmpFeeConfigDto.getBillType();
+        JSONObject config = new JSONObject();
+        if (FeeConfigDto.BILL_TYPE_EVERY.equals(billType)) {
+            Map info = new HashMap();
+            info.put("configId", tmpFeeConfigDto.getConfigId());
+            info.put("communityId", tmpFeeConfigDto.getCommunityId());
+            info.put("arrearsEndTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+            info.put("state", FeeDto.STATE_DOING);
+            int oweFeeCount = feeServiceDaoImpl.queryFeesCount(info);
+            config.put("oweFeeCount", oweFeeCount);
+
+            info.put("noArrearsEndTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
+            info.put("state", FeeDto.STATE_DOING);
+            int feeCount = feeServiceDaoImpl.queryFeesCount(info);
+            config.put("feeCount", feeCount);
+
+            config.put("feeName", tmpFeeConfigDto.getFeeName());
+            data.add(config);
+            return;
+        }
+        BillDto billDto = new BillDto();
+        billDto.setConfigId(tmpFeeConfigDto.getConfigId());
+        billDto.setCommunityId(tmpFeeConfigDto.getCommunityId());
+        billDto.setCurBill("T");
+        List<Map> bills = feeServiceDaoImpl.queryBills(BeanConvertUtil.beanCovertMap(billDto));
+        if (bills == null || bills.size() < 1) {
+            config.put("oweFeeCount", 0);
+            config.put("feeCount", 0);
+            config.put("feeName", tmpFeeConfigDto.getFeeName());
+            return;
+        }
+
+        Map tmpBillDto = bills.get(0);
+        Map info = new HashMap();
+        info.put("billId", tmpBillDto.get("billId"));
+        info.put("communityId", tmpFeeConfigDto.getCommunityId());
+        int oweFeeCount = feeServiceDaoImpl.queryBillOweFeeCount(info);
+
+        config.put("oweFeeCount", oweFeeCount);
+        info.put("configId", tmpFeeConfigDto.getConfigId());
+        info.put("communityId", tmpFeeConfigDto.getCommunityId());
+        info.put("state", FeeDto.STATE_DOING);
+        int feeTotalCount = feeServiceDaoImpl.queryFeesCount(info);
+        config.put("feeCount", feeTotalCount - oweFeeCount);
+
+        config.put("feeName", tmpFeeConfigDto.getFeeName());
+        data.add(config);
+    }
+
 
     public IFeeServiceDao getFeeServiceDaoImpl() {
         return feeServiceDaoImpl;

+ 2 - 1
service-front/src/main/java/com/java110/front/smo/payment/impl/ToNotifySMOImpl.java

@@ -79,10 +79,11 @@ public class ToNotifySMOImpl implements IToNotifySMO {
 
     public int confirmPayFee(Map<String, Object> map) {
         String wId = map.get("wId").toString();
+        wId = wId.replace(" ", "+");
         SortedMap<String, String> paramMap = new TreeMap<String, String>();
         ResponseEntity<String> responseEntity = null;
         for (String key : map.keySet()) {
-            if("wId".equals(key)){
+            if ("wId".equals(key)) {
                 continue;
             }
             paramMap.put(key, map.get(key).toString());