修改
This commit is contained in:
@ -39,7 +39,7 @@ public class LngPriceProc implements Serializable {
|
||||
* 公司编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("公司编码(天然气公司/惠贸)")
|
||||
private String comCode;
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 服务商编码(惠州接收站/阳江接收站)
|
||||
|
||||
@ -0,0 +1,143 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 加工合同
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_price_proc_dtl")
|
||||
@ApiModel(value = "加工合同对象", description = "加工合同")
|
||||
public class LngPriceProcDtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-主信息主键(lng_contract.id)
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 价格-加工服务主键(lng_price_proc.id)
|
||||
*/
|
||||
@ApiModelProperty("价格-加工服务主键(lng_price_proc.id)")
|
||||
private Long ppId;
|
||||
|
||||
/**
|
||||
* 阶梯
|
||||
*/
|
||||
@ApiModelProperty("阶梯")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 约定
|
||||
*/
|
||||
@ApiModelProperty("约定")
|
||||
private String sortDesc;
|
||||
|
||||
/**
|
||||
* 比值(吨/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("比值(吨/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateTonGj;
|
||||
|
||||
/**
|
||||
* 阶梯气量(吉焦)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGj;
|
||||
|
||||
/**
|
||||
* 管道气加工费率(元/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("管道气加工费率(元/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal pricePngGj;
|
||||
|
||||
/**
|
||||
* LNG加工费率(元/吉焦)
|
||||
*/
|
||||
@ApiModelProperty("LNG加工费率(元/吉焦)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceLngGj;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -34,12 +34,30 @@ public class LngPriceTransPng implements Serializable {
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 合同-管输-上下载点主键
|
||||
*/
|
||||
@ApiModelProperty("合同-管输-上下载点主键")
|
||||
private Long ktpId;
|
||||
|
||||
/**
|
||||
* 上载点
|
||||
*/
|
||||
@ApiModelProperty("上载点")
|
||||
private String pointUpCode;
|
||||
|
||||
/**
|
||||
* 交割点
|
||||
*/
|
||||
@ApiModelProperty("交割点")
|
||||
private String pointDelyCode;
|
||||
|
||||
/**
|
||||
* 公司编码(天然气公司/惠贸)
|
||||
*/
|
||||
@ApiModelProperty("公司编码(天然气公司/惠贸)")
|
||||
private String comCode;
|
||||
private Long comId;
|
||||
|
||||
/**
|
||||
* 托运商编码(管道公司/管网)
|
||||
|
||||
@ -0,0 +1,150 @@
|
||||
package com.xjrsoft.module.contract.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
|
||||
/**
|
||||
* @title: 管输合同
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("lng_price_trans_png_dtl")
|
||||
@ApiModel(value = "管输合同对象", description = "管输合同")
|
||||
public class LngPriceTransPngDtl implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 合同-主信息主键(lng_contract.id)
|
||||
*/
|
||||
@ApiModelProperty("合同-主信息主键(lng_contract.id)")
|
||||
private Long kId;
|
||||
|
||||
/**
|
||||
* 价格-管输主键(lng_price_trans_png.id)
|
||||
*/
|
||||
@ApiModelProperty("价格-管输主键(lng_price_trans_png.id)")
|
||||
private Long ppId;
|
||||
|
||||
/**
|
||||
* 阶梯
|
||||
*/
|
||||
@ApiModelProperty("阶梯")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Short sort;
|
||||
|
||||
/**
|
||||
* 约定
|
||||
*/
|
||||
@ApiModelProperty("约定")
|
||||
private String sortDesc;
|
||||
|
||||
/**
|
||||
* 阶梯气量(方)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(方)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyM3;
|
||||
|
||||
/**
|
||||
* 阶梯气量(吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("阶梯气量(吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal qtyGj;
|
||||
|
||||
/**
|
||||
* 管输单价(元/方)
|
||||
*/
|
||||
@ApiModelProperty("管输单价(元/方)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceTransM3;
|
||||
|
||||
/**
|
||||
* 管输单价(元/吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("管输单价(元/吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal priceTransGj;
|
||||
|
||||
/**
|
||||
* 比值(方/吉焦)(隐藏)
|
||||
*/
|
||||
@ApiModelProperty("比值(方/吉焦)(隐藏)")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private BigDecimal rateM3Gj;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String note;
|
||||
|
||||
/**
|
||||
* 创建人id
|
||||
*/
|
||||
@ApiModelProperty("创建人id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long createUserId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ApiModelProperty("创建时间")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime createDate;
|
||||
|
||||
/**
|
||||
* 修改人id
|
||||
*/
|
||||
@ApiModelProperty("修改人id")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long modifyUserId;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@ApiModelProperty("修改时间")
|
||||
@TableField(fill = FieldFill.UPDATE, updateStrategy = FieldStrategy.IGNORED)
|
||||
private LocalDateTime modifyDate;
|
||||
|
||||
/**
|
||||
* 租户id
|
||||
*/
|
||||
@ApiModelProperty("租户id")
|
||||
@TableField(updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long tenantId;
|
||||
|
||||
/**
|
||||
* 部门id
|
||||
*/
|
||||
@ApiModelProperty("部门id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long deptId;
|
||||
|
||||
/**
|
||||
* 数据权限id
|
||||
*/
|
||||
@ApiModelProperty("数据权限id")
|
||||
@TableField(fill = FieldFill.INSERT, updateStrategy = FieldStrategy.IGNORED)
|
||||
private Long ruleUserId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.contract.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractProc;
|
||||
import com.xjrsoft.module.contract.vo.LngContractProcVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +19,9 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngContractProcMapper extends MPJBaseMapper<LngContractProc>, BaseMapper<LngContractProc> {
|
||||
|
||||
@Select("SELECT t1.*, t2.full_name AS staName" +
|
||||
" FROM lng_contract_proc t1" +
|
||||
" LEFT JOIN lng_b_station_lng t2 on t2.code = t1.sta_code" +
|
||||
" WHERE t1.k_id = #{contractId}")
|
||||
List<LngContractProcVo> selectByContractId(@Param("contractId") Long contractId);
|
||||
}
|
||||
|
||||
@ -3,7 +3,12 @@ package com.xjrsoft.module.contract.mapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngContractTransPng;
|
||||
import com.xjrsoft.module.contract.vo.LngContractTransPngVo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
@ -14,4 +19,10 @@ import org.apache.ibatis.annotations.Mapper;
|
||||
@Mapper
|
||||
public interface LngContractTransPngMapper extends MPJBaseMapper<LngContractTransPng>, BaseMapper<LngContractTransPng> {
|
||||
|
||||
@Select("SELECT t1.*, t2.full_name AS pointUpName, t3.full_name AS pointDelyName" +
|
||||
" FROM lng_contract_trans_png t1" +
|
||||
" LEFT JOIN lng_b_station_lng t2 on t2.code = t1.point_up_code" +
|
||||
" LEFT JOIN lng_b_station_png t3 on t3.code = t1.point_dely_code" +
|
||||
" WHERE t1.k_id = #{contractId}")
|
||||
List<LngContractTransPngVo> selectByContractId(@Param("contractId") Long contractId);
|
||||
}
|
||||
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngPriceProcDtl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPriceProcDtlMapper extends MPJBaseMapper<LngPriceProcDtl>, BaseMapper<LngPriceProcDtl> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,17 @@
|
||||
package com.xjrsoft.module.contract.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.github.yulichang.base.MPJBaseMapper;
|
||||
import com.xjrsoft.module.contract.entity.LngPriceTransPngDtl;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* @title: mapper
|
||||
* @Author 管理员
|
||||
* @Date: 2026-02-24
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface LngPriceTransPngDtlMapper extends MPJBaseMapper<LngPriceTransPngDtl>, BaseMapper<LngPriceTransPngDtl> {
|
||||
|
||||
}
|
||||
@ -31,6 +31,7 @@ public class ContractProcServiceImpl extends MPJBaseServiceImpl<LngContractMappe
|
||||
|
||||
private final LngContractProcMapper lngContractProcMapper;
|
||||
private final LngPriceProcMapper lngPriceProcMapper;
|
||||
private final LngPriceProcDtlMapper lngPriceProcDtlMapper;
|
||||
private final LngContractFactMapper lngContractFactMapper;
|
||||
private final LngContractFactRelMapper lngContractFactRelMapper;
|
||||
private final LngContractApproRelMapper lngContractApproRelMapper;
|
||||
@ -43,19 +44,19 @@ public class ContractProcServiceImpl extends MPJBaseServiceImpl<LngContractMappe
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
LngContractPVo vo = BeanUtil.toBean(lngContract, LngContractPVo.class);
|
||||
List<LngContractProc> lngContractProcList = lngContractProcMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractProc>()
|
||||
.eq(LngContractProc::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractProcList)) {
|
||||
vo.setLngContractProcList(BeanUtil.copyToList(lngContractProcList,
|
||||
LngContractProcVo.class));
|
||||
}
|
||||
List<LngContractProcVo> lngContractProcVoList = lngContractProcMapper.selectByContractId(lngContract.getId());
|
||||
vo.setLngContractProcList(lngContractProcVoList);
|
||||
List<LngPriceProc> lngPriceProcList = lngPriceProcMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceProc>()
|
||||
.eq(LngPriceProc::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceProcList)) {
|
||||
vo.setLngPriceProcList(BeanUtil.copyToList(lngPriceProcList,
|
||||
LngPriceProcVo.class));
|
||||
List<LngPriceProcVo> lngPriceProcVoList = BeanUtil.copyToList(lngPriceProcList, LngPriceProcVo.class);
|
||||
vo.setLngPriceProcList(lngPriceProcVoList);
|
||||
lngPriceProcVoList.forEach(x -> {
|
||||
List<LngPriceProcDtl> lngPriceProcDtlList = lngPriceProcDtlMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceProcDtl>().eq(LngPriceProcDtl::getPpId, x.getId()));
|
||||
x.setLngPriceProcDtlList(BeanUtil.copyToList(lngPriceProcDtlList, LngPriceProcDtlVo.class));
|
||||
});
|
||||
}
|
||||
List<LngContractFactRel> lngContractFactRelList = lngContractFactRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractFactRel>()
|
||||
|
||||
@ -31,6 +31,7 @@ public class ContractTransPngServiceImpl extends MPJBaseServiceImpl<LngContractM
|
||||
|
||||
private final LngContractTransPngMapper lngContractTransPngMapper;
|
||||
private final LngPriceTransPngMapper lngPriceTransPngMapper;
|
||||
private final LngPriceTransPngDtlMapper lngPriceTransPngDtlMapper;
|
||||
private final LngContractFactMapper lngContractFactMapper;
|
||||
private final LngContractFactRelMapper lngContractFactRelMapper;
|
||||
private final LngContractApproRelMapper lngContractApproRelMapper;
|
||||
@ -43,20 +44,31 @@ public class ContractTransPngServiceImpl extends MPJBaseServiceImpl<LngContractM
|
||||
throw new BusinessException(BusinessCode.of(10500,"找不到此数据"));
|
||||
}
|
||||
LngContractTPVo vo = BeanUtil.toBean(lngContract, LngContractTPVo.class);
|
||||
List<LngContractTransPng> lngContractTransPngList = lngContractTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractTransPng>()
|
||||
.eq(LngContractTransPng::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngContractTransPngList)) {
|
||||
vo.setLngContractTransPngList(BeanUtil.copyToList(lngContractTransPngList,
|
||||
LngContractTransPngVo.class));
|
||||
}
|
||||
List<LngPriceTransPng> lngPriceTransPngList = lngPriceTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPng>()
|
||||
.eq(LngPriceTransPng::getKId, lngContract.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceTransPngList)) {
|
||||
vo.setLngPriceTransPngList(BeanUtil.copyToList(lngPriceTransPngList,
|
||||
LngPriceTransPngVo.class));
|
||||
List<LngContractTransPngVo> lngContractTransPngVoList = lngContractTransPngMapper
|
||||
.selectByContractId(lngContract.getId());
|
||||
vo.setLngContractTransPngList(lngContractTransPngVoList);
|
||||
if (CollectionUtils.isNotEmpty(lngContractTransPngVoList)) {
|
||||
lngContractTransPngVoList.forEach(x -> {
|
||||
List<LngPriceTransPng> lngPriceTransPngList = lngPriceTransPngMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPng>()
|
||||
.eq(LngPriceTransPng::getKtpId, x.getId()));
|
||||
if (CollectionUtils.isNotEmpty(lngPriceTransPngList)) {
|
||||
List<LngPriceTransPngVo> lngPriceTransPngVoList = BeanUtil.copyToList(lngPriceTransPngList,
|
||||
LngPriceTransPngVo.class);
|
||||
x.setLngPriceTransPngList(lngPriceTransPngVoList);
|
||||
lngPriceTransPngVoList.forEach(y -> {
|
||||
List<LngPriceTransPngDtl> lngPriceTransPngDtlList = lngPriceTransPngDtlMapper.selectList(
|
||||
new LambdaQueryWrapper<LngPriceTransPngDtl>().eq(LngPriceTransPngDtl::getPpId,
|
||||
y.getId()));
|
||||
y.setLngPriceTransPngDtlList(BeanUtil.copyToList(lngPriceTransPngDtlList,
|
||||
LngPriceTransPngDtlVo.class));
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
List<LngContractFactRel> lngContractFactRelList = lngContractFactRelMapper.selectList(
|
||||
new LambdaQueryWrapper<LngContractFactRel>()
|
||||
.eq(LngContractFactRel::getKId, lngContract.getId()));
|
||||
|
||||
Reference in New Issue
Block a user