|
|
|
@ -31,6 +31,7 @@ import au.com.royalpay.payment.manage.signin.beans.ChangePwdBean;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.SignInAccountService;
|
|
|
|
|
import au.com.royalpay.payment.manage.signin.core.impls.SignInAccountServiceImpl;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.beans.TradeLogQuery;
|
|
|
|
|
import au.com.royalpay.payment.manage.tradelog.core.TradeLogService;
|
|
|
|
|
import au.com.royalpay.payment.tools.cms.RoyalPayCMSSupport;
|
|
|
|
|
import au.com.royalpay.payment.tools.device.DeviceSupport;
|
|
|
|
|
import au.com.royalpay.payment.tools.device.message.AppMessage;
|
|
|
|
@ -86,6 +87,7 @@ import java.util.concurrent.ThreadPoolExecutor;
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Created by yishuqian on 28/03/2017.
|
|
|
|
@ -142,6 +144,8 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
@Resource
|
|
|
|
|
private NoticePartnerMapper noticePartnerMapper;
|
|
|
|
|
@Resource
|
|
|
|
|
private TradeLogService tradeLogService;
|
|
|
|
|
@Resource
|
|
|
|
|
private AppActService appActService;
|
|
|
|
|
|
|
|
|
|
private Map<String, AppMsgSender> senderMap = new HashMap<>();
|
|
|
|
@ -265,9 +269,27 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
clientManager.validateClients(client_id, params);
|
|
|
|
|
params.put("client_id", client_id);
|
|
|
|
|
JSONObject analysis = transactionMapper.analysisTransFlow(params);
|
|
|
|
|
BigDecimal total_surcharge = analysis.getBigDecimal("total_surcharge").add(analysis.getBigDecimal("tax_amount"));
|
|
|
|
|
analysis.put("total_surcharge",total_surcharge);
|
|
|
|
|
return analysis;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void getInvoiceFile(JSONObject device, AppQueryBean appQueryBean, HttpServletResponse httpResponse) throws Exception {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|
deviceSupport.findRegister(clientType);
|
|
|
|
|
int client_id = device.getIntValue("client_id") ;
|
|
|
|
|
//JSONObject client = clientManager.getClientInfo(client_id);
|
|
|
|
|
TradeLogQuery tradeLogQuery = new TradeLogQuery();
|
|
|
|
|
tradeLogQuery.setDatefrom(appQueryBean.getBegin());
|
|
|
|
|
tradeLogQuery.setDateto(appQueryBean.getEnd());
|
|
|
|
|
if (appQueryBean.getApp_client_ids()==null){
|
|
|
|
|
appQueryBean.setApp_client_ids(String.valueOf(client_id));
|
|
|
|
|
}
|
|
|
|
|
tradeLogQuery.setClient_ids(appQueryBean.getApp_client_ids().split(","));
|
|
|
|
|
tradeLogService.exportTransFlow(tradeLogQuery,device,httpResponse);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void updateClient(JSONObject device, AppClientBean appClientBean) {
|
|
|
|
|
String clientType = device.getString("client_type");
|
|
|
|
|