数量为0不传

This commit is contained in:
xiangerlin 2025-07-08 12:15:25 +08:00
parent 83e1e8489b
commit d7ee4c32aa
1 changed files with 30 additions and 28 deletions

View File

@ -219,34 +219,36 @@ public class RequisitionOrderPluginServiceImpl implements IRequisitionOrderPlugi
String field0020 = forson.getString("field0020"); String field0020 = forson.getString("field0020");
String field0040 = forson.getString("field0040"); String field0040 = forson.getString("field0040");
String nnum = StrUtil.isNotEmpty(field0040) ? field0040 : field0020; String nnum = StrUtil.isNotEmpty(field0040) ? field0040 : field0020;
JSONObject praybillB = new JSONObject(); if (!"0".equals(nnum)){
praybillB.put("crowno",forson.getString("field0014")); JSONObject praybillB = new JSONObject();
praybillB.put("nnum",nnum); praybillB.put("crowno",forson.getString("field0014"));
praybillB.put("pk_org",pk_org); praybillB.put("nnum",nnum);
praybillB.put("pk_org_v",pk_org_v); praybillB.put("pk_org",pk_org);
praybillB.put("vchangerate","1"); praybillB.put("pk_org_v",pk_org_v);
praybillB.put("pk_srcmaterial",forson.getString("field0054"));//物料pk带版本的那个 praybillB.put("vchangerate","1");
praybillB.put("pk_material",forson.getString("field0031"));//物料pk praybillB.put("pk_srcmaterial",forson.getString("field0054"));//物料pk带版本的那个
praybillB.put("castunitid",forson.getString("field0055"));//计量单位pk praybillB.put("pk_material",forson.getString("field0031"));//物料pk
praybillB.put("cunitid",forson.getString("field0055"));//计量单位pk praybillB.put("castunitid",forson.getString("field0055"));//计量单位pk
praybillB.put("nastnum",nnum);//数量 praybillB.put("cunitid",forson.getString("field0055"));//计量单位pk
praybillB.put("dreqdate",formatDate(forson.getString("field0021")));//需求日期 praybillB.put("nastnum",nnum);//数量
praybillB.put("dsuggestdate",formatDate(forson.getString("field0022")));//建议订货日期 praybillB.put("dreqdate",formatDate(forson.getString("field0021")));//需求日期
praybillB.put("pk_purchaseorg",pk_org);//采购组织 praybillB.put("dsuggestdate",formatDate(forson.getString("field0022")));//建议订货日期
praybillB.put("pk_purchaseorg_v",pk_org_v);//采购组织 带版本的那个 praybillB.put("pk_purchaseorg",pk_org);//采购组织
//建议供应商不传了张文康确认的传过去生成订单的时候会自动分单 praybillB.put("pk_purchaseorg_v",pk_org_v);//采购组织 带版本的那个
//praybillB.put("pk_suggestsupplier",forson.getString("field0056"));//建议供应商 //建议供应商不传了张文康确认的传过去生成订单的时候会自动分单
//praybillB.put("pk_suggestsupplier_v",forson.getString("field0056"));//建议供应商 //praybillB.put("pk_suggestsupplier",forson.getString("field0056"));//建议供应商
praybillB.put("pk_reqstoorg",pk_org); //praybillB.put("pk_suggestsupplier_v",forson.getString("field0056"));//建议供应商
praybillB.put("pk_reqstoorg_v",pk_org_v); praybillB.put("pk_reqstoorg",pk_org);
praybillB.put("pk_group", formmainData.getString("field0058")); praybillB.put("pk_reqstoorg_v",pk_org_v);
praybillB.put("browclose","N");//行关闭 praybillB.put("pk_group", formmainData.getString("field0058"));
praybillB.put("vbmemo",forson.getString("field0066"));//备注 praybillB.put("browclose","N");//行关闭
praybillB.put("vbdef1",forson.getString("field0032"));//现存量 praybillB.put("vbmemo",forson.getString("field0066"));//备注
praybillB.put("vbdef2",forson.getString("field0033"));//在途量 praybillB.put("vbdef1",forson.getString("field0032"));//现存量
praybillB.put("vbdef3",forson.getString("field0035"));//月度消耗 praybillB.put("vbdef2",forson.getString("field0033"));//在途量
praybillB.put("vbdef4",forson.getString("field0034"));//安全库存 praybillB.put("vbdef3",forson.getString("field0035"));//月度消耗
parybillList.add(praybillB); praybillB.put("vbdef4",forson.getString("field0034"));//安全库存
parybillList.add(praybillB);
}
} }
//调用NCC接口 //调用NCC接口
JSONArray reqParams = new JSONArray(); JSONArray reqParams = new JSONArray();