|
|
|
@ -1,15 +1,10 @@
|
|
|
|
|
package com.op.sap.controller;
|
|
|
|
|
|
|
|
|
|
import com.op.common.core.utils.DateUtils;
|
|
|
|
|
import com.op.common.core.web.controller.BaseController;
|
|
|
|
|
import com.op.common.core.domain.R;
|
|
|
|
|
import com.op.common.core.web.domain.AjaxResult;
|
|
|
|
|
import com.op.common.log.annotation.Log;
|
|
|
|
|
import com.op.common.log.enums.BusinessType;
|
|
|
|
|
import com.op.sap.service.SapBomService;
|
|
|
|
|
|
|
|
|
|
import com.op.sap.domain.SapBom;
|
|
|
|
|
import com.op.sap.service.SapMaterialPreparationService;
|
|
|
|
|
import com.op.sap.service.SapOrderService;
|
|
|
|
|
import com.op.sap.service.*;
|
|
|
|
|
import com.op.system.api.model.SapProOrder;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
@ -18,8 +13,10 @@ import java.util.List;
|
|
|
|
|
|
|
|
|
|
@RestController
|
|
|
|
|
@RequestMapping("/sap")
|
|
|
|
|
public class SapController extends BaseController {
|
|
|
|
|
public class SapController {
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
|
private SapService sapService;
|
|
|
|
|
@Autowired
|
|
|
|
|
private SapOrderService sapOrderService;
|
|
|
|
|
|
|
|
|
@ -38,16 +35,6 @@ public class SapController extends BaseController {
|
|
|
|
|
public AjaxResult shopOrderSync(@RequestBody SapProOrder sapProOrder){
|
|
|
|
|
return sapOrderService.shopOrderSync(sapProOrder);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 物料同步接口
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
// @PostMapping("/itemSync")
|
|
|
|
|
// public List itemSync(){
|
|
|
|
|
// return sapService.itemSync();
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 物料清单同步接口
|
|
|
|
|
* @return
|
|
|
|
@ -59,15 +46,28 @@ public class SapController extends BaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 生产订单备料单接口
|
|
|
|
|
* @param shopOrder
|
|
|
|
|
* 物料同步接口
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("saveItem")
|
|
|
|
|
public R<Boolean> saveItem(){
|
|
|
|
|
return sapService.sapItem();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping("/materialPreparation")
|
|
|
|
|
@Log(title = "生产订单备料单接口", businessType = BusinessType.SAP)
|
|
|
|
|
public AjaxResult materialPreparation(@RequestParam("shopOrder") String shopOrder){
|
|
|
|
|
return sapMaterialPreparationService.MaterialPreparation(shopOrder);
|
|
|
|
|
|
|
|
|
|
// @PostMapping("saveBom")
|
|
|
|
|
// public R<Boolean> saveBom(){
|
|
|
|
|
// return sapService.sapBom();
|
|
|
|
|
// }
|
|
|
|
|
@PostMapping("saveProRoute")
|
|
|
|
|
public R<Boolean> saveProRoute(){return sapService.sapProRoute();}
|
|
|
|
|
@PostMapping("/sapProRouteProduct")
|
|
|
|
|
public R<Boolean> sapProRouteProduct(){
|
|
|
|
|
return sapService.sapProRouteProduct();
|
|
|
|
|
}
|
|
|
|
|
@PostMapping("/sapProRouteProcess")
|
|
|
|
|
public R<Boolean> sapProRouteProcess() {
|
|
|
|
|
return sapService.sapProRouteProcess();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|