Browse Source

修改提交

1021934019@qq.com 4 years ago
parent
commit
7f2ed72955
22 changed files with 1015 additions and 0 deletions
  1. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/Order.java
  2. 120 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderFreight.java
  3. 21 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderItems.java
  4. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderFreightVO.java
  5. 35 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/Order.java
  6. 120 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/OrderFreight.java
  7. 20 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/OrderItems.java
  8. 37 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/vo/OrderFreightVO.java
  9. 2 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryItemsServiceImpl.java
  10. 2 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryServiceImpl.java
  11. 126 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/controller/OrderFreightController.java
  12. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderFreightMapper.java
  13. 29 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderFreightMapper.xml
  14. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderFreightService.java
  15. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderFreightServiceImpl.java
  16. 20 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/PurchaseEnquiry.java
  17. 126 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/controller/OrderFreightController.java
  18. 43 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderFreightMapper.java
  19. 29 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderFreightMapper.xml
  20. 41 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/IOrderFreightService.java
  21. 6 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/IOrderService.java
  22. 42 0
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/impl/OrderFreightServiceImpl.java

+ 36 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/Order.java

@@ -580,5 +580,41 @@ public class Order implements Serializable {
 	 */
 	@ApiModelProperty(value = "是否开票")
 	private String ifInvoice;
+	/**
+	 * 箱型
+	 */
+	@ApiModelProperty(value = "箱型")
+	private String boxPile;
+	/**
+	 * 箱量
+	 */
+	@ApiModelProperty(value = "箱量")
+	private BigDecimal boxNumber;
+	/**
+	 * 起订量
+	 */
+	@ApiModelProperty(value = "起订量")
+	private BigDecimal minOrder;
+	/**
+	 * 预计海运费
+	 */
+	@ApiModelProperty(value = "预计海运费")
+	private BigDecimal predictOceanFreight;
+	/**
+	 * 参考海运费
+	 */
+	@ApiModelProperty(value = "参考海运费")
+	private BigDecimal referenceOceanFreight;
+	/**
+	 * 采购备注
+	 */
+	@ApiModelProperty(value = "采购备注")
+	private String purchaseRemark;
+	/**
+	 * 船务备注
+	 */
+	@ApiModelProperty(value = "船务备注")
+	private String shippingRemark;
+
 
 }

+ 120 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderFreight.java

@@ -0,0 +1,120 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 运费明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Data
+@TableName("business_order_freight")
+@ApiModel(value = "OrderFreight对象", description = "运费明细表")
+public class OrderFreight implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 船公司
+	*/
+		@ApiModelProperty(value = "船公司")
+		private Long shippingHouse;
+	/**
+	* 船期
+	*/
+		@ApiModelProperty(value = "船期")
+		private Date sailSchedule;
+	/**
+	* 运费
+	*/
+		@ApiModelProperty(value = "运费")
+		private BigDecimal oceanFreight;
+	/**
+	* 是否重点推荐 0 否 1 是
+	*/
+		@ApiModelProperty(value = "是否重点推荐 0 否 1 是")
+		private Integer priorityReferrer;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 21 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderItems.java

@@ -328,4 +328,25 @@ public class OrderItems implements Serializable {
 	 */
 	@ApiModelProperty(value = "箱号")
 	private String cntrNo;
+	/**
+	 * 供应商
+	 */
+	@ApiModelProperty(value = "供应商")
+	private Long corpId;
+	/**
+	 * 是否重点推荐 0 否 1 是
+	 */
+	@ApiModelProperty(value = "是否重点推荐 0 否 1 是")
+	private Integer priorityReferrer;
+	/**
+	 * 推荐理由
+	 */
+	@ApiModelProperty(value = "推荐理由")
+	private String referrerReason;
+	/**
+	 * 供应商名称
+	 */
+	@ApiModelProperty(value = "供应商名称")
+	private String corpName;
+
 }

+ 36 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderFreightVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.vo;
+
+import org.springblade.purchase.sales.entity.OrderFreight;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 运费明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "OrderFreightVO对象", description = "运费明细表")
+public class OrderFreightVO extends OrderFreight {
+	private static final long serialVersionUID = 1L;
+
+}

+ 35 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/Order.java

@@ -511,6 +511,41 @@ public class Order extends OrderBase {
 	@ApiModelProperty(value = "采购商名称")
 	@TableField(exist = false)
 	private String strPurchaserName;
+	/**
+	 * 箱型
+	 */
+	@ApiModelProperty(value = "箱型")
+	private String boxPile;
+	/**
+	 * 箱量
+	 */
+	@ApiModelProperty(value = "箱量")
+	private BigDecimal boxNumber;
+	/**
+	 * 起订量
+	 */
+	@ApiModelProperty(value = "起订量")
+	private BigDecimal minOrder;
+	/**
+	 * 预计海运费
+	 */
+	@ApiModelProperty(value = "预计海运费")
+	private BigDecimal predictOceanFreight;
+	/**
+	 * 参考海运费
+	 */
+	@ApiModelProperty(value = "参考海运费")
+	private BigDecimal referenceOceanFreight;
+	/**
+	 * 采购备注
+	 */
+	@ApiModelProperty(value = "采购备注")
+	private String purchaseRemark;
+	/**
+	 * 船务备注
+	 */
+	@ApiModelProperty(value = "船务备注")
+	private String shippingRemark;
 
 
 }

+ 120 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/OrderFreight.java

@@ -0,0 +1,120 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 运费明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Data
+@TableName("business_order_freight")
+@ApiModel(value = "OrderFreight对象", description = "运费明细表")
+public class OrderFreight implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 船公司
+	*/
+		@ApiModelProperty(value = "船公司")
+		private Long shippingHouse;
+	/**
+	* 船期
+	*/
+		@ApiModelProperty(value = "船期")
+		private Date sailSchedule;
+	/**
+	* 运费
+	*/
+		@ApiModelProperty(value = "运费")
+		private BigDecimal oceanFreight;
+	/**
+	* 是否重点推荐 0 否 1 是
+	*/
+		@ApiModelProperty(value = "是否重点推荐 0 否 1 是")
+		private Integer priorityReferrer;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 20 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/OrderItems.java

@@ -307,4 +307,24 @@ public class OrderItems extends OrderBase {
 	 */
 	@ApiModelProperty(value = "箱号")
 	private String cntrNo;
+	/**
+	 * 供应商
+	 */
+	@ApiModelProperty(value = "供应商")
+	private Long corpId;
+	/**
+	 * 是否重点推荐 0 否 1 是
+	 */
+	@ApiModelProperty(value = "是否重点推荐 0 否 1 是")
+	private Integer priorityReferrer;
+	/**
+	 * 推荐理由
+	 */
+	@ApiModelProperty(value = "推荐理由")
+	private String referrerReason;
+	/**
+	 * 供应商名称
+	 */
+	@ApiModelProperty(value = "供应商名称")
+	private String corpName;
 }

+ 37 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/vo/OrderFreightVO.java

@@ -0,0 +1,37 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.vo;
+
+
+import com.trade.purchase.order.entity.OrderFreight;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 运费明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "OrderFreightVO对象", description = "运费明细表")
+public class OrderFreightVO extends OrderFreight {
+	private static final long serialVersionUID = 1L;
+
+}

+ 2 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryItemsServiceImpl.java

@@ -169,8 +169,10 @@ public class DeliveryItemsServiceImpl extends ServiceImpl<DeliveryItemsMapper, D
 			contractNumber = deliveryItems.getContractNumber();//合同号
 		}else if (tradeType.equals(OrderTypeEnum.DOMESTIC.getType())){//国内
 			corpId = null;
+			storageId = null;
 		}else if (tradeType.equals(OrderTypeEnum.EXPORT.getType())){//出口
 			storageId = null;
+			corpId = null;
 		}
 		R<StockGoodsVO> goodsVOR = stockGoodsClient.selectStock(corpId, storageId, deliveryItems.getItemId(), itemType, lotNo, cntrNo, billNo, contractNumber);
 		if (goodsVOR.isSuccess()){

+ 2 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryServiceImpl.java

@@ -99,10 +99,12 @@ public class DeliveryServiceImpl extends ServiceImpl<DeliveryMapper, Delivery> i
 			delivery.setCreateUser(SecureUtil.getUserId());
 			delivery.setCreateTime(new Date());
 			delivery.setTenantId(SecureUtil.getTenantId());
+			delivery.setDeliveryStatus("录入");
 			baseMapper.insert(delivery);
 		}else {
 			delivery.setUpdateUser(SecureUtil.getUserId());
 			delivery.setUpdateTime(new Date());
+			delivery.setDeliveryStatus("录入");
 			baseMapper.updateById(delivery);
 		}
 		//保存发货明细信息

+ 126 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/controller/OrderFreightController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.purchase.sales.entity.OrderFreight;
+import org.springblade.purchase.sales.vo.OrderFreightVO;
+import org.springblade.purchase.sales.service.IOrderFreightService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 运费明细表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/orderfreight")
+@Api(value = "运费明细表", tags = "运费明细表接口")
+public class OrderFreightController extends BladeController {
+
+	private final IOrderFreightService orderFreightService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderFreight")
+	public R<OrderFreight> detail(OrderFreight orderFreight) {
+		OrderFreight detail = orderFreightService.getOne(Condition.getQueryWrapper(orderFreight));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 运费明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入orderFreight")
+	public R<IPage<OrderFreight>> list(OrderFreight orderFreight, Query query) {
+		IPage<OrderFreight> pages = orderFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(orderFreight));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 运费明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入orderFreight")
+	public R<IPage<OrderFreightVO>> page(OrderFreightVO orderFreight, Query query) {
+		IPage<OrderFreightVO> pages = orderFreightService.selectOrderFreightPage(Condition.getPage(query), orderFreight);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 运费明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入orderFreight")
+	public R save(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.save(orderFreight));
+	}
+
+	/**
+	 * 修改 运费明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderFreight")
+	public R update(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.updateById(orderFreight));
+	}
+
+	/**
+	 * 新增或修改 运费明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入orderFreight")
+	public R submit(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.saveOrUpdate(orderFreight));
+	}
+
+	
+	/**
+	 * 删除 运费明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(orderFreightService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderFreightMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.mapper;
+
+import org.springblade.purchase.sales.entity.OrderFreight;
+import org.springblade.purchase.sales.vo.OrderFreightVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 运费明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+public interface OrderFreightMapper extends BaseMapper<OrderFreight> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderFreight
+	 * @return
+	 */
+	List<OrderFreightVO> selectOrderFreightPage(IPage page, OrderFreightVO orderFreight);
+
+}

+ 29 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderFreightMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.purchase.sales.mapper.OrderFreightMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderFreightResultMap" type="org.springblade.purchase.sales.entity.OrderFreight">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="shipping_house" property="shippingHouse"/>
+        <result column="sail_schedule" property="sailSchedule"/>
+        <result column="ocean_freight" property="oceanFreight"/>
+        <result column="priority_referrer" property="priorityReferrer"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectOrderFreightPage" resultMap="orderFreightResultMap">
+        select * from business_order_freight where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderFreightService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.service;
+
+import org.springblade.purchase.sales.entity.OrderFreight;
+import org.springblade.purchase.sales.vo.OrderFreightVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 运费明细表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+public interface IOrderFreightService extends IService<OrderFreight> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderFreight
+	 * @return
+	 */
+	IPage<OrderFreightVO> selectOrderFreightPage(IPage<OrderFreightVO> page, OrderFreightVO orderFreight);
+
+}

+ 41 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderFreightServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.service.impl;
+
+import org.springblade.purchase.sales.entity.OrderFreight;
+import org.springblade.purchase.sales.vo.OrderFreightVO;
+import org.springblade.purchase.sales.mapper.OrderFreightMapper;
+import org.springblade.purchase.sales.service.IOrderFreightService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 运费明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Service
+public class OrderFreightServiceImpl extends ServiceImpl<OrderFreightMapper, OrderFreight> implements IOrderFreightService {
+
+	@Override
+	public IPage<OrderFreightVO> selectOrderFreightPage(IPage<OrderFreightVO> page, OrderFreightVO orderFreight) {
+		return page.setRecords(baseMapper.selectOrderFreightPage(page, orderFreight));
+	}
+
+}

+ 20 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/PurchaseEnquiry.java

@@ -1,6 +1,7 @@
 package com.trade.purchase.enquiry;
 
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import com.trade.purchase.order.dto.OrderSubmitDto;
 import com.trade.purchase.order.entity.Order;
@@ -208,5 +209,24 @@ public class PurchaseEnquiry  extends BladeController {
 		order.setTradeType(OrderTypeEnum.EXPORT.getType());
 		return orderService.savePurchaseEnquiry(order);
 	}
+	/**
+	 * 报价单生成采购询价
+	 * @param order
+	 * @return
+	 */
+	@PostMapping("/submitMessage")
+	@ApiOperationSupport(order = 10)
+	@ApiOperation(value = "报价单生成采购询价单", notes = "传入order的id")
+	public R<OrderVO> submitMessage(@Valid @RequestBody Order order){
+		if (order.getId() == null){
+			throw new RuntimeException("请选择确认的单据");
+		}
+		if (StringUtils.isNotBlank(order.getOrderStatus()) && order.getOrderStatus().equals("已提交")) {
+			throw new RuntimeException("请勿重复提交");
+		}
+		order.setBillType(OrderTypeEnum.PURCHASE_ENQUIRY.getType());
+		order.setTradeType(OrderTypeEnum.EXPORT.getType());
+		return orderService.submit(order);
+	}
 
 }

+ 126 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/controller/OrderFreightController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.purchase.order.entity.OrderFreight;
+import com.trade.purchase.order.service.IOrderFreightService;
+import com.trade.purchase.order.vo.OrderFreightVO;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 运费明细表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/freight")
+@Api(value = "运费明细表", tags = "运费明细表接口")
+public class OrderFreightController extends BladeController {
+
+	private final IOrderFreightService orderFreightService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入orderFreight")
+	public R<OrderFreight> detail(OrderFreight orderFreight) {
+		OrderFreight detail = orderFreightService.getOne(Condition.getQueryWrapper(orderFreight));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 运费明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入orderFreight")
+	public R<IPage<OrderFreight>> list(OrderFreight orderFreight, Query query) {
+		IPage<OrderFreight> pages = orderFreightService.page(Condition.getPage(query), Condition.getQueryWrapper(orderFreight));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 运费明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入orderFreight")
+	public R<IPage<OrderFreightVO>> page(OrderFreightVO orderFreight, Query query) {
+		IPage<OrderFreightVO> pages = orderFreightService.selectOrderFreightPage(Condition.getPage(query), orderFreight);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 运费明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入orderFreight")
+	public R save(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.save(orderFreight));
+	}
+
+	/**
+	 * 修改 运费明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入orderFreight")
+	public R update(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.updateById(orderFreight));
+	}
+
+	/**
+	 * 新增或修改 运费明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入orderFreight")
+	public R submit(@Valid @RequestBody OrderFreight orderFreight) {
+		return R.status(orderFreightService.saveOrUpdate(orderFreight));
+	}
+
+
+	/**
+	 * 删除 运费明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(orderFreightService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 43 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderFreightMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.mapper;
+
+import com.trade.purchase.order.entity.OrderFreight;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.trade.purchase.order.vo.OrderFreightVO;
+
+import java.util.List;
+
+/**
+ * 运费明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+public interface OrderFreightMapper extends BaseMapper<OrderFreight> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderFreight
+	 * @return
+	 */
+	List<OrderFreightVO> selectOrderFreightPage(IPage page, OrderFreightVO orderFreight);
+
+}

+ 29 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderFreightMapper.xml

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.trade.purchase.order.mapper.OrderFreightMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderFreightResultMap" type="com.trade.purchase.order.entity.OrderFreight">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="shipping_house" property="shippingHouse"/>
+        <result column="sail_schedule" property="sailSchedule"/>
+        <result column="ocean_freight" property="oceanFreight"/>
+        <result column="priority_referrer" property="priorityReferrer"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectOrderFreightPage" resultMap="orderFreightResultMap">
+        select * from business_order_freight where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/IOrderFreightService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.trade.purchase.order.entity.OrderFreight;
+import com.trade.purchase.order.vo.OrderFreightVO;
+
+/**
+ * 运费明细表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+public interface IOrderFreightService extends IService<OrderFreight> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param orderFreight
+	 * @return
+	 */
+	IPage<OrderFreightVO> selectOrderFreightPage(IPage<OrderFreightVO> page, OrderFreightVO orderFreight);
+
+}

+ 6 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/IOrderService.java

@@ -89,6 +89,12 @@ public interface IOrderService extends IService<Order> {
 	 * @return
 	 */
 	void check(OrderVO order);
+	/**
+	 * 提交购询价单
+	 * @param order
+	 * @return
+	 */
+	R<OrderVO> submit(Order order);
 
 	IPage<OrderDTO>  listOrderItem(IPage<OrderDTO> iPage, String tradeType, String orderNo,  Long corpId,  String startDate,String endDate);
 

+ 42 - 0
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/impl/OrderFreightServiceImpl.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.trade.purchase.order.service.impl;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.trade.purchase.order.entity.OrderFreight;
+import com.trade.purchase.order.mapper.OrderFreightMapper;
+import com.trade.purchase.order.service.IOrderFreightService;
+import com.trade.purchase.order.vo.OrderFreightVO;
+import org.springframework.stereotype.Service;
+
+/**
+ * 运费明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-18
+ */
+@Service
+public class OrderFreightServiceImpl extends ServiceImpl<OrderFreightMapper, OrderFreight> implements IOrderFreightService {
+
+	@Override
+	public IPage<OrderFreightVO> selectOrderFreightPage(IPage<OrderFreightVO> page, OrderFreightVO orderFreight) {
+		return page.setRecords(baseMapper.selectOrderFreightPage(page, orderFreight));
+	}
+
+}