提交 6407414c authored 作者: 李炎's avatar 李炎

最后一次了

上级 593815b5
......@@ -20,5 +20,5 @@ services:
- /data/config:/sosssystem/config
- /data/storage:/sosssystem/storage
ports:
- 8808:8090
- 8808:8808
......@@ -30,6 +30,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
* K3金蝶方请求字段
*/
String FCustomer = "FCustomer";//核算项目
String FCustomer_FNDName ="FCustomer_FNDName";
String FCustomer_DSPName = "FCustomer_DSPName";//
String FAmountFor = "FAmountFor";//单据金额
String FDate = "FDate";//单据日期
......@@ -106,6 +107,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Data.put("SelectPage", "1");//表体索引,文档默认为2
Data.put("Fields", fields);//查询字段
paramsMap.put("Data", Data);
System.out.println(paramsMap);
return paramsMap;
}
......@@ -133,6 +135,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("ERPSystemNumber", listDateMap.get(FNumber));//编号
masterFieldVal.put("customerId", listDateMap.get(FCustomer_FNDName));//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
......@@ -154,7 +157,10 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
Object customerId=new Object();
masterFieldVal.put("ERPSystemNumber", listDateMap.get(FNumber));//编号
customerId = listDateMap.get(FCustomer_FNDName);
masterFieldVal.put("customerId", customerId);//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
......@@ -163,13 +169,13 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FNumber).toString(),personCharge));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FNumber).toString(),personCharge,customerId));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map getDetail(String code,Object personCharge,Object customerId) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -188,7 +194,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
for (Object o : list) {
Map listDateMap = JSON.parseObject(o.toString(), Map.class);
Map<String, Object> map = new LinkedHashMap();
// map.put("ERPSystemNumber", code);//主体唯一
map.put("customerId", customerId);//客户id
map.put("ERPUniCode", code + "_" + listDateMap.get("FIndex3"));//字体唯一
map.put("salesOrderNo", listDateMap.get(FEntryOrderNo));//销售订单编号
map.put("currentRemittanceAmount", listDateMap.get(FSettleAmountFor_3));//本次汇款金额
......@@ -263,7 +269,11 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
Object customerId=new Object();
masterFieldVal.put("ERPSystemNumber", listDateMap.get(FNumber));//编号
customerId = listDateMap.get(FCustomer_FNDName);
masterFieldVal.put("customerId", customerId);//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
......@@ -271,7 +281,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
masterFieldVal.put("personCharge", personCharge);//业务员
if (null == RequestVo.getIncludeDetail() || false == RequestVo.getIncludeDetail()) {
} else if (null != RequestVo.getIncludeDetail() && true == RequestVo.getIncludeDetail()) {
map = getDetail(listDateMap.get(FNumber).toString(),personCharge);
map = getDetail(listDateMap.get(FNumber).toString(),personCharge,customerId);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -30,6 +30,7 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
* K3金蝶方请求字段
*/
String FSupplyID = "FSupplyID";//购货单位
String FSupplyID_FNDName = "FSupplyID_FNDName";
String FSupplyID_DSPName = "FSupplyID_DSPName";
String FHeadSelfB0162 = "FHeadSelfB0162";//地址
String FBillNo = "FBillNo";//编号
......@@ -37,7 +38,9 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
String FHeadSelfB0159 = "FHeadSelfB0159";//物流公司
String FHeadSelfB0157 = "FHeadSelfB0157";//物流单号
String FExplanation = "FExplanation";//摘要
String FEmpID="FEmpID";//业务员
String FEmpID = "FEmpID";//业务员
String FDCStockID_DSPName = "FDCStockID_DSPName";//发货仓库
/**
* K3金蝶方请求字段-明细字段
*/
......@@ -52,11 +55,12 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
String FEntrySelfB0165 = "FEntrySelfB0165";//未发数量
String FDCStockID1 = "FDCStockID1";//发货仓库
String FOrderBillNo = "FOrderBillNo";//订单单号
String FOrderEntryID ="FOrderEntryID";//订单分录
public SoSsSalesDeliveryServiceImpl() {
this.Url = "/K3API/Sales_Delivery/GetList";//拼接用请求地址-(http://127.0.0.1/K3API/Material/GetList?token=${token})
this.includeDetailUrl = "/K3API/Sales_Delivery/GetDetail";
this.fields = "FEmpID,FSupplyID,FHeadSelfB0162,FHeadSelfB0173,FHeadSelfB0159,FExplanation";//需要查询出的字段
this.fields = "FDCStockID,FEmpID,FSupplyID,FHeadSelfB0162,FHeadSelfB0173,FHeadSelfB0159,FExplanation";//需要查询出的字段
}
@Override
......@@ -137,6 +141,7 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerId", listDateMap.get(FSupplyID_FNDName));//客户名称编号
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber", listDateMap.get(FBillNo));//erp编号
......@@ -144,7 +149,8 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
masterFieldVal.put("logisticsCompany", listDateMap.get(FHeadSelfB0159));//物流公司
masterFieldVal.put("logisticsOrderNo", listDateMap.get(FHeadSelfB0157));//物流单号
masterFieldVal.put("remarks", listDateMap.get(FExplanation));//备注
masterFieldVal.put("personCharge", listDateMap.get(FEmpID+"_FNDName"));//业务员
masterFieldVal.put("personCharge", listDateMap.get(FEmpID + "_FNDName"));//业务员
masterFieldVal.put("delivStorage", listDateMap.get(FDCStockID_DSPName));//发货仓库
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......@@ -160,25 +166,29 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
Object personCharge = new Object();
masterFieldVal.put("customerId", listDateMap.get(FSupplyID_FNDName));//客户名称编号
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber",listDateMap.get(FBillNo));//erp编号
masterFieldVal.put("erpNumber", listDateMap.get(FBillNo));//erp编号
masterFieldVal.put("orderDate", listDateMap.get(Fdate));//下单日期
masterFieldVal.put("logisticsCompany", listDateMap.get(FHeadSelfB0159));//物流公司
masterFieldVal.put("logisticsOrderNo", listDateMap.get(FHeadSelfB0157));//物流单号
masterFieldVal.put("remarks", listDateMap.get(FExplanation));//备注
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
masterFieldVal.put("delivStorage", listDateMap.get(FDCStockID_DSPName));//发货仓库
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString(),personCharge));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString(), personCharge));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map getDetail(String code, Object personCharge) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -202,6 +212,7 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
Map<String, Object> map = new LinkedHashMap();
// map.put("ERPSystemNumber", code);//主体唯一
map.put("ERPUniCode", listDateMap.get("FDetailID2"));//子体唯一
map.put("productId", JSONObject.fromObject(listDateMap.get(FItemID)).get("FNumber"));//产品编码
map.put("productCode", JSONObject.fromObject(listDateMap.get(FItemID)).get("FNumber"));//产品编号
map.put("productName", listDateMap.get(FItemName));//产品名称
map.put("chineseDescription", listDateMap.get(FEntrySelfB0164));//中文描述
......@@ -213,7 +224,9 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
map.put("undeliveredQuantity", listDateMap.get(FEntrySelfB0165));//未发货数
map.put("deliveryWarehouse", JSONObject.fromObject(listDateMap.get(FDCStockID1)).get("FNumber"));//发货仓库
map.put("orderProductNumber", listDateMap.get(FOrderBillNo));//订单产品编号
map.put("personCharge",personCharge);//业务员
map.put("saleOrderId", listDateMap.get(FOrderBillNo));//订单产品编号
map.put("orderProductId",listDateMap.get(FOrderEntryID));//订单产品编号
map.put("personCharge", personCharge);//业务员
mapList.add(map);
// returnDate.put(apiName + i, new ArrayList<Map>() {{
// add(map);
......@@ -283,7 +296,8 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
Map map = new HashMap<>();
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
Object personCharge = new Object();
masterFieldVal.put("customerId", listDateMap.get(FSupplyID_FNDName));//客户名称编号
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber", listDateMap.get(FBillNo));//erp编号
......@@ -293,9 +307,12 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
masterFieldVal.put("remarks", listDateMap.get(FExplanation));//备注
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
masterFieldVal.put("delivStorage", listDateMap.get(FDCStockID_DSPName));//发货仓库
if (null == RequestVo.getIncludeDetail() || false == RequestVo.getIncludeDetail()) {
} else if (null != RequestVo.getIncludeDetail() && true == RequestVo.getIncludeDetail()) {
map = getDetail(listDateMap.get(FBillNo).toString(),personCharge);
map = getDetail(listDateMap.get(FBillNo).toString(), personCharge);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -30,12 +30,14 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
* K3金蝶方请求字段
*/
String FCustID = "FCustID";//购货单位
String FCustID_FNDName ="FCustID_FNDName";//
String FCustID_DSPName = "FCustID_DSPName";
// String SJKPRQ80 = "SJKPRQ80";//实际开票日期
String Fdate = "Fdate";//日期
String FBillNo = "FBillNo";//FBillNo
String FHeadSelfI0471 = "FHeadSelfI0471";//出库单编号
String FEmpID = "FEmpID";//业务员
/**
* K3金蝶方请求字段-明细字段
*/
......@@ -43,6 +45,8 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
String Fauxqty = "Fauxqty";//数量
String FAuxPriceDiscount = "FAuxPriceDiscount";//实际含税单价
String FAllAmount = "FAllAmount";//价税合计
String FOrderBillNo="FOrderBillNo";//订单单号
String FOrderEntryID ="FOrderEntryID";//订单分录
public SoSsSalesInvoiceServiceImpl() {
this.Url = "/K3API/Sales_Invoice_VAT/GetList";//拼接用请求地址-(http://127.0.0.1/K3API/Material/GetList?token=${token})
......@@ -130,6 +134,7 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerId",listDateMap.get(FCustID_FNDName));//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
......@@ -152,6 +157,7 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("customerId",listDateMap.get(FCustID_FNDName));//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
......@@ -190,9 +196,12 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
// map.put("ERPSystemNumber",code);//主体唯一
map.put("ERPUniCode", listDateMap.get("FDetailID2"));//子体唯一
map.put("productCode", JSONObject.fromObject(listDateMap.get(FItemID)).get("FNumber"));//产品编码
map.put("productId", JSONObject.fromObject(listDateMap.get(FItemID)).get("FNumber"));//产品编码
map.put("quantity", listDateMap.get(Fauxqty));//数量
map.put("salesUnitPrice", listDateMap.get(FAuxPriceDiscount));//销售单价
map.put("thisInvoicingSubtotal", listDateMap.get(FAllAmount));//本次开票小计
map.put("saleOrderId",listDateMap.get(FOrderBillNo));//销售订单编号
map.put("orderProductId",listDateMap.get(FOrderEntryID));//订单产品编号
map.put("personCharge",personCharge);//业务员
mapList.add(map);
}
......@@ -260,6 +269,7 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("customerId",listDateMap.get(FCustID_FNDName));//客户编号
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论