以大代小下插入租赁结算记录表slt
This commit is contained in:
parent
f95a5f39ae
commit
802c34d487
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 规格名称
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class MaType extends BaseEntity {
|
|||
|
||||
/** 替换类型ID */
|
||||
@ApiModelProperty(value = "以大代小类型ID")
|
||||
private Long replaceTypeId;
|
||||
private Integer replaceTypeId;
|
||||
|
||||
/** 类型ID */
|
||||
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)) {
|
||||
|
||||
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)) {
|
||||
|
||||
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 {
|
||||
|
|
|
|||
|
|
@ -52,8 +52,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
|||
List<SltAgreementInfo> leaseListOne = getLeaseListOne(list);
|
||||
|
||||
List<SltAgreementInfo> leaseListThree = getLeaseListThree(list);
|
||||
//维修费用列表
|
||||
List<SltAgreementInfo> repairList = getRepairList(list);
|
||||
//维修费用列表暂时不取
|
||||
//List<SltAgreementInfo> repairList = getRepairList(list);
|
||||
List<SltAgreementInfo> repairList = new ArrayList<>();
|
||||
//报废费用列表
|
||||
List<SltAgreementInfo> scrapList = getScrapList(list);
|
||||
//预报废费用列表
|
||||
|
|
|
|||
|
|
@ -242,10 +242,10 @@
|
|||
<if test="carCode!= null">
|
||||
car_code,
|
||||
</if>
|
||||
<if test="typeName!= null">
|
||||
<if test="maName!= null">
|
||||
type_name,
|
||||
</if>
|
||||
<if test="modelName!= null">
|
||||
<if test="maModel!= null">
|
||||
model_name,
|
||||
</if>
|
||||
<if test="leasePrice!= null">
|
||||
|
|
@ -288,11 +288,11 @@
|
|||
<if test="carCode!= null">
|
||||
#{carCode},
|
||||
</if>
|
||||
<if test="typeName!= null">
|
||||
#{typeName},
|
||||
<if test="maName!= null">
|
||||
#{maName},
|
||||
</if>
|
||||
<if test="modelName!= null">
|
||||
#{modelName},
|
||||
<if test="maModel!= null">
|
||||
#{maModel},
|
||||
</if>
|
||||
<if test="leasePrice!= null">
|
||||
#{leasePrice},
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Reference in New Issue