Browse Source

2023年10月20日17:38:40

纪新园 2 năm trước cách đây
mục cha
commit
19feb297ac
44 tập tin đã thay đổi với 2024 bổ sung64 xóa
  1. 31 0
      blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/vo/CorpNumberVOV1.java
  2. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BillNoCenterDTO.java
  3. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BillNoSerialDTO.java
  4. 34 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BusinessBillNoDTO.java
  5. 155 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BillNoCenter.java
  6. 145 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BillNoSerial.java
  7. 165 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BusinessBillNo.java
  8. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BillNoCenterVO.java
  9. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BillNoSerialVO.java
  10. 36 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BusinessBillNoVO.java
  11. 12 5
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java
  12. 6 0
      blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Containers.java
  13. 3 1
      blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjOrderItems.java
  14. 45 21
      blade-service/blade-client/src/main/java/org/springblade/client/wechat/feign/WechatClient.java
  15. 13 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/bigScreen/DeliverBigScreenController.java
  16. 5 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/mapper/DeliveryItemsMapper.java
  17. 19 1
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/mapper/DeliveryItemsMapper.xml
  18. 1 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/IDeliveryItemsService.java
  19. 19 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/impl/DeliveryItemsServiceImpl.java
  20. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BillNoCenterController.java
  21. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BillNoSerialController.java
  22. 126 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BusinessBillNoController.java
  23. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoCenterMapper.java
  24. 35 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoCenterMapper.xml
  25. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoSerialMapper.java
  26. 33 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoSerialMapper.xml
  27. 42 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BusinessBillNoMapper.java
  28. 37 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BusinessBillNoMapper.xml
  29. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBillNoCenterService.java
  30. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBillNoSerialService.java
  31. 53 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBusinessBillNoService.java
  32. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BillNoCenterServiceImpl.java
  33. 41 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BillNoSerialServiceImpl.java
  34. 267 0
      blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BusinessBillNoServiceImpl.java
  35. 2 1
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BillsController.java
  36. 1 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml
  37. 8 0
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IBillsService.java
  38. 28 31
      blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/impl/BillsServiceImpl.java
  39. 12 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/bigScreen/OrderDateController.java
  40. 7 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderItemsMapper.java
  41. 19 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderItemsMapper.xml
  42. 1 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderItemsService.java
  43. 5 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderItemsServiceImpl.java
  44. 19 4
      blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java

+ 31 - 0
blade-service-api/blade-deliver-goods-api/src/main/java/org/springblade/deliver/goods/vo/CorpNumberVOV1.java

@@ -0,0 +1,31 @@
+package org.springblade.deliver.goods.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+
+/**
+ * 大屏 今日发货量统计
+ *
+ * @author BladeX
+ * @since 2021-09-26
+ */
+@Data
+public class CorpNumberVOV1 implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+	/**
+	 * 品牌
+	 */
+	private String brand;
+	/**
+	 * 数量
+	 */
+	private BigDecimal quantity;
+	/**
+	 * 状态
+	 */
+	private String deliveryStatus;
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BillNoCenterDTO.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.los.billno.dto;
+
+import org.springblade.los.billno.entity.BillNoCenter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BillNoCenterDTO extends BillNoCenter {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BillNoSerialDTO.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.los.billno.dto;
+
+import org.springblade.los.billno.entity.BillNoSerial;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 物流-单据编号最大序列号数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BillNoSerialDTO extends BillNoSerial {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/dto/BusinessBillNoDTO.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.los.billno.dto;
+
+import org.springblade.los.billno.entity.BusinessBillNo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 基础资料-业务类型编号格式数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class BusinessBillNoDTO extends BusinessBillNo {
+	private static final long serialVersionUID = 1L;
+
+}

+ 155 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BillNoCenter.java

@@ -0,0 +1,155 @@
+/*
+ *      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.los.billno.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@TableName("los_bill_no_center")
+@ApiModel(value = "BillNoCenter对象", description = "物流-单据编号中心,用于回收可用编号")
+public class BillNoCenter implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建部门 Id
+	 */
+	@ApiModelProperty(value = "创建部门 Id")
+	private String createDept;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private String createDeptName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 业务类型表 id
+	 */
+	@ApiModelProperty(value = "业务类型表 id")
+	private Long businessTypeId;
+	/**
+	 * 业务类型代码
+	 */
+	@ApiModelProperty(value = "业务类型代码")
+	private String businessType;
+	/**
+	 * 业务类型编号格式 id
+	 */
+	@ApiModelProperty(value = "业务类型编号格式 id")
+	private Long pid;
+	/**
+	 * 业务实例 id
+	 */
+	@ApiModelProperty(value = "业务实例 id")
+	private Long billId;
+	/**
+	 * 可回收单据号码
+	 */
+	@ApiModelProperty(value = "可回收单据号码")
+	private String billNo;
+	/**
+	 * 重置规则 空=不重置 Year=按年 Month=按月
+	 */
+	@ApiModelProperty(value = "重置规则 空=不重置 Year=按年 Month=按月")
+	private String resetRule;
+	/**
+	 * 重置值
+	 */
+	@ApiModelProperty(value = "重置值")
+	private String resetValue;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

+ 145 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BillNoSerial.java

@@ -0,0 +1,145 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.los.billno.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 物流-单据编号最大序列号实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@TableName("los_bill_no_serial")
+@ApiModel(value = "BillNoSerial对象", description = "物流-单据编号最大序列号")
+public class BillNoSerial implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建部门 Id
+	 */
+	@ApiModelProperty(value = "创建部门 Id")
+	private String createDept;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private String createDeptName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 业务类型表 id
+	 */
+	@ApiModelProperty(value = "业务类型表 id")
+	private Long businessTypeId;
+	/**
+	 * 业务类型编号格式 id
+	 */
+	@ApiModelProperty(value = "业务类型编号格式 id")
+	private Long pid;
+	/**
+	 * 重置规则 空=不重置 Year=按年 Month=按月
+	 */
+	@ApiModelProperty(value = "重置规则 空=不重置 Year=按年 Month=按月")
+	private String resetRule;
+	/**
+	 * 重置值
+	 */
+	@ApiModelProperty(value = "重置值")
+	private String resetValue;
+	/**
+	 * 当前最大序列号
+	 */
+	@ApiModelProperty(value = "当前最大序列号")
+	private Long serialNo;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

+ 165 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/entity/BusinessBillNo.java

@@ -0,0 +1,165 @@
+/*
+ *      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.los.billno.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 基础资料-业务类型编号格式实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@TableName("los_b_business_bill_no")
+@ApiModel(value = "BusinessBillNo对象", description = "基础资料-业务类型编号格式")
+public class BusinessBillNo implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * 主键
+	 */
+	@ApiModelProperty(value = "主键")
+	private Long id;
+	/**
+	 * 创建人 Id
+	 */
+	@ApiModelProperty(value = "创建人 Id")
+	private Long createUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 创建部门 Id
+	 */
+	@ApiModelProperty(value = "创建部门 Id")
+	private String createDept;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private String createDeptName;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人 Id
+	 */
+	@ApiModelProperty(value = "修改人 Id")
+	private Long updateUser;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 分公司 Id
+	 */
+	@ApiModelProperty(value = "分公司 Id")
+	private String branchId;
+	/**
+	 * 业务类型表 id
+	 */
+	@ApiModelProperty(value = "业务类型表 id")
+	private Long businessTypeId;
+	/**
+	 * 业务类型代码
+	 */
+	@ApiModelProperty(value = "业务类型代码")
+	private String businessType;
+	/**
+	 * 单据号码格式代码
+	 */
+	@ApiModelProperty(value = "单据号码格式代码")
+	private String code;
+	/**
+	 * 单据号码格式名称
+	 */
+	@ApiModelProperty(value = "单据号码格式名称")
+	private String cnName;
+	/**
+	 * 单据号码格式名称
+	 */
+	@ApiModelProperty(value = "单据号码格式名称")
+	private String enName;
+	/**
+	 * 单据号码格式,BL[Y4][M2][D2][N6]
+	 */
+	@ApiModelProperty(value = "单据号码格式,BL[Y4][M2][D2][N6]")
+	private String codeFormat;
+	/**
+	 * 是否可回收(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否可回收(0 否 1是)")
+	private Integer isRecyclable;
+	/**
+	 * 是否检测空号(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否检测空号(0 否 1是)")
+	private Integer isCheckEmpty;
+	/**
+	 * 重置规则 空=不重置 Year=按年 Month=按月
+	 */
+	@ApiModelProperty(value = "重置规则 空=不重置 Year=按年 Month=按月")
+	private String resetRule;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	@TableLogic(value = "0", delval = "1")
+	private Integer isDeleted;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BillNoCenterVO.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.los.billno.vo;
+
+import org.springblade.los.billno.entity.BillNoCenter;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号视图实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "BillNoCenterVO对象", description = "物流-单据编号中心,用于回收可用编号")
+public class BillNoCenterVO extends BillNoCenter {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BillNoSerialVO.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.los.billno.vo;
+
+import org.springblade.los.billno.entity.BillNoSerial;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 物流-单据编号最大序列号视图实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "BillNoSerialVO对象", description = "物流-单据编号最大序列号")
+public class BillNoSerialVO extends BillNoSerial {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/billno/vo/BusinessBillNoVO.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.los.billno.vo;
+
+import org.springblade.los.billno.entity.BusinessBillNo;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 基础资料-业务类型编号格式视图实体类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "BusinessBillNoVO对象", description = "基础资料-业务类型编号格式")
+public class BusinessBillNoVO extends BusinessBillNo {
+	private static final long serialVersionUID = 1L;
+
+}

+ 12 - 5
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Bills.java

@@ -121,11 +121,6 @@ public class Bills implements Serializable {
 	@ApiModelProperty(value = "单据编号")
 	private String billNo;
 	/**
-	 * 编码生成规则
-	 */
-	@TableField(exist = false)
-	private String billNoFormat;
-	/**
 	 * 主单 Id
 	 */
 	@ApiModelProperty(value = "主单 Id")
@@ -1377,5 +1372,17 @@ public class Bills implements Serializable {
 	@TableField(exist = false)
 	private List<FilesCenter> filesList;
 
+	/**
+	 * 编码生成code
+	 */
+	@TableField(exist = false)
+	private String billNoFormat;
+
+	/**
+	 * 业务类型表 id
+	 */
+	@TableField(exist = false)
+	private Long businessTypeId;
+
 
 }

+ 6 - 0
blade-service-api/blade-los-api/src/main/java/org/springblade/los/business/sea/entity/Containers.java

@@ -393,6 +393,12 @@ public class Containers implements Serializable {
 	private String tenantId;
 
 	/**
+	 * 票数
+	 */
+	@ApiModelProperty(value = "票数")
+	private String ticketNumber;
+
+	/**
 	 * 箱号装货明细
 	 */
 	@TableField(exist = false)

+ 3 - 1
blade-service-api/blade-sales-part-api/src/main/java/org/springblade/salesPart/entity/PjOrderItems.java

@@ -25,6 +25,7 @@ import org.springblade.core.secure.utils.AuthUtil;
 
 import java.io.Serializable;
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.List;
 
@@ -254,6 +255,7 @@ public class PjOrderItems implements Serializable {
 	 * 附件
 	 */
 	@TableField(exist = false)
-	private List<PjGoodsFiles> goodsFilesList;
+	private List<PjGoodsFiles> goodsFilesList = new ArrayList<>();
+
 
 }

+ 45 - 21
blade-service/blade-client/src/main/java/org/springblade/client/wechat/feign/WechatClient.java

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RestController;
 import springfox.documentation.annotations.ApiIgnore;
 
 import java.math.BigDecimal;
+import java.math.RoundingMode;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -177,7 +178,7 @@ public class WechatClient implements IWechatClient {
 			String corpName = "";
 			String goodsName = "";
 			if ("792368".equals(wechatMessageTemplate.getTenantId())) {
-				System.out.println("======装填数据中==792368=========="+ type);
+				System.out.println("======装填数据中==792368==========" + type);
 				if (ObjectUtils.isNotNull(name) && name.length() > 8) {
 					corpName = name.substring(0, 8);
 				} else {
@@ -261,6 +262,42 @@ public class WechatClient implements IWechatClient {
 				);
 			}
 
+		} else if ("3".equals(type)) {
+			System.out.println("======装填数据开始==========" + type);
+			String corpName = "";
+			String goodsName = "";
+			if (ObjectUtils.isNull(amount)) {
+				amount = new BigDecimal("0.00");
+			}
+			if (ObjectUtils.isNull(device)) {
+				device = "-";
+			}
+			if (ObjectUtils.isNotNull(name) && name.length() > 3) {
+				corpName = name.substring(0, 3);
+			} else {
+				if (ObjectUtils.isNull(name)) {
+					corpName = "无";
+				} else {
+					corpName = name;
+				}
+			}
+			if (ObjectUtils.isNotNull(deviceDescription) && deviceDescription.length() > 8) {
+				goodsName = deviceDescription.substring(0, 8);
+			} else {
+				if (ObjectUtils.isNull(deviceDescription)) {
+					goodsName = "无";
+				} else {
+					goodsName = deviceDescription;
+				}
+			}
+			data = Arrays.asList(
+				new WxMpTemplateData("first", title),
+				new WxMpTemplateData("character_string1", device),
+				new WxMpTemplateData("time7", date),
+				new WxMpTemplateData("thing12", goodsName),
+				new WxMpTemplateData("character_string14", amount.setScale(0, RoundingMode.HALF_UP).toString()),
+				new WxMpTemplateData("thing9", corpName)
+			);
 		} else {
 			return "";
 		}
@@ -271,26 +308,13 @@ public class WechatClient implements IWechatClient {
 		System.out.println("======推送openids==========" + openid);
 		System.out.println("======推送arrs==========" + arrs.length);
 		for (String item : arrs) {
-			WxMpTemplateMessage templateMessage = null;
-			if ("1".equals(type)) {
-				//2,推送消息
-				templateMessage = WxMpTemplateMessage.builder()
-					.toUser(item)//要推送的用户openid
-					.templateId(wechatMessageTemplate.getTemplateId())//模版id
-					.miniProgram(new WxMpTemplateMessage.MiniProgram(wechatMessageTemplate.getAppId(), "pages/index"))
-					.data(data)
-					.build();
-			} else if ("2".equals(type)) {
-				//2,推送消息
-				templateMessage = WxMpTemplateMessage.builder()
-					.toUser(item)//要推送的用户openid
-					.templateId(wechatMessageTemplate.getTemplateId())//模版id
-					.miniProgram(new WxMpTemplateMessage.MiniProgram(wechatMessageTemplate.getAppId(), "pages/index"))
-					.data(data)
-					.build();
-			} else {
-				break;
-			}
+			//2,推送消息
+			WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder()
+				.toUser(item)//要推送的用户openid
+				.templateId(wechatMessageTemplate.getTemplateId())//模版id
+				.miniProgram(new WxMpTemplateMessage.MiniProgram(wechatMessageTemplate.getAppId(), "pages/index"))
+				.data(data)
+				.build();
 			System.out.println("======请求拼接完成==========");
 			try {
 				wxMpService.getTemplateMsgService().sendTemplateMsg(templateMessage);

+ 13 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/bigScreen/DeliverBigScreenController.java

@@ -71,4 +71,17 @@ public class DeliverBigScreenController extends BladeController {
 		delivery.setTradeType(OrderTypeEnum.DOMESTIC.getType());
 		return R.data(deliveryItemsService.corpNumber(delivery));
 	}
+
+	/**
+	 * 达沃特 按所属公司统计今日发货待发货数量
+	 */
+	@GetMapping("/corpNumberV1")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "达沃特数字大屏获取当月每天发货数量", notes = "传入delivery")
+	public R corpNumberV1(DeliveryVO delivery) {
+		delivery.setTenantId(SecureUtil.getTenantId());
+		delivery.setBillType(OrderTypeEnum.RECEIPT.getType());
+		delivery.setTradeType(OrderTypeEnum.DOMESTIC.getType());
+		return R.data(deliveryItemsService.corpNumberV1(delivery));
+	}
 }

+ 5 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/mapper/DeliveryItemsMapper.java

@@ -19,9 +19,11 @@ package org.springblade.deliver.goods.mapper;
 import com.baomidou.mybatisplus.annotation.SqlParser;
 import org.apache.ibatis.annotations.Param;
 import org.springblade.deliver.goods.entity.DeliveryItems;
+import org.springblade.deliver.goods.vo.CorpNumberVOV1;
 import org.springblade.deliver.goods.vo.DeliveryItemsVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springblade.deliver.goods.vo.DeliveryVO;
 import org.springblade.deliver.goods.vo.ShipmentsVo;
 import org.springblade.purchase.sales.vo.ChargeMemberVo;
 import org.springframework.web.bind.annotation.PostMapping;
@@ -29,6 +31,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import java.math.BigDecimal;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 发货明细 Mapper 接口
@@ -97,4 +100,6 @@ public interface DeliveryItemsMapper extends BaseMapper<DeliveryItems> {
 	 * @param id 订单主表id
 	 */
 	Integer submitPay(@Param("id") Long id);
+
+	List<CorpNumberVOV1> corpNumberV1(@Param("delivery")DeliveryVO delivery);
 }

+ 19 - 1
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/mapper/DeliveryItemsMapper.xml

@@ -105,7 +105,7 @@
         <if test="tradeType!=null and tradeType != ''">
             AND bd.trade_type = #{tradeType}
         </if>
-        AND MONTH(bd.business_date) = MONTH(NOW())
+        and DATE_FORMAT( bd.business_date, '%Y-%m' ) = DATE_FORMAT( NOW(), '%Y-%m' )
         GROUP BY DAY(bd.business_date)
         )n
         ON m.mark = n.mark
@@ -143,6 +143,24 @@
             and DATE_FORMAT(bd.busines_date,'%Y-%m') = DATE_FORMAT(NOW(),'%Y-%m')
         </if>
     </select>
+    <select id="corpNumberV1" resultType="org.springblade.deliver.goods.vo.CorpNumberVOV1">
+        SELECT
+            BGD.brand AS brand,
+            IF ( BOI.quantity, BOI.quantity, 0 )  AS quantity,
+            BO.delivery_status  as deliveryStatus
+        FROM
+            business_delivery BO
+                LEFT JOIN ( SELECT pid, item_id, IFNULL( SUM( order_quantity ), 0 ) AS quantity FROM business_order_items WHERE is_deleted = 0 GROUP BY pid ) BOI ON BOI.pid = BO.src_id
+                LEFT JOIN basic_goods_desc BGD ON BGD.id = BOI.item_id
+        WHERE
+            BO.tenant_id = #{delivery.tenantId}
+          AND BO.is_deleted = 0
+          AND BO.bill_type = #{delivery.billType}
+          AND DATE_FORMAT( BO.busines_date, '%Y-%m-%d' ) = DATE_FORMAT( NOW(), '%Y-%m-%d' )
+        ORDER BY
+            quantity DESC
+    </select>
+
     <update id="submitPay" parameterType="long">
         UPDATE business_delivery_items SET is_check = '1' WHERE pid = #{id}
     </update>

+ 1 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/service/IDeliveryItemsService.java

@@ -85,4 +85,5 @@ public interface IDeliveryItemsService extends IService<DeliveryItems> {
 
 	StockGoods receivingInventory(StockGoods stock, OrderItems e);
 
+	List<CorpNumberVO> corpNumberV1(DeliveryVO delivery);
 }

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

@@ -1178,6 +1178,25 @@ public class DeliveryItemsServiceImpl extends ServiceImpl<DeliveryItemsMapper, D
 		return stockGoods;
 	}
 
+	@Override
+	public List<CorpNumberVO> corpNumberV1(DeliveryVO delivery) {
+		List<CorpNumberVO> list = new ArrayList<>();
+		List<CorpNumberVOV1> mapList = baseMapper.corpNumberV1(delivery);
+		if (mapList.size() > 0) {
+			List<String> brandList = mapList.stream().map(CorpNumberVOV1::getBrand).distinct().collect(Collectors.toList());
+			for (String item : brandList) {
+				CorpNumberVO corpNumberVO = new CorpNumberVO();
+				corpNumberVO.setBelongToCorpName(item);
+				corpNumberVO.setShipmentsNumber(mapList.stream().filter(e -> e.getBrand().equals(item) && "已发货".equals(e.getDeliveryStatus()))
+					.map(CorpNumberVOV1::getQuantity).filter(ObjectUtils::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+				corpNumberVO.setWaitDeliver(mapList.stream().filter(e -> e.getBrand().equals(item) && !"已发货".equals(e.getDeliveryStatus()))
+					.map(CorpNumberVOV1::getQuantity).filter(ObjectUtils::isNotNull).reduce(BigDecimal.ZERO, BigDecimal::add));
+				list.add(corpNumberVO);
+			}
+		}
+		return list;
+	}
+
 	/**
 	 * 将Object转换成List类型
 	 *

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BillNoCenterController.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.los.billno.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.los.billno.entity.BillNoCenter;
+import org.springblade.los.billno.vo.BillNoCenterVO;
+import org.springblade.los.billno.service.IBillNoCenterService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号 控制器
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/billnocenter")
+@Api(value = "物流-单据编号中心,用于回收可用编号", tags = "物流-单据编号中心,用于回收可用编号接口")
+public class BillNoCenterController extends BladeController {
+
+	private final IBillNoCenterService billNoCenterService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入billNoCenter")
+	public R<BillNoCenter> detail(BillNoCenter billNoCenter) {
+		BillNoCenter detail = billNoCenterService.getOne(Condition.getQueryWrapper(billNoCenter));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 物流-单据编号中心,用于回收可用编号
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入billNoCenter")
+	public R<IPage<BillNoCenter>> list(BillNoCenter billNoCenter, Query query) {
+		IPage<BillNoCenter> pages = billNoCenterService.page(Condition.getPage(query), Condition.getQueryWrapper(billNoCenter));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 物流-单据编号中心,用于回收可用编号
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入billNoCenter")
+	public R<IPage<BillNoCenterVO>> page(BillNoCenterVO billNoCenter, Query query) {
+		IPage<BillNoCenterVO> pages = billNoCenterService.selectBillNoCenterPage(Condition.getPage(query), billNoCenter);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 物流-单据编号中心,用于回收可用编号
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入billNoCenter")
+	public R save(@Valid @RequestBody BillNoCenter billNoCenter) {
+		return R.status(billNoCenterService.save(billNoCenter));
+	}
+
+	/**
+	 * 修改 物流-单据编号中心,用于回收可用编号
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入billNoCenter")
+	public R update(@Valid @RequestBody BillNoCenter billNoCenter) {
+		return R.status(billNoCenterService.updateById(billNoCenter));
+	}
+
+	/**
+	 * 新增或修改 物流-单据编号中心,用于回收可用编号
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入billNoCenter")
+	public R submit(@Valid @RequestBody BillNoCenter billNoCenter) {
+		return R.status(billNoCenterService.saveOrUpdate(billNoCenter));
+	}
+
+	
+	/**
+	 * 删除 物流-单据编号中心,用于回收可用编号
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(billNoCenterService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BillNoSerialController.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.los.billno.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.los.billno.entity.BillNoSerial;
+import org.springblade.los.billno.vo.BillNoSerialVO;
+import org.springblade.los.billno.service.IBillNoSerialService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 物流-单据编号最大序列号 控制器
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/billnoserial")
+@Api(value = "物流-单据编号最大序列号", tags = "物流-单据编号最大序列号接口")
+public class BillNoSerialController extends BladeController {
+
+	private final IBillNoSerialService billNoSerialService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入billNoSerial")
+	public R<BillNoSerial> detail(BillNoSerial billNoSerial) {
+		BillNoSerial detail = billNoSerialService.getOne(Condition.getQueryWrapper(billNoSerial));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 物流-单据编号最大序列号
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入billNoSerial")
+	public R<IPage<BillNoSerial>> list(BillNoSerial billNoSerial, Query query) {
+		IPage<BillNoSerial> pages = billNoSerialService.page(Condition.getPage(query), Condition.getQueryWrapper(billNoSerial));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 物流-单据编号最大序列号
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入billNoSerial")
+	public R<IPage<BillNoSerialVO>> page(BillNoSerialVO billNoSerial, Query query) {
+		IPage<BillNoSerialVO> pages = billNoSerialService.selectBillNoSerialPage(Condition.getPage(query), billNoSerial);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 物流-单据编号最大序列号
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入billNoSerial")
+	public R save(@Valid @RequestBody BillNoSerial billNoSerial) {
+		return R.status(billNoSerialService.save(billNoSerial));
+	}
+
+	/**
+	 * 修改 物流-单据编号最大序列号
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入billNoSerial")
+	public R update(@Valid @RequestBody BillNoSerial billNoSerial) {
+		return R.status(billNoSerialService.updateById(billNoSerial));
+	}
+
+	/**
+	 * 新增或修改 物流-单据编号最大序列号
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入billNoSerial")
+	public R submit(@Valid @RequestBody BillNoSerial billNoSerial) {
+		return R.status(billNoSerialService.saveOrUpdate(billNoSerial));
+	}
+
+	
+	/**
+	 * 删除 物流-单据编号最大序列号
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(billNoSerialService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 126 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/controller/BusinessBillNoController.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.los.billno.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.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.vo.BusinessBillNoVO;
+import org.springblade.los.billno.service.IBusinessBillNoService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 基础资料-业务类型编号格式 控制器
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/businessbillno")
+@Api(value = "基础资料-业务类型编号格式", tags = "基础资料-业务类型编号格式接口")
+public class BusinessBillNoController extends BladeController {
+
+	private final IBusinessBillNoService businessBillNoService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入businessBillNo")
+	public R<BusinessBillNo> detail(BusinessBillNo businessBillNo) {
+		BusinessBillNo detail = businessBillNoService.getOne(Condition.getQueryWrapper(businessBillNo));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 基础资料-业务类型编号格式
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入businessBillNo")
+	public R<IPage<BusinessBillNo>> list(BusinessBillNo businessBillNo, Query query) {
+		IPage<BusinessBillNo> pages = businessBillNoService.page(Condition.getPage(query), Condition.getQueryWrapper(businessBillNo));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 基础资料-业务类型编号格式
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入businessBillNo")
+	public R<IPage<BusinessBillNoVO>> page(BusinessBillNoVO businessBillNo, Query query) {
+		IPage<BusinessBillNoVO> pages = businessBillNoService.selectBusinessBillNoPage(Condition.getPage(query), businessBillNo);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 基础资料-业务类型编号格式
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入businessBillNo")
+	public R save(@Valid @RequestBody BusinessBillNo businessBillNo) {
+		return R.status(businessBillNoService.save(businessBillNo));
+	}
+
+	/**
+	 * 修改 基础资料-业务类型编号格式
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入businessBillNo")
+	public R update(@Valid @RequestBody BusinessBillNo businessBillNo) {
+		return R.status(businessBillNoService.updateById(businessBillNo));
+	}
+
+	/**
+	 * 新增或修改 基础资料-业务类型编号格式
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入businessBillNo")
+	public R submit(@Valid @RequestBody BusinessBillNo businessBillNo) {
+		return R.status(businessBillNoService.saveOrUpdate(businessBillNo));
+	}
+
+	
+	/**
+	 * 删除 基础资料-业务类型编号格式
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(businessBillNoService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoCenterMapper.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.los.billno.mapper;
+
+import org.springblade.los.billno.entity.BillNoCenter;
+import org.springblade.los.billno.vo.BillNoCenterVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface BillNoCenterMapper extends BaseMapper<BillNoCenter> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param billNoCenter
+	 * @return
+	 */
+	List<BillNoCenterVO> selectBillNoCenterPage(IPage page, BillNoCenterVO billNoCenter);
+
+}

+ 35 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoCenterMapper.xml

@@ -0,0 +1,35 @@
+<?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.los.billno.mapper.BillNoCenterMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="billNoCenterResultMap" type="org.springblade.los.billno.entity.BillNoCenter">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="business_type_id" property="businessTypeId"/>
+        <result column="business_type" property="businessType"/>
+        <result column="pid" property="pid"/>
+        <result column="bill_id" property="billId"/>
+        <result column="bill_no" property="billNo"/>
+        <result column="reset_rule" property="resetRule"/>
+        <result column="reset_value" property="resetValue"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectBillNoCenterPage" resultMap="billNoCenterResultMap">
+        select * from los_bill_no_center where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoSerialMapper.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.los.billno.mapper;
+
+import org.springblade.los.billno.entity.BillNoSerial;
+import org.springblade.los.billno.vo.BillNoSerialVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 物流-单据编号最大序列号 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface BillNoSerialMapper extends BaseMapper<BillNoSerial> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param billNoSerial
+	 * @return
+	 */
+	List<BillNoSerialVO> selectBillNoSerialPage(IPage page, BillNoSerialVO billNoSerial);
+
+}

+ 33 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BillNoSerialMapper.xml

@@ -0,0 +1,33 @@
+<?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.los.billno.mapper.BillNoSerialMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="billNoSerialResultMap" type="org.springblade.los.billno.entity.BillNoSerial">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="business_type_id" property="businessTypeId"/>
+        <result column="pid" property="pid"/>
+        <result column="reset_rule" property="resetRule"/>
+        <result column="reset_value" property="resetValue"/>
+        <result column="serial_no" property="serialNo"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectBillNoSerialPage" resultMap="billNoSerialResultMap">
+        select * from los_bill_no_serial where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BusinessBillNoMapper.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.los.billno.mapper;
+
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.vo.BusinessBillNoVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 基础资料-业务类型编号格式 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface BusinessBillNoMapper extends BaseMapper<BusinessBillNo> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param businessBillNo
+	 * @return
+	 */
+	List<BusinessBillNoVO> selectBusinessBillNoPage(IPage page, BusinessBillNoVO businessBillNo);
+
+}

+ 37 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/mapper/BusinessBillNoMapper.xml

@@ -0,0 +1,37 @@
+<?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.los.billno.mapper.BusinessBillNoMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="businessBillNoResultMap" type="org.springblade.los.billno.entity.BusinessBillNo">
+        <id column="id" property="id"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_dept_name" property="createDeptName"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_user_name" property="updateUserName"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="branch_id" property="branchId"/>
+        <result column="business_type_id" property="businessTypeId"/>
+        <result column="business_type" property="businessType"/>
+        <result column="code" property="code"/>
+        <result column="cn_name" property="cnName"/>
+        <result column="en_name" property="enName"/>
+        <result column="code_format" property="codeFormat"/>
+        <result column="is_recyclable" property="isRecyclable"/>
+        <result column="is_check_empty" property="isCheckEmpty"/>
+        <result column="reset_rule" property="resetRule"/>
+        <result column="version" property="version"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="remarks" property="remarks"/>
+    </resultMap>
+
+
+    <select id="selectBusinessBillNoPage" resultMap="businessBillNoResultMap">
+        select * from los_b_business_bill_no where is_deleted = 0
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBillNoCenterService.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.los.billno.service;
+
+import org.springblade.los.billno.entity.BillNoCenter;
+import org.springblade.los.billno.vo.BillNoCenterVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号 服务类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface IBillNoCenterService extends IService<BillNoCenter> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param billNoCenter
+	 * @return
+	 */
+	IPage<BillNoCenterVO> selectBillNoCenterPage(IPage<BillNoCenterVO> page, BillNoCenterVO billNoCenter);
+
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBillNoSerialService.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.los.billno.service;
+
+import org.springblade.los.billno.entity.BillNoSerial;
+import org.springblade.los.billno.vo.BillNoSerialVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物流-单据编号最大序列号 服务类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface IBillNoSerialService extends IService<BillNoSerial> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param billNoSerial
+	 * @return
+	 */
+	IPage<BillNoSerialVO> selectBillNoSerialPage(IPage<BillNoSerialVO> page, BillNoSerialVO billNoSerial);
+
+}

+ 53 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/IBusinessBillNoService.java

@@ -0,0 +1,53 @@
+/*
+ *      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.los.billno.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springblade.core.tool.api.R;
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.vo.BusinessBillNoVO;
+import org.springblade.los.business.sea.entity.Bills;
+
+/**
+ * 基础资料-业务类型编号格式 服务类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+public interface IBusinessBillNoService extends IService<BusinessBillNo> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param businessBillNo
+	 * @return
+	 */
+	IPage<BusinessBillNoVO> selectBusinessBillNoPage(IPage<BusinessBillNoVO> page, BusinessBillNoVO businessBillNo);
+
+
+	/**
+	 * 生成业务编号
+	 *
+	 * @param businessBillNo
+	 * @return
+	 */
+	R<String> getBillNoLos(BusinessBillNo businessBillNo);
+
+	void deteleBillNo(Bills item);
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BillNoCenterServiceImpl.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.los.billno.service.impl;
+
+import org.springblade.los.billno.entity.BillNoCenter;
+import org.springblade.los.billno.vo.BillNoCenterVO;
+import org.springblade.los.billno.mapper.BillNoCenterMapper;
+import org.springblade.los.billno.service.IBillNoCenterService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物流-单据编号中心,用于回收可用编号 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Service
+public class BillNoCenterServiceImpl extends ServiceImpl<BillNoCenterMapper, BillNoCenter> implements IBillNoCenterService {
+
+	@Override
+	public IPage<BillNoCenterVO> selectBillNoCenterPage(IPage<BillNoCenterVO> page, BillNoCenterVO billNoCenter) {
+		return page.setRecords(baseMapper.selectBillNoCenterPage(page, billNoCenter));
+	}
+
+}

+ 41 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BillNoSerialServiceImpl.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.los.billno.service.impl;
+
+import org.springblade.los.billno.entity.BillNoSerial;
+import org.springblade.los.billno.vo.BillNoSerialVO;
+import org.springblade.los.billno.mapper.BillNoSerialMapper;
+import org.springblade.los.billno.service.IBillNoSerialService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 物流-单据编号最大序列号 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Service
+public class BillNoSerialServiceImpl extends ServiceImpl<BillNoSerialMapper, BillNoSerial> implements IBillNoSerialService {
+
+	@Override
+	public IPage<BillNoSerialVO> selectBillNoSerialPage(IPage<BillNoSerialVO> page, BillNoSerialVO billNoSerial) {
+		return page.setRecords(baseMapper.selectBillNoSerialPage(page, billNoSerial));
+	}
+
+}

+ 267 - 0
blade-service/blade-los/src/main/java/org/springblade/los/billno/service/impl/BusinessBillNoServiceImpl.java

@@ -0,0 +1,267 @@
+/*
+ *      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.los.billno.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.AllArgsConstructor;
+import net.logstash.logback.encoder.org.apache.commons.lang3.time.DateFormatUtils;
+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.billno.entity.BillNoCenter;
+import org.springblade.los.billno.entity.BillNoSerial;
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.mapper.BusinessBillNoMapper;
+import org.springblade.los.billno.service.IBillNoCenterService;
+import org.springblade.los.billno.service.IBillNoSerialService;
+import org.springblade.los.billno.service.IBusinessBillNoService;
+import org.springblade.los.billno.vo.BillNoSerialVO;
+import org.springblade.los.billno.vo.BusinessBillNoVO;
+import org.springblade.los.business.sea.entity.Bills;
+import org.springframework.stereotype.Service;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 基础资料-业务类型编号格式 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-10-20
+ */
+@Service
+@AllArgsConstructor
+public class BusinessBillNoServiceImpl extends ServiceImpl<BusinessBillNoMapper, BusinessBillNo> implements IBusinessBillNoService {
+
+
+	private final IBillNoSerialService billNoSerialService;
+
+	private final IBillNoCenterService billNoCenterService;
+
+	@Override
+	public IPage<BusinessBillNoVO> selectBusinessBillNoPage(IPage<BusinessBillNoVO> page, BusinessBillNoVO businessBillNo) {
+		return page.setRecords(baseMapper.selectBusinessBillNoPage(page, businessBillNo));
+	}
+
+	@Override
+	public R<String> getBillNoLos(BusinessBillNo businessBillNo) {
+		BusinessBillNo detail = baseMapper.selectOne(new LambdaQueryWrapper<BusinessBillNo>()
+			.eq(BusinessBillNo::getTenantId, AuthUtil.getTenantId())
+			.eq(BusinessBillNo::getIsDeleted, 0)
+			.eq(BusinessBillNo::getBusinessTypeId, businessBillNo.getBusinessTypeId())
+			.eq(BusinessBillNo::getCode, businessBillNo.getCode())
+			.eq(BusinessBillNo::getStatus, 0));
+		if (detail == null) {
+			throw new RuntimeException("未找到可用生成编码规则");
+		}
+		Date date = new Date();
+		//编码开头
+		String head = "";
+		//编码日期格式
+		String yearMmDd = "";
+		//编码序列号
+		String tail = "";
+		//格式化后日期
+		String yyyyMM = "";
+		//编码
+		String billNo = null;
+		//判断编码格式是否为空
+		if (ObjectUtils.isNotNull(detail.getCodeFormat())) {
+			int index = detail.getCodeFormat().indexOf("%");
+			int indexLast = detail.getCodeFormat().indexOf("%", index + 1);
+			head = detail.getCodeFormat().substring(0, index);
+			yearMmDd = detail.getCodeFormat().substring(index + 1, indexLast);
+			tail = detail.getCodeFormat().substring(indexLast + 1);
+		} else {
+			throw new RuntimeException("编码格式为空");
+		}
+		//格式化日期
+		if (ObjectUtils.isNotNull(yearMmDd)) {
+			yyyyMM = DateFormatUtils.format(date, yearMmDd);
+		}
+		billNo = head + yyyyMM;
+		List<BillNoCenter> billNoCenterList = billNoCenterService.list(new LambdaQueryWrapper<BillNoCenter>()
+			.eq(BillNoCenter::getTenantId, AuthUtil.getTenantId())
+			.eq(BillNoCenter::getIsDeleted, 0)
+			.eq(BillNoCenter::getBusinessTypeId, detail.getBusinessTypeId())
+			.eq(BillNoCenter::getBusinessType, detail.getBusinessType())
+			.eq(BillNoCenter::getPid, detail.getId())
+			.eq(BillNoCenter::getResetRule, detail.getResetRule())
+			.eq(BillNoCenter::getResetValue, billNo)
+			.orderByDesc(BillNoCenter::getCreateTime)
+		);
+		if (billNoCenterList.size() > 0) {
+			return R.data(billNoCenterList.get(0).getBillNo());
+		} else {
+			BillNoSerial billNoSerial1 = new BillNoSerialVO();
+			//判断是否有生成过编码记录
+			BillNoSerial billNoSerial = billNoSerialService.getOne(new LambdaQueryWrapper<BillNoSerial>()
+				.eq(BillNoSerial::getTenantId, AuthUtil.getTenantId())
+				.eq(BillNoSerial::getIsDeleted, 0)
+				.eq(BillNoSerial::getBusinessTypeId, detail.getBusinessTypeId())
+				.eq(BillNoSerial::getPid, detail.getId())
+				.eq(BillNoSerial::getResetRule, detail.getResetRule())
+				.eq(BillNoSerial::getResetValue, billNo)
+			);
+			if (billNoSerial == null) {
+				billNoSerial1.setBusinessTypeId(detail.getBusinessTypeId());
+				billNoSerial1.setSerialNo(1L);
+				billNoSerial1.setPid(detail.getId());
+				billNoSerial1.setResetRule(detail.getResetRule());
+				billNoSerial1.setResetValue(billNo);
+				billNoSerial1.setBranchId(AuthUtil.getDeptId());
+				billNoSerial1.setCreateDept(AuthUtil.getDeptId());
+				billNoSerial1.setCreateTime(new Date());
+				billNoSerial1.setCreateUser(AuthUtil.getUserId());
+				billNoSerial1.setCreateUserName(AuthUtil.getUserName());
+				billNoSerial1.setTenantId(AuthUtil.getTenantId());
+				//生成序列号  循环赋0  最后一位赋1
+				if (tail.length() > 0) {
+					StringBuilder number = new StringBuilder();
+					for (int i = 0; i <= tail.length(); i++) {
+						if (i == tail.length()) {
+							number.append(number).append("1");
+						} else {
+							number.append(number).append("0");
+						}
+					}
+					billNo = billNo + number.toString();
+				}
+			} else {
+				BeanUtil.copyProperties(billNoSerial, billNoSerial1);
+				billNoSerial1.setSerialNo(billNoSerial.getSerialNo() + 1);
+				billNoSerial1.setUpdateTime(new Date());
+				billNoSerial1.setUpdateUser(AuthUtil.getUserId());
+				billNoSerial1.setUpdateUserName(AuthUtil.getUserName());
+				String count = billNoSerial1.getSerialNo() + "";
+				if (tail.length() > 0) {
+					//判断最大序列号长度与序列号规则长度是否相等  相等不赋0
+					if (tail.length() == count.length()) {
+						billNo = billNo + count;
+					} else {
+						//不相等  序列号规则长度-最大序列号长度 之间赋0 然后拼接最大序列号
+						StringBuilder number = new StringBuilder();
+						for (int i = 0; i <= tail.length() - count.length(); i++) {
+							number.append(number).append("0");
+						}
+						billNo = billNo + number.toString() + count;
+					}
+				}
+			}
+			billNoSerialService.saveOrUpdate(billNoSerial1);
+			return R.data(billNo);
+		}
+	}
+
+	@Override
+	public void deteleBillNo(Bills item) {
+		String billNo = "";
+		String mbillNo = "";
+		if (ObjectUtils.isNotNull(item.getBillNo())) {
+			billNo = item.getBillNo().replaceAll("\\D", "");
+		}
+		if (ObjectUtils.isNotNull(item.getMblno())) {
+			mbillNo = item.getMblno().replaceAll("\\D", "");
+		}
+		Date date = new Date();
+		//编码开头
+		String head = "";
+		//编码日期格式
+		String yearMmDd = "";
+		//格式化后日期
+		String yyyyMM = "";
+		List<BillNoSerial> billNoSerialList = billNoSerialService.list(new LambdaQueryWrapper<BillNoSerial>()
+			.eq(BillNoSerial::getTenantId, AuthUtil.getTenantId())
+			.eq(BillNoSerial::getIsDeleted, 0)
+			.like(BillNoSerial::getResetValue, billNo));
+		if (billNoSerialList.size() > 0) {
+			BusinessBillNo detail = baseMapper.selectById(billNoSerialList.get(0).getPid());
+			//判断编码格式是否为空
+			if (ObjectUtils.isNotNull(detail.getCodeFormat())) {
+				int index = detail.getCodeFormat().indexOf("%");
+				int indexLast = detail.getCodeFormat().indexOf("%", index + 1);
+				head = detail.getCodeFormat().substring(0, index);
+				yearMmDd = detail.getCodeFormat().substring(index + 1, indexLast);
+			} else {
+				throw new RuntimeException("编码格式为空");
+			}
+			//格式化日期
+			if (ObjectUtils.isNotNull(yearMmDd)) {
+				yyyyMM = DateFormatUtils.format(date, yearMmDd);
+			}
+			if (ObjectUtils.isNotNull(detail) && 1 == detail.getIsRecyclable()) {
+				BillNoCenter billNoCenter = new BillNoCenter();
+				billNoCenter.setBusinessType(detail.getBusinessType());
+				billNoCenter.setBusinessTypeId(detail.getBusinessTypeId());
+				billNoCenter.setPid(detail.getId());
+				billNoCenter.setBillId(item.getId());
+				billNoCenter.setBillNo(item.getBillNo());
+				billNoCenter.setResetRule(detail.getResetRule());
+				billNoCenter.setResetValue(head + yyyyMM);
+				billNoCenter.setTenantId(AuthUtil.getTenantId());
+				billNoCenter.setCreateTime(new Date());
+				billNoCenter.setCreateUser(AuthUtil.getUserId());
+				billNoCenter.setCreateUserName(AuthUtil.getUserName());
+				billNoCenter.setCreateDept(AuthUtil.getDeptId());
+				billNoCenterService.save(billNoCenter);
+			}
+		}
+
+		List<BillNoSerial> billNoSerialList1 = billNoSerialService.list(new LambdaQueryWrapper<BillNoSerial>()
+			.eq(BillNoSerial::getTenantId, AuthUtil.getTenantId())
+			.eq(BillNoSerial::getIsDeleted, 0)
+			.like(BillNoSerial::getResetValue, mbillNo));
+		if (billNoSerialList1.size() > 0) {
+			BusinessBillNo detail = baseMapper.selectById(billNoSerialList1.get(0).getPid());
+			if (ObjectUtils.isNotNull(detail) && 1 == detail.getIsRecyclable()) {
+				//判断编码格式是否为空
+				if (ObjectUtils.isNotNull(detail.getCodeFormat())) {
+					int index = detail.getCodeFormat().indexOf("%");
+					int indexLast = detail.getCodeFormat().indexOf("%", index + 1);
+					head = detail.getCodeFormat().substring(0, index);
+					yearMmDd = detail.getCodeFormat().substring(index + 1, indexLast);
+				} else {
+					throw new RuntimeException("编码格式为空");
+				}
+				//格式化日期
+				if (ObjectUtils.isNotNull(yearMmDd)) {
+					yyyyMM = DateFormatUtils.format(date, yearMmDd);
+				}
+				if (ObjectUtils.isNotNull(detail) && 1 == detail.getIsRecyclable()) {
+					BillNoCenter billNoCenter = new BillNoCenter();
+					billNoCenter.setBusinessType(detail.getBusinessType());
+					billNoCenter.setBusinessTypeId(detail.getBusinessTypeId());
+					billNoCenter.setPid(detail.getId());
+					billNoCenter.setBillId(item.getId());
+					billNoCenter.setBillNo(item.getBillNo());
+					billNoCenter.setResetRule(detail.getResetRule());
+					billNoCenter.setResetValue(head + yyyyMM);
+					billNoCenter.setTenantId(AuthUtil.getTenantId());
+					billNoCenter.setCreateTime(new Date());
+					billNoCenter.setCreateUser(AuthUtil.getUserId());
+					billNoCenter.setCreateUserName(AuthUtil.getUserName());
+					billNoCenter.setCreateDept(AuthUtil.getDeptId());
+					billNoCenterService.save(billNoCenter);
+				}
+			}
+		}
+	}
+
+}

+ 2 - 1
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/controller/BillsController.java

@@ -175,7 +175,8 @@ public class BillsController extends BladeController {
 	@ApiOperationSupport(order = 8)
 	@ApiOperation(value = "删除", notes = "传入ids")
 	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
-		return R.status(billsService.removeByIds(Func.toLongList(ids)));
+		billsService.removeIds(Func.toLongList(ids));
+		return R.data("操作成功");
 	}
 
 	/**

+ 1 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/mapper/ContainersMapper.xml

@@ -71,6 +71,7 @@
         <result column="status" property="status"/>
         <result column="is_deleted" property="isDeleted"/>
         <result column="remarks" property="remarks"/>
+        <result column="ticket_number" property="ticketNumber"/>
     </resultMap>
     <update id="removeByPid">
         update los_sea_containers set is_deleted = '1' where pid = #{pid}

+ 8 - 0
blade-service/blade-los/src/main/java/org/springblade/los/business/sea/service/IBillsService.java

@@ -22,6 +22,8 @@ import org.springblade.los.business.sea.vo.BillsVO;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 
+import java.util.List;
+
 /**
  * 业务-海运进出口 服务类
  *
@@ -76,6 +78,12 @@ public interface IBillsService extends IService<Bills> {
 	R revokeReinsurancePolicy(String ids, String id);
 
 	/**
+	 * 撤销分单添加到主单
+	 * @return
+	 */
+	void removeIds(List<Long> ids);
+
+	/**
 	 * 申请mblNo
 	 * @param bills
 	 * @return

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

@@ -27,8 +27,9 @@ import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
 import org.springblade.core.tool.utils.Func;
-import org.springblade.los.basic.business.entity.BusinessType;
-import org.springblade.los.basic.business.service.IBusinessTypeService;
+import org.springblade.los.billno.entity.BusinessBillNo;
+import org.springblade.los.billno.service.IBillNoCenterService;
+import org.springblade.los.billno.service.IBusinessBillNoService;
 import org.springblade.los.business.files.entity.FilesCenter;
 import org.springblade.los.business.files.service.IFilesCenterService;
 import org.springblade.los.business.sea.dto.WaitingBox;
@@ -70,10 +71,12 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 
 	private final IContainersCommodityService containersCommodityService;
 
-	private final IBusinessTypeService bBusinessTypeService;
+	private final IBillNoCenterService billNoCenterService;
 
 	private final IFeeCenterService feeCenterService;
 
+	private final IBusinessBillNoService businessBillNoService;
+
 	/**
 	 * 生成系统编号
 	 */
@@ -98,23 +101,11 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				deptName = String.join(",", res.getData());
 			}
 		}
-		long billNo = baseMapper.selectCount(new LambdaQueryWrapper<Bills>()
-			.eq(Bills::getBillNo, bills.getBillNo())
-			.eq(Bills::getTenantId, AuthUtil.getTenantId())
-			.eq(Bills::getIsDeleted, 0));
 		if (bills.getId() == null) {
-			if (billNo > 0) {
-				throw new RuntimeException("单据编号不允许重复");
-			}
-			BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
-				.eq(BusinessType::getCode, bills.getBillNoFormat())
-				.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
-				.eq(BusinessType::getIsDeleted, 0)
-				.eq(BusinessType::getStatus, 0));
-			if (businessType == null) {
-				throw new RuntimeException("请先设置单据编码格式");
-			}
-			R clientBillNo = serialClient.getBillNoLos(bills.getBillType(), bills.getSeaType(), bills.getBusinessType(), businessType.getBillNoFormat());
+			BusinessBillNo businessBillNo = new BusinessBillNo();
+			businessBillNo.setBusinessTypeId(bills.getBusinessTypeId());
+			businessBillNo.setCode(bills.getBillNoFormat());
+			R clientBillNo = businessBillNoService.getBillNoLos(businessBillNo);
 			if (!clientBillNo.isSuccess()) {
 				TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 				return R.fail(500, "生成订单编号失败");
@@ -129,9 +120,6 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 				bills.setCreateDeptName(deptName);
 			}
 		} else {
-			if (billNo > 1) {
-				throw new RuntimeException("单据编号不允许重复");
-			}
 			bills.setUpdateUser(AuthUtil.getUserId());
 			bills.setUpdateTime(new Date());
 			bills.setUpdateUserName(AuthUtil.getUserName());
@@ -445,16 +433,25 @@ public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements
 	@Override
 	@Transactional(rollbackFor = Exception.class)
 	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
-	public R getBillNo(Bills bills) {
-		BusinessType businessType = bBusinessTypeService.getOne(new LambdaQueryWrapper<BusinessType>()
-			.eq(BusinessType::getCode, bills.getBillNoFormat())
-			.eq(BusinessType::getTenantId, AuthUtil.getTenantId())
-			.eq(BusinessType::getIsDeleted, 0)
-			.eq(BusinessType::getStatus, 0));
-		if (businessType == null) {
-			throw new RuntimeException("请先设置单据编码格式");
+	public void removeIds(List<Long> ids) {
+		List<Bills> billsList = baseMapper.selectList(new LambdaQueryWrapper<Bills>()
+			.eq(Bills::getTenantId, AuthUtil.getTenantId())
+			.eq(Bills::getIsDeleted, 0)
+			.in(Bills::getId, ids));
+		for (Bills item : billsList) {
+			businessBillNoService.deteleBillNo(item);
 		}
-		R clientBillNo = serialClient.getBillNoLos(bills.getBillType(), bills.getSeaType(), bills.getBusinessType(), businessType.getBillNoFormat());
+		baseMapper.deleteBatchIds(ids);
+	}
+
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@GlobalTransactional(rollbackFor = Exception.class, timeoutMills = 12000000)
+	public R getBillNo(Bills bills) {
+		BusinessBillNo businessBillNo = new BusinessBillNo();
+		businessBillNo.setBusinessTypeId(bills.getBusinessTypeId());
+		businessBillNo.setCode(bills.getBillNoFormat());
+		R clientBillNo = businessBillNoService.getBillNoLos(businessBillNo);
 		if (!clientBillNo.isSuccess()) {
 			TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
 			return R.fail(500, "生成订单编号失败");

+ 12 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/bigScreen/OrderDateController.java

@@ -13,6 +13,7 @@ import org.springblade.client.feign.ICorpsDescClient;
 import org.springblade.core.boot.ctrl.BladeController;
 import org.springblade.core.mp.support.Condition;
 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.purchase.sales.entity.Order;
@@ -54,6 +55,17 @@ public class OrderDateController extends BladeController {
 		return R.data(orderItemsService.orderData(order));
 	}
 	/**
+	 * 统计分析 品牌利润对比统计
+	 */
+	@GetMapping("/orderNumberV1")
+	@ApiOperation(value = "分品牌利润对比统计", notes = "分品牌利润对比统计")
+	public R<List<OrderDateVo>> orderNumberV1(Order order) {
+		order.setTenantId(SecureUtil.getTenantId());
+		order.setBillType(OrderTypeEnum.SALES.getType());
+		order.setTradeType(OrderTypeEnum.DOMESTIC.getType());
+		return R.data(orderItemsService.orderNumberV1(order));
+	}
+	/**
 	 * 大屏在售品牌销量占比
 	 */
 	@GetMapping("/brandSales")

+ 7 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderItemsMapper.java

@@ -19,6 +19,7 @@ package org.springblade.purchase.sales.mapper;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import org.apache.ibatis.annotations.Param;
+import org.springblade.purchase.sales.entity.Order;
 import org.springblade.purchase.sales.entity.OrderItems;
 import org.springblade.purchase.sales.excel.orderItemStat;
 import org.springblade.purchase.sales.vo.*;
@@ -198,4 +199,10 @@ public interface OrderItemsMapper extends BaseMapper<OrderItems> {
 	 */
 	Integer submitPay(@Param("id") Long id);
 
+	/**
+	 *
+	 * @param order
+	 * @return
+	 */
+	List<OrderDateVo> orderNumberV1(@Param("order")Order order);
 }

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

@@ -514,6 +514,25 @@ WHERE
         </where>
         order by t2.create_time desc
     </select>
+    <select id="orderNumberV1" resultType="org.springblade.purchase.sales.vo.OrderDateVo">
+        SELECT
+            BGD.brand AS belongToCorpName,
+            SUM( IF ( BOI.quantity, BOI.quantity, 0 ) ) AS orderNumber
+        FROM
+            business_order BO
+                LEFT JOIN ( SELECT pid, item_id, IFNULL( SUM( order_quantity ), 0 ) AS quantity FROM business_order_items WHERE is_deleted = 0 GROUP BY pid ) BOI ON BOI.pid = BO.id
+                LEFT JOIN basic_goods_desc BGD ON BGD.id = BOI.item_id
+        WHERE
+            BO.tenant_id = #{order.tenantId}
+          AND BO.is_deleted = 0
+          AND BO.bill_type = 'XS'
+          AND BO.`status` = '3'
+          AND DATE_FORMAT( BO.busines_date, '%Y-%m' ) = DATE_FORMAT( NOW(), '%Y-%m' )
+        GROUP BY
+            BGD.brand
+        ORDER BY
+            quantity DESC
+    </select>
     <update id="submitPay" parameterType="long">
         UPDATE business_order_items SET submit_pay = '1' WHERE pid = #{id}
     </update>

+ 1 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/IOrderItemsService.java

@@ -227,4 +227,5 @@ public interface IOrderItemsService extends IService<OrderItems> {
 
 	public List<OrderItems> saveOrderItemsMessage(List<OrderItems> list, Date date, Long pid);
 
+	List<OrderDateVo> orderNumberV1(Order order);
 }

+ 5 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/service/impl/OrderItemsServiceImpl.java

@@ -277,6 +277,11 @@ public class OrderItemsServiceImpl extends ServiceImpl<OrderItemsMapper, OrderIt
 		return list;
 	}
 
+	@Override
+	public List<OrderDateVo> orderNumberV1(Order order) {
+		return baseMapper.orderNumberV1(order);
+	}
+
 	/**
 	 * 获取订单明细数据
 	 *

+ 19 - 4
blade-service/blade-sales-part/src/main/java/org/springblade/salesPart/order/service/impl/OrderServiceImpl.java

@@ -31,6 +31,7 @@ import org.springblade.check.entity.AuditPathsLevels;
 import org.springblade.client.entity.Message;
 import org.springblade.client.feign.IMessageClient;
 import org.springblade.client.feign.ISerialClient;
+import org.springblade.client.feign.IWechatClient;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.BeanUtil;
@@ -131,8 +132,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 	private final IGoodsFilesService goodsFilesService;
 	private final IBrandFilesService brandFilesService;
 
-	private final ICorpsAttnService corpsAttnService;//客户联系人
-	private final ICorpsDescService corpsDescService;//客户
+	private final IWechatClient wechatClient;
 
 	/**
 	 * 获取销售订单详情
@@ -150,7 +150,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 			.eq(PjOrderItems::getIsDeleted, 0)
 			.eq(PjOrderItems::getPid, detail.getId());
 		List<PjOrderItems> list = orderItemsMapper.selectList(itemsLambdaQueryWrapper);
-		for (PjOrderItems item : list) {
+		/*for (PjOrderItems item : list) {
 			List<PjGoodsFiles> goodsFilesList = new ArrayList<>();
 			goodsFilesList = goodsFilesService.list(new LambdaQueryWrapper<PjGoodsFiles>()
 				.eq(PjGoodsFiles::getMainImage, 0)
@@ -165,7 +165,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 					.eq(PjBrandFiles::getIsDeleted, 0)), PjGoodsFiles.class);
 			}
 			item.setGoodsFilesList(goodsFilesList);
-		}
+		}*/
 		detail.setOrderItemsList(list);
 
 		//获得支付记录
@@ -717,6 +717,21 @@ public class OrderServiceImpl extends ServiceImpl<OrderMapper, PjOrder> implemen
 				}
 			}
 		}
+		R<User> res = userClient.userInfoById(order.getCreateUser());
+		if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())){
+			StringBuilder openIds = new StringBuilder();
+			if (ObjectUtils.isNotNull(res.getData().getOaOpenId())) {
+				openIds.append(res.getData().getOaOpenId());
+				SimpleDateFormat format = new SimpleDateFormat("yyyy年MM月dd日 HH:mm");
+				String date1 = format.format(new Date());
+				System.out.println("=========发送人openIds=========" + openIds);
+				if (ObjectUtils.isNotNull(openIds)) {
+					String rest = wechatClient.sendMessage(openIds.substring(0, openIds.length() - 1), "客户新订单处理通知", "客户新订单处理通知", date1, order.getSalerName(), order.getOrdNo(),
+						"", "", order.getGoodsNameJoin(), order.getGoodsTotalNum(), "3", AuthUtil.getTenantId());
+					System.out.println("=========发送返回值=========" + rest);
+				}
+			}
+		}
 		return R.data(pjOrder);
 	}