Browse Source

2023年8月10日17:51:02

纪新园 2 years ago
parent
commit
bbb98755d3
37 changed files with 1850 additions and 34 deletions
  1. 0 6
      blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/ProjectGoods.java
  2. 34 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceDTO.java
  3. 34 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceFeesDTO.java
  4. 34 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceFilesDTO.java
  5. 212 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/Maintenance.java
  6. 126 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/MaintenanceFees.java
  7. 114 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/MaintenanceFiles.java
  8. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/vo/MaintenanceFeesVO.java
  9. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/vo/MaintenanceFilesVO.java
  10. 36 0
      blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/vo/MaintenanceVO.java
  11. 11 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java
  12. 5 0
      blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java
  13. 28 0
      blade-service/blade-client/src/main/java/org/springblade/client/equipment/service/impl/CorpEquipmentArchivesServiceImpl.java
  14. 1 1
      blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsTypeServiceImpl.java
  15. 1 1
      blade-service/blade-client/src/main/java/org/springblade/client/project/controller/ProjectGoodsController.java
  16. 2 0
      blade-service/blade-client/src/main/java/org/springblade/client/project/service/IProjectGoodsService.java
  17. 14 0
      blade-service/blade-client/src/main/java/org/springblade/client/project/service/impl/ProjectGoodsServiceImpl.java
  18. 8 3
      blade-service/blade-land/src/main/java/org/springblade/land/handler/LocateJobHandler.java
  19. 5 5
      blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/service/impl/PaymentServiceImpl.java
  20. 148 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/controller/MaintenanceController.java
  21. 127 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/controller/MaintenanceFeesController.java
  22. 126 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/controller/MaintenanceFilesController.java
  23. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFeesMapper.java
  24. 31 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFeesMapper.xml
  25. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFilesMapper.java
  26. 28 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFilesMapper.xml
  27. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceMapper.java
  28. 42 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceMapper.xml
  29. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/IMaintenanceFeesService.java
  30. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/IMaintenanceFilesService.java
  31. 45 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/IMaintenanceService.java
  32. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/impl/MaintenanceFeesServiceImpl.java
  33. 41 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/impl/MaintenanceFilesServiceImpl.java
  34. 130 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/impl/MaintenanceServiceImpl.java
  35. 106 0
      blade-service/blade-stock/src/main/java/org/springblade/stock/api/ApiStockController.java
  36. 15 0
      blade-service/blade-stock/src/main/java/org/springblade/stock/excel/ApiInventory.java
  37. 25 18
      blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

+ 0 - 6
blade-service-api/blade-client-api/src/main/java/org/springblade/client/entity/ProjectGoods.java

@@ -125,12 +125,6 @@ public class ProjectGoods implements Serializable {
 	@ApiModelProperty(value = "每个净重")
 	private BigDecimal singleWeight;
 	/**
-	 * 图片
-	 */
-	@ApiModelProperty(value = "图片")
-	@TableField("URL")
-	private String url;
-	/**
 	 * 质保期
 	 */
 	@ApiModelProperty(value = "质保期")

+ 34 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceDTO.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.purchase.sales.maintenance.dto;
+
+import org.springblade.purchase.sales.maintenance.entity.Maintenance;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 配件汽保维修表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MaintenanceDTO extends Maintenance {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceFeesDTO.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.purchase.sales.maintenance.dto;
+
+import org.springblade.purchase.sales.maintenance.entity.MaintenanceFees;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 配件汽保维修费用明细表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MaintenanceFeesDTO extends MaintenanceFees {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/dto/MaintenanceFilesDTO.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.purchase.sales.maintenance.dto;
+
+import org.springblade.purchase.sales.maintenance.entity.MaintenanceFiles;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 配件汽保维修附件表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class MaintenanceFilesDTO extends MaintenanceFiles {
+	private static final long serialVersionUID = 1L;
+
+}

+ 212 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/Maintenance.java

@@ -0,0 +1,212 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 配件汽保维修表实体类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Data
+@TableName("business_maintenance")
+@ApiModel(value = "Maintenance对象", description = "配件汽保维修表")
+public class Maintenance implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 单号
+	 */
+	@ApiModelProperty(value = "单号")
+	private String sysNo;
+	/**
+	 * 设备id
+	 */
+	@ApiModelProperty(value = "设备id")
+	private Long deviceId;
+	/**
+	 * 设备名称
+	 */
+	@ApiModelProperty(value = "设备名称")
+	private String deviceName;
+	/**
+	 * 客户id
+	 */
+	@ApiModelProperty(value = "客户id")
+	private Long corpId;
+	/**
+	 * 客户名称
+	 */
+	@ApiModelProperty(value = "客户名称")
+	private String corpName;
+	/**
+	 * 客户电话
+	 */
+	@ApiModelProperty(value = "客户电话")
+	private String corpTel;
+	/**
+	 * 设备地址
+	 */
+	@ApiModelProperty(value = "设备地址")
+	private String deviceAddress;
+	/**
+	 * 故障描述
+	 */
+	@ApiModelProperty(value = "故障描述")
+	private String faultDescribe;
+	/**
+	 * 维修工id
+	 */
+	@ApiModelProperty(value = "维修工id")
+	private Long maintenanceWorkerId;
+	/**
+	 * 维修工名称
+	 */
+	@ApiModelProperty(value = "维修工名称")
+	private String maintenanceWorkerName;
+	/**
+	 * 维修工电话
+	 */
+	@ApiModelProperty(value = "维修工电话")
+	private String maintenanceWorkerTel;
+	/**
+	 * 维修金额
+	 */
+	@ApiModelProperty(value = "维修金额")
+	private BigDecimal maintenanceAmount;
+	/**
+	 * 报修日期
+	 */
+	@ApiModelProperty(value = "报修日期")
+	private Date repairReportDate;
+
+	/**
+	 * 报修日期
+	 */
+	@TableField(exist = false)
+	private List<String> repairReportDateList;
+	/**
+	 * 是否派工(0 录入  1待派工 2 已派工)
+	 */
+	@ApiModelProperty(value = "是否派工(0 录入  1待派工 2 已派工)")
+	private String dispatchingWorkers;
+	/**
+	 * 完成日期
+	 */
+	@ApiModelProperty(value = "完成日期")
+	private Date completeDate;
+
+	/**
+	 * 完成日期
+	 */
+	@TableField(exist = false)
+	private List<String> completeDateList;
+	/**
+	 * 通联支付金额
+	 */
+	@ApiModelProperty(value = "通联支付金额")
+	private BigDecimal tonglianPaymentAmount;
+	/**
+	 * 支付状态(0 录入  1 待付款  2 已付款)
+	 */
+	@ApiModelProperty(value = "支付状态(0 录入  1 待付款  2 已付款)")
+	private String paymentStatus;
+	/**
+	 * 结算金额
+	 */
+	@ApiModelProperty(value = "结算金额")
+	private BigDecimal settlementAmount;
+	/**
+	 * 备注(收费指示)
+	 */
+	@ApiModelProperty(value = "备注(收费指示)")
+	private String remarks;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 状态(0 录入 1 待派工 3待维修 4待结算 5已完工)
+	 */
+	@ApiModelProperty(value = "状态(0 录入 1 待派工 3待维修 4待结算 5已完工)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private String createUserName;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private String updateUserName;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+	/**
+	 * 费用明细
+	 */
+	@TableField(exist = false)
+	private List<MaintenanceFees> maintenanceFees;
+
+
+	/**
+	 * 附件
+	 */
+	@TableField(exist = false)
+	private List<MaintenanceFiles> maintenanceFiles;
+
+
+}

+ 126 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/MaintenanceFees.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.entity;
+
+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.math.BigDecimal;
+import java.util.Date;
+
+/**
+ * 配件汽保维修费用明细表实体类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Data
+@TableName("business_maintenance_fees")
+@ApiModel(value = "MaintenanceFees对象", description = "配件汽保维修费用明细表")
+public class MaintenanceFees implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	private Long pid;
+	/**
+	 * 费用id
+	 */
+	@ApiModelProperty(value = "费用id")
+	private Long costId;
+	/**
+	 * 费用名称
+	 */
+	@ApiModelProperty(value = "费用名称")
+	private String costName;
+	/**
+	 * 数量
+	 */
+	@ApiModelProperty(value = "数量")
+	private Integer number;
+	/**
+	 * 单价
+	 */
+	@ApiModelProperty(value = "单价")
+	private BigDecimal price;
+	/**
+	 * 金额
+	 */
+	@ApiModelProperty(value = "金额")
+	private BigDecimal amount;
+	/**
+	 * 币别
+	 */
+	@ApiModelProperty(value = "币别")
+	private String currency;
+	/**
+	 * 结算金额
+	 */
+	@ApiModelProperty(value = "结算金额")
+	private BigDecimal settlementAmount;
+	/**
+	 * 支付状态
+	 */
+	@ApiModelProperty(value = "支付状态")
+	private String paymentStatus;
+	/**
+	 * 备注(收费指示)
+	 */
+	@ApiModelProperty(value = "备注(收费指示)")
+	private String remarks;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

+ 114 - 0
blade-service-api/blade-purchase-sales-api/src/main/java/org/springblade/purchase/sales/maintenance/entity/MaintenanceFiles.java

@@ -0,0 +1,114 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.entity;
+
+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-08-10
+ */
+@Data
+@TableName("business_maintenance_files")
+@ApiModel(value = "MaintenanceFiles对象", description = "配件汽保维修附件表")
+public class MaintenanceFiles implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	private Long id;
+	/**
+	 * 主表id
+	 */
+	@ApiModelProperty(value = "主表id")
+	private Long pid;
+	/**
+	 * 排序
+	 */
+	@ApiModelProperty(value = "排序")
+	private Integer sort;
+	/**
+	 * 文件名
+	 */
+	@ApiModelProperty(value = "文件名")
+	private String fileName;
+	/**
+	 * 文件地址
+	 */
+	@ApiModelProperty(value = "文件地址")
+	private String url;
+	/**
+	 * 备注
+	 */
+	@ApiModelProperty(value = "备注")
+	private String remarks;
+	/**
+	 * 版本
+	 */
+	@ApiModelProperty(value = "版本")
+	private String version;
+	/**
+	 * 创建人
+	 */
+	@ApiModelProperty(value = "创建人")
+	private Long createUser;
+	/**
+	 * 创建部门
+	 */
+	@ApiModelProperty(value = "创建部门")
+	private Long createDept;
+	/**
+	 * 创建时间
+	 */
+	@ApiModelProperty(value = "创建时间")
+	private Date createTime;
+	/**
+	 * 修改人
+	 */
+	@ApiModelProperty(value = "修改人")
+	private Long updateUser;
+	/**
+	 * 修改时间
+	 */
+	@ApiModelProperty(value = "修改时间")
+	private Date updateTime;
+	/**
+	 * 状态(0 正常 1停用)
+	 */
+	@ApiModelProperty(value = "状态(0 正常 1停用)")
+	private Integer status;
+	/**
+	 * 是否已删除(0 否 1是)
+	 */
+	@ApiModelProperty(value = "是否已删除(0 否 1是)")
+	private Integer isDeleted;
+
+	/**
+	 * 租户
+	 */
+	@ApiModelProperty(value = "租户")
+	private String tenantId;
+
+
+}

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

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

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

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

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

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

+ 11 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClient.java

@@ -69,6 +69,7 @@ public interface ISysClient {
 	String DEPT_BY_IDS = API_PREFIX + "/selectByDeptIds";
 	String TENANT_ID_BY_APP_ID = API_PREFIX + "/tenantIdByAppId";
 	String GET_PARAM_SERVICE = API_PREFIX + "/getParamService";
+	String GET_PARAM_SERVICE_DWT = API_PREFIX + "/getParamServiceDWT";
 	String UPDATE_BY_DEPT = API_PREFIX + "/updateByDept";
 
 
@@ -324,6 +325,16 @@ public interface ISysClient {
 	@GetMapping(GET_PARAM_SERVICE)
 	String getParamService(@RequestParam("paramKey") String paramKey);
 
+
+	/**
+	 * 获取业务参数配置
+	 *
+	 * @param paramKey 参数key
+	 * @return String
+	 */
+	@GetMapping(GET_PARAM_SERVICE_DWT)
+	String getParamServiceDWT(@RequestParam("paramKey") String paramKey,@RequestParam("tenantId")String tenantId);
+
 	/**
 	 * 配件获取所属公司
 	 *

+ 5 - 0
blade-service-api/blade-system-api/src/main/java/org/springblade/system/feign/ISysClientFallback.java

@@ -171,6 +171,11 @@ public class ISysClientFallback implements ISysClient {
 	}
 
 	@Override
+	public String getParamServiceDWT(String paramKey, String tenantId) {
+		return "获取数据失败";
+	}
+
+	@Override
 	public R<Dept> getDeptIByName(String tenantId, String deptName) {
 		return R.fail("获取数据失败");
 	}

+ 28 - 0
blade-service/blade-client/src/main/java/org/springblade/client/equipment/service/impl/CorpEquipmentArchivesServiceImpl.java

@@ -29,11 +29,15 @@ import org.springblade.client.equipment.mapper.CorpEquipmentArchivesMapper;
 import org.springblade.client.equipment.service.ICorpEquipmentArchivesItemService;
 import org.springblade.client.equipment.service.ICorpEquipmentArchivesService;
 import org.springblade.client.vo.CorpEquipmentArchivesVO;
+import org.springblade.common.utils.BarCodeTest;
+import org.springblade.common.utils.QRCodeTest;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+import java.io.File;
+import java.io.IOException;
 import java.util.Date;
 import java.util.List;
 
@@ -90,6 +94,30 @@ public class CorpEquipmentArchivesServiceImpl extends ServiceImpl<CorpEquipmentA
 					item.setCreateUser(AuthUtil.getUserId());
 					item.setTenantId(AuthUtil.getTenantId());
 					item.setPid(corpEquipmentArchives.getId());
+					//生成二维码图片
+						try {
+							//创建文件夹
+							File packageFile = new File("/home/minio/file/" + AuthUtil.getTenantId() + "-bladex/upload");
+							//文件夹是否创建成功
+							if (!packageFile.getParentFile().exists()) {
+								boolean a = packageFile.mkdirs();
+								if (a) {
+									System.out.println("文件夹创建成功");
+								} else {
+									System.out.println("文件夹创建失败");
+								}
+							}
+							//创建二维码图片
+							File qRCodeFile = new File(packageFile, item.getId() + "设备明细.png");
+							qRCodeFile.createNewFile();
+							//生成二维码
+							String qRCode = QRCodeTest.generateQRCode(qRCodeFile, item.getId() + "");
+							//替换地址
+							qRCode = qRCode.replace("/home/minio", "http://121.37.83.47");
+							item.setUrl(qRCode);
+						} catch (IOException e) {
+							throw new SecurityException("生成二维码失败");
+						}
 				} else {
 					item.setUpdateTime(new Date());
 					item.setUpdateUser(AuthUtil.getUserId());

+ 1 - 1
blade-service/blade-client/src/main/java/org/springblade/client/goods/service/impl/GoodsTypeServiceImpl.java

@@ -104,7 +104,7 @@ public class GoodsTypeServiceImpl extends ServiceImpl<GoodsTypeMapper, GoodsType
 		goodsType.setTenantId(AuthUtil.getTenantId());
 		if (goodsType.getId() == null) {
 			//验证名称唯一性
-			this.selectGoodsTypeCname(goodsType);
+//			this.selectGoodsTypeCname(goodsType);
 			goodsType.setTenantId(AuthUtil.getTenantId());
 			goodsType.setCreateUser(AuthUtil.getUserId());
 			goodsType.setCreateTime(new Date());

+ 1 - 1
blade-service/blade-client/src/main/java/org/springblade/client/project/controller/ProjectGoodsController.java

@@ -66,7 +66,7 @@ public class ProjectGoodsController extends BladeController {
 	@ApiOperationSupport(order = 1)
 	@ApiOperation(value = "详情", notes = "传入projectGoods")
 	public R<ProjectGoods> detail(ProjectGoods projectGoods) {
-		ProjectGoods detail = projectGoodsService.getOne(Condition.getQueryWrapper(projectGoods));
+		ProjectGoods detail = projectGoodsService.detail(projectGoods);
 		return R.data(detail);
 	}
 

+ 2 - 0
blade-service/blade-client/src/main/java/org/springblade/client/project/service/IProjectGoodsService.java

@@ -40,4 +40,6 @@ public interface IProjectGoodsService extends IService<ProjectGoods> {
 	IPage<ProjectGoodsVO> selectProjectGoodsPage(IPage<ProjectGoodsVO> page, ProjectGoodsVO projectGoods);
 
 	R submit(ProjectGoods projectGoods);
+
+    ProjectGoods detail(ProjectGoods projectGoods);
 }

+ 14 - 0
blade-service/blade-client/src/main/java/org/springblade/client/project/service/impl/ProjectGoodsServiceImpl.java

@@ -97,4 +97,18 @@ public class ProjectGoodsServiceImpl extends ServiceImpl<ProjectGoodsMapper, Pro
 		return R.data(projectGoods);
 	}
 
+	@Override
+	public ProjectGoods detail(ProjectGoods projectGoods) {
+		if (projectGoods.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		ProjectGoods detail = baseMapper.selectById(projectGoods.getId());
+		List<ProjectGoodsFiles> projectGoodsFilesList = projectGoodsFilesService.list(new LambdaQueryWrapper<ProjectGoodsFiles>()
+			.eq(ProjectGoodsFiles::getIsDeleted, 0)
+			.eq(ProjectGoodsFiles::getTenantId, AuthUtil.getTenantId())
+			.eq(ProjectGoodsFiles::getPid, detail.getId()));
+		detail.setProjectGoodsFilesList(projectGoodsFilesList);
+		return detail;
+	}
+
 }

+ 8 - 3
blade-service/blade-land/src/main/java/org/springblade/land/handler/LocateJobHandler.java

@@ -8,6 +8,7 @@ import com.xxl.job.core.handler.annotation.XxlJob;
 import com.xxl.job.core.log.XxlJobLogger;
 import lombok.AllArgsConstructor;
 import org.springblade.core.cache.utils.CacheUtil;
+import org.springblade.core.tool.api.R;
 import org.springblade.land.constant.LandConst;
 import org.springblade.land.entity.TrackKey;
 import org.springblade.purchase.sales.feign.IOrderDescClient;
@@ -81,10 +82,14 @@ public class LocateJobHandler {
 	 * 达沃特 48 小时内 为付款账单驳回审核 且释放库存
 	 */
 	@XxlJob("releaseStock")
-	public void releaseStock() {
+	public ReturnT<String> releaseStock(String param) {
 		//获取 48 小时内提交审核未 付款的销售订单
-		orderDescClient.releaseStock(null);
-		//释放库存撤销审核
+		R res = orderDescClient.releaseStock(null);
+		if (res.isSuccess()){
+			return ReturnT.SUCCESS;
+		}else{
+			return ReturnT.FAIL;
+		}
 	}
 
 }

+ 5 - 5
blade-service/blade-pay/src/main/java/org/springblade/pay/tonglianPayment/service/impl/PaymentServiceImpl.java

@@ -547,7 +547,7 @@ public class PaymentServiceImpl implements IPaymentService {
 							selectOrder.setCurrentAmount(selectOrder.getPaymentAmountTl());
 							if ("2".equals(selectOrder.getOrderSource())) {
 								System.out.println("第三步");
-								R<List<OrderItems>> res = orderItemsClient.selectListYCP(selectOrder.getId(), order.getTenantId());
+								R<List<OrderItems>> res = orderItemsClient.selectListYCP(selectOrder.getId(), selectOrder.getTenantId());
 								if (res.isSuccess() && ObjectUtils.isNotNull(res.getData())) {
 									System.out.println("第三步明细" + res.getData());
 									List<StockGoodsVO> list = new ArrayList<>();
@@ -596,7 +596,7 @@ public class PaymentServiceImpl implements IPaymentService {
 											r.getData().setSurplusRouteQuantity(surplusRouteQuantity);
 											r.getData().setBalanceQuantity(balanceQuantity);
 											r.getData().setBalanceAmount(balanceAmount);
-											r.getData().setTenantId(order.getTenantId());
+											r.getData().setTenantId(selectOrder.getTenantId());
 											list.add(r.getData());
 											/*boolean a = stockGoodsClient.updateStockYCP(r.getData());
 											System.out.println("第三步库存" + a);*/
@@ -620,7 +620,7 @@ public class PaymentServiceImpl implements IPaymentService {
 												stockGoods.setBalanceQuantity(new BigDecimal("0.00").subtract(orderItems.getStorageInQuantity()));
 												stockGoods.setBalanceAmount(new BigDecimal("0.00").subtract(stockGoods.getBalanceQuantity().multiply(orderItems.getPrice())));
 												stockGoods.setSurplusRouteQuantity(new BigDecimal("0.00").subtract(orderItems.getStorageInQuantity()));
-												stockGoods.setTenantId(order.getTenantId());
+												stockGoods.setTenantId(selectOrder.getTenantId());
 //												stockGoodsClient.saveStockYCP(stockGoods);
 											}
 											stockGoodsList.add(stockGoods);
@@ -713,8 +713,8 @@ public class PaymentServiceImpl implements IPaymentService {
 							applyDTO.setAmount(amount);
 							applyDTO.setPrice(price);
 							applyDTO.setQuantity(quantity);
-							applyDTO.setTenantId(order.getTenantId());
-							applyDTO.setMemberBalance(order.getMemberBalance());
+							applyDTO.setTenantId(selectOrder.getTenantId());
+							applyDTO.setMemberBalance(selectOrder.getMemberBalance());
 							BigDecimal receivedAmount = selectOrder.getPaymentAmountTl();
 							receivedAmount = receivedAmount.add(selectOrder.getSettlmentAmount());
 							amount = selectOrder.getDebitAmount().subtract(receivedAmount);

+ 148 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/controller/MaintenanceController.java

@@ -0,0 +1,148 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import lombok.AllArgsConstructor;
+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.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.purchase.sales.maintenance.entity.Maintenance;
+import org.springblade.purchase.sales.maintenance.service.IMaintenanceService;
+import org.springblade.purchase.sales.maintenance.vo.MaintenanceVO;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+
+/**
+ * 配件汽保维修表 控制器
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/maintenance")
+@Api(value = "配件汽保维修表", tags = "配件汽保维修表接口")
+public class MaintenanceController extends BladeController {
+
+	private final IMaintenanceService maintenanceService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入maintenance")
+	public R<Maintenance> detail(Maintenance maintenance) {
+		Maintenance detail = maintenanceService.detail(maintenance);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 配件汽保维修表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入maintenance")
+	public R<IPage<Maintenance>> list(Maintenance maintenance, Query query) {
+		LambdaQueryWrapper<Maintenance> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+		lambdaQueryWrapper.eq(Maintenance::getTenantId, AuthUtil.getTenantId())
+			.eq(Maintenance::getIsDeleted, 0)
+			.like(ObjectUtils.isNotNull(maintenance.getSysNo()), Maintenance::getSysNo, maintenance.getSysNo())
+			.like(ObjectUtils.isNotNull(maintenance.getDeviceName()), Maintenance::getDeviceName, maintenance.getDeviceName())
+			.like(ObjectUtils.isNotNull(maintenance.getCorpName()), Maintenance::getCorpName, maintenance.getCorpName())
+			.eq(ObjectUtils.isNotNull(maintenance.getMaintenanceWorkerId()), Maintenance::getMaintenanceWorkerId, maintenance.getMaintenanceWorkerId())
+			.eq(ObjectUtils.isNotNull(maintenance.getDispatchingWorkers()), Maintenance::getDispatchingWorkers, maintenance.getDispatchingWorkers())
+			.eq(ObjectUtils.isNotNull(maintenance.getPaymentStatus()), Maintenance::getPaymentStatus, maintenance.getPaymentStatus())
+			.eq(ObjectUtils.isNotNull(maintenance.getStatus()), Maintenance::getStatus, maintenance.getStatus());
+		if (ObjectUtils.isNotNull(maintenance.getCompleteDateList()) && maintenance.getCompleteDateList().size() > 0) {
+			lambdaQueryWrapper.gt(Maintenance::getCompleteDate, maintenance.getCompleteDateList().get(0));
+			lambdaQueryWrapper.lt(Maintenance::getCompleteDate, maintenance.getCompleteDateList().get(0));
+		}
+		if (ObjectUtils.isNotNull(maintenance.getRepairReportDateList()) && maintenance.getRepairReportDateList().size() > 0) {
+			lambdaQueryWrapper.gt(Maintenance::getRepairReportDate, maintenance.getRepairReportDateList().get(0));
+			lambdaQueryWrapper.lt(Maintenance::getRepairReportDate, maintenance.getRepairReportDateList().get(0));
+		}
+		lambdaQueryWrapper.orderByDesc(Maintenance::getCreateTime);
+		IPage<Maintenance> pages = maintenanceService.page(Condition.getPage(query), Condition.getQueryWrapper(maintenance));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 配件汽保维修表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入maintenance")
+	public R<IPage<MaintenanceVO>> page(MaintenanceVO maintenance, Query query) {
+		IPage<MaintenanceVO> pages = maintenanceService.selectMaintenancePage(Condition.getPage(query), maintenance);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 配件汽保维修表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入maintenance")
+	public R save(@Valid @RequestBody Maintenance maintenance) {
+		return R.status(maintenanceService.save(maintenance));
+	}
+
+	/**
+	 * 修改 配件汽保维修表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入maintenance")
+	public R update(@Valid @RequestBody Maintenance maintenance) {
+		return R.status(maintenanceService.updateById(maintenance));
+	}
+
+	/**
+	 * 新增或修改 配件汽保维修表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入maintenance")
+	public R submit(@Valid @RequestBody Maintenance maintenance) {
+		return maintenanceService.submit(maintenance);
+	}
+
+
+	/**
+	 * 删除 配件汽保维修表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(maintenanceService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 127 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/controller/MaintenanceFeesController.java

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

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

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

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

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

+ 31 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFeesMapper.xml

@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.purchase.sales.maintenance.mapper.MaintenanceFeesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="maintenanceFeesResultMap" type="org.springblade.purchase.sales.maintenance.entity.MaintenanceFees">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="cost_id" property="costId"/>
+        <result column="cost_name" property="costName"/>
+        <result column="number" property="number"/>
+        <result column="price" property="price"/>
+        <result column="amount" property="amount"/>
+        <result column="currency" property="currency"/>
+        <result column="settlement amount" property="settlement amount"/>
+        <result column="payment status" property="payment status"/>
+        <result column="remarks" property="remarks"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectMaintenanceFeesPage" resultMap="maintenanceFeesResultMap">
+        select * from business_maintenance_fees where is_deleted = 0
+    </select>
+
+</mapper>

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

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

+ 28 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/mapper/MaintenanceFilesMapper.xml

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.purchase.sales.maintenance.mapper.MaintenanceFilesMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="maintenanceFilesResultMap" type="org.springblade.purchase.sales.maintenance.entity.MaintenanceFiles">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="sort" property="sort"/>
+        <result column="file_name" property="fileName"/>
+        <result column="url" property="url"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectMaintenanceFilesPage" resultMap="maintenanceFilesResultMap">
+        select * from business_maintenance_files where is_deleted = 0
+    </select>
+
+</mapper>

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

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

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

@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.purchase.sales.maintenance.mapper.MaintenanceMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="maintenanceResultMap" type="org.springblade.purchase.sales.maintenance.entity.Maintenance">
+        <id column="id" property="id"/>
+        <result column="sys_no" property="sysNo"/>
+        <result column="device_id" property="deviceId"/>
+        <result column="device_name" property="deviceName"/>
+        <result column="corp_id" property="corpId"/>
+        <result column="corp_name" property="corpName"/>
+        <result column="corp_tel" property="corpTel"/>
+        <result column="device_address" property="deviceAddress"/>
+        <result column="fault_describe" property="faultDescribe"/>
+        <result column="maintenance_worker_id" property="maintenanceWorkerId"/>
+        <result column="maintenance_worker_name" property="maintenanceWorkerName"/>
+        <result column="maintenance_worker_tel" property="maintenanceWorkerTel"/>
+        <result column="maintenance_amount" property="maintenanceAmount"/>
+        <result column="repair_report_date" property="repairReportDate"/>
+        <result column="dispatching_workers" property="dispatchingWorkers"/>
+        <result column="complete_date" property="completeDate"/>
+        <result column="tonglian _payment amount" property="tonglian Payment amount"/>
+        <result column="payment status" property="payment status"/>
+        <result column="settlement amount" property="settlement amount"/>
+        <result column="remarks" property="remarks"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+        <result column="create_user_name" property="createUserName"/>
+        <result column="update_user_name" property="updateUserName"/>
+    </resultMap>
+
+
+    <select id="selectMaintenancePage" resultMap="maintenanceResultMap">
+        select * from business_maintenance where is_deleted = 0
+    </select>
+
+</mapper>

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

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

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

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

+ 45 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/IMaintenanceService.java

@@ -0,0 +1,45 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.purchase.sales.maintenance.entity.Maintenance;
+import org.springblade.purchase.sales.maintenance.vo.MaintenanceVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 配件汽保维修表 服务类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+public interface IMaintenanceService extends IService<Maintenance> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param maintenance
+	 * @return
+	 */
+	IPage<MaintenanceVO> selectMaintenancePage(IPage<MaintenanceVO> page, MaintenanceVO maintenance);
+
+    Maintenance detail(Maintenance maintenance);
+
+	R submit(Maintenance maintenance);
+}

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

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

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

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

+ 130 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/maintenance/service/impl/MaintenanceServiceImpl.java

@@ -0,0 +1,130 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.purchase.sales.maintenance.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 lombok.extern.slf4j.Slf4j;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.purchase.sales.maintenance.entity.Maintenance;
+import org.springblade.purchase.sales.maintenance.entity.MaintenanceFees;
+import org.springblade.purchase.sales.maintenance.entity.MaintenanceFiles;
+import org.springblade.purchase.sales.maintenance.mapper.MaintenanceMapper;
+import org.springblade.purchase.sales.maintenance.service.IMaintenanceFeesService;
+import org.springblade.purchase.sales.maintenance.service.IMaintenanceFilesService;
+import org.springblade.purchase.sales.maintenance.service.IMaintenanceService;
+import org.springblade.purchase.sales.maintenance.vo.MaintenanceVO;
+import org.springframework.stereotype.Service;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 配件汽保维修表 服务实现类
+ *
+ * @author BladeX
+ * @since 2023-08-10
+ */
+@Service
+@AllArgsConstructor
+@Slf4j
+public class MaintenanceServiceImpl extends ServiceImpl<MaintenanceMapper, Maintenance> implements IMaintenanceService {
+
+
+	private final IMaintenanceFeesService maintenanceFeesService;
+
+	private final IMaintenanceFilesService maintenanceFilesService;
+
+	@Override
+	public IPage<MaintenanceVO> selectMaintenancePage(IPage<MaintenanceVO> page, MaintenanceVO maintenance) {
+		return page.setRecords(baseMapper.selectMaintenancePage(page, maintenance));
+	}
+
+	@Override
+	public Maintenance detail(Maintenance maintenance) {
+		if (maintenance.getId() == null) {
+			throw new RuntimeException("缺少必要参数");
+		}
+		Maintenance detail = baseMapper.selectById(maintenance.getId());
+		List<MaintenanceFees> maintenanceFeesList = maintenanceFeesService.list(new LambdaQueryWrapper<MaintenanceFees>()
+			.eq(MaintenanceFees::getTenantId, AuthUtil.getTenantId())
+			.eq(MaintenanceFees::getIsDeleted, 0)
+			.eq(MaintenanceFees::getPid, detail.getId()));
+		detail.setMaintenanceFees(maintenanceFeesList);
+		List<MaintenanceFiles> maintenanceFilesList = maintenanceFilesService.list(new LambdaQueryWrapper<MaintenanceFiles>()
+			.eq(MaintenanceFiles::getTenantId, AuthUtil.getTenantId())
+			.eq(MaintenanceFiles::getIsDeleted, 0)
+			.eq(MaintenanceFiles::getPid, detail.getId()));
+		detail.setMaintenanceFiles(maintenanceFilesList);
+		return detail;
+	}
+
+	@Override
+	public R submit(Maintenance maintenance) {
+		if (maintenance.getId() == null) {
+			maintenance.setCreateTime(new Date());
+			maintenance.setCreateUserName(AuthUtil.getUserName());
+			maintenance.setCreateUser(AuthUtil.getUserId());
+			maintenance.setTenantId(AuthUtil.getTenantId());
+			baseMapper.insert(maintenance);
+		} else {
+			maintenance.setUpdateTime(new Date());
+			maintenance.setUpdateUserName(AuthUtil.getUserName());
+			maintenance.setUpdateUser(AuthUtil.getUserId());
+			baseMapper.updateById(maintenance);
+		}
+		if (ObjectUtils.isNotNull(maintenance.getMaintenanceFees()) && maintenance.getMaintenanceFees().size() > 0) {
+			BigDecimal amount = new BigDecimal("0.00");
+			for (MaintenanceFees item : maintenance.getMaintenanceFees()) {
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setTenantId(AuthUtil.getTenantId());
+					item.setPid(maintenance.getId());
+				} else {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(AuthUtil.getUserId());
+				}
+				amount = amount.add(item.getAmount());
+			}
+			maintenance.setMaintenanceAmount(amount);
+			baseMapper.updateById(maintenance);
+			maintenanceFeesService.saveOrUpdateBatch(maintenance.getMaintenanceFees());
+		}
+		if (ObjectUtils.isNotNull(maintenance.getMaintenanceFiles()) && maintenance.getMaintenanceFiles().size() > 0) {
+			for (MaintenanceFiles item : maintenance.getMaintenanceFiles()) {
+				if (item.getId() == null) {
+					item.setCreateTime(new Date());
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setTenantId(AuthUtil.getTenantId());
+					item.setPid(maintenance.getId());
+				} else {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(AuthUtil.getUserId());
+				}
+			}
+			maintenanceFilesService.saveOrUpdateBatch(maintenance.getMaintenanceFiles());
+		}
+		return R.data(maintenance);
+	}
+
+}

+ 106 - 0
blade-service/blade-stock/src/main/java/org/springblade/stock/api/ApiStockController.java

@@ -0,0 +1,106 @@
+package org.springblade.stock.api;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import lombok.AllArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springblade.core.tool.api.R;
+import org.springblade.stock.entity.StockGoods;
+import org.springblade.stock.excel.ApiInventory;
+import org.springblade.stock.service.IStockGoodsService;
+import org.springblade.system.feign.ISysClient;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletRequest;
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 与微信产生交换的控制器
+ *
+ * @author BladeX
+ */
+@Slf4j
+@RestController
+@RequestMapping("/apiStock")
+@AllArgsConstructor
+public class ApiStockController {
+	private final IStockGoodsService stockGoodsService;
+
+	private final ISysClient sysClient;
+
+	// 登录凭证校验地址
+	public final static String password = "123456";
+
+	private static final String userName = "";
+
+
+	/**
+	 * 获取授权token
+	 *
+	 * @return 结果
+	 */
+	@GetMapping("/getToken")
+	public R<Map<String, Object>> weChatProgramLogin() {
+
+
+		return R.data(null);
+	}
+
+
+	/**
+	 * 获取商品库存
+	 *
+	 * @return 结果
+	 */
+	@PostMapping("/getInventory")
+	public R<List<Map<String, Object>>> weChatProgramLogin(HttpServletRequest request, @RequestBody ApiInventory codes) {
+		String ipAddress = request.getHeader("X-Forwarded-For");
+		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+			ipAddress = request.getHeader("Proxy-Client-IP");
+		}
+		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+			ipAddress = request.getHeader("WL-Proxy-Client-IP");
+		}
+		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+			ipAddress = request.getHeader("HTTP_CLIENT_IP");
+		}
+		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+			ipAddress = request.getHeader("HTTP_X_FORWARDED_FOR");
+		}
+		if (ipAddress == null || ipAddress.length() == 0 || "unknown".equalsIgnoreCase(ipAddress)) {
+			ipAddress = request.getRemoteAddr();
+		}
+		String whiteList = sysClient.getParamServiceDWT("white.list","681169");
+		if (ObjectUtils.isNull(whiteList) || !whiteList.contains(ipAddress)) {
+			return R.fail("暂无权限");
+		}
+		if (ObjectUtils.isNotNull(codes) && ObjectUtils.isNotNull(codes.getCodes()) && codes.getCodes().size() > 0) {
+			List<Map<String, Object>> mapList = new ArrayList<>();
+			String join = String.join(",", codes.getCodes());
+			LambdaQueryWrapper<StockGoods> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+			lambdaQueryWrapper.eq(StockGoods::getIsDeleted, 0)
+				.eq(StockGoods::getTenantId, "681169")
+				.apply("find_in_set(code,'" + join + "')");
+			List<StockGoods> list = stockGoodsService.list(lambdaQueryWrapper);
+			for (StockGoods item : list) {
+				Map<String, Object> map = new HashMap<>();
+				map.put("code", item.getCode());
+				if (ObjectUtils.isNotNull(item.getSurplusRouteQuantity())) {
+					BigDecimal roundedNumber = item.getSurplusRouteQuantity().setScale(0, BigDecimal.ROUND_HALF_UP);
+					map.put("available", roundedNumber);
+				} else {
+					map.put("available", 0);
+				}
+				mapList.add(map);
+			}
+			return R.data(mapList);
+		} else {
+			return R.data(new ArrayList<>());
+		}
+	}
+}

+ 15 - 0
blade-service/blade-stock/src/main/java/org/springblade/stock/excel/ApiInventory.java

@@ -0,0 +1,15 @@
+package org.springblade.stock.excel;
+
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * @author :jixinyuan
+ * @date : 2023/8/10
+ */
+@Data
+public class ApiInventory {
+
+	private List<String> codes;
+}

+ 25 - 18
blade-service/blade-system/src/main/java/org/springblade/system/feign/SysClient.java

@@ -17,6 +17,7 @@
 package org.springblade.system.feign;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import lombok.AllArgsConstructor;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tenant.annotation.NonDS;
@@ -58,11 +59,10 @@ public class SysClient implements ISysClient {
 
 	@Override
 	@GetMapping(LIST_ROLE_ALIAS)
-	public R<List<Role>> listRoleAlias()
-	{
-		LambdaQueryWrapper<Role> roleLambdaQueryWrapper=new LambdaQueryWrapper<>();
+	public R<List<Role>> listRoleAlias() {
+		LambdaQueryWrapper<Role> roleLambdaQueryWrapper = new LambdaQueryWrapper<>();
 		roleLambdaQueryWrapper
-			.eq(Role::getIsDeleted,0)
+			.eq(Role::getIsDeleted, 0)
 			.eq(Role::getTenantId, AuthUtil.getTenantId());
 		List<Role> roleList = roleService.list(roleLambdaQueryWrapper);
 		return R.data(roleList);
@@ -70,22 +70,20 @@ public class SysClient implements ISysClient {
 
 	@Override
 	@GetMapping(GET_ROLE_ID_BY_ALIAS)
-	public R<Long> getRoleByAlias(String alias)
-	{
+	public R<Long> getRoleByAlias(String alias) {
 		try {
-			LambdaQueryWrapper<Role> roleLambdaQueryWrapper=new LambdaQueryWrapper<>();
+			LambdaQueryWrapper<Role> roleLambdaQueryWrapper = new LambdaQueryWrapper<>();
 			roleLambdaQueryWrapper
-				.eq(Role::getRoleAlias,alias)
-				.eq(Role::getIsDeleted,0)
-				.eq(Role::getTenantId,AuthUtil.getTenantId());
+				.eq(Role::getRoleAlias, alias)
+				.eq(Role::getIsDeleted, 0)
+				.eq(Role::getTenantId, AuthUtil.getTenantId());
 			Role role = roleService.getOne(roleLambdaQueryWrapper);
-			if(role == null)
-			{
+			if (role == null) {
 				throw new SecurityException("暂未查到符合的角色");
 			}
-			return  R.data(role.getId());
+			return R.data(role.getId());
 		} catch (Exception e) {
-			throw new SecurityException("查询角色错误:"+e.getMessage());
+			throw new SecurityException("查询角色错误:" + e.getMessage());
 		}
 	}
 
@@ -131,7 +129,7 @@ public class SysClient implements ISysClient {
 
 	@Override
 	@GetMapping(DEPT_BY_IDS)
-	public R<List<Dept>> selectByDeptIds(String ids){
+	public R<List<Dept>> selectByDeptIds(String ids) {
 		return R.data(deptService.selectByDeptIds(ids));
 	}
 
@@ -205,7 +203,7 @@ public class SysClient implements ISysClient {
 	@GetMapping(TENANT_ID_BY_APP_ID)
 	public R<Tenant> getTenantByAppId(String appId) {
 		LambdaQueryWrapper<Tenant> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-		lambdaQueryWrapper.eq(Tenant::getIsDeleted,0).eq(Tenant::getAppId,appId);
+		lambdaQueryWrapper.eq(Tenant::getIsDeleted, 0).eq(Tenant::getAppId, appId);
 		return R.data(tenantService.getOne(lambdaQueryWrapper));
 	}
 
@@ -214,10 +212,19 @@ public class SysClient implements ISysClient {
 		return paramServiceService.getValue(paramKey);
 	}
 
+	@Override
+	public String getParamServiceDWT(String paramKey, String tenantId) {
+		ParamService paramService = paramServiceService.getOne(new LambdaQueryWrapper<ParamService>()
+			.eq(ParamService::getParamKey, paramKey)
+			.eq(ParamService::getIsDeleted, 0)
+			.eq(ParamService::getTenantId, tenantId));
+		return ObjectUtils.isNotNull(paramService) ? paramService.getParamValue() : "";
+	}
+
 	/**
 	 * 配件获取所属公司
 	 *
-	 * @param tenantId  租户id
+	 * @param tenantId 租户id
 	 * @param deptName 所属公司
 	 * @return
 	 */
@@ -229,7 +236,7 @@ public class SysClient implements ISysClient {
 	/**
 	 * 配件获取所属公司
 	 *
-	 * @param tenantId  租户id
+	 * @param tenantId 租户id
 	 * @param deptName 所属公司
 	 * @return
 	 */