新增通过销售订单明细id查询订单详情
This commit is contained in:
@@ -2,6 +2,7 @@ package com.zt.plat.module.contractorder.api;
|
||||
|
||||
import com.zt.plat.framework.common.pojo.CommonResult;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.OrderDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.SalesOrdDtlDTO;
|
||||
import com.zt.plat.module.contractorder.api.dto.order.UpdateOrderLstQtyDTO;
|
||||
import com.zt.plat.module.contractorder.enums.ApiConstants;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
@@ -9,8 +10,10 @@ import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import jakarta.validation.Valid;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -34,4 +37,11 @@ public interface OrderApi {
|
||||
@Operation(summary = "根据订单明细id更新累积量(冲销)", description = "根据订单明细id更新收货量(冲销)")
|
||||
CommonResult<Boolean> voidOrderLstQty(@RequestBody @Validated List<UpdateOrderLstQtyDTO> updateOrderLstQtyDTOS);
|
||||
|
||||
@PostMapping(PREFIX + "/get-salas-order-details-by-ids")
|
||||
@Operation(summary = "通过销售订单明细id获取销售订单详情", description = "通过销售订单明细id获取销售订单详情")
|
||||
CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailsByOrderIds(@RequestBody List<Long> ids);
|
||||
|
||||
@GetMapping(PREFIX + "/get-salas-order-details-by-id")
|
||||
@Operation(summary = "通过销售订单明细id获取销售订单详情", description = "通过销售订单明细id获取销售订单详情")
|
||||
CommonResult<SalesOrdDtlDTO> getSalesOrderDetailsByOrderId(@RequestParam("id") Long id);
|
||||
}
|
||||
|
||||
@@ -1,138 +1,150 @@
|
||||
package com.zt.plat.module.contractorder.api.dto.order;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
@Data
|
||||
@Schema(description = "销售订单明细DTO")
|
||||
public class SalesOrdDtlDTO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
|
||||
@Schema(description = "主键")
|
||||
private Long id;
|
||||
/**
|
||||
* 订单主键
|
||||
*/
|
||||
@Schema(description = "订单主键")
|
||||
|
||||
private Long orderId;
|
||||
/**
|
||||
* 行项目;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "行项目;推送ERP(必须)")
|
||||
|
||||
private Long lineNumber;
|
||||
/**
|
||||
* 物料名称
|
||||
*/
|
||||
@Schema(description = "物料名称")
|
||||
|
||||
private String materialName;
|
||||
/**
|
||||
* 物料编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "物料编码;推送ERP(必须)")
|
||||
|
||||
private String materialNumber;
|
||||
/**
|
||||
* 工厂名称
|
||||
*/
|
||||
@Schema(description = "工厂名称")
|
||||
|
||||
private String factoryName;
|
||||
/**
|
||||
* 工厂编码;推送ERP(必须)
|
||||
*/
|
||||
@Schema(description = "工厂编码;推送ERP(必须)")
|
||||
|
||||
private String factoryNumber;
|
||||
/**
|
||||
* 库位名称
|
||||
*/
|
||||
@Schema(description = "库位名称")
|
||||
|
||||
private String warehouseName;
|
||||
/**
|
||||
* 库位编码;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "库位编码;推送ERP(必须)")
|
||||
private String warehouseNumber;
|
||||
/**
|
||||
* 计量单位;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "计量单位;推送ERP(必须)")
|
||||
private String unit;
|
||||
/**
|
||||
* 开票类型;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "开票类型;推送ERP(必须)")
|
||||
private String invoiceType;
|
||||
/**
|
||||
* 暂估数量;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "暂估数量;推送ERP(必须)")
|
||||
private BigDecimal quantity;
|
||||
/**
|
||||
* 稅分类(字典:SALE_TAX);推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "税率分类(字典:SALE_TAX);推送ERP(必须)")
|
||||
private String taxAcctasscat;
|
||||
/**
|
||||
* 项目类别;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "项目类别;推送ERP")
|
||||
private String projectCategory;
|
||||
/**
|
||||
* 装运地点;推送ERP
|
||||
*/
|
||||
|
||||
@Schema(description = "装运地点;推送ERP")
|
||||
private String shippingPlace;
|
||||
/**
|
||||
* 物料科目分配组;推送ERP(必须)
|
||||
*/
|
||||
|
||||
@Schema(description = "物料科目分配组;推送ERP(必须)")
|
||||
private String metalAcctasscatGroup;
|
||||
/**
|
||||
* 小协议号
|
||||
*/
|
||||
|
||||
@Schema(description = "小协议号")
|
||||
private String agreementNumber;
|
||||
/**
|
||||
* 总价
|
||||
*/
|
||||
|
||||
@Schema(description = "总价")
|
||||
private BigDecimal gross;
|
||||
/**
|
||||
* 金属元素缩写
|
||||
*/
|
||||
|
||||
@Schema(description = "金属元素缩写")
|
||||
private String elementAbbreviation;
|
||||
/**
|
||||
* 金属元素名称
|
||||
*/
|
||||
@Schema(description = "金属元素名称")
|
||||
private String elementName;
|
||||
/**
|
||||
* 金属元素编码
|
||||
*/
|
||||
@Schema(description = "金属元素编码")
|
||||
private String elementNumber;
|
||||
/**
|
||||
* 是否启用;处理明细中多个相同物料,只能允许一种物料启用
|
||||
*/
|
||||
|
||||
@Schema(description = "是否启用;处理明细中多个相同物料,只能允许一种物料启用")
|
||||
private String isEnable;
|
||||
/**
|
||||
* 价格条件详情;推送ERP(必须):JSON
|
||||
*/
|
||||
|
||||
@Schema(description = "价格条件详情;推送ERP(必须):JSON")
|
||||
private String priceConditionDetail;
|
||||
/**
|
||||
* 来料加工原料详情;推送ERP:订单类型(JSON)
|
||||
*/
|
||||
|
||||
@Schema(description = "来料加工原料详情;推送ERP:订单类型(JSON)")
|
||||
private String originDetail;
|
||||
|
||||
/**
|
||||
* 税率
|
||||
*/
|
||||
|
||||
@Schema(description = "税率")
|
||||
private BigDecimal taxRte;
|
||||
|
||||
/**
|
||||
* 已移库量库;存针对该订单产生的移库量
|
||||
*/
|
||||
@Schema(description = "已移库量库;存针对该订单产生的移库量")
|
||||
private BigDecimal trfQty;
|
||||
}
|
||||
|
||||
@@ -171,6 +171,18 @@ public class OrderApiImpl implements OrderApi {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<List<SalesOrdDtlDTO>> getSalesOrderDetailsByOrderIds(List<Long> ids) {
|
||||
List<SalesOrderDetailDO> salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectList(SalesOrderDetailDO::getId, ids);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<SalesOrdDtlDTO> getSalesOrderDetailsByOrderId(Long id) {
|
||||
SalesOrderDetailDO salesOrderDetailDOS = SpringUtil.getBean(SalesOrderDetailMapper.class).selectOne(SalesOrderDetailDO::getOrderId, id);
|
||||
return success(BeanUtils.toBean(salesOrderDetailDOS, SalesOrdDtlDTO.class));
|
||||
}
|
||||
|
||||
private List<SalesOrderDO> getOrderByIds(List<Long> ids) {
|
||||
return SpringUtil.getBean(SalesOrderMapper.class).selectByIds(ids); // 采购订单与销售订单的
|
||||
}
|
||||
|
||||
@@ -39,14 +39,14 @@ public class ErpMaterialController {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建ERP物料数据")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:create','basic:material-config:create'})")
|
||||
public CommonResult<ErpMaterialRespVO> createErpMaterial(@Valid @RequestBody ErpMaterialSaveReqVO createReqVO) {
|
||||
return success(erpMaterialService.createErpMaterial(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新ERP物料数据")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:update','basic:material-config:update'})")
|
||||
public CommonResult<Boolean> updateErpMaterial(@Valid @RequestBody ErpMaterialSaveReqVO updateReqVO) {
|
||||
erpMaterialService.updateErpMaterial(updateReqVO);
|
||||
return success(true);
|
||||
@@ -55,7 +55,7 @@ public class ErpMaterialController {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除ERP物料数据")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:delete','basic:material-config:delete'})")
|
||||
public CommonResult<Boolean> deleteErpMaterial(@RequestParam("id") Long id) {
|
||||
erpMaterialService.deleteErpMaterial(id);
|
||||
return success(true);
|
||||
@@ -119,7 +119,7 @@ public class ErpMaterialController {
|
||||
//创建物料拓展关系
|
||||
@PostMapping("/createErpMaterialCorr")
|
||||
@Operation(summary = "创建ERP物料关系")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:create','basic:warehouse-config:create'})")
|
||||
public CommonResult<List<ErpMaterialRespVO>> createErpMaterialCorr(@Valid @RequestBody ErpMaterialCorrSaveReqVO erpMaterialCorrSaveReqVO) {
|
||||
return success(erpMaterialService.createErpMaterialCorr(erpMaterialCorrSaveReqVO));
|
||||
}
|
||||
@@ -127,7 +127,7 @@ public class ErpMaterialController {
|
||||
//删除物料关系
|
||||
@DeleteMapping("/deleteErpMaterialCorr")
|
||||
@Operation(summary = "删除ERP物料关系")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:delete','basic:material-config:delete'})")
|
||||
public CommonResult<Boolean> deleteErpMaterialCorr(@RequestBody BatchDeleteReqVO req) {
|
||||
erpMaterialService.deleteErpMaterialCorr(req);
|
||||
return success(true);
|
||||
@@ -136,7 +136,7 @@ public class ErpMaterialController {
|
||||
//通过物料id查询物料详情
|
||||
@GetMapping("/getErpMaterialById")
|
||||
@Operation(summary = "通过物料id查询物料详情")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<ErpMaterialRespVO> getErpMaterialById(@RequestParam("id") Long id) {
|
||||
ErpMaterialDO erpMaterial = erpMaterialService.getErpMaterialById(id);
|
||||
return success(BeanUtils.toBean(erpMaterial, ErpMaterialRespVO.class));
|
||||
@@ -145,7 +145,7 @@ public class ErpMaterialController {
|
||||
//通过主物料查询子物料信息
|
||||
@GetMapping("/getErpMaterialByMainMaterialById")
|
||||
@Operation(summary = "通过主物料查询子物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByMainMaterial(@RequestParam("id") Long mainMaterialId) {
|
||||
List<ErpMaterialDO> erpMaterial = erpMaterialService.getErpMaterialByMainMaterial(mainMaterialId);
|
||||
return success(BeanUtils.toBean(erpMaterial, ErpMaterialRespVO.class));
|
||||
@@ -154,7 +154,7 @@ public class ErpMaterialController {
|
||||
//查询物料
|
||||
@PostMapping("/api-erp-material")
|
||||
@Operation(summary = "通过接口查询物料")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<PageResult<ErpMaterialRespVO>> getErpMaterialByApi(@RequestBody MaterialInfomationApiVO vo) {
|
||||
MaterialInfomationPageReqDTO material = new MaterialInfomationPageReqDTO();
|
||||
material.setCode(vo.getMaterialNumber());
|
||||
@@ -167,7 +167,7 @@ public class ErpMaterialController {
|
||||
//通过主物料查询子物料信息
|
||||
@GetMapping("/erpMaterial-mainMaterial-code")
|
||||
@Operation(summary = "通过主物料编号查询子物料信息")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<ErpMaterialRespVO> getErpMaterialByMainMaterialByCode(@RequestParam("materialNumber") String code) {
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByMainMaterialByCode(code), ErpMaterialRespVO.class));
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public class ErpMaterialController {
|
||||
//查询物料
|
||||
@GetMapping("/api-erp-material-code")
|
||||
@Operation(summary = "通过编号接口查询物料")
|
||||
@PreAuthorize("@ss.hasPermission('sply:erp-material:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'sply:erp-material:query','basic:material-config:query'})")
|
||||
public CommonResult<List<ErpMaterialRespVO>> getErpMaterialByApiByCode(@RequestParam("materialNumber")String code) {
|
||||
|
||||
return success(BeanUtils.toBean(erpMaterialService.getErpMaterialByApiByCode(code), ErpMaterialRespVO.class));
|
||||
|
||||
@@ -41,14 +41,14 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建仓库工厂关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:create')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:create','basic:warehouse-config:create'})")
|
||||
public CommonResult<WarehouseFactoryRespVO> createWarehouseFactory(@Valid @RequestBody WarehouseFactorySaveReqVO createReqVO) {
|
||||
return success(warehouseFactoryService.createWarehouseFactory(createReqVO));
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@Operation(summary = "更新仓库工厂关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:update')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:update','basic:warehouse-config:update'})")
|
||||
public CommonResult<Boolean> updateWarehouseFactory(@Valid @RequestBody WarehouseFactorySaveReqVO updateReqVO) {
|
||||
warehouseFactoryService.updateWarehouseFactory(updateReqVO);
|
||||
return success(true);
|
||||
@@ -57,7 +57,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
@DeleteMapping("/delete")
|
||||
@Operation(summary = "删除仓库工厂关系")
|
||||
@Parameter(name = "id", description = "编号", required = true)
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:delete','basic:warehouse-config:delete'})")
|
||||
public CommonResult<Boolean> deleteWarehouseFactory(@RequestParam("id") Long id) {
|
||||
warehouseFactoryService.deleteWarehouseFactory(id);
|
||||
return success(true);
|
||||
@@ -66,7 +66,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
@DeleteMapping("/delete-list")
|
||||
@Parameter(name = "ids", description = "编号", required = true)
|
||||
@Operation(summary = "批量删除仓库工厂关系")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:delete')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:delete','basic:warehouse-config:delete'})")
|
||||
public CommonResult<Boolean> deleteWarehouseFactoryList(@RequestBody BatchDeleteReqVO req) {
|
||||
warehouseFactoryService.deleteWarehouseFactoryListByIds(req.getIds());
|
||||
return success(true);
|
||||
@@ -75,7 +75,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
@GetMapping("/get")
|
||||
@Operation(summary = "获得仓库工厂关系")
|
||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:query','basic:warehouse-config:query'})")
|
||||
public CommonResult<WarehouseFactoryRespVO> getWarehouseFactory(@RequestParam("id") Long id) {
|
||||
WarehouseFactoryDO warehouseFactory = warehouseFactoryService.getWarehouseFactory(id);
|
||||
return success(BeanUtils.toBean(warehouseFactory, WarehouseFactoryRespVO.class));
|
||||
@@ -83,7 +83,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得仓库工厂关系分页")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:query','basic:warehouse-config:query'})")
|
||||
public CommonResult<PageResult<WarehouseFactoryRespVO>> getWarehouseFactoryPage(@Valid WarehouseFactoryPageReqVO pageReqVO) {
|
||||
PageResult<WarehouseFactoryDO> pageResult = warehouseFactoryService.getWarehouseFactoryPage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, WarehouseFactoryRespVO.class));
|
||||
@@ -91,7 +91,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@Operation(summary = "导出仓库工厂关系 Excel")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:export')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:export','basic:warehouse-config:export'})")
|
||||
@ApiAccessLog(operateType = EXPORT)
|
||||
public void exportWarehouseFactoryExcel(@Valid WarehouseFactoryPageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
@@ -105,7 +105,7 @@ public class WarehouseFactoryController implements BusinessControllerMarker {
|
||||
//通过主库位Id查询库位
|
||||
@GetMapping("/warehouse-factory-list-mainId")
|
||||
@Operation(summary = "通过主库位Id查询库位")
|
||||
@PreAuthorize("@ss.hasPermission('base:warehouse-factory:query')")
|
||||
@PreAuthorize("@ss.hasAnyPermissions({'base:warehouse-factory:query','basic:warehouse-config:query'})")
|
||||
public CommonResult<List<WarehouseFactoryRespVO>> getWarehouseFactoryListByMainId(@RequestParam("mainId") String mainId) {
|
||||
return success(warehouseFactoryService.getWarehouseFactoryByMainId(mainId));
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.erp.dal.dataobject.erp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
|
||||
@@ -20,7 +21,7 @@ import lombok.*;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpFactoryDO extends BusinessBaseDO {
|
||||
public class ErpFactoryDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.zt.plat.module.erp.dal.dataobject.erp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BaseDO;
|
||||
import com.zt.plat.framework.mybatis.core.dataobject.BusinessBaseDO;
|
||||
import lombok.*;
|
||||
/**
|
||||
@@ -19,7 +20,7 @@ import lombok.*;
|
||||
/**
|
||||
* 支持业务基类继承:isBusiness=true 时继承 BusinessBaseDO,否则继承 BaseDO
|
||||
*/
|
||||
public class ErpWarehouseDO extends BusinessBaseDO {
|
||||
public class ErpWarehouseDO extends BaseDO {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
|
||||
Reference in New Issue
Block a user