销售订单去掉非必要字段
This commit is contained in:
parent
3b01c5201c
commit
09b64eaecd
|
@ -14,20 +14,20 @@ import java.util.Map;
|
|||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* 销售订单接口适配2005代码
|
||||
* 销售订单接口适配2005代码
|
||||
* zhangxinah
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* openapi参数解析工具类
|
||||
* openapi参数解析工具类
|
||||
*
|
||||
* @author Administrator
|
||||
*/
|
||||
public class OpenAPIParaUtil {
|
||||
|
||||
/**
|
||||
* json转VO
|
||||
* json转VO
|
||||
*
|
||||
* @param paramList
|
||||
* @param headtable
|
||||
|
@ -38,14 +38,14 @@ public class OpenAPIParaUtil {
|
|||
List<SaleOrderVO> aggVOList = new ArrayList<SaleOrderVO>();
|
||||
for (Map<String, Object> map : paramList) {
|
||||
if (!map.containsKey(headtable) || !map.containsKey(bodytable)) {
|
||||
ExceptionUtils.wrappBusinessException("传入数据异常,参数要包含表头信息和表体信息");
|
||||
ExceptionUtils.wrappBusinessException("传入数据异常,参数要包含表头信息和表体信息");
|
||||
}
|
||||
Map<String, String> headInfo = (Map<String, String>) map.get(headtable);
|
||||
List<Map<String, String>> bodyInfo = (List<Map<String, String>>) map.get(bodytable);
|
||||
|
||||
SaleOrderVO aggvo = new SaleOrderVO();
|
||||
SaleOrderHVO hvo = new SaleOrderHVO();
|
||||
// 首先设置集团
|
||||
// 首先设置集团
|
||||
hvo.setAttributeValue(SaleOrderHVO.PK_GROUP, AppContext.getInstance().getPkGroup());
|
||||
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("cinvoicecustid", headdata.get("ccustomerid"));
|
||||
|
||||
headdata.put("ccustomervid", headdata.get("ccustomerid"));
|
||||
String pk_group = AppContext.getInstance().getPkGroup();
|
||||
headdata.put("pk_group", pk_group);
|
||||
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;
|
||||
bodydata.put("pk_group", pk_group);
|
||||
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("csendstordocid", headdata.get("pk_org_v"));
|
||||
//bodydata.put("csendstordocid", headdata.get("pk_org_v"));
|
||||
bodydata.put("csendstockorgid", headdata.get("pk_org_v"));
|
||||
bodydata.put("carorgid", headdata.get("pk_org_v"));
|
||||
bodydata.put("carorgvid", headdata.get("pk_org_v"));
|
||||
|
@ -312,6 +312,8 @@ public class SaleOrderResource extends NCCPubRestResource {
|
|||
bodydata.put("nqtunitnum", BFPubTools.getUFDouble_NullAsZero(bodydata.get("nnum"))
|
||||
.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="
|
||||
+ bodydata.get("ntaxrate") + " and sm.pk_group<>'~' " + "";
|
||||
|
||||
|
|
Loading…
Reference in New Issue