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