对外接口
This commit is contained in:
@@ -13,6 +13,7 @@ import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
@@ -49,4 +50,12 @@ public class ToErpApiController {
|
||||
public AjaxResult receiveSupplier(@RequestBody BasSupplier basSupplier) {
|
||||
return toErpService.receiveSupplier(basSupplier);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成调拨单
|
||||
*/
|
||||
@Scheduled(fixedDelay = 1500)
|
||||
public void saveTransferBill() {
|
||||
toErpService.saveTransferBill();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,14 +5,18 @@ import com.ruoyi.api.domain.ReMaterialParam;
|
||||
import com.ruoyi.api.domain.RequestEnter;
|
||||
import com.ruoyi.api.domain.WmsJobRequest;
|
||||
import com.ruoyi.api.service.IToWmsService;
|
||||
import com.ruoyi.bas.BasProduct.domain.BasProduct;
|
||||
import com.ruoyi.bas.BasProduct.service.IBasProductService;
|
||||
import com.ruoyi.common.annotation.Log;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.enums.BusinessType;
|
||||
import com.ruoyi.log.domain.RequestLog;
|
||||
import com.ruoyi.log.service.IRequestLogService;
|
||||
import com.ruoyi.out.outStockout.domain.OutStockoutVo;
|
||||
import com.ruoyi.out.outStockout.service.IOutStockoutService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
@@ -27,6 +31,10 @@ public class ToWmsApiController {
|
||||
private IToWmsService toWmsService;
|
||||
@Autowired
|
||||
private IRequestLogService requestLogService;
|
||||
@Autowired
|
||||
private IOutStockoutService outStockoutService;
|
||||
@Autowired
|
||||
private IBasProductService basProductService;
|
||||
|
||||
/**
|
||||
* 入库请求生成作业
|
||||
@@ -106,10 +114,44 @@ public class ToWmsApiController {
|
||||
|
||||
|
||||
/**
|
||||
* 接收入库单据
|
||||
* 出库单据保存
|
||||
*
|
||||
* @param outStockoutVo
|
||||
* @return
|
||||
*/
|
||||
@Log(title = "出库主单保存", businessType = BusinessType.OTHER)
|
||||
@PostMapping("/saveOutBill")
|
||||
@ResponseBody
|
||||
public AjaxResult saveBill(@RequestBody OutStockoutVo outStockoutVo) {
|
||||
String stockOutId = outStockoutService.saveBill(outStockoutVo);
|
||||
return AjaxResult.success(stockOutId);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 接收出库单据
|
||||
* 修改物料管理
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateProduct")
|
||||
public AjaxResult updateProduct(@RequestBody BasProduct basProduct)
|
||||
{
|
||||
if (basProductService.updateBasProduct(basProduct)>0){
|
||||
return AjaxResult.success(basProduct.getProductId());
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改物料管理
|
||||
*/
|
||||
@Log(title = "物料管理", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/InvalidProduct")
|
||||
public AjaxResult InvalidProduct(@RequestBody BasProduct basProduct)
|
||||
{
|
||||
if (basProductService.updateBasProduct(basProduct)>0){
|
||||
return AjaxResult.success(basProduct.getProductId());
|
||||
}
|
||||
return AjaxResult.error();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -261,7 +261,7 @@ public class ToWmsServiceImpl implements IToWmsService {
|
||||
transferBillCallback.setJobId(mydoJob.getJobId());
|
||||
transferBillCallback.setErpBill(erpBill);
|
||||
transferBillCallback.setType("1");
|
||||
transferBillCallback.setStatus("1");
|
||||
transferBillCallback.setStatus("0");
|
||||
transferBillCallbackService.insertTransferBillCallback(transferBillCallback);
|
||||
}
|
||||
//修改作业状态为正执行
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.ruoyi.in.erp.controller;
|
||||
|
||||
import java.util.List;
|
||||
import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
@@ -23,7 +24,7 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 调拨单回传Controller
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-17
|
||||
*/
|
||||
|
||||
@@ -5,15 +5,15 @@ import com.ruoyi.in.erp.domain.TransferBillCallback;
|
||||
|
||||
/**
|
||||
* 调拨单回传Service接口
|
||||
*
|
||||
*
|
||||
* @author ruoyi
|
||||
* @date 2025-09-17
|
||||
*/
|
||||
public interface ITransferBillCallbackService
|
||||
public interface ITransferBillCallbackService
|
||||
{
|
||||
/**
|
||||
* 查询调拨单回传
|
||||
*
|
||||
*
|
||||
* @param id 调拨单回传主键
|
||||
* @return 调拨单回传
|
||||
*/
|
||||
@@ -21,7 +21,7 @@ public interface ITransferBillCallbackService
|
||||
|
||||
/**
|
||||
* 查询调拨单回传列表
|
||||
*
|
||||
*
|
||||
* @param transferBillCallback 调拨单回传
|
||||
* @return 调拨单回传集合
|
||||
*/
|
||||
@@ -29,7 +29,7 @@ public interface ITransferBillCallbackService
|
||||
|
||||
/**
|
||||
* 新增调拨单回传
|
||||
*
|
||||
*
|
||||
* @param transferBillCallback 调拨单回传
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -37,7 +37,7 @@ public interface ITransferBillCallbackService
|
||||
|
||||
/**
|
||||
* 修改调拨单回传
|
||||
*
|
||||
*
|
||||
* @param transferBillCallback 调拨单回传
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public interface ITransferBillCallbackService
|
||||
|
||||
/**
|
||||
* 批量删除调拨单回传
|
||||
*
|
||||
*
|
||||
* @param ids 需要删除的调拨单回传主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
@@ -53,9 +53,10 @@ public interface ITransferBillCallbackService
|
||||
|
||||
/**
|
||||
* 删除调拨单回传信息
|
||||
*
|
||||
*
|
||||
* @param id 调拨单回传主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteTransferBillCallbackById(Long id);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user