| @@ -30,7 +30,6 @@ import com.iformall.enums.EnumYesOrNo; | |||
| import com.iformall.service.ExcelService; | |||
| import com.iformall.service.SysConfigService; | |||
| import com.iformall.service.WxBillActionService; | |||
| import com.iformall.service.WxBillAllService; | |||
| import com.iformall.service.WxMerchantService; | |||
| import com.iformall.service.WxPayAccountBillService; | |||
| import com.iformall.service.helper.WxBillAllHelper; | |||
| @@ -60,8 +59,8 @@ import java.util.Map; | |||
| @RestController | |||
| @RequestMapping("wxBillAll") | |||
| public class WxBillAllController extends BillBaseController { | |||
| @Autowired | |||
| private WxBillAllService wxBillAllService; | |||
| //@Autowired | |||
| //private WxBillAllService wxBillAllService; | |||
| private Logger logger = LoggerFactory.getLogger(WxBillAllController.class); | |||
| @@ -98,10 +97,10 @@ public class WxBillAllController extends BillBaseController { | |||
| wxMerchant.setFloorForRule(dataRule.getFloorIds()); | |||
| wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); | |||
| } | |||
| return new ResultData(getVoPage(wxMerchant, pageNum, pageSize)); | |||
| return new ResultData(getVoPage(wxMerchant, pageNum, pageSize,null)); | |||
| } | |||
| private PageInfo<WxMerchantBillVo> getVoPage(WxMerchant wxMerchant,Integer pageNum, Integer pageSize) { | |||
| private PageInfo<WxMerchantBillVo> getVoPage(WxMerchant wxMerchant,Integer pageNum, Integer pageSize , Integer billStaus) { | |||
| Date starttime = wxMerchant.getStarttime(); | |||
| Date enttime = wxMerchant.getEndtime(); | |||
| wxMerchant.setStarttime(null); | |||
| @@ -129,6 +128,7 @@ public class WxBillAllController extends BillBaseController { | |||
| vo.setShopNumber(billAllHelper.getMerchantShopNumber(m)); | |||
| wxMerchant.setId(m.getId()); | |||
| wxMerchant.setBillStatus(billStaus); | |||
| WxBillSum rentSum = billAllHelper.getBillRentSum(wxMerchant,starttime, enttime); | |||
| WxBillSum rentManageSum = billAllHelper.getBillRentManageSum(wxMerchant, starttime, enttime,null); | |||
| WxBillSum rentDepositSum = billAllHelper.getBillDepositSum(wxMerchant, starttime, enttime); | |||
| @@ -150,6 +150,9 @@ public class WxBillAllController extends BillBaseController { | |||
| vo.setMaxDate(billAllHelper.getMaxDate(rentSum.getMaxDate(),rentManageSum.getMaxDate(),rentDepositSum.getMaxDate(),propertySum.getMaxDate(), | |||
| propertyDepositSum.getMaxDate(),dailySum.getMaxDate(),otherSum.getMaxDate(),otherDepositSum.getMaxDate())); | |||
| vo.setReturnPay(billAllHelper.calcuteSum(rentSum.getReturnPay(),rentManageSum.getReturnPay(),rentDepositSum.getReturnPay(),propertySum.getReturnPay(), | |||
| propertyDepositSum.getReturnPay(),dailySum.getReturnPay(),otherSum.getReturnPay(),otherDepositSum.getReturnPay())); | |||
| retList.add(vo); | |||
| } | |||
| @@ -178,7 +181,7 @@ public class WxBillAllController extends BillBaseController { | |||
| wxMerchant.setFloorForRule(dataRule.getFloorIds()); | |||
| wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); | |||
| } | |||
| PageInfo<WxMerchantBillVo> page = getVoPage(wxMerchant, 1, 10000); | |||
| PageInfo<WxMerchantBillVo> page = getVoPage(wxMerchant, 1, 10000,null); | |||
| excelService.exportExcel(page.getList(), null, "商户账单总览数据", WxMerchantBillVo.class, "商户账单总览数据.xlsx", response, false); | |||
| } | |||
| @@ -305,7 +308,7 @@ public class WxBillAllController extends BillBaseController { | |||
| return new ResultData(Result.ERROR,"分类非法"); | |||
| } | |||
| } | |||
| return new ResultData(getBillList(wxMerchant, btype, null, pageNum, pageSize)); | |||
| return new ResultData(getBillList(wxMerchant, btype, true,null, pageNum, pageSize)); | |||
| } | |||
| @GetMapping("nearBillList") | |||
| @@ -325,17 +328,19 @@ public class WxBillAllController extends BillBaseController { | |||
| return new ResultData(Result.ERROR,"分类非法"); | |||
| } | |||
| } | |||
| return new ResultData(getBillList(wxMerchant, btype, getNearBillBeforeDays(), pageNum, pageSize)); | |||
| return new ResultData(getBillList(wxMerchant, btype, true,getNearBillBeforeDays(), pageNum, pageSize)); | |||
| } | |||
| private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) { | |||
| private PageInfo getBillList(WxMerchant wxMerchant,EnumBillAllType btype,boolean isOwe,Integer nearBillBeforeDays, Integer pageNum, Integer pageSize) { | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| if (null != dataRule) { | |||
| wxMerchant.setFloorForRule(dataRule.getFloorIds()); | |||
| wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); | |||
| } | |||
| wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays()); | |||
| if (isOwe) { | |||
| wxMerchant.setOweBillBeforeDays(getOweBillBeforeDays()); | |||
| } | |||
| wxMerchant.setNearBillBeforeDays(nearBillBeforeDays); | |||
| return billAllHelper.getBillList(btype, wxMerchant,pageNum,pageSize); | |||
| @@ -362,7 +367,7 @@ public class WxBillAllController extends BillBaseController { | |||
| return ; | |||
| } | |||
| } | |||
| PageInfo page = getBillList(wxMerchant, btype, null, 1, 10000); | |||
| PageInfo page = getBillList(wxMerchant, btype, true,null, 1, 10000); | |||
| if (null == page) { | |||
| return; | |||
| } | |||
| @@ -384,7 +389,7 @@ public class WxBillAllController extends BillBaseController { | |||
| return ; | |||
| } | |||
| } | |||
| PageInfo page = getBillList(wxMerchant, btype, getNearBillBeforeDays(), 1, 10000); | |||
| PageInfo page = getBillList(wxMerchant, btype, true,getNearBillBeforeDays(), 1, 10000); | |||
| if (null == page) { | |||
| return; | |||
| } | |||
| @@ -655,6 +660,40 @@ public class WxBillAllController extends BillBaseController { | |||
| return new ResultData(retMap); | |||
| } | |||
| //退租列表 | |||
| @GetMapping("tuizujs") | |||
| @ApiImplicitParams({ | |||
| @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), | |||
| @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)}) | |||
| public ResultData tuizujs(@ModelAttribute WxMerchant wxMerchant, Integer pageNum, Integer pageSize) { | |||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||
| WxUserDataRule dataRule = this.getCurrentDataFloors(); | |||
| if (null != dataRule) { | |||
| wxMerchant.setFloorForRule(dataRule.getFloorIds()); | |||
| wxMerchant.setBusinessForRule(dataRule.getBussinessIds()); | |||
| } | |||
| return new ResultData(getVoPage(wxMerchant, pageNum, pageSize,EnumBillStatus.STOP_TO_SETTLE.getCode())); | |||
| } | |||
| //商户待结算账单 | |||
| @GetMapping("settleList") | |||
| public ResultData settleList(@ModelAttribute WxMerchant wxMerchant,Integer billType) { | |||
| if (null == billType || null == wxMerchant.getId()) { | |||
| return new ResultData(Result.ERROR,"参数错误"); | |||
| } | |||
| EnumBillAllType btype; | |||
| if (billType.intValue() == Constant.bill_all_type_manage_fee) { | |||
| btype = EnumBillAllType.RENT_BUSSINESS_MANAGE; | |||
| }else { | |||
| btype = EnumBillAllType.getEnum(billType); | |||
| if (null == btype) { | |||
| return new ResultData(Result.ERROR,"分类非法"); | |||
| } | |||
| } | |||
| wxMerchant.setBillStatus(EnumBillStatus.STOP_TO_SETTLE.getCode()); | |||
| return new ResultData(getBillList(wxMerchant, btype, false,getNearBillBeforeDays(), 1, 100)); | |||
| } | |||
| //###################################### 老代码 ###################################### | |||
| // | |||
| @@ -134,6 +134,11 @@ public class WxBillDaily extends WxBillBaseEntity { | |||
| return remark; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return "0"; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return "0"; | |||
| @@ -106,6 +106,11 @@ public class WxBillDeposit extends WxBillBaseEntity { | |||
| return ""; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return this.returnPrice; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return "0"; | |||
| @@ -126,6 +126,11 @@ public class WxBillOther extends WxBillBaseEntity { | |||
| return StringUtils.trimToEmpty(name)+StringUtils.trimToEmpty(comments); | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return "0"; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return "0"; | |||
| @@ -143,6 +143,11 @@ public class WxBillOtherDeposit extends WxBillBaseEntity { | |||
| return StringUtils.trimToEmpty(name)+StringUtils.trimToEmpty(comments); | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return this.returnPrice; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return "0"; | |||
| @@ -160,6 +160,11 @@ public class WxBillProperty extends WxBillBaseEntity { | |||
| return ""; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return "0"; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return latePayPrice; | |||
| @@ -119,6 +119,11 @@ public class WxBillPropertyDeposit extends WxBillBaseEntity { | |||
| return ""; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return this.returnPrice; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return "0"; | |||
| @@ -103,6 +103,11 @@ public class WxBillRent extends WxBillBaseEntity { | |||
| return ""; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return "0"; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return latePayPrice; | |||
| @@ -177,6 +177,11 @@ public class WxBillRentManage extends WxBillBaseEntity { | |||
| return ""; | |||
| } | |||
| @Override | |||
| public String getReturnPay() { | |||
| return "0"; | |||
| } | |||
| @Override | |||
| public String getBillLatePay() { | |||
| return latePayPrice; | |||
| @@ -456,5 +456,9 @@ public class WxMerchant extends TenantEntity { | |||
| @TableField(exist = false) | |||
| private Integer nearBillBeforeDays; | |||
| //账单状态 | |||
| @TableField(exist = false) | |||
| private Integer billStatus; | |||
| } | |||
| @@ -88,6 +88,10 @@ public class WxBillBaseEntity extends TenantEntity { | |||
| @TableField(exist = false) | |||
| protected Integer billType; | |||
| //已退款金额 | |||
| @TableField(exist = false) | |||
| protected String returnPay; | |||
| @Excel(name = "备注", width = 20, orderNum = "9") | |||
| @io.swagger.annotations.ApiModelProperty(value="备注",name="billRemark") | |||
| @TableField(exist = false) | |||
| @@ -30,6 +30,21 @@ public class WxBillSum implements Serializable { | |||
| private Date minDate; | |||
| private Date maxDate; | |||
| //手续费 | |||
| private String servicePay = "0"; | |||
| @TableField(exist = false) | |||
| private BigDecimal servicePayNumber; | |||
| //滞纳金 | |||
| private String latePay = "0"; | |||
| @TableField(exist = false) | |||
| private BigDecimal latePayNumber; | |||
| //已退回金额 | |||
| private String returnPay = "0"; | |||
| @TableField(exist = false) | |||
| private BigDecimal returnPayNumber; | |||
| public BigDecimal getNeedPayNumber() { | |||
| if (StringUtils.isNotBlank(needPay)) { | |||
| @@ -62,7 +77,36 @@ public class WxBillSum implements Serializable { | |||
| return oweNumber; | |||
| } | |||
| public BigDecimal getServicePayNumber() { | |||
| if (StringUtils.isNotBlank(servicePay)) { | |||
| this.servicePayNumber = new BigDecimal(servicePay); | |||
| }else { | |||
| this.servicePayNumber = new BigDecimal(0); | |||
| } | |||
| return servicePayNumber; | |||
| } | |||
| public BigDecimal getLatePayNumber() { | |||
| if (StringUtils.isNotBlank(latePay)) { | |||
| this.latePayNumber = new BigDecimal(latePay); | |||
| }else { | |||
| this.latePayNumber = new BigDecimal(0); | |||
| } | |||
| return latePayNumber; | |||
| } | |||
| public BigDecimal getNeedReturnNumber() { | |||
| if (StringUtils.isNotBlank(returnPay)) { | |||
| this.returnPayNumber = new BigDecimal(returnPay); | |||
| }else { | |||
| this.returnPayNumber = new BigDecimal(0); | |||
| } | |||
| return returnPayNumber; | |||
| } | |||
| @TableField(exist = false) | |||
| private String billName; | |||
| @TableField(exist = false) | |||
| private Integer billType; | |||
| } | |||
| @@ -50,6 +50,14 @@ public class WxMerchantBillVo implements Serializable { | |||
| return StringUtils.isBlank(owe) ? "0" : new BigDecimal(owe).toPlainString(); | |||
| } | |||
| private String returnPay; | |||
| @Excel(name = "已退款金额(元)", width = 20, orderNum = "7") | |||
| @TableField(exist = false) | |||
| private String returnPayNumber; | |||
| public String getReturnPayNumber() { | |||
| return StringUtils.isBlank(returnPay) ? "0" : new BigDecimal(returnPay).toPlainString(); | |||
| } | |||
| @Excel(name = "账单最小日期",format="yyyy-MM-dd", width = 20, orderNum = "7") | |||
| private Date minDate; | |||
| @@ -13,7 +13,7 @@ public enum EnumBillStatus { | |||
| //RETURN(5, "已退还"), | |||
| INVALID(6, "失效"), | |||
| BAD(7, "坏账"), | |||
| STOP_TO_SETTLE(8,"商户停用待结算") | |||
| STOP_TO_SETTLE(8,"退租待结算") | |||
| ; | |||
| public static EnumBillStatus getEnum(Integer code) { | |||
| @@ -127,6 +127,7 @@ public class WxBillAllHelper { | |||
| if (null != wxMerchant.getNearBillBeforeDays()) { | |||
| bill.setNearBillLastTime(getDateBefore(wxMerchant.getNearBillBeforeDays())); | |||
| } | |||
| bill.setStatus(wxMerchant.getBillStatus()); | |||
| } | |||
| public WxBillSum getBillRentSum(WxMerchant wxMerchant,Date starttime, Date enttime) { | |||
| @@ -137,6 +138,7 @@ public class WxBillAllHelper { | |||
| rentSum = new WxBillSum(); | |||
| } | |||
| rentSum.setBillName("租赁费用"); | |||
| rentSum.setBillType(EnumBillAllType.RENT.getCode()); | |||
| return rentSum; | |||
| } | |||
| @@ -170,8 +172,16 @@ public class WxBillAllHelper { | |||
| } | |||
| if (null != manageFeeType) { | |||
| rentManageSum.setBillName(manageFeeType.getMessage()); | |||
| if (manageFeeType == EnumRentContractManageFeeType.RENT_BUSSINESS_MANAGE_FEE) { | |||
| rentManageSum.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode()); | |||
| }else if (manageFeeType == EnumRentContractManageFeeType.RENT_OPERATING_MANAGE_FEE) { | |||
| rentManageSum.setBillType(EnumBillAllType.RENT_OPERATION_MANAGE.getCode()); | |||
| }else { | |||
| rentManageSum.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode()); | |||
| } | |||
| }else { | |||
| rentManageSum.setBillName("租赁营业&商业管理费费用"); | |||
| rentManageSum.setBillType(EnumBillAllType.RENT_BUSSINESS_MANAGE.getCode()); | |||
| } | |||
| return rentManageSum; | |||
| } | |||
| @@ -220,6 +230,7 @@ public class WxBillAllHelper { | |||
| rentDepositSum = new WxBillSum(); | |||
| } | |||
| rentDepositSum.setBillName("租赁押金费用"); | |||
| rentDepositSum.setBillType(EnumBillAllType.RENT_DEPOSIT.getCode()); | |||
| return rentDepositSum; | |||
| } | |||
| @@ -249,6 +260,7 @@ public class WxBillAllHelper { | |||
| propertySum = new WxBillSum(); | |||
| } | |||
| propertySum.setBillName("物业费用"); | |||
| propertySum.setBillType(EnumBillAllType.PROPERTY.getCode()); | |||
| return propertySum; | |||
| } | |||
| @@ -278,6 +290,7 @@ public class WxBillAllHelper { | |||
| propertyDepositSum = new WxBillSum(); | |||
| } | |||
| propertyDepositSum.setBillName("物业押金费用"); | |||
| propertyDepositSum.setBillType(EnumBillAllType.PROPERTY_DEPOSIT.getCode()); | |||
| return propertyDepositSum; | |||
| } | |||
| @@ -314,6 +327,7 @@ public class WxBillAllHelper { | |||
| }else { | |||
| dailySum.setBillName("日藏水电空调费用"); | |||
| } | |||
| dailySum.setBillType(EnumBillAllType.DAILY.getCode()); | |||
| return dailySum; | |||
| } | |||
| @@ -346,6 +360,7 @@ public class WxBillAllHelper { | |||
| otherSum = new WxBillSum(); | |||
| } | |||
| otherSum.setBillName("其他费用"); | |||
| otherSum.setBillType(EnumBillAllType.OTHER.getCode()); | |||
| return otherSum; | |||
| } | |||
| @@ -375,6 +390,7 @@ public class WxBillAllHelper { | |||
| otherDepositSum = new WxBillSum(); | |||
| } | |||
| otherDepositSum.setBillName("其他押金费用"); | |||
| otherDepositSum.setBillType(EnumBillAllType.OTHER_DEPOSIT.getCode()); | |||
| return otherDepositSum; | |||
| } | |||
| @@ -500,6 +500,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| //解绑商铺-没有租赁合同或物业合同才可以 | |||
| if (countRentContract == 0 || countPropertyContract == 0) { | |||
| wxMerchant.setStatus(EnumMerchantStatus.NOT_VALID.getCode()); | |||
| wxMerchant.setUpdateDate(new Date()); | |||
| wxMerchantMapper.updateById(wxMerchant); | |||
| WxMerchantShop wxMerchantShopQuery = new WxMerchantShop(); | |||
| wxMerchantShopQuery.updateTenantInfo(wxMerchant); | |||
| @@ -508,12 +509,14 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| List<WxMerchantShop> wxMerchantShopList = wxMerchantShopMapper.findList(wxMerchantShopQuery); | |||
| for (WxMerchantShop wxMerchantShop : wxMerchantShopList) { | |||
| wxMerchantShop.setIsDel(EnumDelStatus.DEL.getCode()); | |||
| wxMerchantShop.setUpdateDate(new Date()); | |||
| wxMerchantShopMapper.updateById(wxMerchantShop); | |||
| //更新商铺状态 | |||
| WxShop wxShop = new WxShop(); | |||
| wxShop.updateTenantInfo(wxMerchant); | |||
| wxShop.setId(wxMerchantShop.getShopId()); | |||
| wxShop.setStatus(EnumShopStatus.NOT_RENT.getCode()); | |||
| wxShop.setUpdateDate(new Date()); | |||
| wxShopMapper.updateById(wxShop); | |||
| } | |||
| //解绑用户 | |||
| @@ -522,6 +525,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { | |||
| List<WxMerchantBUser> wxMerchantBUserMapperList = wxMerchantBUserMapper.findList(bUser); | |||
| for (WxMerchantBUser wxMerchantBUser : wxMerchantBUserMapperList) { | |||
| wxMerchantBUser.setStatus(EnumMerchantBUserStatus.INVALID.getCode()); | |||
| wxMerchantBUser.setUpdateDate(new Date()); | |||
| wxMerchantBUserMapper.updateById(wxMerchantBUser); | |||
| } | |||
| //作废卡券 | |||
| @@ -168,13 +168,19 @@ | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillDaily" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| '0' late_pay, | |||
| '0' return_pay | |||
| from wx_bill_daily br | |||
| <include refid="queryBillDailyListConditions"/> | |||
| </select> | |||
| @@ -187,13 +187,19 @@ | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillDeposit" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| '0' late_pay, | |||
| sum(CAST(br.return_price AS DECIMAL(20,2))) as return_pay | |||
| from wx_bill_rent_deposit br | |||
| <include refid="queryBillRentListCondition"/> | |||
| </select> | |||
| @@ -172,14 +172,20 @@ | |||
| <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillOtherDeposit" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| '0' late_pay, | |||
| sum(CAST(br.return_price AS DECIMAL(20,2))) return_pay | |||
| from wx_bill_other_deposit br | |||
| <include refid="queryBillListConditions"/> | |||
| </select> | |||
| @@ -165,14 +165,20 @@ | |||
| <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillOther" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| '0' late_pay, | |||
| '0' return_pay | |||
| from wx_bill_other br | |||
| <include refid="queryBillListConditions"/> | |||
| </select> | |||
| @@ -161,14 +161,20 @@ | |||
| <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillPropertyDeposit" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| '0' late_pay, | |||
| sum(CAST(br.return_price AS DECIMAL(20,2))) return_pay | |||
| from wx_bill_property_deposit br | |||
| <include refid="queryBillDepositListConditions"/> | |||
| </select> | |||
| @@ -202,14 +202,20 @@ | |||
| <result column="receive_pay" jdbcType="VARCHAR" property="needPay"/> | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillProperty" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| sum(CAST(br.late_pay_price AS DECIMAL(20,2))) late_pay, | |||
| '0' return_pay | |||
| from wx_bill_property br | |||
| <include refid="queryBillPropertyListConditions"/> | |||
| </select> | |||
| @@ -178,13 +178,19 @@ | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillRentManage" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid , | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| sum(CAST(br.late_pay_price AS DECIMAL(20,2))) late_pay, | |||
| '0' return_pay | |||
| from wx_bill_rent_manage br | |||
| <include refid="queryBillManageListConditions"/> | |||
| </select> | |||
| @@ -203,13 +203,19 @@ | |||
| <result column="paid" jdbcType="VARCHAR" property="paid" /> | |||
| <result column="min_date" jdbcType="TIMESTAMP" property="minDate" /> | |||
| <result column="max_date" jdbcType="TIMESTAMP" property="maxDate" /> | |||
| <result column="service_pay" jdbcType="VARCHAR" property="servicePay"/> | |||
| <result column="late_pay" jdbcType="VARCHAR" property="latePay"/> | |||
| <result column="return_pay" jdbcType="VARCHAR" property="returnPay"/> | |||
| </resultMap> | |||
| <select id="getBillMonthSum" parameterType="com.iformall.domain.po.WxBillRent" resultMap="SumBaseResultMap"> | |||
| select | |||
| sum(CAST(br.receive_pay AS DECIMAL(20,2))) receive_pay , | |||
| sum(CAST(br.pay AS DECIMAL(20,2))) paid, | |||
| min(starttime) min_date, | |||
| max(endtime) max_date | |||
| max(endtime) max_date, | |||
| sum(CAST(br.service_charge_pay AS DECIMAL(20,2))) service_pay , | |||
| sum(CAST(br.late_pay_price AS DECIMAL(20,2))) late_pay, | |||
| '0' return_pay | |||
| from wx_bill_rent br | |||
| <include refid="queryBillRentListCondition"/> | |||
| </select> | |||