From 802c34d4878282930792836535e916847f468bb9 Mon Sep 17 00:00:00 2001 From: bonus <1203338439@qq.com> Date: Sat, 8 Mar 2025 16:28:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=A5=E5=A4=A7=E4=BB=A3=E5=B0=8F=E4=B8=8B?= =?UTF-8?q?=E6=8F=92=E5=85=A5=E7=A7=9F=E8=B5=81=E7=BB=93=E7=AE=97=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E8=A1=A8slt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/base/api/domain/LeaseOutDetails.java | 18 ++++++++++++++ .../bonus/sgzb/base/api/domain/MaType.java | 2 +- .../com/bonus/sgzb/app/domain/TmTask.java | 22 +++++++++++++++++ .../impl/LeaseOutDetailsServiceImpl.java | 24 +++++++++++++++++-- .../impl/SltAgreementInfoServiceImpl.java | 5 ++-- .../mapper/app/LeaseOutDetailsMapper.xml | 12 +++++----- .../resources/mapper/app/TmTaskMapper.xml | 8 +++++-- 7 files changed, 78 insertions(+), 13 deletions(-) diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java index 68a98b6..593da76 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/LeaseOutDetails.java @@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; /** @@ -68,6 +69,23 @@ public class LeaseOutDetails implements Serializable { @ApiModelProperty(value = "规格名称") private String typeName; + /* + * 机具名称 + * */ + @ApiModelProperty(value = "以大代小机具") + private String maName; + /* + * 机具规格 + * */ + @ApiModelProperty(value = "以大代小规格") + private String maModel; + + /* + * 机具租赁单价 + * */ + @ApiModelProperty(value = "以大代小租赁单价") + private BigDecimal leasePrice; + /** * 规格名称 */ diff --git a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java index fcd349a..0036a3f 100644 --- a/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java +++ b/sgzb-api/sgzb-api-system/src/main/java/com/bonus/sgzb/base/api/domain/MaType.java @@ -41,7 +41,7 @@ public class MaType extends BaseEntity { /** 替换类型ID */ @ApiModelProperty(value = "以大代小类型ID") - private Long replaceTypeId; + private Integer replaceTypeId; /** 类型ID */ @ApiModelProperty(value = "类型ID,用作组织树筛选") diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java index edbbe30..6db8845 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/domain/TmTask.java @@ -8,6 +8,7 @@ import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; +import java.math.BigDecimal; import java.util.Date; import java.util.List; @@ -297,4 +298,25 @@ public class TmTask implements Serializable { * */ @ApiModelProperty(value = "是否库存管理1是库存管理") private String isStorage; + /* + * 机具名称 + * */ + @ApiModelProperty(value = "以大代小机具") + private String maName; + /* + * 机具规格 + * */ + @ApiModelProperty(value = "以大代小规格") + private String maModel; + /* + * 机具租赁单价 + * */ + @ApiModelProperty(value = "以大代小租赁单价") + private BigDecimal leasePrice; + + /* + * 机具规格id + * */ + @ApiModelProperty(value = "以大代小id") + private long replaceTypeId; } diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java index 45cdae6..c4fd4ba 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/app/service/impl/LeaseOutDetailsServiceImpl.java @@ -419,11 +419,31 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService { String agreementId = leaseOutDetailsMapper.getAgreementId(taskId); String protocol = leaseOutDetailsMapper.getProtocol(agreementId); MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId()); + Integer replaceTypeId = record.getReplaceTypeId(); if (StringUtils.isEmpty(protocol)) { - ma.setFinalPrice(ma.getLeasePrice()); + + if(replaceTypeId != null){ + ma.setFinalPrice(record.getLeasePrice()); + ma.setTypeName(record.getMaName()); + ma.setModelName(record.getMaModel()); + ma.setReplaceTypeId(record.getReplaceTypeId()); + }else{ + ma.setFinalPrice(ma.getLeasePrice()); + } + } else { if (Constants.INNER_PROTOCAL.equals(protocol)) { - ma.setFinalPrice(ma.getLeasePrice()); + + if(replaceTypeId != null){ + ma.setFinalPrice(record.getLeasePrice()); + ma.setTypeName(record.getMaName()); + ma.setModelName(record.getMaModel()); + ma.setReplaceTypeId(record.getReplaceTypeId()); + }else{ + ma.setFinalPrice(ma.getLeasePrice()); + } + + } else if (Constants.OUTER_PROTOCAL.equals(protocol)) { ma.setFinalPrice(ma.getRentPrice()); } else { diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java index 1323c34..c9fd0bb 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/SltAgreementInfoServiceImpl.java @@ -52,8 +52,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService { List leaseListOne = getLeaseListOne(list); List leaseListThree = getLeaseListThree(list); - //维修费用列表 - List repairList = getRepairList(list); + //维修费用列表暂时不取 + //List repairList = getRepairList(list); + List repairList = new ArrayList<>(); //报废费用列表 List scrapList = getScrapList(list); //预报废费用列表 diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml index 212162c..7eefee3 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/LeaseOutDetailsMapper.xml @@ -242,10 +242,10 @@ car_code, - + type_name, - + model_name, @@ -288,11 +288,11 @@ #{carCode}, - - #{typeName}, + + #{maName}, - - #{modelName}, + + #{maModel}, #{leasePrice}, diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml index 143db5b..7946c6d 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/app/TmTaskMapper.xml @@ -1082,7 +1082,11 @@ mt.num as num, su.nick_name as userName, lad.type_id as typeId, - mt.is_storage as isStorage + mt.is_storage as isStorage, + lad.type_name as maName, + lad.model_name as maModel, + lad.replace_type_id as replaceTypeId, + lad.lease_price as leasePrice FROM lease_apply_details lad LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id @@ -1224,7 +1228,7 @@ SELECT lad.type_id as typeId, - SUM(lad.pre_num) -SUM(lad.al_num) as outNum + SUM(lad.pre_num) -IFNULL(SUM(lad.al_num),0) as outNum FROM lease_apply_details lad where lad.type_id = #{typeId}