| @@ -225,9 +225,7 @@ public class WxAllBillController extends BillBaseController { | |||||
| public ResultData billTypes() { | public ResultData billTypes() { | ||||
| Map<Integer,String> tmap = new HashMap<Integer,String>(); | Map<Integer,String> tmap = new HashMap<Integer,String>(); | ||||
| for (EnumBillAllType t : EnumBillAllType.values()) { | for (EnumBillAllType t : EnumBillAllType.values()) { | ||||
| if (t.isShow()) { | |||||
| tmap.put(t.getCode(), t.getMessage()); | |||||
| } | |||||
| tmap.put(t.getCode(), t.getMessage()); | |||||
| } | } | ||||
| return new ResultData(tmap); | return new ResultData(tmap); | ||||
| } | } | ||||
| @@ -612,6 +610,44 @@ public class WxAllBillController extends BillBaseController { | |||||
| return new ResultData(list); | return new ResultData(list); | ||||
| } | } | ||||
| //待支付给商户的账单 | |||||
| @GetMapping("toPaymerchantBills") | |||||
| public ResultData toPaymerchantBills(@ModelAttribute WxMerchant wxMerchant) { | |||||
| if (null == wxMerchant.getId()) { | |||||
| return new ResultData(Result.ERROR,"请选择商户"); | |||||
| } | |||||
| wxMerchant.updateTenantInfo(getTenantInfo()); | |||||
| wxMerchant.setNeedPayPreDays(getNearBillBeforeDays()); | |||||
| List<WxAllBill> list = billAllHelper.getMerchantBillList(wxMerchant); | |||||
| if (null != list && list.size() > 0 ) { | |||||
| List<Long> merchnatIds = new ArrayList<Long>(); | |||||
| merchnatIds.add(wxMerchant.getId()); | |||||
| Map<Long, String> msMap = wxShopSerivce.getMerchantShopNumberMap(wxMerchant, merchnatIds, EnumYesOrNo.NO.getCode()); | |||||
| String shopNumber = ""; | |||||
| if (null != msMap) { | |||||
| shopNumber = msMap.get(wxMerchant.getId()); | |||||
| } | |||||
| WxMerchant m = wxMerchantService.selectById(wxMerchant.getId()); | |||||
| WxEnergyFees fq = new WxEnergyFees(); | |||||
| fq.updateTenantInfo(m); | |||||
| Map<Long, WxEnergyFees> feesMap = wxEnergyService.getFeesMap(fq); | |||||
| for (int i = 0 ; i < list.size(); i++) { | |||||
| WxAllBill be = list.get(i); | |||||
| if (StringUtils.isBlank(be.getShopNumber())) { | |||||
| be.setShopNumber(shopNumber); | |||||
| } | |||||
| if (null != feesMap) { | |||||
| WxEnergyFees fees = feesMap.get(be.getEnergyFeesId()); | |||||
| if (null != fees) { | |||||
| be.setEnergyFeesName(fees.getName()); | |||||
| } | |||||
| } | |||||
| be.setMerchantName(m.getName()); | |||||
| } | |||||
| } | |||||
| return new ResultData(list); | |||||
| } | |||||
| @ApiOperation("分页列表接口") | @ApiOperation("分页列表接口") | ||||
| @GetMapping("list") | @GetMapping("list") | ||||
| @ApiImplicitParams({ | @ApiImplicitParams({ | ||||
| @@ -672,3 +672,107 @@ alter table wx_finance_receive_payway_97 add column pay varchar(30) comment | |||||
| alter table wx_finance_receive_payway_98 add column pay varchar(30) comment '支付给商户金额'; | alter table wx_finance_receive_payway_98 add column pay varchar(30) comment '支付给商户金额'; | ||||
| alter table wx_finance_receive_payway_99 add column pay varchar(30) comment '支付给商户金额'; | alter table wx_finance_receive_payway_99 add column pay varchar(30) comment '支付给商户金额'; | ||||
| alter table wx_finance_receive_0 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_1 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_2 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_3 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_4 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_5 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_6 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_7 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_8 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_9 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_10 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_11 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_12 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_13 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_14 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_15 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_16 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_17 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_18 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_19 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_20 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_21 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_22 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_23 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_24 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_25 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_26 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_27 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_28 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_29 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_30 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_31 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_32 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_33 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_34 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_35 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_36 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_37 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_38 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_39 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_40 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_41 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_42 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_43 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_44 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_45 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_46 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_47 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_48 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_49 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_50 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_51 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_52 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_53 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_54 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_55 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_56 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_57 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_58 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_59 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_60 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_61 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_62 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_63 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_64 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_65 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_66 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_67 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_68 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_69 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_70 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_71 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_72 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_73 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_74 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_75 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_76 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_77 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_78 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_79 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_80 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_81 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_82 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_83 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_84 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_85 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_86 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_87 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_88 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_89 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_90 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_91 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_92 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_93 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_94 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_95 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_96 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_97 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_98 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| alter table wx_finance_receive_99 add column rent_shop_type int(1) not null comment '店铺多经'; comment '支付给商户金额'; | |||||
| @@ -132,6 +132,9 @@ public class WxFinanceReceive extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private List<Long> merchantIdList; | private List<Long> merchantIdList; | ||||
| @io.swagger.annotations.ApiModelProperty(value = "店铺/多径EnumRentShopType", name = "rentShopType") | |||||
| private Integer rentShopType; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "remark", name = "remark") | @io.swagger.annotations.ApiModelProperty(value = "remark", name = "remark") | ||||
| private String remark; | private String remark; | ||||
| @@ -5,16 +5,16 @@ import java.util.List; | |||||
| public enum EnumBillAllType { | public enum EnumBillAllType { | ||||
| RENT(1,"租金",1L,false,true), | |||||
| RENT_BUSSINESS_MANAGE(11,"商业管理费",2L,false,true), | |||||
| RENT_OPERATION_MANAGE(12,"运营管理费",3L,false,true), | |||||
| RENT_DEPOSIT(13,"租赁押金",null,true,true), | |||||
| PROPERTY(2,"物业",5L,false,true), | |||||
| PROPERTY_DEPOSIT(21,"物业押金",6L,true,true), | |||||
| DAILY(3, "能耗(水电空调)费",null,false,true), | |||||
| OTHER(4, "其他费用",null,false,true), | |||||
| OTHER_DEPOSIT(5, "其他押金",null,true,true), | |||||
| ADVANCE(6,"预收",null,true,false)//没有形成真正的账单 | |||||
| RENT(1,"租金",1L,false), | |||||
| RENT_BUSSINESS_MANAGE(11,"商业管理费",2L,false), | |||||
| RENT_OPERATION_MANAGE(12,"运营管理费",3L,false), | |||||
| RENT_DEPOSIT(13,"租赁押金",null,true), | |||||
| PROPERTY(2,"物业",5L,false), | |||||
| PROPERTY_DEPOSIT(21,"物业押金",6L,true), | |||||
| DAILY(3, "能耗(水电空调)费",null,false), | |||||
| OTHER(4, "其他费用",null,false), | |||||
| OTHER_DEPOSIT(5, "其他押金",null,true), | |||||
| ADVANCE(6,"预收",null,true)//没有形成真正的账单 | |||||
| ; | ; | ||||
| public static EnumBillAllType getEnum(Integer code) { | public static EnumBillAllType getEnum(Integer code) { | ||||
| @@ -30,14 +30,12 @@ public enum EnumBillAllType { | |||||
| private String message; | private String message; | ||||
| private Long energyFeesId;//wx_energy_fees(费用科目)里的id,不可配置的有这个 | private Long energyFeesId;//wx_energy_fees(费用科目)里的id,不可配置的有这个 | ||||
| private boolean isFixedPrice;//是否强制为一次性费用 | private boolean isFixedPrice;//是否强制为一次性费用 | ||||
| private boolean isShow;//是否显示为查询条件 | |||||
| EnumBillAllType(Integer code, String message,Long energyFeesId,boolean isFixedPrice,boolean isShow) { | |||||
| EnumBillAllType(Integer code, String message,Long energyFeesId,boolean isFixedPrice) { | |||||
| this.code = code; | this.code = code; | ||||
| this.message = message; | this.message = message; | ||||
| this.energyFeesId = energyFeesId; | this.energyFeesId = energyFeesId; | ||||
| this.isFixedPrice = isFixedPrice; | this.isFixedPrice = isFixedPrice; | ||||
| this.isShow = isShow; | |||||
| } | } | ||||
| public Integer getCode() { | public Integer getCode() { | ||||
| @@ -56,10 +54,6 @@ public enum EnumBillAllType { | |||||
| return isFixedPrice; | return isFixedPrice; | ||||
| } | } | ||||
| public boolean isShow() { | |||||
| return isShow; | |||||
| } | |||||
| public static EnumBillAllType[] getSystemTypes() { | public static EnumBillAllType[] getSystemTypes() { | ||||
| EnumBillAllType[] ret = new EnumBillAllType[] {RENT,RENT_BUSSINESS_MANAGE,RENT_OPERATION_MANAGE, | EnumBillAllType[] ret = new EnumBillAllType[] {RENT,RENT_BUSSINESS_MANAGE,RENT_OPERATION_MANAGE, | ||||
| PROPERTY,PROPERTY_DEPOSIT}; | PROPERTY,PROPERTY_DEPOSIT}; | ||||
| @@ -63,33 +63,6 @@ public class WxBillAllHelper { | |||||
| @Autowired | @Autowired | ||||
| private WxAllBillService wxAllBillService; | private WxAllBillService wxAllBillService; | ||||
| // @Autowired | |||||
| // private WxBillRentService wxBillRentService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillRentManageService wxBillRentManageService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillDepositService wxBillRentDepositService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillPropertyService wxBillPropertyService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillPropertyDepositService wxBillPropertyDepositService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillDailyService wxBillDailyService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillOtherService wxBillOtherService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillOtherDepositService wxBillOtherDepositService; | |||||
| // | |||||
| // @Autowired | |||||
| // private WxBillAdvanceService wxBillAdvanceService; | |||||
| @Autowired | @Autowired | ||||
| private WxShopService wxShopService; | private WxShopService wxShopService; | ||||
| @@ -505,4 +478,8 @@ public class WxBillAllHelper { | |||||
| wxAllBillService.stopMerchantBills(wxMerchant, user); | wxAllBillService.stopMerchantBills(wxMerchant, user); | ||||
| } | } | ||||
| public void saveOrUpdateBill(WxAllBill bill,MallUserInfo user) { | |||||
| wxAllBillService.saveOrUpdate(bill, user); | |||||
| } | |||||
| } | } | ||||
| @@ -552,15 +552,8 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| @Override | @Override | ||||
| public ResultData saveOrUpdate(WxAllBill record, MallUserInfo user) { | public ResultData saveOrUpdate(WxAllBill record, MallUserInfo user) { | ||||
| //String receivepay = StringUtils.isBlank(record.getRealReceivePay()) ? "0" : record.getRealReceivePay(); | |||||
| String receivepay = StringUtils.isBlank(record.getReceivePay()) ? "0" : record.getReceivePay(); | |||||
| String pay = StringUtils.isBlank(record.getPay()) ? "0" : record.getPay(); | |||||
| if(new BigDecimal(pay).compareTo(new BigDecimal(receivepay)) > 0 ){ | |||||
| return new ResultData(ErrorCode.BILL_PAY_ERROR.getCode(), "实收金额不能大于实际应收总金额"); | |||||
| } | |||||
| Date date = new Date(); | Date date = new Date(); | ||||
| if (record.getId() == null) { | if (record.getId() == null) { | ||||
| logger.info("新增租赁账单"); | |||||
| final IdWorker idWorker = IdWorker.get(); | final IdWorker idWorker = IdWorker.get(); | ||||
| record.setId(idWorker.nextId()); | record.setId(idWorker.nextId()); | ||||
| record.setCreatetime(date); | record.setCreatetime(date); | ||||
| @@ -570,17 +563,19 @@ public class WxAllBillServiceImpl extends WxBillBaseService implements WxAllBill | |||||
| record.setCreateBy(user.getId()); | record.setCreateBy(user.getId()); | ||||
| record.setCreateByName(user.getName()); | record.setCreateByName(user.getName()); | ||||
| record.updateTenantInfo(user); | record.updateTenantInfo(user); | ||||
| //record.setOwe(new BigDecimal(receivepay).subtract(new BigDecimal(pay)).toPlainString()); | |||||
| //record.setIsDel(EnumDelStatus.NOT_DEL.getCode()); | |||||
| try { | try { | ||||
| wxAllBillMapper.insert(record); | wxAllBillMapper.insert(record); | ||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| logger.error("保存租赁账单失败,e:" + e.getMessage()); | logger.error("保存租赁账单失败,e:" + e.getMessage()); | ||||
| throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); | ||||
| } | } | ||||
| return new ResultData(Result.SUCCESS, "保存租赁账单成功"); | |||||
| return new ResultData(Result.SUCCESS, "保存账单成功"); | |||||
| } else { | } else { | ||||
| return new ResultData(); | |||||
| record.setUpdatetime(date); | |||||
| record.setUpdateBy(user.getId()); | |||||
| record.setUpdateByName(user.getName()); | |||||
| wxAllBillMapper.updateById(record); | |||||
| return new ResultData(Result.SUCCESS, "保存账单成功"); | |||||
| } | } | ||||
| } | } | ||||
| @@ -650,6 +650,8 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| addreceive.setReceiveMoney(receiveMoney); | addreceive.setReceiveMoney(receiveMoney); | ||||
| addreceive.setPayMoney(payMoney); | addreceive.setPayMoney(payMoney); | ||||
| addreceive.setMerchantId(merchantId); | addreceive.setMerchantId(merchantId); | ||||
| WxMerchant merchant = wxMerchantService.getById(merchantId); | |||||
| addreceive.setRentShopType(merchant.getType()); | |||||
| addreceive.setCreateTime(new Date()); | addreceive.setCreateTime(new Date()); | ||||
| addreceive.setCreateBy(user.getId()); | addreceive.setCreateBy(user.getId()); | ||||
| addreceive.setCreateByName(user.getName()); | addreceive.setCreateByName(user.getName()); | ||||
| @@ -818,6 +820,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| return wxFinanceReceiveMapper.selectById(id, tenantEntity.getTenantId()); | return wxFinanceReceiveMapper.selectById(id, tenantEntity.getTenantId()); | ||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | |||||
| @Override | @Override | ||||
| public void createAdvance(WxFinanceReceive record,MallUserInfo user) { | public void createAdvance(WxFinanceReceive record,MallUserInfo user) { | ||||
| //创建预收主单 | //创建预收主单 | ||||
| @@ -827,6 +830,16 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| record.getMerchantId(), record.getFeesId(), record.getRemark()); | record.getMerchantId(), record.getFeesId(), record.getRemark()); | ||||
| wxFinanceReceiveMapper.insert(addreceive); | wxFinanceReceiveMapper.insert(addreceive); | ||||
| //创建预收账单? WxBillAdvance | //创建预收账单? WxBillAdvance | ||||
| //WxAllBill advance = generateBillByReceive(record); | |||||
| //wxBillAllHelper.saveOrUpdateBill(advance, user); | |||||
| } | |||||
| public WxAllBill generateBillByReceive(WxFinanceReceive record) { | |||||
| WxAllBill advanceBill = new WxAllBill(); | |||||
| advanceBill.updateTenantInfo(record); | |||||
| advanceBill.setMerchantId(record.getMerchantId()); | |||||
| //advanceBill.setRentShopType(); | |||||
| return null; | |||||
| } | } | ||||
| @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | @Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = {Exception.class}) | ||||
| @@ -20,6 +20,7 @@ | |||||
| <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | <result column="update_by" jdbcType="BIGINT" property="updateBy"/> | ||||
| <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | <result column="update_by_name" jdbcType="VARCHAR" property="updateByName"/> | ||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | ||||
| <result column="rent_shop_type" jdbcType="INTEGER" property="rentShopType"/> | |||||
| <result column="remark" jdbcType="VARCHAR" property="remark"/> | <result column="remark" jdbcType="VARCHAR" property="remark"/> | ||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | ||||
| <result column="is_print" jdbcType="INTEGER" property="isPrint"/> | <result column="is_print" jdbcType="INTEGER" property="isPrint"/> | ||||
| @@ -27,7 +28,8 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`receive_money`,`pay_money`,`set_off_money`,`use_money`,`status`,`type`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`receive_money`,`pay_money`,`set_off_money`,`use_money`,`status`,`type`, | ||||
| `receive_type`,`money_detail`,`create_by`,`create_by_name`,`update_by`,`update_by_name`,`merchant_id`,`remark`,`fees_id`,`is_print` | |||||
| `receive_type`,`money_detail`,`create_by`,`create_by_name`,`update_by`,`update_by_name`,`merchant_id`,`rent_shop_type`,`remark`, | |||||
| `fees_id`,`is_print` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -43,9 +45,11 @@ | |||||
| <if test=" null != type ">and `type` = #{type}</if> | <if test=" null != type ">and `type` = #{type}</if> | ||||
| <if test=" null != receiveType ">and `receive_type` = #{receiveType}</if> | <if test=" null != receiveType ">and `receive_type` = #{receiveType}</if> | ||||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | ||||
| <if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if> | |||||
| <if test=" null != createTimeBegin ">and `create_time` >= #{createTimeBegin}</if> | <if test=" null != createTimeBegin ">and `create_time` >= #{createTimeBegin}</if> | ||||
| <if test=" null != createTimeEnd ">and `create_time` <= #{createTimeEnd}</if> | <if test=" null != createTimeEnd ">and `create_time` <= #{createTimeEnd}</if> | ||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | ||||
| <if test=" null != rentShopType ">and `rent_shop_type` = #{rentShopType}</if> | |||||
| <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | <if test=" null != isPrint ">and `is_print` = #{isPrint}</if> | ||||
| <if test=" null != finishStatus ">and `status` in (1,4)</if> | <if test=" null != finishStatus ">and `status` in (1,4)</if> | ||||
| <if test=" null != merchantIdList "> | <if test=" null != merchantIdList "> | ||||