Explorar o código

2024年3月11日17:32:22

纪新园 %!s(int64=2) %!d(string=hai) anos
pai
achega
3ebab0df0e
Modificáronse 55 ficheiros con 1867 adicións e 227 borrados
  1. 34 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/dto/ExternalOrderDTO.java
  2. 34 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/dto/ExternalOrderItemDTO.java
  3. 215 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/entity/ExternalOrder.java
  4. 141 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/entity/ExternalOrderItem.java
  5. 36 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/vo/ExternalOrderItemVO.java
  6. 36 0
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/vo/ExternalOrderVO.java
  7. 7 7
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccountsServiceImpl.java
  8. 9 6
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/BAccElementsServiceImpl.java
  9. 10 9
      blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/BAccItemsTypeServiceImpl.java
  10. 6 3
      blade-service/blade-los/src/main/java/org/springblade/los/basic/balance/service/impl/BalanceCycleServiceImpl.java
  11. 9 6
      blade-service/blade-los/src/main/java/org/springblade/los/basic/cntr/service/impl/BCntrTypesServiceImpl.java
  12. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsServiceImpl.java
  13. 8 5
      blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsTypeDefineServiceImpl.java
  14. 11 8
      blade-service/blade-los/src/main/java/org/springblade/los/basic/cur/service/impl/BCurrencyServiceImpl.java
  15. 9 6
      blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/BFeesDefineServiceImpl.java
  16. 11 8
      blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/BFeesServiceImpl.java
  17. 11 8
      blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/LosBFeesTemplateServiceImpl.java
  18. 7 4
      blade-service/blade-los/src/main/java/org/springblade/los/basic/lines/service/impl/BLinesServiceImpl.java
  19. 5 2
      blade-service/blade-los/src/main/java/org/springblade/los/basic/modes/service/impl/BTradeModesServiceImpl.java
  20. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/ports/service/impl/BPortsServiceImpl.java
  21. 6 3
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsLogServiceImpl.java
  22. 5 5
      blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java
  23. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/terms/service/impl/BServiceTermsServiceImpl.java
  24. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/units/service/impl/BUnitsServiceImpl.java
  25. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/basic/vessels/service/impl/BVesselsServiceImpl.java
  26. 45 47
      blade-service/blade-los/src/main/java/org/springblade/los/business/aea/service/impl/AeaBillsServiceImpl.java
  27. 6 11
      blade-service/blade-los/src/main/java/org/springblade/los/business/amends/service/impl/AmendsServiceImpl.java
  28. 0 5
      blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java
  29. 45 48
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  30. 9 9
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java
  31. 3 3
      blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java
  32. 4 1
      blade-service/blade-los/src/main/java/org/springblade/los/edi/controller/EdiTypesController.java
  33. 13 6
      blade-service/blade-los/src/main/java/org/springblade/los/edi/service/impl/EdiTypesServiceImpl.java
  34. 1 1
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterServiceImpl.java
  35. 6 6
      blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java
  36. 126 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/controller/ExternalOrderController.java
  37. 126 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/controller/ExternalOrderItemController.java
  38. 42 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderItemMapper.java
  39. 34 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderItemMapper.xml
  40. 42 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderMapper.java
  41. 47 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderMapper.xml
  42. 41 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/IExternalOrderItemService.java
  43. 41 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/IExternalOrderService.java
  44. 41 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/impl/ExternalOrderItemServiceImpl.java
  45. 41 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/impl/ExternalOrderServiceImpl.java
  46. 80 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/Utils/HttpsUtils.java
  47. 21 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/Utils/MichelinValues.java
  48. 32 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/controller/ApiController.java
  49. 33 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/AckSalesOrderR.java
  50. 53 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/LinesDto.java
  51. 121 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/SalesOrderDto.java
  52. 37 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/SalesOrderR.java
  53. 15 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/service/IMichelinService.java
  54. 113 0
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/service/impl/MichelinServiceImpl.java
  55. 22 5
      blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ParamServiceServiceImpl.java

+ 34 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/dto/ExternalOrderDTO.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.salesPart.extemalOrder.dto;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 外部订单信息数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ExternalOrderDTO extends ExternalOrder {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/dto/ExternalOrderItemDTO.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.salesPart.extemalOrder.dto;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 外部订单明细数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class ExternalOrderItemDTO extends ExternalOrderItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 215 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/entity/ExternalOrder.java

@@ -0,0 +1,215 @@
+/*
+ *      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.salesPart.extemalOrder.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.core.secure.utils.AuthUtil;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDate;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 外部订单信息实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@TableName("pjpf_external_order")
+@ApiModel(value = "ExternalOrder对象", description = "外部订单信息")
+public class ExternalOrder implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 创建人
+	 */
+	@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;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId = AuthUtil.getTenantId();
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+	/**
+	 * AGENT-NLT代理商非长尾模式  	AGENT-LT 代理商长尾模式	TPLUS-NLT 驰加代管模式
+	 */
+	@ApiModelProperty(value = "AGENT-NLT代理商非长尾模式  	AGENT-LT 代理商长尾模式	TPLUS-NLT 驰加代管模式")
+	private String orderMode;
+	/**
+	 * OCT订单号
+	 */
+	@ApiModelProperty(value = "OCT订单号")
+	private String salesOrderNo;
+	/**
+	 * 客户代码
+	 */
+	@ApiModelProperty(value = "客户代码")
+	private String dealerNo;
+	/**
+	 * 客户组
+	 */
+	@ApiModelProperty(value = "客户组")
+	private String customerGroup;
+	/**
+	 * 是否为特批订单(不需要检查信用)
+	 */
+	@ApiModelProperty(value = "是否为特批订单(不需要检查信用)")
+	private String isSpecialApproval;
+	/**
+	 * waiting (待确认),confirm (已确认), shipped(已发运), canceled(已取消)
+	 */
+	@ApiModelProperty(value = "waiting (待确认),confirm (已确认), shipped(已发运), canceled(已取消)")
+	private String salesOrderStatus;
+	/**
+	 * 0为非紧急,1为紧急
+	 */
+	@ApiModelProperty(value = "0为非紧急,1为紧急")
+	private String isUrgent;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String orderRemark;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date creationTime;
+	/**
+	 * 客户名称
+	 */
+	@ApiModelProperty(value = "客户名称")
+	private String customerName;
+	/**
+	 * 发货仓库
+	 */
+	@ApiModelProperty(value = "发货仓库")
+	private String shipFromWarehouse;
+	/**
+	 * 运输方式:	standard-普通	urgent-加急	selfpick-自提
+	 */
+	@ApiModelProperty(value = "运输方式:	standard-普通	urgent-加急	selfpick-自提")
+	private String shippingMethod;
+	/**
+	 * 客户联系人
+	 */
+	@ApiModelProperty(value = "客户联系人")
+	private String dealerContacts;
+	/**
+	 * 客户联系人电话
+	 */
+	@ApiModelProperty(value = "客户联系人电话")
+	private String dealerMobile;
+	/**
+	 * 省份
+	 */
+	@ApiModelProperty(value = "省份")
+	private String dealerProvince;
+	/**
+	 * 城市
+	 */
+	@ApiModelProperty(value = "城市")
+	private String dealerCity;
+	/**
+	 * 区县
+	 */
+	@ApiModelProperty(value = "区县")
+	private String dealerDistrict;
+	/**
+	 * 地址
+	 */
+	@ApiModelProperty(value = "地址")
+	private String dealerAddress;
+	/**
+	 * 运费
+	 */
+	@ApiModelProperty(value = "运费")
+	private BigDecimal freight;
+	/**
+	 * 折扣金额
+	 */
+	@ApiModelProperty(value = "折扣金额")
+	private BigDecimal discountAmount;
+	/**
+	 * 返利金额
+	 */
+	@ApiModelProperty(value = "返利金额")
+	private BigDecimal rebateAmount;
+	/**
+	 * 订单金额小计(不含折扣和返利)
+	 */
+	@ApiModelProperty(value = "订单金额小计(不含折扣和返利)")
+	private BigDecimal orderSubTotal;
+	/**
+	 * 订单金额总计
+	 */
+	@ApiModelProperty(value = "订单金额总计")
+	private BigDecimal orderGrandTotal;
+	/**
+	 * 发货日期(yyyy/M/d)
+	 */
+	@ApiModelProperty(value = "发货日期(yyyy/M/d)")
+	private LocalDate shipDate;
+	@TableField(exist = false)
+	private List<ExternalOrderItem> externalOrderItemList;
+
+
+}

+ 141 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/entity/ExternalOrderItem.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.salesPart.extemalOrder.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.springblade.core.secure.utils.AuthUtil;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 外部订单明细实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@TableName("pjpf_external_order_item")
+@ApiModel(value = "ExternalOrderItem对象", description = "外部订单明细")
+public class ExternalOrderItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	private Long pid;
+	/**
+	 * 创建人
+	 */
+	@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;
+	/**
+	 * 租户id
+	 */
+	@ApiModelProperty(value = "租户id")
+	private String tenantId = AuthUtil.getTenantId();
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 订单状态
+	 */
+	@ApiModelProperty(value = "订单状态")
+	private String status;
+	/**
+	 * OCT订单行号
+	 */
+	@ApiModelProperty(value = "OCT订单行号")
+	private String lineNo;
+	/**
+	 * 产品编码,米其林CAI
+	 */
+	@ApiModelProperty(value = "产品编码,米其林CAI")
+	private String sku;
+	/**
+	 * 品名
+	 */
+	@ApiModelProperty(value = "品名")
+	private String name;
+	/**
+	 * 中文品牌名
+	 */
+	@ApiModelProperty(value = "中文品牌名")
+	private String brand;
+	/**
+	 * 规格
+	 */
+	@ApiModelProperty(value = "规格")
+	private String size;
+	/**
+	 * 花纹
+	 */
+	@ApiModelProperty(value = "花纹")
+	private String pattern;
+	/**
+	 * 类型(R为子午线,否则为斜交胎)
+	 */
+	@ApiModelProperty(value = "类型(R为子午线,否则为斜交胎)")
+	private String structure;
+	/**
+	 * 计量单位
+	 */
+	@ApiModelProperty(value = "计量单位")
+	private String uom;
+	/**
+	 * 数量
+	 */
+	@ApiModelProperty(value = "数量")
+	private BigDecimal quantity;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal unitPrice;
+
+
+}

+ 36 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/vo/ExternalOrderItemVO.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.salesPart.extemalOrder.vo;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 外部订单明细视图实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ExternalOrderItemVO对象", description = "外部订单明细")
+public class ExternalOrderItemVO extends ExternalOrderItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/extemalOrder/vo/ExternalOrderVO.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.salesPart.extemalOrder.vo;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 外部订单信息视图实体类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "ExternalOrderVO对象", description = "外部订单信息")
+public class ExternalOrderVO extends ExternalOrder {
+	private static final long serialVersionUID = 1L;
+
+}

+ 7 - 7
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/AccountsServiceImpl.java

@@ -96,9 +96,9 @@ public class AccountsServiceImpl extends ServiceImpl<AccountsMapper, Accounts> i
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -124,10 +124,10 @@ public class AccountsServiceImpl extends ServiceImpl<AccountsMapper, Accounts> i
 			accounts.setCreateUser(AuthUtil.getUserId());
 			accounts.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				accounts.setCreateDept(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+				accounts.setCreateDept(deptUtils.getDeptPid()+"");
 				accounts.setBranchId(branchId);
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					accounts.setCreateDeptName(deptName);
 				}
@@ -176,7 +176,7 @@ public class AccountsServiceImpl extends ServiceImpl<AccountsMapper, Accounts> i
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setCreateUserName(AuthUtil.getUserName());
-					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+					if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
 						item.setCreateDept(deptId);
 						item.setBranchId(branchId);
 						item.setCreateDeptName(deptName);

+ 9 - 6
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/BAccElementsServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.excel.BAccElementsExcel;
 import org.springblade.los.basic.acc.entity.BAccElements;
 import org.springblade.los.basic.acc.mapper.AccElementsMapper;
@@ -49,6 +50,8 @@ public class BAccElementsServiceImpl extends ServiceImpl<AccElementsMapper, BAcc
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BAccElementsVO> selectBAccElementsPage(IPage<BAccElementsVO> page, BAccElementsVO bAccElements) {
 		return page.setRecords(baseMapper.selectBAccElementsPage(page, bAccElements));
@@ -61,9 +64,9 @@ public class BAccElementsServiceImpl extends ServiceImpl<AccElementsMapper, BAcc
 			bAccElements.setCreateUser(AuthUtil.getUserId());
 			bAccElements.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bAccElements.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+				bAccElements.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bAccElements.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -95,9 +98,9 @@ public class BAccElementsServiceImpl extends ServiceImpl<AccElementsMapper, BAcc
 				bAccElements.setCreateUser(AuthUtil.getUserId());
 				bAccElements.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bAccElements.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+					bAccElements.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bAccElements.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 10 - 9
blade-service/blade-los/src/main/java/org/springblade/los/basic/acc/service/impl/BAccItemsTypeServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.excel.BAccItemsTypeExcel;
 import org.springblade.los.basic.acc.entity.BAccItems;
 import org.springblade.los.basic.acc.entity.BAccItemsType;
@@ -55,6 +56,8 @@ public class BAccItemsTypeServiceImpl extends ServiceImpl<AccItemsTypeMapper, BA
 
 	private final IBAccItemsService bAccItemsService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BAccItemsTypeVO> selectBAccItemsTypePage(IPage<BAccItemsTypeVO> page, BAccItemsTypeVO bAccItemsType) {
 		return page.setRecords(baseMapper.selectBAccItemsTypePage(page, bAccItemsType));
@@ -67,9 +70,9 @@ public class BAccItemsTypeServiceImpl extends ServiceImpl<AccItemsTypeMapper, BA
 		String deptId = "";
 		String deptName = "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -78,10 +81,8 @@ public class BAccItemsTypeServiceImpl extends ServiceImpl<AccItemsTypeMapper, BA
 			bAccItemsType.setCreateTime(new Date());
 			bAccItemsType.setCreateUser(AuthUtil.getUserId());
 			bAccItemsType.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
 				bAccItemsType.setCreateDept(deptId);
 				bAccItemsType.setCreateDeptName(deptName);
-			}
 		} else {
 			bAccItemsType.setUpdateUser(AuthUtil.getUserId());
 			bAccItemsType.setUpdateTime(new Date());
@@ -95,7 +96,7 @@ public class BAccItemsTypeServiceImpl extends ServiceImpl<AccItemsTypeMapper, BA
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setCreateUserName(AuthUtil.getUserName());
-					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+					if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 						item.setCreateDept(deptId);
 						item.setCreateDeptName(deptName);
 					}
@@ -142,9 +143,9 @@ public class BAccItemsTypeServiceImpl extends ServiceImpl<AccItemsTypeMapper, BA
 				bAccItemsType.setCreateUser(AuthUtil.getUserId());
 				bAccItemsType.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bAccItemsType.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					bAccItemsType.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bAccItemsType.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 6 - 3
blade-service/blade-los/src/main/java/org/springblade/los/basic/balance/service/impl/BalanceCycleServiceImpl.java

@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.balance.entity.BalanceCycle;
 import org.springblade.los.basic.balance.mapper.BalanceCycleMapper;
 import org.springblade.los.basic.balance.service.IBalanceCycleService;
@@ -47,6 +48,8 @@ public class BalanceCycleServiceImpl extends ServiceImpl<BalanceCycleMapper, Bal
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BalanceCycleVO> selectBalanceCyclePage(IPage<BalanceCycleVO> page, BalanceCycleVO balanceCycle) {
 		return page.setRecords(baseMapper.selectBalanceCyclePage(page, balanceCycle));
@@ -59,9 +62,9 @@ public class BalanceCycleServiceImpl extends ServiceImpl<BalanceCycleMapper, Bal
 			balanceCycle.setCreateUser(AuthUtil.getUserId());
 			balanceCycle.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				balanceCycle.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				balanceCycle.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					balanceCycle.setCreateDeptName(String.join(",", res.getData()));
 				}

+ 9 - 6
blade-service/blade-los/src/main/java/org/springblade/los/basic/cntr/service/impl/BCntrTypesServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.Util.RegularUtils;
 import org.springblade.los.basic.cntr.entity.BCntrTypes;
 import org.springblade.los.basic.cntr.mapper.CntrTypesMapper;
@@ -52,6 +53,8 @@ public class BCntrTypesServiceImpl extends ServiceImpl<CntrTypesMapper, BCntrTyp
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BCntrTypesVO> selectBCntrTypesPage(IPage<BCntrTypesVO> page, BCntrTypesVO bCntrTypes) {
 		return page.setRecords(baseMapper.selectBCntrTypesPage(page, bCntrTypes));
@@ -76,9 +79,9 @@ public class BCntrTypesServiceImpl extends ServiceImpl<CntrTypesMapper, BCntrTyp
 				throw new RuntimeException("海关编码已存在");
 			}
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bCntrTypes.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bCntrTypes.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bCntrTypes.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -128,9 +131,9 @@ public class BCntrTypesServiceImpl extends ServiceImpl<CntrTypesMapper, BCntrTyp
 				bCntrTypes.setCreateUser(AuthUtil.getUserId());
 				bCntrTypes.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bCntrTypes.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					bCntrTypes.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bCntrTypes.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsServiceImpl.java

@@ -95,7 +95,7 @@ public class BCorpsServiceImpl extends ServiceImpl<CorpsMapper, BCorps> implemen
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 			deptId = AuthUtil.getDeptId();
 			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 8 - 5
blade-service/blade-los/src/main/java/org/springblade/los/basic/corps/service/impl/BCorpsTypeDefineServiceImpl.java

@@ -29,6 +29,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.StringPool;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.excel.BCorpsTypeDefineExcel;
 import org.springblade.los.basic.corps.entity.BCorpsTypeDefine;
 import org.springblade.los.basic.corps.mapper.CorpsTypeDefineMapper;
@@ -54,6 +55,8 @@ public class BCorpsTypeDefineServiceImpl extends ServiceImpl<CorpsTypeDefineMapp
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BCorpsTypeDefineVO> selectBCorpsTypeDefinePage(IPage<BCorpsTypeDefineVO> page, BCorpsTypeDefineVO bCorpsTypeDefine) {
 		return page.setRecords(baseMapper.selectBCorpsTypeDefinePage(page, bCorpsTypeDefine));
@@ -78,9 +81,9 @@ public class BCorpsTypeDefineServiceImpl extends ServiceImpl<CorpsTypeDefineMapp
 			bCorpsTypeDefine.setCreateUser(AuthUtil.getUserId());
 			bCorpsTypeDefine.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bCorpsTypeDefine.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bCorpsTypeDefine.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bCorpsTypeDefine.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -132,8 +135,8 @@ public class BCorpsTypeDefineServiceImpl extends ServiceImpl<CorpsTypeDefineMapp
 			bCorpsTypeDefine.setCreateUser(AuthUtil.getUserId());
 			bCorpsTypeDefine.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bCorpsTypeDefine.setCreateDept(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bCorpsTypeDefine.setCreateDept(deptUtils.getDeptPid()+"");
 				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bCorpsTypeDefine.setCreateDeptName(String.join(",", res.getData()));

+ 11 - 8
blade-service/blade-los/src/main/java/org/springblade/los/basic/cur/service/impl/BCurrencyServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.cur.entity.BCurExrate;
 import org.springblade.los.basic.cur.entity.BCurrency;
 import org.springblade.los.basic.cur.mapper.CurrencyMapper;
@@ -57,6 +58,8 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 
 	private final IBCurExrateService bCurExrateService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BCurrencyVO> selectBCurrencyPage(IPage<BCurrencyVO> page, BCurrencyVO bCurrency) {
 		return page.setRecords(baseMapper.selectBCurrencyPage(page, bCurrency));
@@ -69,9 +72,9 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 		String deptId = "";
 		String deptName = "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -86,7 +89,7 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 				.eq(BCurrency::getCnName, bCurrency.getCnName())) > 0) {
 				throw new RuntimeException("名称已存在");
 			}
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bCurrency.setCreateDept(deptId);
 				bCurrency.setCreateDeptName(deptName);
 			}
@@ -103,7 +106,7 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setCreateUserName(AuthUtil.getUserName());
-					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+					if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 						item.setCreateDept(deptId);
 						item.setCreateDeptName(deptName);
 					}
@@ -150,9 +153,9 @@ public class BCurrencyServiceImpl extends ServiceImpl<CurrencyMapper, BCurrency>
 				bCurrency.setCreateUser(AuthUtil.getUserId());
 				bCurrency.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bCurrency.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					bCurrency.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bCurrency.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 9 - 6
blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/BFeesDefineServiceImpl.java

@@ -29,6 +29,7 @@ import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.StringPool;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.excel.BFeesDefineExcel;
 import org.springblade.los.basic.fees.entity.BFeesDefine;
 import org.springblade.los.basic.fees.mapper.FeesDefineMapper;
@@ -54,6 +55,8 @@ public class BFeesDefineServiceImpl extends ServiceImpl<FeesDefineMapper, BFeesD
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BFeesDefineVO> selectBFeesDefinePage(IPage<BFeesDefineVO> page, BFeesDefineVO bFeesDefine) {
 		return page.setRecords(baseMapper.selectBFeesDefinePage(page, bFeesDefine));
@@ -77,9 +80,9 @@ public class BFeesDefineServiceImpl extends ServiceImpl<FeesDefineMapper, BFeesD
 			bFeesDefine.setCreateUser(AuthUtil.getUserId());
 			bFeesDefine.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bFeesDefine.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bFeesDefine.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bFeesDefine.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -139,9 +142,9 @@ public class BFeesDefineServiceImpl extends ServiceImpl<FeesDefineMapper, BFeesD
 				bFeesDefine.setCreateUser(AuthUtil.getUserId());
 				bFeesDefine.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bFeesDefine.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					bFeesDefine.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bFeesDefine.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 11 - 8
blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/BFeesServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.acc.entity.BAccElements;
 import org.springblade.los.basic.acc.service.IBAccElementsService;
 import org.springblade.los.basic.fees.dto.BFeesExcel;
@@ -59,6 +60,8 @@ public class BFeesServiceImpl extends ServiceImpl<FeesMapper, BFees> implements
 
 	private final IBAccElementsService bAccElementsService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BFeesVO> selectBFeesPage(IPage<BFeesVO> page, BFeesVO bFees) {
 		return page.setRecords(baseMapper.selectBFeesPage(page, bFees));
@@ -71,9 +74,9 @@ public class BFeesServiceImpl extends ServiceImpl<FeesMapper, BFees> implements
 		String deptId = "";
 		String deptName = "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -88,7 +91,7 @@ public class BFeesServiceImpl extends ServiceImpl<FeesMapper, BFees> implements
 				.eq(BFees::getCnName, bFees.getCnName())) > 0) {
 				throw new RuntimeException("名称已存在");
 			}
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bFees.setCreateDept(deptId);
 				bFees.setCreateDeptName(deptName);
 			}
@@ -109,7 +112,7 @@ public class BFeesServiceImpl extends ServiceImpl<FeesMapper, BFees> implements
 				bFeesTypes.setCreateTime(new Date());
 				bFeesTypes.setCreateUser(AuthUtil.getUserId());
 				bFeesTypes.setCreateUserName(AuthUtil.getUserName());
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 					bFeesTypes.setCreateDept(deptId);
 					bFeesTypes.setCreateDeptName(deptName);
 				}
@@ -166,9 +169,9 @@ public class BFeesServiceImpl extends ServiceImpl<FeesMapper, BFees> implements
 				bFees.setCreateUser(AuthUtil.getUserId());
 				bFees.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					bFees.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					bFees.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						bFees.setCreateDeptName(String.join(",", res.getData()));
 					}

+ 11 - 8
blade-service/blade-los/src/main/java/org/springblade/los/basic/fees/service/impl/LosBFeesTemplateServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.excel.LosBFeesTemplateExcel;
 import org.springblade.los.basic.fees.entity.FeesTemplateItems;
 import org.springblade.los.basic.fees.entity.LosBFeesTemplate;
@@ -55,6 +56,8 @@ public class LosBFeesTemplateServiceImpl extends ServiceImpl<LosBFeesTemplateMap
 
 	private final IFeesTemplateItemsService feesTemplateItemsService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<LosBFeesTemplateVO> selectLosBFeesTemplatePage(IPage<LosBFeesTemplateVO> page, LosBFeesTemplateVO losBFeesTemplate) {
 		return page.setRecords(baseMapper.selectLosBFeesTemplatePage(page, losBFeesTemplate));
@@ -78,9 +81,9 @@ public class LosBFeesTemplateServiceImpl extends ServiceImpl<LosBFeesTemplateMap
 				losBFeesTemplate.setCreateUser(AuthUtil.getUserId());
 				losBFeesTemplate.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-					losBFeesTemplate.setCreateDept(AuthUtil.getDeptId());
-					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+					losBFeesTemplate.setCreateDept(deptUtils.getDeptPid()+"");
+					R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 						losBFeesTemplate.setCreateDeptName(String.join(",", res.getData()));
 					}
@@ -103,9 +106,9 @@ public class LosBFeesTemplateServiceImpl extends ServiceImpl<LosBFeesTemplateMap
 		String deptId = "";
 		String deptName = "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -114,7 +117,7 @@ public class LosBFeesTemplateServiceImpl extends ServiceImpl<LosBFeesTemplateMap
 			losBFeesTemplate.setCreateTime(new Date());
 			losBFeesTemplate.setCreateUser(AuthUtil.getUserId());
 			losBFeesTemplate.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				losBFeesTemplate.setCreateDept(deptId);
 				losBFeesTemplate.setCreateDeptName(deptName);
 			}
@@ -131,7 +134,7 @@ public class LosBFeesTemplateServiceImpl extends ServiceImpl<LosBFeesTemplateMap
 					item.setCreateTime(new Date());
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setCreateUserName(AuthUtil.getUserName());
-					if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+					if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 						item.setCreateDept(deptId);
 						item.setCreateDeptName(deptName);
 					}

+ 7 - 4
blade-service/blade-los/src/main/java/org/springblade/los/basic/lines/service/impl/BLinesServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.corps.entity.BCorps;
 import org.springblade.los.basic.corps.service.IBCorpsService;
 import org.springblade.los.basic.locations.entity.BLocations;
@@ -54,6 +55,8 @@ public class BLinesServiceImpl extends ServiceImpl<LinesMapper, BLines> implemen
 
 	private final IBCorpsService bCorpsService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BLinesVO> selectBLinesPage(IPage<BLinesVO> page, BLinesVO bLines) {
 		return page.setRecords(baseMapper.selectBLinesPage(page, bLines));
@@ -72,9 +75,9 @@ public class BLinesServiceImpl extends ServiceImpl<LinesMapper, BLines> implemen
 				throw new RuntimeException("名称已存在");
 			}
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bLines.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bLines.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bLines.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -115,7 +118,7 @@ public class BLinesServiceImpl extends ServiceImpl<LinesMapper, BLines> implemen
 				bLines.setCreateUser(AuthUtil.getUserId());
 				bLines.setCreateUserName(AuthUtil.getUserName());
 				//获取部门ids对应中文名
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 					bLines.setCreateDept(AuthUtil.getDeptId());
 					R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 					if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 5 - 2
blade-service/blade-los/src/main/java/org/springblade/los/basic/modes/service/impl/BTradeModesServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.packages.entity.BPackages;
 import org.springblade.los.excel.BTradeModesExcel;
 import org.springblade.los.basic.modes.entity.BTradeModes;
@@ -50,6 +51,8 @@ public class BTradeModesServiceImpl extends ServiceImpl<TradeModesMapper, BTrade
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BTradeModesVO> selectBTradeModesPage(IPage<BTradeModesVO> page, BTradeModesVO bTradeModes) {
 		return page.setRecords(baseMapper.selectBTradeModesPage(page, bTradeModes));
@@ -68,8 +71,8 @@ public class BTradeModesServiceImpl extends ServiceImpl<TradeModesMapper, BTrade
 				throw new RuntimeException("名称已存在");
 			}
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				bTradeModes.setCreateDept(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				bTradeModes.setCreateDept(deptUtils.getDeptPid()+"");
 				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					bTradeModes.setCreateDeptName(String.join(",", res.getData()));

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/ports/service/impl/BPortsServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.terms.entity.BServiceTerms;
 import org.springblade.los.excel.BPortsExcel;
 import org.springblade.los.basic.ports.entity.BPorts;
@@ -55,6 +56,8 @@ public class BPortsServiceImpl extends ServiceImpl<PortsMapper, BPorts> implemen
 
 	private final IBPortsTermsService bPortsTermsService;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BPortsVO> selectBPortsPage(IPage<BPortsVO> page, BPortsVO bPorts) {
 		return page.setRecords(baseMapper.selectBPortsPage(page, bPorts));
@@ -81,7 +84,7 @@ public class BPortsServiceImpl extends ServiceImpl<PortsMapper, BPorts> implemen
 		String deptId = "";
 		String deptName = "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 			deptId = AuthUtil.getDeptId();
 			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 6 - 3
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsLogServiceImpl.java

@@ -22,6 +22,7 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.reports.entity.ReportsLog;
 import org.springblade.los.basic.reports.mapper.ReportsLogMapper;
 import org.springblade.los.basic.reports.service.IReportsLogService;
@@ -44,6 +45,8 @@ public class ReportsLogServiceImpl extends ServiceImpl<ReportsLogMapper, Reports
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<ReportsLogVO> selectReportsLogPage(IPage<ReportsLogVO> page, ReportsLogVO reportsLog) {
 		return page.setRecords(baseMapper.selectReportsLogPage(page, reportsLog));
@@ -56,9 +59,9 @@ public class ReportsLogServiceImpl extends ServiceImpl<ReportsLogMapper, Reports
 			reportsLog.setCreateUser(AuthUtil.getUserId());
 			reportsLog.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				reportsLog.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				reportsLog.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					reportsLog.setCreateDeptName(String.join(",", res.getData()));
 				}

+ 5 - 5
blade-service/blade-los/src/main/java/org/springblade/los/basic/reports/service/impl/ReportsServiceImpl.java

@@ -139,9 +139,9 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 			reports.setCreateUser(AuthUtil.getUserId());
 			reports.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				reports.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid())) {
+				reports.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					reports.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -1423,7 +1423,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 			&& (MagicValues.SE.equals(groupCode) || MagicValues.SI.equals(groupCode) || MagicValues.AE.equals(groupCode) || MagicValues.AI.equals(groupCode))) {
 			List<Bills> list = new ArrayList<>();
 			Amends amends = amendsService.getById(billId);
-			String profitMargin = sysClient.getParamService(MagicValues.PROFIT_MARGIN);
+			String profitMargin = sysClient.getParamServiceNew(MagicValues.PROFIT_MARGIN);
 			if (amends != null) {
 				List<BCorps> bCorpsList = bCorpsService.list(new LambdaQueryWrapper<BCorps>()
 					.eq(BCorps::getTenantId, AuthUtil.getTenantId())
@@ -2257,7 +2257,7 @@ public class ReportsServiceImpl extends ServiceImpl<ReportsMapper, Reports> impl
 			&& (MagicValues.SE.equals(groupCode) || MagicValues.SI.equals(groupCode) || MagicValues.AE.equals(groupCode) || MagicValues.AI.equals(groupCode))) {
 			List<AeaBills> list = new ArrayList<>();
 			Amends amends = amendsService.getById(billId);
-			String profitMargin = sysClient.getParamService(MagicValues.PROFIT_MARGIN);
+			String profitMargin = sysClient.getParamServiceNew(MagicValues.PROFIT_MARGIN);
 			if (amends != null) {
 				List<BCorps> bCorpsList = bCorpsService.list(new LambdaQueryWrapper<BCorps>()
 					.eq(BCorps::getTenantId, AuthUtil.getTenantId())

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/terms/service/impl/BServiceTermsServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.voucher.entity.BVoucherType;
 import org.springblade.los.excel.BServiceTermsExcel;
 import org.springblade.los.basic.terms.entity.BServiceTerms;
@@ -50,6 +51,8 @@ public class BServiceTermsServiceImpl extends ServiceImpl<ServiceTermsMapper, BS
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	@Override
 	public IPage<BServiceTermsVO> selectBServiceTermsPage(IPage<BServiceTermsVO> page, BServiceTermsVO bServiceTerms) {
 		return page.setRecords(baseMapper.selectBServiceTermsPage(page, bServiceTerms));
@@ -68,7 +71,7 @@ public class BServiceTermsServiceImpl extends ServiceImpl<ServiceTermsMapper, BS
 				throw new RuntimeException("名称已存在");
 			}
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bServiceTerms.setCreateDept(AuthUtil.getDeptId());
 				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/units/service/impl/BUnitsServiceImpl.java

@@ -24,6 +24,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.units.entity.BUnits;
 import org.springblade.los.basic.units.mapper.UnitsMapper;
 import org.springblade.los.basic.units.service.IBUnitsService;
@@ -54,6 +55,8 @@ public class BUnitsServiceImpl extends ServiceImpl<UnitsMapper, BUnits> implemen
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	private final BillsMapper billsMapper;
 
 	private final PreContainersMapper preContainersMapper;
@@ -76,7 +79,7 @@ public class BUnitsServiceImpl extends ServiceImpl<UnitsMapper, BUnits> implemen
 			bUnits.setCreateUser(AuthUtil.getUserId());
 			bUnits.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bUnits.setCreateDept(AuthUtil.getDeptId());
 				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/basic/vessels/service/impl/BVesselsServiceImpl.java

@@ -25,6 +25,7 @@ import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.basic.corps.entity.BCorps;
 import org.springblade.los.basic.corps.service.IBCorpsService;
 import org.springblade.los.basic.units.entity.BUnits;
@@ -54,6 +55,8 @@ public class BVesselsServiceImpl extends ServiceImpl<VesselsMapper, BVessels> im
 
 	private final ISysClient sysClient;
 
+	private final IDeptUtils deptUtils;
+
 	private final IBCorpsService bCorpsService;
 
 	@Override
@@ -74,7 +77,7 @@ public class BVesselsServiceImpl extends ServiceImpl<VesselsMapper, BVessels> im
 				throw new RuntimeException("船名已存在");
 			}
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bVessels.setCreateDept(AuthUtil.getDeptId());
 				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 45 - 47
blade-service/blade-los/src/main/java/org/springblade/los/business/aea/service/impl/AeaBillsServiceImpl.java

@@ -114,9 +114,9 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -125,7 +125,7 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 			aeaBills.setMblno(aeaBills.getMblno().replaceAll(" ", ""));
 		}
 		List<AeaBills> count = baseMapper.selectList(new LambdaQueryWrapper<AeaBills>()
-			.eq(AeaBills::getCreateDept, AuthUtil.getDeptId())
+			.eq(AeaBills::getCreateDept, deptUtils.getDeptPid()+"")
 			.eq(AeaBills::getTenantId, AuthUtil.getTenantId())
 			.eq(AeaBills::getIsDeleted, 0)
 			.eq(AeaBills::getMblno, aeaBills.getMblno()
@@ -158,7 +158,7 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 			aeaBills.setCreateTime(new Date());
 			aeaBills.setCreateUser(AuthUtil.getUserId());
 			aeaBills.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				aeaBills.setBranchId(branchId);
 				aeaBills.setCreateDept(deptId);
 				aeaBills.setCreateDeptName(deptName);
@@ -181,7 +181,7 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 				AeaBills details = baseMapper.selectById(aeaBills.getId());
 				if (!details.getVoyageNo().equals(aeaBills.getVoyageNo())) {
 					List<AeaBills> aeaBillsList = baseMapper.selectList(new LambdaQueryWrapper<AeaBills>()
-						.eq(AeaBills::getCreateDept, AuthUtil.getDeptId())
+						.eq(AeaBills::getCreateDept, deptUtils.getDeptPid()+"")
 						.eq(AeaBills::getTenantId, AuthUtil.getTenantId())
 						.eq(AeaBills::getIsDeleted, 0)
 						.eq(AeaBills::getMblno, aeaBills.getMblno()));
@@ -756,50 +756,48 @@ public class AeaBillsServiceImpl extends ServiceImpl<AeaBillsMapper, AeaBills> i
 				feeCenterList.addAll(feeCenters);
 			}
 		}
-		List<FeeCenter> feeCenterListUsd = feeCenterList.stream().filter(e -> "USD".equals(e.getCurCode())).collect(Collectors.toList());
-		List<FeeCenter> feeCenterListCny = feeCenterList.stream().filter(e -> "CNY".equals(e.getCurCode())).collect(Collectors.toList());
-		if (!feeCenterListUsd.isEmpty() && !feeCenterListCny.isEmpty()) {
-			throw new RuntimeException("应收应付币种不一致");
-		}
-		List<FeeCenter> feeCenterListPS = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("PS")).collect(Collectors.toList());
-		List<FeeCenter> feeCenterListKY = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("空运费")).collect(Collectors.toList());
-		if (!feeCenterListPS.isEmpty()&& !feeCenterListKY.isEmpty()) {
-			BigDecimal amountHYD = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("空运费") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountHYC = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("空运费") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountPSD = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountPSC = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			if (("CC".equals(declare.getHPaymode()) && ("MM".equals(declare.getBillType()) || "DD".equals(declare.getBillType()))) ||
-				("PP".equals(declare.getHPaymode()) && "MH".equals(declare.getBillType()))) {
-				BCorps bCorps = ibCorpsService.getById(declare.getCorpId());
-				BigDecimal PSAmount = amountPSC.subtract(amountPSD);
-				BigDecimal HYAmount = amountHYD.subtract(amountHYC);
-				BigDecimal rate = new BigDecimal("0.00");
-				if (PSAmount.compareTo(new BigDecimal("0.00")) != 0 && HYAmount.compareTo(new BigDecimal("0.00")) != 0) {
-					rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
+		String status = sysClient.getParamServiceNew("is.profit.margin");
+		if ("1".equals(status)) {
+			List<FeeCenter> feeCenterListPS = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("PS")).collect(Collectors.toList());
+			List<FeeCenter> feeCenterListKY = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("空运费")).collect(Collectors.toList());
+			if (!feeCenterListPS.isEmpty()&& !feeCenterListKY.isEmpty()) {
+				BigDecimal amountHYD = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("空运费") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountHYC = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("空运费") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountPSD = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountPSC = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				if (("CC".equals(declare.getHPaymode()) && ("MM".equals(declare.getBillType()) || "DD".equals(declare.getBillType()))) ||
+					("PP".equals(declare.getHPaymode()) && "MH".equals(declare.getBillType()))) {
+					BCorps bCorps = ibCorpsService.getById(declare.getCorpId());
+					BigDecimal PSAmount = amountPSC.subtract(amountPSD);
+					BigDecimal HYAmount = amountHYD.subtract(amountHYC);
+					BigDecimal rate = new BigDecimal("0.00");
+					if (PSAmount.compareTo(new BigDecimal("0.00")) != 0 && HYAmount.compareTo(new BigDecimal("0.00")) != 0) {
+						rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
+					} else {
+						throw new RuntimeException("空运费利润:" + HYAmount + ",  PS利润:" + PSAmount);
+					}
+					if (ObjectUtils.isNotNull(bCorps) && ObjectUtils.isNotNull(bCorps.getPsRate()) && new BigDecimal(bCorps.getPsRate()).compareTo(new BigDecimal("0.00")) == 0) {
+						throw new RuntimeException("客户PS利润为空或零,不能存在PS费用");
+					}
+					if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) > 0) {
+						throw new RuntimeException("PS比例高,公司实际分成比例:" + rate + ".系统比例为:" + bCorps.getPsRate());
+					}
 				} else {
-					throw new RuntimeException("空运费利润:" + HYAmount + ",  PS利润:" + PSAmount);
-				}
-				if (ObjectUtils.isNotNull(bCorps) && ObjectUtils.isNotNull(bCorps.getPsRate()) && new BigDecimal(bCorps.getPsRate()).compareTo(new BigDecimal("0.00")) == 0) {
-					throw new RuntimeException("客户PS利润为空或零,不能存在PS费用");
-				}
-				if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) > 0) {
-					throw new RuntimeException("PS比例高,公司实际分成比例:" + rate + ".系统比例为:" + bCorps.getPsRate());
+					throw new RuntimeException("只有预付、直单和主单,或分单和到付才可以输入PS");
 				}
-			} else {
-				throw new RuntimeException("只有预付、直单和主单,或分单和到付才可以输入PS");
+			}else if (feeCenterListPS.isEmpty() && !feeCenterListKY.isEmpty()) {
+				throw new RuntimeException("PS费与海运费需同时存在,当前缺少PS费用信息");
+			} else if (!feeCenterListPS.isEmpty()) {
+				throw new RuntimeException("PS费与海运费需同时存在,当前缺少海运费用信息");
 			}
-		}else if (feeCenterListPS.isEmpty() && !feeCenterListKY.isEmpty()) {
-			throw new RuntimeException("PS费与海运费需同时存在,当前缺少PS费用信息");
-		} else if (!feeCenterListPS.isEmpty()) {
-			throw new RuntimeException("PS费与海运费需同时存在,当前缺少海运费用信息");
 		}
 		// 没开启审批流直接走 通过流程
 		if (pathsActs == null || pathsActs.getIsEnable() == 2) {

+ 6 - 11
blade-service/blade-los/src/main/java/org/springblade/los/business/amends/service/impl/AmendsServiceImpl.java

@@ -113,9 +113,9 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -142,7 +142,7 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			amends.setCreateTime(new Date());
 			amends.setCreateUser(AuthUtil.getUserId());
 			amends.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				amends.setBranchId(branchId);
 				amends.setCreateDept(deptId);
 				amends.setCreateDeptName(deptName);
@@ -227,14 +227,14 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			.eq(LosAuditPathsActs::getIsEnable, 1)
 			.eq(LosAuditPathsActs::getFidStatus, "status")
 			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId())
-			.eq(LosAuditPathsActs::getSalesCompanyId, AuthUtil.getDeptId())
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
 			.eq(LosAuditPathsActs::getActId, actId);
 		pathsActs = auditPathsActsService.getOne(auditPathsActsLambdaQueryWrapper);
 		//获取审批信息
 		LosAuditPathsActs losAuditPathsActs = auditPathsActsService.getOne(new LambdaQueryWrapper<LosAuditPathsActs>()
 			.eq(LosAuditPathsActs::getActId, actId)
 			.eq(LosAuditPathsActs::getFidStatus, "status")
-			.eq(LosAuditPathsActs::getSalesCompanyId, AuthUtil.getDeptId())
+			.eq(LosAuditPathsActs::getSalesCompanyId, deptUtils.getDeptPid()+"")
 			.eq(LosAuditPathsActs::getTenantId, AuthUtil.getTenantId()));
 		Long pathId = losAuditPathsActs.getPathId();
 		auditPathsLevels = auditPathsLevelsService.list(new LambdaQueryWrapper<LosAuditPathsLevels>()
@@ -277,11 +277,6 @@ public class AmendsServiceImpl extends ServiceImpl<AmendsMapper, Amends> impleme
 			if (feeCenterList.isEmpty()) {
 				throw new RuntimeException("费用明细不能为空");
 			}
-			List<FeeCenter> feeCenterListUsd = feeCenterList.stream().filter(e -> "USD".equals(e.getCurCode())).collect(Collectors.toList());
-			List<FeeCenter> feeCenterListCny = feeCenterList.stream().filter(e -> "CNY".equals(e.getCurCode())).collect(Collectors.toList());
-			if (!feeCenterListUsd.isEmpty() && !feeCenterListCny.isEmpty()) {
-				throw new RuntimeException("应收应付币种不一致");
-			}
 			BigDecimal amountC = feeCenterList.stream().filter(e -> "C".equals(e.getDc())).map(FeeCenter::getAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 			BigDecimal amountD = feeCenterList.stream().filter(e -> "D".equals(e.getDc())).map(FeeCenter::getAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
 			auditProecessDTO.setPayAmount(amountC);

+ 0 - 5
blade-service/blade-los/src/main/java/org/springblade/los/business/customsDeclaration/service/impl/CustomsDeclarationServiceImpl.java

@@ -356,11 +356,6 @@ public class CustomsDeclarationServiceImpl extends ServiceImpl<CustomsDeclaratio
 		if (pathsActs == null || pathsActs.getIsEnable() == 2) {
 			throw new SecurityException("当前租户未查询到审批流配置");
 		} else {
-			List<FeeCenter> feeCenterListUsd = feeCenterList.stream().filter(e -> "USD".equals(e.getCurCode())).collect(Collectors.toList());
-			List<FeeCenter> feeCenterListCny = feeCenterList.stream().filter(e -> "CNY".equals(e.getCurCode())).collect(Collectors.toList());
-			if (!feeCenterListUsd.isEmpty() && !feeCenterListCny.isEmpty()) {
-				throw new RuntimeException("应收应付币种不一致");
-			}
 			if (CollectionUtils.isEmpty(auditPathsLevels)) {
 				throw new SecurityException("开启审批失败:未查询到审批信息");
 			}

+ 45 - 48
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java

@@ -125,9 +125,9 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -137,7 +137,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 		}
 		List<Bills> count = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
 			.select(Bills::getId)
-			.eq(Bills::getCreateDept, AuthUtil.getDeptId())
+			.eq(Bills::getCreateDept, deptUtils.getDeptPid()+"")
 			.eq(Bills::getTenantId, AuthUtil.getTenantId())
 			.eq(Bills::getIsDeleted, 0)
 			.eq(Bills::getMblno, bills.getMblno())
@@ -176,7 +176,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 			bills.setCreateTime(new Date());
 			bills.setCreateUser(AuthUtil.getUserId());
 			bills.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				bills.setBranchId(branchId);
 				bills.setCreateDept(deptId);
 				bills.setCreateDeptName(deptName);
@@ -219,7 +219,7 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 							, Bills::getFinalDestinationNamePrint, Bills::getCyId, Bills::getCyCode, Bills::getCyCnName, Bills::getCyEnName, Bills::getCyAddress
 							, Bills::getCyTel, Bills::getCyRemarks, Bills::getCyTrailerTime, Bills::getCyReturnTime, Bills::getCarrierId, Bills::getCarrierCnName
 							, Bills::getCarrierEnName, Bills::getCarrierArgreementNo, Bills::getBookingDate)
-						.eq(Bills::getCreateDept, AuthUtil.getDeptId())
+						.eq(Bills::getCreateDept, deptUtils.getDeptPid()+"")
 						.eq(Bills::getTenantId, AuthUtil.getTenantId())
 						.eq(Bills::getIsDeleted, 0)
 						.eq(Bills::getMblno, bills.getMblno()));
@@ -1103,52 +1103,49 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				feeCenterList.addAll(feeCenters);
 			}
 		}
-		List<FeeCenter> feeCenterListUsd = feeCenterList.stream().filter(e -> "USD".equals(e.getCurCode())).collect(Collectors.toList());
-		List<FeeCenter> feeCenterListCny = feeCenterList.stream().filter(e -> "CNY".equals(e.getCurCode())).collect(Collectors.toList());
-		if (!feeCenterListUsd.isEmpty() && !feeCenterListCny.isEmpty()) {
-			throw new RuntimeException("应收应付币种不一致");
-		}
-		List<FeeCenter> feeCenterListPS = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("PS")).collect(Collectors.toList());
-		List<FeeCenter> feeCenterListHY = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("海运费")).collect(Collectors.toList());
-		if (!feeCenterListPS.isEmpty() && !feeCenterListHY.isEmpty()) {
-			BigDecimal amountHYD = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("海运费") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountHYC = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("海运费") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountPSD = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			BigDecimal amountPSC = feeCenterList.stream()
-				.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
-				.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
-			if (("PP".equals(declare.getMpaymode()) && ("MM".equals(declare.getBillType()) || "DD".equals(declare.getBillType()))) ||
-				("CC".equals(declare.getMpaymode()) && "MH".equals(declare.getBillType()))) {
-				BCorps bCorps = ibCorpsService.getById(declare.getCorpId());
-				BigDecimal PSAmount = amountPSC.subtract(amountPSD);
-				BigDecimal HYAmount = amountHYD.subtract(amountHYC);
-				BigDecimal rate = new BigDecimal("0.00");
-				if (PSAmount.compareTo(new BigDecimal("0.00")) > 0 && HYAmount.compareTo(new BigDecimal("0.00")) > 0) {
-					rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
+		String status = sysClient.getParamServiceNew("is.profit.margin");
+		if ("1".equals(status)) {
+			List<FeeCenter> feeCenterListPS = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("PS")).collect(Collectors.toList());
+			List<FeeCenter> feeCenterListHY = feeCenterList.stream().filter(e -> e.getFeeCnName().equals("海运费")).collect(Collectors.toList());
+			if (!feeCenterListPS.isEmpty() && !feeCenterListHY.isEmpty()) {
+				BigDecimal amountHYD = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("海运费") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountHYC = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("海运费") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountPSD = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "D".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				BigDecimal amountPSC = feeCenterList.stream()
+					.filter(e -> e.getFeeCnName().equals("PS") && "USD".equals(e.getCurCode()) && "C".equals(e.getDc()))
+					.map(FeeCenter::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
+				if (("PP".equals(declare.getMpaymode()) && ("MM".equals(declare.getBillType()) || "DD".equals(declare.getBillType()))) ||
+					("CC".equals(declare.getMpaymode()) && "MH".equals(declare.getBillType()))) {
+					BCorps bCorps = ibCorpsService.getById(declare.getCorpId());
+					BigDecimal PSAmount = amountPSC.subtract(amountPSD);
+					BigDecimal HYAmount = amountHYD.subtract(amountHYC);
+					BigDecimal rate = new BigDecimal("0.00");
+					if (PSAmount.compareTo(new BigDecimal("0.00")) > 0 && HYAmount.compareTo(new BigDecimal("0.00")) > 0) {
+						rate = PSAmount.divide(HYAmount, MathContext.DECIMAL32).setScale(2, RoundingMode.HALF_UP);
+					} else {
+						throw new RuntimeException("海运费利润:" + HYAmount + ",  PS利润:" + PSAmount);
+					}
+					if (ObjectUtils.isNotNull(bCorps) && ObjectUtils.isNotNull(bCorps.getPsRate()) && new BigDecimal(bCorps.getPsRate()).compareTo(new BigDecimal("0.00")) == 0) {
+						throw new RuntimeException("往来单位PS规则为空或零,不能存在PS费用");
+					}
+					if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) < 0) {
+						throw new RuntimeException("PS比例高,公司实际分成比例:" + rate + ".系统比例为:" + bCorps.getPsRate());
+					}
 				} else {
-					throw new RuntimeException("海运费利润:" + HYAmount + ",  PS利润:" + PSAmount);
-				}
-				if (ObjectUtils.isNotNull(bCorps) && ObjectUtils.isNotNull(bCorps.getPsRate()) && new BigDecimal(bCorps.getPsRate()).compareTo(new BigDecimal("0.00")) == 0) {
-					throw new RuntimeException("往来单位PS规则为空或零,不能存在PS费用");
+					throw new RuntimeException("只有预付、直单和主单,或分单和到付才可以输入PS");
 				}
-				if (new BigDecimal(bCorps.getPsRate()).compareTo(rate) < 0) {
-					throw new RuntimeException("PS比例高,公司实际分成比例:" + rate + ".系统比例为:" + bCorps.getPsRate());
-				}
-			} else {
-				throw new RuntimeException("只有预付、直单和主单,或分单和到付才可以输入PS");
+			} else if (feeCenterListPS.isEmpty() && !feeCenterListHY.isEmpty()) {
+				throw new RuntimeException("PS费与海运费需同时存在,当前缺少PS费用信息");
+			} else if (!feeCenterListPS.isEmpty()) {
+				throw new RuntimeException("PS费与海运费需同时存在,当前缺少海运费用信息");
 			}
-		} else if (feeCenterListPS.isEmpty() && !feeCenterListHY.isEmpty()) {
-			throw new RuntimeException("PS费与海运费需同时存在,当前缺少PS费用信息");
-		} else if (!feeCenterListPS.isEmpty()) {
-			throw new RuntimeException("PS费与海运费需同时存在,当前缺少海运费用信息");
 		}
-
 		// 没开启审批流直接走 通过流程
 		if (pathsActs == null || pathsActs.getIsEnable() == 2) {
 			throw new SecurityException("当前租户未查询到审批流配置");

+ 9 - 9
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/PreContainersServiceImpl.java

@@ -83,9 +83,9 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -107,7 +107,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			preContainers.setCreateTime(new Date());
 			preContainers.setCreateUser(AuthUtil.getUserId());
 			preContainers.setCreateUserName(AuthUtil.getUserName());
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				preContainers.setBranchId(branchId);
 				preContainers.setCreateDept(deptId);
 				preContainers.setCreateDeptName(deptName);
@@ -186,7 +186,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 			containers.setCreateUser(AuthUtil.getUserId());
 			containers.setCreateUserName(AuthUtil.getUserName());
 			containers.setCyCntrCode(ediCode);
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 				containers.setBranchId(branchId);
 				containers.setCreateDept(deptId);
 				containers.setCreateDeptName(deptName);
@@ -253,9 +253,9 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}
@@ -295,7 +295,7 @@ public class PreContainersServiceImpl extends ServiceImpl<PreContainersMapper, P
 				preContainers.setCreateTime(new Date());
 				preContainers.setCreateUser(AuthUtil.getUserId());
 				preContainers.setCreateUserName(AuthUtil.getUserName());
-				if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+				if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 					preContainers.setBranchId(branchId);
 					preContainers.setCreateDept(deptId);
 					preContainers.setCreateDeptName(deptName);

+ 3 - 3
blade-service/blade-los/src/main/java/org/springblade/los/check/service/impl/AuditProecessServiceImpl.java

@@ -521,7 +521,7 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 					finAccBillsService.generateBill(finAccBills);
 				}
 				feeCenterService.saveOrUpdateBatch(feeCenterList);
-				String status = sysClient.getParamService("automatic.generate.voucher");
+				String status = sysClient.getParamServiceNew("automatic.generate.voucher");
 				if ("1".equals(status)) {
 					generateVoucher(auditProecess.getCheckType(), bills.getId());
 				}
@@ -1160,7 +1160,7 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 					finAccBills.setPodNamePrint(bills.getPodNamePrint());
 					finAccBillsService.generateBill(finAccBills);
 				}
-				String status = sysClient.getParamService("automatic.generate.voucher");
+				String status = sysClient.getParamServiceNew("automatic.generate.voucher");
 				if ("1".equals(status)) {
 					generateVoucher(auditProecess.getCheckType(), bills.getId());
 				}
@@ -1984,7 +1984,7 @@ public class AuditProecessServiceImpl extends ServiceImpl<AuditProecessMapper, L
 					finAccBillsService.generateBill(finAccBills);
 				}
 				feeCenterService.saveOrUpdateBatch(feeCenterList);
-				String status = sysClient.getParamService("automatic.generate.voucher");
+				String status = sysClient.getParamServiceNew("automatic.generate.voucher");
 				if ("1".equals(status)) {
 					generateVoucher(auditProecess.getCheckType(), bills.getId());
 				}

+ 4 - 1
blade-service/blade-los/src/main/java/org/springblade/los/edi/controller/EdiTypesController.java

@@ -31,6 +31,7 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.edi.entity.EdiTypes;
 import org.springblade.los.edi.service.IEdiTypesService;
 import org.springblade.los.edi.vo.EdiTypesVO;
@@ -53,6 +54,8 @@ public class EdiTypesController extends BladeController {
 
 	private final IEdiTypesService ediTypesService;
 
+	private final IDeptUtils deptUtils;
+
 	/**
 	 * 详情
 	 */
@@ -76,7 +79,7 @@ public class EdiTypesController extends BladeController {
 			.eq(EdiTypes::getIsDeleted, 0)
 			.eq(ObjectUtils.isNotNull(ediTypes.getType()), EdiTypes::getType, ediTypes.getType());
 		if (!"admin".equals(AuthUtil.getUserName())) {
-			lambdaQueryWrapper.apply("find_in_set(" + AuthUtil.getDeptId() + ",userlist)");
+			lambdaQueryWrapper.apply("find_in_set(" + deptUtils.getDeptPid()+"" + ",userlist)");
 		}
 		IPage<EdiTypes> pages = ediTypesService.page(Condition.getPage(query), Condition.getQueryWrapper(ediTypes));
 		return R.data(pages);

+ 13 - 6
blade-service/blade-los/src/main/java/org/springblade/los/edi/service/impl/EdiTypesServiceImpl.java

@@ -24,6 +24,7 @@ import io.seata.spring.annotation.GlobalTransactional;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
+import org.springblade.los.Util.IDeptUtils;
 import org.springblade.los.Util.RegularUtils;
 import org.springblade.los.basic.cntr.entity.BCntrTypes;
 import org.springblade.los.basic.cntr.service.IBCntrTypesService;
@@ -33,7 +34,6 @@ import org.springblade.los.basic.packages.entity.BPackages;
 import org.springblade.los.basic.packages.service.IBPackagesService;
 import org.springblade.los.basic.ports.entity.BPorts;
 import org.springblade.los.basic.ports.service.IBPortsService;
-import org.springblade.los.basic.terms.service.IBServiceTermsService;
 import org.springblade.los.basic.vessels.entity.BVessels;
 import org.springblade.los.basic.vessels.service.IBVesselsService;
 import org.springblade.los.business.files.entity.FilesCenter;
@@ -99,7 +99,7 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 
 	private final IBCntrTypesService bCntrTypesService;
 
-	private final IBServiceTermsService bServiceTermsService;
+	private final IDeptUtils deptUtils;
 
 	@Override
 	public IPage<EdiTypesVO> selectEdiTypesPage(IPage<EdiTypesVO> page, EdiTypesVO ediTypes) {
@@ -113,9 +113,9 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 			ediTypes.setCreateUser(AuthUtil.getUserId());
 			ediTypes.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				ediTypes.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				ediTypes.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					ediTypes.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -305,7 +305,14 @@ public class EdiTypesServiceImpl extends ServiceImpl<EdiTypesMapper, EdiTypes> i
 				}
 				inttraSoDto.setBillLadingNumber(RegularUtils.englishToNumber(details.getNumberOfObl()));
 				inttraSoDto.setPackagesNumbers(details.getQuantity());
-				inttraSoDto.setPackagesCode(details.getPackingUnit());
+				if (ObjectUtils.isNotNull(details.getPackingUnit())) {
+					BPackages bPackages = bPackagesService.getOne(new LambdaQueryWrapper<BPackages>()
+						.eq(BPackages::getCode, details.getPackingUnit()));
+					if (bPackages != null) {
+						String ediCode = RegularUtils.getEdiCode("INTTRA", bPackages.getExtendedData());
+						inttraSoDto.setPackagesCode(ediCode);
+					}
+				}
 				inttraSoDto.setPackagesDescribe(details.getPackingUnit());//包装描述
 				inttraSoDto.setGoodsDesc(details.getCommodityDescr());
 				inttraSoDto.setGrossWeight(details.getGrossWeight());

+ 1 - 1
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FeeCenterServiceImpl.java

@@ -95,7 +95,7 @@ public class FeeCenterServiceImpl extends ServiceImpl<FeeCenterMapper, FeeCenter
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
 			deptId = AuthUtil.getDeptId();
 			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {

+ 6 - 6
blade-service/blade-los/src/main/java/org/springblade/los/finance/fee/service/impl/FinAccBillsServiceImpl.java

@@ -106,9 +106,9 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 			finAccBills.setCreateUser(AuthUtil.getUserId());
 			finAccBills.setCreateUserName(AuthUtil.getUserName());
 			//获取部门ids对应中文名
-			if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-				finAccBills.setCreateDept(AuthUtil.getDeptId());
-				R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+			if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+				finAccBills.setCreateDept(deptUtils.getDeptPid()+"");
+				R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 				if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 					finAccBills.setCreateDeptName(String.join(",", res.getData()));
 				}
@@ -135,9 +135,9 @@ public class FinAccBillsServiceImpl extends ServiceImpl<FinAccBillsMapper, FinAc
 		String deptName = "";
 		String branchId = deptUtils.getDeptPid() + "";
 		//获取部门ids对应中文名
-		if (ObjectUtils.isNotNull(AuthUtil.getDeptId())) {
-			deptId = AuthUtil.getDeptId();
-			R<List<String>> res = sysClient.getDeptNames(AuthUtil.getDeptId());
+		if (ObjectUtils.isNotNull(deptUtils.getDeptPid()+"")) {
+			deptId = deptUtils.getDeptPid()+"";
+			R<List<String>> res = sysClient.getDeptNames(deptUtils.getDeptPid()+"");
 			if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 				deptName = String.join(",", res.getData());
 			}

+ 126 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/controller/ExternalOrderController.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.salesPart.extemalOrder.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.salesPart.extemalOrder.entity.ExternalOrder;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderVO;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 外部订单信息 控制器
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/externalorder")
+@Api(value = "外部订单信息", tags = "外部订单信息接口")
+public class ExternalOrderController extends BladeController {
+
+	private final IExternalOrderService externalOrderService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入externalOrder")
+	public R<ExternalOrder> detail(ExternalOrder externalOrder) {
+		ExternalOrder detail = externalOrderService.getOne(Condition.getQueryWrapper(externalOrder));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 外部订单信息
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入externalOrder")
+	public R<IPage<ExternalOrder>> list(ExternalOrder externalOrder, Query query) {
+		IPage<ExternalOrder> pages = externalOrderService.page(Condition.getPage(query), Condition.getQueryWrapper(externalOrder));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 外部订单信息
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入externalOrder")
+	public R<IPage<ExternalOrderVO>> page(ExternalOrderVO externalOrder, Query query) {
+		IPage<ExternalOrderVO> pages = externalOrderService.selectExternalOrderPage(Condition.getPage(query), externalOrder);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 外部订单信息
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入externalOrder")
+	public R save(@Valid @RequestBody ExternalOrder externalOrder) {
+		return R.status(externalOrderService.save(externalOrder));
+	}
+
+	/**
+	 * 修改 外部订单信息
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入externalOrder")
+	public R update(@Valid @RequestBody ExternalOrder externalOrder) {
+		return R.status(externalOrderService.updateById(externalOrder));
+	}
+
+	/**
+	 * 新增或修改 外部订单信息
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入externalOrder")
+	public R submit(@Valid @RequestBody ExternalOrder externalOrder) {
+		return R.status(externalOrderService.saveOrUpdate(externalOrder));
+	}
+
+	
+	/**
+	 * 删除 外部订单信息
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(externalOrderService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 126 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/controller/ExternalOrderItemController.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.salesPart.extemalOrder.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.salesPart.extemalOrder.entity.ExternalOrderItem;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderItemVO;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderItemService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 外部订单明细 控制器
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/externalorderitem")
+@Api(value = "外部订单明细", tags = "外部订单明细接口")
+public class ExternalOrderItemController extends BladeController {
+
+	private final IExternalOrderItemService externalOrderItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入externalOrderItem")
+	public R<ExternalOrderItem> detail(ExternalOrderItem externalOrderItem) {
+		ExternalOrderItem detail = externalOrderItemService.getOne(Condition.getQueryWrapper(externalOrderItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 外部订单明细
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入externalOrderItem")
+	public R<IPage<ExternalOrderItem>> list(ExternalOrderItem externalOrderItem, Query query) {
+		IPage<ExternalOrderItem> pages = externalOrderItemService.page(Condition.getPage(query), Condition.getQueryWrapper(externalOrderItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 外部订单明细
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入externalOrderItem")
+	public R<IPage<ExternalOrderItemVO>> page(ExternalOrderItemVO externalOrderItem, Query query) {
+		IPage<ExternalOrderItemVO> pages = externalOrderItemService.selectExternalOrderItemPage(Condition.getPage(query), externalOrderItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 外部订单明细
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入externalOrderItem")
+	public R save(@Valid @RequestBody ExternalOrderItem externalOrderItem) {
+		return R.status(externalOrderItemService.save(externalOrderItem));
+	}
+
+	/**
+	 * 修改 外部订单明细
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入externalOrderItem")
+	public R update(@Valid @RequestBody ExternalOrderItem externalOrderItem) {
+		return R.status(externalOrderItemService.updateById(externalOrderItem));
+	}
+
+	/**
+	 * 新增或修改 外部订单明细
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入externalOrderItem")
+	public R submit(@Valid @RequestBody ExternalOrderItem externalOrderItem) {
+		return R.status(externalOrderItemService.saveOrUpdate(externalOrderItem));
+	}
+
+	
+	/**
+	 * 删除 外部订单明细
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(externalOrderItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderItemMapper.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.salesPart.extemalOrder.mapper;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderItemVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 外部订单明细 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+public interface ExternalOrderItemMapper extends BaseMapper<ExternalOrderItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param externalOrderItem
+	 * @return
+	 */
+	List<ExternalOrderItemVO> selectExternalOrderItemPage(IPage page, ExternalOrderItemVO externalOrderItem);
+
+}

+ 34 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderItemMapper.xml

@@ -0,0 +1,34 @@
+<?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.salesPart.extemalOrder.mapper.ExternalOrderItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="externalOrderItemResultMap" type="org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <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="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="status" property="status"/>
+        <result column="line_no" property="lineNo"/>
+        <result column="sku" property="sku"/>
+        <result column="name" property="name"/>
+        <result column="brand" property="brand"/>
+        <result column="size" property="size"/>
+        <result column="pattern" property="pattern"/>
+        <result column="structure" property="structure"/>
+        <result column="uom" property="uom"/>
+        <result column="quantity" property="quantity"/>
+        <result column="unit_price" property="unitPrice"/>
+    </resultMap>
+
+
+    <select id="selectExternalOrderItemPage" resultMap="externalOrderItemResultMap">
+        select * from pjpf_external_order_item where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderMapper.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.salesPart.extemalOrder.mapper;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 外部订单信息 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+public interface ExternalOrderMapper extends BaseMapper<ExternalOrder> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param externalOrder
+	 * @return
+	 */
+	List<ExternalOrderVO> selectExternalOrderPage(IPage page, ExternalOrderVO externalOrder);
+
+}

+ 47 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/mapper/ExternalOrderMapper.xml

@@ -0,0 +1,47 @@
+<?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.salesPart.extemalOrder.mapper.ExternalOrderMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="externalOrderResultMap" type="org.springblade.salesPart.extemalOrder.entity.ExternalOrder">
+        <id column="id" property="id"/>
+        <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="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+        <result column="status" property="status"/>
+        <result column="order_mode" property="orderMode"/>
+        <result column="sales_order_no" property="salesOrderNo"/>
+        <result column="dealer_no" property="dealerNo"/>
+        <result column="customer_group" property="customerGroup"/>
+        <result column="is_special_approval" property="isSpecialApproval"/>
+        <result column="sales_order_status" property="salesOrderStatus"/>
+        <result column="is_urgent" property="isUrgent"/>
+        <result column="order_remark" property="orderRemark"/>
+        <result column="creation_time" property="creationTime"/>
+        <result column="customer_name" property="customerName"/>
+        <result column="ship_from_warehouse" property="shipFromWarehouse"/>
+        <result column="shipping_method" property="shippingMethod"/>
+        <result column="dealer_contacts" property="dealerContacts"/>
+        <result column="dealer_mobile" property="dealerMobile"/>
+        <result column="dealer_province" property="dealerProvince"/>
+        <result column="dealer_city" property="dealerCity"/>
+        <result column="dealer_district" property="dealerDistrict"/>
+        <result column="dealer_address" property="dealerAddress"/>
+        <result column="freight" property="freight"/>
+        <result column="discount_amount" property="discountAmount"/>
+        <result column="rebate_amount" property="rebateAmount"/>
+        <result column="order_sub_total" property="orderSubTotal"/>
+        <result column="order_grand_total" property="orderGrandTotal"/>
+        <result column="ship_date" property="shipDate"/>
+    </resultMap>
+
+
+    <select id="selectExternalOrderPage" resultMap="externalOrderResultMap">
+        select * from pjpf_external_order where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/IExternalOrderItemService.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.salesPart.extemalOrder.service;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderItemVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 外部订单明细 服务类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+public interface IExternalOrderItemService extends IService<ExternalOrderItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param externalOrderItem
+	 * @return
+	 */
+	IPage<ExternalOrderItemVO> selectExternalOrderItemPage(IPage<ExternalOrderItemVO> page, ExternalOrderItemVO externalOrderItem);
+
+}

+ 41 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/IExternalOrderService.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.salesPart.extemalOrder.service;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 外部订单信息 服务类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+public interface IExternalOrderService extends IService<ExternalOrder> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param externalOrder
+	 * @return
+	 */
+	IPage<ExternalOrderVO> selectExternalOrderPage(IPage<ExternalOrderVO> page, ExternalOrderVO externalOrder);
+
+}

+ 41 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/impl/ExternalOrderItemServiceImpl.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.salesPart.extemalOrder.service.impl;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderItemVO;
+import org.springblade.salesPart.extemalOrder.mapper.ExternalOrderItemMapper;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 外部订单明细 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Service
+public class ExternalOrderItemServiceImpl extends ServiceImpl<ExternalOrderItemMapper, ExternalOrderItem> implements IExternalOrderItemService {
+
+	@Override
+	public IPage<ExternalOrderItemVO> selectExternalOrderItemPage(IPage<ExternalOrderItemVO> page, ExternalOrderItemVO externalOrderItem) {
+		return page.setRecords(baseMapper.selectExternalOrderItemPage(page, externalOrderItem));
+	}
+
+}

+ 41 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/extemalOrder/service/impl/ExternalOrderServiceImpl.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.salesPart.extemalOrder.service.impl;
+
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import org.springblade.salesPart.extemalOrder.vo.ExternalOrderVO;
+import org.springblade.salesPart.extemalOrder.mapper.ExternalOrderMapper;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 外部订单信息 服务实现类
+ *
+ * @author BladeX
+ * @since 2024-03-11
+ */
+@Service
+public class ExternalOrderServiceImpl extends ServiceImpl<ExternalOrderMapper, ExternalOrder> implements IExternalOrderService {
+
+	@Override
+	public IPage<ExternalOrderVO> selectExternalOrderPage(IPage<ExternalOrderVO> page, ExternalOrderVO externalOrder) {
+		return page.setRecords(baseMapper.selectExternalOrderPage(page, externalOrder));
+	}
+
+}

+ 80 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/Utils/HttpsUtils.java

@@ -0,0 +1,80 @@
+package org.springblade.salesPart.michelinApi.Utils;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Slf4j
+public class HttpsUtils {
+
+	/*请求url获取返回的内容*/
+	public static String getReturn(HttpURLConnection connection) throws IOException {
+		StringBuffer buffer = new StringBuffer();
+		//将返回的输入流转换成字符串
+		try(InputStream inputStream = connection.getInputStream();
+			InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8");
+			BufferedReader bufferedReader = new BufferedReader(inputStreamReader);){
+			String str = null;
+			while ((str = bufferedReader.readLine()) != null) {
+				buffer.append(str);
+			}
+			String result = buffer.toString();
+			return result;
+		}
+	}
+
+	//post请求的方法重载
+	public static String getReturn(HttpURLConnection connection,String jsr) {
+		try {
+			StringBuffer buffer = new StringBuffer();
+			byte[] bytes = jsr.getBytes();
+			OutputStream outputStream = connection.getOutputStream();
+			outputStream.write(bytes);
+			outputStream.flush();
+			outputStream.close();
+
+			//将返回的输入流转换成字符串
+			InputStream inputStream = connection.getInputStream();
+			InputStreamReader inputStreamReader = new InputStreamReader(inputStream, "UTF-8");
+			BufferedReader bufferedReader = new BufferedReader(inputStreamReader);
+			String str = null;
+			while ((str = bufferedReader.readLine()) != null) {
+				buffer.append(str);
+			}
+			String result = buffer.toString();
+			return result;
+		} catch (Exception e) {
+			log.error("postUrlConnection出错", e);
+		}
+		return null;
+	}
+	public static String sending(String url , Map<String,String> map) throws Exception{
+		URL url1 = new URL(url);    // 把字符串转换为URL请求地址
+		HttpURLConnection connection = (HttpURLConnection) url1.openConnection();// 打开连接
+		// 设置是否向connection输出,因为这个是post请求,参数要放在
+		// http正文内,因此需要设为true
+		connection.setDoOutput(Boolean.TRUE);
+		connection.setDoInput(Boolean.TRUE);
+		connection.setRequestMethod("POST");
+		// Post 请求不能使用缓存
+		connection.setUseCaches(false);
+		// 添加自定义的Header信息
+		connection.addRequestProperty("Content-type", MichelinValues.CONTENT_TYPE);
+		connection.addRequestProperty("Ocp-Apim-Subscription-Key", "03732707a76b48168e628e2abdb5529e");
+		//必须设置false,否则会自动redirect到重定向后的地址
+		connection.setInstanceFollowRedirects(false);
+		connection.connect();// 连接会话
+		String s = JSONObject.toJSONString(map);
+		//获取了返回值
+		return HttpsUtils.getReturn(connection, s);
+	}
+}

+ 21 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/Utils/MichelinValues.java

@@ -0,0 +1,21 @@
+package org.springblade.salesPart.michelinApi.Utils;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/1/18
+ */
+public class MichelinValues {
+
+	public static final String BASE_URL = "https://host:port/AgentAPIs";
+	public static final String BASE_URL_TEXT = "https://apimint-uat.michelin.com.cn/AgentAPIs";
+	public static final String CONTENT_TYPE = "application/json";
+	public static final String OK = "200";
+	public static final String BAD_REQUEST = "400";
+	public static final String INVALID_CREDENTIALS = "401";
+	public static final String UNKNOWN_SERVICE = "404";
+	public static final String INTERNAL_SERVER_ERROR = "500";
+
+	private MichelinValues() {
+	} // 防止外部实例化该类
+
+}

+ 32 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/controller/ApiController.java

@@ -0,0 +1,32 @@
+package org.springblade.salesPart.michelinApi.controller;
+
+import io.swagger.annotations.Api;
+import lombok.AllArgsConstructor;
+import org.springblade.core.tool.api.R;
+import org.springblade.salesPart.michelinApi.service.IMichelinService;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/api/michelin")
+@Api(value = "米其林相关接口", tags = "米其林相关接口")
+public class ApiController {
+
+	private final IMichelinService michelinService;
+
+
+	/**
+	 * 订单读取接口
+	 */
+	@GetMapping("/getSalesOrder")
+	public R getSalesOrder(String agentId) throws Exception{
+		return michelinService.getSalesOrder(agentId);
+	}
+
+}

+ 33 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/AckSalesOrderR.java

@@ -0,0 +1,33 @@
+package org.springblade.salesPart.michelinApi.dto;
+
+import lombok.Data;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Data
+public class AckSalesOrderR {
+
+	/**
+	 * 001为成功,其它值为出错
+	 */
+	private String code;
+
+	/**
+	 * 返回结果,出错为error
+	 */
+	private String result;
+
+	/**
+	 * 出错提示消息
+	 */
+	private String errMsg;
+
+	/**
+	 * 是否有下一个订单待读取
+	 */
+	private String hasNext;
+
+
+}

+ 53 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/LinesDto.java

@@ -0,0 +1,53 @@
+package org.springblade.salesPart.michelinApi.dto;
+
+import lombok.Data;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Data
+public class LinesDto {
+
+	/**
+	 * OCT订单行号
+	 */
+	private String lineNo;
+	/**
+	 * 产品编码,米其林CAI
+	 */
+	private String sku;
+	/**
+	 * 品名
+	 */
+	private String name;
+	/**
+	 * 中文品牌名
+	 */
+	private String brand;
+	/**
+	 * 规格
+	 */
+	private String size;
+	/**
+	 * 花纹
+	 */
+	private String pattern;
+	/**
+	 * 类型(R为子午线,否则为斜交胎)
+	 */
+	private String structure;
+	/**
+	 * 计量单位
+	 */
+	private String uom;
+	/**
+	 * 数量
+	 */
+	private String quantity;
+	/**
+	 * 单价
+	 */
+	private String unitPrice;
+
+}

+ 121 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/SalesOrderDto.java

@@ -0,0 +1,121 @@
+package org.springblade.salesPart.michelinApi.dto;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Data
+public class SalesOrderDto {
+
+	/**
+	 *AGENT-NLT代理商非长尾模式
+	 * AGENT-LT 代理商长尾模式
+	 * TPLUS-NLT 驰加代管模式
+	 */
+	private String orderMode;
+	/**
+	 *OCT订单号
+	 */
+	private String salesOrderNo;
+	/**
+	 *客户代码,等同于dealerId
+	 */
+	private String dealerNo;
+	/**
+	 *客户组
+	 */
+	private String customerGroup;
+	/**
+	 *是否为特批订单(不需要检查信用)
+	 */
+	private String isSpecialApproval;
+	/**
+	 *可以为waiting (待确认),confirm (已确认), shipped(已发运), canceled(已取消)
+	 */
+	private String salesOrderStatus;
+	/**
+	 *0为非紧急,1为紧急
+	 */
+	private String isUrgent;
+	/**
+	 *备注
+	 */
+	private String orderRemark;
+	/**
+	 *创建时间
+	 */
+	private String creationTime;
+	/**
+	 *客户名称
+	 */
+	private String customerName;
+	/**
+	 *发货仓库
+	 */
+	private String shipFromWarehouse;
+	/**
+	 *运输方式:
+	 * standard-普通
+	 * urgent-加急
+	 * selfpick-自提
+	 */
+	private String shippingMethod;
+	/**
+	 *客户联系人
+	 */
+	private String dealerContacts;
+	/**
+	 *客户联系人电话
+	 */
+	private String dealerMobile;
+	/**
+	 *省份
+	 */
+	private String dealerProvince;
+	/**
+	 *城市
+	 */
+	private String dealerCity;
+	/**
+	 *区县
+	 */
+	private String dealerDistrict;
+	/**
+	 *地址
+	 */
+	private String dealerAddress;
+	/**
+	 *运费
+	 */
+	private String freight;
+	/**
+	 *折扣金额
+	 */
+	private String discountAmount;
+	/**
+	 *返利金额
+	 */
+	private String rebateAmount;
+	/**
+	 *订单金额小计(不含折扣和返利)
+	 */
+	private String orderSubTotal;
+	/**
+	 *订单金额总计
+	 */
+	private String orderGrandTotal;
+	/**
+	 *发货日期(yyyy/M/d)
+	 */
+	private String shipDate;
+	/**
+	 * 明细
+	 */
+	private List<LinesDto> lines;
+
+
+}

+ 37 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/dto/SalesOrderR.java

@@ -0,0 +1,37 @@
+package org.springblade.salesPart.michelinApi.dto;
+
+import lombok.Data;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Data
+public class SalesOrderR {
+
+	/**
+	 * 001为成功,其它值为出错
+	 */
+	private String code;
+
+	/**
+	 * 返回结果,出错为error
+	 */
+	private String result;
+
+	/**
+	 * 出错提示消息
+	 */
+	private String errMsg;
+
+	/**
+	 * 消息代码,提交回执时需要发回此代码
+	 */
+	private String msgId;
+
+	/**
+	 * 返回结果,出错为error
+	 */
+	private SalesOrderDto salesOrder;
+
+}

+ 15 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/service/IMichelinService.java

@@ -0,0 +1,15 @@
+package org.springblade.salesPart.michelinApi.service;
+
+import org.springblade.core.tool.api.R;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+public interface IMichelinService {
+	/**
+	 * 订单读取接口
+	 * @param agentId  Agent代码
+	 */
+	R getSalesOrder(String agentId)throws Exception;
+}

+ 113 - 0
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/michelinApi/service/impl/MichelinServiceImpl.java

@@ -0,0 +1,113 @@
+package org.springblade.salesPart.michelinApi.service.impl;
+
+import com.alibaba.fastjson.JSONObject;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrder;
+import org.springblade.salesPart.extemalOrder.entity.ExternalOrderItem;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderItemService;
+import org.springblade.salesPart.extemalOrder.service.IExternalOrderService;
+import org.springblade.salesPart.michelinApi.Utils.HttpsUtils;
+import org.springblade.salesPart.michelinApi.Utils.MichelinValues;
+import org.springblade.salesPart.michelinApi.dto.AckSalesOrderR;
+import org.springblade.salesPart.michelinApi.dto.LinesDto;
+import org.springblade.salesPart.michelinApi.dto.SalesOrderDto;
+import org.springblade.salesPart.michelinApi.dto.SalesOrderR;
+import org.springblade.salesPart.michelinApi.service.IMichelinService;
+import org.springframework.stereotype.Service;
+
+import java.util.*;
+
+/**
+ * @author :jixinyuan
+ * @date : 2024/3/11
+ */
+@Service
+@AllArgsConstructor
+public class MichelinServiceImpl implements IMichelinService {
+
+	private final IExternalOrderService externalOrderService;
+
+	private final IExternalOrderItemService externalOrderItemService;
+
+	@Override
+	public R getSalesOrder(String agentId) throws Exception {
+		String geturl = MichelinValues.BASE_URL_TEXT + "/GetSalesOrder";
+		//设置请求体
+		Map<String, String> map = new HashMap<>();
+		//key-value的形式设置请求参数
+		map.put("agentId", agentId);
+		String result = HttpsUtils.sending(geturl, map);
+		System.out.println("==============result===============" + result);
+		//如果返回值是标准的JSON字符串进行转换
+		JSONObject jsonObject = JSONObject.parseObject(result);
+		SalesOrderR salesOrderR = JSONObject.parseObject(jsonObject.get("response").toString(), SalesOrderR.class);
+		if (salesOrderR != null) {
+			if ("001".equals(salesOrderR.getCode())) {
+				SalesOrderDto salesOrderDto = salesOrderR.getSalesOrder();
+				if (salesOrderDto != null) {
+					ExternalOrder order = new ExternalOrder();
+					BeanUtil.copyProperties(salesOrderDto, order);
+					order.setCreateUser(AuthUtil.getUserId());
+					order.setCreateTime(new Date());
+					order.setTenantId(AuthUtil.getTenantId());
+					boolean res = externalOrderService.save(order);
+					if (!salesOrderDto.getLines().isEmpty()) {
+						List<ExternalOrderItem> externalOrderItemList = new ArrayList<>();
+						for (LinesDto item : salesOrderDto.getLines()) {
+							ExternalOrderItem externalOrderItem = new ExternalOrderItem();
+							BeanUtil.copyProperties(item, externalOrderItem);
+							externalOrderItem.setPid(order.getId());
+							externalOrderItem.setCreateUser(AuthUtil.getUserId());
+							externalOrderItem.setCreateTime(new Date());
+							externalOrderItem.setTenantId(AuthUtil.getTenantId());
+							externalOrderItemList.add(externalOrderItem);
+						}
+						if (!externalOrderItemList.isEmpty()){
+							externalOrderItemService.saveBatch(externalOrderItemList);
+						}
+						order.setExternalOrderItemList(externalOrderItemList);
+					}
+					//设置请求体
+					Map<String, String> map1 = new HashMap<>();
+					//key-value的形式设置请求参数
+					map1.put("agentId", agentId);
+					map1.put("msgId", salesOrderR.getMsgId());
+					String geturl1 = MichelinValues.BASE_URL_TEXT + "/AckSalesOrder";
+					if (res) {
+						map1.put("code", "001");
+						map1.put("result", "success");
+						map1.put("errMsg", "");
+					} else {
+						map1.put("code", "002");
+						map1.put("result", "error");
+						map1.put("errMsg", "数据处理失败");
+					}
+					//获取了返回值
+					String result1 = HttpsUtils.sending(geturl1, map1);
+					System.out.println("==============result1===============" + result1);
+					//如果返回值是标准的JSON字符串进行转换
+					JSONObject jsonObject1 = JSONObject.parseObject(result);
+					AckSalesOrderR ackSalesOrderR = JSONObject.parseObject(jsonObject1.get("response").toString(), AckSalesOrderR.class);
+					if (ackSalesOrderR != null) {
+						if ("001".equals(ackSalesOrderR.getCode())) {
+							return R.data(order);
+						} else {
+							return R.fail(ackSalesOrderR.getErrMsg());
+						}
+					} else {
+						return R.fail("订单回执接口错误");
+					}
+				} else {
+					return R.fail("单据信息为空");
+				}
+			} else {
+				return R.fail("获取数据错误");
+			}
+		} else {
+			return R.fail("获取数据错误");
+		}
+	}
+}

+ 22 - 5
blade-service/blade-system/src/main/java/org/springblade/system/service/impl/ParamServiceServiceImpl.java

@@ -16,17 +16,20 @@
  */
 package org.springblade.system.service.impl;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
-import org.springblade.system.entity.Param;
 import org.springblade.system.entity.ParamService;
-import org.springblade.system.vo.ParamServiceVO;
+import org.springblade.system.feign.ISysClient;
 import org.springblade.system.mapper.ParamServiceMapper;
 import org.springblade.system.service.IParamServiceService;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springblade.system.vo.ParamServiceVO;
 import org.springframework.stereotype.Service;
-import com.baomidou.mybatisplus.core.metadata.IPage;
 
 /**
  * 业务参数配置表 服务实现类
@@ -35,8 +38,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  * @since 2023-02-23
  */
 @Service
+@AllArgsConstructor
 public class ParamServiceServiceImpl extends ServiceImpl<ParamServiceMapper, ParamService> implements IParamServiceService {
 
+	private final IUserClient userClient;
+
+	private final ISysClient sysClient;
+
 	@Override
 	public IPage<ParamServiceVO> selectParamServicePage(IPage<ParamServiceVO> page, ParamServiceVO paramService) {
 		return page.setRecords(baseMapper.selectParamServicePage(page, paramService));
@@ -50,9 +58,18 @@ public class ParamServiceServiceImpl extends ServiceImpl<ParamServiceMapper, Par
 
 	@Override
 	public String getValueNew(String paramKey) {
+		String deptId = AuthUtil.getDeptId();
+		R<User> r = userClient.userInfoById(AuthUtil.getUserId());
+		if (r.isSuccess()) {
+			String deptIds = r.getData().getDeptPid();
+			String[] arr = deptIds.split(",");
+			if (arr.length > 0) {
+				deptId = arr[0];
+			}
+		}
 		ParamService param = this.getOne(Wrappers.<ParamService>query().lambda().eq(ParamService::getParamKey, paramKey)
 			.eq(ParamService::getTenantId, AuthUtil.getTenantId())
-			.eq(ParamService::getSalesCompanyId, AuthUtil.getDeptId())
+			.eq(ParamService::getSalesCompanyId, deptId)
 		);
 		return param.getParamValue();
 	}