|
|
|
@ -15,6 +15,8 @@ import com.op.system.api.domain.sap.SapShopOrderQuery;
|
|
|
|
|
import com.op.system.api.model.SapProOrder;
|
|
|
|
|
import com.sap.conn.jco.*;
|
|
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
@ -23,10 +25,13 @@ import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
|
@Service
|
|
|
|
|
public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
|
|
|
|
|
private static final String END_DATE="99991231";
|
|
|
|
|
@Autowired
|
|
|
|
|
private JCoDestination dest;
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public R<List<SapProOrder>> shopOrderSync(SapShopOrderQuery sapShopOrderQuery) {
|
|
|
|
@ -34,7 +39,7 @@ public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
try {
|
|
|
|
|
// 获取调用 RFC 函数对象
|
|
|
|
|
//获取连接
|
|
|
|
|
JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
//JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
JCoRepository repository = dest.getRepository();
|
|
|
|
|
JCoFunction func = repository.getFunction("ZPPR_MES_PRO_TO");
|
|
|
|
|
if (func == null) {
|
|
|
|
@ -147,7 +152,7 @@ public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
String L_MSG=null;
|
|
|
|
|
try {
|
|
|
|
|
//获取连接
|
|
|
|
|
JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
// JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
JCoRepository repository = dest.getRepository();
|
|
|
|
|
JCoFunction func = repository.getFunction("ZPPR_MES_PRODORD_CREATE");
|
|
|
|
|
if (func == null) {
|
|
|
|
@ -200,7 +205,7 @@ public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
String L_MSG=null;
|
|
|
|
|
try {
|
|
|
|
|
//获取连接
|
|
|
|
|
JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
// JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
JCoRepository repository = dest.getRepository();
|
|
|
|
|
JCoFunction func = repository.getFunction("ZPPR_MES_PRODORD_CLOSE");
|
|
|
|
|
if (func == null) {
|
|
|
|
@ -232,7 +237,7 @@ public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
String MESSAGE=null;
|
|
|
|
|
try {
|
|
|
|
|
//获取连接
|
|
|
|
|
JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
// JCoDestination dest = SAPConnUtils.connect();
|
|
|
|
|
JCoRepository repository = dest.getRepository();
|
|
|
|
|
JCoFunction func = repository.getFunction("ZPPR_MES_PRODORDCONF_CREATE_TT");
|
|
|
|
|
if (func == null) {
|
|
|
|
|