📄 refundinfo.java
字号:
this.outBuffer.setInt("RESULT_CODE", -1);
this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
} else {
this.outBuffer.setInt("RESULT_CODE", 0);
this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
}
log.LOG_INFO("退出addRefundInfo方法...");
}
public int delRefundInfo(RefundDAO refundDao)
throws SaasApplicationException {
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", refundDao.getCust_id());
refundExt.setParam(":VFORM_ID", refundDao.getForm_id());
refundExt.setParam(":VQUO_ID", refundDao.getQuo_id());
refundExt.setParam(":VSALE_QUO_ID", refundDao.getSale_quo_id());
tradeQuery.executeBy(refundExt.insBy("DEL_BY_ALL"));
return 0;
}
/**
* 取出退货申请列表
*/
public ArrayList getRefundList(String cust_id, int iStart)
throws SaasApplicationException {
iStart=iStart*20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_BY_CUST", iStart, 20);
return list;
}
public ArrayList getProcurRefundList(String cust_id, int iStart)
throws SaasApplicationException {
iStart = iStart * 20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_BACKFROM_BY_PROCUR", iStart,
20);
return list;
}
public int getProcurRefundList(String cust_id)
throws SaasApplicationException {
int count = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_BACKFROM_BY_PROCUR");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
public ArrayList getGoodsGetuseRefundList(String cust_id, int iStart)
throws SaasApplicationException {
iStart = iStart * 20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_BACKFROM_BY_GOODS_GETUSE",
iStart, 20);
return list;
}
public int getGoodsGetuseRefundList(String cust_id)
throws SaasApplicationException {
int count = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_BACKFROM_BY_GOODS_GETUSE");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
/**
* @param cust_id
* @return 取出退货条数
* @throws SaasApplicationException
*/
public int getRefundSize(String cust_id) throws SaasApplicationException {
int size = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_SIZE_BY_CUST");
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
HashMap map = (HashMap) list.get(i);
size = Integer.parseInt(map.get("ct").toString());
}
}
return size;
}
public int getRefundTypeSize(String cust_id, String refund_type)
throws SaasApplicationException {
int size = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VBACK_TYPE", refund_type);
refundExt.setParam(":VCUST_ID", cust_id);
ArrayList list = refundExt.selByList("SEL_CT_TYPE");
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
HashMap map = (HashMap) list.get(i);
size = Integer.parseInt(map.get("ct").toString());
}
}
return size;
}
/**
* @param quo_id
* @return map
* @throws SaasApplicationException
*/
public HashMap getRefundInfoById(String quo_id)
throws SaasApplicationException {
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VQUO_ID", quo_id);
ArrayList list = refundExt.selByList("SEL_BY_ID");
HashMap map = new HashMap();
if (list != null && list.size() > 0) {
map = (HashMap) list.get(0);
}
return map;
}
public String getJsonDataByCust(int start, String cust_id,
String refund_type) throws SaasApplicationException {
String json = "";
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
JSONArray array = new JSONArray();
JSONObject jsonOjb = new JSONObject();
ArrayList list = refundExt.selByList("SEL_BY_CUST", start, 10);
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
HashMap map = (HashMap) list.get(i);
String quo_id = map.get("quo_id").toString();
String quo_name = map.get("quo_name").toString();
String back_type = "";
String form_id = "";
if (map.get("form_id") != null) {
form_id = map.get("form_id").toString();
}
if (map.get("back_type") != null) {
back_type = map.get("back_type").toString();
}
String give_date = "";
if (map.get("give_date") != null) {
give_date = map.get("give_date").toString();
if (give_date.length() > 10) {
give_date = give_date.substring(0, 10);
}
}
String give_addr = "";
if (map.get("give_addr") != null) {
give_addr = map.get("give_addr").toString();
}
String sale_quo_id = "";
if (map.get("sale_quo_id") != null) {
sale_quo_id = map.get("sale_quo_id").toString();
}
JSONObject obj = new JSONObject();
obj.put("sale_quo_id", sale_quo_id);
obj.put("give_addr", give_addr);
obj.put("give_date", give_date);
obj.put("form_id", form_id);
obj.put("back_type", back_type);
obj.put("quo_name", quo_name);
obj.put("id", quo_id);
array.add(obj);
}
}
int size = getRefundSize(cust_id);
jsonOjb.put("root", array);
jsonOjb.put("total", size);
json = jsonOjb.toString();
log.LOG_INFO(json);
return json;
}
public ArrayList getChangeInByProcur(String cust_id, String back_type,
int iStart) throws SaasApplicationException {
iStart = iStart * 20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_PROCUR", iStart,
20);
return list;
}
public int getChangeInByProcur(String cust_id, String back_type)
throws SaasApplicationException {
int count = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_PROCUR");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
public ArrayList getChangeInByGoodsGetuse(String cust_id, String back_type,
int iStart) throws SaasApplicationException {
iStart = iStart * 20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_GOODS_GETUSE",
iStart, 20);
return list;
}
public int getChangeInByGoodsGetuse(String cust_id, String back_type)
throws SaasApplicationException {
int count = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_GOODS_GETUSE");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
public String getProcurByBackType(String cust_id, String back_type)
throws SaasApplicationException {
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_PROCUR_BY_BACK_TYPE");
HashMap map = new HashMap();
String str = "";
if (list != null && list.size() > 0) {
for (int i = 0; i < list.size(); i++) {
map = (HashMap) list.get(i);
String quo_name = map.get("quo_name").toString();
String quo_id = map.get("quo_id").toString();
str = str + "<option quo_id=" + quo_id + ">" + quo_name
+ "</option>";
}
}
return str;
}
public ArrayList getChangeInById(String cust_id, String back_type,
int iStart) throws SaasApplicationException {
iStart = iStart * 20;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_PRO", iStart, 20);
return list;
}
public int getChangeInById(String cust_id, String back_type)
throws SaasApplicationException {
int count = 0;
RefundExt refundExt = new RefundExt();
refundExt.setParam(":VCUST_ID", cust_id);
refundExt.setParam(":VBACK_TYPE", back_type);
ArrayList list = refundExt.selByList("SEL_CHANGIN_BY_PRO");
if (list != null && list.size() > 0) {
count = list.size();
}
return count;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -