| @@ -55,6 +55,17 @@ public class WxBillAllController extends BaseController { | |||||
| return new ResultData(result); | return new ResultData(result); | ||||
| } | } | ||||
| @GetMapping("allDepositList") | |||||
| @SystemControllerLog(description = "账单总览-所有押金列表") | |||||
| public ResultData allDepositList(@ModelAttribute WxBillAll wxBillAll) { | |||||
| logger.debug("[" + getIpAddr() + "] WxBillAllController::allDepositList"); | |||||
| if (null == wxBillAll) { | |||||
| wxBillAll = new WxBillAll(); | |||||
| } | |||||
| wxBillAll.setTenantId(getTenantId()); | |||||
| return new ResultData(wxBillAllService.allDepositList(wxBillAll)); | |||||
| } | |||||
| @GetMapping("exportBill") | @GetMapping("exportBill") | ||||
| @SystemControllerLog(description = "账单总览-导出") | @SystemControllerLog(description = "账单总览-导出") | ||||
| public void exportBill(@ModelAttribute WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | public void exportBill(@ModelAttribute WxBillAll wxBillAll, HttpServletRequest request, HttpServletResponse response) { | ||||
| @@ -51,4 +51,6 @@ public interface WxBillAllMapper { | |||||
| Map<String, Object> getReceiveAndPayBillDetail(WxBillAll record); | Map<String, Object> getReceiveAndPayBillDetail(WxBillAll record); | ||||
| List<Map<String, Object>> allDepositList(WxBillAll wxBillAll); | |||||
| } | } | ||||
| @@ -17,6 +17,8 @@ import java.util.Map; | |||||
| */ | */ | ||||
| public interface WxBillAllService { | public interface WxBillAllService { | ||||
| List<Map<String, Object>> allDepositList(WxBillAll wxBillAll); | |||||
| Map<String, Object> listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize); | Map<String, Object> listAsPage(WxBillAll wxBillAll, Integer pageNum, Integer pageSize); | ||||
| List<Map<String, Object>> listBillOweAndWaitPay(WxBillAll wxBillAll); | List<Map<String, Object>> listBillOweAndWaitPay(WxBillAll wxBillAll); | ||||
| @@ -1633,4 +1633,8 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| excelService.exportExcel(list, null, name, WaitMerchantVo.class, name + ".xlsx", response, false); | excelService.exportExcel(list, null, name, WaitMerchantVo.class, name + ".xlsx", response, false); | ||||
| } | } | ||||
| @Override | |||||
| public List<Map<String, Object>> allDepositList(WxBillAll wxBillAll) { | |||||
| return wxBillAllMapper.allDepositList(wxBillAll); | |||||
| } | |||||
| } | } | ||||
| @@ -69,42 +69,42 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| return billSettle; | return billSettle; | ||||
| } | } | ||||
| public void updateFreeze(List<WxBillSettleBill> billList){ | |||||
| public void updateFreeze(List<WxBillSettleBill> billList,int status){ | |||||
| for (WxBillSettleBill bill:billList) { | for (WxBillSettleBill bill:billList) { | ||||
| if(EnumBillType.RENT.getCode().equals(bill.getBillType())) { | if(EnumBillType.RENT.getCode().equals(bill.getBillType())) { | ||||
| WxBillRent wxBillRent = new WxBillRent(); | WxBillRent wxBillRent = new WxBillRent(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillRentMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| }else if(EnumBillType.DEPOSIT.getCode().equals(bill.getBillType())) { | }else if(EnumBillType.DEPOSIT.getCode().equals(bill.getBillType())) { | ||||
| WxBillDeposit wxBillRent = new WxBillDeposit(); | WxBillDeposit wxBillRent = new WxBillDeposit(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillDepositMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillDepositMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| }else if(EnumBillType.PROPERTY.getCode().equals(bill.getBillType())) { | }else if(EnumBillType.PROPERTY.getCode().equals(bill.getBillType())) { | ||||
| WxBillProperty wxBillRent = new WxBillProperty(); | WxBillProperty wxBillRent = new WxBillProperty(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillPropertyMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | WxBillPropertyDeposit propertyDeposit = new WxBillPropertyDeposit(); | ||||
| propertyDeposit.setId(bill.getBillId()); | propertyDeposit.setId(bill.getBillId()); | ||||
| propertyDeposit.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| propertyDeposit.setStatus(status); | |||||
| wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); | wxBillPropertyDepositMapper.updateByPrimaryKeySelective(propertyDeposit); | ||||
| }else if(EnumBillType.ROUTINE.getCode().equals(bill.getBillType())) { | }else if(EnumBillType.ROUTINE.getCode().equals(bill.getBillType())) { | ||||
| WxBillOther wxBillRent = new WxBillOther(); | WxBillOther wxBillRent = new WxBillOther(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillOtherMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillOtherMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | }else if(EnumBillType.OTHER_DEPOSIT.getCode().equals(bill.getBillType())) { | ||||
| WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | WxBillOtherDeposit wxBillRent = new WxBillOtherDeposit(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillOtherDepositMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| }else{ | }else{ | ||||
| WxBillDaily wxBillRent = new WxBillDaily(); | WxBillDaily wxBillRent = new WxBillDaily(); | ||||
| wxBillRent.setId(bill.getBillId()); | wxBillRent.setId(bill.getBillId()); | ||||
| wxBillRent.setStatus(EnumBillRentStatus.FREEZE.getCode()); | |||||
| wxBillRent.setStatus(status); | |||||
| wxBillDailyMapper.updateByPrimaryKeySelective(wxBillRent); | wxBillDailyMapper.updateByPrimaryKeySelective(wxBillRent); | ||||
| } | } | ||||
| } | } | ||||
| @@ -132,8 +132,8 @@ public class WxBillSettleServiceImpl implements WxBillSettleService { | |||||
| //改为冻结状态 | //改为冻结状态 | ||||
| if (record.getFlowParams() != null && record.getFlowParams().size() > 0) { | if (record.getFlowParams() != null && record.getFlowParams().size() > 0) { | ||||
| updateFreeze(record.getReceiveBillIds()); | |||||
| updateFreeze(record.getPayBillIds()); | |||||
| updateFreeze(record.getReceiveBillIds(),EnumBillRentStatus.FREEZE.getCode()); | |||||
| updateFreeze(record.getPayBillIds(),EnumBillRentStatus.FREEZE.getCode()); | |||||
| } | } | ||||
| //启动审批流 | //启动审批流 | ||||
| @@ -86,6 +86,8 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| private WxCouponService wxCouponService; | private WxCouponService wxCouponService; | ||||
| @Autowired | @Autowired | ||||
| private WxRentContractMapper wxRentContractMapper; | private WxRentContractMapper wxRentContractMapper; | ||||
| @Autowired | |||||
| private WxBillSettleMapper wxBillSettleMapper; | |||||
| /** | /** | ||||
| * 获取流程key | * 获取流程key | ||||
| @@ -270,6 +272,16 @@ public class WxFlowServiceImpl implements WxFlowService { | |||||
| } | } | ||||
| wxCoupon.setApprovalType(operateType); | wxCoupon.setApprovalType(operateType); | ||||
| wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | wxCouponMapper.updateByPrimaryKeySelective(wxCoupon); | ||||
| }else if(EnumFlowKey.SETTLE.getCode().equals(flowType)){ | |||||
| WxBillSettle wxBillSettle = new WxBillSettle(); | |||||
| wxBillSettle.setId(businessId); | |||||
| wxBillSettle.setApplyStatus(applyStatus); | |||||
| wxBillSettleMapper.update(wxBillSettle); | |||||
| // 审批完成,账单解冻 | |||||
| if(EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { | |||||
| } | |||||
| } | } | ||||
| } | } | ||||
| @@ -746,8 +746,27 @@ | |||||
| <if test=" null == sortColumns"> order by m.id desc </if> | <if test=" null == sortColumns"> order by m.id desc </if> | ||||
| </select> | </select> | ||||
| <select id="allDepositList" parameterType="com.iformall.domain.vo.WxBillAll" resultType="hashmap"> | |||||
| select bill.* | |||||
| from ( | |||||
| select id,merchant_id,shop_id,tenant_id,'租赁押金' name,2 bill_type_value,'租赁押金' | |||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' | |||||
| endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_rent_deposit where | |||||
| tenant_id=#{tenantId} | |||||
| union all | |||||
| select id,merchant_id,shop_id,tenant_id,'物业押金' name,4 bill_type_value,'物业押金' | |||||
| bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' | |||||
| endtime,rent_shop_type,shop_info,NULL comments,'' price_detail,updatetime from wx_bill_property_deposit where | |||||
| tenant_id=#{tenantId} | |||||
| union all | |||||
| select id,merchant_id,shop_id,tenant_id,comments as name,8 bill_type_value,concat('其他押金-',comments) as | |||||
| bill_type,0 as | |||||
| need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime, | |||||
| rent_shop_type,'[]' shop_info,comments,'' price_detail,updatetime | |||||
| from wx_bill_other_deposit where tenant_id=#{tenantId} | |||||
| ) bill | |||||
| <if test=" null != status"> and bill.status = #{status} </if> | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||