sap推送接口修改2
This commit is contained in:
parent
ff54d71d1e
commit
c692f40d34
|
|
@ -147,9 +147,7 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
|||
String companyCode = prinfo.getString("org.number");
|
||||
//添加公司
|
||||
iteminfo.put("BUKRS", companyCode);
|
||||
String shjh_pzh = prinfo.getString("shjh_sappzh");
|
||||
//添加会计凭证编号
|
||||
iteminfo.put("BELNR", shjh_pzh);
|
||||
|
||||
// String shjh_year = prinfo.getString("shjh_sapyear");
|
||||
// //添加会计年度
|
||||
// iteminfo.put("GJAHR", shjh_year);
|
||||
|
|
@ -166,7 +164,7 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
|||
//添加反清账日期
|
||||
long batchnoid = prinfo.getLong("batchnoid");
|
||||
if (batchnoid!=0L){
|
||||
Date date = this.getSourceDate(batchnoid);
|
||||
Date date = this.getSourceDate(batchnoid,iteminfo);
|
||||
if (date!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String datestr = sdf.format(date);
|
||||
|
|
@ -183,12 +181,15 @@ public class DepositpreintSapOperation extends AbstractOperationServicePlugIn im
|
|||
return sapReturnData;
|
||||
}
|
||||
|
||||
private Date getSourceDate(long batchnoid) {
|
||||
private Date getSourceDate(long batchnoid,JSONObject iteminfo) {
|
||||
//联查蓝单
|
||||
QFilter qFilter = new QFilter("batchnoid", QCP.equals, batchnoid);//批次id
|
||||
qFilter.and("operatetype",QCP.equals,"preint");//操作类别
|
||||
DynamicObject depositprein = BusinessDataServiceHelper.loadSingle("cim_depositpreint", qFilter.toArray());
|
||||
if (depositprein!=null){
|
||||
String shjh_pzh = depositprein.getString("shjh_sappzh");
|
||||
//添加会计凭证编号
|
||||
iteminfo.put("BELNR", shjh_pzh);
|
||||
Date bizDate=depositprein.getDate("businessdate");
|
||||
if (bizDate != null) {
|
||||
// 使用Calendar增加一个月
|
||||
|
|
|
|||
|
|
@ -147,9 +147,7 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
|||
String companyCode = prinfo.getString("org.number");
|
||||
//添加公司
|
||||
iteminfo.put("BUKRS", companyCode);
|
||||
String shjh_pzh = prinfo.getString("shjh_sappzh");
|
||||
//添加会计凭证编号
|
||||
iteminfo.put("BELNR", shjh_pzh);
|
||||
|
||||
// String shjh_year = prinfo.getString("shjh_sapyear");
|
||||
// //添加会计年度
|
||||
// iteminfo.put("GJAHR", shjh_year);
|
||||
|
|
@ -166,7 +164,7 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
|||
//添加反清账日期
|
||||
String writeoffbillno = prinfo.getString("billno");//单据号
|
||||
if (writeoffbillno!=null){
|
||||
Date date = this.getSourceDate(writeoffbillno);
|
||||
Date date = this.getSourceDate(writeoffbillno,iteminfo);
|
||||
if (date!=null){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String datestr = sdf.format(date);
|
||||
|
|
@ -190,11 +188,14 @@ public class RevenueBillOperation extends AbstractOperationServicePlugIn impleme
|
|||
return sapReturnData;
|
||||
}
|
||||
|
||||
private Date getSourceDate(String writeoffbillno) {
|
||||
private Date getSourceDate(String writeoffbillno,JSONObject iteminfo) {
|
||||
//联查蓝单
|
||||
QFilter qFilter = new QFilter("writeoffbillno", QCP.equals, writeoffbillno);
|
||||
DynamicObject intBillRevenue = BusinessDataServiceHelper.loadSingle("cim_intbill_revenue", qFilter.toArray());
|
||||
if (intBillRevenue!=null){
|
||||
String shjh_pzh =intBillRevenue.getString("shjh_sappzh");
|
||||
//添加会计凭证编号
|
||||
iteminfo.put("BELNR", shjh_pzh);
|
||||
Date bizDate=intBillRevenue.getDate("bizdate");
|
||||
if (bizDate != null) {
|
||||
// 使用Calendar增加一个月
|
||||
|
|
|
|||
Loading…
Reference in New Issue