以大代小下插入租赁结算记录表slt
This commit is contained in:
parent
f95a5f39ae
commit
802c34d487
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -68,6 +69,23 @@ public class LeaseOutDetails implements Serializable {
|
||||||
@ApiModelProperty(value = "规格名称")
|
@ApiModelProperty(value = "规格名称")
|
||||||
private String typeName;
|
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 */
|
/** 替换类型ID */
|
||||||
@ApiModelProperty(value = "以大代小类型ID")
|
@ApiModelProperty(value = "以大代小类型ID")
|
||||||
private Long replaceTypeId;
|
private Integer replaceTypeId;
|
||||||
|
|
||||||
/** 类型ID */
|
/** 类型ID */
|
||||||
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
@ApiModelProperty(value = "类型ID,用作组织树筛选")
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -297,4 +298,25 @@ public class TmTask implements Serializable {
|
||||||
* */
|
* */
|
||||||
@ApiModelProperty(value = "是否库存管理1是库存管理")
|
@ApiModelProperty(value = "是否库存管理1是库存管理")
|
||||||
private String isStorage;
|
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 agreementId = leaseOutDetailsMapper.getAgreementId(taskId);
|
||||||
String protocol = leaseOutDetailsMapper.getProtocol(agreementId);
|
String protocol = leaseOutDetailsMapper.getProtocol(agreementId);
|
||||||
MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId());
|
MaType ma = leaseOutDetailsMapper.getMaType(record.getTypeId());
|
||||||
|
Integer replaceTypeId = record.getReplaceTypeId();
|
||||||
if (StringUtils.isEmpty(protocol)) {
|
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 {
|
} else {
|
||||||
if (Constants.INNER_PROTOCAL.equals(protocol)) {
|
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)) {
|
} else if (Constants.OUTER_PROTOCAL.equals(protocol)) {
|
||||||
ma.setFinalPrice(ma.getRentPrice());
|
ma.setFinalPrice(ma.getRentPrice());
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,9 @@ public class SltAgreementInfoServiceImpl implements SltAgreementInfoService {
|
||||||
List<SltAgreementInfo> leaseListOne = getLeaseListOne(list);
|
List<SltAgreementInfo> leaseListOne = getLeaseListOne(list);
|
||||||
|
|
||||||
List<SltAgreementInfo> leaseListThree = getLeaseListThree(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);
|
List<SltAgreementInfo> scrapList = getScrapList(list);
|
||||||
//预报废费用列表
|
//预报废费用列表
|
||||||
|
|
|
||||||
|
|
@ -242,10 +242,10 @@
|
||||||
<if test="carCode!= null">
|
<if test="carCode!= null">
|
||||||
car_code,
|
car_code,
|
||||||
</if>
|
</if>
|
||||||
<if test="typeName!= null">
|
<if test="maName!= null">
|
||||||
type_name,
|
type_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="modelName!= null">
|
<if test="maModel!= null">
|
||||||
model_name,
|
model_name,
|
||||||
</if>
|
</if>
|
||||||
<if test="leasePrice!= null">
|
<if test="leasePrice!= null">
|
||||||
|
|
@ -288,11 +288,11 @@
|
||||||
<if test="carCode!= null">
|
<if test="carCode!= null">
|
||||||
#{carCode},
|
#{carCode},
|
||||||
</if>
|
</if>
|
||||||
<if test="typeName!= null">
|
<if test="maName!= null">
|
||||||
#{typeName},
|
#{maName},
|
||||||
</if>
|
</if>
|
||||||
<if test="modelName!= null">
|
<if test="maModel!= null">
|
||||||
#{modelName},
|
#{maModel},
|
||||||
</if>
|
</if>
|
||||||
<if test="leasePrice!= null">
|
<if test="leasePrice!= null">
|
||||||
#{leasePrice},
|
#{leasePrice},
|
||||||
|
|
|
||||||
|
|
@ -1082,7 +1082,11 @@
|
||||||
mt.num as num,
|
mt.num as num,
|
||||||
su.nick_name as userName,
|
su.nick_name as userName,
|
||||||
lad.type_id as typeId,
|
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
|
FROM
|
||||||
lease_apply_details lad
|
lease_apply_details lad
|
||||||
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
LEFT JOIN lease_apply_info lai on lad.parennt_id = lai.id
|
||||||
|
|
@ -1224,7 +1228,7 @@
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
lad.type_id as typeId,
|
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
|
FROM
|
||||||
lease_apply_details lad
|
lease_apply_details lad
|
||||||
where lad.type_id = #{typeId}
|
where lad.type_id = #{typeId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue