|
|
@ -23,6 +23,7 @@ import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Component;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.HashMap;
|
|
|
|
import java.util.HashMap;
|
|
|
@ -230,25 +231,18 @@ public class SapOrderServiceImpl implements SapOrderService {
|
|
|
|
|
|
|
|
|
|
|
|
// 配置传入参数
|
|
|
|
// 配置传入参数
|
|
|
|
JCoParameterList jCoParameterList = func.getImportParameterList();
|
|
|
|
JCoParameterList jCoParameterList = func.getImportParameterList();
|
|
|
|
if (StringUtils.isEmpty(sapCloseOrderQuery.getLeadOrder())){
|
|
|
|
if (CollectionUtils.isEmpty(sapCloseOrderQuery.getOrderCodes())){
|
|
|
|
return R.fail("母订单号为空");
|
|
|
|
return R.fail("订单集合为空");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (StringUtils.isEmpty(sapCloseOrderQuery.getOrder())){
|
|
|
|
|
|
|
|
return R.fail("子订单号为空");
|
|
|
|
//关闭订单
|
|
|
|
}
|
|
|
|
for(String orderCode:sapCloseOrderQuery.getOrderCodes()){
|
|
|
|
//关闭母订单
|
|
|
|
jCoParameterList.setValue("P_AUFNR",orderCode);
|
|
|
|
jCoParameterList.setValue("P_AUFNR",sapCloseOrderQuery.getLeadOrder());
|
|
|
|
|
|
|
|
func.execute(dest);//执行调用函数
|
|
|
|
func.execute(dest);//执行调用函数
|
|
|
|
// JCoParameterList J= func.getExportParameterList();
|
|
|
|
|
|
|
|
// System.out.println(J);
|
|
|
|
|
|
|
|
String L_MSG1= func.getExportParameterList().getString("L_MSG");
|
|
|
|
String L_MSG1= func.getExportParameterList().getString("L_MSG");
|
|
|
|
Msg.append(sapCloseOrderQuery.getLeadOrder()+L_MSG1+";");
|
|
|
|
Msg.append(orderCode+"-"+L_MSG1+";");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//关闭子订单
|
|
|
|
|
|
|
|
jCoParameterList.setValue("P_AUFNR",sapCloseOrderQuery.getOrder());
|
|
|
|
|
|
|
|
func.execute(dest);//执行调用函数
|
|
|
|
|
|
|
|
String L_MSG2= func.getExportParameterList().getString("L_MSG");
|
|
|
|
|
|
|
|
Msg.append(sapCloseOrderQuery.getOrder()+L_MSG2);
|
|
|
|
|
|
|
|
log.info("订单关闭结果"+Msg.toString());
|
|
|
|
log.info("订单关闭结果"+Msg.toString());
|
|
|
|
return R.ok(null,Msg.toString());
|
|
|
|
return R.ok(null,Msg.toString());
|
|
|
|
}catch (Exception e){
|
|
|
|
}catch (Exception e){
|
|
|
|