ims采购入库增加字段

This commit is contained in:
lihao 2025-11-23 09:35:44 +08:00
parent ad1843fd10
commit 17ec2e8964
2 changed files with 13 additions and 5 deletions

View File

@ -67,7 +67,7 @@ public class ErpIaI2billFromGyImsPlugin implements IBackgroundWorkPlugin {
headJson.put("cfanaceorgvid", map.get("cfanaceorgvid"));// 结算财务组织
headJson.put("ccostdomainid", map.get("ccostdomainid"));// 结算成本域
headJson.put("cdptvid", map.get("cdptvid"));// 采购部门
headJson.put("cbizid", map.get("cbizid"));// ²É¹ºÔ±
headJson.put("cbizid", MyHelper.getpsndocId(map.get("cbizid").toString()));// ²É¹ºÔ±
headJson.put("vnote", map.get("vnote"));// 备注
headJson.put("cpurorgoid", map.get("cpurorgoid"));// 采购组织
// 购销类型 2=国内采购;
@ -103,7 +103,6 @@ public class ErpIaI2billFromGyImsPlugin implements IBackgroundWorkPlugin {
bodyJson.put("nnum", body.get("nnum"));// 实收主数量
bodyJson.put("nassistnum", body.get("nassistnum"));// 实收数量
bodyJson.put("vchangerate", "1/1");// 换算率
Object nqtorigprice = body.get("nqtorigprice");// 无税单价
Object nqtorigtaxprice = body.get("nqtorigtaxprice");// 含税单价
bodyJson.put("nqtorignetprice", nqtorigprice);// 无税净价
@ -125,12 +124,13 @@ public class ErpIaI2billFromGyImsPlugin implements IBackgroundWorkPlugin {
bodyJson.put("ntaxmny", body.get("norigtaxmny"));// 本币价税合计
// bodyJson.put("ntaxrate", body.get("ntaxrate"));// 税率
bodyJson.put("vnotebody", body.get("vnotebody"));// 行备注
// bodyJson.put("dbizdate", body.get("dbizdate"));// 行备注
// 入库时间
if (body.get("dbizdate") != null && body.get("dbizdate") instanceof Timestamp dbizdate) {
String creationtimeStr = DATETIME_FORMATTER.format(dbizdate);
headJson.put("dbizdate", creationtimeStr);
bodyJson.put("dbizdate", creationtimeStr);
}else{
bodyJson.put("dbizdate", "2025-12-01 20:42:24");
}
bodyJsonArr.add(bodyJson);
}

View File

@ -220,6 +220,14 @@ public class MyHelper {
}
return Erpuser!=null?Erpuser.trim():"";
}
public static String getpsndocId(String userId) throws DAOException {
String sql = "select pk_psndoc from bd_psndoc where code = '" + userId + "' ";
String Erpuser = (String) dao.executeQuery(sql, new ColumnProcessor());
if(Erpuser == null) {
String bipsql = " select pk_psndoc from bd_psndoc where code = '1004170009' and dr = 0";
Erpuser = (String) dao.executeQuery(bipsql, new ColumnProcessor());
}
return Erpuser!=null?Erpuser.trim():"";
}
}