sap接口bug修复

highway
zhaoxiaolin 1 year ago
parent da2074411b
commit 8bc62dc72d

@ -18,6 +18,7 @@ import com.op.system.api.domain.sap.SapSupplier;
import com.op.system.api.model.SapProOrder; import com.op.system.api.model.SapProOrder;
import org.apache.commons.lang3.time.DateFormatUtils; import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Date; import java.util.Date;
@ -234,7 +235,9 @@ public class SapController extends BaseController {
R r = sapWorkCenterService.sapWorkCenterSync(qo); R r = sapWorkCenterService.sapWorkCenterSync(qo);
if(r.getCode()==200){ if(r.getCode()==200){
List<SapWorkCenter> dtos = (List<SapWorkCenter>) r.getData(); List<SapWorkCenter> dtos = (List<SapWorkCenter>) r.getData();
sapWorkCenterService.syncWorkCenter(dtos); if(!CollectionUtils.isEmpty(dtos)) {
sapWorkCenterService.syncWorkCenter(dtos);
}
}else{ }else{
logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg());
} }
@ -268,7 +271,10 @@ public class SapController extends BaseController {
R r = sapWorkCenterService.sapSupplierSync(sapSupplierQuery); R r = sapWorkCenterService.sapSupplierSync(sapSupplierQuery);
if(r.getCode()==200){ if(r.getCode()==200){
List<SapSupplier> dtos = (List<SapSupplier>) r.getData(); List<SapSupplier> dtos = (List<SapSupplier>) r.getData();
sapWorkCenterService.syncSupplier(dtos); if(!CollectionUtils.isEmpty(dtos)){
sapWorkCenterService.syncSupplier(dtos);
}
}else{ }else{
logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg());
} }
@ -303,7 +309,9 @@ public class SapController extends BaseController {
R r = sapWorkCenterService.sapCustomSync(sapCustom); R r = sapWorkCenterService.sapCustomSync(sapCustom);
if(r.getCode()==200){ if(r.getCode()==200){
List<SapCustom> dtos = (List<SapCustom>) r.getData(); List<SapCustom> dtos = (List<SapCustom>) r.getData();
sapWorkCenterService.syncCustom(dtos); if(!CollectionUtils.isEmpty(dtos)) {
sapWorkCenterService.syncCustom(dtos);
}
}else{ }else{
logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg()); logger.error("++++++++++++" + dateSource.get("poolName")+"错误信息:"+ r.getMsg());
} }

Loading…
Cancel
Save