Browse Source

2022年10月11日17:34:08

纪新园 3 years ago
parent
commit
90a6fb3f42
24 changed files with 1166 additions and 26 deletions
  1. 111 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderCost.java
  2. 146 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderCostItem.java
  3. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/entity/OrderItems.java
  4. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderCostItemVO.java
  5. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/vo/OrderCostVO.java
  6. 7 0
      blade-service-api/trade-finance-api/src/main/java/org/springblade/finance/vojo/Acc.java
  7. 6 0
      blade-service-api/trade-finance-api/src/main/java/org/springblade/finance/vojo/Items.java
  8. 12 0
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/financing/entity/Financing.java
  9. 10 4
      blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/order/entity/Order.java
  10. 126 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/controller/OrderCostController.java
  11. 126 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/controller/OrderCostItemController.java
  12. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderCostItemMapper.java
  13. 34 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderCostItemMapper.xml
  14. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderCostMapper.java
  15. 27 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderCostMapper.xml
  16. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderCostItemService.java
  17. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderCostService.java
  18. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderCostItemServiceImpl.java
  19. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderCostServiceImpl.java
  20. 93 9
      blade-service/trade-finance/src/main/java/org/springblade/finance/controller/AccController.java
  21. 86 0
      blade-service/trade-finance/src/main/java/org/springblade/finance/excel/FeeStatisticsExcelJTMC.java
  22. 2 0
      blade-service/trade-finance/src/main/java/org/springblade/finance/service/impl/SettlementServiceImpl.java
  23. 5 1
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderMapper.xml
  24. 19 12
      blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/impl/OrderServiceImpl.java

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

@@ -0,0 +1,111 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 陆运以及港杂费实体类
+ *
+ * @author BladeX
+ * @since 2022-10-11
+ */
+@Data
+@TableName("business_order_cost")
+@ApiModel(value = "OrderCost对象", description = "陆运以及港杂费")
+public class OrderCost implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+	/**
+	* 货物属性
+	*/
+		@ApiModelProperty(value = "货物属性")
+		private String goodsAttribute;
+	/**
+	* 出运港id
+	*/
+		@ApiModelProperty(value = "出运港id")
+		private Long outHarborId;
+	/**
+	* 出运港名
+	*/
+		@ApiModelProperty(value = "出运港名")
+		private String outHarborName;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	* 1.陆运费 2.港杂费
+	*/
+		@ApiModelProperty(value = "1.陆运费 2.港杂费")
+		private Boolean feesType;
+	/**
+	* 合计
+	*/
+		@ApiModelProperty(value = "合计")
+		private BigDecimal amount;
+
+
+}

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

@@ -0,0 +1,146 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 陆运以及港杂费明细实体类
+ *
+ * @author BladeX
+ * @since 2022-10-11
+ */
+@Data
+@TableName("business_order_cost_item")
+@ApiModel(value = "OrderCostItem对象", description = "陆运以及港杂费明细")
+public class OrderCostItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主建
+	*/
+		@ApiModelProperty(value = "主建")
+		@TableId(value = "id", type = IdType.AUTO)
+	private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pId;
+	/**
+	* 费用名称id
+	*/
+		@ApiModelProperty(value = "费用名称id")
+		private Long feesId;
+	/**
+	* 费用名称
+	*/
+		@ApiModelProperty(value = "费用名称")
+		private String feesName;
+	/**
+	* 起运地id
+	*/
+		@ApiModelProperty(value = "起运地id")
+		private Long departureId;
+	/**
+	* 起运地
+	*/
+		@ApiModelProperty(value = "起运地")
+		private String departure;
+	/**
+	* 币别
+	*/
+		@ApiModelProperty(value = "币别")
+		private String currency;
+	/**
+	* 20GP
+	*/
+		@ApiModelProperty(value = "20GP")
+		private BigDecimal twentyGp;
+	/**
+	* 40GP
+	*/
+		@ApiModelProperty(value = "40GP")
+		private BigDecimal fortyGp;
+	/**
+	* 40HC
+	*/
+		@ApiModelProperty(value = "40HC")
+		private BigDecimal fortyHc;
+	/**
+	* 45GP
+	*/
+		@ApiModelProperty(value = "45GP")
+		private BigDecimal fortyFiveGp;
+	/**
+	* PALLET
+	*/
+		@ApiModelProperty(value = "PALLET")
+		private BigDecimal pallet;
+	/**
+	* 票
+	*/
+		@ApiModelProperty(value = "票")
+		private BigDecimal ticket;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		private Integer isDeleted;
+	/**
+	* 1.陆运费 2.海运费 3.杂费
+	*/
+		@ApiModelProperty(value = "1.陆运费 2.海运费 3.杂费")
+		private Boolean type;
+
+
+}

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

@@ -514,4 +514,40 @@ public class OrderItems implements Serializable {
 	 */
 	@ApiModelProperty(value = "货物类型")
 	private BigDecimal cargoType;
+
+	/**
+	 * 自定义7
+	 */
+	@ApiModelProperty(value = "自定义7")
+	private String customSeven;
+
+
+	/**
+	 * 自定义8
+	 */
+	@ApiModelProperty(value = "自定义8")
+	private String customEight;
+
+
+	/**
+	 * 自定义9
+	 */
+	@ApiModelProperty(value = "自定义9")
+	private String customNine;
+
+
+	/**
+	 * 自定义10
+	 */
+	@ApiModelProperty(value = "自定义10")
+	private String customTen;
+
+
+	/**
+	 * 自定义11
+	 */
+	@ApiModelProperty(value = "自定义11")
+	private String attributeList;
+
+
 }

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

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

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

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

+ 7 - 0
blade-service-api/trade-finance-api/src/main/java/org/springblade/finance/vojo/Acc.java

@@ -375,5 +375,12 @@ public class Acc implements Serializable {
 	)
 	private Date retrieval;
 
+	/**
+	 * 公司
+	 */
+	@ApiModelProperty(value = "公司")
+	@TableField(exist = false)
+	private String company;
+
 
 }

+ 6 - 0
blade-service-api/trade-finance-api/src/main/java/org/springblade/finance/vojo/Items.java

@@ -235,4 +235,10 @@ public class Items implements Serializable {
 	 */
 	@TableField(exist = false)
 	private String srcFeesType;
+
+	/**
+	 * 业务日期
+	 */
+	@TableField(exist = false)
+	private Date stockTime;
 }

+ 12 - 0
blade-service-api/trade-purchase-api/src/main/java/com/trade/purchase/financing/entity/Financing.java

@@ -195,5 +195,17 @@ public class Financing implements Serializable {
 	@TableField(exist = false)
 	private String month;
 
+	/**
+	 * 所属公司id
+	 */
+	@ApiModelProperty(value = "所属公司id")
+	private String companyId;
+
+	/**
+	 * 所属公司名
+	 */
+	@ApiModelProperty(value = "所属公司名")
+	private String company;
+
 
 }

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

@@ -404,14 +404,14 @@ public class Order extends OrderBase {
 	@ApiModelProperty(value = "客户联系人")
 	private String corpAttn;
 	/**
-	 * 其他联系人
+	 * 其他联系人(司机)
 	 */
-	@ApiModelProperty(value = "其他联系人")
+	@ApiModelProperty(value = "其他联系人(司机)")
 	private String otherCorpAttn;
 	/**
-	 * 联系人电话
+	 * 联系人电话(司机)
 	 */
-	@ApiModelProperty(value = "联系人电话")
+	@ApiModelProperty(value = "联系人电话(司机)")
 	private String corpTel;
 	/**
 	 * 合同重量
@@ -840,6 +840,12 @@ public class Order extends OrderBase {
 	private String planGoodsName;
 
 	/**
+	 * 箱号
+	 */
+	@ApiModelProperty(value = "箱号")
+	private String caseNo;
+
+	/**
 	 * 采木云是否出库状态(app)
 	 */
 	@TableField(exist = false)

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

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

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

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

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

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

+ 34 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderCostItemMapper.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.purchase.sales.mapper.OrderCostItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderCostItemResultMap" type="org.springblade.purchase.sales.entity.OrderCostItem">
+        <id column="id" property="id"/>
+        <result column="p_id" property="pId"/>
+        <result column="fees_id" property="feesId"/>
+        <result column="fees_name" property="feesName"/>
+        <result column="departure_id" property="departureId"/>
+        <result column="departure" property="departure"/>
+        <result column="currency" property="currency"/>
+        <result column="twenty_gp" property="twentyGp"/>
+        <result column="forty_gp" property="fortyGp"/>
+        <result column="forty_hc" property="fortyHc"/>
+        <result column="forty_five_gp" property="fortyFiveGp"/>
+        <result column="pallet" property="pallet"/>
+        <result column="ticket" property="ticket"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="type" property="type"/>
+    </resultMap>
+
+
+    <select id="selectOrderCostItemPage" resultMap="orderCostItemResultMap">
+        select * from business_order_cost_item where is_deleted = 0
+    </select>
+
+</mapper>

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

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

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

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.purchase.sales.mapper.OrderCostMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="orderCostResultMap" type="org.springblade.purchase.sales.entity.OrderCost">
+        <id column="id" property="id"/>
+        <result column="goods_attribute" property="goodsAttribute"/>
+        <result column="out_harbor_id" property="outHarborId"/>
+        <result column="out_harbor_name" property="outHarborName"/>
+        <result column="remarks" property="remarks"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="fees_type" property="feesType"/>
+        <result column="amount" property="amount"/>
+    </resultMap>
+
+
+    <select id="selectOrderCostPage" resultMap="orderCostResultMap">
+        select * from business_order_cost where is_deleted = 0
+    </select>
+
+</mapper>

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

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

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

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

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

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

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

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

+ 93 - 9
blade-service/trade-finance/src/main/java/org/springblade/finance/controller/AccController.java

@@ -38,12 +38,15 @@ import org.springblade.core.mp.support.Query;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.secure.utils.SecureUtil;
 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.ObjectUtil;
 import org.springblade.finance.excel.FeeStatisticsExcel;
+import org.springblade.finance.excel.FeeStatisticsExcelJTMC;
 import org.springblade.finance.service.IAccService;
 import org.springblade.finance.vo.AccVO;
 import org.springblade.finance.vojo.Acc;
+import org.springblade.purchase.sales.vo.PurchaseOrderBExcel;
 import org.springblade.system.entity.Tenant;
 import org.springblade.system.feign.ITenantClient;
 import org.springblade.system.user.feign.IUserClient;
@@ -133,12 +136,12 @@ public class AccController extends BladeController {
 			.eq(acc.getCreateUser() != null, Acc::getCreateUser, acc.getCreateUser())
 			.eq(acc.getSrcParentId() != null, Acc::getSrcParentId, acc.getSrcParentId())
 			.eq(StringUtils.isNotBlank(acc.getDc()), Acc::getDc, acc.getDc());
-			accLambdaQueryWrapper.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getCheckAmount, 0)
-				.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getCheckAmount, 0)
-				.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getSettlementAmount, 0)
-				.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getSettlementAmount, 0)
-				.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getInvoiceAmount, 0)
-				.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getInvoiceAmount, 0);
+		accLambdaQueryWrapper.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getCheckAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getCheckAmount, 0)
+			.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getSettlementAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getSettlementAmount, 0)
+			.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getInvoiceAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getInvoiceAmount, 0);
 
 		accLambdaQueryWrapper.eq(Acc::getTenantId, SecureUtil.getTenantId())
 			.eq(Acc::getIsDeleted, 0);
@@ -147,12 +150,16 @@ public class AccController extends BladeController {
 		} else if (acc.getSettlementStatus() != null && acc.getSettlementStatus() == 2) {
 			accLambdaQueryWrapper.apply("Amount != Settlement_Amount");
 		}
+		if ("673511".equals(AuthUtil.getTenantId())) {
+			accLambdaQueryWrapper.ge(ObjectUtils.isNotNull(acc.getCreateStartDate()), Acc::getSrcDate, acc.getCreateStartDate())
+				.le(ObjectUtils.isNotNull(acc.getCreateEndDate()), Acc::getSrcDate, acc.getCreateEndDate());
+		}
 		accLambdaQueryWrapper.eq(Acc::getStatus, 0);
 		accLambdaQueryWrapper.orderByDesc(Acc::getCreateTime);
 		IPage<Acc> pages = accService.page(Condition.getPage(query), accLambdaQueryWrapper);
 		String corpIds = "";
-		for (Acc accOne : pages.getRecords()){
-			if (ObjectUtil.isNotEmpty(accOne.getCorpId())){
+		for (Acc accOne : pages.getRecords()) {
+			if (ObjectUtil.isNotEmpty(accOne.getCorpId())) {
 				corpIds = corpIds + accOne.getCorpId() + ",";
 			}
 		}
@@ -169,7 +176,7 @@ public class AccController extends BladeController {
 			}
 			//客户名称
 			if (e.getCorpId() != null) {
-				if (ObjectUtil.isNotEmpty(corpsDescList)){
+				if (ObjectUtil.isNotEmpty(corpsDescList)) {
 					e.setCorpName(corpsDescList.stream().filter(d -> d.getId().equals(e.getCorpId())).findFirst().get().getCname());
 				}
 			}
@@ -403,4 +410,81 @@ public class AccController extends BladeController {
 		return R.data(map);
 	}
 
+	@GetMapping("/exportAcc")
+	@ApiOperationSupport(order = 10)
+	@ApiOperation(value = "导出账单明细", notes = "acc")
+	public void exportAcc(Acc acc, HttpServletResponse response) {
+		LambdaQueryWrapper<Acc> accLambdaQueryWrapper = new LambdaQueryWrapper<>();
+		if (acc.getFlag() != null && acc.getFlag() == 1) {
+			accLambdaQueryWrapper.apply(" Amount > Settlement_Amount");
+		} else if (acc.getFlag() != null && acc.getFlag() == 2) {
+			accLambdaQueryWrapper.apply(" Amount > Invoice_Amount");
+		}
+		accLambdaQueryWrapper.between(StringUtils.isNotBlank(acc.getCreateStartDate()) && StringUtils.isNotBlank(acc.getCreateEndDate()), Acc::getCreateTime, acc.getCreateStartDate(), acc.getCreateEndDate())
+			.like(StringUtils.isNotBlank(acc.getBillType()), Acc::getBillType, acc.getBillType())
+			.like(StringUtils.isNotBlank(acc.getAccSysNo()), Acc::getAccSysNo, acc.getAccSysNo())
+			.like(StringUtils.isNotBlank(acc.getSrcBillNo()), Acc::getSrcBillNo, acc.getSrcBillNo())
+			.eq(acc.getCorpId() != null, Acc::getCorpId, acc.getCorpId())
+			.eq(StringUtils.isNotBlank(acc.getItemType()), Acc::getItemType, acc.getItemType())
+			.eq(StringUtils.isNotBlank(acc.getCostType()), Acc::getCostType, acc.getCostType())
+			.eq(acc.getCreateUser() != null, Acc::getCreateUser, acc.getCreateUser())
+			.eq(acc.getSrcParentId() != null, Acc::getSrcParentId, acc.getSrcParentId())
+			.eq(StringUtils.isNotBlank(acc.getDc()), Acc::getDc, acc.getDc());
+		accLambdaQueryWrapper.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getCheckAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getCheckAmount, 0)
+			.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getSettlementAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getSettlementAmount, 0)
+			.gt(acc.getCheckStatus() != null && acc.getCheckStatus() == 1, Acc::getInvoiceAmount, 0)
+			.eq(acc.getCheckStatus() != null && acc.getCheckStatus() == 2, Acc::getInvoiceAmount, 0);
+
+		accLambdaQueryWrapper.eq(Acc::getTenantId, SecureUtil.getTenantId())
+			.eq(Acc::getIsDeleted, 0);
+		if (acc.getSettlementStatus() != null && acc.getSettlementStatus() == 1) {
+			accLambdaQueryWrapper.apply("Amount = Settlement_Amount");
+		} else if (acc.getSettlementStatus() != null && acc.getSettlementStatus() == 2) {
+			accLambdaQueryWrapper.apply("Amount != Settlement_Amount");
+		}
+		if ("673511".equals(AuthUtil.getTenantId())) {
+			accLambdaQueryWrapper.ge(ObjectUtils.isNotNull(acc.getCreateStartDate()), Acc::getSrcDate, acc.getCreateStartDate())
+				.le(ObjectUtils.isNotNull(acc.getCreateEndDate()), Acc::getSrcDate, acc.getCreateEndDate());
+		}
+		accLambdaQueryWrapper.eq(Acc::getStatus, 0);
+		accLambdaQueryWrapper.orderByDesc(Acc::getCreateTime);
+		List<Acc> pages = accService.list(accLambdaQueryWrapper);
+		String corpIds = "";
+		for (Acc accOne : pages) {
+			if (ObjectUtil.isNotEmpty(accOne.getCorpId())) {
+				corpIds = corpIds + accOne.getCorpId() + ",";
+			}
+		}
+		List<CorpsDesc> corpsDescList = corpsDescClient.selectByCorpIds(corpIds);
+		pages.forEach(e -> {
+			//录入人
+			e.setCreateUserName(iUserClient.userInfoById(e.getCreateUser()).getData().getRealName());
+			//费用名称
+			if (StringUtils.isNotBlank(e.getCostType())) {
+				R<FeesDesc> detail = iFeesDescClient.detail(Long.valueOf(e.getCostType()));
+				if (detail.isSuccess() && detail.getData() != null) {
+					e.setItemName(detail.getData().getCname());
+				}
+			}
+			//客户名称
+			if (e.getCorpId() != null) {
+				if (ObjectUtil.isNotEmpty(corpsDescList)) {
+					e.setCorpName(corpsDescList.stream().filter(d -> d.getId().equals(e.getCorpId())).findFirst().get().getCname());
+				}
+			}
+			//客户名称
+			if (e.getCompanyid() != null) {
+				if (ObjectUtil.isNotEmpty(corpsDescList)) {
+					e.setCompany(corpsDescList.stream().filter(d -> d.getId().equals(e.getCompanyid())).findFirst().get().getCname());
+				}
+			}
+			e.setOutstandingAmount(e.getAmount().subtract(e.getSettlementAmount()));
+
+		});
+		List<FeeStatisticsExcelJTMC> list = BeanUtil.copy(pages, FeeStatisticsExcelJTMC.class);
+		ExcelUtil.export(response, "账单明细", "账单明细", list, FeeStatisticsExcelJTMC.class);
+	}
+
 }

+ 86 - 0
blade-service/trade-finance/src/main/java/org/springblade/finance/excel/FeeStatisticsExcelJTMC.java

@@ -0,0 +1,86 @@
+package org.springblade.finance.excel;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import com.alibaba.excel.annotation.write.style.ColumnWidth;
+import com.alibaba.excel.annotation.write.style.ContentRowHeight;
+import com.alibaba.excel.annotation.write.style.HeadRowHeight;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+import org.springframework.format.annotation.DateTimeFormat;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 费用统计
+ */
+@Data
+@ColumnWidth(25)
+@HeadRowHeight(20)
+@ContentRowHeight(18)
+public class FeeStatisticsExcelJTMC implements Serializable {
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 单据来源
+	 */
+	@ExcelProperty(value = "单据来源")
+	private String dc;
+
+	/**
+	 * 合同号
+	 */
+	@ExcelProperty(value = "合同号")
+	private String accSysNo;
+
+	/**
+	 * 提单号
+	 */
+	@ExcelProperty(value = "提单号")
+	private String srcBillNo;
+
+	/**
+	 * 往来单位
+	 */
+	@ExcelProperty(value = "往来单位")
+	private String corpName;
+
+	/**
+	 * 所属公司
+	 */
+	@ExcelProperty(value = "所属公司")
+	private String company;
+	/**
+	 * 费用名称
+	 */
+	@ExcelProperty(value = "费用名称")
+	private String costType;
+	/**
+	 * 账单金额
+	 */
+	@ExcelProperty(value = "账单金额")
+	private BigDecimal amount;
+	/**
+	 * 结算金额
+	 */
+	@ExcelProperty(value = "结算金额")
+	private BigDecimal settlementAmount;
+	/**
+	 * 未算金额
+	 */
+	@ExcelProperty(value = "未算金额")
+	private BigDecimal outstandingAmount;
+	/**
+	 * 账单日期
+	 */
+	@ExcelProperty(value = "账单日期")
+	@DateTimeFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	@JsonFormat(
+		pattern = "yyyy-MM-dd"
+	)
+	private Date createTime;
+
+}

+ 2 - 0
blade-service/trade-finance/src/main/java/org/springblade/finance/service/impl/SettlementServiceImpl.java

@@ -1028,12 +1028,14 @@ public class SettlementServiceImpl extends ServiceImpl<SettlementMapper, Settlem
 				acc.setBillType(billType);
 				acc.setDc("d");
 			} else {
+				acc.setAccDate(new Date());
 				if ("申请".equals(e.getSrcFeesType())) {
 					acc.setDc("c");
 				} else {
 					acc.setDc("d");
 				}
 				acc.setBillType(e.getSrcFeesType());
+				acc.setSrcDate(e.getStockTime());
 			}
 			BeanUtils.copyProperties(e, acc);
 			acc.setId(null);

+ 5 - 1
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/mapper/OrderMapper.xml

@@ -391,7 +391,8 @@
         bcd1.cname AS purchaser,
         bo.bill_no AS morderNo,
         bo.sys_no AS sysNo,
-        boi.is_Issue AS status
+        boi.is_Issue AS status,
+               boi.container_no AS containerNo
         FROM
         business_order bo
         LEFT JOIN business_order_items boi ON boi.pid = bo.id
@@ -463,6 +464,9 @@
         <if test="Order.isIssue!=null and Order.isIssue != ''">
             and boi.is_Issue = #{Order.isIssue}
         </if>
+        <if test="Order.containerNo!=null and Order.containerNo != ''">
+            and boi.container_no = #{Order.containerNo}
+        </if>
         <if test="Order.isIssue == null and Order.isIssue == ''">
             and (boi.is_Issue = '3' or boi.is_Issue = '4' or boi.is_Issue = '5' or boi.is_Issue = '6')
         </if>

+ 19 - 12
blade-service/trade-purchase/src/main/java/com/trade/purchase/order/service/impl/OrderServiceImpl.java

@@ -1021,6 +1021,12 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 					cMYWarehousingExcel.setUnit("");
 				}
 			}
+			if (ObjectUtils.isNotNull(cMYWarehousingExcel.getUnit())) {
+				orderItems.setUnit("1");
+			}
+			if (ObjectUtils.isNotNull(cMYWarehousingExcel.getPrice()) && ObjectUtils.isNotNull(cMYWarehousingExcel.getStorageInQuantity())) {
+				orderItems.setStorageAmount(cMYWarehousingExcel.getPrice().multiply(cMYWarehousingExcel.getStorageInQuantity()));
+			}
 
 		}
 		return excelList;
@@ -1379,6 +1385,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 		order.setBillNo(salesOrder.getBillNo());
 		order.setId(salesOrder.getId());
 		order.setOrderItemsList(orderItems);
+		order.setStockTime(salesOrder.getStockTime());
 
 		//盘点审批流程
 		if (OrderTypeEnum.INVENTORY.getType().equals(salesOrder.getBillType()) && checkFlag == 3) {
@@ -1795,6 +1802,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
 	public Order updateOutInStatus(Long id) {
 		Order order = orderMapper.selectById(id);
+		Date date = new Date();
 		if (ObjectUtils.isNotNull(order)) {
 			//出库提交
 			if (OrderTypeEnum.OUT_WAREHOUSING.getType().equals(order.getBillType())) {
@@ -1840,12 +1848,15 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 				queryWrapper.eq("is_deleted", 0);
 				List<OrderItems> orderItemsList = orderItemsMapper.selectList(queryWrapper);
 				for (OrderItems orderItems : orderItemsList) {
+					orderItems.setStockTime(date);
 					orderItems.setIsIssue("3");
 					orderItems.setUpdateTime(new Date());
 					orderItems.setUpdateUser(AuthUtil.getUserId());
 					orderItemsMapper.updateById(orderItems);
 				}
 			}
+			order.setStockTime(date);
+			order.setBusinesDate(date);
 			order.setStatus(2);
 			order.setConfirmStatus("1");
 			order.setUpdateTime(new Date());
@@ -2066,6 +2077,8 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 						map.put("thickness", item.getThickness());
 						map.put("itemId", item.getId());
 						map.put("orderId", item.getPid());
+						map.put("containerNo", item.getContainerNo());
+						map.put("businessNo", order.getBillNo());
 						//生成二维码
 						String qRCode = QRCodeTest.generateQRCode(qRCodeFile, JSONObject.toJSONString(map));
 						//替换地址
@@ -2255,9 +2268,9 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 		List<Order> orderList = baseMapper.selectList(orderLambdaQueryWrapper);
 		BigDecimal storageAmount = orderList.stream().map(Order::getStorageAmount).reduce(BigDecimal.ZERO, BigDecimal::add);
 		int num = financing.signum();
-			if (storageAmount.compareTo(financing.abs()) < 0) {
-				return R.data("融资金额:" + financing + "大于 库存金额 :" + storageAmount + " 是否继续操作?");
-			}
+		if (storageAmount.compareTo(financing.abs()) < 0) {
+			return R.data("融资金额:" + financing + "大于 库存金额 :" + storageAmount + " 是否继续操作?");
+		}
 		return R.data("操作成功");
 	}
 
@@ -2295,18 +2308,10 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 	 */
 	@Override
 	public R scanningCodeAdd(String billNo, Long id) {
-		Order order = baseMapper.selectById(id);
-		LambdaQueryWrapper<Order> RKlambdaQueryWrapper = new LambdaQueryWrapper<>();
-		RKlambdaQueryWrapper.eq(Order::getTenantId, AuthUtil.getTenantId())
-			.eq(Order::getIsDeleted, 0)
-			.eq(Order::getSysNo, order.getOrderNo())
-			.eq(Order::getBillType, OrderTypeEnum.WAREHOUSING.getType())
-			.eq(Order::getTradeType, OrderTypeEnum.WOOD_HARVESTING_CLOUD.getType());
-		Order RKOrder = baseMapper.selectOne(RKlambdaQueryWrapper);
 		LambdaQueryWrapper<OrderItems> lambdaQueryWrapper = new LambdaQueryWrapper<>();
 		lambdaQueryWrapper.eq(OrderItems::getTenantId, AuthUtil.getTenantId())
 			.eq(OrderItems::getIsDeleted, 0)
-			.eq(OrderItems::getPid, RKOrder.getId())
+			.eq(OrderItems::getBillType, OrderTypeEnum.WAREHOUSING.getType())
 			.eq(OrderItems::getIsIssue, "3")
 			.eq(OrderItems::getScanningComparison, "N");
 		List<OrderItems> orderItemsList = orderItemsService.list(lambdaQueryWrapper);
@@ -2439,6 +2444,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 					items.setSrcBillNo(order.getBillNo());
 					items.setStatusJT(1);
 					items.setBillNo(order.getBillNo());
+					items.setStockTime(order.getStockTime());
 					//获取费用id
 					if (ObjectUtils.isNotNull(orderFees.getItemId())) {
 						items.setCostType(orderFees.getItemId().toString());
@@ -2589,6 +2595,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements
 			items.setSrcBillNo(order.getBillNo());
 			items.setStatusJT(1);
 			items.setBillNo(order.getBillNo());
+			items.setStockTime(order.getStockTime());
 
 			//获取费用id
 			R<FeesDesc> fees = feesDescClient.getFeesByName("仓储费");