| @@ -54,7 +54,7 @@ public class WxCouponChannelController extends BaseController { | |||||
| wxCouponChannel.setStatus(null); | wxCouponChannel.setStatus(null); | ||||
| } | } | ||||
| wxCouponChannel.setTenantId(getUser().getTenantId()); | wxCouponChannel.setTenantId(getUser().getTenantId()); | ||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.Id_DESC); | |||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); | |||||
| final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | final PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | ||||
| return new ResultData(page); | return new ResultData(page); | ||||
| } | } | ||||
| @@ -39,7 +39,7 @@ public class WxCouponChannelController extends BaseController { | |||||
| if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); | if (null == wxCouponChannel) wxCouponChannel = new WxCouponChannel(); | ||||
| wxCouponChannel.setTenantId(getTenantId()); | wxCouponChannel.setTenantId(getTenantId()); | ||||
| wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); | wxCouponChannel.setStatus(EnumCouponChannelStatus.STATUS_THROW_IN.getCode()); | ||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.CreateDate_DESC); | |||||
| wxCouponChannel.setSortColumns(WxCouponChannel.Field.UpdateDate_DESC); | |||||
| PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | PageInfo<WxCouponChannelVo> page = wxCouponChannelService.listPageCVo(wxCouponChannel, pageNum, pageSize); | ||||
| @@ -59,6 +59,12 @@ public class WxRentContract implements Serializable { | |||||
| @Transient | @Transient | ||||
| private String buildArea; | private String buildArea; | ||||
| @Transient | |||||
| private String priceStr; | |||||
| @Transient | |||||
| private String depositStr; | |||||
| public String getBuilding() { | public String getBuilding() { | ||||
| return building; | return building; | ||||
| } | } | ||||
| @@ -592,6 +598,22 @@ public class WxRentContract implements Serializable { | |||||
| this.fileNames = fileNames; | this.fileNames = fileNames; | ||||
| } | } | ||||
| public String getPriceStr() { | |||||
| return priceStr; | |||||
| } | |||||
| public void setPriceStr(String priceStr) { | |||||
| this.priceStr = priceStr; | |||||
| } | |||||
| public String getDepositStr() { | |||||
| return depositStr; | |||||
| } | |||||
| public void setDepositStr(String depositStr) { | |||||
| this.depositStr = depositStr; | |||||
| } | |||||
| public static enum Field { | public static enum Field { | ||||
| Id_ASC("`id` ASC"), Id_DESC("`id` DESC"), MerchantId_ASC("`merchant_id` ASC"), MerchantId_DESC("`merchant_id` DESC"), Price_ASC("`price` ASC"), Price_DESC("`price` DESC"), RentalStartDate_ASC("`rental_start_date` ASC"), RentalStartDate_DESC("`rental_start_date` DESC"), RentalEndDate_ASC("`rental_end_date` ASC"), RentalEndDate_DESC("`rental_end_date` DESC"), SignDate_ASC("`sign_date` ASC"), SignDate_DESC("`sign_date` DESC"), ReceivePeriod_ASC("`receive_period` ASC"), ReceivePeriod_DESC("`receive_period` DESC"), TenantId_ASC("`tenant_id` ASC"), TenantId_DESC("`tenant_id` DESC"), Filepath_ASC("`filepath` ASC"), Filepath_DESC("`filepath` DESC"), Status_ASC("`status` ASC"), Status_DESC("`status` DESC"), ContractNumber_ASC("`contract_number` ASC"), ContractNumber_DESC("`contract_number` DESC"), Deposit_ASC("`deposit` ASC"), Deposit_DESC("`deposit` DESC"), PayDate_ASC("`pay_date` ASC"), PayDate_DESC("`pay_date` DESC"), IsDel_ASC("`is_del` ASC"), IsDel_DESC("`is_del` DESC"), MerchantName_ASC("`merchant_name` ASC"), MerchantName_DESC("`merchant_name` DESC"), Brand_ASC("`brand` ASC"), Brand_DESC("`brand` DESC"), BusinessId_ASC("`business_id` ASC"), BusinessId_DESC("`business_id` DESC"), ShopType_ASC("`shop_type` ASC"), ShopType_DESC("`shop_type` DESC"), ShopId_ASC("`shop_id` ASC"), ShopId_DESC("`shop_id` DESC"), Updatetime_ASC("`updatetime` ASC"), Updatetime_DESC("`updatetime` DESC"), Createtime_ASC("`createtime` ASC"), Createtime_DESC("`createtime` DESC"); | Id_ASC("`id` ASC"), Id_DESC("`id` DESC"), MerchantId_ASC("`merchant_id` ASC"), MerchantId_DESC("`merchant_id` DESC"), Price_ASC("`price` ASC"), Price_DESC("`price` DESC"), RentalStartDate_ASC("`rental_start_date` ASC"), RentalStartDate_DESC("`rental_start_date` DESC"), RentalEndDate_ASC("`rental_end_date` ASC"), RentalEndDate_DESC("`rental_end_date` DESC"), SignDate_ASC("`sign_date` ASC"), SignDate_DESC("`sign_date` DESC"), ReceivePeriod_ASC("`receive_period` ASC"), ReceivePeriod_DESC("`receive_period` DESC"), TenantId_ASC("`tenant_id` ASC"), TenantId_DESC("`tenant_id` DESC"), Filepath_ASC("`filepath` ASC"), Filepath_DESC("`filepath` DESC"), Status_ASC("`status` ASC"), Status_DESC("`status` DESC"), ContractNumber_ASC("`contract_number` ASC"), ContractNumber_DESC("`contract_number` DESC"), Deposit_ASC("`deposit` ASC"), Deposit_DESC("`deposit` DESC"), PayDate_ASC("`pay_date` ASC"), PayDate_DESC("`pay_date` DESC"), IsDel_ASC("`is_del` ASC"), IsDel_DESC("`is_del` DESC"), MerchantName_ASC("`merchant_name` ASC"), MerchantName_DESC("`merchant_name` DESC"), Brand_ASC("`brand` ASC"), Brand_DESC("`brand` DESC"), BusinessId_ASC("`business_id` ASC"), BusinessId_DESC("`business_id` DESC"), ShopType_ASC("`shop_type` ASC"), ShopType_DESC("`shop_type` DESC"), ShopId_ASC("`shop_id` ASC"), ShopId_DESC("`shop_id` DESC"), Updatetime_ASC("`updatetime` ASC"), Updatetime_DESC("`updatetime` DESC"), Createtime_ASC("`createtime` ASC"), Createtime_DESC("`createtime` DESC"); | ||||
| private String value; | private String value; | ||||
| @@ -67,7 +67,6 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| wxCouponChannelMapper.insertSelective(record); | wxCouponChannelMapper.insertSelective(record); | ||||
| } else { | } else { | ||||
| if (record.getCouponId() != null && record.getStatus() != null) { | if (record.getCouponId() != null && record.getStatus() != null) { | ||||
| WxCouponChannel orignal = getById(record.getId()); | WxCouponChannel orignal = getById(record.getId()); | ||||
| if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()) | if (orignal.getStatus().equals(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode()) | ||||
| @@ -100,6 +99,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService { | |||||
| wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | wxOrderService.updateOrderGroupStatusByCouponChannelId(record.getId(), record.getTenantId(), EnumOrderStatus.ORDER_STATUS_COOPERATING_CANCEL.getCode()); | ||||
| } | } | ||||
| } | } | ||||
| record.setUpdateDate(new Date()); | |||||
| wxCouponChannelMapper.updateByPrimaryKeySelective(record); | wxCouponChannelMapper.updateByPrimaryKeySelective(record); | ||||
| } | } | ||||
| return new ResultData(); | return new ResultData(); | ||||
| @@ -285,13 +285,16 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); | wxBillRent.setIsPreview(EnumIsPreview.YES.getCode()); | ||||
| List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); | List<WxBillRent> resultList = wxBillRentMapper.findList(wxBillRent); | ||||
| ResultData resultData = null; | |||||
| // 更新 | |||||
| ResultData resultData = getResultDataForUpdate(record, userId); | |||||
| if (dbRent.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) { | if (dbRent.getRentShopType().equals(EnumRentShopType.SHOP.getCode())) { | ||||
| // 更新 | |||||
| resultData = getResultDataForUpdate(record, userId); | |||||
| //删除预账单,重新生成 | |||||
| wxBillRentMapper.deletePreviewBill(record); | |||||
| resultList = buildRent(new WxMerchant(), null, record, EnumIsPreview.YES.getCode()); | |||||
| if (record.getReceivePeriod() != null && record.getLease() != null && record.getPrice() != null) { | |||||
| //删除预账单,重新生成 | |||||
| wxBillRentMapper.deletePreviewBill(record); | |||||
| resultList = buildRent(new WxMerchant(), null, record, EnumIsPreview.YES.getCode()); | |||||
| } | |||||
| }else{ | }else{ | ||||
| boolean change = false; | boolean change = false; | ||||
| if (CollectionUtils.isEmpty(resultList)) { | if (CollectionUtils.isEmpty(resultList)) { | ||||
| @@ -330,8 +333,6 @@ public class WxRentContractServiceImpl implements WxRentContractService { | |||||
| } | } | ||||
| } | } | ||||
| } | } | ||||
| // 更新 | |||||
| resultData = getResultDataForUpdate(record, userId); | |||||
| //有改变,删除预账单,重新生成 | //有改变,删除预账单,重新生成 | ||||
| if (change) { | if (change) { | ||||
| wxBillRentMapper.deletePreviewBill(record); | wxBillRentMapper.deletePreviewBill(record); | ||||