Commit a48f6b39 authored by 鲁鑫's avatar 鲁鑫

查询供应商发票

parent 49e86238
......@@ -110,30 +110,49 @@ var tableArray = [
}
},
{
display: "采购发票号", name: "BELNR2", width: 120, minwidth: 120, type: "string", align: "left",
display: "采购发票号", name: "belnr2", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
required: true, type: "select",
data: {
type: 'system',
name: "getPartnerInvs",
getParam: function (item) {
return {
ZEP_FTYPE: $("#zepFtype").val(),
PARTNER:item.partner,
BUKRS:$("#bukrs").val()
}
},
back: {
BELNR2: "belnr2",
BUZEI: "buzei",
ZRSEG_ITEM: "zrsegItem",
WAERS: "waers",
KURSF: "kursf",
KZWI1: "kzwi1",
KZWI11: "kzwi11",
}
},
}
},
{
display: "采购发票行",
name: "BUZEI",
name: "buzei",
width: 120,
minwidth: 120,
type: "string",
align: "left",
editor: {
type: 'text'
}
// editor: {
//
// type: 'text'
// }
},
{
display: "采购发票行信息", name: "ZRSEG_ITEM", width: 120, minwidth: 120, type: "string", align: "left",
editor: {
type: 'text'
}
display: "采购发票行信息", name: "zrsegItem", width: 300, minwidth: 120, type: "string", align: "left",
// editor: {
//
// type: 'text'
// }
},
{
display: "币别", name: "waers", width: 120, minwidth: 120, type: "string", align: "left",
......
......@@ -184,6 +184,18 @@ public class ResourceSearchController {
return this.initEasySearchModel( mapList, param, sdo);
}
@EasySearch(queryName = "getPartnerInvs")
public Map<String, Object> getPartnerInvs(SDO sdo) throws IOException {
String param = sdo.getString("paramValue");
String BUKRS = sdo.getString("BUKRS");
String PARTNER = sdo.getString("PARTNER");
String ZYL03 = sdo.getString("ZYL03");
String ZEP_FTYPE = sdo.getString("ZEP_FTYPE");
List<Map<String, Object>> mapList = new ArrayList<>();
mapList = sapPaymentApplication.getPartnerInvs(BUKRS,PARTNER,ZEP_FTYPE,ZYL03);
return this.initEasySearchModel( mapList, param, sdo);
}
public Map<String,Object> initEasySearchModel(List<Map<String, Object>> mapList,String param,SDO sdo){
List<QuerySchemeField> fields = new ArrayList<>();
if (CollectionUtil.isNotEmpty(mapList)){
......
......@@ -84,6 +84,24 @@ public class SapCostReimbursementDetail implements Serializable {
@Column(name = "SWIFT")
private String swift;
/**
* 采购发票号
*/
@Column(name = "BELNR2")
private String belnr2;
/**
* 采购发票行
*/
@Column(name = "BUZEI")
private String buzei;
/**
* 采购发票行信息
*/
@Column(name = "ZRSEG_ITEM")
private String zrsegItem;
/**
* BP联行号名称
*/
......
......@@ -52,4 +52,14 @@ public interface SapPaymentApplication {
* @throws IOException
*/
List<Map<String,Object>> getPurchaseOrders(String BUKRS,String PARTNER,String ZEP_FTYPE) throws IOException;
/**
* 根据公司代码、BP(合作伙伴)、付款申请类别查询发票
* @param BUKRS
* @param PARTNER
* @param ZEP_FTYPE
* @param ZYL03
* @return
*/
List<Map<String, Object>> getPartnerInvs(String BUKRS,String PARTNER,String ZEP_FTYPE, String ZYL03);
}
......@@ -7,6 +7,7 @@ import com.huigou.topsun.sap.common.HttpClient;
import com.huigou.topsun.sap.purchaseInfoRecord.domain.SapResult;
import com.huigou.topsun.sap.sapApplication.application.SapPaymentApplication;
import com.huigou.uasp.bmp.common.application.BaseApplication;
import com.huigou.util.DateUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -133,4 +134,28 @@ public class SapPaymentApplicationImpl implements SapPaymentApplication {
}
return mapList;
}
@Override
public List<Map<String, Object>> getPartnerInvs(String BUKRS,String PARTNER,String ZEP_FTYPE, String ZYL03) {
Map<String,Object> param = new HashMap<>();
param.put("BUKRS",BUKRS);
param.put("PARTNER",PARTNER);
param.put("ZEP_FTYPE",ZEP_FTYPE);
param.put("ZYL03", DateUtil.getCurrentYear());
String execute = null;
List<Map<String,Object>> mapList = new ArrayList<>();
try {
execute = httpClient.execute(param, "search/sch_partner_inv");
Map<String, Object> map = JSONObject.parseObject(execute, Map.class);
SapResult sapResult = JSONObject.parseObject(JSONUtil.toJsonStr(map.get("MSG")), SapResult.class);
if ("S".equals(sapResult.getTYPE())) {
mapList = (List<Map<String,Object>>)JSONArray.parse(JSONUtil.toJsonStr(map.get("RDATA")));
} else {
throw new RuntimeException("查询供应商采购订单信息失败:" + sapResult.getMESSAGE());
}
} catch (IOException e) {
throw new RuntimeException("查询供应商采购订单信息出错”。");
}
return mapList;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment