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