新增库位绑定Feign接口与合并采购销售订单

This commit is contained in:
潘荣晟
2026-02-02 17:53:14 +08:00
parent 726303ce81
commit 0033bdc4c5
20 changed files with 646 additions and 44 deletions

View File

@@ -20,6 +20,6 @@ public interface ErrorCodeConstants {
ErrorCode ORDER_DONT_SUBMIT = new ErrorCode(1_008_000_050, "该订单不支持审批"); ErrorCode ORDER_DONT_SUBMIT = new ErrorCode(1_008_000_050, "该订单不支持审批");
ErrorCode MTRL_CODE_NOT_EXISTS = new ErrorCode(1_008_000_150, "中铜物料不存在"); ErrorCode MTRL_CODE_NOT_EXISTS = new ErrorCode(1_008_000_150, "中铜物料不存在");
ErrorCode WAREHOUSE_CODE_OR_FACTORY_CODE_NOT_EXISTS = new ErrorCode(1_008_000_151, "{}"); ErrorCode WAREHOUSE_CODE_OR_FACTORY_CODE_NOT_EXISTS = new ErrorCode(1_008_000_151, "{}");
ErrorCode ERP_ORDER_UPDATE_FAILED = new ErrorCode(1_008_000_160, "erp订单更新失败");
ErrorCode ORDER_DETAIL_NOT_EXISTS = new ErrorCode(1_008_000_060, "订单明细不能为空"); ErrorCode ORDER_DETAIL_NOT_EXISTS = new ErrorCode(1_008_000_060, "订单明细不能为空");
} }

View File

@@ -19,6 +19,23 @@ public class EntrustOrderDetailRespVO {
@Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625") @Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625")
private Long orderId; private Long orderId;
@Schema(description = "发货工厂名称", example = "张三")
@ExcelProperty("发货工厂名称")
private String sendFactoryName;
@Schema(description = "发货工厂编码")
@ExcelProperty("发货工厂编码")
private String sendFactoryNumber;
@Schema(description = "发货库位名称", example = "李四")
@ExcelProperty("发货库位名称")
private String sendWarehouseName;
@Schema(description = "发货库位编码")
@ExcelProperty("发货库位编码")
private String sendWarehouseNumber;
@Schema(description = "收货工厂名称", example = "赵六") @Schema(description = "收货工厂名称", example = "赵六")
@ExcelProperty("收货工厂名称") @ExcelProperty("收货工厂名称")
private String receiveFactoryName; private String receiveFactoryName;

View File

@@ -19,6 +19,15 @@ public class EntrustOrderDetailSaveReqVO {
@Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625") @Schema(description = "订单ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "8625")
private Long orderId; private Long orderId;
@Schema(description = "发货工厂名称", example = "张三")
private String sendFactoryName;
@Schema(description = "发货工厂编码")
private String sendFactoryNumber;
@Schema(description = "发货库位名称", example = "李四")
private String sendWarehouseName;
@Schema(description = "发货库位编码")
private String sendWarehouseNumber;
@Schema(description = "收货工厂名称", example = "赵六") @Schema(description = "收货工厂名称", example = "赵六")
private String receiveFactoryName; private String receiveFactoryName;

View File

@@ -21,10 +21,12 @@ public class EntrustOrderOrderSaveReqVO {
// @NotEmpty(message = "订单号不能为空") // @NotEmpty(message = "订单号不能为空")
private String systemOrderNumber; private String systemOrderNumber;
@Schema(description = "公司编码;推送ERP必须", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "公司名称;推送ERP必须", requiredMode = Schema.RequiredMode.REQUIRED)
//@NotEmpty(message = "公司编码;推送ERP必须不能为空")
private String cpName; private String cpName;
@Schema(description = "公司编码;推送ERP必须", requiredMode = Schema.RequiredMode.REQUIRED)
private String cpNum;
@Schema(description = "客商编码;推送ERP必须", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "客商编码;推送ERP必须", requiredMode = Schema.RequiredMode.REQUIRED)
//@NotEmpty(message = "客商编码;推送ERP必须不能为空") //@NotEmpty(message = "客商编码;推送ERP必须不能为空")
private String supplierNumber; private String supplierNumber;

View File

@@ -71,7 +71,7 @@ public class PrchOrdDtlController implements BusinessControllerMarker {
@DeleteMapping("/delete-list") @DeleteMapping("/delete-list")
@Parameter(name = "ids", description = "编号", required = true) @Parameter(name = "ids", description = "编号", required = true)
@Operation(summary = "批量删除采购订单明细") @Operation(summary = "批量删除采购订单明细")
@PreAuthorize("@ss.hasAnyPermissions('base:prch-ord-dtl:delete','purchase:order:list:OrderList:delete')") @PreAuthorize("@ss.hasAnyPermissions('base:prch-ord-dtl:delete','purchase:order:list:OrderList:delete','purchase:order:list:OrderList:delete')")
public CommonResult<Boolean> deletePrchOrdDtlList(@RequestBody BatchDeleteReqVO req) { public CommonResult<Boolean> deletePrchOrdDtlList(@RequestBody BatchDeleteReqVO req) {
prchOrdDtlService.deletePrchOrdDtlListByIds(req.getIds()); prchOrdDtlService.deletePrchOrdDtlListByIds(req.getIds());
return success(true); return success(true);

View File

@@ -28,6 +28,7 @@ import com.zt.plat.framework.common.pojo.PageResult;
import com.zt.plat.framework.common.pojo.CommonResult; import com.zt.plat.framework.common.pojo.CommonResult;
import com.zt.plat.framework.common.util.object.BeanUtils; import com.zt.plat.framework.common.util.object.BeanUtils;
import static com.zt.plat.framework.common.pojo.CommonResult.customize;
import static com.zt.plat.framework.common.pojo.CommonResult.success; import static com.zt.plat.framework.common.pojo.CommonResult.success;
import com.zt.plat.framework.excel.core.util.ExcelUtils; import com.zt.plat.framework.excel.core.util.ExcelUtils;
@@ -148,7 +149,7 @@ public class PurchaseOrderController implements BusinessControllerMarker {
public CommonResult<?> submitErp061(@RequestBody @Validated @NotEmpty(message = "采购订单id不能为空") List<String> idsStr) { public CommonResult<?> submitErp061(@RequestBody @Validated @NotEmpty(message = "采购订单id不能为空") List<String> idsStr) {
List<Long> ids = idsStr.stream().map(Long::valueOf).toList(); List<Long> ids = idsStr.stream().map(Long::valueOf).toList();
// todo 推送ERP订单 // todo 推送ERP订单
return success(purchaseOrderService.submitErp061(ids)); return customize(purchaseOrderService.submitErp061(ids),200,"推送成功");
} }
@PostMapping("/submit-erp062") @PostMapping("/submit-erp062")
@@ -156,7 +157,7 @@ public class PurchaseOrderController implements BusinessControllerMarker {
@PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:update','purchase:order:list:OrderList:edit')") @PreAuthorize("@ss.hasAnyPermissions('base:purchase-order:update','purchase:order:list:OrderList:edit')")
public CommonResult<?> submitErp062(@RequestParam @Validated @NotNull(message = "采购订单id不能为空") String id) { public CommonResult<?> submitErp062(@RequestParam @Validated @NotNull(message = "采购订单id不能为空") String id) {
// todo 推送ERP订单 // todo 推送ERP订单
return success(purchaseOrderService.submitErp062(Long.valueOf(id))); return success(purchaseOrderService.submitErp062ByUpdate(Long.valueOf(id)));
} }
//通过订单号查询订单信息 //通过订单号查询订单信息

View File

@@ -153,6 +153,7 @@ public class PurchaseOrderSaveReqVO {
@Schema(description = "订单明细") @Schema(description = "订单明细")
@ExcelProperty("订单明细") @ExcelProperty("订单明细")
@NotNull(message = "订单明细不能为空")
private List<PrchOrdDtlSaveReqVO> details; private List<PrchOrdDtlSaveReqVO> details;

View File

@@ -40,6 +40,26 @@ public class EntrustOrderDetailDO extends BusinessBaseDO {
*/ */
@TableField("ORD_ID") @TableField("ORD_ID")
private Long orderId; private Long orderId;
/**
* 发货工厂名称
*/
@TableField("SND_FACT_NAME")
private String sendFactoryName;
/**
* 发货工厂编码
*/
@TableField("SND_FACT_NUM")
private String sendFactoryNumber;
/**
* 发货库位名称
*/
@TableField("SND_WRH_NAME")
private String sendWarehouseName;
/**
* 发货库位编码
*/
@TableField("SND_WRH_NUM")
private String sendWarehouseNumber;
/** /**
* 收货工厂名称 * 收货工厂名称
*/ */

View File

@@ -71,4 +71,8 @@ public interface PrchOrdDtlMapper extends BaseMapperX<PrchOrdDtlDO> {
.orderByDesc(PrchOrdDtlDO::getId)); .orderByDesc(PrchOrdDtlDO::getId));
} }
PrchOrdDtlDO findOrdDtlById(Long id);
PrchOrdDtlDO selectByLineNumAndOrdId(Long lineNum, Long ordId);
} }

View File

@@ -74,4 +74,8 @@ public interface PurchaseOrderMapper extends BaseMapperX<PurchaseOrderDO> {
PurchaseOrderDO selectByOrderId(@Param("orderId") Long orderId); PurchaseOrderDO selectByOrderId(@Param("orderId") Long orderId);
List<PurchaseOrderDO> queryOrderAndPlanData(OrderAndPlanDataReqDTO reqDTO); List<PurchaseOrderDO> queryOrderAndPlanData(OrderAndPlanDataReqDTO reqDTO);
List<PurchaseOrderWithDetailsVO> selectOrderByAndAllIds(@Param("ids") List<Long> ids);
PurchaseOrderDO findOrderById(@Param("id") Long id);
} }

Some files were not shown because too many files have changed in this diff Show More