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