jqgrid应用,excel上传

阅读更多
/*
* Copyright (c) 2016, S.F. Express Inc. All rights reserved.
*/
package com.sf.novatar.tpl.task;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import javax.xml.datatype.XMLGregorianCalendar;

import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.sf.novatar.tpl.base.TaskBase;
import com.sf.novatar.tpl.bean.PayBusiness;
import com.sf.novatar.tpl.dao.IPayBusinessDao;
import com.sf.novatar.tpl.dao.ISysConfigurationsDao;
import com.sf.novatar.tpl.dto.PayBusinessDto;
import com.sf.novatar.tpl.enums.PayBusinessCallbackStatusEnum;
import com.sf.novatar.tpl.enums.PayBusinessStatusEnum;
import com.sf.novatar.tpl.enums.PayTypeEnum;
import com.sf.novatar.tpl.util.B2EUtil;
import com.sf.novatar.tpl.util.CurrencyUtil;
import com.sf.novatar.tpl.util.TaskThreadPoolUtil;
import com.sf.novatar.tpl.ws.client.cbe.PaymentInServiceClient;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentReq;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentResp;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.GrpHdr;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.Amt;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.Amt.InstdAmt;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.Cdtr;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAcct;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAgt;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAgt.FinInstnId;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAgt.FinInstnId.ClrSysMmbId;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.PmtId;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.Purp;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.RmtInf;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.DbtrAcct;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.DbtrAcct.Id;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.DbtrAcct.Id.Othr;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.PmtTpInf;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyResp;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyResp.CstmrPmtStsRpt.OrgnlPmtInfAndSts;
import com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyResp.CstmrPmtStsRpt.OrgnlPmtInfAndSts.TxInfAndSts;
import com.sfpay.framework.base.exception.ServiceException;

/**
* 描述:
*
*
 
 
* HISTORY
* ****************************************************************************
*  ID   DATE           PERSON          REASON
*  1    2016年3月7日      601008         Create
* ****************************************************************************
*

*
* @author 601008
* @since 1.0
*/
@Service("payTask")
public class PayTask extends TaskBase {

@Autowired
private ISysConfigurationsDao sysConfigurationsDao;

@Override
public void processor() throws Exception {
boolean ok = lock.tryLock();
if (ok) {
try {
this.logger.info("================开始向银行提交支付指令===============");
List> paybusinesses = null;
// 同步查询定义
Sync> sync = sync();

do {
try {
// 多线程同步查询
paybusinesses = sync.execute();
} catch (Exception ex) {
String errorMsg = "查询支付结果失败,定时任务退出:" + ex.getMessage();
this.logger.error(errorMsg, ex);
throw new ServiceException(ex.getMessage());
}

// 多个线程支付
threadsPay(paybusinesses);
} while (paybusinesses != null && paybusinesses.size() > 0);
this.logger
.info("=================向银行提交支付指令结束======================");
} finally {
lock.unlock();
}
}
}

/**
* 方法说明:

* 多线程支付
*
* @param paybusinesses
*            支付指令
* @param banksProperties
* @return
*/
private void threadsPay(final List> paybusinessesList) {
int size = null == paybusinessesList ? 0 : paybusinessesList.size();
for (int i = 0; i < size; i++) {
final Map vo = paybusinessesList.get(i);
if (null == vo) {
continue;
}
// 多线程执行
TaskThreadPoolUtil.PAY_BUSINESS_TASK_THREAD.excute(
new Runnable(i) {

@Override
public void run() {
try {
// 支付业务
executePay(vo);
} catch (Exception e) {
logger.error("向银行提交支付指令失败:" + e.getMessage());
} finally {
// 释放集合对对象的引用,此处index = i
paybusinessesList.set(index, null);
}
}
}, 20);

}
}

public void executePay(Map vo) {
if(!validate(vo)){//验证不通过
return;
}
//初始化支付数据
DTPaymentReq req = init(vo);

//付款流水号
String tradeOutNo = String.valueOf(vo.get("trade_out_no"));;
//修改支付开始时间
long id = Long.parseLong(String.valueOf(vo.get("id")));
PayBusinessDto payBusinessDto = new PayBusinessDto();
payBusinessDto.setId(id);
payBusinessDto.setPayType(PayTypeEnum.TRANSFER.getValue());
int count = payBusinessDao.updatePayBeginTime(payBusinessDto);
if (count < 1) {
logger.info("付款id[{}],流水号[{}]更新付款开始时间失败", new Object[]{String.valueOf(id), tradeOutNo});
return;
} else {
logger.info("付款id[{}],流水号[{}]更新付款开始时间成功", new Object[]{String.valueOf(id), tradeOutNo});
}

DTPaymentResp dTPaymentResp = null;
try {
dTPaymentResp = paymentInServiceClient.getClient().siPaymentIn(req);
} catch (Exception e) {
throw new ServiceException(e.getMessage());
}finally{
updatePayEndTime(dTPaymentResp);
}
}

/**
* 修改支付结束时间
* @param dTPaymentResp
* void
*/
private void updatePayEndTime(DTPaymentResp dTPaymentResp) {
if (dTPaymentResp != null) {
dTPaymentResp.getSBody().getCstmrPmtStsRpt().getOrgnlGrpInfAndSts();
List orgnlPmtInfAndStses = dTPaymentResp.getSBody().getCstmrPmtStsRpt().getOrgnlPmtInfAndSts();
for (OrgnlPmtInfAndSts orgnlPmtInfAndSts : orgnlPmtInfAndStses) {
List txInfAndStses = orgnlPmtInfAndSts.getTxInfAndSts();
for (TxInfAndSts txInfAndSts : txInfAndStses) {
String orgnlEndToEndId = txInfAndSts.getOrgnlEndToEndId();
String txSts = txInfAndSts.getTxSts();
//失败
if (PayBusinessStatusEnum.RJCT.getValue().equals(txSts)) {
//wait to rjct and updateEndTime
PayBusinessDto payBusinessDto = new PayBusinessDto();
payBusinessDto.setTransSerialNo(orgnlEndToEndId);
payBusinessDto.setOldStatus(PayBusinessStatusEnum.WAIT);
payBusinessDto.setStatus(PayBusinessStatusEnum.RJCT.getValue());
//payBusinessDto.setPayEndTime(payEndTime);
payBusinessDto.setPayType(PayTypeEnum.TRANSFER.getValue());
int count = payBusinessDao.updatePayEndTime(payBusinessDto);
if (count < 1) {
logger.info(
"支付明细transSerialNo:{},状态status[{}]->[{}],回调状态callBack[{}]->[{}]失败。",
new Object[] {
orgnlEndToEndId,
PayBusinessStatusEnum.WAIT.name(),
PayBusinessStatusEnum.RJCT.name(),
PayBusinessCallbackStatusEnum.INITIAL
.getValue(),
PayBusinessCallbackStatusEnum.NOTBACK
.getValue() });
} else {
logger.info(
"支付明细transSerialNo:{},状态status[{}]->[{}],回调状态callBack[{}]->[{}]成功。",
new Object[] {
orgnlEndToEndId,
PayBusinessStatusEnum.WAIT.name(),
PayBusinessStatusEnum.RJCT.name(),
PayBusinessCallbackStatusEnum.INITIAL
.getValue(),
PayBusinessCallbackStatusEnum.NOTBACK
.getValue() });
}
} else if (PayBusinessStatusEnum.PDNG.getValue().equals(txSts)) {
//updateEndTime
PayBusinessDto payBusinessDto = new PayBusinessDto();
payBusinessDto.setTransSerialNo(orgnlEndToEndId);
payBusinessDto.setOldStatus(PayBusinessStatusEnum.WAIT);
payBusinessDto.setStatus(PayBusinessStatusEnum.WAIT.getValue());
//payBusinessDto.setPayEndTime(payEndTime);
payBusinessDto.setPayType(PayTypeEnum.TRANSFER.getValue());
int count = payBusinessDao.updatePayEndTime(payBusinessDto);
if (count < 1) {
logger.info("支付明细transSerialNo:{},修改支付结束时间失败。", new Object[]{orgnlEndToEndId});
} else {
logger.info("支付明细transSerialNo:{},修改支付结束时间成功。", new Object[]{orgnlEndToEndId});
}
}
}
}
}
}

/**
* 2016年3月7日 601008方法说明: 初始支付数据
*
* @param vo
* @return DTPaymentReq
*/
private DTPaymentReq init(Map vo) {
DTPaymentReq dTPaymentReq = new DTPaymentReq();
GrpHdr grpHdr = new GrpHdr();
grpHdr.setMsgId(String.valueOf(vo.get("trans_serial_no")) + "XEPIC"); //trans_serial_no
XMLGregorianCalendar XMLGregorianCalendar = null;

String mhAcctNo = String.valueOf(vo.get("payer_acct_no"));
String objAcctNo = String.valueOf(vo.get("payee_acct_no"));
String amount = String.valueOf(vo.get("amt"));
String bisId = String.valueOf(vo.get("trans_serial_no"));
String key= sysConfigurationsDao.getParamValue("PAY_KEY");
amount = CurrencyUtil.fen2Yuan(Long.valueOf(amount));
String passStr = mhAcctNo + objAcctNo + bisId + amount + key;
String md5Str = B2EUtil.toMD5(passStr);
if(logger.isInfoEnabled()){
   logger.info("付款账号: [" + mhAcctNo + "] , 收款账号:[" + objAcctNo
+ "] , 唯一交易号:[" + bisId + "] , 交易金额:[" + amount
+ "] , UUID :[" + md5Str + "] , KEY:" +key);
}
grpHdr.setUUId(md5Str); //付款方账号+收款方账号+trans_serial_no+金额+ key
grpHdr.setCreDtTm(XMLGregorianCalendar);
CstmrCdtTrfInitn cstmrCdtTrfInitn = new CstmrCdtTrfInitn();
cstmrCdtTrfInitn.setGrpHdr(grpHdr);
DTPaymentSBodyReq dTPaymentSBodyReq = new DTPaymentSBodyReq();
dTPaymentSBodyReq.setCstmrCdtTrfInitn(cstmrCdtTrfInitn);
List pmtInfList = cstmrCdtTrfInitn.getPmtInf();
PmtInf pmtInf = new PmtInf();
pmtInfList.add(pmtInf);
pmtInf.setPmtInfId(String.valueOf(vo.get("trans_serial_no"))); //trans_serial_no
PmtTpInf pmtTpInf = new PmtTpInf();
// 指令优先级(指令优先级: HIGH-加急, NORM-普通)
pmtTpInf.setInstrPrty(String.valueOf(vo.get("remit_type"))); //remit_type
// 交易类别(对公,对私)
pmtTpInf.setCtgyPurp(String.valueOf(vo.get("instruction_code"))); //instruction_code
pmtInf.setPmtTpInf(pmtTpInf);
DbtrAcct dbtrAcct = new DbtrAcct();
dbtrAcct.setCcy((String)vo.get("currencies"));
pmtInf.setDbtrAcct(dbtrAcct);
Id payerId = new Id();
dbtrAcct.setId(payerId);
Othr payerOthr = new Othr();
// 付款账号
payerOthr.setId((String)vo.get("payer_acct_no"));
payerId.setOthr(payerOthr);
List cdtTrfTxInfList = pmtInf.getCdtTrfTxInf();
PmtId pmtId = new PmtId();
// 银行支行名称
pmtId.setInstrId(""); //空===
// 交易指令唯一标识
pmtId.setEndToEndId(String.valueOf(vo.get("trans_serial_no")));//trans_serial_no
// 联行号
ClrSysMmbId clrSysMmbId = new ClrSysMmbId();
clrSysMmbId.setMmbId((String)vo.get("relation_no"));
FinInstnId finInstnId = new FinInstnId();
finInstnId.setClrSysMmbId(clrSysMmbId);
// 省份
finInstnId.setRegion(String.valueOf(vo.get("payee_province"))); //payee_province
// 银行编码
finInstnId.setBankId(String.valueOf(vo.get("payee_bank_code"))); //payee_bank_code
// 银行支行名称
finInstnId.setNm(String.valueOf(vo.get("payee_open_bank_name"))); //==payee_open_bank_name
// 城市
finInstnId.setCity(String.valueOf(vo.get("payee_city"))); //payee_city
CdtrAgt cdtrAgt = new CdtrAgt();
cdtrAgt.setFinInstnId(finInstnId);
// ----------
Cdtr cdtr = new Cdtr();
// // 收款相关信息
// 收款公司名
cdtr.setNm(String.valueOf(vo.get("payee_name"))); //==payee_name
// ----------------
com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf
.CdtTrfTxInf.CdtrAcct.Id.Othr payeeOthr = new com.sf.novatar.tpl.ws.client.cbe
.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAcct.Id.Othr();
//收款账号
payeeOthr.setId((String)vo.get("payee_acct_no"));
com.sf.novatar.tpl.ws.client.cbe.pay.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf
.CdtTrfTxInf.CdtrAcct.Id payeeId = new com.sf.novatar.tpl.ws.client.cbe.pay
.DTPaymentSBodyReq.CstmrCdtTrfInitn.PmtInf.CdtTrfTxInf.CdtrAcct.Id();
payeeId.setOthr(payeeOthr);
CdtrAcct cdtrAcct = new CdtrAcct();
cdtrAcct.setId(payeeId);
//----------------------
//付款金额
BigDecimal bdAmt = new BigDecimal(amount);
InstdAmt instdAmt = new InstdAmt();
instdAmt.setValue(bdAmt);
Amt amt = new Amt();
amt.setInstdAmt(instdAmt);
//---------------------
Purp purp = new Purp();
purp.setCd((String)vo.get("use_desc"));//用途
//----------------
RmtInf rmtInf = new RmtInf();
rmtInf.getUstrd().add((String)vo.get("use_desc"));//摘要
//---------------
CdtTrfTxInf cdtTrfTxInf = new CdtTrfTxInf();
cdtTrfTxInf.setCdtrAgt(cdtrAgt);
cdtTrfTxInf.setPmtId(pmtId);
cdtTrfTxInf.setCdtr(cdtr);
cdtTrfTxInf.setCdtrAcct(cdtrAcct);
cdtTrfTxInf.setAmt(amt);
cdtTrfTxInf.setPurp(purp);
cdtTrfTxInf.setRmtInf(rmtInf);
cdtTrfTxInfList.add(cdtTrfTxInf);
dTPaymentReq.setSBody(dTPaymentSBodyReq);
return dTPaymentReq;
}

/**
* 方法说明:

* 同步查询定义
*
* @return 同步对象
*/
private Sync> sync() {

return new Sync>() {     

private final PayBusiness param = new PayBusiness();

{
// 未发送支付指令
param.setStatus(PayBusinessStatusEnum.APRD.getValue());
param.setPayType(PayTypeEnum.TRANSFER.getValue());
}

@Override
protected List> callBack() {
// 查询需要支付的支付明细
List> paybusinessesList = payBusinessDao
.queryPayBusinessWaitToPay(param, 0, 100);
int size = 0;
if (paybusinessesList != null
&& (size = paybusinessesList.size()) > 0) {

// 修改明细状态“支付中”
for (int i = 0; i < size; i++) {
int count = 0;
Map vo = paybusinessesList.get(i);
long id = Long
.valueOf(String.valueOf(vo.get("id")));
PayBusinessDto updatePayBusinessDto = new PayBusinessDto();
updatePayBusinessDto.setId(id);
updatePayBusinessDto
.setOldStatus(PayBusinessStatusEnum.APRD);
updatePayBusinessDto
.setStatus(PayBusinessStatusEnum.WAIT.getValue());
updatePayBusinessDto.setBankRetCode("");
updatePayBusinessDto.setBankRetMsg("");
updatePayBusinessDto.setPayType(PayTypeEnum.TRANSFER.getValue());
try {
// 修改状态返回影响到的条数
count = payBusinessDao
.updateStatusToWait(updatePayBusinessDto);
} catch (Exception ex) {
String errorMsg = "付款id:{},指令唯一标识:{}修改状态status[{}]->status[{}]出错。";
logger.error(
errorMsg,
new Object[] { String.valueOf(id), String.valueOf(vo.get("trans_serial_no")),
PayBusinessStatusEnum.APRD.name(),
PayBusinessStatusEnum.WAIT.name() },
ex);
}
if (count == 0) {
// 影响条数为0,说明这条支付明细不能提交,从list中剔除
paybusinessesList.set(i, null);
String errorMsg = "付款id:{},指令唯一标识:{}修改状态status[{}]->status[{}]失败。";
logger.error(
errorMsg,
new Object[] { String.valueOf(id), String.valueOf(vo.get("trans_serial_no")),
PayBusinessStatusEnum.APRD.name(),
PayBusinessStatusEnum.WAIT.name() });
} else {
String errorMsg = "付款id:{},指令唯一标识:{}修改状态status[{}]->status[{}]成功。";
logger.info(
errorMsg,
new Object[] { String.valueOf(id), String.valueOf(vo.get("trans_serial_no")),
PayBusinessStatusEnum.APRD.name(),
PayBusinessStatusEnum.WAIT.name() });
}
}
}
return paybusinessesList;
}
};
}

private final Logger logger = LoggerFactory.getLogger(this.getClass());

private static final Lock lock = new ReentrantLock();

@Autowired
private IPayBusinessDao payBusinessDao;

@Autowired
private PaymentInServiceClient paymentInServiceClient;

public abstract class Runnable implements java.lang.Runnable {
protected V index;

public Runnable(V index) {
this.index = index;
}
}

/**
* 2016年3月12日 601008方法说明:
* 支付数据验证
* @param payBusiness
* @return
* boolean
*/
private boolean validate(Map payBusiness) {
long id = Long.parseLong(String.valueOf(payBusiness.get("id")));
// 银行编码
String bankCode = String.valueOf(payBusiness.get("id"));
// 收款人账号
String payeeAcctCode = String.valueOf(payBusiness.get("payee_acct_no"));
// 收款人账户名
// 收款人省份
String provinceName = String.valueOf(payBusiness.get("payee_province"));
// 收款人城市
String city = String.valueOf(payBusiness.get("payee_city"));
// 付款金额
long amt = Long.parseLong(String.valueOf(payBusiness.get("amt")));
//收款开户行
String branchName = String.valueOf(payBusiness.get("payee_open_bank_name"));
//用途
String useDesc = String.valueOf(payBusiness.get("use_desc"));

//付款流水号
String tradeOutNo = String.valueOf(payBusiness.get("trade_out_no"));;
String errorMsg = "";
if(amt <= 0 ) {
errorMsg = "金额错误,小于或者等于0";
}else if (StringUtils.isBlank(bankCode)) {
errorMsg = "收款银行编号为空";
}else if( StringUtils.isBlank(payeeAcctCode)) {
errorMsg = "收款账号为空";
}else if(StringUtils.isBlank(provinceName)) {
errorMsg = "收款省份为空";
}else if(StringUtils.isBlank(useDesc)) {
errorMsg = "收款用途为空";
}else if( StringUtils.isBlank(branchName)) {
errorMsg = "收款人开户行为空";
}else if( StringUtils.isBlank(city)) {
errorMsg = "收款人城市为空";
}else if(StringUtils.isBlank(tradeOutNo)){
errorMsg = "交易流水号为空";
}

if(StringUtils.isNotBlank(errorMsg)){
updateAuthRjct(payBusiness, errorMsg);
logger.error("支付明细id["+id+"],"+errorMsg);
return false;
}
logger.info("支付明细id["+id+"],验证通过");
return true;
}

/**
* 方法说明:

* 支付条件不满足,直接更新状态为支付失败
* @param vo
* 支付明细
* @param msg
* 错误消息
* @return
*/
private int updateAuthRjct(Map payBusiness, String msg) {
long id = Long
.valueOf(String.valueOf(payBusiness.get("id")));
PayBusinessDto updatePayBusinessDto = new PayBusinessDto();
updatePayBusinessDto.setId(id);
updatePayBusinessDto
.setOldStatus(PayBusinessStatusEnum.WAIT);
updatePayBusinessDto
.setStatus(PayBusinessStatusEnum.RJCT.getValue());
updatePayBusinessDto.setBankRetCode("cbe_error_0030");
updatePayBusinessDto.setBankRetMsg(msg);
updatePayBusinessDto.setPayType(PayTypeEnum.TRANSFER.getValue());
// 修改状态返回影响到的条数
int count = payBusinessDao
.updateStatusToWait(updatePayBusinessDto);
if (count < 1) {
logger.info("付款id:{}修改status[{}]->[{}]失败",
new Object[] { String.valueOf(id),
PayBusinessStatusEnum.WAIT.getValue(),
PayBusinessStatusEnum.RJCT.getValue() });
} else {
logger.info("付款id:{}修改status[{}]->[{}]成功",
new Object[] { String.valueOf(id),
PayBusinessStatusEnum.WAIT.getValue(),
PayBusinessStatusEnum.RJCT.getValue() });
}
return count;
}
}

你可能感兴趣的:(jqgrid应用,excel上传)