【update】消费明细姓名查询修改为SF号

This commit is contained in:
nixj 2024-07-12 12:50:57 +08:00
parent 33c505ede5
commit c630d51c66
2 changed files with 6 additions and 5 deletions

View File

@ -19,6 +19,7 @@ public class ConsumptionDetailQuery extends BaseQuery{
*/
private Integer productType;
private String userName="";
private String userCode="";
private String actualOrderNo=""; //申请单号
// private List<Long> orderIds=new ArrayList<>();
private List<String> orderNos=new ArrayList<>();

View File

@ -183,14 +183,13 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
}
private static String getString(ConsumptionDetailQuery dto, String query, Map<String, Object> params, PageRequest pageRequest) {
if (!dto.getUserName().isEmpty() && LEG_TYPE_HOTEL != dto.getProductType()) {
dto.setUserName(dto.getUserName() + "%");
query += "AND tod.user_name LIKE (:userName)";
}
if (!dto.getUserName().isEmpty() && dto.getProductType().equals(LEG_TYPE_HOTEL)) {
if (!dto.getUserName().isEmpty()) {
dto.setUserName(dto.getUserName() + "%");
query += "AND tod.booking_name LIKE (:userName)";
}
if (!dto.getUserCode().isEmpty()) {
query += "AND tod.booking_user_code = (:userCode)";
}
if (!dto.getCompanyCodes().isEmpty()) {
query += "AND roef.company_code IN (:companyCodes)";
@ -200,6 +199,7 @@ public class JdbcConsumptionDetailRepositoryImpl implements JdbcConsumptionDetai
query += "AND tod.order_no IN (:orderNos)";
}
params.put("userCode", dto.getUserCode());
params.put("userName", dto.getUserName());
params.put("orderNos", dto.getOrderNos());
params.put("companyCodes", dto.getCompanyCodes());