销售订单去掉非必要字段
This commit is contained in:
parent
3b01c5201c
commit
09b64eaecd
|
@ -14,20 +14,20 @@ import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 销售订单接口适配2005代码
|
* 销售订单接口适配2005代码
|
||||||
* zhangxinah
|
* zhangxinah
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* openapi参数解析工具类
|
* openapi参数解析工具类
|
||||||
*
|
*
|
||||||
* @author Administrator
|
* @author Administrator
|
||||||
*/
|
*/
|
||||||
public class OpenAPIParaUtil {
|
public class OpenAPIParaUtil {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* json转VO
|
* json转VO
|
||||||
*
|
*
|
||||||
* @param paramList
|
* @param paramList
|
||||||
* @param headtable
|
* @param headtable
|
||||||
|
@ -38,14 +38,14 @@ public class OpenAPIParaUtil {
|
||||||
List<SaleOrderVO> aggVOList = new ArrayList<SaleOrderVO>();
|
List<SaleOrderVO> aggVOList = new ArrayList<SaleOrderVO>();
|
||||||
for (Map<String, Object> map : paramList) {
|
for (Map<String, Object> map : paramList) {
|
||||||
if (!map.containsKey(headtable) || !map.containsKey(bodytable)) {
|
if (!map.containsKey(headtable) || !map.containsKey(bodytable)) {
|
||||||
ExceptionUtils.wrappBusinessException("传入数据异常,参数要包含表头信息和表体信息");
|
ExceptionUtils.wrappBusinessException("传入数据异常,参数要包含表头信息和表体信息");
|
||||||
}
|
}
|
||||||
Map<String, String> headInfo = (Map<String, String>) map.get(headtable);
|
Map<String, String> headInfo = (Map<String, String>) map.get(headtable);
|
||||||
List<Map<String, String>> bodyInfo = (List<Map<String, String>>) map.get(bodytable);
|
List<Map<String, String>> bodyInfo = (List<Map<String, String>>) map.get(bodytable);
|
||||||
|
|
||||||
SaleOrderVO aggvo = new SaleOrderVO();
|
SaleOrderVO aggvo = new SaleOrderVO();
|
||||||
SaleOrderHVO hvo = new SaleOrderHVO();
|
SaleOrderHVO hvo = new SaleOrderHVO();
|
||||||
// 首先设置集团
|
// 首先设置集团
|
||||||
hvo.setAttributeValue(SaleOrderHVO.PK_GROUP, AppContext.getInstance().getPkGroup());
|
hvo.setAttributeValue(SaleOrderHVO.PK_GROUP, AppContext.getInstance().getPkGroup());
|
||||||
hvo.setStatus(VOStatus.NEW);
|
hvo.setStatus(VOStatus.NEW);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public class SaleOrderResource extends NCCPubRestResource {
|
||||||
headdata.put("dmakedate", headdata.get("dbilldate"));
|
headdata.put("dmakedate", headdata.get("dbilldate"));
|
||||||
headdata.put("dmakedate", headdata.get("dbilldate"));
|
headdata.put("dmakedate", headdata.get("dbilldate"));
|
||||||
headdata.put("cinvoicecustid", headdata.get("ccustomerid"));
|
headdata.put("cinvoicecustid", headdata.get("ccustomerid"));
|
||||||
|
headdata.put("ccustomervid", headdata.get("ccustomerid"));
|
||||||
String pk_group = AppContext.getInstance().getPkGroup();
|
String pk_group = AppContext.getInstance().getPkGroup();
|
||||||
headdata.put("pk_group", pk_group);
|
headdata.put("pk_group", pk_group);
|
||||||
List<Object> bodyArr = (List<Object>) map.get(BODYTABLE);
|
List<Object> bodyArr = (List<Object>) map.get(BODYTABLE);
|
||||||
|
@ -111,9 +111,9 @@ public class SaleOrderResource extends NCCPubRestResource {
|
||||||
Map<String, Object> bodydata = (Map<String, Object>) body;
|
Map<String, Object> bodydata = (Map<String, Object>) body;
|
||||||
bodydata.put("pk_group", pk_group);
|
bodydata.put("pk_group", pk_group);
|
||||||
bodydata.put("cprojectid", headdata.get("vdef6"));
|
bodydata.put("cprojectid", headdata.get("vdef6"));
|
||||||
bodydata.put("ctrafficorgvid", headdata.get("pk_org_v"));
|
//bodydata.put("ctrafficorgvid", headdata.get("pk_org_v"));
|
||||||
bodydata.put("csendstockorgvid", headdata.get("pk_org_v"));
|
bodydata.put("csendstockorgvid", headdata.get("pk_org_v"));
|
||||||
bodydata.put("csendstordocid", headdata.get("pk_org_v"));
|
//bodydata.put("csendstordocid", headdata.get("pk_org_v"));
|
||||||
bodydata.put("csendstockorgid", headdata.get("pk_org_v"));
|
bodydata.put("csendstockorgid", headdata.get("pk_org_v"));
|
||||||
bodydata.put("carorgid", headdata.get("pk_org_v"));
|
bodydata.put("carorgid", headdata.get("pk_org_v"));
|
||||||
bodydata.put("carorgvid", headdata.get("pk_org_v"));
|
bodydata.put("carorgvid", headdata.get("pk_org_v"));
|
||||||
|
@ -311,7 +311,9 @@ public class SaleOrderResource extends NCCPubRestResource {
|
||||||
|
|
||||||
bodydata.put("nqtunitnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum"))
|
bodydata.put("nqtunitnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum"))
|
||||||
.div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0])));
|
.div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0])));
|
||||||
|
|
||||||
|
bodydata.put("nastnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum"))
|
||||||
|
.div(BFPubTools.getUFDouble_NullAsZero(map.get("measrate").toString().split("/")[0])));
|
||||||
sql = "select sl.pk_taxcode from bd_taxrate sl inner join bd_taxcode sm on sl.pk_taxcode=sm.pk_taxcode where sl.taxrate="
|
sql = "select sl.pk_taxcode from bd_taxrate sl inner join bd_taxcode sm on sl.pk_taxcode=sm.pk_taxcode where sl.taxrate="
|
||||||
+ bodydata.get("ntaxrate") + " and sm.pk_group<>'~' " + "";
|
+ bodydata.get("ntaxrate") + " and sm.pk_group<>'~' " + "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue