|
|
@ -44,8 +44,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
* @Description:从金蝶ERP同步供应商信息
|
|
|
|
* @Description:从金蝶ERP同步供应商信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int syncSupplierInfoFromErp(int startRow) throws Exception {
|
|
|
|
public int syncSupplierInfoFromErp(int startRow, ErpSyncInfoVo erpSyncInfoVo) throws Exception {
|
|
|
|
String maxErpModifyDate = mesBaseSupplierInfoMapper.selectMaxErpModifyDate();
|
|
|
|
String maxErpModifyDate = StringUtils.isEmpty(erpSyncInfoVo.getMaxErpModifyDate()) ?
|
|
|
|
|
|
|
|
mesBaseSupplierInfoMapper.selectMaxErpModifyDate() : erpSyncInfoVo.getMaxErpModifyDate();
|
|
|
|
return syncSupplierInfoFromErp(startRow, maxErpModifyDate);
|
|
|
|
return syncSupplierInfoFromErp(startRow, maxErpModifyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -326,8 +327,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
* @Descrption:从金蝶ERP同步销售订单
|
|
|
|
* @Descrption:从金蝶ERP同步销售订单
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int syncSaleOrderFromErp(int startRow) throws Exception {
|
|
|
|
public int syncSaleOrderFromErp(int startRow, ErpSyncInfoVo erpSyncInfoVo) throws Exception {
|
|
|
|
String maxErpModifyDate = mesSaleOrderMapper.selectMaxErpModifyDate();
|
|
|
|
String maxErpModifyDate = StringUtils.isEmpty(erpSyncInfoVo.getMaxErpModifyDate())?
|
|
|
|
|
|
|
|
mesSaleOrderMapper.selectMaxErpModifyDate():erpSyncInfoVo.getMaxErpModifyDate();
|
|
|
|
return syncSaleOrderFromErp(startRow, maxErpModifyDate);
|
|
|
|
return syncSaleOrderFromErp(startRow, maxErpModifyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -351,7 +353,7 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject queryJson = new JSONObject();
|
|
|
|
JSONObject queryJson = new JSONObject();
|
|
|
|
String formId = "SAL_SaleOrder";
|
|
|
|
String formId = "SAL_SaleOrder";
|
|
|
|
String fieldKeys = "FID,FBillNo,FApproveDate,FSaleOrderEntry_FEntryID,FMaterialId,FMaterialId.FNumber,FMaterialName,FDocumentStatus," +
|
|
|
|
String fieldKeys = "FID,FBillNo,FApproveDate,FSaleOrderEntry_FEntryID,FSaleOrderEntry_FMaterialModel,FMaterialId,FMaterialId.FNumber,FMaterialName,FDocumentStatus," +
|
|
|
|
"FQty,FCreateDate,FModifyDate,FMinPlanDeliveryDate,FAuxPropId,FStockId,FOwnerId,FSaleDeptId,FPrice,FStockOrgId,F_TOND_Base";
|
|
|
|
"FQty,FCreateDate,FModifyDate,FMinPlanDeliveryDate,FAuxPropId,FStockId,FOwnerId,FSaleDeptId,FPrice,FStockOrgId,F_TOND_Base";
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// String filterString = "FNumber='98010102'";
|
|
|
|
// String filterString = "FNumber='98010102'";
|
|
|
@ -398,6 +400,8 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
String approveDate = resultObject.getString("FApproveDate");
|
|
|
|
String approveDate = resultObject.getString("FApproveDate");
|
|
|
|
//订单明细id
|
|
|
|
//订单明细id
|
|
|
|
Long fentyrId = resultObject.getLong("FSaleOrderEntry.FEntryID");
|
|
|
|
Long fentyrId = resultObject.getLong("FSaleOrderEntry.FEntryID");
|
|
|
|
|
|
|
|
//订单明细规格
|
|
|
|
|
|
|
|
String materialModel = resultObject.getString("FSaleOrderEntry.FMaterialModel");
|
|
|
|
//ERP物料id
|
|
|
|
//ERP物料id
|
|
|
|
Long fmaterialId = resultObject.getLong("FMaterialId");
|
|
|
|
Long fmaterialId = resultObject.getLong("FMaterialId");
|
|
|
|
//物料编码
|
|
|
|
//物料编码
|
|
|
@ -430,6 +434,7 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
mesSaleOrder.setErpId(erpId);
|
|
|
|
mesSaleOrder.setErpId(erpId);
|
|
|
|
mesSaleOrder.setSaleorderCode(saleOrderCode);
|
|
|
|
mesSaleOrder.setSaleorderCode(saleOrderCode);
|
|
|
|
mesSaleOrder.setFentryId(fentyrId);
|
|
|
|
mesSaleOrder.setFentryId(fentyrId);
|
|
|
|
|
|
|
|
mesSaleOrder.setMaterialModel(materialModel);
|
|
|
|
mesSaleOrder.setDocumentStatus(documentStatus);
|
|
|
|
mesSaleOrder.setDocumentStatus(documentStatus);
|
|
|
|
//erp物料id
|
|
|
|
//erp物料id
|
|
|
|
mesSaleOrder.setMaterialId(fmaterialId);
|
|
|
|
mesSaleOrder.setMaterialId(fmaterialId);
|
|
|
@ -501,8 +506,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
* @Descrption:从金蝶ERP同步项目信息
|
|
|
|
* @Descrption:从金蝶ERP同步项目信息
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int syncProjectInfoFromErp(int startRow) throws Exception {
|
|
|
|
public int syncProjectInfoFromErp(int startRow, ErpSyncInfoVo erpSyncInfoVo) throws Exception {
|
|
|
|
String maxErpModifyDate = mesProjectInfoMapper.selectMaxErpModifyDate();
|
|
|
|
String maxErpModifyDate = StringUtils.isEmpty(erpSyncInfoVo.getMaxErpModifyDate())?
|
|
|
|
|
|
|
|
mesProjectInfoMapper.selectMaxErpModifyDate(): erpSyncInfoVo.getMaxErpModifyDate();
|
|
|
|
return syncProjectInfoFromErp(startRow, maxErpModifyDate);
|
|
|
|
return syncProjectInfoFromErp(startRow, maxErpModifyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -619,8 +625,9 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
* @Descrption:从金蝶ERP同步采购订单
|
|
|
|
* @Descrption:从金蝶ERP同步采购订单
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public int syncPurchaseOrderFromErp(int startRow) throws Exception {
|
|
|
|
public int syncPurchaseOrderFromErp(int startRow, ErpSyncInfoVo erpSyncInfoVo) throws Exception {
|
|
|
|
String maxErpModifyDate = mesPurchaseOrderMapper.selectMaxErpModifyDate();
|
|
|
|
String maxErpModifyDate = StringUtils.isEmpty(erpSyncInfoVo.getMaxErpModifyDate())?
|
|
|
|
|
|
|
|
mesPurchaseOrderMapper.selectMaxErpModifyDate():erpSyncInfoVo.getMaxErpModifyDate();
|
|
|
|
return syncPurchaseOrderFromErp(startRow, maxErpModifyDate);
|
|
|
|
return syncPurchaseOrderFromErp(startRow, maxErpModifyDate);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -804,9 +811,6 @@ public class KingdeeErpSyncServiceImpl implements IKingdeeErpSyncService {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static int syncMaterialInfoFromErpTest(int startRow) throws Exception {
|
|
|
|
public static int syncMaterialInfoFromErpTest(int startRow) throws Exception {
|
|
|
|
K3CloudApi api = new K3CloudApi();
|
|
|
|
K3CloudApi api = new K3CloudApi();
|
|
|
|
String FDocumentStatus = "C";
|
|
|
|
String FDocumentStatus = "C";
|
|
|
|