提交 24470de9 authored 作者: 李炎's avatar 李炎

新增业务员字段

上级 35526fb3
......@@ -101,7 +101,7 @@ public class WebApi {
if (null == soSsCreateVo.getObjAPIName()) {
return Result.fail("操作失败", "objAPIName不可为空", "500");
} else if (soSsCreateVo.getObjAPIName().equals(customerService.apiName)) {
result = customerService.setData(soSsCreateVo);//产品
result = customerService.setData(soSsCreateVo);//客户
} else {
return Result.fail("操作失败", soSsCreateVo.getObjAPIName() + "不存在", "406");
}
......
......@@ -35,6 +35,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
String FDate = "FDate";//单据日期
String FBillNo = "FBillNo";
String FNumber = "FNumber";
String FEmployee = "FEmployee";//业务员
/**
* K3金蝶方请求字段-明细字段
*/
......@@ -44,7 +45,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
public SoSsReceiptServiceImpl() {
this.Url = "/K3API/Bill1000005/GetList";//拼接用请求地址-(http://127.0.0.1/K3API/Material/GetList?token=${token})
this.includeDetailUrl = "/K3API/Bill1000005/GetDetail";
this.fields = "Fcustomer,FAmountFor,FDate";//需要查询出的字段
this.fields = "FEmployee,Fcustomer,FAmountFor,FDate";//需要查询出的字段
}
@Override
......@@ -120,8 +121,8 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
String setFilter(SoSsRequestVo soSsRequestVo) {
String startTime = StringUtil.TimeStamp2Date(soSsRequestVo.getStartTime(), null);
String endTime = StringUtil.TimeStamp2Date(soSsRequestVo.getEndTime(), null);
return "[" + FDate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + FDate + "] < '" + "2021-08-12 00:00:00" + "'";
// return "[" + FDate + "] >= '" + startTime + "' and [" + FDate + "] < '" + endTime + "'";
// return "[" + FDate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + FDate + "] < '" + "2021-08-12 00:00:00" + "'";
return "[" + FDate + "] >= '" + startTime + "' and [" + FDate + "] < '" + endTime + "'";
}
List includeDetailFalse(List list) {
......@@ -135,6 +136,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
masterFieldVal.put("personCharge", listDateMap.get(FEmployee+"_FNDName"));//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......@@ -151,20 +153,23 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("ERPSystemNumber", listDateMap.get(FNumber));//编号
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
personCharge = listDateMap.get(FEmployee + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FNumber).toString()));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FNumber).toString(),personCharge));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code) {//获取明细并且转换为需要的格式
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -187,6 +192,7 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
map.put("ERPUniCode", code + "_" + listDateMap.get("FIndex3"));//字体唯一
map.put("salesOrderNo", listDateMap.get(FEntryOrderNo));//销售订单编号
map.put("currentRemittanceAmount", listDateMap.get(FSettleAmountFor_3));//本次汇款金额
map.put("personCharge",personCharge);//业务员
mapList.add(map);
// returnDate.put(apiName + i, new ArrayList<Map>() {{
// add(map);
......@@ -253,14 +259,16 @@ public class SoSsReceiptServiceImpl implements SoSsReceiptService {
Map map = new HashMap<>();
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("ERPSystemNumber", listDateMap.get(FNumber));//编号
masterFieldVal.put("customerName", listDateMap.get(FCustomer_DSPName));//客户名称
masterFieldVal.put("MSBsTotalAmount", listDateMap.get(FAmountFor));//本次回款总金额
masterFieldVal.put("MSBsDate", listDateMap.get(FDate));//回款日期
personCharge = listDateMap.get(FEmployee + "_FNDName");
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());
map = getDetail(listDateMap.get(FNumber).toString(),personCharge);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -37,6 +37,7 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
String FHeadSelfB0159 = "FHeadSelfB0159";//物流公司
String FHeadSelfB0157 = "FHeadSelfB0157";//物流单号
String FExplanation = "FExplanation";//摘要
String FEmpID="FEmpID";//业务员
/**
* K3金蝶方请求字段-明细字段
*/
......@@ -55,7 +56,7 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
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 = "FSupplyID,FHeadSelfB0162,FHeadSelfB0173,FHeadSelfB0159,FExplanation";//需要查询出的字段
this.fields = "FEmpID,FSupplyID,FHeadSelfB0162,FHeadSelfB0173,FHeadSelfB0159,FExplanation";//需要查询出的字段
}
@Override
......@@ -126,8 +127,8 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
String startTime = StringUtil.TimeStamp2Date(soSsRequestVo.getStartTime(), null);
String endTime = StringUtil.TimeStamp2Date(soSsRequestVo.getEndTime(), null);
return "[" + Fdate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + Fdate + "] < '" + "2021-08-12 00:00:00" + "'";
// return "[" + Fdate + "] >= '" + startTime + "' and [" + Fdate + "] < '" + endTime + "'";
// return "[" + Fdate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + Fdate + "] < '" + "2021-08-12 00:00:00" + "'";
return "[" + Fdate + "] >= '" + startTime + "' and [" + Fdate + "] < '" + endTime + "'";
}
List includeDetailFalse(List list) {
......@@ -138,11 +139,12 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber", StringUtil.randomNumber() + 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));//备注
masterFieldVal.put("personCharge", listDateMap.get(FEmpID+"_FNDName"));//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......@@ -158,23 +160,25 @@ 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();
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber",StringUtil.randomNumber() + 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);//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString()));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString(),personCharge));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code) {//获取明细并且转换为需要的格式
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -209,6 +213,7 @@ 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);//业务员
mapList.add(map);
// returnDate.put(apiName + i, new ArrayList<Map>() {{
// add(map);
......@@ -275,6 +280,7 @@ 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();
masterFieldVal.put("customerName", listDateMap.get(FSupplyID_DSPName));//客户名称
masterFieldVal.put("customerAddress", listDateMap.get(FHeadSelfB0162));//客户地址
masterFieldVal.put("erpNumber", listDateMap.get(FBillNo));//erp编号
......@@ -282,10 +288,11 @@ public class SoSsSalesDeliveryServiceImpl implements SoSsSalesDeliveryService {
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);//业务员
if (null == RequestVo.getIncludeDetail() || false == RequestVo.getIncludeDetail()) {
} else if (null != RequestVo.getIncludeDetail() && true == RequestVo.getIncludeDetail()) {
map = getDetail(listDateMap.get(FBillNo).toString());
map = getDetail(listDateMap.get(FBillNo).toString(),personCharge);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -30,24 +30,24 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
* K3金蝶方请求字段
*/
String FCustID = "FCustID";//购货单位
String FCustID_DSPName="FCustID_DSPName";
String SJKPRQ80 = "SJKPRQ80";//实际开票日期
String FCustID_DSPName = "FCustID_DSPName";
// String SJKPRQ80 = "SJKPRQ80";//实际开票日期
String Fdate = "Fdate";//日期
String FBillNo = "FBillNo";//FBillNo
String FHeadSelfI0471 = "FHeadSelfI0471";//出库单编号
String FEmpID = "FEmpID";//业务员
/**
* K3金蝶方请求字段-明细字段
*/
String FItemID = "FItemID";//产品代码
String Fauxqty = "Fauxqty";//数量
String FAuxPriceDiscount="FAuxPriceDiscount";//实际含税单价
String FAllAmount="FAllAmount";//价税合计
String FAuxPriceDiscount = "FAuxPriceDiscount";//实际含税单价
String FAllAmount = "FAllAmount";//价税合计
public SoSsSalesInvoiceServiceImpl() {
this.Url = "/K3API/Sales_Invoice_VAT/GetList";//拼接用请求地址-(http://127.0.0.1/K3API/Material/GetList?token=${token})
this.includeDetailUrl = "/K3API/Sales_Invoice_VAT/GetDetail";
this.fields = "FCustID,SJKPRQ80,FHeadSelfI0471";//需要查询出的字段
this.fields = "FEmpID,FCustID,SJKPRQ80,FHeadSelfI0471";//需要查询出的字段
}
@Override
......@@ -95,7 +95,7 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
public Map changeGeta(SoSsRequestVo soSsRequestVo) {
Map paramsMap = new HashMap();
Map Data = new LinkedHashMap();
Data.put("Top", soSsRequestVo.getLimit()*soSsRequestVo.getOffset());//返回行数
Data.put("Top", soSsRequestVo.getLimit() * soSsRequestVo.getOffset());//返回行数
Data.put("PageSize", soSsRequestVo.getLimit());//每页行数
Data.put("PageIndex", soSsRequestVo.getOffset());//第几页
if (checkFilter(soSsRequestVo)) {
......@@ -120,8 +120,8 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
String setFilter(SoSsRequestVo soSsRequestVo) {
String startTime = StringUtil.TimeStamp2Date(soSsRequestVo.getStartTime(), null);
String endTime = StringUtil.TimeStamp2Date(soSsRequestVo.getEndTime(), null);
return "[" + SJKPRQ80 + "] >= '" + "2016-01-02 00:00:00" + "' and [" + SJKPRQ80 + "] < '" + "2021-08-12 00:00:00" + "'";
// return "[" + SJKPRQ80 + "] >= '" + startTime + "' and [" + SJKPRQ80 + "] < '" + endTime + "'";
// return "[" + Fdate + "] >= '" + "2021-08-01 00:00:00" + "' and [" + Fdate + "] < '" + "2021-12-31 00:00:00" + "'";
return "[" + Fdate + "] >= '" + startTime + "' and [" + Fdate + "] < '" + endTime + "'";
}
List includeDetailFalse(List list) {
......@@ -131,14 +131,15 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(SJKPRQ80));//开票日期
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
masterFieldVal.put("invoiceNumber",StringUtil.randomNumber() + listDateMap.get(FBillNo));//发票号码
masterFieldVal.put("invoiceNumber", listDateMap.get(FBillNo));//发票号码
masterFieldVal.put("shipmentNo", listDateMap.get(FHeadSelfI0471));//发货单号
masterFieldVal.put("personCharge", listDateMap.get(FEmpID+"_FNDName"));//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals",new HashMap<>());
masterField.put("detailFieldVals", new HashMap<>());
dataList.add(masterField);
}
return dataList;
......@@ -150,21 +151,24 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(SJKPRQ80));//开票日期
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
masterFieldVal.put("invoiceNumber", StringUtil.randomNumber() + listDateMap.get(FBillNo));//发票号码
masterFieldVal.put("invoiceNumber", listDateMap.get(FBillNo));//发票号码
masterFieldVal.put("shipmentNo", listDateMap.get(FHeadSelfI0471));//发货单号
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString()));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString(),personCharge));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code) {//获取明细并且转换为需要的格式
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -182,20 +186,21 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
List<Map> mapList = new ArrayList<>();
for (Object o : list) {
Map listDateMap = JSON.parseObject(o.toString(), Map.class);
Map<String,Object> map = new LinkedHashMap();
Map<String, Object> map = new LinkedHashMap();
// map.put("ERPSystemNumber",code);//主体唯一
map.put("ERPUniCode", listDateMap.get("FDetailID2"));//子体唯一
map.put("productCode", 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("personCharge",personCharge);//业务员
mapList.add(map);
}
returnDate.put("InvoiceDetail", mapList);
} else {
Map<String,Object> map = new LinkedHashMap();
map.put("message",soSsResponseDate.getMessage());
map.put("data",soSsResponseDate.getData());
Map<String, Object> map = new LinkedHashMap();
map.put("message", soSsResponseDate.getMessage());
map.put("data", soSsResponseDate.getData());
returnDate.put("error", new ArrayList<Map>() {{
add(map);
}});
......@@ -251,15 +256,18 @@ public class SoSsSalesInvoiceServiceImpl implements SoSsSalesInvoiceService {
Map map = new HashMap<>();
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
Object personCharge=new Object();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("billingDate", listDateMap.get(SJKPRQ80));//开票日期
masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
// masterFieldVal.put("billingDate", listDateMap.get(Fdate));//开票日期
masterFieldVal.put("invoiceNumber", listDateMap.get(FBillNo));//发票号码
masterFieldVal.put("shipmentNo", listDateMap.get(FHeadSelfI0471));//发货单号
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
if (null == RequestVo.getIncludeDetail() || false == RequestVo.getIncludeDetail()) {
} else if (null != RequestVo.getIncludeDetail() && true == RequestVo.getIncludeDetail()) {
map = getDetail(listDateMap.get(FBillNo).toString());
map = getDetail(listDateMap.get(FBillNo).toString(),personCharge);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -48,11 +48,12 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
String FUnitID = "FUnitID";//单位
String FAuxPriceDiscount = "FAuxPriceDiscount";//实际含税单价
String FAllAmount = "FAllAmount";//价税合计
String FEmpID="FEmpID";//业务员
public SoSsSalesOrderServiceImpl() {
this.Url = "/K3API/SO/GetList";//拼接用请求地址-(http://127.0.0.1/K3API/Material/GetList?token=${token})
this.includeDetailUrl = "/K3API/SO/GetDetail";
this.fields = "FHeadSelfS0166,FHeadSelfS0157,Fdate";//需要查询出的字段
this.fields = "FEmpID,FHeadSelfS0166,FHeadSelfS0157,Fdate";//需要查询出的字段
}
@Override
......@@ -123,8 +124,8 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
String setFilter(SoSsRequestVo soSsRequestVo) {
String startTime = StringUtil.TimeStamp2Date(soSsRequestVo.getStartTime(), null);
String endTime = StringUtil.TimeStamp2Date(soSsRequestVo.getEndTime(), null);
return "[" + Fdate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + Fdate + "] < '" + "2021-08-12 00:00:00" + "'";
// return "[" + Fdate + "] >= '" + startTime + "' and [" + Fdate + "] < '" + endTime + "'";
// return "[" + Fdate + "] >= '" + "2016-01-02 00:00:00" + "' and [" + Fdate + "] < '" + "2021-08-12 00:00:00" + "'";
return "[" + Fdate + "] >= '" + startTime + "' and [" + Fdate + "] < '" + endTime + "'";
}
List includeDetailFalse(List list) {
......@@ -135,9 +136,10 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("salesOrderAmount", listDateMap.get(FHeadSelfS0166));//销售订单金额
masterFieldVal.put("erpSystemNumber", StringUtil.randomNumber() + listDateMap.get(FBillNo));//erp系统编号
masterFieldVal.put("erpSystemNumber", listDateMap.get(FBillNo));//erp系统编号
masterFieldVal.put("customerOrderNumber", listDateMap.get(FHeadSelfS0157));//客户订单编号
masterFieldVal.put("orderDate", listDateMap.get(Fdate));//下单日期
masterFieldVal.put("personCharge", listDateMap.get(FEmpID+"_FNDName"));//业务员
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......@@ -150,22 +152,25 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
List includeDetailTrue(List list) {
List dataList = new ArrayList<>();
for (Object o : list) {
Object personCharge=new Object();
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterField = new LinkedHashMap<>();
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
masterFieldVal.put("salesOrderAmount", listDateMap.get(FHeadSelfS0166));//销售订单金额
masterFieldVal.put("erpSystemNumber", StringUtil.randomNumber() + listDateMap.get(FBillNo));//erp系统编号
masterFieldVal.put("erpSystemNumber", listDateMap.get(FBillNo));//erp系统编号
masterFieldVal.put("customerOrderNumber", listDateMap.get(FHeadSelfS0157));//客户订单编号
masterFieldVal.put("orderDate", listDateMap.get(Fdate));//下单日期
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
masterField.put("masterFieldVal", masterFieldVal);
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString()));
masterField.put("detailFieldVals", getDetail(listDateMap.get(FBillNo).toString(),personCharge));
dataList.add(masterField);
}
return dataList;
}
Map getDetail(String code) {//获取明细并且转换为需要的格式
Map getDetail(String code,Object personCharge) {//获取明细并且转换为需要的格式
Map returnDate = new LinkedHashMap();
Map paramsMap = new HashMap();
Map requestData = new HashMap();
......@@ -195,6 +200,7 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
map.put("companyNumber", JSONObject.fromObject(listDateMap.get(FUnitID)).get("FName"));//单位
map.put("actualUnitPriceIncludingTax", listDateMap.get(FAuxPriceDiscount));//实际含税单价
map.put("totalPriceAndTax", listDateMap.get(FAllAmount));//价税合计
map.put("personCharge",personCharge);//业务员
mapList.add(map);
// returnDate.put(apiName + i, new ArrayList<Map>() {{
// add(map);
......@@ -259,6 +265,7 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
List list = JSON.parseObject(data1.toString(), List.class, Feature.OrderedField);
for (Object o : list) {
Map map = new HashMap<>();
Object personCharge=new Object();
Map listDateMap = JSON.parseObject(o.toString(), Map.class, Feature.OrderedField);
Map masterFieldVal = new LinkedHashMap<>();
masterFieldVal.put("customerName", listDateMap.get(FCustID_DSPName));//客户名称
......@@ -266,10 +273,13 @@ public class SoSsSalesOrderServiceImpl implements SoSsSalesOrderService {
masterFieldVal.put("erpSystemNumber", listDateMap.get(FBillNo));//erp系统编号
masterFieldVal.put("customerOrderNumber", listDateMap.get(FHeadSelfS0157));//客户订单编号
masterFieldVal.put("orderDate", listDateMap.get(Fdate));//下单日期
personCharge = listDateMap.get(FEmpID + "_FNDName");
masterFieldVal.put("personCharge", personCharge);//业务员
if (null == RequestVo.getIncludeDetail() || false == RequestVo.getIncludeDetail()) {
} else if (null != RequestVo.getIncludeDetail() && true == RequestVo.getIncludeDetail()) {
map = getDetail(listDateMap.get(FBillNo).toString());
map = getDetail(listDateMap.get(FBillNo).toString(),personCharge);
}
masterField.put("objAPIName", apiName);
masterField.put("masterFieldVal", masterFieldVal);
......
......@@ -40,7 +40,7 @@ public class StringUtil {
return date;
}
public static String randomNumber() {
return RandomUtil.randomString(BASE_CHECK_CODES, 7);
}
// public static String randomNumber() {
// return RandomUtil.randomString(BASE_CHECK_CODES, 7);
// }
}
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论