lazhaoqian hace 3 años
padre
commit
c6c3d1a7f8
Se han modificado 23 ficheros con 1122 adiciones y 11 borrados
  1. 34 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/dto/ParitiesDTO.java
  2. 34 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/dto/ParitiesItemDTO.java
  3. 145 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/entity/Parities.java
  4. 141 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/entity/ParitiesItem.java
  5. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/vo/ParitiesItemVO.java
  6. 36 0
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/vo/ParitiesVO.java
  7. 1 0
      blade-service/blade-client/src/main/java/org/springblade/client/corps/controller/CorpsDescController.java
  8. 2 0
      blade-service/blade-client/src/main/java/org/springblade/client/corps/mapper/CorpsDescMapper.java
  9. 174 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/controller/ParitiesController.java
  10. 140 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/controller/ParitiesItemController.java
  11. 43 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesItemMapper.java
  12. 32 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesItemMapper.xml
  13. 43 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesMapper.java
  14. 29 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesMapper.xml
  15. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/service/IParitiesItemService.java
  16. 49 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/service/IParitiesService.java
  17. 41 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/service/impl/ParitiesItemServiceImpl.java
  18. 80 0
      blade-service/blade-client/src/main/java/org/springblade/client/parities/service/impl/ParitiesServiceImpl.java
  19. 7 3
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/export/ExportEnquiryController.java
  20. 4 2
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/export/ExportOrderController.java
  21. 2 2
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderServiceImpl.java
  22. 4 2
      blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/PurchaseEnquiry.java
  23. 4 2
      blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/ShippingEnquiry.java

+ 34 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/dto/ParitiesDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      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.client.parities.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.client.parities.entity.Parities;
+
+/**
+ * 汇率管理主表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ParitiesDTO extends Parities {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/dto/ParitiesItemDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      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.client.parities.dto;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.client.parities.entity.ParitiesItem;
+
+/**
+ * 汇率管理明细表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ParitiesItemDTO extends ParitiesItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 145 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/entity/Parities.java

@@ -0,0 +1,145 @@
+/*
+ *      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.client.parities.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 汇率管理主表实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@TableName("basic_parities")
+@ApiModel(value = "Parities对象", description = "汇率管理主表")
+public class Parities implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 货币代码
+	*/
+		@ApiModelProperty(value = "货币代码")
+		private String code;
+	/**
+	* 货币名称
+	*/
+		@ApiModelProperty(value = "货币名称")
+		private String cname;
+	/**
+	* 符号
+	*/
+		@ApiModelProperty(value = "符号")
+		private String symbol;
+	/**
+	* 本位币 0 否 1 是
+	*/
+		@ApiModelProperty(value = "本位币 0 否 1 是")
+		private Integer standardMoney;
+	/**
+	* 默认汇率
+	*/
+		@ApiModelProperty(value = "默认汇率")
+		private BigDecimal parities;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	 * 汇率明细
+	 */
+		@ApiModelProperty(value = "汇率明细")
+		@TableField(exist = false)
+		private List<ParitiesItem> paritiesItemList;
+	/**
+	 * 创建人中文名
+	 */
+		@ApiModelProperty(value = "创建人中文名")
+		@TableField(exist = false)
+		private String createUserName;
+	/**
+	 * 修改人中文名
+	 */
+		@ApiModelProperty(value = "修改人中文名")
+		@TableField(exist = false)
+		private String updateUserName;
+
+}

+ 141 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/entity/ParitiesItem.java

@@ -0,0 +1,141 @@
+/*
+ *      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.client.parities.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 汇率管理明细表实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@TableName("basic_parities_item")
+@ApiModel(value = "ParitiesItem对象", description = "汇率管理明细表")
+public class ParitiesItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 年
+	*/
+		@ApiModelProperty(value = "年")
+		private String annual;
+	/**
+	* 月
+	*/
+		@ApiModelProperty(value = "月")
+		private String moon;
+	/**
+	* 日
+	*/
+		@ApiModelProperty(value = "日")
+		private String national;
+	/**
+	* 应收汇率
+	*/
+		@ApiModelProperty(value = "应收汇率")
+		private BigDecimal receivableParities;
+	/**
+	* 应付汇率
+	*/
+		@ApiModelProperty(value = "应付汇率")
+		private BigDecimal handleParities;
+	/**
+	* 实收汇率
+	*/
+		@ApiModelProperty(value = "实收汇率")
+		private BigDecimal receiptsParities;
+	/**
+	* 实付汇率
+	*/
+		@ApiModelProperty(value = "实付汇率")
+		private BigDecimal actuallyParities;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@TableLogic
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+
+
+}

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/vo/ParitiesItemVO.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.client.parities.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import org.springblade.client.parities.entity.ParitiesItem;
+
+/**
+ * 汇率管理明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParitiesItemVO对象", description = "汇率管理明细表")
+public class ParitiesItemVO extends ParitiesItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-client-api/src/main/java/org/springblade/client/parities/vo/ParitiesVO.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.client.parities.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import org.springblade.client.parities.entity.Parities;
+
+/**
+ * 汇率管理主表视图实体类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ParitiesVO对象", description = "汇率管理主表")
+public class ParitiesVO extends Parities {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 0
blade-service/blade-client/src/main/java/org/springblade/client/corps/controller/CorpsDescController.java

@@ -16,6 +16,7 @@ import org.springblade.client.corps.service.ICorpsDescService;
 import org.springblade.client.entity.CorpsDesc;
 import org.springblade.client.vo.CorpsDescVO;
 import org.springblade.core.boot.ctrl.BladeController;
+import org.springblade.core.datascope.annotation.DataAuth;
 import org.springblade.core.excel.util.ExcelUtil;
 import org.springblade.core.mp.support.Condition;
 import org.springblade.core.mp.support.Query;

+ 2 - 0
blade-service/blade-client/src/main/java/org/springblade/client/corps/mapper/CorpsDescMapper.java

@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.client.entity.CorpsDesc;
 import org.springblade.client.vo.CorpsDescVO;
+import org.springblade.core.datascope.annotation.DataAuth;
 
 import java.util.List;
 import java.util.Map;
@@ -24,6 +25,7 @@ public interface CorpsDescMapper extends BaseMapper<CorpsDesc> {
 	 * @param corpsDesc
 	 * @return
 	 */
+	@DataAuth(code = "adminProfiles")
 	List<CorpsDescVO> selectCorpsDescPage(IPage page, @Param("CorpsDesc") CorpsDescVO corpsDesc);
 
 	/**

+ 174 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/controller/ParitiesController.java

@@ -0,0 +1,174 @@
+/*
+ *      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.client.parities.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+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.client.parities.entity.ParitiesItem;
+import org.springblade.client.parities.service.IParitiesItemService;
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.parities.entity.Parities;
+import org.springblade.client.parities.vo.ParitiesVO;
+import org.springblade.client.parities.service.IParitiesService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 汇率管理主表 控制器
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/parities")
+@Api(value = "汇率管理主表", tags = "汇率管理主表接口")
+public class ParitiesController extends BladeController {
+
+	private final IParitiesService paritiesService;
+	private final IParitiesItemService paritiesItemService;
+	private final IUserClient userClient;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入parities")
+	public R<Parities> detail(Parities parities) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		Parities detail = paritiesService.getOne(Condition.getQueryWrapper(parities));
+		if (detail != null){
+			//获取明细数据
+			LambdaQueryWrapper<ParitiesItem> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			lambdaQueryWrapper.eq(ParitiesItem::getPid,detail.getId());
+			lambdaQueryWrapper.eq(ParitiesItem::getIsDeleted,0);
+			lambdaQueryWrapper.eq(ParitiesItem::getTenantId, SecureUtil.getTenantId());
+			detail.setParitiesItemList(paritiesItemService.list(lambdaQueryWrapper));
+		}
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 汇率管理主表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入parities")
+	public R<IPage<Parities>> list(Parities parities, Query query) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		IPage<Parities> pages = paritiesService.page(Condition.getPage(query), Condition.getQueryWrapper(parities));
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().stream().forEach(item ->{
+				R<User> create = userClient.userInfoById(item.getCreateUser());
+				if (create.isSuccess() && create.getData() != null){
+					item.setCreateUserName(create.getData().getName());
+				}
+				if (item.getUpdateUser() !=null){
+					R<User> update = userClient.userInfoById(item.getUpdateUser());
+					if (update.isSuccess() && update.getData() != null){
+						item.setUpdateUserName(update.getData().getName());
+					}
+				}
+			});
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 汇率管理主表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入parities")
+	public R<IPage<ParitiesVO>> page(ParitiesVO parities, Query query) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		IPage<ParitiesVO> pages = paritiesService.selectParitiesPage(Condition.getPage(query), parities);
+		if (CollectionUtils.isNotEmpty(pages.getRecords())){
+			pages.getRecords().stream().forEach(item ->{
+				R<User> create = userClient.userInfoById(item.getCreateUser());
+				if (create.isSuccess() && create.getData() != null){
+					item.setCreateUserName(create.getData().getName());
+				}
+				if (item.getUpdateUser() !=null){
+					R<User> update = userClient.userInfoById(item.getUpdateUser());
+					if (update.isSuccess() && update.getData() != null){
+						item.setUpdateUserName(update.getData().getName());
+					}
+				}
+			});
+		}
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 汇率管理主表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入parities")
+	public R save(@Valid @RequestBody Parities parities) {
+		return R.status(paritiesService.save(parities));
+	}
+
+	/**
+	 * 修改 汇率管理主表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入parities")
+	public R update(@Valid @RequestBody Parities parities) {
+		return R.status(paritiesService.updateById(parities));
+	}
+
+	/**
+	 * 新增或修改 汇率管理主表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入parities")
+	public R submit(@Valid @RequestBody Parities parities) {
+		return R.status(paritiesService.saveOrUpdate(parities));
+	}
+
+
+	/**
+	 * 删除 汇率管理主表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(paritiesService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 140 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/controller/ParitiesItemController.java

@@ -0,0 +1,140 @@
+/*
+ *      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.client.parities.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.secure.utils.SecureUtil;
+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.client.parities.entity.ParitiesItem;
+import org.springblade.client.parities.vo.ParitiesItemVO;
+import org.springblade.client.parities.service.IParitiesItemService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.Date;
+
+/**
+ * 汇率管理明细表 控制器
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/paritiesitem")
+@Api(value = "汇率管理明细表", tags = "汇率管理明细表接口")
+public class ParitiesItemController extends BladeController {
+
+	private final IParitiesItemService paritiesItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入paritiesItem")
+	public R<ParitiesItem> detail(ParitiesItem paritiesItem) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		ParitiesItem detail = paritiesItemService.getOne(Condition.getQueryWrapper(paritiesItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 汇率管理明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入paritiesItem")
+	public R<IPage<ParitiesItem>> list(ParitiesItem paritiesItem, Query query) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		IPage<ParitiesItem> pages = paritiesItemService.page(Condition.getPage(query), Condition.getQueryWrapper(paritiesItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 汇率管理明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入paritiesItem")
+	public R<IPage<ParitiesItemVO>> page(ParitiesItemVO paritiesItem, Query query) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		IPage<ParitiesItemVO> pages = paritiesItemService.selectParitiesItemPage(Condition.getPage(query), paritiesItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 汇率管理明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入paritiesItem")
+	public R save(@Valid @RequestBody ParitiesItem paritiesItem) {
+		return R.status(paritiesItemService.save(paritiesItem));
+	}
+
+	/**
+	 * 修改 汇率管理明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入paritiesItem")
+	public R update(@Valid @RequestBody ParitiesItem paritiesItem) {
+		return R.status(paritiesItemService.updateById(paritiesItem));
+	}
+
+	/**
+	 * 新增或修改 汇率管理明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入paritiesItem")
+	public R submit(@Valid @RequestBody ParitiesItem paritiesItem) {
+		paritiesItem.setTenantId(SecureUtil.getTenantId());
+		if (paritiesItem.getId() == null){
+			paritiesItem.setCreateUser(SecureUtil.getUserId());
+			paritiesItem.setCreateTime(new Date());
+		}else {
+			paritiesItem.setUpdateUser(SecureUtil.getUserId());
+			paritiesItem.setUpdateTime(new Date());
+		}
+		return R.status(paritiesItemService.saveOrUpdate(paritiesItem));
+	}
+
+
+	/**
+	 * 删除 汇率管理明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(paritiesItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 43 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesItemMapper.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 org.springblade.client.parities.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.parities.entity.ParitiesItem;
+import org.springblade.client.parities.vo.ParitiesItemVO;
+
+import java.util.List;
+
+/**
+ * 汇率管理明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface ParitiesItemMapper extends BaseMapper<ParitiesItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param paritiesItem
+	 * @return
+	 */
+	List<ParitiesItemVO> selectParitiesItemPage(IPage page, ParitiesItemVO paritiesItem);
+
+}

+ 32 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesItemMapper.xml

@@ -0,0 +1,32 @@
+<?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.client.parities.mapper.ParitiesItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="paritiesItemResultMap" type="org.springblade.client.parities.entity.ParitiesItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="annual" property="annual"/>
+        <result column="moon" property="moon"/>
+        <result column="national" property="national"/>
+        <result column="receivable_parities" property="receivableParities"/>
+        <result column="handle_parities" property="handleParities"/>
+        <result column="receipts_parities" property="receiptsParities"/>
+        <result column="actually_parities" property="actuallyParities"/>
+        <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="selectParitiesItemPage" resultMap="paritiesItemResultMap">
+        select * from basic_parities_item where is_deleted = 0
+    </select>
+
+</mapper>

+ 43 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesMapper.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 org.springblade.client.parities.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.parities.entity.Parities;
+import org.springblade.client.parities.vo.ParitiesVO;
+
+import java.util.List;
+
+/**
+ * 汇率管理主表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface ParitiesMapper extends BaseMapper<Parities> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parities
+	 * @return
+	 */
+	List<ParitiesVO> selectParitiesPage(IPage page, ParitiesVO parities);
+
+}

+ 29 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/mapper/ParitiesMapper.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.client.parities.mapper.ParitiesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="paritiesResultMap" type="org.springblade.client.parities.entity.Parities">
+        <id column="id" property="id"/>
+        <result column="code" property="code"/>
+        <result column="cname" property="cname"/>
+        <result column="symbol" property="symbol"/>
+        <result column="standard_money" property="standardMoney"/>
+        <result column="parities" property="parities"/>
+        <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="selectParitiesPage" resultMap="paritiesResultMap">
+        select * from basic_parities where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/service/IParitiesItemService.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.client.parities.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.client.parities.entity.ParitiesItem;
+import org.springblade.client.parities.vo.ParitiesItemVO;
+
+/**
+ * 汇率管理明细表 服务类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface IParitiesItemService extends IService<ParitiesItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param paritiesItem
+	 * @return
+	 */
+	IPage<ParitiesItemVO> selectParitiesItemPage(IPage<ParitiesItemVO> page, ParitiesItemVO paritiesItem);
+
+}

+ 49 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/service/IParitiesService.java

@@ -0,0 +1,49 @@
+/*
+ *      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.client.parities.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import lombok.AllArgsConstructor;
+import org.springblade.client.parities.entity.Parities;
+import org.springblade.client.parities.vo.ParitiesVO;
+
+/**
+ * 汇率管理主表 服务类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+public interface IParitiesService extends IService<Parities> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param parities
+	 * @return
+	 */
+	IPage<ParitiesVO> selectParitiesPage(IPage<ParitiesVO> page, ParitiesVO parities);
+
+	/**
+	 * 保存汇率信息
+	 * @param parities
+	 * @return
+	 */
+	Parities saveParities(Parities parities);
+
+}

+ 41 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/service/impl/ParitiesItemServiceImpl.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.client.parities.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.client.parities.entity.ParitiesItem;
+import org.springblade.client.parities.mapper.ParitiesItemMapper;
+import org.springblade.client.parities.service.IParitiesItemService;
+import org.springblade.client.parities.vo.ParitiesItemVO;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 汇率管理明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Service
+public class ParitiesItemServiceImpl extends ServiceImpl<ParitiesItemMapper, ParitiesItem> implements IParitiesItemService {
+
+	@Override
+	public IPage<ParitiesItemVO> selectParitiesItemPage(IPage<ParitiesItemVO> page, ParitiesItemVO paritiesItem) {
+		return page.setRecords(baseMapper.selectParitiesItemPage(page, paritiesItem));
+	}
+
+}

+ 80 - 0
blade-service/blade-client/src/main/java/org/springblade/client/parities/service/impl/ParitiesServiceImpl.java

@@ -0,0 +1,80 @@
+/*
+ *      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.client.parities.service.impl;
+
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import org.springblade.client.parities.entity.Parities;
+import org.springblade.client.parities.mapper.ParitiesItemMapper;
+import org.springblade.client.parities.mapper.ParitiesMapper;
+import org.springblade.client.parities.service.IParitiesService;
+import org.springblade.client.parities.vo.ParitiesVO;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+
+/**
+ * 汇率管理主表 服务实现类
+ *
+ * @author BladeX
+ * @since 2022-03-22
+ */
+@Service
+@AllArgsConstructor
+public class ParitiesServiceImpl extends ServiceImpl<ParitiesMapper, Parities> implements IParitiesService {
+
+	private final ParitiesItemMapper paritiesItemMapper;
+	@Override
+	public IPage<ParitiesVO> selectParitiesPage(IPage<ParitiesVO> page, ParitiesVO parities) {
+		return page.setRecords(baseMapper.selectParitiesPage(page, parities));
+	}
+
+	@Override
+	public Parities saveParities(Parities parities) {
+		parities.setTenantId(SecureUtil.getTenantId());
+		if (parities.getId() == null){
+			parities.setCreateTime(new Date());
+			parities.setCreateUser(SecureUtil.getUserId());
+			baseMapper.insert(parities);
+		}else {
+			parities.setUpdateTime(new Date());
+			parities.setUpdateUser(SecureUtil.getUserId());
+			baseMapper.updateById(parities);
+		}
+		if (CollectionUtils.isNotEmpty(parities.getParitiesItemList())){
+			parities.getParitiesItemList().stream().forEach(item ->{
+				item.setPid(parities.getId());
+				item.setTenantId(SecureUtil.getTenantId());
+				if (item.getId() == null){
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					paritiesItemMapper.insert(item);
+				}else {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					paritiesItemMapper.updateById(item);
+				}
+			});
+		}
+		return parities;
+	}
+
+}

+ 7 - 3
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/export/ExportEnquiryController.java

@@ -143,8 +143,10 @@ public class ExportEnquiryController extends BladeController {
 				List<OrderItems> list = orderItemsService.list(new QueryWrapper<OrderItems>().eq("pid", item.getId()).eq("is_deleted", 0));
 				if (CollectionUtils.isNotEmpty(list)){
 					item.setOrderQuantity(list.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//数量合计
-					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//销售金额
-					item.setPurchaseAmount(list.stream().map(OrderItems::getPurchaseAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//采购金额
+					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add).multiply(item.getExchangeRate()));//销售金额
+					item.setPurchaseAmount(list.stream().filter(e -> e.getPurchaseAmount() != null).reduce(BigDecimal.ZERO,(x,y) ->{
+						return x.add((y.getPurchaseAmount().add(y.getPartsPrice())).multiply(y.getOrderQuantity()));
+					},BigDecimal::add));//采购金额
 					item.setActualQuantity(list.stream().map(OrderItems::getActualQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//发货数量
 				}
 
@@ -305,7 +307,9 @@ public class ExportEnquiryController extends BladeController {
 				if (CollectionUtils.isNotEmpty(list)){
 					item.setOrderQuantity(list.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//数量合计
 					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//销售金额
-					item.setPurchaseAmount(list.stream().map(OrderItems::getPurchaseAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//采购金额
+					item.setPurchaseAmount(list.stream().filter(e -> e.getPurchaseAmount() != null).reduce(BigDecimal.ZERO,(x,y) ->{
+						return x.add((y.getPurchaseAmount().add(y.getPartsPrice())).multiply(y.getOrderQuantity()));
+					},BigDecimal::add));//采购金额
 					item.setActualQuantity(list.stream().map(OrderItems::getActualQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//发货数量
 				}
 

+ 4 - 2
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/export/ExportOrderController.java

@@ -152,8 +152,10 @@ public class ExportOrderController extends BladeController {
 				List<OrderItems> list = orderItemsService.list(new QueryWrapper<OrderItems>().eq("pid", item.getId()).eq("is_deleted", 0));
 				if (CollectionUtils.isNotEmpty(list)){
 					item.setOrderQuantity(list.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//数量合计
-					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//销售金额
-					item.setPurchaseAmount(list.stream().map(OrderItems::getPurchaseAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//采购金额
+					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add).multiply(item.getExchangeRate()));//销售金额
+					item.setPurchaseAmount(list.stream().filter(e -> e.getPurchaseAmount() != null).reduce(BigDecimal.ZERO,(x,y) ->{
+						return x.add((y.getPurchaseAmount().add(y.getPartsPrice())).multiply(y.getOrderQuantity()));
+					},BigDecimal::add));//采购金额
 					item.setActualQuantity(list.stream().map(OrderItems::getActualQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//发货数量
 				}
 

+ 2 - 2
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderServiceImpl.java

@@ -251,10 +251,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 					return x.add(y.getPartsPrice().multiply(y.getOrderQuantity()));
 				}, BigDecimal::add);//配件金额求和
 				orderMessage.setGrossProfit(amount.multiply(order.getExchangeRate()).subtract((purchaseAmount.add(partsPrice))).setScale(2, BigDecimal.ROUND_HALF_UP));//毛利额
-				BigDecimal grossProfitRate = new BigDecimal(BigInteger.ZERO).setScale(2, BigDecimal.ROUND_HALF_UP);
+				BigDecimal grossProfitRate = new BigDecimal(BigInteger.ZERO);
 				if ((amount.compareTo(BigDecimal.ZERO)) > 0) {
 					BigDecimal multiply = amount.multiply(order.getExchangeRate());
-					grossProfitRate = orderMessage.getGrossProfit().divide(multiply, 2, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100));
+					grossProfitRate = orderMessage.getGrossProfit().divide(multiply, 5, BigDecimal.ROUND_HALF_UP).multiply(new BigDecimal(100)).setScale(2,BigDecimal.ROUND_HALF_UP);
 				}
 				orderMessage.setGrossProfitRate(grossProfitRate);//毛利率
 			} else {

+ 4 - 2
blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/PurchaseEnquiry.java

@@ -150,8 +150,10 @@ public class PurchaseEnquiry  extends BladeController {
 				List<OrderItems> list = orderItemsService.list(new QueryWrapper<OrderItems>().eq("pid", item.getId()).eq("is_deleted", 0));
 				if (CollectionUtils.isNotEmpty(list)){
 					item.setOrderQuantity(list.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//数量合计
-					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//销售金额
-					item.setPurchaseAmount(list.stream().map(OrderItems::getPurchaseAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//采购金额
+					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add).multiply(item.getExchangeRate()));//销售金额
+					item.setPurchaseAmount(list.stream().filter(e -> e.getPurchaseAmount() != null).reduce(BigDecimal.ZERO,(x,y) ->{
+						return x.add((y.getPurchaseAmount().add(y.getPartsPrice())).multiply(y.getOrderQuantity()));
+					},BigDecimal::add));//采购金额
 					item.setActualQuantity(list.stream().map(OrderItems::getActualQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//发货数量
 				}
 

+ 4 - 2
blade-service/trade-purchase/src/main/java/com/trade/purchase/enquiry/ShippingEnquiry.java

@@ -145,8 +145,10 @@ public class ShippingEnquiry extends BladeController {
 				List<OrderItems> list = orderItemsService.list(new QueryWrapper<OrderItems>().eq("pid", item.getId()).eq("is_deleted", 0));
 				if (CollectionUtils.isNotEmpty(list)){
 					item.setOrderQuantity(list.stream().map(OrderItems::getOrderQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//数量合计
-					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//销售金额
-					item.setPurchaseAmount(list.stream().map(OrderItems::getPurchaseAmount).reduce(BigDecimal.ZERO,BigDecimal::add));//采购金额
+					item.setAmount(list.stream().map(OrderItems::getAmount).reduce(BigDecimal.ZERO,BigDecimal::add).multiply(item.getExchangeRate()));//销售金额
+					item.setPurchaseAmount(list.stream().filter(e -> e.getPurchaseAmount() != null).reduce(BigDecimal.ZERO,(x,y) ->{
+						return x.add((y.getPurchaseAmount().add(y.getPartsPrice())).multiply(y.getOrderQuantity()));
+					},BigDecimal::add));//采购金额
 					item.setActualQuantity(list.stream().map(OrderItems::getActualQuantity).reduce(BigDecimal.ZERO,BigDecimal::add));//发货数量
 				}