|
|
@ -110,25 +110,25 @@ public class BaseManufactorSubscriptionService extends MybatisBaseService<BaseMa |
|
|
|
QueryWrapper<BaseManufactorSubscription> qw = new QueryWrapper<>(); |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(query.getState())) { |
|
|
|
qw.eq("state", query.getState()); |
|
|
|
qw.eq("bms.state", query.getState()); |
|
|
|
if ("1".equals(query.getState())) { |
|
|
|
//若为认款,则按照认款日期倒序排序
|
|
|
|
qw.orderByDesc("subscriptionDate"); |
|
|
|
qw.orderByDesc("bms.subscriptionDate"); |
|
|
|
} |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getPaymentState())) { |
|
|
|
qw.eq("paymentState", query.getPaymentState()); |
|
|
|
qw.eq("bms.paymentState", query.getPaymentState()); |
|
|
|
} |
|
|
|
if (StringUtils.isNotBlank(query.getProSchAppNo())) { |
|
|
|
qw.like("proSchAppNo", query.getProSchAppNo()); |
|
|
|
qw.like("bms.proSchAppNo", query.getProSchAppNo()); |
|
|
|
} |
|
|
|
String subscriptionStartDate = query.getSubscriptionStartDate(); |
|
|
|
String subscriptionEndDate = query.getSubscriptionEndDate(); |
|
|
|
qw.apply(StringUtils.isNotEmpty(subscriptionStartDate), "date_format (subscriptionDate,'%Y-%m-%d') >= date_format('" + subscriptionStartDate + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(subscriptionEndDate), "date_format (subscriptionDate,'%Y-%m-%d') <= date_format('" + subscriptionEndDate + "','%Y-%m-%d')" |
|
|
|
qw.apply(StringUtils.isNotEmpty(subscriptionStartDate), "date_format (bms.subscriptionDate,'%Y-%m-%d') >= date_format('" + subscriptionStartDate + "','%Y-%m-%d')"). |
|
|
|
apply(StringUtils.isNotEmpty(subscriptionEndDate), "date_format (bms.subscriptionDate,'%Y-%m-%d') <= date_format('" + subscriptionEndDate + "','%Y-%m-%d')" |
|
|
|
); |
|
|
|
qw.eq("createOrgSid", query.getCreateOrgSid()); |
|
|
|
qw.orderByDesc("proSchAppNo"); |
|
|
|
qw.eq("bms.createOrgSid", query.getCreateOrgSid()); |
|
|
|
qw.orderByDesc("bms.proSchAppNo"); |
|
|
|
return qw; |
|
|
|
} |
|
|
|
|
|
|
|