|
|
@@ -332,53 +332,23 @@ public class FeeInnerServiceSMOImpl extends BaseServiceSMO implements IFeeInnerS
|
|
|
}
|
|
|
|
|
|
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("arrearsEndTime", DateUtil.getNow(DateUtil.DATE_FORMATE_STRING_A));
|
|
|
info.put("state", FeeDto.STATE_DOING);
|
|
|
- int feeTotalCount = feeServiceDaoImpl.queryFeesCount(info);
|
|
|
- config.put("feeCount", feeTotalCount - oweFeeCount);
|
|
|
+ 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);
|
|
|
+
|
|
|
}
|
|
|
|
|
|
|