|
|
@ -52,27 +52,8 @@ public class SapController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private SapBomMapper sapBomMapper;
|
|
|
|
private SapBomMapper sapBomMapper;
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 订单同步接口
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/shopOrderSync")
|
|
|
|
|
|
|
|
@Log(title = "同步SAP订单", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<SapProOrder>> shopOrderSync(@RequestBody SapShopOrderQuery sapProOrder){
|
|
|
|
|
|
|
|
return sapOrderService.shopOrderSync(sapProOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* SAP订单修改接口
|
|
|
|
|
|
|
|
* 传递母订单号和母订单数量
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/shopUpdateSync")
|
|
|
|
|
|
|
|
@Log(title = "修改SAP订单", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R shopUpdateSync(@RequestBody SapShopOrderQuery sapProOrder){
|
|
|
|
|
|
|
|
return sapOrderService.shopUpdateSync(sapProOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**====================主数据相关===================================================================================*/
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 物料同步接口
|
|
|
|
* 物料同步接口
|
|
|
|
* @param
|
|
|
|
* @param
|
|
|
@ -113,7 +94,7 @@ public class SapController extends BaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 物料清单同步接口
|
|
|
|
* 物料清单BOM同步接口
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@PostMapping("/bomSync")
|
|
|
|
@PostMapping("/bomSync")
|
|
|
@ -151,7 +132,6 @@ public class SapController extends BaseController {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 工艺路线同步
|
|
|
|
* 工艺路线同步
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -176,7 +156,7 @@ public class SapController extends BaseController {
|
|
|
|
calendar.setTime(maxTime0);
|
|
|
|
calendar.setTime(maxTime0);
|
|
|
|
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
|
|
|
calendar.add(Calendar.DAY_OF_YEAR, 1);
|
|
|
|
Date maxTime = calendar.getTime();
|
|
|
|
Date maxTime = calendar.getTime();
|
|
|
|
// qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
|
|
|
|
// qo.setAedat(DateFormatUtils.format(maxTime, "yyyyMMdd"));//修改日期20230923
|
|
|
|
}
|
|
|
|
}
|
|
|
|
qo.setWerks(dateSource.get("poolName").replace("ds_", ""));//工厂
|
|
|
|
qo.setWerks(dateSource.get("poolName").replace("ds_", ""));//工厂
|
|
|
|
|
|
|
|
|
|
|
@ -190,74 +170,6 @@ public class SapController extends BaseController {
|
|
|
|
return R.ok();
|
|
|
|
return R.ok();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单备料单接口
|
|
|
|
|
|
|
|
* @param shopOrder
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/materialPreparation")
|
|
|
|
|
|
|
|
@Log(title = "生产订单备料单接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<SapMaterialPreparation>> materialPreparation(@RequestParam("shopOrder") String shopOrder){
|
|
|
|
|
|
|
|
return sapMaterialPreparationService.MaterialPreparation(shopOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 反冲物料领料过账接口
|
|
|
|
|
|
|
|
* ***与包材领料分开过账
|
|
|
|
|
|
|
|
* @param sapBackflushMPQueryList
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapBackflushMP")
|
|
|
|
|
|
|
|
@Log(title = "", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapBackflushMP(@RequestBody List<SapBackflushMPQuery> sapBackflushMPQueryList){
|
|
|
|
|
|
|
|
return sapItemSyncService.sapBackflushMP(sapBackflushMPQueryList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sapMaterialPosting")
|
|
|
|
|
|
|
|
@Log(title = "订单物料领料过账、原材料补料、订单物料退料过账接口(MB1A)", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapMaterialPosting(@RequestBody SapMaterialPosting sapMaterialPosting){
|
|
|
|
|
|
|
|
return sapItemSyncService.sapMaterialPosting(sapMaterialPosting);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单创建接口
|
|
|
|
|
|
|
|
* @param sapCreateOrderList
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sapCreateOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单创建接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<Map<String, String>>> SapCreateOrder(@RequestBody List<SapCreateOrder> sapCreateOrderList){
|
|
|
|
|
|
|
|
return sapOrderService.SapCreateOrder(sapCreateOrderList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单关闭接口
|
|
|
|
|
|
|
|
* 传母订单号即可
|
|
|
|
|
|
|
|
* @param sapCloseOrderQuery
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapCloseOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单关闭接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapCloseOrder(@RequestBody SapCloseOrderQuery sapCloseOrderQuery){
|
|
|
|
|
|
|
|
return sapOrderService.sapCloseOrder(sapCloseOrderQuery);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 报工
|
|
|
|
|
|
|
|
* @param sapRFW
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapRFWOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单报工接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapRFWOrder(@RequestBody SapRFW sapRFW){
|
|
|
|
|
|
|
|
return sapOrderService.sapRFWOrder(sapRFW);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 工作中心
|
|
|
|
* 工作中心
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
@ -382,6 +294,96 @@ public class SapController extends BaseController {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**==================================生产订单相关============================================================================*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 订单同步接口
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/shopOrderSync")
|
|
|
|
|
|
|
|
@Log(title = "同步SAP订单", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<SapProOrder>> shopOrderSync(@RequestBody SapShopOrderQuery sapProOrder){
|
|
|
|
|
|
|
|
return sapOrderService.shopOrderSync(sapProOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单创建接口
|
|
|
|
|
|
|
|
* @param sapCreateOrderList
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sapCreateOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单创建接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<Map<String, String>>> SapCreateOrder(@RequestBody List<SapCreateOrder> sapCreateOrderList){
|
|
|
|
|
|
|
|
return sapOrderService.SapCreateOrder(sapCreateOrderList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* SAP订单修改接口
|
|
|
|
|
|
|
|
* 传递母订单号和母订单数量
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/shopUpdateSync")
|
|
|
|
|
|
|
|
@Log(title = "修改SAP订单", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R shopUpdateSync(@RequestBody SapShopOrderQuery sapProOrder){
|
|
|
|
|
|
|
|
return sapOrderService.shopUpdateSync(sapProOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 报工
|
|
|
|
|
|
|
|
* @param sapRFW
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapRFWOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单报工接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapRFWOrder(@RequestBody SapRFW sapRFW){
|
|
|
|
|
|
|
|
return sapOrderService.sapRFWOrder(sapRFW);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单关闭接口
|
|
|
|
|
|
|
|
* 传母订单号即可
|
|
|
|
|
|
|
|
* @param sapCloseOrderQuery
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapCloseOrder")
|
|
|
|
|
|
|
|
@Log(title = "生产订单关闭接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapCloseOrder(@RequestBody SapCloseOrderQuery sapCloseOrderQuery){
|
|
|
|
|
|
|
|
return sapOrderService.sapCloseOrder(sapCloseOrderQuery);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 生产订单备料单接口
|
|
|
|
|
|
|
|
* @param shopOrder
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/materialPreparation")
|
|
|
|
|
|
|
|
@Log(title = "生产订单备料单接口", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R<List<SapMaterialPreparation>> materialPreparation(@RequestParam("shopOrder") String shopOrder){
|
|
|
|
|
|
|
|
return sapMaterialPreparationService.MaterialPreparation(shopOrder);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 反冲物料领料过账接口
|
|
|
|
|
|
|
|
* ***与包材领料分开过账
|
|
|
|
|
|
|
|
* @param sapBackflushMPQueryList
|
|
|
|
|
|
|
|
* @return
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@PostMapping("/sapBackflushMP")
|
|
|
|
|
|
|
|
@Log(title = "", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapBackflushMP(@RequestBody List<SapBackflushMPQuery> sapBackflushMPQueryList){
|
|
|
|
|
|
|
|
return sapItemSyncService.sapBackflushMP(sapBackflushMPQueryList);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@PostMapping("/sapMaterialPosting")
|
|
|
|
|
|
|
|
@Log(title = "订单物料领料过账、原材料补料、订单物料退料过账接口(MB1A)", businessType = BusinessType.SAP)
|
|
|
|
|
|
|
|
public R sapMaterialPosting(@RequestBody SapMaterialPosting sapMaterialPosting){
|
|
|
|
|
|
|
|
return sapItemSyncService.sapMaterialPosting(sapMaterialPosting);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 采购订单接口
|
|
|
|
* 采购订单接口
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|