dev
parent
a04a5dc570
commit
554fc601fa
|
|
@ -91,6 +91,7 @@ public class OrderTempService extends BaseService {
|
||||||
Integer state,
|
Integer state,
|
||||||
String invoice_code,
|
String invoice_code,
|
||||||
Integer invoice_type,
|
Integer invoice_type,
|
||||||
|
String ticket_code,
|
||||||
Integer product_id,
|
Integer product_id,
|
||||||
Boolean invoice_code_is_null
|
Boolean invoice_code_is_null
|
||||||
) {
|
) {
|
||||||
|
|
@ -171,6 +172,11 @@ public class OrderTempService extends BaseService {
|
||||||
paraList.add(invoice_type);
|
paraList.add(invoice_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (StrKit.notBlank(ticket_code)) {
|
||||||
|
fromsql += " and t.ticket_code like ? \n";
|
||||||
|
paraList.add("%" + ticket_code.trim() + "%");
|
||||||
|
}
|
||||||
|
|
||||||
String totalRowSql = "select count(*) " + fromsql;
|
String totalRowSql = "select count(*) " + fromsql;
|
||||||
String findSql = selectsql + fromsql;
|
String findSql = selectsql + fromsql;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,9 +37,6 @@ public class TicketInvalidVerifyService extends BaseService {
|
||||||
" where 1=1 ";
|
" where 1=1 ";
|
||||||
List<Object> paraList = new ArrayList<>();
|
List<Object> paraList = new ArrayList<>();
|
||||||
|
|
||||||
String totalRowSql = "select count(*) " + fromsql;
|
|
||||||
String findSql = selectsql + fromsql;
|
|
||||||
|
|
||||||
if (StrKit.notBlank(stm)) {
|
if (StrKit.notBlank(stm)) {
|
||||||
fromsql += " and t.create_time >= ? \n";
|
fromsql += " and t.create_time >= ? \n";
|
||||||
paraList.add(stm);
|
paraList.add(stm);
|
||||||
|
|
@ -75,6 +72,9 @@ public class TicketInvalidVerifyService extends BaseService {
|
||||||
paraList.add(state);
|
paraList.add(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String totalRowSql = "select count(*) " + fromsql;
|
||||||
|
String findSql = selectsql + fromsql;
|
||||||
|
|
||||||
// 前端传了排序字段,并且排序字段存在相关表中
|
// 前端传了排序字段,并且排序字段存在相关表中
|
||||||
if (StrKit.notBlank(pp.getSort_field()) && TicketInvalidVerify.dao.hasColunm(pp.getSort_field())) {
|
if (StrKit.notBlank(pp.getSort_field()) && TicketInvalidVerify.dao.hasColunm(pp.getSort_field())) {
|
||||||
findSql += " order by t." + pp.getSort_field() + " is null, t." + pp.getSort_field();
|
findSql += " order by t." + pp.getSort_field() + " is null, t." + pp.getSort_field();
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,11 @@ public class OrderTempController extends BaseController {
|
||||||
Integer supermarket_id = getInt("supermarket_id");
|
Integer supermarket_id = getInt("supermarket_id");
|
||||||
Integer isprepaid = getInt("isprepaid");
|
Integer isprepaid = getInt("isprepaid");
|
||||||
String invoice_code = get("invoice_code");
|
String invoice_code = get("invoice_code");
|
||||||
|
String ticket_code = get("ticket_code");
|
||||||
Integer invoice_type = getInt("invoice_type");
|
Integer invoice_type = getInt("invoice_type");
|
||||||
Integer customer_id = getInt("customer_id");
|
Integer customer_id = getInt("customer_id");
|
||||||
Boolean invoice_code_is_null = getBoolean("invoice_code_is_null");
|
Boolean invoice_code_is_null = getBoolean("invoice_code_is_null");
|
||||||
renderJson(Result.object(OrderTempService.me.find(pp, sn, truck_license, supermarket_id, customer_id, customer_name, stm, etm, isprepaid, state, invoice_code, invoice_type, product_id, invoice_code_is_null)));
|
renderJson(Result.object(OrderTempService.me.find(pp, sn, truck_license, supermarket_id, customer_id, customer_name, stm, etm, isprepaid, state, invoice_code, invoice_type, ticket_code, product_id, invoice_code_is_null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before(StartAndEndIntervalValidator.class)
|
@Before(StartAndEndIntervalValidator.class)
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ public class OrderTempController extends BaseController {
|
||||||
String sn = get("sn");
|
String sn = get("sn");
|
||||||
Integer state = getInt("state");
|
Integer state = getInt("state");
|
||||||
String invoice_code = get("invoice_code");
|
String invoice_code = get("invoice_code");
|
||||||
|
String ticket_code = get("ticket_code");
|
||||||
Integer product_id = getInt("product_id");
|
Integer product_id = getInt("product_id");
|
||||||
Integer invoice_type = getInt("invoice_type");
|
Integer invoice_type = getInt("invoice_type");
|
||||||
Integer supermarket_id = getInt("supermarket_id");
|
Integer supermarket_id = getInt("supermarket_id");
|
||||||
|
|
@ -57,7 +58,7 @@ public class OrderTempController extends BaseController {
|
||||||
customer_id = tokenuser.getEntityId();
|
customer_id = tokenuser.getEntityId();
|
||||||
}
|
}
|
||||||
|
|
||||||
renderJson(Result.object(OrderTempService.me.find(pp, sn, truck_license, supermarket_id, customer_id, customer_name, stm, etm, isprepaid, state, invoice_code, invoice_type, product_id, invoice_code_is_null)));
|
renderJson(Result.object(OrderTempService.me.find(pp, sn, truck_license, supermarket_id, customer_id, customer_name, stm, etm, isprepaid, state, invoice_code, invoice_type, ticket_code, product_id, invoice_code_is_null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Before(StartAndEndIntervalValidator.class)
|
@Before(StartAndEndIntervalValidator.class)
|
||||||
|
|
|
||||||
|
|
@ -129,6 +129,31 @@ public class OrderTempSyncService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 开具过结算单的
|
||||||
|
if(order.getTicketCode() != null){
|
||||||
|
TicketLog ticketLog = TicketLog.dao.findFirst(
|
||||||
|
"select * from ticket_log t where ticket_code = ? limit 1 ",
|
||||||
|
order.getTicketCode());
|
||||||
|
|
||||||
|
if (ticketLog != null) {
|
||||||
|
ticketLog.setInvalidUserId(sysuser.getId());
|
||||||
|
ticketLog.setInvalidUserName(sysuser.getName());
|
||||||
|
ticketLog.setInvalidTime(new Date());
|
||||||
|
ticketLog.setInvalidMemo(invalid_memo);
|
||||||
|
ticketLog.setState(OrderStateEnum.INVALID.getStateid());
|
||||||
|
|
||||||
|
ret = ticketLog.update();
|
||||||
|
|
||||||
|
if (!ret) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
synctask.addUpdateData(ticketLog);
|
||||||
|
} else {
|
||||||
|
log.error("订单[%s]没有找到结算单记录", order.getSn());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 是预付费订单
|
// 是预付费订单
|
||||||
if (order.getIsprepaid() == 1 && order.getCustomerId() != null) {
|
if (order.getIsprepaid() == 1 && order.getCustomerId() != null) {
|
||||||
Customer customer = Customer.dao.findById(order.getCustomerId());
|
Customer customer = Customer.dao.findById(order.getCustomerId());
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue