| @@ -922,3 +922,308 @@ alter table wx_finance_receive_97 add column bill_shop_number varchar(300) | |||||
| alter table wx_finance_receive_98 add column bill_shop_number varchar(300) comment '店铺编号' ; | alter table wx_finance_receive_98 add column bill_shop_number varchar(300) comment '店铺编号' ; | ||||
| alter table wx_finance_receive_99 add column bill_shop_number varchar(300) comment '店铺编号' ; | alter table wx_finance_receive_99 add column bill_shop_number varchar(300) comment '店铺编号' ; | ||||
| alter table wx_finance_receive_bill_0 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_1 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_2 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_3 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_4 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_5 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_6 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_7 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_8 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_9 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_10 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_11 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_12 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_13 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_14 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_15 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_16 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_17 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_18 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_19 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_20 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_21 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_22 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_23 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_24 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_25 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_26 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_27 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_28 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_29 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_30 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_31 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_32 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_33 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_34 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_35 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_36 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_37 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_38 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_39 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_40 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_41 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_42 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_43 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_44 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_45 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_46 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_47 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_48 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_49 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_50 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_51 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_52 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_53 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_54 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_55 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_56 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_57 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_58 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_59 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_60 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_61 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_62 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_63 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_64 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_65 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_66 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_67 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_68 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_69 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_70 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_71 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_72 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_73 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_74 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_75 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_76 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_77 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_78 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_79 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_80 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_81 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_82 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_83 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_84 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_85 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_86 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_87 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_88 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_89 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_90 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_91 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_92 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_93 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_94 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_95 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_96 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_97 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_98 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_bill_99 add column bill_cus_name varchar(30) comment '账单客户名称' ; | |||||
| alter table wx_finance_receive_setoff_0 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_1 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_2 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_3 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_4 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_5 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_6 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_7 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_8 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_9 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_10 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_11 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_12 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_13 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_14 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_15 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_16 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_17 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_18 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_19 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_20 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_21 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_22 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_23 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_24 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_25 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_26 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_27 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_28 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_29 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_30 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_31 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_32 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_33 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_34 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_35 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_36 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_37 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_38 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_39 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_40 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_41 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_42 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_43 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_44 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_45 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_46 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_47 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_48 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_49 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_50 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_51 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_52 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_53 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_54 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_55 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_56 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_57 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_58 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_59 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_60 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_61 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_62 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_63 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_64 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_65 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_66 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_67 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_68 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_69 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_70 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_71 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_72 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_73 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_74 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_75 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_76 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_77 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_78 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_79 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_80 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_81 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_82 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_83 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_84 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_85 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_86 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_87 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_88 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_89 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_90 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_91 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_92 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_93 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_94 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_95 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_96 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_97 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_98 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_99 add column shop_id bigint(20) not null comment '铺位号' ; | |||||
| alter table wx_finance_receive_setoff_0 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_1 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_2 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_3 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_4 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_5 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_6 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_7 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_8 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_9 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_10 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_11 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_12 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_13 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_14 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_15 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_16 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_17 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_18 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_19 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_20 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_21 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_22 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_23 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_24 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_25 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_26 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_27 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_28 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_29 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_30 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_31 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_32 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_33 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_34 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_35 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_36 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_37 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_38 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_39 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_40 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_41 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_42 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_43 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_44 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_45 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_46 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_47 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_48 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_49 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_50 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_51 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_52 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_53 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_54 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_55 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_56 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_57 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_58 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_59 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_60 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_61 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_62 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_63 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_64 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_65 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_66 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_67 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_68 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_69 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_70 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_71 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_72 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_73 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_74 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_75 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_76 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_77 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_78 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_79 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_80 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_81 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_82 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_83 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_84 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_85 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_86 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_87 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_88 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_89 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_90 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_91 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_92 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_93 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_94 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_95 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_96 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_97 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_98 drop column merchant_id ; | |||||
| alter table wx_finance_receive_setoff_99 drop column merchant_id ; | |||||
| @@ -60,14 +60,15 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| return null; | return null; | ||||
| } | } | ||||
| @io.swagger.annotations.ApiModelProperty(value = "账单客户名称", name = "billCusName") | |||||
| private String billCusName; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "铺位编号", name = "shopId") | @io.swagger.annotations.ApiModelProperty(value = "铺位编号", name = "shopId") | ||||
| private Long shopId; | private Long shopId; | ||||
| @Excel(name = "店铺号", width = 20, orderNum = "4") | @Excel(name = "店铺号", width = 20, orderNum = "4") | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String shopNumber; | private String shopNumber; | ||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | ||||
| private Long feesId; | private Long feesId; | ||||
| @Excel(name = "账单科目", width = 20, orderNum = "10") | @Excel(name = "账单科目", width = 20, orderNum = "10") | ||||
| @@ -147,5 +148,6 @@ public class WxFinanceReceiveBill extends TenantEntity { | |||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private Integer noReduce; | private Integer noReduce; | ||||
| @TableField(exist = false) | @TableField(exist = false) | ||||
| private String rentName; | |||||
| private List<Long> shopIdList; | |||||
| } | } | ||||
| @@ -60,7 +60,7 @@ public class WxFinanceReceiveSetoff extends TenantEntity { | |||||
| private Date endtime; | private Date endtime; | ||||
| @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | @io.swagger.annotations.ApiModelProperty(value="科目编号",name="feesId") | ||||
| private Long merchantId; | |||||
| private Long shopId; | |||||
| @io.swagger.annotations.ApiModelProperty(value = "是否已删除", name = "isDel") | @io.swagger.annotations.ApiModelProperty(value = "是否已删除", name = "isDel") | ||||
| private Integer isDel; | private Integer isDel; | ||||
| @@ -135,6 +135,11 @@ public class WxFinanceReceiveVo implements Serializable { | |||||
| @io.swagger.annotations.ApiModelProperty(value = "支付给商户金额", name = "payMoney") | @io.swagger.annotations.ApiModelProperty(value = "支付给商户金额", name = "payMoney") | ||||
| private String payMoney; | private String payMoney; | ||||
| @TableField(exist = false) | |||||
| private String billCusName; | |||||
| @TableField(exist = false) | |||||
| private String billShopNumber; | |||||
| public void initByReceive(WxFinanceReceive receive,WxFinanceReceiveBill receiveBill) { | public void initByReceive(WxFinanceReceive receive,WxFinanceReceiveBill receiveBill) { | ||||
| this.id = receive.getId(); | this.id = receive.getId(); | ||||
| @@ -153,7 +158,8 @@ public class WxFinanceReceiveVo implements Serializable { | |||||
| this.isFinish = receive.getIsFinish(); | this.isFinish = receive.getIsFinish(); | ||||
| this.payMoney = receive.getPayMoney(); | this.payMoney = receive.getPayMoney(); | ||||
| this.receiveDate = receive.getReceiveDate(); | this.receiveDate = receive.getReceiveDate(); | ||||
| this.rentName = receive.getRentName(); | |||||
| this.billCusName = receive.getBillCusName(); | |||||
| this.billShopNumber = receive.getBillShopNumber(); | |||||
| if (null != receiveBill) { | if (null != receiveBill) { | ||||
| this.rid = receiveBill.getId(); | this.rid = receiveBill.getId(); | ||||
| this.receiveId = receiveBill.getReceiveId(); | this.receiveId = receiveBill.getReceiveId(); | ||||
| @@ -167,6 +173,5 @@ public class WxFinanceReceiveVo implements Serializable { | |||||
| } | } | ||||
| } | } | ||||
| @TableField(exist = false) | |||||
| private String rentName; | |||||
| } | } | ||||
| @@ -30,6 +30,7 @@ import com.iformall.domain.po.WxFinanceReceiveSetoff; | |||||
| import com.iformall.domain.po.WxMallFloor; | import com.iformall.domain.po.WxMallFloor; | ||||
| import com.iformall.domain.po.WxMerchant; | import com.iformall.domain.po.WxMerchant; | ||||
| import com.iformall.domain.po.WxShop; | import com.iformall.domain.po.WxShop; | ||||
| import com.iformall.domain.po.WxShopUsers; | |||||
| import com.iformall.domain.po.WxShopUsersInfo; | import com.iformall.domain.po.WxShopUsersInfo; | ||||
| import com.iformall.domain.po.base.BaseEntity.SortField; | import com.iformall.domain.po.base.BaseEntity.SortField; | ||||
| import com.iformall.domain.po.base.TenantEntity; | import com.iformall.domain.po.base.TenantEntity; | ||||
| @@ -425,21 +426,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| pageVo.setPages(page.getPages()); | pageVo.setPages(page.getPages()); | ||||
| pageVo.setTotal(page.getTotal()); | pageVo.setTotal(page.getTotal()); | ||||
| if (null != page && null != page.getList()) { | if (null != page && null != page.getList()) { | ||||
| List<Long> merchantIdList = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | |||||
| WxFinanceReceive fr = page.getList().get(i); | |||||
| if (null != fr.getMerchantId()) { | |||||
| merchantIdList.add(fr.getMerchantId()); | |||||
| } | |||||
| } | |||||
| WxShop sq = new WxShop(); | |||||
| sq.updateTenantInfo(record); | |||||
| Map<Long, WxShop> shopMap = wxShopService.findShopMap(sq); | |||||
| WxMerchant mq = new WxMerchant(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(merchantIdList); | |||||
| Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(mq); | |||||
| Map<Long,String> shopNumberMap = wxShopService.getMerchantShopNumberMap(record, merchantIdList, null); | |||||
| WxBillPayWay pq = new WxBillPayWay(); | WxBillPayWay pq = new WxBillPayWay(); | ||||
| pq.updateTenantInfo(record); | pq.updateTenantInfo(record); | ||||
| Map<Long, WxBillPayWay> paywayMap = this.getPayWayMap(pq); | Map<Long, WxBillPayWay> paywayMap = this.getPayWayMap(pq); | ||||
| @@ -450,14 +441,6 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| List<WxFinanceReceiveVo> volist = new ArrayList<WxFinanceReceiveVo>(); | List<WxFinanceReceiveVo> volist = new ArrayList<WxFinanceReceiveVo>(); | ||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | for (int i = 0 ; i < page.getList().size() ; i++) { | ||||
| WxFinanceReceive fr = page.getList().get(i); | WxFinanceReceive fr = page.getList().get(i); | ||||
| if (null != merchantMap && null != fr.getMerchantId()) { | |||||
| WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | |||||
| if (null != merchant) { | |||||
| fr.setMerchantName(merchant.getName()); | |||||
| fr.setRentName(wxShopService.getRentName(merchant)); | |||||
| } | |||||
| } | |||||
| if (!hasBills) { | if (!hasBills) { | ||||
| WxFinanceReceiveVo vo = new WxFinanceReceiveVo(); | WxFinanceReceiveVo vo = new WxFinanceReceiveVo(); | ||||
| vo.initByReceive(fr, null); | vo.initByReceive(fr, null); | ||||
| @@ -479,14 +462,10 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| vo.setPayWayName(p.getName()); | vo.setPayWayName(p.getName()); | ||||
| } | } | ||||
| } | } | ||||
| if (null != shopNumberMap && null != frb.getMerchantId()) { | |||||
| String shopNumber = shopNumberMap.get(vo.getMerchantId()); | |||||
| vo.setShopNumber(shopNumber); | |||||
| if (null != merchantMap) { | |||||
| WxMerchant merchant = merchantMap.get(vo.getMerchantId()); | |||||
| if (null != merchant) { | |||||
| vo.setMerchantName(merchant.getName()); | |||||
| } | |||||
| if (null != shopMap) { | |||||
| WxShop shop = shopMap.get(frb.getShopId()); | |||||
| if (null != shop) { | |||||
| vo.setShopNumber(shop.getShopNumber()); | |||||
| } | } | ||||
| } | } | ||||
| if (null != fmap && null != vo.getFeesId()) { | if (null != fmap && null != vo.getFeesId()) { | ||||
| @@ -525,21 +504,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| initReceiveBillQueryParam(record); | initReceiveBillQueryParam(record); | ||||
| PageInfo<WxFinanceReceiveBill> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceReceiveBillMapper.findList(record)); | PageInfo<WxFinanceReceiveBill> page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxFinanceReceiveBillMapper.findList(record)); | ||||
| if (null != page && null != page.getList()) { | if (null != page && null != page.getList()) { | ||||
| List<Long> merchantIdList = new ArrayList<Long>(); | |||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | |||||
| WxFinanceReceiveBill fr = page.getList().get(i); | |||||
| if (null != fr.getMerchantId()) { | |||||
| merchantIdList.add(fr.getMerchantId()); | |||||
| } | |||||
| } | |||||
| WxShop sq = new WxShop(); | |||||
| sq.updateTenantInfo(record); | |||||
| Map<Long, WxShop> shopMap = wxShopService.findShopMap(sq); | |||||
| WxMerchant mq = new WxMerchant(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setIds(merchantIdList); | |||||
| Map<Long, WxMerchant> merchantMap = wxMerchantService.findMerchantMap(mq); | |||||
| Map<Long,String> shopNumberMap = wxShopService.getMerchantShopNumberMap(record, merchantIdList, null); | |||||
| WxBillPayWay pq = new WxBillPayWay(); | WxBillPayWay pq = new WxBillPayWay(); | ||||
| pq.updateTenantInfo(record); | pq.updateTenantInfo(record); | ||||
| Map<Long, WxBillPayWay> paywayMap = this.getPayWayMap(pq); | Map<Long, WxBillPayWay> paywayMap = this.getPayWayMap(pq); | ||||
| @@ -549,15 +518,12 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| Map<Long, WxEnergyFees> fmap = wxEnergyService.getFeesMap(fq); | Map<Long, WxEnergyFees> fmap = wxEnergyService.getFeesMap(fq); | ||||
| for (int i = 0 ; i < page.getList().size() ; i++) { | for (int i = 0 ; i < page.getList().size() ; i++) { | ||||
| WxFinanceReceiveBill fr = page.getList().get(i); | WxFinanceReceiveBill fr = page.getList().get(i); | ||||
| if (null != merchantMap && null != fr.getMerchantId()) { | |||||
| WxMerchant merchant = merchantMap.get(fr.getMerchantId()); | |||||
| if (null != merchant) { | |||||
| fr.setMerchantName(merchant.getName()); | |||||
| fr.setRentName(wxShopService.getRentName(merchant)); | |||||
| } | |||||
| String shopNumber = shopNumberMap.get(fr.getMerchantId()); | |||||
| fr.setShopNumber(shopNumber); | |||||
| } | |||||
| if (null != shopMap) { | |||||
| WxShop shop = shopMap.get(fr.getShopId()); | |||||
| if (null != shop) { | |||||
| fr.setShopNumber(shop.getShopNumber()); | |||||
| } | |||||
| } | |||||
| if (null != paywayMap && null != fr.getPayWay()) { | if (null != paywayMap && null != fr.getPayWay()) { | ||||
| WxBillPayWay p = paywayMap.get(fr.getPayWay()); | WxBillPayWay p = paywayMap.get(fr.getPayWay()); | ||||
| if (null != p) { | if (null != p) { | ||||
| @@ -582,9 +548,9 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| } | } | ||||
| private void initReceiveBillQueryParam(WxFinanceReceiveBill record) { | private void initReceiveBillQueryParam(WxFinanceReceiveBill record) { | ||||
| if (StringUtils.isNotBlank(record.getMerchantName()) || StringUtils.isNotBlank(record.getShopNumber())) { | |||||
| record.setMerchantName(StringContentUtils.unescapeHtml(record.getMerchantName())); | |||||
| record.setShopNumber(StringContentUtils.unescapeHtml(record.getMerchantName())); | |||||
| if (StringUtils.isNotBlank(record.getBillCusName()) || StringUtils.isNotBlank(record.getShopNumber())) { | |||||
| record.setBillCusName(StringContentUtils.unescapeHtml(record.getBillCusName())); | |||||
| record.setShopNumber(StringContentUtils.unescapeHtml(record.getShopNumber())); | |||||
| } | } | ||||
| if (StringUtils.isNotBlank(record.getPayWayStr())) { | if (StringUtils.isNotBlank(record.getPayWayStr())) { | ||||
| @@ -607,7 +573,6 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| record.setFeesIdList(feesIdList); | record.setFeesIdList(feesIdList); | ||||
| } | } | ||||
| } | } | ||||
| List<Long> queryMerchantIds = new ArrayList<Long>(); | |||||
| if (StringUtils.isNotBlank(record.getShopNumber()) | if (StringUtils.isNotBlank(record.getShopNumber()) | ||||
| || null != record.getBuilding() || null != record.getFloor()) { | || null != record.getBuilding() || null != record.getFloor()) { | ||||
| //根据店铺去找到商户 | //根据店铺去找到商户 | ||||
| @@ -616,32 +581,13 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| sq.setShopNumber(record.getShopNumber()); | sq.setShopNumber(record.getShopNumber()); | ||||
| sq.setBuilding(record.getBuilding()); | sq.setBuilding(record.getBuilding()); | ||||
| sq.setFloor(record.getFloor()); | sq.setFloor(record.getFloor()); | ||||
| List<Long> merchantIds = wxShopService.getMerchantIds(sq); | |||||
| if (null == merchantIds || merchantIds.size() <= 0 ) { | |||||
| List<Long> shopIds = wxShopService.getShopIds(sq); | |||||
| if (null == shopIds || shopIds.size() <= 0 ) { | |||||
| record.setId(-1L); | record.setId(-1L); | ||||
| }else { | }else { | ||||
| queryMerchantIds.addAll(merchantIds); | |||||
| record.setShopIdList(shopIds); | |||||
| } | } | ||||
| } | } | ||||
| if (StringUtils.isNotBlank(record.getMerchantName())) { | |||||
| WxMerchant mq = new WxMerchant(); | |||||
| mq.updateTenantInfo(record); | |||||
| mq.setName(record.getMerchantName()); | |||||
| List<Long> mids = wxMerchantService.findIdList(mq); | |||||
| if (null == mids || mids.size() <= 0 ) { | |||||
| record.setId(-1L); | |||||
| }else { | |||||
| if (queryMerchantIds.size() > 0 ) { | |||||
| queryMerchantIds.retainAll(mids); | |||||
| }else { | |||||
| queryMerchantIds.addAll(mids); | |||||
| } | |||||
| } | |||||
| } | |||||
| if (queryMerchantIds.size() > 0 ) { | |||||
| record.setMerchantIdList(queryMerchantIds); | |||||
| } | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -724,13 +670,11 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| sortBills(bills); | sortBills(bills); | ||||
| //创建主收款单 | //创建主收款单 | ||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user, EnumFinanceCashierType.RECEIVE,receiveTotal.toPlainString(),null, record.getMerchantId(), null, record.getRemark(),record.getReceiveDate()); | |||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user, EnumFinanceCashierType.RECEIVE,receiveTotal.toPlainString(),null, null, record.getRemark(),record.getReceiveDate()); | |||||
| if (receiveTotal.compareTo(new BigDecimal(0)) > 0) { | if (receiveTotal.compareTo(new BigDecimal(0)) > 0) { | ||||
| addreceive.setMoneyDetail(moneyDetail.toString()); | addreceive.setMoneyDetail(moneyDetail.toString()); | ||||
| wxFinanceReceivePaywayMapper.insertPayWays(record.getTenantId(),receivePayWayList); | wxFinanceReceivePaywayMapper.insertPayWays(record.getTenantId(),receivePayWayList); | ||||
| } | } | ||||
| WxMerchant merchant = new WxMerchant(); | |||||
| merchant.updateTenantInfo(record); | |||||
| boolean isAllEmpity = true; | boolean isAllEmpity = true; | ||||
| FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | ||||
| @@ -738,13 +682,21 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| calcuteDto.setTotalSetoff(setOffTotal); | calcuteDto.setTotalSetoff(setOffTotal); | ||||
| calcuteDto.setTotalCut(new BigDecimal(0)); | calcuteDto.setTotalCut(new BigDecimal(0)); | ||||
| //建立子账单关联单 | //建立子账单关联单 | ||||
| List<Long> shopIdList = new ArrayList<Long>(); | |||||
| StringBuffer shopnumberSb = new StringBuffer(); | |||||
| StringBuffer billCusSb = new StringBuffer(); | |||||
| for (int i = 0 ; i < record.getBills().size(); i++) { | for (int i = 0 ; i < record.getBills().size(); i++) { | ||||
| WxAllBill be = record.getBills().get(i); | WxAllBill be = record.getBills().get(i); | ||||
| //每个账单要创建一个收款关联单,如果有冲抵,要额外创建 | //每个账单要创建一个收款关联单,如果有冲抵,要额外创建 | ||||
| boolean noNeedCreate = createBillReceive(calcuteDto,user,addreceive,be,merchant,receivePayWayList); | |||||
| boolean noNeedCreate = createBillReceive(calcuteDto,user,addreceive,be,receivePayWayList); | |||||
| if (!noNeedCreate) { | if (!noNeedCreate) { | ||||
| isAllEmpity = false; | isAllEmpity = false; | ||||
| } | } | ||||
| if (!shopIdList.contains(be.getShopId())) { | |||||
| shopIdList.add(be.getShopId()); | |||||
| shopnumberSb.append(be.getShopNumber()).append(","); | |||||
| billCusSb.append(be.getCusName()).append(","); | |||||
| } | |||||
| } | } | ||||
| if (isAllEmpity) { | if (isAllEmpity) { | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请收款或者冲抵"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请收款或者冲抵"); | ||||
| @@ -753,7 +705,8 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| if (null != calcuteDto.getTotalSetoff()) { | if (null != calcuteDto.getTotalSetoff()) { | ||||
| addreceive.setSetOffMoney(calcuteDto.getTotalSetoff().toPlainString()); | addreceive.setSetOffMoney(calcuteDto.getTotalSetoff().toPlainString()); | ||||
| } | } | ||||
| addreceive.setMerchantId(record.getMerchantId()); | |||||
| addreceive.setBillCusName(billCusSb.toString()); | |||||
| addreceive.setBillShopNumber(shopnumberSb.toString()); | |||||
| addreceive.setRemark(record.getRemark()); | addreceive.setRemark(record.getRemark()); | ||||
| wxFinanceReceiveMapper.insert(addreceive); | wxFinanceReceiveMapper.insert(addreceive); | ||||
| @@ -791,12 +744,12 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| } | } | ||||
| } | } | ||||
| public boolean createBillReceive(FinanceReceiveCalcuteDTO calcuteDto,MallUserInfo user,WxFinanceReceive addreceive,WxAllBill be,WxMerchant merchant,List<WxFinanceReceivePayway> receivePayWayList) { | |||||
| public boolean createBillReceive(FinanceReceiveCalcuteDTO calcuteDto,MallUserInfo user,WxFinanceReceive addreceive,WxAllBill be,List<WxFinanceReceivePayway> receivePayWayList) { | |||||
| //如果既没有收款,也没有冲抵,则不更新 | //如果既没有收款,也没有冲抵,则不更新 | ||||
| boolean noNeedCreate = true; | boolean noNeedCreate = true; | ||||
| //计算账单收款费用,更新账单收款 | //计算账单收款费用,更新账单收款 | ||||
| BigDecimal b0 = new BigDecimal(0); | BigDecimal b0 = new BigDecimal(0); | ||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(EnumBillAllType.getEnum(be.getBillType()), merchant, be.getId()); | |||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(addreceive, be.getId()); | |||||
| if (calcuteDto.getTotalRemainReceive().compareTo(b0) > 0) { | if (calcuteDto.getTotalRemainReceive().compareTo(b0) > 0) { | ||||
| noNeedCreate = false; | noNeedCreate = false; | ||||
| //有收款,就要更新账单的收款 | //有收款,就要更新账单的收款 | ||||
| @@ -885,7 +838,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| return noNeedCreate; | return noNeedCreate; | ||||
| } | } | ||||
| public WxFinanceReceive generateReceive(Long receiveId,MallUserInfo user,EnumFinanceCashierType cashierType,String receiveMoney,String payMoney,Long merchantId,Long feesId,String remark,Date receiveDate) { | |||||
| public WxFinanceReceive generateReceive(Long receiveId,MallUserInfo user,EnumFinanceCashierType cashierType,String receiveMoney,String payMoney,Long feesId,String remark,Date receiveDate) { | |||||
| WxFinanceReceive addreceive = new WxFinanceReceive(); | WxFinanceReceive addreceive = new WxFinanceReceive(); | ||||
| addreceive.setId(receiveId); | addreceive.setId(receiveId); | ||||
| addreceive.updateTenantInfo(user); | addreceive.updateTenantInfo(user); | ||||
| @@ -894,9 +847,6 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| addreceive.setType(cashierType.getCode()); | addreceive.setType(cashierType.getCode()); | ||||
| addreceive.setReceiveMoney(receiveMoney); | addreceive.setReceiveMoney(receiveMoney); | ||||
| addreceive.setPayMoney(payMoney); | addreceive.setPayMoney(payMoney); | ||||
| 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()); | ||||
| @@ -925,7 +875,8 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| frbs.setPay(payMoeny); | frbs.setPay(payMoeny); | ||||
| frbs.setCreateTime(new Date()); | frbs.setCreateTime(new Date()); | ||||
| frbs.setUpdateTime(new Date()); | frbs.setUpdateTime(new Date()); | ||||
| frbs.setMerchantId(bill.getMerchantId()); | |||||
| frbs.setShopId(bill.getShopId()); | |||||
| frbs.setBillCusName(bill.getCusName()); | |||||
| frbs.setStarttime(bill.getStarttime()); | frbs.setStarttime(bill.getStarttime()); | ||||
| frbs.setEndtime(bill.getEndtime()); | frbs.setEndtime(bill.getEndtime()); | ||||
| wxFinanceReceiveBillMapper.insert(frbs); | wxFinanceReceiveBillMapper.insert(frbs); | ||||
| @@ -950,7 +901,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| rb.setSetoff(setoffdetail.getSetoff()); | rb.setSetoff(setoffdetail.getSetoff()); | ||||
| rb.setStarttime(bill.getStarttime()); | rb.setStarttime(bill.getStarttime()); | ||||
| rb.setEndtime(bill.getEndtime()); | rb.setEndtime(bill.getEndtime()); | ||||
| rb.setMerchantId(bill.getMerchantId()); | |||||
| rb.setShopId(bill.getShopId()); | |||||
| rb.setCreateTime(new Date()); | rb.setCreateTime(new Date()); | ||||
| rb.setUpdateTime(new Date()); | rb.setUpdateTime(new Date()); | ||||
| wxFinanceReceiveSetoffMapper.insert(rb); | wxFinanceReceiveSetoffMapper.insert(rb); | ||||
| @@ -1023,7 +974,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| List<WxAllBill> bills = record.getBills(); | List<WxAllBill> bills = record.getBills(); | ||||
| //创建主收款单 | //创建主收款单 | ||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user, EnumFinanceCashierType.RECEIVE,"0",null, record.getMerchantId(), null, record.getRemark(),new Date()); | |||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user, EnumFinanceCashierType.RECEIVE,"0",null, null, record.getRemark(),new Date()); | |||||
| WxMerchant merchant = new WxMerchant(); | WxMerchant merchant = new WxMerchant(); | ||||
| merchant.updateTenantInfo(record); | merchant.updateTenantInfo(record); | ||||
| boolean isAllEmpity = true; | boolean isAllEmpity = true; | ||||
| @@ -1031,6 +982,9 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | ||||
| calcuteDto.setTotalCut(new BigDecimal(0)); | calcuteDto.setTotalCut(new BigDecimal(0)); | ||||
| //建立子账单关联单 | //建立子账单关联单 | ||||
| List<Long> shopIdList = new ArrayList<Long>(); | |||||
| StringBuffer shopnumberSb = new StringBuffer(); | |||||
| StringBuffer billCusSb = new StringBuffer(); | |||||
| for (int i = 0 ; i < record.getBills().size(); i++) { | for (int i = 0 ; i < record.getBills().size(); i++) { | ||||
| WxAllBill be = record.getBills().get(i); | WxAllBill be = record.getBills().get(i); | ||||
| if(StringUtils.isNotBlank(be.getCurrentCut())) { | if(StringUtils.isNotBlank(be.getCurrentCut())) { | ||||
| @@ -1046,11 +1000,18 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| calcuteDto.setTotalCut(calcuteDto.getTotalCut().add(new BigDecimal(be.getCurrentCut()))); | calcuteDto.setTotalCut(calcuteDto.getTotalCut().add(new BigDecimal(be.getCurrentCut()))); | ||||
| isAllEmpity = false; | isAllEmpity = false; | ||||
| } | } | ||||
| if (!shopIdList.contains(be.getShopId())) { | |||||
| shopIdList.add(be.getShopId()); | |||||
| shopnumberSb.append(be.getShopNumber()).append(","); | |||||
| billCusSb.append(be.getCusName()).append(","); | |||||
| } | |||||
| } | } | ||||
| if (isAllEmpity) { | if (isAllEmpity) { | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请收款或者冲抵"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请收款或者冲抵"); | ||||
| } | } | ||||
| addreceive.setMerchantId(record.getMerchantId()); | |||||
| addreceive.setBillCusName(billCusSb.toString()); | |||||
| addreceive.setBillShopNumber(shopnumberSb.toString()); | |||||
| addreceive.setRemark(record.getRemark()); | addreceive.setRemark(record.getRemark()); | ||||
| addreceive.setCutMoney(calcuteDto.getTotalCut().toPlainString()); | addreceive.setCutMoney(calcuteDto.getTotalCut().toPlainString()); | ||||
| wxFinanceReceiveMapper.insert(addreceive); | wxFinanceReceiveMapper.insert(addreceive); | ||||
| @@ -1096,7 +1057,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| List<WxAllBill> bills = record.getBills(); | List<WxAllBill> bills = record.getBills(); | ||||
| sortBills(bills); | sortBills(bills); | ||||
| //创建主收款单 | //创建主收款单 | ||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user,EnumFinanceCashierType.PAY , "0",payTotal.toPlainString(), record.getMerchantId(), null, record.getRemark(),record.getReceiveDate()); | |||||
| WxFinanceReceive addreceive = generateReceive(receiveId,user,EnumFinanceCashierType.PAY , "0",payTotal.toPlainString(), null, record.getRemark(),record.getReceiveDate()); | |||||
| if (payTotal.compareTo(new BigDecimal(0)) > 0) { | if (payTotal.compareTo(new BigDecimal(0)) > 0) { | ||||
| addreceive.setMoneyDetail(moneyDetail.toString()); | addreceive.setMoneyDetail(moneyDetail.toString()); | ||||
| wxFinanceReceivePaywayMapper.insertPayWays(record.getTenantId(),receivePayWayList); | wxFinanceReceivePaywayMapper.insertPayWays(record.getTenantId(),receivePayWayList); | ||||
| @@ -1108,6 +1069,9 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | FinanceReceiveCalcuteDTO calcuteDto = new FinanceReceiveCalcuteDTO(); | ||||
| calcuteDto.setTotalRemainPay(payTotal); | calcuteDto.setTotalRemainPay(payTotal); | ||||
| //建立子账单关联单 | //建立子账单关联单 | ||||
| List<Long> shopIdList = new ArrayList<Long>(); | |||||
| StringBuffer shopnumberSb = new StringBuffer(); | |||||
| StringBuffer billCusSb = new StringBuffer(); | |||||
| for (int i = 0 ; i < record.getBills().size(); i++) { | for (int i = 0 ; i < record.getBills().size(); i++) { | ||||
| WxAllBill be = record.getBills().get(i); | WxAllBill be = record.getBills().get(i); | ||||
| //每个账单要创建一个收款关联单,如果有冲抵,要额外创建 | //每个账单要创建一个收款关联单,如果有冲抵,要额外创建 | ||||
| @@ -1115,11 +1079,18 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| if (!noNeedCreate) { | if (!noNeedCreate) { | ||||
| isAllEmpity = false; | isAllEmpity = false; | ||||
| } | } | ||||
| if (!shopIdList.contains(be.getShopId())) { | |||||
| shopIdList.add(be.getShopId()); | |||||
| shopnumberSb.append(be.getShopNumber()).append(","); | |||||
| billCusSb.append(be.getCusName()).append(","); | |||||
| } | |||||
| } | } | ||||
| if (isAllEmpity) { | if (isAllEmpity) { | ||||
| throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请付款"); | throw new MallinkException(ErrorCode.SYS_SERVER_ERROR.getCode(),"请付款"); | ||||
| } | } | ||||
| addreceive.setMerchantId(record.getMerchantId()); | |||||
| addreceive.setBillCusName(billCusSb.toString()); | |||||
| addreceive.setBillShopNumber(shopnumberSb.toString()); | |||||
| addreceive.setRemark(record.getRemark()); | addreceive.setRemark(record.getRemark()); | ||||
| wxFinanceReceiveMapper.insert(addreceive); | wxFinanceReceiveMapper.insert(addreceive); | ||||
| @@ -1162,7 +1133,7 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| boolean noNeedCreate = true; | boolean noNeedCreate = true; | ||||
| //计算账单收款费用,更新账单收款 | //计算账单收款费用,更新账单收款 | ||||
| BigDecimal b0 = new BigDecimal(0); | BigDecimal b0 = new BigDecimal(0); | ||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(EnumBillAllType.getEnum(be.getBillType()), merchant, be.getId()); | |||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(addreceive, be.getId()); | |||||
| if (calcuteDto.getTotalRemainPay().compareTo(b0) > 0) { | if (calcuteDto.getTotalRemainPay().compareTo(b0) > 0) { | ||||
| noNeedCreate = false; | noNeedCreate = false; | ||||
| //有收款,就要更新账单的收款 | //有收款,就要更新账单的收款 | ||||
| @@ -1252,17 +1223,13 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| WxAllBill advanceBill = new WxAllBill(); | WxAllBill advanceBill = new WxAllBill(); | ||||
| advanceBill.updateTenantInfo(record); | advanceBill.updateTenantInfo(record); | ||||
| advanceBill.setShopId(wxShop.getId()); | advanceBill.setShopId(wxShop.getId()); | ||||
| if (StringUtils.isBlank(record.getCusName())) { | |||||
| WxShopUsersInfo su = new WxShopUsersInfo(); | |||||
| su.updateTenantInfo(record); | |||||
| su.setShopId(wxShop.getId()); | |||||
| su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| WxShopUsersInfo wsu = wxShopService.getOneShopUsers(su); | |||||
| if (null != wsu) { | |||||
| advanceBill.setCusName(wsu.getName()); | |||||
| } | |||||
| }else { | |||||
| advanceBill.setCusName(record.getCusName()); | |||||
| WxShopUsers su = new WxShopUsers(); | |||||
| su.updateTenantInfo(record); | |||||
| su.setShopId(wxShop.getId()); | |||||
| su.setStatus(EnumShopUsersStatus.LIVE.getCode()); | |||||
| WxShopUsers wsu = wxShopService.getOneShopUsers(su); | |||||
| if (null != wsu) { | |||||
| advanceBill.setCusName(wsu.getName()); | |||||
| } | } | ||||
| advanceBill.setNeedPay(record.getReceivePay()); | advanceBill.setNeedPay(record.getReceivePay()); | ||||
| advanceBill.setReceivePay(receivePay); | advanceBill.setReceivePay(receivePay); | ||||
| @@ -1330,11 +1297,9 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| frb.setReceiveId(record.getId()); | frb.setReceiveId(record.getId()); | ||||
| List<WxFinanceReceiveBill> receiveBills = wxFinanceReceiveBillMapper.findList(frb); | List<WxFinanceReceiveBill> receiveBills = wxFinanceReceiveBillMapper.findList(frb); | ||||
| if (null != receiveBills && receiveBills.size() > 0 ) { | if (null != receiveBills && receiveBills.size() > 0 ) { | ||||
| WxMerchant merchant = new WxMerchant(); | |||||
| merchant.updateTenantInfo(record); | |||||
| for (int i = 0 ; i < receiveBills.size() ; i ++) { | for (int i = 0 ; i < receiveBills.size() ; i ++) { | ||||
| WxFinanceReceiveBill rb = receiveBills.get(i); | WxFinanceReceiveBill rb = receiveBills.get(i); | ||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(EnumBillAllType.getEnum(rb.getBillType()), merchant, rb.getBillId()); | |||||
| WxAllBill bill = wxBillAllHelper.getBillDetail(record, rb.getBillId()); | |||||
| if (rb.getPayWay().equals(Constant.bill_pay_way_setoff)) { | if (rb.getPayWay().equals(Constant.bill_pay_way_setoff)) { | ||||
| //预收单冲抵回退 | //预收单冲抵回退 | ||||
| //查询账单关联的预充收款单,每个预售单的金额回退 | //查询账单关联的预充收款单,每个预售单的金额回退 | ||||
| @@ -1676,26 +1641,30 @@ public class WxFinanceServiceImpl implements WxFinanceService { | |||||
| fr.setStatusList(statusList); | fr.setStatusList(statusList); | ||||
| fr.setIsFinish(EnumYesOrNo.NO.getCode()); | fr.setIsFinish(EnumYesOrNo.NO.getCode()); | ||||
| //楼栋,科目,支付方式 | //楼栋,科目,支付方式 | ||||
| if (StringUtils.isNotBlank(record.getBuildings())){ | |||||
| String floorForrule = null; | |||||
| WxMallFloor fq = new WxMallFloor(); | |||||
| fq.updateTenantInfo(record); | |||||
| fq.setBuildingIdList(record.getBuildindIds()); | |||||
| List<Long> flist = wxMallFloorService.getFloorIdList(fq); | |||||
| if (null != flist && flist.size() > 0 ){ | |||||
| floorForrule = StringUtils.join(flist, ","); | |||||
| } | |||||
| List<Long> merchantIds = wxMerchantService.getFloorBuildMerchantIds(record, floorForrule, null, null, null, EnumYesOrNo.NO.getCode(), EnumYesOrNo.NO.getCode(),null); | |||||
| if (null != merchantIds && merchantIds.size() > 0 ) { | |||||
| fr.setMerchantIdList(merchantIds); | |||||
| } | |||||
| } | |||||
| if (StringUtils.isNotBlank(record.getFees()) || StringUtils.isNotBlank(record.getPayways())){ | |||||
| if (StringUtils.isNotBlank(record.getFees()) || StringUtils.isNotBlank(record.getPayways()) || StringUtils.isNotBlank(record.getBuildings())){ | |||||
| WxFinanceReceiveBill rbq = new WxFinanceReceiveBill(); | WxFinanceReceiveBill rbq = new WxFinanceReceiveBill(); | ||||
| rbq.updateTenantInfo(record); | rbq.updateTenantInfo(record); | ||||
| rbq.setFeesIdList(record.getFeesIds()); | rbq.setFeesIdList(record.getFeesIds()); | ||||
| rbq.setPayWayList(record.getPaywaysIds()); | rbq.setPayWayList(record.getPaywaysIds()); | ||||
| rbq.setIsDel(EnumYesOrNo.NO.getCode()); | rbq.setIsDel(EnumYesOrNo.NO.getCode()); | ||||
| if (StringUtils.isNotBlank(record.getBuildings())){ | |||||
| String floorForrule = null; | |||||
| WxMallFloor fq = new WxMallFloor(); | |||||
| fq.updateTenantInfo(record); | |||||
| fq.setBuildingIdList(record.getBuildindIds()); | |||||
| List<Long> flist = wxMallFloorService.getFloorIdList(fq); | |||||
| if (null != flist && flist.size() > 0 ){ | |||||
| floorForrule = StringUtils.join(flist, ","); | |||||
| } | |||||
| List<Long> shopIds = wxShopService.getFloorBuildShopIds(record, floorForrule, null, null, EnumYesOrNo.NO.getCode(), null); | |||||
| if (null != shopIds && shopIds.size() > 0 ) { | |||||
| rbq.setShopIdList(shopIds);; | |||||
| }else { | |||||
| rbq.setId(-1L); | |||||
| } | |||||
| } | |||||
| List<Long> receiveIdList = wxFinanceReceiveBillMapper.findReceiveIdList(rbq); | List<Long> receiveIdList = wxFinanceReceiveBillMapper.findReceiveIdList(rbq); | ||||
| if (null != receiveIdList && receiveIdList.size() > 0 ){ | if (null != receiveIdList && receiveIdList.size() > 0 ){ | ||||
| fr.setIds(receiveIdList); | fr.setIds(receiveIdList); | ||||
| @@ -9,6 +9,7 @@ | |||||
| <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/> | ||||
| <result column="bill_id" jdbcType="BIGINT" property="billId"/> | <result column="bill_id" jdbcType="BIGINT" property="billId"/> | ||||
| <result column="bill_type" jdbcType="INTEGER" property="billType"/> | <result column="bill_type" jdbcType="INTEGER" property="billType"/> | ||||
| <result column="bill_cus_name" jdbcType="VARCHAR" property="billCusName"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | ||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | ||||
| <result column="pay_way" jdbcType="BIGINT" property="payWay"/> | <result column="pay_way" jdbcType="BIGINT" property="payWay"/> | ||||
| @@ -23,7 +24,7 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`shop_id`,`fees_id`, | |||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`bill_cus_name`,`shop_id`,`fees_id`, | |||||
| `pay_way`,`receive_id`,`receive`,`pay`,`starttime`,`endtime`,`is_del`,`type`,`receive_date` | `pay_way`,`receive_id`,`receive`,`pay`,`starttime`,`endtime`,`is_del`,`type`,`receive_date` | ||||
| </sql> | </sql> | ||||
| @@ -38,6 +39,9 @@ | |||||
| </if> | </if> | ||||
| <if test=" null != billId ">and `bill_id` = #{billId}</if> | <if test=" null != billId ">and `bill_id` = #{billId}</if> | ||||
| <if test=" null != billType ">and `bill_type` = #{billType}</if> | <if test=" null != billType ">and `bill_type` = #{billType}</if> | ||||
| <if test=" null != billCusName and '' != billCusName"> | |||||
| and `bill_cus_name` like concat('%',#{billCusName},'%') | |||||
| </if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | ||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | ||||
| <if test=" null != payWay ">and `pay_way` = #{payWay}</if> | <if test=" null != payWay ">and `pay_way` = #{payWay}</if> | ||||
| @@ -49,6 +53,14 @@ | |||||
| <if test=" null != endtime ">and `endtime` <= #{endtime}</if> | <if test=" null != endtime ">and `endtime` <= #{endtime}</if> | ||||
| <if test=" 1 == noReduce ">and `pay_way` != 4 </if> | <if test=" 1 == noReduce ">and `pay_way` != 4 </if> | ||||
| <if test=" null != type ">and type = #{type} </if> | <if test=" null != type ">and type = #{type} </if> | ||||
| <if test=" null != shopIdList "> | |||||
| and shop_id in | |||||
| <foreach collection="shopIdList" index="index" item="shidItem" open="(" separator="," close=")"> | |||||
| #{shidItem} | |||||
| </foreach> | |||||
| </if> | |||||
| <if test=" null != feesIdList "> | <if test=" null != feesIdList "> | ||||
| and fees_id in | and fees_id in | ||||
| <foreach collection="feesIdList" index="index" item="fidItem" open="(" separator="," close=")"> | <foreach collection="feesIdList" index="index" item="fidItem" open="(" separator="," close=")"> | ||||
| @@ -13,7 +13,7 @@ | |||||
| <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | <result column="fees_id" jdbcType="BIGINT" property="feesId"/> | ||||
| <result column="advance_id" jdbcType="BIGINT" property="advanceId"/> | <result column="advance_id" jdbcType="BIGINT" property="advanceId"/> | ||||
| <result column="setoff" jdbcType="VARCHAR" property="setoff"/> | <result column="setoff" jdbcType="VARCHAR" property="setoff"/> | ||||
| <result column="merchant_id" jdbcType="BIGINT" property="merchantId"/> | |||||
| <result column="shop_id" jdbcType="BIGINT" property="shopId"/> | |||||
| <result column="starttime" jdbcType="TIMESTAMP" property="starttime"/> | <result column="starttime" jdbcType="TIMESTAMP" property="starttime"/> | ||||
| <result column="endtime" jdbcType="TIMESTAMP" property="endtime"/> | <result column="endtime" jdbcType="TIMESTAMP" property="endtime"/> | ||||
| <result column="is_del" jdbcType="INTEGER" property="isDel"/> | <result column="is_del" jdbcType="INTEGER" property="isDel"/> | ||||
| @@ -21,7 +21,7 @@ | |||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`fees_id`, | `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`bill_id`,`bill_type`,`fees_id`, | ||||
| `receive_id`,`advance_id`,`setoff`,`merchant_id`,`starttime`,`endtime`,`is_del` | |||||
| `receive_id`,`advance_id`,`setoff`,`shop_id`,`starttime`,`endtime`,`is_del` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| @@ -38,7 +38,7 @@ | |||||
| <if test=" null != billType ">and `bill_type` = #{billType}</if> | <if test=" null != billType ">and `bill_type` = #{billType}</if> | ||||
| <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | <if test=" null != feesId ">and `fees_id` = #{feesId}</if> | ||||
| <if test=" null != advanceId ">and `advance_id` = #{advanceId}</if> | <if test=" null != advanceId ">and `advance_id` = #{advanceId}</if> | ||||
| <if test=" null != merchantId ">and `merchant_id` = #{merchantId}</if> | |||||
| <if test=" null != shopId ">and `shop_id` = #{shopId}</if> | |||||
| <if test=" null != isDel ">and `is_del` = #{isDel}</if> | <if test=" null != isDel ">and `is_del` = #{isDel}</if> | ||||
| <if test=" null != ids "> | <if test=" null != ids "> | ||||
| and id in | and id in | ||||